VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtProjectile.h
Go to the documentation of this file.
1 /*****************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 #pragma once
6 
10 
11 #include "exampleProjectile.h"
12 
13 #include <vrvCore/DtUniqueID.h>
14 
16 
17 #include <matrix/vlVector.h>
18 #include <matrix/vlTaitBryan.h>
19 
20 #include <unordered_map>
21 #include <functional>
22 
23 #include <string>
24 
25 // Use the VR-Vantage namespace.
26 // All classes in VR-Vantage are in this namespace.
27 
28 namespace makVrv
29 {
30  class DtEntity3dFacade;
31  class DtDe;
32  class DtIntersectorResult;
33  class DtIntersector;
34  class DtCoordinateSystem;
35 
37  {
38  public:
39 
40  typedef std::function<void ( const DtIntersectorResult&, double )> IntersectionCallback;
41 
42  public:
44  DtProjectile(DtDe& de, const DtVector& start, const DtTaitBryan& orientation, double speed,
45  const DtVector& direction, const std::string& modelDefinitionName,
47 
49  virtual ~DtProjectile();
50 
52  bool tick( double simTime );
53 
55  DtElementID id() const;
56 
57  protected:
58 
60  virtual DtTaitBryan orientationFromOldAndNewPositions(const DtVector& oldPos, const DtVector& newPos );
61 
63  virtual void slot_coordinateSystemChanged();
64 
65  protected:
66 
72  DtTaitBryan myOrientation;
77 
86 
87  DtIntersector* myIntersector = nullptr;
88 
90 
93  DtCoordinateSystem* myCoordinateSystem = nullptr;
94  };
95 }
DtTaitBryan myOrientation
projectile orientation
Definition: DtProjectile.h:72
DtSignalConnectionManager myConnections
Definition: DtProjectile.h:89
DtVector myFiringPosition
initial projectile position
Definition: DtProjectile.h:79
DtIntersector is an abstract class that provides the interface for requesting intersections with the ...
Definition: DtIntersector.h:25
DtEntity3dFacade * myFacade
Definition: DtProjectile.h:70
std::function< void(const DtIntersectorResult &, double)> IntersectionCallback
Definition: DtProjectile.h:40
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:23
DtVector myDirection
vector direction
Definition: DtProjectile.h:81
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The DtEntity3dFacade is a facade around agents that make up an entity in the 3D model set...
Definition: DtEntity3dFacade.h:39
#define DT_DLL_EXAMPLEPROJECTILE
Definition: exampleProjectile.h:20
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition: DtCoordinateSystem.h:40
DtVector myVelocity0
speed of the projectile
Definition: DtProjectile.h:83
Base class to provide boost signal/slot management.
Contains makVrv::DtUniqueID type.
DtDe & myDe
DtDe reference.
Definition: DtProjectile.h:68
Definition: DtProjectile.h:36
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:72
double myFiringStartTime
simulation time that the projectile got fired
Definition: DtProjectile.h:74
IntersectionCallback myIntersectionCallback
Intersection function callback.
Definition: DtProjectile.h:76
DtVector myAcceleration
projectile acceleration
Definition: DtProjectile.h:85

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)