VR-Vantage 2.5 API Documentation
Home
Modules
Namespaces
Classes
Files
Libraries
Examples
Tutorials
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
examples
exampleProjectile
DtProjectile.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
12
#include <
vrvCore/DtUniqueID.h
>
13
14
#include <matrix/vlVector.h>
15
#include <matrix/vlTaitBryan.h>
16
17
#include <boost/unordered_map.hpp>
18
#include <boost/function.hpp>
19
20
#include <string>
21
22
// Use the VR-Vantage namespace.
23
// All classes in VR-Vantage are in this namespace.
24
25
namespace
makVrv
26
{
27
class
DtEntity3dFacade;
28
class
DtDe;
29
class
DtIntersectorResult;
30
31
class
DtProjectile
32
{
33
public
:
34
35
typedef
boost::function<void ( const DtIntersectorResult&, double )>
IntersectionCallback
;
36
37
public
:
38
39
40
DtProjectile
(
DtDe
& de,
const
DtVector&
start
,
const
DtTaitBryan& orientation,
double
speed,
41
const
DtVector& direction,
const
std::string
& modelDefinitionName,
42
IntersectionCallback
callback = (
IntersectionCallback
) 0 );
43
44
virtual
~DtProjectile
();
45
46
bool
tick
(
double
simTime );
47
48
DtElementID
id
()
const
;
49
50
protected
:
51
virtual
DtTaitBryan
orientationFromOldAndNewPositions
(
const
DtVector& oldPos,
const
DtVector& newPos );
52
53
protected
:
54
DtDe
&
myDe
;
55
DtEntity3dFacade
*
myFacade
;
56
DtTaitBryan
myOrientation
;
57
double
myFiringStartTime
;
58
IntersectionCallback
myIntersectionCallback
;
59
60
DtVector
myFiringPosition
;
61
DtVector
myDirection
;
62
DtVector
myVelocity0
;
63
DtVector
myAcceleration
;
64
};
65
}
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)