VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtInstanceManager.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 <vrvOsg/DtInstanceState.h>
16 
17 #include <vrvCore/DtModel.h>
18 #include <vrvCore/DtUniqueID.h>
19 
22 
23 #include <matrix/vlVector.h>
24 
25 #include <osgUtil/LineSegmentIntersector>
26 #include <osgViewer/Renderer>
27 
28 #include <osg/ref_ptr>
29 #include <osg/LightSource>
30 
31 #include <boost/unordered_map.hpp>
32 #include <tbb/cache_aligned_allocator.h>
33 #include <tbb/atomic.h>
34 #include <tbb/spin_rw_mutex.h>
35 #include <tbb/concurrent_queue.h>
36 
37 
38 class DtTaitBryan;
39 
40 namespace osg
41 {
42  class Geometry;
43  class Image;
44  class Texture2D;
45  class Vec2f;
46  class Vec3f;
47  class Geode;
48  class View;
49 }
50 
51 namespace osgEarth
52 {
53  class VirtualProgram;
54 }
55 
56 namespace makVrv
57 {
58  class DtGlTextureBufferObject;
59  class DtInstanceProcessor;
60  class DtInstanceLpProcessor;
61  class DtOsgIntersectorResult;
62  class DtChannelManager;
63  class DtChannel;
64  class DtPerViewUniformCallback;
65  class DtInstanceNode;
66  class DtLight;
67  class DtOsgCullVisitorParameters;
68  class DtViewSpecificGroup;
69  class DtInstanceManagerTboUpdater;
70 
76  {
77  public:
78  typedef std::vector<osg::ref_ptr<osg::Geometry> > GeometryVec;
79  typedef std::vector<char> BoolVec; // Using vec of chars for threadsafety
80  typedef std::vector<char> ByteVec;
81  typedef std::map<osg::ref_ptr< osgEarth::VirtualProgram >, osg::ref_ptr<osgEarth::VirtualProgram> > VpMap;
82  typedef std::vector<osg::ref_ptr<osgEarth::VirtualProgram> > VpRefList;
83  typedef std::vector<ArrayRange> DrawableRangeVec;
84  typedef std::vector<osg::Vec2f> TextureCoordinateVec;
85  typedef std::vector<float> FloatVec;
86 
88  static const unsigned int NumVec4PerInstance = 8;
89 
90 
92  struct InstancedLod
93  {
95  double minRange;
96 
98  double maxRange;
99 
104  };
105 
110  {
113 
116 
119  };
120 
123  {
125  enum SequenceMode { Play, Stop, Pause, Resume };
126 
129 
132 
134  float startTime;
135 
137  float endTime;
138 
141 
143  float speed;
144 
147  };
148 
151  {
152  InstancedLight() : light(0), drawableIx(0) { ; }
154  osg::Vec3f position;
155  osg::Vec3f direction;
156  unsigned int drawableIx; // index to drawable the light is attached to
157  };
158 
161  {
162  InstancedDof() : numChildren(0), myAnimatedMatrix(NULL), skipNextAnimationFrame(false) { ; }
165 
169  unsigned int numChildren;
170 
173 
178 
180  osg::MatrixTransform* myAnimatedMatrix;
181  };
182 
185  {
186  ModelTypeDofData() : numChildren(0) { ; }
189 
192 
195 
197  osg::Vec3f initialHpr;
198 
200  osg::Vec3f initialTranslate;
201 
205  unsigned int numChildren;
206 
209 
211  std::string myAnimatedMatrixName;
212  };
213 
216  {
217  DofAnimation() : lastUpdate(-1), smoothCompleteTime(0) { ; }
219  osg::Vec3f trans;
220 
221  osg::Vec3f transVel;
222 
224  osg::Vec3f hpr;
225 
227  osg::Vec3f hprVel;
228 
230  float lastUpdate;
231 
235 
237  osg::Vec3f smoothTransVel;
238 
240  osg::Vec3f smoothHprVel;
241 
242 
243  };
244 
245  struct LightSource
246  {
247  LightSource() : attachDrawableIx(0), range(0), isRangeScheme(false) { ; }
249  unsigned int attachDrawableIx;
250  float range;
252  };
253 
255  struct LightPoint
256  {
257  LightPoint() : attachDrawableIx(0), groupId(0) { ; }
259  unsigned int attachDrawableIx;
260  int groupId;
261  };
262 
265  {
267  const osg::View* view;
268 
271 
274  };
275 
277  typedef std::vector<LightSource> LightSourceVec;
278  typedef std::vector<ModelTypeDofData> PerDofDataVec;
279  typedef std::vector<InstancedSwitch> InstancedSwitchVec;
280  typedef std::vector<InstancedSequence> InstancedSequenceVec;
281  typedef std::vector<DofAnimation> DofAnimations;
282  typedef std::vector<osg::Node*> NodeVec;
283  typedef std::vector<InstancedSwitch*> SwitchVec;
284  typedef std::vector<InstancedSequence*> SequenceVec;
285  typedef std::vector<InstancedLod*> LodVec;
286  typedef std::vector<LightPoint> LightPointVec;
288 
291  {
293  : myAnimatedNodeCount(0)
294  , boundingRadius(0.0f)
295  , intersectionBoundingRadius(0.0f)
296  , nodeMask(0)
297  , daylightControlledLights(false)
298  { ; }
299 
300  std::string myName;
301 
304 
307 
310 
313 
316 
319 
322 
325 
328 
331 
333  osg::Vec3f boundingCenter;
334 
339  unsigned int nodeMask;
340 
343 
346 
349  };
350 
353  {
354  ParserOutput() : myAnimatedNodeCount(0) { ; }
363 
366 
369 
372 
375 
378 
379  typedef std::map<osg::Node*, ArrayRange> NodeToDrawables;
380 
383 
386  };
387 
390 
392  boost::signal<void(const std::string&)> signal_modelTypeRegistered;
393 
395  boost::signal<void(const std::string&, DtUniqueID, DtElementID, DtModel *)> signal_instanceCreated;
396 
398  boost::signal<void(const CullSet&)> signal_updateFinished;
400 
403  bool intersect(const osg::Vec3d& start, const osg::Vec3d& end,
404  const osg::Vec3d& reference, DtOsgIntersectorResult& result,
405  std::list<DtUniqueID>* ignoreList = 0);
406 
408  bool intersect(const osg::Vec3d& start, const osg::Vec3d& end,
409  std::vector<DtOsgIntersectorResult>& results,
410  std::list<DtUniqueID>* ignoreList = 0);
411 
414  void setSequenceMode(const DtInstanceState& instance, unsigned int sequenceIndex, InstancedSequence::SequenceMode mode);
415 
417  void setSequenceSpeed(const DtInstanceState& instance, unsigned int sequenceIndex, float speed);
418 
420  void setSequencePlayTime(const DtInstanceState& instance, unsigned int sequenceIndex, float loopTime);
422 
425  InstanceMatrix dofState(const DtInstanceState& instanceState, unsigned int partIndex);
427 
430  void setDofState(InstanceMatrix& m, const DtInstanceState& state, unsigned int partIndex);
431 
433  void setDofAnimation(osg::Vec3f& hpr, const osg::Vec3f& hprVel, const DtInstanceState& state, unsigned int partIndex);
434 
436  void setDofRotationalVelocity(const osg::Vec3f& hprVel, const DtInstanceState& state, unsigned int partIndex, bool forceUpdate = true);
437 
439  void setDofTranslation(osg::Vec3f& trans, osg::Vec3f& transVel, const DtInstanceState& state, unsigned int partIndex);
441 
444  void setSwitchState(const DtInstanceState& instance, unsigned int partIndex, unsigned int childIndex, bool state);
446 
449  void setUVOffset(DtUniqueID id, unsigned int drawableIx, unsigned int count, const osg::Vec2f& uvOffset);
451 
454  void setUserDefined(DtUniqueID id, float userDefined);
456 
459  void setLightpointRange(DtUniqueID id, float range);
461 
463  void setElementId(DtUniqueID id, DtUniqueID elementId);
464 
466  osg::StateSet* getModelTypeRootStateSet(const std::string& modelType);
467 
469  static DtInstanceManager& instance(DtDe& de);
470 
472  DtInstanceManager(DtDe& de);
473 
475  virtual ~DtInstanceManager();
476 
480  virtual void reset();
481 
483  virtual osg::Node* instanceRoot();
484 
486  bool isRegistered(const std::string& modelType);
487 
489  void registerModel(const std::string& modelType, const ParserOutput& parseOutput,
490  float boundingRadius, const DtVector& boundingCenter,
491  unsigned int nodeMask, const osg::ref_ptr<osg::StateSet>& rootNodeSS, bool daylightControlledLights = false);
492 
494  osg::Geode* setupModelGeode(const std::string& modelType, unsigned int nodeMask);
495 
497  void allocateImage(const osg::View* view);
498 
500  void freeInstance(DtUniqueID id);
501 
503  void drainFreeInstanceList();
504 
505  void setArtPartSmoothingEnabled(bool onOrOff);
506  bool artPartSmoothingEnabled() const;
507 
508  void setArtPartSmoothingPeriod(float period);
509  float artPartSmoothingPeriod() const;
510 
515  bool newInstance(const std::string& modelType, DtUniqueID id, DtElementID elementId, short modelSet,
516  DtModel* model, const std::string &lightPointGroup, bool isSimpleModel);
517 
522  DtInstanceState* findInstanceState(DtUniqueID id);
523 
528  InstanceCullData* findInstanceCullData(DtUniqueID id);
529 
531  void setPosition(DtUniqueID uniqueID, const DtVector& vPosition);
532  void setPositionOffset(DtUniqueID uniqueID, const DtVector& vPosition);
533  void setOrientation(DtUniqueID uniqueID, const DtTaitBryan& orientation);
534  void setOrientationOffset(DtUniqueID uniqueID, const DtTaitBryan& orientation);
535 
537  void setPosition(DtUniqueID uniqueID, const osg::Vec3d& vPosition);
538  void setPositionOffset(DtUniqueID uniqueID, const osg::Vec3d& vPosition);
539  void setOrientation(DtUniqueID uniqueID, const osg::Quat& orientation);
540  void setOrientationOffset(DtUniqueID uniqueID, const osg::Quat& orientation);
541 
543  void setVisible(DtUniqueID uniqueID, bool bVisible);
544 
546  void setBlendColor(DtUniqueID uniqueID, float r, float g, float b, float a);
547 
552  void setModelScaling(DtUniqueID uniqueID, bool bModelScaling, float scale);
553 
555  void setCullParameters(DtUniqueID uniqueID, unsigned int nodeMask, bool visible);
556 
558  typedef std::vector<DtInstanceState> InstanceStateVec;
559  typedef std::vector<DtModel*> ModelVec;
560  typedef std::vector<InstancedLod> InstancedLodVec;
561  typedef std::vector<InstancedDof> InstancedDofVec;
562  typedef std::vector<InstanceCullData> InstanceCullDataVec;
563  typedef std::vector<InstanceMatrix, tbb::cache_aligned_allocator<InstanceMatrix> > InstanceMatrixVec;
564  typedef std::vector<float> InstanceScaleVec;
565  typedef std::vector<DtElementID> InstanceElementIdVec;
566  typedef std::vector<InstancedLight> InstancedLightVec;
568 
570  inline InstanceElementIdVec& elementIds() { return myElementIds; }
571 
573  inline InstanceScaleVec& instanceScales() { return myInstanceScales; }
574 
576  inline ByteVec& instanceVisibleSet() { return myInstanceVisibleSet; }
577 
579  inline InstanceMatrixVec& drawableInstanceMatrix() { return myDrawableInstanceMatrix; }
580 
582  inline InstanceCullDataVec& instanceCullData() { return myInstanceCullData; }
583 
585  inline InstanceStateVec& instances() { return myInstances; }
586 
588  inline TextureCoordinateVec& uvOffsets() { return myUVOffsets; }
589 
592  inline InstancedLodVec& instancedLods() { return myInstancedLods; }
593 
594  inline InstancedSwitchVec& instancedSwitches() { return myInstancedSwitches; }
595 
596  inline InstancedSequenceVec& instancedSequences() { return myInstancedSequences; }
597 
598  inline InstancedDofVec& instancedDofs() { return myInstancedDofs; }
600 
601  typedef std::vector<InstanceTemplate*> InstanceTemplateVec;
602 
604  inline InstanceTemplateVec& instanceTemplates() { return myInstanceTemplates; }
605 
607  inline std::vector<float>& distanceToEye() { return myDistanceToEye; }
608 
610  inline DofAnimations& dofAnimations() { return myDofAnimations; }
611 
613  inline double& lastUpdateTime() { return myLastUpdateTime; }
614 
616  inline const DtOsgCullVisitorParameters* lastCullParameters() { return myLastCullParameters.get(); }
617 
619  inline BoolVec& visibleSet() { return myVisibleSet; }
620 
622  inline osg::Vec3d& cameraPosition() { return myCameraPosition; }
623 
625  inline const osg::View* lastView() { return myLastView; }
626 
628  inline const osg::Camera* lastCamera() { return myLastCamera; }
629 
631  inline unsigned int drawableIndex(unsigned int instanceIx) {
632  return myInstanceDataOffsets[instanceIx].myDrawables.offset;
633  }
634 
636  inline unsigned int matrixIndex(unsigned int instanceIx)
637  {
638  return myInstanceDataOffsets[instanceIx].myMatrixes.offset;
639  }
640 
642  inline unsigned int drawableOffsetMatrixIndex(const DtInstanceState& instanceState, unsigned int instanceIx, unsigned int drawableOffset)
643  {
644  unsigned int matrixIx = myInstanceDataOffsets[instanceIx].myMatrixes.offset;
645  // only bother with the first drawable matrix if there are no dofs
646  if (instanceState.dofRange.count != 0)
647  {
648  matrixIx += drawableOffset;
649  }
650  return matrixIx;
651  }
652 
654  void reloadShaders();
655 
656  inline GeometryVec& drawables(){ return myDrawables; }
657 
658  inline unsigned int visibleCount() const { return myVisibleCount; }
659 
660  inline unsigned int dynamicBufferDataSize() const { return myDynamicBufferDataSz; }
661 
663  virtual void traverse(osg::NodeVisitor& nv);
664 
666  virtual void update(osg::NodeVisitor& nv);
667 
672  virtual void updateForIntersection(double simTime, const osg::View* view, osg::Camera* camera, unsigned int nodeMask, DtOsgCullVisitorParameters* params);
673 
676  virtual void updateForDrawing(osgUtil::CullVisitor* cv, const DtOsgCullVisitorParameters* params);
677 
678  virtual float lightpointRange(unsigned int instanceIx);
679 
683  virtual void setDefaultLightPointMaxDistance( float distance );
684 
686  virtual float defaultLightPointMaxDistance() const;
687 
692  virtual void setLightPointFadeBias( float bias );
693 
695  virtual bool cullDistanceEnabled();
696 
699  virtual float cullDistance();
700 
704  virtual std::string modelDefinitionNameProxy(const std::string& modelDefName);
705 
708  DtVirtualBaseClass* findCachedData(const std::string& modelType, const std::string& name);
709 
714  void setCachedData(const std::string& modelType, const std::string& name, DtVirtualBaseClass* data);
715 
717  void clearCachedData();
718 
719  void releaseGLObjects(osg::State* state);
720 
722  void updateBuffers(const osg::View* view);
723 
726  void updateLightPoints(const osg::Camera* camera, const osg::FrameStamp* frameStamp, osgUtil::CullVisitor* cv, const osg::Camera* sceneCamera = NULL);
727 
729  void addImguiStats() const;
730 
732  void resetTboSendFlag();
733 
734  protected:
735 
737  struct Eyepoint
738  {
739  osg::Vec3d center;
740  osg::Vec3d eye;
741  osg::Vec3d up;
742  };
743 
745  struct Frustum
746  {
747  double l, r, b, t, n, f;
748  };
749 
752  {
753  unsigned int instanceIx;
754  unsigned int drawableMatrixIx;
755  osg::Vec3f pos;
756  osgUtil::LineSegmentIntersector::Intersection result;
757  };
758 
759 
761  struct RenderState
762  {
764  float scale;
765  float userDefined;
766  osg::Vec2f uvOffset;
767  osg::Vec3f filterColor;
769  };
770 
772  typedef std::vector<RenderState> RenderStateVec;
773 
776  {
778  {
779  count = 0;
780  memoryOffset = 0;
781  }
785  tbb::atomic<unsigned int> count;
788  unsigned int getcount() const
789  {
790  return count;
791  }
794  };
795 
798 
800  // all the drawables all the models have
801 
804 
806  typedef std::vector<GeometryRenderList> RenderList;
807 
809 
812 
813  //scratch list of active drawables
814  std::vector<unsigned int> myActiveDrawablesScratch;
815 
817  // per instance stuff
818 
821 
826 
827 
830 
833 
835  std::vector<float> myDistanceToEye;
836 
839 
842 
845 
848 
851 
859 
861  {
865  };
866  std::vector<InstanceDataOffsets> myInstanceDataOffsets;
867 
875 
876 
879 
882 
884  unsigned int myLastNodeMask;
885 
886 
888  osg::Vec3d myCameraPosition;
889 
891  const osg::View* myLastView;
892 
894  const osg::Camera* myLastCamera;
895 
898 
900  typedef boost::unordered_map<std::string, DtVirtualBaseClass*> CacheMap;
902 
903  tbb::concurrent_queue<unsigned int> myListToRemove;
904 
905  protected:
906 
915  void update(double simTime, const osg::View* view, osg::Camera* camera,
916  unsigned int nodeMask, osgUtil::CullVisitor* cv,
917  const DtOsgCullVisitorParameters* params, bool suppressLastUpdateTime);
918 
920  void registerGeometry(unsigned int templateIx, osg::Geometry* geometry, VpMap& vpMap);
921 
923  float computeDistanceToEye(const Eyepoint& eye, const osg::Vec3d& pos) const;
924 
926  void updateOffsetsAndDistancesToEye(const Eyepoint& eye);
927 
929  void _updateOffsetsAndDistancesToEye(const Eyepoint& eye, unsigned int instanceOffset, unsigned int numInstances);
930 
932  void allocateRenderList();
933 
935  void updateDataAndDrawables( unsigned int offset, unsigned int count);
936 
940  unsigned int updateRenderList(const Eyepoint& eye, const osg::Matrixd& viewMat, unsigned int nodeMask);
941 
942  void updateLights(const osg::View* view);
943  void resizeBuffersIfNecessary(const osg::View* view, int visibleCount);
944  void resizeTBOIfNecessary(const osg::View* view, int visibleCount);
945 
949  void allocateInstanceData();
950 
954  unsigned int fillRenderList( unsigned int instanceOffset, unsigned int numInstances);
955 
957  void cullRange(const Eyepoint& eye
958  , const std::vector<osg::Vec4d>& planes, bool useScale, unsigned int nodeMask
959  , unsigned int instanceOffset, unsigned int instanceCount);
960 
962  void slot_channelAdded(DtChannelManager* mgr, DtChannel* channel);
963 
965  void slot_channelRemoved(DtChannelManager* mgr, DtChannel* channel);
966 
969  void clearTBO(InstanceBuffer& instanceBuffer);
970 
972  void createHitList(const osg::Vec3d& end, const osg::Vec3d& start, std::vector<InstancingHit>& hitList);
973 
975  void loadInstanceShaders(osgEarth::VirtualProgram* vp);
976 
977  bool isOnExcludeList(DtUniqueID elementId,
978  const std::list<DtUniqueID>& ignoreList);
979 
980  protected:
981 
983  typedef boost::unordered_map<DtUniqueID, unsigned int> InstanceStateMap;
984 
987  tbb::spin_rw_mutex myMapMutex;
988 
990  unsigned int myDynamicBufferDataSz;
992 
994  typedef std::vector<InstanceBuffer> InstanceBufferVec;
995 
997 
999  typedef boost::unordered_map<std::string, int> modelTypeToTemplateMap;
1000 
1003 
1005 
1006 
1008  unsigned int myRequiredUvOffsets;
1009 
1013  unsigned int myNumThreads;
1015 
1018  // FIXME GNP shouldn't these be vectors? we never delete templates?
1019 
1020 
1022  std::vector<int> myTemplateMaxInstances;
1023 
1025  std::vector<int> myTemplateActiveInstances;
1027 
1033 
1038  {
1039  virtual bool cull(osg::NodeVisitor* nv, osg::Drawable* drawable, osg::RenderInfo* renderInfo) const
1040  {
1041  return true;
1042  }
1043  };
1044 
1046 
1048 
1052  typedef std::vector<DtInstanceProcessor*> InstanceProcessorVec;
1053 
1056 
1059 
1063  typedef std::vector<osg::View*> ViewVec;
1065 
1067  typedef boost::unordered_map<const osg::View*, osg::ref_ptr<DtViewSpecificGroup> > ViewToGroup;
1069 
1071  typedef boost::unordered_map<osg::Geometry*, osg::ref_ptr<DtPerViewUniformCallback> > GeometryToCallback;
1073 
1076  //DtInstanceLpProcessor* myLpProcessor;
1079 
1080  void addInstanceRootToSceneGraphIfNecessary(void);
1081 
1082  void processNewInstanceLights(const InstanceTemplate& instanceTemplate);
1083  void processNewInstanceDOFs(DtModel* model, const InstanceTemplate& instanceTemplate);
1084  void processNewInstanceSwitches(const InstanceTemplate& instanceTemplate, bool isSimpleModel);
1085  void processNewInstanceSequences(const InstanceTemplate& instanceTemplate);
1086 
1088  void processNewInstanceLightPoints(const InstanceTemplate& instanceTemplate, const std::string& lightPointGroup);
1089 
1090  void preCull();
1091  void frustumCull(const osg::View* view, const Eyepoint& eye, unsigned int nodeMask);
1092  void postCull();
1093 
1094  std::vector<osg::Vec4d> vecScratchPadPlanes;
1095 
1096  void _fillRenderList(bool globalScaling, unsigned int instanceOffset, unsigned int numInstances);
1097 
1098  tbb::atomic<int> myVisibleCount;
1101 
1102  std::string myInstanceVS, myInstanceViewVS, myInstanceFS;
1103  std::map <const InstanceTemplate*, int> myNewTemplates;
1105 
1109 };
1110 
1116  {
1117  public:
1119  virtual ~DtInstanceManagerCreator();
1120 
1122  static DtInstanceManagerCreator& instance(DtDe& de);
1123 
1125  virtual DtInstanceManager* create();
1126 
1127  protected:
1130 
1131  protected:
1133  };
1134 }
Contains the DtOsgTextureBufferObjectApplyAttribute class.
osg::Vec3f direction
Definition: DtInstanceManager.h:155
Wrapper for OpenGL Texture Buffer Object.
Definition: DtGlTextureBufferObject.h:27
Definition: DtInstanceManager.h:125
SequenceMode
Playback modes.
Definition: DtInstanceManager.h:125
std::vector< osg::View * > ViewVec
List of active views.
Definition: DtInstanceManager.h:1063
int groupId
Definition: DtInstanceManager.h:260
std::vector< int > myTemplateActiveInstances
Map number of active instances per template.
Definition: DtInstanceManager.h:1025
InstancedSequenceVec myInstancedSequences
Definition: DtInstanceManager.h:870
ModelTypeDofData()
Definition: DtInstanceManager.h:186
osg::Vec3f initialHpr
Initial HPR angles when instances are created.
Definition: DtInstanceManager.h:197
boost::signal< void(const std::string &)> signal_modelTypeRegistered
Emitted when a new model type is registered with the instancing system.
Definition: DtInstanceManager.h:392
InstanceCullDataVec & instanceCullData()
Per instance cull data.
Definition: DtInstanceManager.h:582
InstanceStateMap myIdToInstances
Map model DtUniqueID to instance index into myInstances array.
Definition: DtInstanceManager.h:986
Contains makVrv::DtInstanceManager declaration.
Contains makVrv::DtInstanceState declaration.
osg::Vec3d up
Definition: DtInstanceManager.h:741
float smoothCompleteTime
Frame time when smoothing is complete (if enabled).
Definition: DtInstanceManager.h:234
GeometryVec myDrawables
Drawables in registered instance templates.
Definition: DtInstanceManager.h:811
InstanceElementIdVec myElementIds
Array of per-instance element IDs.
Definition: DtInstanceManager.h:850
Virtual base class.
Definition: DtVirtualBaseClass.h:22
InstanceBufferVec myInstanceBuffers
Definition: DtInstanceManager.h:996
int memoryOffset
first location in the memory buffer for this list.
Definition: DtInstanceManager.h:787
std::vector< DtModel * > ModelVec
Definition: DtInstanceManager.h:559
InstanceMatrix initialTransform
Initial DOF transform when instances are created.
Definition: DtInstanceManager.h:194
ArrayRange myDrawables
Definition: DtInstanceManager.h:862
std::vector< osg::Vec4d > vecScratchPadPlanes
Definition: DtInstanceManager.h:1094
float boundingRadius
Radius of the model type&#39;s bounding sphere for culling (expanded by light ranges) ...
Definition: DtInstanceManager.h:327
float lastUpdate
Frame time of the most recent animation update.
Definition: DtInstanceManager.h:230
bool myRenderListDirty
True when myRenderList needs to be resized.
Definition: DtInstanceManager.h:803
osg::Vec3f hpr
Current Heading/Pitch/Roll angles in radians.
Definition: DtInstanceManager.h:224
InstancedDofVec & instancedDofs()
Definition: DtInstanceManager.h:598
osg::ref_ptr< osg::Geode > modelGeode
modelGeode pointer for the modelType of this template
Definition: DtInstanceManager.h:342
Template data for an instance of a model.
Definition: DtInstanceManager.h:290
std::vector< InstanceCullData > InstanceCullDataVec
Definition: DtInstanceManager.h:562
NodeVec myAnimatedModels
list of nodes that have animated bits.
Definition: DtInstanceManager.h:858
std::vector< GeometryRenderList > RenderList
Per drawable list of visible instance transforms.
Definition: DtInstanceManager.h:806
osg::ref_ptr< osg::LightSource > lightSource
Definition: DtInstanceManager.h:248
InstanceMatrixVec myDrawableInstanceMatrix
Spatial data for drawables in myDrawables.
Definition: DtInstanceManager.h:825
InstanceTemplateVec myInstanceTemplates
Per model definition templates for creating instances.
Definition: DtInstanceManager.h:797
osg::ref_ptr< DtInstanceNode > myInstanceRoot
Definition: DtInstanceManager.h:1047
unsigned int myCurrentDynamicBufferDataSize
Definition: DtInstanceManager.h:991
osg::Vec4 * myDynamicBufferData
Definition: DtInstanceManager.h:989
std::vector< DtInstanceState > InstanceStateVec
Definition: DtInstanceManager.h:558
unsigned int drawableOffsetMatrixIndex(const DtInstanceState &instanceState, unsigned int instanceIx, unsigned int drawableOffset)
Get the start index of the drawable spatial data for the specified instance.
Definition: DtInstanceManager.h:642
ViewVec myKnownViews
Definition: DtInstanceManager.h:1064
unsigned int attachDrawableIx
Definition: DtInstanceManager.h:249
InstanceProcessorVec myPreCullInstanceProcessors
Processors run before frustum culling.
Definition: DtInstanceManager.h:1058
std::vector< InstanceTemplate * > InstanceTemplateVec
Definition: DtInstanceManager.h:601
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
ViewToGroup myViewToGroup
Definition: DtInstanceManager.h:1068
ArrayRange lodRange
Range of LODs in this model.
Definition: DtInstanceManager.h:324
InstanceStateVec myInstances
Definition: DtInstanceManager.h:855
std::vector< char > BoolVec
Definition: DtInstanceManager.h:79
unsigned int drawableMatrixIx
Definition: DtInstanceManager.h:754
std::vector< InstancedLod * > LodVec
Definition: DtInstanceManager.h:285
NodeToDrawables myNodeToDrawablesMap
OSG nodes to instanced drawable range map.
Definition: DtInstanceManager.h:382
Instancing hit data structure.
Definition: DtInstanceManager.h:751
DtOsgIntersectorResult is the OSG-specific implementation of DtIntersectorResult; it is a container c...
Definition: DtOsgIntersector.h:62
std::vector< ModelTypeDofData > PerDofDataVec
Definition: DtInstanceManager.h:278
ByteVec & instanceVisibleSet()
Visibility of instances in current view.
Definition: DtInstanceManager.h:576
float startTime
Frametime the animation started playing at.
Definition: DtInstanceManager.h:134
boost::signal< void(const std::string &, DtUniqueID, DtElementID, DtModel *)> signal_instanceCreated
Emitted when a new instance of a model is added to the scene.
Definition: DtInstanceManager.h:395
osg::Vec3f boundingCenter
Offset from model origin to center of bounding sphere.
Definition: DtInstanceManager.h:333
std::vector< InstancedSwitch > InstancedSwitchVec
Definition: DtInstanceManager.h:279
osg::Vec3f position
Definition: DtInstanceManager.h:154
InstancedSwitchVec & instancedSwitches()
Definition: DtInstanceManager.h:594
osg::ref_ptr< const DtOsgCullVisitorParameters > myLastCullParameters
Most recent active cull vistor parameters.
Definition: DtInstanceManager.h:1075
InstanceMatrixVec & drawableInstanceMatrix()
Spatial state of instanced drawables in current view.
Definition: DtInstanceManager.h:579
DofAnimation()
Definition: DtInstanceManager.h:217
bool skipNextAnimationFrame
Flag to skip the next DOF animation frame (if any)
Definition: DtInstanceManager.h:177
unsigned int instanceIx
Definition: DtInstanceManager.h:753
SwitchVec mySwitches
Definition: DtInstanceManager.h:358
float lightpointRange
Definition: DtInstanceManager.h:768
osg::Vec3d eye
Definition: DtInstanceManager.h:740
std::map< osg::Node *, ArrayRange > NodeToDrawables
Definition: DtInstanceManager.h:379
InstanceMatrix putMatrixInverse
Initial put matrix inverse.
Definition: DtInstanceManager.h:191
boost::unordered_map< std::string, int > modelTypeToTemplateMap
Map from model type names to template index.
Definition: DtInstanceManager.h:999
bool myArtPartSmoothingEnabled
Definition: DtInstanceManager.h:1106
InstancedSwitchVec myInstancedSwitches
Definition: DtInstanceManager.h:869
const osg::Camera * myLastCamera
Reference to the camera that most recently was used.
Definition: DtInstanceManager.h:894
std::vector< float > & distanceToEye()
Per-instance distances to eyepoint for the current camera.
Definition: DtInstanceManager.h:607
NodeVec mySwitchNodes
OSG nodes corresponding to mySwitches.
Definition: DtInstanceManager.h:374
unsigned int numChildren
Number of child DOF nodes under this node.
Definition: DtInstanceManager.h:169
double & lastUpdateTime()
Last time the instances were updated.
Definition: DtInstanceManager.h:613
DrawableRangeVec switchRanges
List of drawable ranges effected by each switch state in the switch.
Definition: DtInstanceManager.h:112
SequenceMode mode
Playback mode for the sequence.
Definition: DtInstanceManager.h:140
std::vector< float > InstanceScaleVec
Definition: DtInstanceManager.h:564
std::vector< int > myTemplateMaxInstances
Map maximum number of instances for each template that we&#39;ve allocated space for. ...
Definition: DtInstanceManager.h:1022
ArrayRange drawableRange
Range of drawables in this model.
Definition: DtInstanceManager.h:318
osg::Vec3f pos
Definition: DtInstanceManager.h:755
osg::Vec2f uvOffset
Definition: DtInstanceManager.h:766
DtLight * light
Definition: DtInstanceManager.h:153
GeometryRenderList()
Definition: DtInstanceManager.h:777
ArrayRange instanceMatrixRange
Range of matrixes in this model.
Definition: DtInstanceManager.h:321
float intersectionBoundingRadius
Radius of the model type&#39;s bounding sphere used for intersections.
Definition: DtInstanceManager.h:330
TextureCoordinateVec myUVOffsets
Per instance UV offsets.
Definition: DtInstanceManager.h:829
boost::unordered_map< std::string, DtVirtualBaseClass * > CacheMap
Cached data for model definition specific data.
Definition: DtInstanceManager.h:900
DtUniqueID DtElementID
The ElementID is a specific type of unique ID used to represent VR-Vantage uniquely defined elements...
Definition: DtUniqueID.h:26
Creator for DtInstanceManager.
Definition: DtInstanceManager.h:1115
RenderList myRenderList
Definition: DtInstanceManager.h:808
osg::Vec3f filterColor
Definition: DtInstanceManager.h:767
ByteVec myInstanceVisibleSet
Array of Per instance visibility state.
Definition: DtInstanceManager.h:832
InstancedSequenceVec sequenceTemplate
Template sequence data.
Definition: DtInstanceManager.h:315
osg::ref_ptr< osg::Node > lightPoint
Definition: DtInstanceManager.h:258
float range
Definition: DtInstanceManager.h:250
BoolVec myVisibleSet
Per instanced drawable visibility state.
Definition: DtInstanceManager.h:820
NodeVec myDofNodes
OSG nodes corresponding to myPerDofData.
Definition: DtInstanceManager.h:371
GeometryToCallback myGeometryToCallback
Definition: DtInstanceManager.h:1072
BoolVec switchStates
Visibility state of each drawable range.
Definition: DtInstanceManager.h:115
ArrayRange drawableRange
Range of drawables under this DOF, relative to the first drawable in this model type.
Definition: DtInstanceManager.h:208
unsigned int matrixIndex(unsigned int instanceIx)
Get the start index of the drawable spatial data for the specified instance.
Definition: DtInstanceManager.h:636
std::vector< DofAnimation > DofAnimations
Definition: DtInstanceManager.h:281
unsigned int drawableIndex(unsigned int instanceIx)
Get the start index of the drawable spatial data for the specified instance.
Definition: DtInstanceManager.h:631
InstancedLodVec & instancedLods()
Definition: DtInstanceManager.h:592
const osg::Camera * lastCamera()
Camera that was most recently used to udate.
Definition: DtInstanceManager.h:628
osg::Vec3f hprVel
Current Heading/Pitch/Roll angular velocity in rad/s.
Definition: DtInstanceManager.h:227
BoolVec defaultSwitchStates
Default Visibility state of each drawable range (different from simple models than articulated part) ...
Definition: DtInstanceManager.h:118
Internal frustum record for culling.
Definition: DtInstanceManager.h:745
The abstract Channel Class.
Definition: DtChannel.h:29
unsigned int count
Number of drawables in the range.
Definition: DtInstanceState.h:42
List of transforms for visible instances of a drawable.
Definition: DtInstanceManager.h:775
std::vector< InstancedLight > InstancedLightVec
Definition: DtInstanceManager.h:566
DOF data that is constant across all instances of a model type.
Definition: DtInstanceManager.h:184
InstanceMatrix putMatrix
Initial put matrix.
Definition: DtInstanceManager.h:188
DofAnimations & dofAnimations()
Array of DOF animation data.
Definition: DtInstanceManager.h:610
LightSource()
Definition: DtInstanceManager.h:247
Specifies a per-instance flipbook sequence.
Definition: DtInstanceManager.h:122
Specifies a range of drawables in the drawable array.
Definition: DtInstanceState.h:20
Per-instance DOF data.
Definition: DtInstanceManager.h:160
LightPointVec myLightPointNodes
Light Point data.
Definition: DtInstanceManager.h:368
LightPoint()
Definition: DtInstanceManager.h:257
InstanceMatrix l2w
Definition: DtInstanceManager.h:763
unsigned int visibleCount() const
Definition: DtInstanceManager.h:658
Contains makVrv::DtVirtualBaseClass class.
PerDofDataVec dofTemplate
DOF data that is constant across all instances of this model.
Definition: DtInstanceManager.h:303
InstanceMatrix transform
Current DOF transform.
Definition: DtInstanceManager.h:164
InstanceScaleVec & instanceScales()
Scale of instances.
Definition: DtInstanceManager.h:573
unsigned int myNumThreads
Definition: DtInstanceManager.h:1013
tbb::atomic< unsigned int > count
Number of visible instances.
Definition: DtInstanceManager.h:785
Callback to always cull out a drawable.
Definition: DtInstanceManager.h:1037
DT_DLL_VRVCORE double distance(const makVrv::DtCoordinateSystem &, const DtVector &from, const DtVector &to)
Returns the distance from the two points.
results of the parsing visitor
Definition: DtInstanceManager.h:352
const osg::View * view
Buffer is specific to this view.
Definition: DtInstanceManager.h:267
osg::Vec3f smoothTransVel
If actively smoothing, use this velocity instead for translation.
Definition: DtInstanceManager.h:237
Manages data for instanced rendering system and kicks off DtInstanceProcessors to update instance sta...
Definition: DtInstanceManager.h:75
osg::Matrixf InstanceMatrix
Type of osg matrix to use for transforms relative to instance base.
Definition: DtInstanceState.h:46
tbb::atomic< int > myVisibleCount
Definition: DtInstanceManager.h:1098
tbb::spin_rw_mutex myMapMutex
Definition: DtInstanceManager.h:987
float speed
Speed multiplier for the animation; set negative to play in reverse.
Definition: DtInstanceManager.h:143
unsigned int drawableIx
Definition: DtInstanceManager.h:156
osg::Vec3d center
Definition: DtInstanceManager.h:739
std::vector< float > myDistanceToEye
Per-instance distances to eyepoint for the current camera.
Definition: DtInstanceManager.h:835
std::vector< InstancedLod > InstancedLodVec
Definition: DtInstanceManager.h:560
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 0), const ImVec2 &uv1=ImVec2(1, 1), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0))
osg::Vec3f smoothHprVel
If actively smoothing, use this velocity instead for rotation.
Definition: DtInstanceManager.h:240
DtDe & myDe
Definition: DtInstanceManager.h:1132
std::vector< osg::ref_ptr< osg::Geometry > > GeometryVec
Definition: DtInstanceManager.h:78
LightPointVec myInstancedLightPoints
Definition: DtInstanceManager.h:873
std::map< osg::ref_ptr< osgEarth::VirtualProgram >, osg::ref_ptr< osgEarth::VirtualProgram > > VpMap
Definition: DtInstanceManager.h:81
ArrayRange dofRange
Range of instanced DOF nodes in this instance.
Definition: DtInstanceState.h:99
InstancedSwitchVec switchTemplate
Template switch data.
Definition: DtInstanceManager.h:312
const DtOsgCullVisitorParameters * lastCullParameters()
Last cull parameters from the renderer.
Definition: DtInstanceManager.h:616
DrawableRangeVec switchRanges
Per-frame ranges of drawables to display.
Definition: DtInstanceManager.h:128
InstanceCullDataVec myInstanceCullData
Array of per-instance culling data.
Definition: DtInstanceManager.h:847
Per-instance culling parameters.
Definition: DtInstanceState.h:51
std::vector< InstanceMatrix, tbb::cache_aligned_allocator< InstanceMatrix > > InstanceMatrixVec
Definition: DtInstanceManager.h:563
InstanceScaleVec myInstanceScales
Array of per-instance model scale factors.
Definition: DtInstanceManager.h:838
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
The osg cull vistor parameters class provides additional culling and intersector parameters for choos...
Definition: DtOsgCullVisitorParameters.h:38
int myNeedsMainThreadTextureUpdate
Definition: DtInstanceManager.h:1100
InstanceTemplate()
Definition: DtInstanceManager.h:292
ArrayRange drawableRange
Range of drawables this LOD effects.
Definition: DtInstanceManager.h:103
osg::MatrixTransform * myAnimatedMatrix
pointer to optional animation matrix that gets synced to the transform
Definition: DtInstanceManager.h:180
std::vector< InstancedSequence * > SequenceVec
Definition: DtInstanceManager.h:284
const osg::View * lastView()
View that most recently called update.
Definition: DtInstanceManager.h:625
PerDofDataVec myPerDofData
Definition: DtInstanceManager.h:359
unsigned int myCurrentTBBChunkSize
Definition: DtInstanceManager.h:1104
LightPointVec lightPoints
LightPoint data.
Definition: DtInstanceManager.h:309
std::vector< InstancedSwitch * > SwitchVec
Definition: DtInstanceManager.h:283
Eyepoint for a view.
Definition: DtInstanceManager.h:737
std::vector< osg::ref_ptr< osgEarth::VirtualProgram > > VpRefList
Definition: DtInstanceManager.h:82
virtual bool cull(osg::NodeVisitor *nv, osg::Drawable *drawable, osg::RenderInfo *renderInfo) const
Definition: DtInstanceManager.h:1039
ModelVec myModelInstances
Definition: DtInstanceManager.h:856
Definition: DtInstanceManager.h:245
std::vector< char > ByteVec
Definition: DtInstanceManager.h:80
osg::Vec3f transVel
Definition: DtInstanceManager.h:221
int myAnimatedNodeCount
has osg transform nodes
Definition: DtInstanceManager.h:385
InstancedLodVec myInstancedLods
Definition: DtInstanceManager.h:868
tbb::concurrent_queue< unsigned int > myListToRemove
Definition: DtInstanceManager.h:903
LightSourceVec lightSources
Lightsource data.
Definition: DtInstanceManager.h:306
modelTypeToTemplateMap myModelTypeToTemplate
Map model definition to its template index.
Definition: DtInstanceManager.h:1002
ArrayRange myAnimatedDofs
Definition: DtInstanceManager.h:864
unsigned long long DtUniqueID
Definition: DtUniqueID.h:22
std::string myAnimatedMatrixName
animated matrix info
Definition: DtInstanceManager.h:211
float timePerFrame
Frametime each frame of the animation should take.
Definition: DtInstanceManager.h:131
std::vector< unsigned int > myActiveDrawablesScratch
Definition: DtInstanceManager.h:814
Contains makVrv::DtModel class.
std::vector< InstancedSequence > InstancedSequenceVec
Definition: DtInstanceManager.h:280
std::vector< DtInstanceProcessor * > InstanceProcessorVec
Vector of instance processors.
Definition: DtInstanceManager.h:1052
std::vector< ArrayRange > DrawableRangeVec
Definition: DtInstanceManager.h:83
BoolVec & visibleSet()
Per instanced drawable visibility.
Definition: DtInstanceManager.h:619
InstanceTemplateVec & instanceTemplates()
Per model definition templates for creating instances.
Definition: DtInstanceManager.h:604
const osg::View * myLastView
Reference to view that most recently called update.
Definition: DtInstanceManager.h:891
ArrayRange myMatrixes
Definition: DtInstanceManager.h:863
CullSet myPerViewCullResults
Storage for per-view cull set calculation.
Definition: DtInstanceManager.h:897
InstancedDof()
Definition: DtInstanceManager.h:162
unsigned int nodeMask
Per model type nodemask to capture model definition settings.
Definition: DtInstanceManager.h:339
LightSourceVec myLightSources
Light source data.
Definition: DtInstanceManager.h:365
SequenceVec mySequences
Definition: DtInstanceManager.h:361
InstancedLightVec myInstancedLights
Definition: DtInstanceManager.h:872
FloatVec myInstanceLightpointRange
Array of per-instance max lightpoint distances squared.
Definition: DtInstanceManager.h:844
std::string myInstanceVS
Definition: DtInstanceManager.h:1102
Base class for handling DtChannels.
Definition: DtChannelManager.h:35
InstancedSequenceVec & instancedSequences()
Definition: DtInstanceManager.h:596
NodeVec mySequenceNodes
OSG nodes corresponding to mySequences.
Definition: DtInstanceManager.h:377
float myArtPartSmoothingPeriod
Definition: DtInstanceManager.h:1107
unsigned int attachDrawableIx
Definition: DtInstanceManager.h:259
GeometryVec myDrawables
Definition: DtInstanceManager.h:360
std::vector< DtElementID > InstanceElementIdVec
Definition: DtInstanceManager.h:565
std::vector< InstancedDof > InstancedDofVec
Definition: DtInstanceManager.h:561
Base class to provide boost signal/slot management.
osgUtil::LineSegmentIntersector::Intersection result
Definition: DtInstanceManager.h:756
boost::unordered_map< const osg::View *, osg::ref_ptr< DtViewSpecificGroup > > ViewToGroup
Map from views to the group node that activates their instance buffer.
Definition: DtInstanceManager.h:1067
unsigned int dynamicBufferDataSize() const
Definition: DtInstanceManager.h:660
float userDefined
Definition: DtInstanceManager.h:765
FloatVec myInstanceUserDefined
Array of per-instance user-defined floats.
Definition: DtInstanceManager.h:841
Per-instance light source data.
Definition: DtInstanceManager.h:150
Class for generic lights.
Definition: DtLight.h:48
unsigned int myDynamicBufferDataSz
Definition: DtInstanceManager.h:990
GeometryVec & drawables()
Definition: DtInstanceManager.h:656
CacheMap myRuntimeCache
Definition: DtInstanceManager.h:901
Per instanced DOF animation data.
Definition: DtInstanceManager.h:215
const char int mode
Definition: ioapi.h:38
Transform matrix for an instanced drawable to render with.
Definition: DtInstanceManager.h:761
TextureCoordinateVec & uvOffsets()
UV Offset state of drawable instances.
Definition: DtInstanceManager.h:588
Per view buffer of instances.
Definition: DtInstanceManager.h:264
double minRange
Minimum distance to eye for this LOD to be visible.
Definition: DtInstanceManager.h:95
osg::ref_ptr< DtInstanceManagerTboUpdater > myDrawCallUpdater
Definition: DtInstanceManager.h:1099
A model which owns a single model instance.
Definition: DtModel.h:56
Contains makVrv::DtUniqueID type.
std::vector< RenderState > RenderStateVec
List of transform matrices that will be used to render instances of a particular drawable.
Definition: DtInstanceManager.h:772
InstanceProcessorVec myPostCullInstanceProcessors
Processors run after frustum culling.
Definition: DtInstanceManager.h:1055
LodVec myLods
Definition: DtInstanceManager.h:357
float myDefaultLightPointRange
Definition: DtInstanceManager.h:1077
bool isRangeScheme
Definition: DtInstanceManager.h:251
Contains DLL export macros.
Specifies a per-instance switch.
Definition: DtInstanceManager.h:109
DtGlTextureBufferObject * image
Instance data.
Definition: DtInstanceManager.h:270
std::map< const InstanceTemplate *, int > myNewTemplates
Definition: DtInstanceManager.h:1103
DofAnimations myDofAnimations
Array of DOF animation data.
Definition: DtInstanceManager.h:878
bool daylightControlledLights
Whether or not lights in this model type turn off during daylight.
Definition: DtInstanceManager.h:345
unsigned int getcount() const
Definition: DtInstanceManager.h:788
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
int lastFrame
Most recent frame that was rendered.
Definition: DtInstanceManager.h:146
ParserOutput()
Definition: DtInstanceManager.h:354
std::string myName
Definition: DtInstanceManager.h:300
osg::Vec3d & cameraPosition()
Camera position of the most recent camera that called update.
Definition: DtInstanceManager.h:622
float scale
Definition: DtInstanceManager.h:764
Instance template light point data.
Definition: DtInstanceManager.h:255
InstanceElementIdVec & elementIds()
Element IDs of instances.
Definition: DtInstanceManager.h:570
ArrayRange drawableRange
Range of drawables under this DOF.
Definition: DtInstanceManager.h:172
std::vector< LightPoint > LightPointVec
Definition: DtInstanceManager.h:286
unsigned int myRequiredUvOffsets
Number of UV offsets required by current allocated instances.
Definition: DtInstanceManager.h:1008
std::vector< float > FloatVec
Definition: DtInstanceManager.h:85
unsigned int myLastNodeMask
Nodemask used for last update.
Definition: DtInstanceManager.h:884
InstancedLight()
Definition: DtInstanceManager.h:152
InstanceStateVec & instances()
State of active instances.
Definition: DtInstanceManager.h:585
unsigned int numChildren
Number of child DOFs of this DOF.
Definition: DtInstanceManager.h:205
VpRefList myVpRefs
Definition: DtInstanceManager.h:1031
voidpf uLong offset
Definition: ioapi.h:42
RenderStateVec states
Drawable instance transforms.
Definition: DtInstanceManager.h:793
double myLastUpdateTime
Last time the instances were updated.
Definition: DtInstanceManager.h:881
Specifies an instanced LOD by min/max visible ranges and effected drawable range. ...
Definition: DtInstanceManager.h:92
DtDe & myDe
Definition: DtInstanceManager.h:1004
boost::signal< void(const CullSet &)> signal_updateFinished
Emitted when instance update is complete.
Definition: DtInstanceManager.h:398
osg::ref_ptr< TextureBufferObjectApplyAttribute > applyAttribute
Texture buffer attribute.
Definition: DtInstanceManager.h:273
osg::ref_ptr< AlwaysCull > myAlwaysCullCallback
Definition: DtInstanceManager.h:1045
boost::unordered_map< osg::Geometry *, osg::ref_ptr< DtPerViewUniformCallback > > GeometryToCallback
Map from geometry (drawable) to the callback that updates its start index uniform.
Definition: DtInstanceManager.h:1071
float endTime
Frametime to stop the animation at; -1 will loop indefinitely.
Definition: DtInstanceManager.h:137
std::vector< osg::Node * > NodeVec
Definition: DtInstanceManager.h:282
osg::Vec3f trans
Current translation in meters.
Definition: DtInstanceManager.h:219
std::vector< InstanceDataOffsets > myInstanceDataOffsets
Definition: DtInstanceManager.h:866
std::vector< DtUniqueID > CullSet
Definition: DtInstancedCullSet.h:16
Definition: DtInstanceManager.h:860
bool myTboSendFlag
Definition: DtInstanceManager.h:1108
float myLightPointFadeBias
Definition: DtInstanceManager.h:1078
int myAnimatedNodeCount
how many animated node this object has
Definition: DtInstanceManager.h:348
std::vector< osg::Vec2f > TextureCoordinateVec
Definition: DtInstanceManager.h:84
osg::Vec3f initialTranslate
Initial translation when instances are created.
Definition: DtInstanceManager.h:200
osg::Vec3d myCameraPosition
Camera position of the most recent camera that called update.
Definition: DtInstanceManager.h:888
double t
Definition: DtInstanceManager.h:747
double maxRange
Maximum distance to eye for this LOD to be visible.
Definition: DtInstanceManager.h:98
std::vector< InstanceBuffer > InstanceBufferVec
Vector of per-view instance data buffers.
Definition: DtInstanceManager.h:994
boost::unordered_map< DtUniqueID, unsigned int > InstanceStateMap
Map from instance unique ID to the index into myInstances for that instance.
Definition: DtInstanceManager.h:983
std::vector< LightSource > LightSourceVec
Definition: DtInstanceManager.h:277
InstancedDofVec myInstancedDofs
Definition: DtInstanceManager.h:871
Per-instance state information.
Definition: DtInstanceState.h:70
VpMap myVpMap
Definition: DtInstanceManager.h:1030

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)