VR-Link API Documentation for HLA Evolved
vehicleSim.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 *******************************************************************************/
00007 
00008 #pragma once
00009 
00010 #include <vl/exerciseConn.h>
00011 #include <vl/reflEntList.h>
00012 #include <vl/entityPub.h>
00013 #include <vl/emittrSysPub.h>
00014 #include <vl/topoView.h>
00015 #include <vl/detonateInter.h>
00016 #include <vl/fireInter.h>
00017 
00018 class DtEmitterBeamRepository;
00019 
00022 class DtVehicleSim
00023 {
00024 public:
00025 
00028    DtVehicleSim( double refLat, double refLon,
00029       DtExerciseConn* conn, DtReflectedEntityList* rel, 
00030       const DtEntityIdentifier& id, const DtEntityType& type,
00031       const char* name, const char* markings,
00032       const DtDeadReckonTypes alg, bool haveArtParts );
00033 
00035    virtual ~DtVehicleSim();
00036 
00038    virtual void init( DtConstVector initPos, double initSpeed,
00039       double initHeading, double initTRadius,
00040       double initPitch, bool autoRoll, double initRoll );
00041    
00043    virtual void simTick( DtTime dt );
00044    
00046    virtual void fireMunition( const DtGlobalObjectDesignator& tg );
00047    virtual void fireMunition();
00048    virtual void detonateMunition();
00049    virtual void munitionTick();
00050 
00052    virtual void processDetonation( DtDetonationInteraction* inter );
00053    virtual int checkDetonation( DtDetonationInteraction* inter );
00054    virtual void reactToDamage();
00055    virtual bool isDestroyed();
00056    virtual DtTime timeDestroyed();
00057    
00059    virtual void toggleEmissions();
00060    virtual void enableEmissions();
00061    virtual void disableEmissions();
00062    virtual void emissionsTick( double dt );
00063 
00064 public:
00065 
00066    static void setLethalDetonationRange( double range );
00067    static void setMunitionFlightTime( DtTime time );
00068 
00069 protected:
00070 
00071    virtual void moveArtParts( DtTime dt );
00072  
00073 protected:
00074 
00075    static void theDetonationCb( DtDetonationInteraction*, void* );
00076 
00077 protected:
00078    DtExerciseConn*           myExConn;
00079    DtEntityPublisher*        myEntityPub;
00080    DtEmitterSystemPublisher* mySysPub;
00081    DtEntityStateRepository*  myESR;
00082    DtTopoView*               myTopoView;
00083    DtReflectedEntityList*    myRel;
00084    DtEmitterBeamRepository*  myBeam;
00085 
00086    double mySpeed;
00087    double myTurnRadius;
00088    double myTurnRate;
00089    double myScalarAccel;
00090    double myBeamTime;
00091    
00092    DtTaitBryan myEuler;   
00093    DtVector    myPos;     
00094    DtVector    myVel;     
00095    DtVector    myAccel;   
00096    DtVector    myRotRate; 
00097 
00098    float       myTurretAz;
00099    float       myTurretAzRate;
00100    float       myGunElev;
00101    float       myGunElevRate;
00102 
00103    DtFireInteraction* myFire;
00104    DtTime    myDetonateTime;
00105    DtTime    myTimeDestroyed;
00106    bool myIsDestroyed;
00107 
00108    bool myHaveArtParts;
00109    bool myEmissionsEnabled;
00110 
00111 protected:
00112    static double theLethalDetonationRange;
00113    static DtTime theMunitionFlightTime;
00114 };
00115 

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)