VR-Vantage 3.1 API Documentation
 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 
79  DtVector myFiringPosition;
81  DtVector myDirection;
83  DtVector myVelocity0;
85  DtVector myAcceleration;
86 
87  DtIntersector* myIntersector = nullptr;
88 
90 
93  DtCoordinateSystem* myCoordinateSystem = nullptr;
94  };
95 }


Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)