VR-Forces 4.0.4 Class Documentation
include/vrfmodel/aggregatedMovementActuator.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: aggregatedMovementActuator.h,v $ $Revision: 1.1 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #ifndef aggregatedMovementActuator_H_
00013 #define aggregatedMovementActuator_H_
00014 
00015 
00016 #include "vrfobjcore/actCmpnt.h"
00017 #include "vrfmodel/vrfmodelDefines.h"
00018 
00019 class DtInputPortGroup;
00020 class DtAnalogInputPort;
00021 class DtVrfMovingObjectStateRepository;
00022 class DtVrfAggregateStateRepository;
00023 class DtActuatorComponentDescriptor;
00024 
00025 
00031 class DT_DLL_vrfmodel DtAggregatedMovementActuator : public DtActuatorComponent
00032 {
00033 public:
00034 
00036    DtAggregatedMovementActuator(const DtString& name, DtVrfObject* object, 
00037       DtSimManager* simManager, DtComponentDescriptor* compDescriptor, 
00038       DtReaderWriterRegistry* parentRegistry = 0);
00039 
00041    virtual ~DtAggregatedMovementActuator();
00042 
00044    virtual bool init();
00045 
00047    virtual DtString type() const;
00048 
00050    virtual void tick();
00051 
00052 public:
00053 
00056    static DtSimComponent* creator(const DtString& name, DtVrfObject* object,
00057       DtSimManager* simManager, DtComponentDescriptor* compDescriptor,
00058       DtReaderWriterRegistry* parentRegistry);
00059 
00060 protected:
00061 
00062    virtual DtVector calculateProjectedLocation(
00063       const DtVector& oldLocalPosition, const DtVector& newBodyVelocity,
00064       double newHeading);
00065 
00066    virtual void calculateOrientationAndPosition(
00067       const DtVector& newLocalProjectedLocation, double newHeading,
00068       DtDcm& newLocalOrientation, DtVector& newLocalPosition);
00069    
00070    virtual void groundClamp(double heading, 
00071       const DtVector& location, DtAttachedTerrain& terrainDatabase, DtVector& newNormal);
00072 
00073    virtual void updateRepository(const DtVector & position,
00074       const DtVector & velocity, const DtVector & acceleration,
00075       const DtTaitBryan & localOrientation, const DtVector& rotationalVelocity);
00076 
00077 protected:
00079    virtual bool createPorts();
00080 
00082    virtual bool createPortGroups();
00083 
00085    DtAggregatedMovementActuator(const DtAggregatedMovementActuator & orig);
00086 
00088    const DtAggregatedMovementActuator & operator=(const DtAggregatedMovementActuator & orig);
00089 
00090 protected:
00093 
00100    DtAnalogInputPort* myMovementDirectionInputPort;
00101 
00107    DtAnalogInputPort* mySpeedInputPort;
00108 
00112    DtInputPortGroup* myMovementControlPortGroupInputPortGroup;
00113 
00117    DtVrfMovingObjectStateRepository* myMovingObjectStateRepository;
00118    DtVrfAggregateStateRepository* myAggregateStateRepository;
00120 
00121    const DtActuatorComponentDescriptor* myActuatorDescriptor;
00122 
00123 };
00124 
00125 #endif
00126 
00127 

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)