VR-Forces 4.6 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvCore
DtLineModelUpdater.h
Go to the documentation of this file.
1
/*****************************************************************************
2
* Copyright (c) 2017 MAK Technologies, Inc.
3
* All rights reserved.
4
*****************************************************************************/
5
9
10
#pragma once
11
12
#include <
vrvCore/DtAttachableUpdater.h
>
13
14
class
DtTaitBryan;
15
16
namespace
makVrv
17
{
18
22
class
DT_DLL_VRVCORE
DtLineModelUpdater
:
public
DtAttachableUpdater
23
{
24
public
:
26
DtLineModelUpdater
(
DtDe
& de,
DtElementID
id
);
27
29
virtual
~
DtLineModelUpdater
();
30
32
virtual
void
setStartPoint(
const
DtVector
& position );
33
36
virtual
void
attachStartPoint(
DtElementID
id
);
37
39
virtual
void
setStartPointOffset(
const
DtVector
&
offset
);
40
42
virtual
void
setEndPoint(
const
DtVector
& position );
43
46
virtual
void
attachEndPoint(
DtElementID
id
);
47
49
virtual
void
setEndPointOffset(
const
DtVector
& offset );
50
52
virtual
DtVector
calculateStartPoint();
53
55
virtual
DtVector
calculateEndPoint();
56
58
virtual
void
setSceneObject(
DtSceneObject
* sceneObject );
59
63
virtual
void
update(
DtTime
tNow );
64
65
protected
:
66
67
// \brief Updates the sceneObject
68
virtual
void
updateSceneObject(
DtTime
tNow ) = 0;
69
72
73
struct
PointInformation
;
74
76
virtual
void
cleanup(
PointInformation
& pointInfo );
77
83
virtual
DtVector
offsetPoint(
const
DtVector
& point,
const
DtVector
& offset,
84
const
DtTaitBryan& rootOri = DtTaitBryan() )
const
;
85
90
virtual
DtVector
getAttachedPosition(
PointInformation
& pointInfo );
91
93
virtual
void
getSceneInformation(
const
PointInformation
& info,
DtUniqueID
& sceneId );
94
96
99
101
virtual
void
slot_attachedSceneObjectToBeDeleted(
DtUniqueID
,
PointInformation
* );
102
104
virtual
void
slot_attachedUpdaterToBeDeleted(
DtUniqueID
,
PointInformation
* );
105
107
108
protected
:
109
110
struct
PointInformation
111
{
112
PointInformation
();
113
114
bool
defined
;
115
DtVector
position
;
116
DtVector
offset
;
117
int
modelSet
;
118
DtElementID
parentAttachID
;
119
DtSceneObject
*
sceneObject
;
120
121
// When the class is destructed, the scene object may or may not
122
// exist. Using a separate connection variable makes it possible to
123
// 'disconnect' even if the scene object has been deleted.
124
boost::signalslib::connection
sceneObjectConnection
;
125
boost::signalslib::connection
sceneObjectUpdaterConnection
;
126
127
DtSceneObjectUpdater
*
updater
;
128
};
129
130
PointInformation
myStartPoint
;
131
PointInformation
myEndPoint
;
132
133
};
134
}
135
Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)