VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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>
16 #include <osg/Geode>
17 #include <osg/MatrixTransform>
18 #include <osg/ShapeDrawable>
19 #include <osg/Material>
20 
21 namespace makVrv
22 {
26  {
27  public:
28 
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 
96 
98  };
99 
103  {
104  public:
105 
107  static void registerCreator(DtDe& de);
108 
111 
113  virtual DtModelInstance* create(DtDe& de);
114 
115  protected:
116 
118  };
119 }
120 
The base class for all model instances.
Definition: DtModelInstance.h:39
virtual void setVisible(bool isVisible)
no-op
Definition: DtEllipsoidModelInstance.h:58
osg::ref_ptr< osg::ShapeDrawable > myEllipsoidDrawable
Definition: DtEllipsoidModelInstance.h:83
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osg::Geode > myGeode
Geode to draw the geometry when no blending is required.
Definition: DtEllipsoidModelInstance.h:85
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:33
Contains makVrv::DtOsgModelInstance class.
osg::Vec4 myColor
Definition: DtEllipsoidModelInstance.h:81
The model instance to draw an ellipsoid.
Definition: DtEllipsoidModelInstance.h:25
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
The polymorphic creator for the DtModelInstance.
Definition: DtModelInstance.h:148
A Creator for the makVrv::DtEllipsoidModelInstance class.
Definition: DtEllipsoidModelInstance.h:102
osg::ref_ptr< osg::MatrixTransform > myTransform
My tranform.
Definition: DtEllipsoidModelInstance.h:93
osg::Vec3 myDimensions
The current parameter set.
Definition: DtEllipsoidModelInstance.h:80
osg::ref_ptr< osg::Geode > myBlendedGeode
Geode to draw the geometry when single-sided blending is required.
Definition: DtEllipsoidModelInstance.h:87
bool mySingleSided
Definition: DtEllipsoidModelInstance.h:97
osg::ref_ptr< osg::Material > myMaterial
My Material.
Definition: DtEllipsoidModelInstance.h:95
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
osg::ref_ptr< osg::Geode > myBackGeode
Geode to draw the geometry with frontface culling.
Definition: DtEllipsoidModelInstance.h:91
osg::ref_ptr< osg::Geode > myFrontGeode
Geode to draw the geometry with backface culling.
Definition: DtEllipsoidModelInstance.h:89

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)