VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtEntityLocationStateComponentImplementation Class Reference

Double-buffered entity location state component implementation.

Owns and coordinates the DtEntityLocationStateComponentCurrentFrame and DtEntityLocationStateComponentNextFrame instances. Tracks the last host (parent) entity so that forceAdvance() can demand a tick whenever the host moves. Also propagates the coordinate system to both frame states.

Inheritance diagram for makVrf::DtEntityLocationStateComponentImplementation:
Inheritance graph
[legend]

Public Member Functions

 DtEntityLocationStateComponentImplementation (DtStateData *sd)
 
bool isDoubleBuffered ()
 
virtual const
DtFrameStateInterface * 
currentFrameState () const override
 
virtual DtFrameStateInterface * nextFrameState () override
 
virtual const
DtFrameStateInterface * 
nextFrameState () const override
 
virtual void setCoordinateSystem (const Coordinate_System *cs) override
 
virtual bool forceAdvance () override
 
virtual void updateDataStorage () override
 
virtual void updateStateData (DtStateData *sd) override
 
virtual void aboutToBeDeleted () override
 
virtual void initializeFromParameters (const DtVrfObjectParameters *params) override
 
- Public Member Functions inherited from makVrf::DtDoubleBufferedStateComponent< DtEntityLocationStateComponent >
 DtDoubleBufferedStateComponent (DtStateData *sd)
 
virtual void setId (UInt64 id) override
 
virtual void setStateData (DtStateData *sd) override
 
virtual bool isDoubleBuffered () const override
 
virtual void advanceFrame () override
 
- Public Member Functions inherited from makVrf::DtStateComponent
 DtStateComponent (DtStateData *)
 
virtual ~DtStateComponent ()
 
virtual StateComponentType typeWithCreator () const =0
 
virtual StateComponentType componentType () const =0
 
virtual void setPublishingOnLegionNetwork (bool)
 
bool publishingOnLegionNetwork () const
 
virtual void setIsRemoteComponent (bool b)
 
virtual void convertToRemote ()
 
virtual void convertToLocal ()
 
bool isRemoteComponent () const
 
virtual void completeSetup ()
 
virtual UInt64 id () const
 
bool advancedFrame () const
 
virtual void firstFrameAdvance ()
 
UInt64 stateId () const
 
UInt64 legionGlobalId () const
 
const DtStateData * stateData () const
 
bool cleared () const
 
DtStateData * stateData ()
 
const Coordinate_System * coordinateSystem () const
 
virtual Legion::WriteStateInstance writeStateInstance ()
 
virtual void addAdditionalStateComponents ()
 
virtual void removeAdditionalStateComponents ()
 
virtual const char * stringType () const =0
 

Protected Member Functions

virtual void hostWasDeleted ()
 

Protected Attributes

DtEntityLocationStateComponentCurrentFrame myCurrentFrameState
 
DtEntityLocationStateComponentNextFrame myNextFrameState
 
DtEntityLocationStateComponent * myLastAttachedToLocationStateComponent
 
DtStateData * myLastAttachedTo
 
boost::signals2::scoped_connection myHostWasDeletedConnection
 
- Protected Attributes inherited from makVrf::DtStateComponent
UInt64 myId
 
DtStateData * myStateData
 
const Coordinate_System * myCoordinateSystem
 
bool myIsRemoteComponent
 
bool myCleared
 
bool myPublishingOnLegionNetwork
 
bool myAdvancedFrame
 

Additional Inherited Members

- Public Types inherited from makVrf::DtStateComponent
enum  StateComponentTypeEnum {
  Undefined = -1, SimulatedObjectStateComponent = 0, EntityStateComponent = SimulatedObjectStateComponent, EnvironmentalStateComponent = SimulatedObjectStateComponent,
  AggregateStateComponent = SimulatedObjectStateComponent, MetocServiceStateComponent = SimulatedObjectStateComponent, AerodromeStateComponent = SimulatedObjectStateComponent, SpotReportStateComponent = SimulatedObjectStateComponent,
  OrbatStateComponent = SimulatedObjectStateComponent, LocationStateComponent = 1, EntityLocationStateComponent = LocationStateComponent, EnvironmentalLocationStateComponent = LocationStateComponent,
  StaticLocationStateComponent = LocationStateComponent, HumanStateComponent = 2, ArticulatedPartStateComponent = 3, VrfStateComponent = 4,
  StatePropertiesStateComponent = 5, VrfGeometryStateComponent = 6, SubordinateManagerStateComponent = 7, RangeItemsStateComponent = 8,
  CloudLayerStateComponent = 9, TimeAndDateStateComponent = 10, WeatherStateComponent = 11, LaserDesignatorStateComponent = 12,
  EmitterSystemStateComponent = 13, IffStateComponent = 14, ActiveSonarStateComponent = 15, UnderwaterAcousticsStateComponent = 16,
  SensorFieldOfViewStateComponent = 17, RadioTransmitterStateComponent = 18, TaskVisualizationStateComponent = 19, TacticalSmokeStateComponent = 20,
  DynamicTerrainStateComponent = 21, RadioReceiverStateComponent = 22, WindCorridorStateComponent = 23, AirTurbulenceStateComponent = 24,
  NavAidRadioTransmitterStateComponent = 25, AisDataStateComponent = 26, AircraftLightingStateComponent = 27, LandSurfaceStateComponent = 28,
  WaterSurfaceStateComponent = 29, TroposphereStateComponent = 30, SubsurfaceStateComponent = 31, GroundVehicleLightingStateComponent = 32,
  LaserLightStateComponent = 33, SearchLightStateComponent = 34, UserStateComponent = 64
}
 
using StateComponentType = unsigned int
 
- Static Public Member Functions inherited from makVrf::DtDoubleBufferedStateComponent< DtEntityLocationStateComponent >
static void registerLegionComponent (Legion::SimulationDatabase *)
 
static void addAdditionalTableColumns (Legion::SimulationDatabase *)
 
- Public Attributes inherited from makVrf::DtStateComponent
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentAboutToBeDeleted
 
boost::signals2::signal< void(DtStateComponent *)> signal_componentModified
 

Constructor & Destructor Documentation

makVrf::DtEntityLocationStateComponentImplementation::DtEntityLocationStateComponentImplementation ( DtStateData *  sd)

Constructs the implementation, binding both frame states to sd.

Parameters
sdThe owning DtStateData instance.

Member Function Documentation

bool makVrf::DtEntityLocationStateComponentImplementation::isDoubleBuffered ( )
inline

Returns true; this component uses double-buffered state.

virtual const DtFrameStateInterface* makVrf::DtEntityLocationStateComponentImplementation::currentFrameState ( ) const
inlineoverridevirtual

Returns the current-frame state interface (read-only).

Reimplemented from makVrf::DtStateComponent.

virtual DtFrameStateInterface* makVrf::DtEntityLocationStateComponentImplementation::nextFrameState ( )
inlineoverridevirtual

Returns the next-frame state interface (read-write).

Reimplemented from makVrf::DtStateComponent.

virtual const DtFrameStateInterface* makVrf::DtEntityLocationStateComponentImplementation::nextFrameState ( ) const
inlineoverridevirtual

Returns the next-frame state interface (read-only overload).

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityLocationStateComponentImplementation::setCoordinateSystem ( const Coordinate_System *  cs)
overridevirtual

Sets the coordinate system on both the current-frame and next-frame kinematic states.

Parameters
csThe new coordinate system to apply.

Reimplemented from makVrf::DtStateComponent.

virtual bool makVrf::DtEntityLocationStateComponentImplementation::forceAdvance ( )
overridevirtual

Returns true when a frame advance must be forced this tick.

Returns true if the host entity is still valid and not frozen, so that attached entities track their host's movement. Also returns true for non-writable (remote) objects to ensure their kinematic state is kept current.

Reimplemented from makVrf::DtDoubleBufferedStateComponent< DtEntityLocationStateComponent >.

virtual void makVrf::DtEntityLocationStateComponentImplementation::updateDataStorage ( )
overridevirtual

Promotes next-frame kinematic state to the current frame.

Copies relative velocity/acceleration, refreshes the next-frame kinematic state for remote objects, validates parent state for attached objects, snapshots the next-frame kinematic state into the current-frame kinematic state, propagates the frame data via advanceFrame(), and fires signal_hostChanged if the host attachment changed.

Implements makVrf::DtDoubleBufferedStateComponent< DtEntityLocationStateComponent >.

virtual void makVrf::DtEntityLocationStateComponentImplementation::updateStateData ( DtStateData *  sd)
inlineoverridevirtual

Propagates a new DtStateData pointer into both frame states.

Parameters
sdThe new owning DtStateData instance.

Implements makVrf::DtDoubleBufferedStateComponent< DtEntityLocationStateComponent >.

virtual void makVrf::DtEntityLocationStateComponentImplementation::aboutToBeDeleted ( )
inlineoverridevirtual

Notifies both frame states that the component is about to be destroyed.

Reimplemented from makVrf::DtStateComponent.

References makVrf::DtStateComponent::aboutToBeDeleted().

virtual void makVrf::DtEntityLocationStateComponentImplementation::initializeFromParameters ( const DtVrfObjectParameters *  params)
overridevirtual

Initialises the dead-reckoning algorithm and thresholds from object parameters.

Sets the algorithm, translation/rotation thresholds, aggregate dimension threshold, and articulated part thresholds on the next-frame state.

Parameters
paramsObject parameters containing DR algorithm and threshold values.

Reimplemented from makVrf::DtStateComponent.

virtual void makVrf::DtEntityLocationStateComponentImplementation::hostWasDeleted ( )
protectedvirtual

Disconnects the host-deleted connection and clears the cached host pointers.

Member Data Documentation

DtEntityLocationStateComponentCurrentFrame makVrf::DtEntityLocationStateComponentImplementation::myCurrentFrameState
protected

Current-frame (read-only) entity location state.

DtEntityLocationStateComponentNextFrame makVrf::DtEntityLocationStateComponentImplementation::myNextFrameState
protected

Next-frame (write-access) entity location state.

DtEntityLocationStateComponent* makVrf::DtEntityLocationStateComponentImplementation::myLastAttachedToLocationStateComponent
protected

Pointer to the location state component of the last known host entity (for forceAdvance()).

DtStateData* makVrf::DtEntityLocationStateComponentImplementation::myLastAttachedTo
protected

Pointer to the last known host (parent) state data; null when not attached.

boost::signals2::scoped_connection makVrf::DtEntityLocationStateComponentImplementation::myHostWasDeletedConnection
protected

Scoped connection to the host state data's destruction signal.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)