VR-Forces 4.3 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvOsg
DtEllipsoidModelInstance.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2011 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: DtEllipsoidModelInstance.h,v $ $Revision: 1.0 $ $State: Exp $
7
******************************************************************************/
8
12
13
#pragma once
14
#include <
vrvOsg/vrvOsg.h
>
15
#include <
vrvOsg/DtOsgModelInstance.h
>
16
#include <osg/Geode>
17
#include <osg/MatrixTransform>
18
#include <osg/ShapeDrawable>
19
#include <osg/Material>
20
21
namespace
makVrv
22
{
25
class
DT_DLL_VRVOSG
DtEllipsoidModelInstance
:
public
DtOsgModelInstance
26
{
27
public
:
28
30
DtEllipsoidModelInstance
(
DtDe
& de);
31
33
virtual
~
DtEllipsoidModelInstance
();
34
36
virtual
void
setDimensions(
float
length,
float
width,
float
height);
37
39
virtual
void
dimensions(
float
& length,
float
& width,
float
& height);
40
42
virtual
void
setColor(
float
r,
float
g,
float
b,
float
a);
43
45
virtual
void
setColor(
const
osg::Vec4& color);
46
48
const
osg::Vec4& color()
const
;
49
51
virtual
void
setLightingEnabled(
bool
enabled );
52
55
virtual
bool
realize(
DtModelDefinition
& definition);
56
58
virtual
void
setVisible
(
bool
isVisible) {}
59
60
protected
:
61
63
virtual
void
updateColors();
64
66
virtual
void
updateTransform();
67
69
void
createBlendedGeodes();
70
72
void
createOpaqueGeode();
73
75
void
createSingleSidedBlendedGeode();
76
77
protected
:
78
80
osg::Vec3
myDimensions
;
81
osg::Vec4
myColor
;
82
83
osg::ref_ptr<osg::ShapeDrawable>
myEllipsoidDrawable
;
85
osg::ref_ptr<osg::Geode>
myGeode
;
87
osg::ref_ptr<osg::Geode>
myBlendedGeode
;
89
osg::ref_ptr<osg::Geode>
myFrontGeode
;
91
osg::ref_ptr<osg::Geode>
myBackGeode
;
93
osg::ref_ptr<osg::MatrixTransform>
myTransform
;
95
osg::ref_ptr<osg::Material>
myMaterial
;
96
97
bool
mySingleSided
;
98
};
99
102
class
DT_DLL_VRVOSG
DtEllipsoidModelInstanceCreator
:
public
DtModelInstanceCreator
103
{
104
public
:
105
107
static
void
registerCreator(
DtDe
& de);
108
110
virtual
~
DtEllipsoidModelInstanceCreator
();
111
113
virtual
DtModelInstance
* create(
DtDe
& de);
114
115
protected
:
116
117
DtEllipsoidModelInstanceCreator
();
118
};
119
}
120
Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (
www.mak.com
)