VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvOsg
DtEffectModelInstance.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2008 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtEffectModelInstance.h,v $ $Revision: 1.24 $ $State: Exp $
7
******************************************************************************/
8
12
13
#ifndef DtEffectModelInstance_H_
14
#define DtEffectModelInstance_H_
15
16
#include <
vrvOsg/vrvOsg.h
>
17
#include <
vrvOsg/DtOsgModelInstance.h
>
18
#include <
vrvOsg/DtParticleEffect.h
>
19
#include <
vrvOsg/DtOsgRibbon.h
>
20
#include <matrix/vlVector.h>
21
22
#include <osg/ref_ptr>
23
#include <osg/BoundingBox>
24
25
namespace
osg
26
{
27
class
Geode;
28
class
Group
;
29
}
30
31
namespace
makVrv
32
{
33
class
DtParticleEffect;
34
class
DtOsgRibbon;
35
class
DtOsgSceneConnector;
36
39
class
DT_DLL_VRVOSG
DtEffectModelInstance
:
public
DtOsgModelInstance
40
{
41
public
:
42
43
friend
class
DtEffectModelInstanceCreator
;
44
46
virtual
~
DtEffectModelInstance
();
47
49
virtual
void
setIntensity(
float
intensity);
50
52
virtual
void
setScale(
float
scale);
53
55
virtual
void
setDuration(
double
seconds);
56
58
virtual
void
setWind(
const
DtVector
& windVector);
59
62
virtual
void
setPosition(
const
DtVector
& position);
63
66
virtual
bool
realize(
DtModelDefinition
& definition);
67
69
virtual
void
addToConnector(
DtOsgSceneConnector
* connector );
70
72
virtual
bool
removeFromConnector(
DtOsgSceneConnector
* connector );
73
75
virtual
void
stop();
76
78
virtual
void
start();
79
81
virtual
void
pause();
82
83
virtual
void
resume();
84
85
virtual
void
setLoopMode(
bool
loopOn);
86
87
virtual
void
setReverseAnimation(
bool
reverse);
88
90
virtual
void
setVisible(
bool
isVisible);
91
92
protected
:
93
95
DtOsgRibbon
* createRibbonEffect(
const
osg::Vec3& pointA,
const
osg::Vec3& pointB);
96
DtEffectModelInstance
(
DtDe
& de);
97
98
osg::BoundingBox calculateParentExtents(osg::Node* parent);
99
101
osg::Node* findFromCache(
DtModelDefinition
& definition);
102
104
osg::ref_ptr<osg::Node> loadNode(
const
std::string& filenameParam);
105
106
osg::ref_ptr<DtParticleEffect>
myEffect
;
107
bool
myParentIsDynamic
;
108
bool
myScaleToParentY
;
109
std::string
myDefinition
;
110
osg::ref_ptr<DtOsgRibbon>
myRibbon
;
111
DtOsgSceneConnector
*
mySceneConnector
;
112
};
113
116
class
DT_DLL_VRVOSG
DtEffectModelInstanceCreator
:
public
DtModelInstanceCreator
117
{
118
public
:
119
121
static
void
registerCreator(
DtDe
& de);
122
124
virtual
~
DtEffectModelInstanceCreator
();
125
127
virtual
DtModelInstance
* create(
DtDe
& de);
128
129
protected
:
130
131
DtEffectModelInstanceCreator
();
132
};
133
}
134
135
#endif
136
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)