VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtObserverShooter.h
Go to the documentation of this file.
1 /*****************************************************************************
2  ** Copyright (c) 2019 MAK Technologies, Inc.
3  ** All rights reserved.
4  *****************************************************************************/
5 #pragma once
6 
10 
11 #include "DtProjectile.h"
12 
13 #include <vrvCore/DtUniqueID.h>
14 
15 #include <matrix/vlVector.h>
16 #include <matrix/vlTaitBryan.h>
17 
18 #include <boost/unordered_map.hpp>
19 #include <boost/function.hpp>
20 
21 #include <list>
22 #include <string>
23 
24 // Use the VR-Vantage namespace.
25 // All classes in VR-Vantage are in this namespace.
26 namespace makVrv
27 {
28  class DtDe;
29 
31  {
32  public:
34  DtObserverShooter( DtDe& de );
35 
37  virtual ~DtObserverShooter();
38 
40  void fireProjectile();
41 
43  void setModelDefinitionName( const std::string& modelDefinitionName );
44 
46  void setProjectileSpeed( double speed );
47 
49  void tick( double simTime );
50 
52  void removeExpiredProjectiles();
53 
55  void setIntersectionCallback( DtProjectile::IntersectionCallback callback );
56 
57  protected:
58  typedef boost::unordered_map<DtUniqueID, DtProjectile*> ProjectileMap;
59  typedef std::list<DtUniqueID> ProjectileIDList;
60 
61  protected:
69  std::string myModelDefinitionName;
74  };
75 }
Contains the DtProjectile class definition.
std::list< DtUniqueID > ProjectileIDList
Definition: DtObserverShooter.h:59
boost::unordered_map< DtUniqueID, DtProjectile * > ProjectileMap
Definition: DtObserverShooter.h:58
boost::function< void(const DtIntersectorResult &, double)> IntersectionCallback
Definition: DtProjectile.h:40
double myProjectileSpeed
speed
Definition: DtObserverShooter.h:71
ProjectileIDList myExpiredProjectiles
expired projectile list
Definition: DtObserverShooter.h:67
#define DT_DLL_EXAMPLEPROJECTILE
Definition: exampleProjectile.h:20
DtProjectile::IntersectionCallback myIntersectionCallback
intersection callback
Definition: DtObserverShooter.h:73
Definition: DtObserverShooter.h:30
Contains makVrv::DtUniqueID type.
std::string myModelDefinitionName
projectile model definition
Definition: DtObserverShooter.h:69
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
ProjectileMap myProjectiles
Projectile list.
Definition: DtObserverShooter.h:65
DtDe & myDe
DtDe reference.
Definition: DtObserverShooter.h:63

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)