VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvGraphicsUtils
DtLightManager.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2017 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
#pragma once
10
11
#include <
vrvGraphicsUtils/vrvGraphicsUtils.h
>
12
13
#pragma warning( push )
14
#pragma warning( disable : 4251 )
15
16
#include <
vrvGraphicsUtils/DtForwardDeclare.h
>
17
#include <
vrvGraphicsUtils/DtAxisAlignedBoundingBox.h
>
18
#include <
vrvGraphicsUtils/DtLight.h
>
19
#include <
vrvGraphicsUtils/DtOctreeFwdDeclare.h
>
20
#include <
vrvGraphicsUtils/DtOctreeNodeFwdDeclare.h
>
21
#include <
vrvGraphicsUtils/DtCameraFwdDeclare.h
>
22
#include <
vrvGraphicsUtils/DtOctree.h
>
23
24
namespace
makVrv {
25
28
class
DT_DLL_VRVGRAPHICSUTILS
DtLightManager
29
{
30
public
:
31
DtLightManager
(
const
AxisAlignedBoundingBox_64
& box,
size_t
depth);
32
virtual
~
DtLightManager
();
33
35
36
DtLight
* createLight(
LightType
lightType);
37
void
destroyLight(
DtLight
* pLight);
38
size_t
numLights(
void
)
const
;
39
DtLight
* getLight(
size_t
index);
41
43
const
VectorLights& getAllLights(
void
)
const
;
44
46
bool
lightExists(
const
DtLight
* pLight)
const
;
47
49
50
void
update(
Camera_64
* pCamera);
51
void
update(
Frustum_64
* pFrustum,
const
Vector3_64
& vRefPosition);
53
55
void
getClosestLights(VectorLights& closestLights
56
,
const
Vector3_64
& vPosition,
size_t
n);
57
59
const
VectorLights& getFrustumAffectingLights(
void
)
const
;
60
61
void
setlodDistance(
float
fDistance);
62
float
lodDistance(
void
)
const
;
63
float
lodDistanceSquared(
void
)
const
;
64
private
:
65
ListLights
myLights
;
66
67
mutable
bool
mybVectorLightsdirty
;
68
mutable
VectorLights
myVectorLights
;
69
70
Octree_64
*
myOctree
;
71
void
initOctree(
const
AxisAlignedBoundingBox_64
& box);
72
73
void
lightUpdated(
const
DtLight
* pLight);
74
void
lightBoundsUpdated(
const
DtLight
* pLight);
75
void
lightDestroyed(
const
DtLight
* pLight);
76
77
void
connectSignals(
DtLight
* pSceneNode);
78
void
disconnectSignals(
const
DtLight
* pLight);
79
80
void
createOctreeNode(
DtLight
* pLight);
81
void
destroyOctreeNode(
DtLight
* pLight);
82
OctreeNode_64
* getOctreeNode(
const
DtLight
* pLight)
const
;
83
84
void
findVisibleObjects(
Camera_64
* pCamera);
85
void
findVisibleObjects(
Frustum_64
* pCamera,
const
Vector3_64
& vRefPosition);
86
87
Octree_64::NodeList
myVisibleOctreeNodes
;
88
VectorLights
myFrustumAffectingLights
;
89
90
VectorLights
myFrustumAffectingLightsSortingScratchPad
;
91
92
DtLightManager
(){}
93
94
float
myLODDistance
;
95
};
96
97
}
//namespace makVrv
98
99
#pragma warning( pop )
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)