VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgSimpleModel.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>
13 #include <vrvCore/DtModel.h>
14 #include <vrvCore/DtUniqueID.h>
15 #include <matrix/vlVector.h>
16 #include <matrix/vlTaitBryan.h>
17 
18 #include <osg/MatrixTransform>
19 #include <osg/Matrixf>
21 namespace osg
22 {
23  class Group;
24 }
25 
26 namespace makVrv
27 {
28  class DtDe;
29  class DtOsgSceneConnector;
30  class DtOsgIndirectEntityManager;
31  class DtOsgSimpleModelInstance;
32 
39  {
40  public:
42 
43  virtual ~DtOsgSimpleModel();
44  private:
46  DtOsgSimpleModel() = delete;
48  DtOsgSimpleModel(const DtOsgSimpleModel&) = delete;
50  DtOsgSimpleModel& operator=(const DtOsgSimpleModel&) = delete;
51  public:
52 
53  //@name Distributed Interface
55 
57  virtual void setModelDefinition(const std::string& str);
58 
60  virtual void setVisible(bool visible);
61 
63  virtual void setPosition(int vtx, const DtVector& position);
64 
66  virtual void setOrientation(int vtx, const DtTaitBryan& orientation);
67 
70  virtual void setPositionOffset(const DtVector& positionOffset);
71 
74  virtual void setOrientationOffset(const DtTaitBryan& orientationOffset);
75 
77 
78  //@name Local Interface
80 
82  virtual void addToScene(const DtUniqueID& sceneObjectId, DtModelSetId modelSet,
83  int visualizerType);
84 
86  virtual void addToSceneAsProp(const DtUniqueID& sceneObjectId);
87 
89  virtual void removeFromScene();
90 
94  virtual void setIsSupportModel(bool isSupport);
95 
97  virtual void getBoundingBoxComponents(DtVector& minimum, DtVector& maximum);
99 
101  virtual void setElementId(DtUniqueID id);
102 
104  virtual void enableColorBlending(bool b);
105 
107  virtual void setBlendColor(float r, float g, float b, float a);
108 
111  virtual void setModelScalingEnabled(bool b);
112 
114  virtual bool modelScalingEnabled();
115 
117  virtual void slot_atcModeEnableChanged(bool state);
118 
119  protected:
120 
122 
123  //needed to keep track of the initial state of the model scaling flag
125 
126  std::string myModelDefinition;
131  DtTaitBryan mySetOrientation;
132 
135 
136  DtVector myBoundMin, myBoundMax;
138 
139 
141  };
142 }
DtTaitBryan mySetOrientation
Definition: DtOsgSimpleModel.h:131
DtVector myBoundMin
Definition: DtOsgSimpleModel.h:136
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myInitialOrientationOffsetSet
Definition: DtOsgSimpleModel.h:134
singleton class that acts as a bridge between the
Definition: DtOsgIndirectEntityManager.h:68
bool myInitialOrientationSet
Definition: DtOsgSimpleModel.h:130
DtVector mySetPosition
Definition: DtOsgSimpleModel.h:129
DtSignalConnectionManager myConnections
Definition: DtOsgSimpleModel.h:137
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:77
DtOsgSceneConnector * mySceneConnector
Definition: DtOsgSimpleModel.h:121
bool myInitialPositionSet
Definition: DtOsgSimpleModel.h:128
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
bool myModelScalingEnabled
Definition: DtOsgSimpleModel.h:124
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
Contains makVrv::DtModel class.
Base class to provide boost signal/slot management.
A model which owns a single model instance. A DtModel is a managing container for a single DtModelIns...
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
DtUniqueID mySceneObjectId
Definition: DtOsgSimpleModel.h:127
Contains DLL export macros.
bool myInitialPositionOffsetSet
Definition: DtOsgSimpleModel.h:133
std::string myModelDefinition
Definition: DtOsgSimpleModel.h:126
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:72
This is a realization of DtModel. It is a model class that is used to create a simple, model definition-based modelInstance. Renaming (when the Attachable- is removed from the class name) is recommended.
Definition: DtOsgSimpleModel.h:38
DtModelSetId
Definition: DtModelSetEnums.h:19
DtOsgIndirectEntityManager & myIndirectEntityManager
Definition: DtOsgSimpleModel.h:140

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)