VR-Forces 4.10 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) 2021 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 setMultiViewVertexUserFunctionFileName(
98  const std::string& vertexUserFunctionFilename);
99 
102  virtual void setFragmentUserFunctionFileName(
103  const std::string& fragmentUserFunctionFilename);
104 
106  virtual const std::string& vertexUserFunctionFileName() const;
107 
109  virtual const std::string& multiViewVertexUserFunctionFileName() const;
110 
112  virtual const std::string& fragmentUserFunctionFileName() const;
113 
115  virtual void setFreezeEnabled(bool enable);
118  virtual bool freezeEnabled();
119 
121  virtual void setProfilingActive(bool active);
122 
123  //Get the program id's that have been bound already.
124  // This changed from being in the forest because it needs to be cleared for all
125  // forests if one forest uploads new functions to the core
126  virtual ProgramBlocks& programBlocks();
127 
128  protected:
129 
130  void connectSignals(void);
131  void disconnectSignals(void);
132  protected:
133  static void initRenderInfo(
134  makOsgSpeedTree::SForestRenderInfo& sForestRenderInfo);
135 
136  protected:
138 
139  makOsgSpeedTree::Core* mySpeedTreeCore;
141 
146 
148  };
149 }
Virtual base class.
Definition: DtVirtualBaseClass.h:19
#define DT_DLL_VRVST
Definition: vrvSt.h:20
Contains DLL export macros.
bool myFreezeEnabled
Definition: DtSpeedTreeCore.h:145
DtSpeedTreeCore wraps and provides the interface to makOsgSpeedTree.
Definition: DtSpeedTreeCore.h:28
std::string myVertexUserFunctionFilename
Definition: DtSpeedTreeCore.h:142
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:20
makOsgSpeedTree::Core * mySpeedTreeCore
Definition: DtSpeedTreeCore.h:139
DtSignalConnectionManager myConnections
Definition: DtSpeedTreeCore.h:140
ProgramBlocks myProgramBlocks
Definition: DtSpeedTreeCore.h:147
Base class to provide boost signal/slot management.
std::string myFragmentUserFunctionFilename
Definition: DtSpeedTreeCore.h:144
static DtSpeedTreeCore * mySpeedTreeCore
Definition: vrvSt.h:34
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
std::string myMultiViewVertexUserFunctionFileName
Definition: DtSpeedTreeCore.h:143
DtDe & myDe
Definition: DtSpeedTreeCore.h:137
virtual makOsgSpeedTree::Core * speedTreeCore(void)
Get a pointer to the makOsgSpeedTree::Core wrapped by this object.
Definition: DtSpeedTreeCore.h:60

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)