VR-Forces 5.0.2 Developer's Guide
 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) 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/ShapeDrawable>
18 
19 namespace makVrv
20 {
24  : public DtOsgModelInstance
25  {
26  public:
27 
29  {
30  float xLength; // x dimension
31  float yLength; // y dimension
32  float zLength; // z dimension
33  float rColor; // RGBA red value
34  float gColor; // RGBA green value
35  float bColor; // RGBA blue value
36  float aColor; // RGBA alpha value
37  bool flashing; // Like HTML blink
38  };
39 
42 
43  public:
44 
47 
50 
51  private:
52 
55 
58 
61 
62  public:
63 
65  virtual void setDimensions(double x, double y, double z);
66 
68  virtual void setColor(float r,float g,float b,float a);
69 
71  virtual void setLightingEnabled( bool enabled );
72 
76  virtual bool realize(DtModelDefinition& definition);
77 
79  virtual void addToConnector( DtOsgSceneConnector* connector );
80 
82  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
83 
85  virtual void setVisible(bool isVisible) {}
86 
87  protected:
88 
90  virtual void buildGeometry(const AttachedCylinderParameters& parameters);
91 
93  virtual void buildState(const AttachedCylinderParameters& parameters);
94 
95  protected:
96 
99 
101 
104 
107 
109  };
110 }
float yLength
Definition: DtArticulatingCylinderModelInstance.h:31
osg::ref_ptr< osg::ShapeDrawable > myCylinderDrawable
Definition: DtArticulatingCylinderModelInstance.h:100
osg::ref_ptr< osg::MatrixTransform > myTransform
Definition: DtArticulatingCylinderModelInstance.h:108
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Definition: DtArticulatingCylinderModelInstance.h:28
float xLength
Definition: DtArticulatingCylinderModelInstance.h:30
float zLength
Definition: DtArticulatingCylinderModelInstance.h:32
A model definition Interaction any number of named parameters, and also can be used to store cached d...
Definition: DtModelDefinition.h:38
Model instance to draw a cuboid.
Definition: DtArticulatingCylinderModelInstance.h:23
Contains makVrv::DtOsgModelInstance class.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:76
bool flashing
Definition: DtArticulatingCylinderModelInstance.h:37
float aColor
Definition: DtArticulatingCylinderModelInstance.h:36
The base class for simple OSG based model instances. This call can&#39;t be instantiated itself...
Definition: DtOsgModelInstance.h:77
float bColor
Definition: DtArticulatingCylinderModelInstance.h:35
float rColor
Definition: DtArticulatingCylinderModelInstance.h:33
osg::ref_ptr< osg::Geode > myBackGeode
Geode to draw the geometry with frontface culling.
Definition: DtArticulatingCylinderModelInstance.h:106
AttachedCylinderParameters myParameters
The current parameter set.
Definition: DtArticulatingCylinderModelInstance.h:98
Contains DLL export macros.
osg::ref_ptr< osg::Geode > myFrontGeode
Geode to draw the geometry with backface culling.
Definition: DtArticulatingCylinderModelInstance.h:103
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
float gColor
Definition: DtArticulatingCylinderModelInstance.h:34
virtual void setVisible(bool isVisible)
no-op
Definition: DtArticulatingCylinderModelInstance.h:85
static const AttachedCylinderParameters defaultParameters
Default values for the cuboid parameters.
Definition: DtArticulatingCylinderModelInstance.h:41

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)