VR-Forces 4.0.4 Class Documentation
include/vrfmodel/swingingPartActuator.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2006 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: swingingPartActuator.h,v $ $Revision: 1.6 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00013 
00014 #ifndef swingingPartActuator_H_
00015 #define swingingPartActuator_H_
00016 
00017 #include "vrfobjcore/actCmpnt.h"
00018 #include "vrfmodel/vrfmodelDefines.h"
00019 
00020 class DtString;
00021 class DtSimManager;
00022 class DtBooleanInputPort;
00023 class DtIntegerOutputPort;   
00024 class DtSimObjectBaseObjectStateRepository;
00025 class DtSwingingPartActuatorDescriptor;
00026 class DtSwingingPartActuatorPSR;
00027 
00039 class DT_DLL_vrfmodel DtSwingingPartActuator : public DtActuatorComponent
00040 {
00041 
00042 public:
00043 
00046    DtSwingingPartActuator(const DtString& name, 
00047       DtVrfObject* owner,
00048       DtSimManager* simManager, 
00049       DtComponentDescriptor* desc = 0,
00050       DtReaderWriterRegistry* parentRegistry = 0);
00051 
00053    virtual ~DtSwingingPartActuator();
00054 
00055    virtual bool init();
00056 
00058    virtual bool postAddComponentsInit();
00059 
00062    virtual DtString type() const;
00063 
00065    virtual void tick();
00066 
00070    static DtSimComponent * creator(const DtString& name, 
00071       DtVrfObject* owner,
00072       DtSimManager* simManager, 
00073       DtComponentDescriptor* desc = 0,
00074       DtReaderWriterRegistry* parentRegistry = 0);
00075 
00076 protected:
00078    virtual bool createPorts();
00079 
00085    virtual DtSwingingPartActuatorPSR* createPSR();
00086 
00088    virtual double currentPosition();
00089 
00091    virtual void setPositionAndRate(double newPos, double newRate);
00092 
00095    virtual bool angleWithinSlewArc(double angle);
00096 
00097 private:
00099    DtSwingingPartActuator();
00101    DtSwingingPartActuator(const DtSwingingPartActuator & orig);
00103    const DtSwingingPartActuator & operator=(const 
00104       DtSwingingPartActuator & orig);
00105 
00106 protected:
00107 
00110 
00114    DtIntegerOutputPort* myCurrentStateOutputPort;
00115 
00121    DtBooleanInputPort* myRequestedStateInputPort;
00123 
00125    DtArticulatedPartStateRepository *myArtPartStateRep;
00126 
00127    const DtSwingingPartActuatorDescriptor* myDescriptor;
00128 
00129    enum SwingAxis
00130    {
00131       XAxis,
00132       YAxis,
00133       ZAxis
00134    };
00135 
00136    SwingAxis mySwingAxis;
00137 
00140    DtSwingingPartActuatorPSR* myProcessState;
00141 };
00142 
00143 #endif
00144 

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)