Cogs.Core
Static Public Member Functions | Public Attributes | List of all members
Cogs::Core::PotreeComponent Struct Reference

Component for Point Cloud Display. More...

#include <PotreeComponent.h>

Inheritance diagram for Cogs::Core::PotreeComponent:
Cogs::Core::RenderComponent Cogs::ComponentModel::Component

Static Public Member Functions

static void registerType ()
 
- Static Public Member Functions inherited from Cogs::Core::RenderComponent
static void registerType ()
 Register the type in the type system.
 
- Static Public Member Functions inherited from Cogs::ComponentModel::Component
static COGSFOUNDATION_API void registerType ()
 Register the Component type in the global type database.
 
static COGSFOUNDATION_API Reflection::TypeId getComponentTypeId (const StringView &name)
 Get the type id of the component type with the given name.
 

Public Attributes

std::string source
 URL of path where metadata.js(OLD format: cloud.js) resides.
 
std::vector< glm::vec4 > clipPlanes
 Deprecated, use clip shapes instead.
 
TextureHandle gradient
 Optional gradient texture to colorize scalar values.
 
MaterialInstanceHandle pointMaterial
 Optional point material override, material should inherit from PotreePointCore.material.
 
MaterialInstanceHandle boxMaterial
 Optional debug material override, material should inherit from PotreeBoxCore.material.
 
float pointScreenSpacing = 2.f
 Maximal screen space distance between points before refining, gets adjusted by DPI scaling.
 
float rootNodeMinScreenSize = 10.f
 Minimal screen-space size root node can have before being eligble for distance-based culling.
 
float pointSize = 20.f
 Base point size in pixels, gets DPI scaled.
 
float minPointSize = 1.f
 Minimum point size in pixels regardless of point size strategy, gets DPI scaled.
 
float maxPointSize = 150.f
 Maximum point size in pixels regardless of point size strategy, gets DPI scaled.
 
float densityLevelScale = 0.7f
 DistanceAndDensityScaled: Strength of level depth in point size calc.
 
float densityScale = 3.f
 DistanceAndDensityScaled: Strength of local point density in point size calc.
 
float densityBias = 0.f
 DistanceAndDensityScaled: Offset where depth and density starts to affectg point size calc.
 
float shadingIntensity = 1.f
 Intensity of point shading effect, if enabled.
 
glm::vec4 baseColor = glm::vec4(0.5f, 0.5f, 0.5f, 1.0f)
 Base color to use when Base coloring strategy is used.
 
glm::vec3 outlineColor = glm::vec3(0.f, 0.f, 0.f)
 Color of point outlines if enabled.
 
float outlineSize = 1.f
 Size of point outlines, set to 0.0 to disable point outlines.
 
float distanceCutoffScale = 5.f
 Cut off chunks that are further away than camera elevation above pointcloud z - minimum times this scale value.Default Value is 5.
 
float distanceCutoffMinimum = -1.f
 Minimum value for distance-based cut-off, cut-off distance will never be less than this value.
 
PotreeOriginPolicy originPolicy = PotreeOriginPolicy::None
 Specify origin policy, see enum for details.
 
PotreeColoring coloring = PotreeColoring::Intensity
 Specify coloring strategy.
 
PotreeShading shading = PotreeShading::Basic
 Specify optional shading.
 
PotreePointShape pointShape = PotreePointShape::Paraboloid
 Specify point shape.
 
PotreePointSizing pointSizing = PotreePointSizing::DistanceAndDensityScaled
 Specify point sizing strategy.
 
PotreeDebugBoxes debugBoxes = PotreeDebugBoxes::None
 Specify optional debug graphics.
 
bool supportPicking = true
 If true, an extra CPU side copy of the point positions are maintained to enable CPU picking.
 
bool disableLodUpdates = false
 Debug trigger to disable update of lod calculations.
 
bool disableCustomCulling = false
 Debug switch to disable culling of cells against custom clipping planes.
 
bool disableCustomClipping = false
 Debug switch to disable clipping of points against custom clipping planes.
 
- Public Attributes inherited from Cogs::Core::RenderComponent
struct Cogs::Core::RenderComponent::LodData lod
 
RenderLayers layer = RenderLayers::Default
 Layer mask used to determine visibility for a given camera viewport.
 
int32_t drawOrder = 0
 Draw order within a render bucke.
 
RenderFlags renderFlags = RenderFlags::Default
 Render flags used to control rendering behavior.
 
uint32_t objectId = NoObjectId
 Object identifier passed to rendering commands.
 
ComponentModel::ComponentHandle clipShapeComponent = ComponentModel::ComponentHandle::Empty()
 Handle to the currently active clip component, if any.
 

Additional Inherited Members

- Public Member Functions inherited from Cogs::Core::RenderComponent
constexpr void setRenderFlag (RenderFlags flag)
 Sets the given flag.
 
constexpr void setRenderFlag (RenderFlags flag, bool status)
 Set the given flag to the given status.
 
constexpr void unsetRenderFlag (RenderFlags flag)
 Unset the given flag.
 
constexpr bool isRenderFlagSet (RenderFlags flag) const
 Check if the given flag is currently set.
 
constexpr bool isRenderFlagsSet (RenderFlags flags) const
 Check if the given combination of flags are set.
 
constexpr void setVisible (bool visible)
 Set the specific visibility.
 
constexpr bool isVisibleInLayer (RenderLayers layerMask) const
 Check if the entity should be visible in the given layer mask.
 
constexpr bool isVisible () const
 Check if the entity is visible or not.
 
constexpr bool isPickable () const
 Check if the entity is pickable or not.
 
constexpr bool castShadows () const
 Get if the object should cast shadows.
 
constexpr bool disableCulling () const
 Get if the object should skip culling.
 
constexpr bool customMaterial () const
 
- Public Member Functions inherited from Cogs::ComponentModel::Component
class EntitygetContainer () const
 Get the container currently owning this component instance.
 
void setContainer (class Entity *container)
 Set the container owning this component instance.
 
template<typename ComponentType >
ComponentType * getComponent () const
 
COGSFOUNDATION_API ComponentgetComponent (const Reflection::Name &name) const
 
COGSFOUNDATION_API ComponentgetComponent (const Reflection::TypeId &id) const
 
template<typename ComponentType >
ComponentHandle getComponentHandle () const
 
COGSFOUNDATION_API ComponentHandle getComponentHandle (const Reflection::Name &name) const
 
COGSFOUNDATION_API ComponentHandle getComponentHandle (const Reflection::TypeId &id) const
 
void setActive ()
 Sets the component to the ComponentFlags::Active state.
 
bool isActive () const
 Gets if the component is currently set to the ComponentFlags::Active state.
 
void setChanged ()
 Sets the component to the ComponentFlags::Changed state with carry.
 
void setChangedTransient ()
 Sets the component to the ComponentFlags::Changed state without carry.
 
void setFieldChanged (const Reflection::FieldId fieldId)
 Sets the component to the ComponentFlags::Changed state without carry.
 
template<typename ClassType , typename FieldType >
void setFieldChanged (FieldType ClassType::*field)
 Sets a flag indicating that the given field has changed.
 
void setFieldChangedTransient (const Reflection::FieldId fieldId)
 Sets the component to the ComponentFlags::Changed state without carry.
 
bool hasChanged () const
 
bool hasAnyfieldChanged () const
 Gets if any fields have been changed.
 
bool hasFieldChanged (const Reflection::FieldId fieldId) const
 Gets if the field with the given id on this component instance has changed.
 
template<typename ClassType , typename FieldType >
bool hasFieldChanged (FieldType ClassType::*field) const
 Gets if the given field has changed.
 
void resetCarryChanged ()
 Reset the CarryChanged flag. Called at start of redraw. See ComponentFlags::CarryChanged.
 
void resetChanged ()
 Resets the changed state of the component, respecting any carry state set.
 
template<typename ClassType , typename FieldType >
Reflection::FieldId getFieldId (FieldType ClassType::*field) const
 Gets field ID of the given field.
 
void resetFieldsChanged ()
 Resets the state of all changed field flags.
 
void resetFieldChanged (const Reflection::FieldId fieldId)
 Resets the changed state of the given fieldId.
 
template<typename ClassType , typename FieldType >
void resetFieldChanged (FieldType ClassType::*field)
 Resets the changed state of the given field.
 
constexpr void setFlags (const uint32_t flags)
 Override all flags of the Component, setting the given flags.
 
constexpr void setFlag (const uint32_t flag)
 Set the given flags. Does not override the currently set flags.
 
constexpr void unsetFlag (const uint32_t flag)
 Unset the given flag. Does not remove the status of other than the given flags.
 
constexpr bool isSet (const uint32_t flag) const
 Checks if the given flag is set. Requires exact bit match if test of several bits.
 
constexpr void setTypeId (const Reflection::TypeId typeId)
 Set the Reflection::TypeId of the component.
 
constexpr Reflection::TypeId getTypeId () const
 Get the Reflection::TypeId of the component.
 
COGSFOUNDATION_API const Reflection::TypegetType () const
 Get the full Reflection::Type of the component.
 
constexpr void setIndex (const ComponentIndex index)
 Set the components pool index. For internal use only.
 
constexpr ComponentIndex getIndex () const
 Get the components pool index. For internal use only.
 
constexpr void setGeneration (uint16_t generation)
 Sets the component generation.
 
constexpr uint16_t getGeneration () const
 Gets the component generation.
 
size_t hash (size_t hashValue=Cogs::hash()) const
 Calculates a hash of this component's members.
 

Detailed Description

Component for Point Cloud Display.

The component uses several Cogs variables to control the display. See [\List of COGS variables](CogsVariableList), PoTree section, for detailed information about all COGS variables available at runtime that are connected to Point Cloud.

Definition at line 73 of file PotreeComponent.h.

Constructor & Destructor Documentation

◆ PotreeComponent()

Cogs::Core::PotreeComponent::PotreeComponent ( )
inline

Definition at line 75 of file PotreeComponent.h.

Member Function Documentation

◆ registerType()

void Cogs::Core::PotreeComponent::registerType ( )
static

Definition at line 9 of file PotreeComponent.cpp.

Member Data Documentation

◆ baseColor

glm::vec4 Cogs::Core::PotreeComponent::baseColor = glm::vec4(0.5f, 0.5f, 0.5f, 1.0f)

Base color to use when Base coloring strategy is used.

Definition at line 92 of file PotreeComponent.h.

◆ boxMaterial

MaterialInstanceHandle Cogs::Core::PotreeComponent::boxMaterial

Optional debug material override, material should inherit from PotreeBoxCore.material.

Definition at line 81 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ clipPlanes

std::vector<glm::vec4> Cogs::Core::PotreeComponent::clipPlanes

Deprecated, use clip shapes instead.

Up to 6 user-defined world-space clip planes, positive half-space is kept.

Definition at line 78 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ coloring

PotreeColoring Cogs::Core::PotreeComponent::coloring = PotreeColoring::Intensity

Specify coloring strategy.

Definition at line 100 of file PotreeComponent.h.

◆ debugBoxes

PotreeDebugBoxes Cogs::Core::PotreeComponent::debugBoxes = PotreeDebugBoxes::None

Specify optional debug graphics.

Definition at line 104 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ densityBias

float Cogs::Core::PotreeComponent::densityBias = 0.f

DistanceAndDensityScaled: Offset where depth and density starts to affectg point size calc.

Definition at line 89 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ densityLevelScale

float Cogs::Core::PotreeComponent::densityLevelScale = 0.7f

DistanceAndDensityScaled: Strength of level depth in point size calc.

Definition at line 87 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ densityScale

float Cogs::Core::PotreeComponent::densityScale = 3.f

DistanceAndDensityScaled: Strength of local point density in point size calc.

Definition at line 88 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ disableCustomClipping

bool Cogs::Core::PotreeComponent::disableCustomClipping = false

Debug switch to disable clipping of points against custom clipping planes.

Definition at line 109 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ disableCustomCulling

bool Cogs::Core::PotreeComponent::disableCustomCulling = false

Debug switch to disable culling of cells against custom clipping planes.

Definition at line 108 of file PotreeComponent.h.

◆ disableLodUpdates

bool Cogs::Core::PotreeComponent::disableLodUpdates = false

Debug trigger to disable update of lod calculations.

Definition at line 107 of file PotreeComponent.h.

◆ distanceCutoffMinimum

float Cogs::Core::PotreeComponent::distanceCutoffMinimum = -1.f

Minimum value for distance-based cut-off, cut-off distance will never be less than this value.

Set to negative to disable distance-based cutoff.

Definition at line 97 of file PotreeComponent.h.

◆ distanceCutoffScale

float Cogs::Core::PotreeComponent::distanceCutoffScale = 5.f

Cut off chunks that are further away than camera elevation above pointcloud z - minimum times this scale value.Default Value is 5.

Definition at line 96 of file PotreeComponent.h.

◆ gradient

TextureHandle Cogs::Core::PotreeComponent::gradient

Optional gradient texture to colorize scalar values.

Definition at line 79 of file PotreeComponent.h.

◆ maxPointSize

float Cogs::Core::PotreeComponent::maxPointSize = 150.f

Maximum point size in pixels regardless of point size strategy, gets DPI scaled.

Definition at line 86 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ minPointSize

float Cogs::Core::PotreeComponent::minPointSize = 1.f

Minimum point size in pixels regardless of point size strategy, gets DPI scaled.

Definition at line 85 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ originPolicy

PotreeOriginPolicy Cogs::Core::PotreeComponent::originPolicy = PotreeOriginPolicy::None

Specify origin policy, see enum for details.

Definition at line 99 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::preUpdate().

◆ outlineColor

glm::vec3 Cogs::Core::PotreeComponent::outlineColor = glm::vec3(0.f, 0.f, 0.f)

Color of point outlines if enabled.

Definition at line 93 of file PotreeComponent.h.

◆ outlineSize

float Cogs::Core::PotreeComponent::outlineSize = 1.f

Size of point outlines, set to 0.0 to disable point outlines.

Definition at line 94 of file PotreeComponent.h.

◆ pointMaterial

MaterialInstanceHandle Cogs::Core::PotreeComponent::pointMaterial

Optional point material override, material should inherit from PotreePointCore.material.

Definition at line 80 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ pointScreenSpacing

float Cogs::Core::PotreeComponent::pointScreenSpacing = 2.f

Maximal screen space distance between points before refining, gets adjusted by DPI scaling.

Definition at line 82 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ pointShape

PotreePointShape Cogs::Core::PotreeComponent::pointShape = PotreePointShape::Paraboloid

Specify point shape.

Definition at line 102 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreePicker::pickCamera(), and Cogs::Core::PotreePicker::pickRay().

◆ pointSize

float Cogs::Core::PotreeComponent::pointSize = 20.f

Base point size in pixels, gets DPI scaled.

Definition at line 84 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ pointSizing

PotreePointSizing Cogs::Core::PotreeComponent::pointSizing = PotreePointSizing::DistanceAndDensityScaled

Specify point sizing strategy.

Definition at line 103 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreePicker::pickCamera(), and Cogs::Core::PotreePicker::pickRay().

◆ rootNodeMinScreenSize

float Cogs::Core::PotreeComponent::rootNodeMinScreenSize = 10.f

Minimal screen-space size root node can have before being eligble for distance-based culling.

Definition at line 83 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ shading

PotreeShading Cogs::Core::PotreeComponent::shading = PotreeShading::Basic

Specify optional shading.

Definition at line 101 of file PotreeComponent.h.

◆ shadingIntensity

float Cogs::Core::PotreeComponent::shadingIntensity = 1.f

Intensity of point shading effect, if enabled.

Definition at line 90 of file PotreeComponent.h.

◆ source

std::string Cogs::Core::PotreeComponent::source

URL of path where metadata.js(OLD format: cloud.js) resides.

Definition at line 77 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreeSystem::update().

◆ supportPicking

bool Cogs::Core::PotreeComponent::supportPicking = true

If true, an extra CPU side copy of the point positions are maintained to enable CPU picking.

Definition at line 106 of file PotreeComponent.h.

Referenced by Cogs::Core::PotreePicker::pickCamera(), Cogs::Core::PotreePicker::pickRay(), and Cogs::Core::PotreeSystem::update().


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