VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtScribeBoxModelInstance.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
14 
15 #include <osg/Group>
16 #include <osg/Geode>
17 
18 namespace makVrv
19 {
20  class DtDe;
21  class DtSceneObject;
22 
26  {
27  public:
29  DtScribeBoxModelInstance(DtDe& de, const std::string& uniqueName);
30 
33 
36  virtual void addToConnector(DtOsgSceneConnector* connector);
37 
40  virtual bool removeFromConnector(DtOsgSceneConnector* connector);
41 
43  virtual void drawBox();
44 
45  virtual void setColor(const osg::Vec4& color);
46  virtual void setLineWidth(double lineWidth);
47 
48  virtual void setParentSceneObject(const DtUniqueID& sceneObj);
49 
51  virtual void setVisible(bool isVisible) {}
52 
54  virtual void setOccluded(bool);
55 
57  virtual void setLineSmoothing(bool);
58 
60  virtual void slot_atcGlobalModelEnableChanged();
61 
62  protected:
63  void setNodeCullAndBin(osg::Node* n, bool isTransparent);
64  void updateScribeBoxSize();
65  void updateLineSmoothing();
66  void updateScribeBoxLineWidth();
67  void updateScribeBoxColor();
68  DtSceneObject* parentSceneObject();
69  osg::Geometry* scribeBox(const osg::Vec3& center, float lengthX,
70  float lengthY, float lengthZ);
71 
73  virtual void resetGeode();
74 
75  protected:
76 
79  osg::Vec4 myColor;
80  double myLineWidth;
81  std::string myUniqueName;
83  bool myOccluded;
85 
86  // When the class is destructed, the scene object may or may not
87  // exist. Using a separate connection variable makes it possible to
88  // 'disconnect' even if the scene object has been deleted.
89  boost::signalslib::connection myParentSceneObjectConnection;
90  boost::signalslib::connection myBoundingVolumeConnection;
91  };
92 }
virtual void setVisible(bool isVisible)
no-op
Definition: DtScribeBoxModelInstance.h:51
std::string myUniqueName
Definition: DtScribeBoxModelInstance.h:81
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::ref_ptr< osg::Geode > myShapeGeode
Definition: DtScribeBoxModelInstance.h:78
Instance of an OSG-specific attachable draw model.
Definition: DtScribeBoxModelInstance.h:25
DtUniqueID myParentSceneObject
Definition: DtScribeBoxModelInstance.h:82
osg::Vec4 myColor
Definition: DtScribeBoxModelInstance.h:79
Contains makVrv::DtOsgModelInstance class.
DtOsgSceneConnector is used by models to create an OSG position/orientation transform so that it can ...
Definition: DtOsgSceneConnector.h:77
bool myOccluded
Definition: DtScribeBoxModelInstance.h:83
boost::signalslib::connection myBoundingVolumeConnection
Definition: DtScribeBoxModelInstance.h:90
double myLineWidth
Definition: DtScribeBoxModelInstance.h:80
The base class for simple OSG based model instances. This call can&#39;t be instantiated itself...
Definition: DtOsgModelInstance.h:77
bool myLineSmoothing
Definition: DtScribeBoxModelInstance.h:84
boost::signalslib::connection myParentSceneObjectConnection
Definition: DtScribeBoxModelInstance.h:89
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
A DtSceneObject represents an object that can be positioned in the scene by (possibly) attaching it t...
Definition: DtSceneObject.h:44
Contains DLL export macros.
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
osg::ref_ptr< osg::Group > myGroup
Definition: DtScribeBoxModelInstance.h:77

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)