VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtVreStabilizedArtPartActuator Class Reference

#include <artPartActuator.h>

Inheritance diagram for makVre::DtVreStabilizedArtPartActuator:
[legend]

Public Member Functions

 DtVreStabilizedArtPartActuator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreStabilizedArtPartActuator () override
 
virtual const char * type () const override
 
virtual bool init () override
 
virtual bool postAddComponentsInit () override
 
virtual void tick () override
 
- Public Member Functions inherited from makVre::DtVreSimComponent< DtActuatorComponent >
 DtVreSimComponent (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreSimComponent ()
 
bool isPlayerControlled (const std::string &role="") const
 
DtString entitySystemName () const
 

Static Public Member Functions

static DtSimComponent * creator (const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 

Protected Member Functions

 DtVreStabilizedArtPartActuator ()
 
 DtVreStabilizedArtPartActuator (const DtVreStabilizedArtPartActuator &orig)
 
const DtVreStabilizedArtPartActuatoroperator= (const DtVreStabilizedArtPartActuator &orig)
 
virtual bool createPorts () override
 
DtVector getLocalRotationAxis (const DtDcm &orientation)
 
double calculateSlewToTarget (const DtVector &target)
 
bool checkStabilizeState ()
 
void setCueToCurrent ()
 
double getSlewPortInput ()
 
double realizeSlew (double &slewRate)
 
DtDcm axisOrientation () const
 
virtual DtVreMessageResult handleSlewToCue (DtVreMessage *msg)
 

Protected Attributes

const DtVreStabilizedArtPartActuatorDescriptormyArtPartActuatorDescriptor
 
DtArtPartType myPartType
 
makVrf::DtArticulatedPartStateRepository * myPart
 
bool myRotation360
 
DtReal myLowerLimit
 
DtReal myUpperLimit
 
bool myStabilizeButtonDown
 
bool myStabilizationOn
 
DtVector myCueVector
 
bool mySlewToCueOverrideActive
 
bool myRequireNewData
 
double myLastInput
 
Ports and Port Groups
DtConstrainedAnalogInputPort * mySlewPort
 
DtBooleanInputPort * myStabilizePort
 

Constructor & Destructor Documentation

◆ DtVreStabilizedArtPartActuator() [1/3]

makVre::DtVreStabilizedArtPartActuator::DtVreStabilizedArtPartActuator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )

◆ ~DtVreStabilizedArtPartActuator()

virtual makVre::DtVreStabilizedArtPartActuator::~DtVreStabilizedArtPartActuator ( )
overridevirtual

destructor

◆ DtVreStabilizedArtPartActuator() [2/3]

makVre::DtVreStabilizedArtPartActuator::DtVreStabilizedArtPartActuator ( )
protected

default constructor; not implemented

◆ DtVreStabilizedArtPartActuator() [3/3]

makVre::DtVreStabilizedArtPartActuator::DtVreStabilizedArtPartActuator ( const DtVreStabilizedArtPartActuator & orig)
protected

copy constructor; not implemented

References DtVreStabilizedArtPartActuator().

Member Function Documentation

◆ type()

virtual const char * makVre::DtVreStabilizedArtPartActuator::type ( ) const
overridevirtual

Returns
DtTurretActuatorType

◆ init()

virtual bool makVre::DtVreStabilizedArtPartActuator::init ( )
overridevirtual

◆ postAddComponentsInit()

virtual bool makVre::DtVreStabilizedArtPartActuator::postAddComponentsInit ( )
overridevirtual

Calls lookupAndCacheProcessSR() and initProcessSR()

◆ tick()

virtual void makVre::DtVreStabilizedArtPartActuator::tick ( )
overridevirtual

Calculate new kinematic state.

◆ creator()

static DtSimComponent * makVre::DtVreStabilizedArtPartActuator::creator ( const DtString & name,
DtLocalObject * owner,
DtSimulationServices * simManager,
DtComponentDescriptor * desc = 0,
DtReaderWriterRegistry * parentRegistry = 0 )
static

Returns
New instance of this class.

◆ operator=()

const DtVreStabilizedArtPartActuator & makVre::DtVreStabilizedArtPartActuator::operator= ( const DtVreStabilizedArtPartActuator & orig)
protected

assignment operator; not implemented

References DtVreStabilizedArtPartActuator().

◆ createPorts()

virtual bool makVre::DtVreStabilizedArtPartActuator::createPorts ( )
overrideprotectedvirtual

Creates the slew port.

◆ getLocalRotationAxis()

DtVector makVre::DtVreStabilizedArtPartActuator::getLocalRotationAxis ( const DtDcm & orientation)
protected

◆ calculateSlewToTarget()

double makVre::DtVreStabilizedArtPartActuator::calculateSlewToTarget ( const DtVector & target)
protected

◆ checkStabilizeState()

bool makVre::DtVreStabilizedArtPartActuator::checkStabilizeState ( )
protected

◆ setCueToCurrent()

void makVre::DtVreStabilizedArtPartActuator::setCueToCurrent ( )
protected

◆ getSlewPortInput()

double makVre::DtVreStabilizedArtPartActuator::getSlewPortInput ( )
protected

◆ realizeSlew()

double makVre::DtVreStabilizedArtPartActuator::realizeSlew ( double & slewRate)
protected

◆ axisOrientation()

DtDcm makVre::DtVreStabilizedArtPartActuator::axisOrientation ( ) const
protected

◆ handleSlewToCue()

virtual DtVreMessageResult makVre::DtVreStabilizedArtPartActuator::handleSlewToCue ( DtVreMessage * msg)
protectedvirtual

Member Data Documentation

◆ mySlewPort

DtConstrainedAnalogInputPort* makVre::DtVreStabilizedArtPartActuator::mySlewPort
protected

Input Port Name: slew
Input Port Description: -1.0 indicates maximum left slew, 1.0 indicates maximum right slew
Input Port Range: -1. to 1.
Input Port Default Value:
Input Group Parent:

◆ myStabilizePort

DtBooleanInputPort* makVre::DtVreStabilizedArtPartActuator::myStabilizePort
protected

Input Port Name: stabilize
Input Port Description: Set stabilization on or off for this actuator.
Input Port Range:
Input Group Parent:
.

◆ myArtPartActuatorDescriptor

const DtVreStabilizedArtPartActuatorDescriptor* makVre::DtVreStabilizedArtPartActuator::myArtPartActuatorDescriptor
protected

◆ myPartType

DtArtPartType makVre::DtVreStabilizedArtPartActuator::myPartType
protected

◆ myPart

makVrf::DtArticulatedPartStateRepository* makVre::DtVreStabilizedArtPartActuator::myPart
protected

◆ myRotation360

bool makVre::DtVreStabilizedArtPartActuator::myRotation360
protected

Cache for the condition for 360 rotation, which is hasFixedAzimuth = false and leftLimit = rightLimit (all info from turretComponentDescriptor)

◆ myLowerLimit

DtReal makVre::DtVreStabilizedArtPartActuator::myLowerLimit
protected

Local copies of the parameters in the turret descriptor, conditioned to be between 0 and 2pi.

◆ myUpperLimit

DtReal makVre::DtVreStabilizedArtPartActuator::myUpperLimit
protected

◆ myStabilizeButtonDown

bool makVre::DtVreStabilizedArtPartActuator::myStabilizeButtonDown
protected

◆ myStabilizationOn

bool makVre::DtVreStabilizedArtPartActuator::myStabilizationOn
protected

◆ myCueVector

DtVector makVre::DtVreStabilizedArtPartActuator::myCueVector
protected

◆ mySlewToCueOverrideActive

bool makVre::DtVreStabilizedArtPartActuator::mySlewToCueOverrideActive
protected

◆ myRequireNewData

bool makVre::DtVreStabilizedArtPartActuator::myRequireNewData
protected

When switching weapon systems, we can't rely on the port to determine if there's been new data sent. Therefore, if we switched away from this weapon while giving turret input, we need to cache that last input value so we can test it against new inputs when we switch back.

◆ myLastInput

double makVre::DtVreStabilizedArtPartActuator::myLastInput
protected

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