VR-Vantage
Loading...
Searching...
No Matches
DtProjectile.h
Go to the documentation of this file.
1/*****************************************************************************
2** Copyright (c) 2024 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 <boost/bind/bind.hpp>
22
23#include <string>
24
25// Use the VR-Vantage namespace.
26// All classes in VR-Vantage are in this namespace.
27
28namespace makVrv
29{
30 class DtEntity3dFacade;
31 class DtDe;
33 class DtIntersector;
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
64
65 protected:
66
72 DtTaitBryan myOrientation;
77
81 DtVector myDirection;
83 DtVector myVelocity0;
86
88
90
94 };
95}
Base class to provide boost signal/slot management.
Contains makVrv::DtUniqueID type.
The DtCoordinateSystem is used to manage the current coordinate system of the scene.
Definition DtCoordinateSystem.h:41
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer,...
Definition DtDe.h:77
The DtEntity3dFacade is a facade around agents that make up an entity in the 3D model set.
Definition DtEntity3dFacade.h:40
DtIntersector is an abstract class that provides the interface for requesting intersections with the ...
Definition DtIntersector.h:27
Descriptor for a single intersection result.
Definition DtIntersectorResult.h:22
DtVector myDirection
vector direction
Definition DtProjectile.h:81
bool tick(double simTime)
update mechanism
virtual void slot_coordinateSystemChanged()
slot for when the coordinate system changes
std::function< void(const DtIntersectorResult &, double)> IntersectionCallback
Definition DtProjectile.h:40
DtDe & myDe
DtDe reference.
Definition DtProjectile.h:68
DtVector myFiringPosition
initial projectile position
Definition DtProjectile.h:79
DtTaitBryan myOrientation
projectile orientation
Definition DtProjectile.h:72
DtCoordinateSystem * myCoordinateSystem
Definition DtProjectile.h:93
DtProjectile(DtDe &de, const DtVector &start, const DtTaitBryan &orientation, double speed, const DtVector &direction, const std::string &modelDefinitionName, IntersectionCallback callback=(IntersectionCallback) 0)
CTOR.
DtVector myVelocity0
speed of the projectile
Definition DtProjectile.h:83
DtEntity3dFacade * myFacade
Definition DtProjectile.h:70
DtElementID id() const
return the projectile ID
DtSignalConnectionManager myConnections
Definition DtProjectile.h:89
IntersectionCallback myIntersectionCallback
Intersection function callback.
Definition DtProjectile.h:76
DtVector myAcceleration
projectile acceleration
Definition DtProjectile.h:85
virtual DtTaitBryan orientationFromOldAndNewPositions(const DtVector &oldPos, const DtVector &newPos)
return projectile orientation
virtual ~DtProjectile()
Virtual DTOR.
double myFiringStartTime
simulation time that the projectile got fired
Definition DtProjectile.h:74
DtIntersector * myIntersector
Definition DtProjectile.h:87
Class to manage disconnection of boost connections on deletion.
Definition DtSignalConnectionManager.h:21
#define DT_DLL_EXAMPLEPROJECTILE
Definition exampleProjectile.h:20
Contains DtCreateSensorFieldOfViewCommand and DtCreateSensorFieldOfViewCommandCreator class declarati...
Definition DtGridLinesSettingsRecord.h:16
DtUniqueID DtElementID
Definition DtUniqueID.h:23