VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtSpeedTreeCore.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 
14 #include <vrvSt/vrvSt.h>
15 
16 #include <boost/unordered/unordered_set.hpp>
17 
18 namespace makOsgSpeedTree
19 {
20  class Core;
21  struct SForestRenderInfo;
22 }
23 
24 namespace makVrv
25 {
29  {
30 
31  public:
32  typedef boost::unordered_set<int> ProgramBlocks;
33 
34  public:
36  DtSpeedTreeCore(DtDe& de);
37 
39  virtual ~DtSpeedTreeCore();
40 
41  private:
45  DtSpeedTreeCore(const DtSpeedTreeCore &other);
47  DtSpeedTreeCore &operator=(const DtSpeedTreeCore &other);
48 
49  public:
51  static DtSpeedTreeCore& instance(DtDe& de);
52 
54  static void registerInstance(DtDe& de, DtSpeedTreeCore* anInstance);
55 
56  public:
57 
60  virtual makOsgSpeedTree::Core* speedTreeCore(void)
61  {
62  return mySpeedTreeCore;
63  }
64 
65  virtual void slot_displayToBeDestroyed(const std::string& displayName, DtDe* de);
66 
71  virtual void set3DLodDistances(float fHighDetail3dDistance,
72  float fLowDetail3dDistance);
73 
77  virtual void setBillboardStartEndDistances(float fBillboardStartDistance,
78  float fBillboardEndDistance);
79 
80  virtual void setTreesEnabled(bool enabled);
81  virtual void enableBillboardRendering(bool enable);
82  virtual void enable3DTreeRendering(bool enable);
83 
84  virtual void setAmbientScalar(float val);
85  virtual void setDiffuseScalar(float val);
86  virtual void setSpecularScalar(float val);
87  virtual void setTransmissionScalar(float val);
88  virtual void setAlphaScalar(float val);
89 
92  virtual void setVertexUserFunctionFileName(
93  const std::string& vertexUserFunctionFilename);
94 
97  virtual void setFragmentUserFunctionFileName(
98  const std::string& fragmentUserFunctionFilename);
99 
101  virtual const std::string& vertexUserFunctionFileName() const;
102 
104  virtual const std::string& fragmentUserFunctionFileName() const;
105 
107  virtual void setFreezeEnabled(bool enable);
110  virtual bool freezeEnabled();
111 
113  virtual void setProfilingActive(bool active);
114 
115  //Get the program id's that have been bound already.
116  // This changed from being in the forest because it needs to be cleared for all
117  // forests if one forest uploads new functions to the core
118  virtual ProgramBlocks& programBlocks();
119 
120  protected:
121 
122  void connectSignals(void);
123  void disconnectSignals(void);
124  protected:
125  static void initRenderInfo(
126  makOsgSpeedTree::SForestRenderInfo& sForestRenderInfo);
127 
128  protected:
130 
131  makOsgSpeedTree::Core* mySpeedTreeCore;
133 
137 
139  };
140 }
Virtual base class.
Definition: DtVirtualBaseClass.h:22
#define DT_DLL_VRVST
Definition: vrvSt.h:23
Contains DLL export macros.
bool myFreezeEnabled
Definition: DtSpeedTreeCore.h:136
DtSpeedTreeCore wraps and provides the interface to makOsgSpeedTree.
Definition: DtSpeedTreeCore.h:28
std::string myVertexUserFunctionFilename
Definition: DtSpeedTreeCore.h:134
boost::unordered_set< int > ProgramBlocks
Definition: DtSpeedTreeCore.h:32
Contains makVrv::DtVirtualBaseClass class.
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:24
makOsgSpeedTree::Core * mySpeedTreeCore
Definition: DtSpeedTreeCore.h:131
DtSignalConnectionManager myConnections
Definition: DtSpeedTreeCore.h:132
ProgramBlocks myProgramBlocks
Definition: DtSpeedTreeCore.h:138
Base class to provide boost signal/slot management.
std::string myFragmentUserFunctionFilename
Definition: DtSpeedTreeCore.h:135
static DtSpeedTreeCore * mySpeedTreeCore
Definition: vrvSt.h:37
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DtDe & myDe
Definition: DtSpeedTreeCore.h:129
virtual makOsgSpeedTree::Core * speedTreeCore(void)
Get a pointer to the makOsgSpeedTree::Core wrapped by this object.
Definition: DtSpeedTreeCore.h:60

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)