VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtFastGroup.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2022 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 #include <osg/Group>
14 #include <osg/MatrixTransform>
15 
16 namespace makVrv
17 {
18  class DtSceneObject;
19 
22  class DT_DLL_VRVOSG DtFastGroup : public osg::Group
23  {
24  public:
25 
26  META_Node(vrvOsg, DtFastGroup);
27 
28  DtFastGroup();
29 
31  DtFastGroup(const DtFastGroup&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
32 
34  virtual bool removeChildren( unsigned int pos,unsigned int numChildrenToRemove);
35 
38  virtual void resizeGLObjectBuffers(unsigned int maxSize);
39  protected:
40  // This tracks osg::DisplaySettings::instance()->getMaxNumberOfGraphicsContexts()
41  // (or rather the last value of maxSize that the resizeGLObjectBuffers was called with)
42  // This is checked so that resizeGLObjectBuffers does not trigger
43  // a resize of the whole scene graph when a new window is made.
44  // (we use a contexts that share data, so this number never changes)
45  // This fixes the slowdown when new windows are added
46  int myLastMaxNumberOfGraphicsContexts = -1;
47  };
48 
50  class DT_DLL_VRVOSG DtFastMatrixTransform : public osg::MatrixTransform
51  {
52  public:
53 
54  META_Node(vrvOsg, DtFastMatrixTransform);
55 
57 
59  DtFastMatrixTransform(const DtFastMatrixTransform&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
60 
62  virtual bool removeChildren( unsigned int pos,unsigned int numChildrenToRemove);
63 
66  virtual void setSceneObject( DtSceneObject* sceneObject );
67  virtual DtSceneObject* sceneObject() const;
68 
70  virtual osg::Matrix& getMatrixForEditing();
72  virtual void invalidateMatrix();
73 
74  protected:
76  };
77 }
78 
DtSceneObject * mySceneObject
Definition: DtFastGroup.h:75
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
osg::MatrixTransform with optimized removeChildren function
Definition: DtFastGroup.h:50
osg::Group with optimized removeChildren function
Definition: DtFastGroup.h:22
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.

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)