VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtArticulatingCylinderModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtArticulatingCylinderModelInstance.h,v $ $Revision: 1.0 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtArticulatingCylinderModelInstance_H_
14 #define DtArticulatingCylinderModelInstance_H_
15 
16 #include <vrvOsg/vrvOsg.h>
18 
19 #include <osg/Geode>
20 #include <osg/MatrixTransform>
21 #include <osg/ShapeDrawable>
22 
23 namespace makVrv
24 {
28  : public DtOsgModelInstance
29  {
30  public:
31 
33  {
34  float xLength; // x dimension
35  float yLength; // y dimension
36  float zLength; // z dimension
37  float rColor; // RGBA red value
38  float gColor; // RGBA green value
39  float bColor; // RGBA blue value
40  float aColor; // RGBA alpha value
41  bool flashing; // Like HTML blink
42  };
43 
46 
49 
52 
54  virtual void setDimensions(double x, double y, double z);
55 
57  virtual void setColor(float r,float g,float b,float a);
58 
60  virtual void setLightingEnabled( bool enabled );
61 
64  virtual bool realize(DtModelDefinition& definition);
65 
67  virtual void addToConnector( DtOsgSceneConnector* connector );
68 
70  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
71 
73  virtual void setVisible(bool isVisible) {}
74 
75  protected:
76 
78  virtual void buildGeometry(const AttachedCylinderParameters& parameters);
79 
81  virtual void buildState(const AttachedCylinderParameters& parameters);
82 
85 
86  osg::ref_ptr<osg::ShapeDrawable> myCylinderDrawable;
87 
89  osg::ref_ptr<osg::Geode> myFrontGeode;
90 
92  osg::ref_ptr<osg::Geode> myBackGeode;
93 
94  osg::ref_ptr<osg::MatrixTransform> myTransform;
95  };
96 }
97 
98 #endif
99 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)