Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::SceneRenderState Class Reference

#include <SceneState.h>

+ Inheritance diagram for Divide::SceneRenderState:

Public Types

enum class  RenderOptions : U16 {
  RENDER_AABB = toBit(1) , RENDER_OBB = toBit(2) , RENDER_BSPHERES = toBit(3) , RENDER_CUSTOM_PRIMITIVES = toBit(4) ,
  RENDER_GEOMETRY = toBit(5) , RENDER_SKELETONS = toBit(6) , RENDER_WIREFRAME = toBit(7) , SELECTION_GIZMO = toBit(8) ,
  ALL_GIZMOS = toBit(9) , COUNT = 9
}
 

Public Member Functions

 SceneRenderState (Scene &parentScene) noexcept
 
void renderMask (U16 mask)
 
void enableOption (RenderOptions option) noexcept
 
void disableOption (RenderOptions option) noexcept
 
void toggleOption (RenderOptions option) noexcept
 
void toggleOption (RenderOptions option, bool state) noexcept
 
bool isEnabledOption (RenderOptions option) const noexcept
 
 PROPERTY_RW (F32, generalVisibility, 1000.0f)
 
 PROPERTY_RW (F32, grassVisibility, 1000.0f)
 
 PROPERTY_RW (F32, treeVisibility, 1000.0f)
 
 PROPERTY_RW (U8, renderPass, 0u)
 
 PROPERTY_RW (FogDetails, fogDetails)
 
 PROPERTY_RW (I64, singleNodeRenderGUID, -1)
 
vec4< U16 > & lodThresholds () noexcept
 
vec4< U16lodThresholds (RenderStage stage=RenderStage::DISPLAY) const noexcept
 
- Public Member Functions inherited from Divide::SceneComponent
 SceneComponent (Scene &parentScene) noexcept
 
SceneparentScene () noexcept
 
const SceneparentScene () const noexcept
 

Protected Attributes

vec4< U16_lodThresholds
 
U16 _stateMask = 0u
 
- Protected Attributes inherited from Divide::SceneComponent
Scene_parentScene
 

Detailed Description

Contains all the information needed to render the scene: camera position, render state, etc

Definition at line 86 of file SceneState.h.

Member Enumeration Documentation

◆ RenderOptions

Enumerator
RENDER_AABB 

Show/hide axis aligned bounding boxes.

RENDER_OBB 

Show/hide oriented bounding boxes.

RENDER_BSPHERES 

Show/hide bounding spheres.

RENDER_CUSTOM_PRIMITIVES 

Show/hide custom IMPrimitive elements.

RENDER_GEOMETRY 

Show/hide geometry.

RENDER_SKELETONS 

Render skeletons for animated geometry.

RENDER_WIREFRAME 

Render wireframe for all scene geometry.

SELECTION_GIZMO 
ALL_GIZMOS 
COUNT 

Definition at line 88 of file SceneState.h.

Constructor & Destructor Documentation

◆ SceneRenderState()

Divide::SceneRenderState::SceneRenderState ( Scene parentScene)
explicitnoexcept

Definition at line 35 of file SceneState.cpp.

Member Function Documentation

◆ disableOption()

void Divide::SceneRenderState::disableOption ( RenderOptions  option)
noexcept

Definition at line 84 of file SceneState.cpp.

◆ enableOption()

void Divide::SceneRenderState::enableOption ( RenderOptions  option)
noexcept

Definition at line 79 of file SceneState.cpp.

◆ isEnabledOption()

bool Divide::SceneRenderState::isEnabledOption ( RenderOptions  option) const
noexcept

Definition at line 74 of file SceneState.cpp.

◆ lodThresholds() [1/2]

vec4< U16 > & Divide::SceneRenderState::lodThresholds ( )
inlinenoexcept

Definition at line 123 of file SceneState.h.

◆ lodThresholds() [2/2]

vec4< U16 > Divide::SceneRenderState::lodThresholds ( RenderStage  stage = RenderStage::DISPLAY) const
noexcept

Definition at line 106 of file SceneState.cpp.

◆ PROPERTY_RW() [1/6]

Divide::SceneRenderState::PROPERTY_RW ( F32  ,
generalVisibility  ,
1000.  0f 
)

◆ PROPERTY_RW() [2/6]

Divide::SceneRenderState::PROPERTY_RW ( F32  ,
grassVisibility  ,
1000.  0f 
)

◆ PROPERTY_RW() [3/6]

Divide::SceneRenderState::PROPERTY_RW ( F32  ,
treeVisibility  ,
1000.  0f 
)

◆ PROPERTY_RW() [4/6]

Divide::SceneRenderState::PROPERTY_RW ( FogDetails  ,
fogDetails   
)

◆ PROPERTY_RW() [5/6]

Divide::SceneRenderState::PROPERTY_RW ( I64  ,
singleNodeRenderGUID  ,
1 
)

◆ PROPERTY_RW() [6/6]

Divide::SceneRenderState::PROPERTY_RW ( U8  ,
renderPass  ,
0u   
)

◆ renderMask()

void Divide::SceneRenderState::renderMask ( U16  mask)

Definition at line 42 of file SceneState.cpp.

◆ toggleOption() [1/2]

void Divide::SceneRenderState::toggleOption ( RenderOptions  option)
noexcept

Definition at line 89 of file SceneState.cpp.

◆ toggleOption() [2/2]

void Divide::SceneRenderState::toggleOption ( RenderOptions  option,
bool  state 
)
noexcept

Definition at line 94 of file SceneState.cpp.

Member Data Documentation

◆ _lodThresholds

vec4<U16> Divide::SceneRenderState::_lodThresholds
protected

Definition at line 127 of file SceneState.h.

◆ _stateMask

U16 Divide::SceneRenderState::_stateMask = 0u
protected

Definition at line 128 of file SceneState.h.


The documentation for this class was generated from the following files: