VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLightPointManager.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 
18 
19 #include <string>
20 
21 namespace makVrv
22 {
23  class DtDe;
24 
29  {
30  friend class DtDeSharedState;
31 
32  public:
34  {
35  int myGroupColorIndex = 0;
36  int myReferenceCount = 0;
37  };
38 
39  typedef std::pair<std::string, DtLightPointGroupEntry> GroupIdPair;
40  typedef std::map<std::string, DtLightPointGroupEntry> GroupIdMap;
41 
42  public:
47  static bool isLightPointGroupNameComplete(const std::string& lightPointGroupName);
48 
51  static DtLightPointManager& instance(DtDe& de);
52 
53  static void registerInstance(DtDe& de, DtLightPointManager* manager);
54 
56  static const std::string& theClassName();
57 
59  static float defaultLightPointRange();
60 
61  public:
62 
65 
68  virtual bool groupExists(const std::string& group) const;
69 
71  virtual DtColorValue groupColor(const std::string& group);
72 
76  virtual int groupId(const std::string& group, bool increaseReferenceCount = false);
77 
79  virtual int lightPointMaxCode();
80 
83  void setGroupColor(const std::string& group, float colorR, float colorG, float colorB, float colorA);
84 
87  virtual void setGroupColor(const std::string& group, const DtColorValue& color, bool createGroupIfNonexistent = true);
88 
90  virtual const GroupIdMap& groupIdMap();
91 
92 
93  protected:
94 
96  virtual ~DtLightPointManager();
97 
100  void local_setGroupColor(const std::string& group, const DtColorValue& color, bool createGroupIfNonexistent);
101 
102  protected:
103 
105 
107 
108  //Internal light point table. Restricted access. Use light point manager to modify this table.
110 
112 
113  std::map<std::string, std::vector<std::string>> myEntityTypeNameToSubGroupNamesMap;
114 
116 
117  std::map<std::string, DtColorValue> myColorsAwaitingGroupCreation;
118 
120 
121  protected:
122 
123  static const std::string theLightFilename;
124  static const std::string theLightTunningFilename;
125  static const std::string theLightDefaultValuesXmlFilename;
126  static const std::string theLightDefaultValuesCsvFilename;
127 
128  };
129 }
int myLastUpdateLightPointMaxCode
Definition: DtLightPointManager.h:119
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
static const std::string theLightFilename
Definition: DtLightPointManager.h:123
DtLightPointTable myLightsTable
Definition: DtLightPointManager.h:109
std::map< std::string, DtColorValue > myColorsAwaitingGroupCreation
Definition: DtLightPointManager.h:117
DtSignalConnectionManager mySignals
Definition: DtLightPointManager.h:104
DtDe & myDe
Definition: DtLightPointManager.h:106
Template class which implements a data structure providing management of &#39;reserved&#39; elements...
Definition: DtReservedElementsBuffer.h:16
std::pair< std::string, DtLightPointGroupEntry > GroupIdPair
Definition: DtLightPointManager.h:39
Lights Table class, handles loading the light type table default files and keeping track of all the c...
Definition: DtLightPointTable.h:34
Contains makVrv::DtVirtualBaseClass class.
The DtDeSharedState represents all the data that is shared between the master and its slaves...
Definition: DtDeSharedState.h:45
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
static const std::string theLightDefaultValuesXmlFilename
Definition: DtLightPointManager.h:125
Utility class container for light point types.
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
static const std::string theLightDefaultValuesCsvFilename
Definition: DtLightPointManager.h:126
std::map< std::string, DtLightPointGroupEntry > GroupIdMap
Definition: DtLightPointManager.h:40
static const std::string theLightTunningFilename
Definition: DtLightPointManager.h:124
Base class to provide boost signal/slot management.
DtReservedElementsBuffer< DtColorValue > myGroupColors
Definition: DtLightPointManager.h:115
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:72
GroupIdMap myGroupIds
Definition: DtLightPointManager.h:111
Template for Color values in [0,1] range.
Definition: DtColorValue.h:20
std::map< std::string, std::vector< std::string > > myEntityTypeNameToSubGroupNamesMap
Definition: DtLightPointManager.h:113
Definition: DtLightPointManager.h:33
Contains DLL export macros.
DtLightPointManager core base class for DtOsgLightPointManger (which does most of the work for light ...
Definition: DtLightPointManager.h:28

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)