VR-Forces 4.0.4 Class Documentation
include/vrfmodel/surfEntMvToCtl.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2007 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: surfEntMvToCtl.h,v $ $Revision: 1.25 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00014 
00015 
00016 #ifndef DtSurfaceEntityMoveToController_H_
00017 #define DtSurfaceEntityMoveToController_H_
00018 
00019 #include "vrfmodel/surfEntPltCtl.h"
00020 
00021 class DtString;
00022 class DtSimManager;
00023 
00038 #include "vrfmodel/vrfmodelDefines.h"
00039 class DT_DLL_vrfmodel DtSurfaceEntityMoveToController : public DtSurfaceEntityPilotController
00040 {
00041 public:
00042 
00045    DtSurfaceEntityMoveToController (const DtString& name, 
00046       DtVrfObject* owner,
00047       DtSimManager* simManager, 
00048       DtComponentDescriptor* desc = 0,
00049       DtReaderWriterRegistry* parentRegistry = 0);
00050 
00052    virtual ~DtSurfaceEntityMoveToController();
00053 
00056    virtual DtString type() const;
00057 
00084    virtual void tick();
00085 
00095    virtual void setupGoalVector(const DtVector & goalPosition);
00096 
00099    virtual void doMoving (double desiredSpeed);
00100 
00107    virtual bool passedGoal();
00108 
00119    virtual bool atGoal();
00120 
00132    virtual bool nearGoal();
00133 
00135    virtual double findDesiredSpeed();
00136 
00145    static void moveToCallback (DtSimMessage* msg, void* user);
00146 
00154    virtual void processMoveToTask (DtSimMessage* msg);
00155 
00159    virtual void registerTaskMsgCallbacks();
00160 
00164    static DtSimComponent* creator(const DtString& name, 
00165       DtVrfObject* owner,
00166       DtSimManager* simManager, 
00167       DtComponentDescriptor* desc = 0,
00168       DtReaderWriterRegistry* parentRegistry = 0);
00169 
00170 private:
00171 
00173    DtSurfaceEntityMoveToController();
00174 
00176    DtSurfaceEntityMoveToController(const DtSurfaceEntityMoveToController& orig);
00177 
00179    const DtSurfaceEntityMoveToController& operator=(
00180       const DtSurfaceEntityMoveToController& orig);
00181 
00182 protected:
00189    virtual bool setupControlPoint();
00190 
00191 protected:
00194    virtual double distanceSquaredToDestination2D(const DtVector& current) const;
00195 
00197    virtual void getLocalDestination(DtVector& local) const;
00198 
00199 protected:
00200 
00202    DtVrfObject* myControlPoint;
00204    DtVector myControlPointLastLocation;
00205 
00207    DtVector myGoalVector;
00208 
00209    bool        myAtGoal;
00210    bool        myNearGoal;
00211    bool        myPassedGoal;
00212 };
00213 
00214 #endif

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)