VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtLightPointAggregator.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include <vrvOsg/vrvOsg.h>
15 
17 
18 #include <osg/ref_ptr>
19 #include <osg/NodeVisitor>
20 
21 #include <map>
22 
23 namespace makVrv
24 {
28  class DT_DLL_VRVOSG DtLightPointAggregator : public osg::Referenced
29  {
30  public:
33 
35  virtual ~DtLightPointAggregator();
36 
37  private:
39  DtLightPointAggregator(const DtLightPointAggregator &other) = delete;
41  DtLightPointAggregator &operator=(const DtLightPointAggregator &other) = delete;
42 
43  public:
49  virtual DtLightPointPerNodeData aggregate(
50  int nodeGroupId,
51  bool daylightControlled,
52  const DtIndirectFadeParameters& fadeParameters,
53  const DtLightPointNodeAndXform& nodeAndXform,
54  bool combineLightPoints,
55  bool& newNode);
56 
57  protected:
60  {
62  DtLightPointDivisionTuple(int nodeGroupId,
63  bool daylightControlled,
64  const DtIndirectFadeParameters& fadeParameters,
65  const DtLightPointNodeAndXform& nodeAndXform);
66 
67  int myNodeGroupId; // for separating by group ID
68  bool myDaylightControlled; // for separating by daylightControlled
69  DtIndirectFadeParameters myFadeParameters; // for separating by fade parameters
70  DtLightPointNodeAndXform myNodeAndXform; // Dof/Lod/Switch stacks and pointer
71  };
72 
76  {
77  bool operator()(const DtLightPointDivisionTuple& lhs, const DtLightPointDivisionTuple& rhs) const;
78  };
79 
80  // This structure is a map instead of a hash_map since it isn't expected for there
81  // to be many things in it. Maps are often faster for small sets.
84  protected:
85  DtLightNodeMap myLightNodeMap; // maps the division tuple to the aggregation nodes
86  };
87 
88 } // namespace makVrv
Contains the DtLightPointPerNodeData struct declaration.
Contains makVrv::DtLightPointNode class.
int myNodeGroupId
Definition: DtLightPointAggregator.h:67
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Functor to provide a comparison function for DtLightPointDivisionTuple This is provided as a functor ...
Definition: DtLightPointAggregator.h:75
std::map< DtLightPointDivisionTuple, DtLightPointPerNodeData, CmpLightPointTuple > DtLightNodeMap
Definition: DtLightPointAggregator.h:83
DtLightPointNodeAndXform myNodeAndXform
Definition: DtLightPointAggregator.h:70
This class allows us to incrementally aggregate multiple separate light points sharing common data in...
Definition: DtLightPointAggregator.h:28
Contains the DtLightPointNodeAndXform struct declaration.
This is the set of values which nodes must share to be aggregated.
Definition: DtLightPointAggregator.h:59
DtIndirectFadeParameters myFadeParameters
Definition: DtLightPointAggregator.h:69
DtLightNodeMap myLightNodeMap
Definition: DtLightPointAggregator.h:85
bool myDaylightControlled
Definition: DtLightPointAggregator.h:68
This is data used to determine division points during light point aggregation. It uses simple public ...
Definition: DtLightPointNodeAndXform.h:25
Contains makVrv::DtVirtualBaseClass class.
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
Contains DLL export macros.
This struct tracks data associated each node in the DtLightPointAggregator. This data does not live a...
Definition: DtLightPointPerNodeData.h:20

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)