VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtDiGuyModelInstance.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 
13 
14 #include <vrvDiGuy/vrvDiGuy.h>
15 
16 #include <vector>
17 
18 class diguyCharacter;
19 class diguyGraphicsLink;
20 
21 namespace makVrv
22 {
23 
24  class DtSceneObject;
25 
29  {
30  public:
31 
33  {
34  std::string shapeClassType;
35  std::string shapeSetName;
37  osg::Node* shapeRootNode;
38  };
39 
40  typedef std::vector<DtDiGuyShapeData> ShapeDataVector;
41 
43  virtual ~DtDiGuyModelInstance();
44 
47  virtual bool realize(DtModelDefinition& definition);
48 
50  diguyCharacter* character();
51 
53  virtual void setVisible(bool isVisible);
54 
56  virtual bool getVisible();
57 
60  virtual void updateBoundingBoxViaContents();
61 
62  //this sets the final position post ground clamping/embarking transforms
63  virtual void setPosition(const DtVector& pos);
64 
65  //this sets the final Orientation post ground clamping/embarking transforms
66  virtual void setOrientation(const DtTaitBryan& ori);
67 
68  //this sets both the final position and final orientation at the same time
69  virtual void setPositionAndOrientation(const DtVector& pos, const DtTaitBryan& ori);
70 
72  virtual osg::Node* sensorNode();
74  virtual const osg::Node* sensorNode() const;
75 
76  virtual void setRootNode(osg::Node* node);
77 
79  virtual void getShapeData(ShapeDataVector& shapeData);
80 
81  // list of diguy shapes that this character points to
82  virtual void setShapeTboData(osg::Node* shapeRootNode, const std::vector<float>& tboData);
83 
84  boost::signal<void(DtDiGuyModelInstance*)> signal_diGuyModelInstanceChanged;
85  boost::signal<void(DtDiGuyModelInstance*)> signal_diGuyCharacterToBeDestroyed;
86 
87 
88  // Let the creator class make instances.
90 
91 
92  protected:
93 
94  virtual void destroyCharacter();
95  virtual void updateVisiblity();
96 
99 
100  protected:
101 
102  diguyCharacter* myCharacter;
103 
107  };
108 
112  {
113  public:
114 
116  static void registerCreator(DtDe& de);
117 
119  virtual ~DtDiGuyModelInstanceCreator();
120 
122  virtual DtModelInstance* create(DtDe& de);
123 
124  protected:
125 
128 
129  };
130 }
A Di Guy based model instance.
Definition: DtDiGuyModelInstance.h:28
The base class for all model instances.
Definition: DtModelInstance.h:39
boost::signal< void(DtDiGuyModelInstance *)> signal_diGuyCharacterToBeDestroyed
Definition: DtDiGuyModelInstance.h:85
A Creator for the makVrv::DtDiGuyModelInstance class.
Definition: DtDiGuyModelInstance.h:111
Contains DLL export macros.
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.
osg::Node * shapeRootNode
Definition: DtDiGuyModelInstance.h:37
std::string shapeSetName
Definition: DtDiGuyModelInstance.h:35
The base class for simple OSG based model instances.
Definition: DtOsgModelInstance.h:72
bool myCanBeRecycled
Definition: DtDiGuyModelInstance.h:105
The polymorphic creator for the DtModelInstance.
Definition: DtModelInstance.h:148
bool myNodeVisible
Definition: DtDiGuyModelInstance.h:104
std::string shapeClassType
Definition: DtDiGuyModelInstance.h:34
bool myCastsShadows
Definition: DtDiGuyModelInstance.h:106
std::vector< DtDiGuyShapeData > ShapeDataVector
Definition: DtDiGuyModelInstance.h:40
std::string shapeMaterialSystemType
Definition: DtDiGuyModelInstance.h:36
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
#define DT_DLL_VRVDIGUY
Definition: vrvDiGuy.h:21
Definition: DtDiGuyModelInstance.h:32
boost::signal< void(DtDiGuyModelInstance *)> signal_diGuyModelInstanceChanged
Definition: DtDiGuyModelInstance.h:84
diguyCharacter * myCharacter
Definition: DtDiGuyModelInstance.h:102

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)