VR-Forces 4.8 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) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtCylinderModelInstance.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/Drawable>
19 #include <osg/Material>
20 
21 namespace makVrv
22 {
26  {
27  public:
28 
31 
33  virtual ~DtCylinderModelInstance();
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 
88 
97 
99  };
100 
104  {
105  public:
106 
109  static DtCylinderModelInstanceCreator& instance(DtDe& de);
110 
112  static void registerInstance(DtDe& de,
114 
116  virtual DtCylinderModelInstance* create(DtDe& de);
117  };
118 }
119 
Virtual base class.
Definition: DtVirtualBaseClass.h:22
osg::Vec4 myColor
Definition: DtCylinderModelInstance.h:81
#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:87
bool mySingleSided
Definition: DtCylinderModelInstance.h:98
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:33
virtual void setVisible(bool isVisible)
no-op
Definition: DtCylinderModelInstance.h:58
Contains makVrv::DtOsgModelInstance class.
osg::Vec3 myDimensions
The current parameter set.
Definition: DtCylinderModelInstance.h:80
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
osg::ref_ptr< osg::MatrixTransform > myTransform
My tranform.
Definition: DtCylinderModelInstance.h:94
osg::ref_ptr< osg::Geode > myFrontGeode
Geode to draw the geometry with backface culling.
Definition: DtCylinderModelInstance.h:90
The model instance to draw a cylinder.
Definition: DtCylinderModelInstance.h:25
Contains DLL export macros.
osg::ref_ptr< osg::Drawable > myCylinderDrawable
Definition: DtCylinderModelInstance.h:83
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:92
osg::ref_ptr< osg::Material > myMaterial
My Material.
Definition: DtCylinderModelInstance.h:96
A Creator for the makVrv::DtCylinderModelInstance class.
Definition: DtCylinderModelInstance.h:103
osg::ref_ptr< osg::Geode > myGeode
Geode to draw the geometry when no blending is required.
Definition: DtCylinderModelInstance.h:85

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)