Cogs.Core
Static Public Member Functions | Public Attributes | List of all members
Cogs::Core::TwinVisualsComponent Class Reference

#include <TwinVisualsComponent.h>

Inheritance diagram for Cogs::Core::TwinVisualsComponent:
Cogs::ComponentModel::Component

Static Public Member Functions

static void registerType ()
 
- 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 biosphere
 
std::vector< WeakEntityPtrtexAtlases
 
TwinVisualsTexAtlasStyle texAtlasStyle = TwinVisualsTexAtlasStyle::Color
 
TwinVisualsMode mode = TwinVisualsMode::Balanced
 
TwinVisualsQualityPreset qualityPreset = TwinVisualsQualityPreset::Medium
 
TwinVisualsTonemapper tonemapper = TwinVisualsTonemapper::ACESLuminance
 
bool shadowsEnabled = true
 
TwinVisualsDynamicRenderResolution dynamicRenderResolution = TwinVisualsDynamicRenderResolution::FullQuality
 
bool useLowResolution = false
 
bool highlightRegionEnable = false
 
float brightness = 0.5f
 
bool groundPlaneEnabled = false
 
float groundOpaqueness = 0.f
 
float groundElevation = 0.f
 
glm::vec4 groundColor = glm::vec4(0.4, 0.4, 0.4, 1.0)
 
float hazeIntensity = 1.f
 
glm::vec3 hazeColor = glm::vec3(0.7, 0.7, 0.7)
 
bool gridEnable = false
 
float gridSpacingMaj = 100.f
 
float gridRotation = 0.f
 
glm::dvec2 gridOrigin = glm::dvec2(0.0)
 
glm::vec4 gridLineColorMaj = glm::vec4(1.f)
 
glm::vec4 gridLineColorMin = glm::vec4(1.f)
 
float gridLineWidthMaj = 1.5f
 
float gridLineWidthMin = 1.f
 
float gridFadeTweakMaj = 2.f
 
float gridFadeTweakMin = 2.f * 3.f
 

Additional Inherited Members

- 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 that control Kognitwin's visuals.

Definition at line 70 of file TwinVisualsComponent.h.

Member Function Documentation

◆ registerType()

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

Definition at line 7 of file TwinVisualsComponent.cpp.

Member Data Documentation

◆ biosphere

std::string Cogs::Core::TwinVisualsComponent::biosphere

Path to biosphere textures.

Definition at line 75 of file TwinVisualsComponent.h.

◆ brightness

float Cogs::Core::TwinVisualsComponent::brightness = 0.5f

Normalized brightness value in the range [0, 1]

Definition at line 105 of file TwinVisualsComponent.h.

◆ dynamicRenderResolution

TwinVisualsDynamicRenderResolution Cogs::Core::TwinVisualsComponent::dynamicRenderResolution = TwinVisualsDynamicRenderResolution::FullQuality

Dynamic render resolution preset

Definition at line 96 of file TwinVisualsComponent.h.

◆ gridEnable

bool Cogs::Core::TwinVisualsComponent::gridEnable = false

Enable/disable grid lines.

Definition at line 126 of file TwinVisualsComponent.h.

◆ gridFadeTweakMaj

float Cogs::Core::TwinVisualsComponent::gridFadeTweakMaj = 2.f

Tweak-knob for world-space size where major lines fades in.

Definition at line 150 of file TwinVisualsComponent.h.

◆ gridFadeTweakMin

float Cogs::Core::TwinVisualsComponent::gridFadeTweakMin = 2.f * 3.f

Tweak-knob for world-space size where minor lines fades in.

Definition at line 153 of file TwinVisualsComponent.h.

◆ gridLineColorMaj

glm::vec4 Cogs::Core::TwinVisualsComponent::gridLineColorMaj = glm::vec4(1.f)

Color of major grid line

Definition at line 138 of file TwinVisualsComponent.h.

◆ gridLineColorMin

glm::vec4 Cogs::Core::TwinVisualsComponent::gridLineColorMin = glm::vec4(1.f)

Color of minor grid lines

Definition at line 141 of file TwinVisualsComponent.h.

◆ gridLineWidthMaj

float Cogs::Core::TwinVisualsComponent::gridLineWidthMaj = 1.5f

Pixel width of major grid line.

Definition at line 144 of file TwinVisualsComponent.h.

◆ gridLineWidthMin

float Cogs::Core::TwinVisualsComponent::gridLineWidthMin = 1.f

Pixel width of minor grid line.

Definition at line 147 of file TwinVisualsComponent.h.

◆ gridOrigin

glm::dvec2 Cogs::Core::TwinVisualsComponent::gridOrigin = glm::dvec2(0.0)

Grid origin in world space.

Definition at line 135 of file TwinVisualsComponent.h.

◆ gridRotation

float Cogs::Core::TwinVisualsComponent::gridRotation = 0.f

Grid rotation in radians.

Definition at line 132 of file TwinVisualsComponent.h.

◆ gridSpacingMaj

float Cogs::Core::TwinVisualsComponent::gridSpacingMaj = 100.f

Spacing of major grid lines, minor is 1/10th of this

Definition at line 129 of file TwinVisualsComponent.h.

◆ groundColor

glm::vec4 Cogs::Core::TwinVisualsComponent::groundColor = glm::vec4(0.4, 0.4, 0.4, 1.0)

Color of ground plane.

Definition at line 117 of file TwinVisualsComponent.h.

◆ groundElevation

float Cogs::Core::TwinVisualsComponent::groundElevation = 0.f

Ground plane elevation

Definition at line 114 of file TwinVisualsComponent.h.

◆ groundOpaqueness

float Cogs::Core::TwinVisualsComponent::groundOpaqueness = 0.f

Visiblity of ground, in [0,1].

Definition at line 111 of file TwinVisualsComponent.h.

◆ groundPlaneEnabled

bool Cogs::Core::TwinVisualsComponent::groundPlaneEnabled = false

Visibility of ground plane.

Definition at line 108 of file TwinVisualsComponent.h.

◆ hazeColor

glm::vec3 Cogs::Core::TwinVisualsComponent::hazeColor = glm::vec3(0.7, 0.7, 0.7)

Color of haze

Definition at line 123 of file TwinVisualsComponent.h.

◆ hazeIntensity

float Cogs::Core::TwinVisualsComponent::hazeIntensity = 1.f

Controls intensity of haze, in [0,1]

Definition at line 120 of file TwinVisualsComponent.h.

◆ highlightRegionEnable

bool Cogs::Core::TwinVisualsComponent::highlightRegionEnable = false

Enable highlight regions. Set to true if scene can contain highlight regions.

Definition at line 102 of file TwinVisualsComponent.h.

◆ mode

TwinVisualsMode Cogs::Core::TwinVisualsComponent::mode = TwinVisualsMode::Balanced

Major mode

Definition at line 84 of file TwinVisualsComponent.h.

◆ qualityPreset

TwinVisualsQualityPreset Cogs::Core::TwinVisualsComponent::qualityPreset = TwinVisualsQualityPreset::Medium

Quality preset

Definition at line 87 of file TwinVisualsComponent.h.

◆ shadowsEnabled

bool Cogs::Core::TwinVisualsComponent::shadowsEnabled = true

Whether shadows are enabled.

Definition at line 93 of file TwinVisualsComponent.h.

◆ texAtlases

std::vector<WeakEntityPtr> Cogs::Core::TwinVisualsComponent::texAtlases

TexAtlas entities to apply during the TexAtlas render task.

Definition at line 78 of file TwinVisualsComponent.h.

◆ texAtlasStyle

TwinVisualsTexAtlasStyle Cogs::Core::TwinVisualsComponent::texAtlasStyle = TwinVisualsTexAtlasStyle::Color

Style used when coloring tex atlas overlays.

Definition at line 81 of file TwinVisualsComponent.h.

◆ tonemapper

TwinVisualsTonemapper Cogs::Core::TwinVisualsComponent::tonemapper = TwinVisualsTonemapper::ACESLuminance

Tonemapper to use in modes that support it.

Definition at line 90 of file TwinVisualsComponent.h.

◆ useLowResolution

bool Cogs::Core::TwinVisualsComponent::useLowResolution = false

Use the lower of the two render resolutions specified in the preset

Definition at line 99 of file TwinVisualsComponent.h.


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