|
Cogs.Core
|
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::shared_ptr< ComponentModel::Entity > | trajectory |
| The trajectory this component is connected to. | |
| std::vector< glm::vec2 > | profile |
| Extrusion profile in two component (radial, length). | |
| std::vector< float > | depths |
| Depth values for the profile. | |
| std::vector< float > | twist |
| Twist factors given by segment. | |
| std::vector< float > | morph |
| Morph factors applied per segment controlling the amount of regular/morph cross section to use. | |
| std::vector< glm::vec3 > | crossSection |
| Cross section shape. | |
| std::vector< glm::vec3 > | morphCrossSection |
| Morph target cross section. | |
| bool | useTwist = false |
| If twist factors should be applied. | |
| bool | useMorph = false |
| If morphing factors should be applied. | |
| bool | useOffset = true |
| If offsets are applied. | |
| float | angle = 0.0f |
| Angle to rotate the shape around the trajectory by. | |
| bool | enableRotation = false |
| If rotation should be enabled. | |
| bool | useSimpleRotation = true |
| If rotation should be applied uniformly to the entire shape (instead of per segment). | |
| float | depthOffset = 0.0f |
| Offset amount applied to the given profile depths before calculating the trajectory. | |
| float | radiusScale = 1.0f |
| Radius scale applied to the entire shape perpendicular to the direction of the trajectory. | |
| float | creaseAngle = 0.45f |
| Crease angle to use when smoothing normals. | |
| int | segmentCount = 32 |
| Number of segments per cross section. | |
| bool | closed = true |
| If the shape should be displayed closed. | |
| glm::vec2 | textureScale = glm::vec2(1, 1) |
| Scale factor to multiply generated texture coordinates by. | |
| glm::vec2 | textureOffset = glm::vec2(0, 0) |
| Offset in units to apply to generated texture coordinates. | |
Additional Inherited Members | |
Public Member Functions inherited from Cogs::ComponentModel::Component | |
| class Entity * | getContainer () 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 Component * | getComponent (const Reflection::Name &name) const |
| COGSFOUNDATION_API Component * | getComponent (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::Type & | getType () 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. | |
Definition at line 14 of file VariableExtrusionComponent.h.
|
static |
Definition at line 7 of file VariableExtrusionComponent.cpp.
| float Cogs::Core::VariableExtrusionComponent::angle = 0.0f |
Angle to rotate the shape around the trajectory by.
Definition at line 31 of file VariableExtrusionComponent.h.
| bool Cogs::Core::VariableExtrusionComponent::closed = true |
If the shape should be displayed closed.
Definition at line 43 of file VariableExtrusionComponent.h.
| float Cogs::Core::VariableExtrusionComponent::creaseAngle = 0.45f |
Crease angle to use when smoothing normals.
Any angle above the given will create a crease.
Definition at line 39 of file VariableExtrusionComponent.h.
| std::vector<glm::vec3> Cogs::Core::VariableExtrusionComponent::crossSection |
Cross section shape.
Definition at line 24 of file VariableExtrusionComponent.h.
| float Cogs::Core::VariableExtrusionComponent::depthOffset = 0.0f |
Offset amount applied to the given profile depths before calculating the trajectory.
Definition at line 36 of file VariableExtrusionComponent.h.
| std::vector<float> Cogs::Core::VariableExtrusionComponent::depths |
Depth values for the profile.
Definition at line 19 of file VariableExtrusionComponent.h.
| bool Cogs::Core::VariableExtrusionComponent::enableRotation = false |
If rotation should be enabled.
Definition at line 32 of file VariableExtrusionComponent.h.
| std::vector<float> Cogs::Core::VariableExtrusionComponent::morph |
Morph factors applied per segment controlling the amount of regular/morph cross section to use.
Definition at line 22 of file VariableExtrusionComponent.h.
| std::vector<glm::vec3> Cogs::Core::VariableExtrusionComponent::morphCrossSection |
Morph target cross section.
Definition at line 25 of file VariableExtrusionComponent.h.
| std::vector<glm::vec2> Cogs::Core::VariableExtrusionComponent::profile |
Extrusion profile in two component (radial, length).
Definition at line 18 of file VariableExtrusionComponent.h.
| float Cogs::Core::VariableExtrusionComponent::radiusScale = 1.0f |
Radius scale applied to the entire shape perpendicular to the direction of the trajectory.
Definition at line 37 of file VariableExtrusionComponent.h.
Referenced by Cogs::Core::RiserTelescopicJointComponent::updateArm(), Cogs::Core::RiserTelescopicJointComponent::updateBody(), and Cogs::Core::RiserTelescopicJointComponent::updateTop().
| int Cogs::Core::VariableExtrusionComponent::segmentCount = 32 |
Number of segments per cross section.
Definition at line 41 of file VariableExtrusionComponent.h.
| glm::vec2 Cogs::Core::VariableExtrusionComponent::textureOffset = glm::vec2(0, 0) |
Offset in units to apply to generated texture coordinates.
Definition at line 46 of file VariableExtrusionComponent.h.
| glm::vec2 Cogs::Core::VariableExtrusionComponent::textureScale = glm::vec2(1, 1) |
Scale factor to multiply generated texture coordinates by.
Definition at line 45 of file VariableExtrusionComponent.h.
| std::shared_ptr<ComponentModel::Entity> Cogs::Core::VariableExtrusionComponent::trajectory |
The trajectory this component is connected to.
Definition at line 16 of file VariableExtrusionComponent.h.
| std::vector<float> Cogs::Core::VariableExtrusionComponent::twist |
Twist factors given by segment.
Definition at line 21 of file VariableExtrusionComponent.h.
| bool Cogs::Core::VariableExtrusionComponent::useMorph = false |
If morphing factors should be applied.
Definition at line 28 of file VariableExtrusionComponent.h.
| bool Cogs::Core::VariableExtrusionComponent::useOffset = true |
If offsets are applied.
Definition at line 29 of file VariableExtrusionComponent.h.
| bool Cogs::Core::VariableExtrusionComponent::useSimpleRotation = true |
If rotation should be applied uniformly to the entire shape (instead of per segment).
Definition at line 34 of file VariableExtrusionComponent.h.
| bool Cogs::Core::VariableExtrusionComponent::useTwist = false |
If twist factors should be applied.
Definition at line 27 of file VariableExtrusionComponent.h.