VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCylinderModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
15 #include <osg/Geode>
16 #include <osg/MatrixTransform>
17 #include <osg/Drawable>
18 #include <osg/Material>
19 
20 namespace makVrv
21 {
25  {
26  public:
27 
30 
32  virtual ~DtCylinderModelInstance();
33 
34  private:
35 
38 
41 
44 
45  public:
46 
48  virtual void setDimensions(float length, float width, float height);
49 
51  virtual void dimensions(float& length, float& width, float& height);
52 
54  virtual void setColor(float r,float g,float b,float a);
55 
57  virtual void setColor(const osg::Vec4& color);
58 
60  const osg::Vec4& color() const;
61 
63  virtual void setLightingEnabled( bool enabled );
64 
68  virtual bool realize(DtModelDefinition& definition);
69 
71  virtual void setVisible(bool isVisible) {}
72 
73  protected:
74 
76  virtual void updateColors();
77 
79  virtual void updateTransform();
80 
82  void createBlendedGeodes();
83 
85  void createOpaqueGeode();
86 
88  void createSingleSidedBlendedGeode();
89 
90  protected:
91 
93  osg::Vec3 myDimensions;
94  osg::Vec4 myColor;
95 
101 
110 
112  };
113 
117  {
118  public:
119 
122  static DtCylinderModelInstanceCreator& instance(DtDe& de);
123 
125  static void registerInstance(DtDe& de,
127 
129  virtual DtCylinderModelInstance* create(DtDe& de);
130  };
131 }
132 
Virtual base class.
Definition: DtVirtualBaseClass.h:19
osg::Vec4 myColor
Definition: DtCylinderModelInstance.h:94
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osg::Geode > myBlendedGeode
Geode to draw the geometry when single-sided blending is required.
Definition: DtCylinderModelInstance.h:100
bool mySingleSided
Definition: DtCylinderModelInstance.h:111
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:38
virtual void setVisible(bool isVisible)
no-op
Definition: DtCylinderModelInstance.h:71
Contains makVrv::DtOsgModelInstance class.
osg::Vec3 myDimensions
The current parameter set.
Definition: DtCylinderModelInstance.h:93
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:76
osg::ref_ptr< osg::MatrixTransform > myTransform
My tranform.
Definition: DtCylinderModelInstance.h:107
osg::ref_ptr< osg::Geode > myFrontGeode
Geode to draw the geometry with backface culling.
Definition: DtCylinderModelInstance.h:103
The model instance to draw a cylinder.
Definition: DtCylinderModelInstance.h:24
Contains DLL export macros.
osg::ref_ptr< osg::Drawable > myCylinderDrawable
Definition: DtCylinderModelInstance.h:96
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: DtCylinderModelInstance.h:105
osg::ref_ptr< osg::Material > myMaterial
My Material.
Definition: DtCylinderModelInstance.h:109
A Creator for the makVrv::DtCylinderModelInstance class.
Definition: DtCylinderModelInstance.h:116
osg::ref_ptr< osg::Geode > myGeode
Geode to draw the geometry when no blending is required.
Definition: DtCylinderModelInstance.h:98

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)