VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtInstanceNode.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2018 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvOsg/vrvOsg.h>
13 
14 #include <osg/Transform>
15 #include <osg/View>
16 #include <osg/CopyOp>
17 
18 namespace osgUtil
19 {
20  class NodeVisitor;
21 }
22 
23 namespace makVrv
24 {
25  class DtInstanceManager;
26 
32  class DT_DLL_VRVOSG DtInstanceNode : public osg::Transform
33  {
34  protected:
36  DtInstanceNode(DtInstanceManager& instanceManager);
37 
39  friend class DtInstanceNodeCreator;
40  public:
42  virtual ~DtInstanceNode();
43 
44  private:
45 
49  DtInstanceNode &operator=(const DtInstanceNode &other);
50 
51  public:
53  DtInstanceNode(const DtInstanceNode& ob, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
54 
56  virtual osg::Object* clone(const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) const;
57 
59  virtual void traverse(osg::NodeVisitor& nv);
60 
65  virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const;
66 
68  virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix, osg::NodeVisitor* nv) const;
69 
71  virtual DtInstanceManager& instanceManager() { return myInstanceManager; }
72 
73  protected:
74  osg::Vec3d myLastEye;
76  };
77 
82  {
83  public:
84  // CTOR
86 
88  virtual ~DtInstanceNodeCreator();
89 
90  private:
94  DtInstanceNodeCreator &operator=(const DtInstanceNodeCreator &other);
95 
96  public:
98  static DtInstanceNodeCreator& instance(DtDe& de);
99 
101  static void registerInstance(DtDe& de,
102  DtInstanceNodeCreator* instance);
103 
105  virtual DtInstanceNode* create(DtInstanceManager& instanceManager);
106  protected:
108  };
109 
110 }
Virtual base class.
Definition: DtVirtualBaseClass.h:22
DtInstanceManager & myInstanceManager
Definition: DtInstanceNode.h:75
DtDe & myDe
Definition: DtInstanceNode.h:107
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
virtual DtInstanceManager & instanceManager()
needed for update callback
Definition: DtInstanceNode.h:71
The DtStreamingSpeedTreeFeatureCallback creator for the DtStreamingSpeedTreeFeatureCallbackCreator cl...
Definition: DtInstanceNode.h:81
Contains makVrv::DtVirtualBaseClass class.
Manages data for instanced rendering system and kicks off DtInstanceProcessors to update instance sta...
Definition: DtInstanceManager.h:75
Root transform for a group of instances.
Definition: DtInstanceNode.h:32
osg::Vec3d myLastEye
Definition: DtInstanceNode.h:74
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69

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)