VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCuboidModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2009 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtCuboidModelInstance.h,v $ $Revision: 1.0 $ $State: Exp $
7 ******************************************************************************/
8 
12 
13 #ifndef DtCuboidModelInstance_H_
14 #define DtCuboidModelInstance_H_
15 
16 #include <vrvOsg/vrvOsg.h>
18 
19 #include <osg/Geode>
20 
21 namespace makVrv
22 {
26  {
27  public:
28 
30  {
31  float xLength; // x dimension
32  float yLength; // y dimension
33  float zLength; // z dimension
34  float rColor; // RGBA red value
35  float gColor; // RGBA green value
36  float bColor; // RGBA blue value
37  float aColor; // RGBA alpha value
38  bool flashing; // Like HTML blink
39  };
40 
43 
45 
47  virtual ~DtCuboidModelInstance();
48 
50  virtual void setDimensions(double x, double y, double z);
51 
53  virtual void setColor(float r,float g,float b,float a);
54 
57  virtual bool realize(DtModelDefinition& definition);
58 
60  virtual void addToConnector( DtOsgSceneConnector* connector );
61 
63  virtual bool removeFromConnector( DtOsgSceneConnector* connector );
64 
66  virtual void setVisible(bool isVisible) {}
67 
68  protected:
71 
73  virtual void build(const CuboidParameters& parameters);
74 
77 
79  };
80 
84  {
85  public:
86 
88  static void registerCreator(DtDe& de);
89 
91  virtual ~DtCuboidModelInstanceCreator ();
92 
94  virtual DtModelInstance* create(DtDe& de);
95 
96  protected:
97 
99  };
100 }
101 
102 #endif
103 
The base class for all model instances.
Definition: DtModelInstance.h:39
Definition: DtCuboidModelInstance.h:29
float aColor
Definition: DtCuboidModelInstance.h:37
Model instance to draw a cuboid.
Definition: DtCuboidModelInstance.h:25
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
float rColor
Definition: DtCuboidModelInstance.h:34
float bColor
Definition: DtCuboidModelInstance.h:36
float zLength
Definition: DtCuboidModelInstance.h:33
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.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:76
float yLength
Definition: DtCuboidModelInstance.h:32
static const CuboidParameters defaultParameters
Default values for the cuboid parameters.
Definition: DtCuboidModelInstance.h:42
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
virtual void setVisible(bool isVisible)
no-op
Definition: DtCuboidModelInstance.h:66
osg::ref_ptr< osg::Geode > myGeode
Definition: DtCuboidModelInstance.h:78
The polymorphic creator for the DtModelInstance.
Definition: DtModelInstance.h:148
float xLength
Definition: DtCuboidModelInstance.h:31
CuboidParameters myParameters
The current parameter set.
Definition: DtCuboidModelInstance.h:76
bool flashing
Definition: DtCuboidModelInstance.h:38
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
A Creator for the makVrv::DtCuboidModelInstance class.
Definition: DtCuboidModelInstance.h:83
float gColor
Definition: DtCuboidModelInstance.h:35

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)