Nebula
Loading...
Searching...
No Matches
visibilitysystem.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
39//------------------------------------------------------------------------------
40#include "math/mat4.h"
41#include "jobs/jobs.h"
42#include "math/bbox.h"
45#include "models/modelcontext.h"
46#include "threading/event.h"
47#include "jobs2/jobs2.h"
48
49namespace Visibility
50{
51
53{
54 Resources::ResourceName path; // path to authored box system
55};
56
58{
59 Resources::ResourceName path; // path to authored portal system
60};
61
63{
64 bool worldExpanding; // if true, will cover the entire game world, and the next fields are unused
65 uint cellsX, cellsY, cellsZ; // how many cells per unit dimension
66 uint width, height, depth; // total size of the tree
67 Math::vec4 pos; // center position of tree
68};
69
71{
72 bool worldExpanding; // if true, will cover the entire game world, and the next fields are unused
73 uint cellsX, cellsY; // how many cells per unit dimension
74 uint width, height; // total size of the tree
75 Math::vec4 pos; // center position of tree
76};
77
79{
80 // empty on purpose
81};
82
84{
85public:
86
89
91 virtual void PrepareObservers(const Math::mat4* transforms, bool* orthoFlags, Util::Array<Math::ClipStatus::Type>* results, const SizeT count);
93 virtual void PrepareEntities(const Math::bbox* transforms, const uint32* ranges, const Graphics::GraphicsEntityId* entities, const uint32_t* entityFlags, const SizeT count);
95 virtual void Run(const Threading::AtomicCounter* previousSystemCompletionCounters, const Util::FixedArray<const Threading::AtomicCounter*, true>& extraCounters);
96
101
102protected:
103
106
115
124};
125
126} // namespace Visibility
Nebula's bounding box class.
Definition bbox.h:24
Nebula's dynamic array class.
Definition array.h:60
Implements a fixed size one-dimensional array.
Definition fixedarray.h:20
A StringAtom.
Definition stringatom.h:22
Definition visibilitysystem.h:84
Math::vec3 center
Definition visibilitysystem.h:104
VisibilitySystem()
Constructor.
Definition visibilitysystem.cc:13
struct Visibility::VisibilitySystem::Entity ent
virtual void Run(const Threading::AtomicCounter *previousSystemCompletionCounters, const Util::FixedArray< const Threading::AtomicCounter *, true > &extraCounters)
run system
Definition visibilitysystem.cc:49
virtual void PrepareObservers(const Math::mat4 *transforms, bool *orthoFlags, Util::Array< Math::ClipStatus::Type > *results, const SizeT count)
setup observers
Definition visibilitysystem.cc:21
struct Visibility::VisibilitySystem::Observer obs
const Threading::AtomicCounter GetCompletionCounter(IndexT i) const
Return completion counter for an observer.
Definition visibilitysystem.cc:58
const Threading::AtomicCounter * GetCompletionCounters() const
Return completion counter for all observers.
Definition visibilitysystem.cc:67
Math::bbox boundingbox
Definition visibilitysystem.h:105
virtual void PrepareEntities(const Math::bbox *transforms, const uint32 *ranges, const Graphics::GraphicsEntityId *entities, const uint32_t *entityFlags, const SizeT count)
prepare system with entities to insert into the structure
Definition visibilitysystem.cc:36
volatile int AtomicCounter
Definition interlocked.h:19
Implements a resource loader for models.
Definition modelcontext.h:35
The graphics entity is only an Id, to which we can attach GraphicsContexts.
Definition graphicsentity.h:16
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 3D vector.
Definition vec3.h:40
A 4D vector.
Definition vec4.h:24
Definition visibilitysystem.h:53
Resources::ResourceName path
Definition visibilitysystem.h:54
Definition visibilitysystem.h:79
Definition visibilitysystem.h:63
uint width
Definition visibilitysystem.h:66
uint cellsZ
Definition visibilitysystem.h:65
uint height
Definition visibilitysystem.h:66
uint depth
Definition visibilitysystem.h:66
uint cellsY
Definition visibilitysystem.h:65
Math::vec4 pos
Definition visibilitysystem.h:67
uint cellsX
Definition visibilitysystem.h:65
bool worldExpanding
Definition visibilitysystem.h:64
Definition visibilitysystem.h:58
Resources::ResourceName path
Definition visibilitysystem.h:59
Definition visibilitysystem.h:71
uint width
Definition visibilitysystem.h:74
uint cellsY
Definition visibilitysystem.h:73
uint height
Definition visibilitysystem.h:74
bool worldExpanding
Definition visibilitysystem.h:72
uint cellsX
Definition visibilitysystem.h:73
Math::vec4 pos
Definition visibilitysystem.h:75
Definition visibilitysystem.h:117
const Math::bbox * boxes
Definition visibilitysystem.h:118
const uint32_t * entityFlags
Definition visibilitysystem.h:121
const Graphics::GraphicsEntityId * entities
Definition visibilitysystem.h:119
SizeT count
Definition visibilitysystem.h:122
const uint32 * ids
Definition visibilitysystem.h:120
Definition visibilitysystem.h:108
const bool * isOrtho
Definition visibilitysystem.h:110
const Math::mat4 * transforms
Definition visibilitysystem.h:109
SizeT count
Definition visibilitysystem.h:112
Util::Array< Math::ClipStatus::Type > * results
Definition visibilitysystem.h:111
Util::Array< Threading::AtomicCounter > completionCounters
Definition visibilitysystem.h:113
int SizeT
Definition types.h:49
unsigned int uint
Definition types.h:31
uint32_t uint32
Definition types.h:38
int IndexT
Definition types.h:48