VR-Forces 4.0.4 Class Documentation
include/vrfmodel/gndMvAlgCtl.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1999 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: gndMvAlgCtl.h,v $ $Revision: 1.43 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00014 
00015 #ifndef DtGroundMoveAlongControllerComponent_H_
00016 #define DtGroundMoveAlongControllerComponent_H_
00017 
00018 #include "vrfmodel/gndMvToCntlr.h"
00019 
00020 class DtLocalVectorIterator;
00021 
00022 
00027 #include "vrfmodel/vrfmodelDefines.h"
00028 class DT_DLL_vrfmodel DtGroundMoveAlongControllerComponent : public 
00029    DtGroundMoveToDestinationControllerComponent
00030 {
00031 
00032 public:
00033 
00036    DtGroundMoveAlongControllerComponent(const DtString& name, 
00037       DtVrfObject* owner,
00038       DtSimManager* simManager, 
00039       DtComponentDescriptor* desc = 0,
00040       DtReaderWriterRegistry* parentRegistry = 0);
00041 
00043    virtual ~DtGroundMoveAlongControllerComponent();
00044 
00047    virtual DtString type() const;
00048 
00051    virtual void tick();
00052 
00056    static void moveAlongCallback(DtSimMessage * msg, void * usr);
00057 
00060    virtual void processMoveAlongTask(DtSimMessage * msg);
00061 
00063    static void routeChangedCallback(DtVrfObject* obj, void * usr);
00064    virtual void processRouteChanged(DtVrfObject* obj);
00065 
00067    virtual void registerTaskMsgCallbacks();
00068 
00072    static DtSimComponent * creator(const DtString& name, 
00073       DtVrfObject* owner,
00074       DtSimManager* simManager, 
00075       DtComponentDescriptor* desc = 0,
00076       DtReaderWriterRegistry* parentRegistry = 0);
00077 
00085    virtual bool setupRoute();
00086 
00093    virtual bool setupDestination();
00094 
00113    virtual double findDesiredSpeed();
00114 
00116    virtual double findCosTurnAngle();
00117 
00123    virtual void stop();
00124 
00126    static void objectAddedCb(DtVrfObject * vrfObject, void * usr);
00127 
00128 protected:
00129 
00131    DtGroundMoveAlongControllerComponent();
00132 
00134    DtGroundMoveAlongControllerComponent(
00135       const DtGroundMoveAlongControllerComponent& orig);
00136 
00138    DtGroundMoveAlongControllerComponent& operator=(
00139       const DtGroundMoveAlongControllerComponent& orig);
00140 
00144    virtual void buildLocalRoute();
00145 
00148    virtual void emptyVertexList();
00149 
00153    virtual void processObjectAdded(DtVrfObject * vrfObject);
00154 
00157    virtual void clearTask();
00158 
00159    virtual bool decideToGiveUpTask() const;
00160 
00161 protected:
00162 
00165    DtVrfObject*            myRoute;
00166 
00169    bool               myRouteHasChanged;
00170    bool               myResetVertex;
00171 
00172    bool myFirstTick;
00173 
00174    int myPreviousVertex;
00175 };
00176 
00177 #endif
00178 

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)