MeshRenderableConfig Class
Fluent configuration for setting up a Renderable on a GameObject. More...
Declaration
Public Constructors Index
| MeshRenderableConfig (helios::engine::ecs::GameObject gameObject) | |
|
Constructs a MeshRenderableConfig for the given GameObject. More... | |
Public Member Functions Index
| MeshRenderableConfig & | shape (std::shared_ptr< helios::rendering::asset::shape::Shape > shape) |
|
Sets the shape geometry. More... | |
| MeshRenderableConfig & | shader (std::shared_ptr< helios::ext::opengl::rendering::shader::OpenGLShader > shader) |
|
Sets the shader program. More... | |
| MeshRenderableConfig & | primitiveType (helios::rendering::mesh::PrimitiveType primitiveType) |
|
Sets the primitive type for rendering. More... | |
| MeshRenderableConfig & | color (const helios::math::vec4f color) |
|
Sets the base color for the material. More... | |
| void | attachTo (helios::scene::SceneNode *parent) |
|
Builds the renderable and attaches it to a scene node. More... | |
| MeshRenderableConfig & | build () |
|
Builds and attaches the RenderableComponent. More... | |
Private Member Attributes Index
| helios::engine::ecs::GameObject | gameObject_ |
|
Non-owning pointer to the target GameObject. More... | |
| std::shared_ptr< helios::rendering::asset::shape::Shape > | shape_ |
|
The shape geometry to render. More... | |
| std::shared_ptr< helios::ext::opengl::rendering::shader::OpenGLShader > | shader_ |
|
The shader for rendering. More... | |
| helios::rendering::mesh::PrimitiveType | primitiveType_ |
|
The primitive type for mesh rendering. More... | |
| helios::math::vec4f | color_ |
|
The base color for the material. More... | |
Private Static Functions Index
| static std::shared_ptr< helios::rendering::mesh::MeshConfig > | meshConfig (helios::rendering::mesh::PrimitiveType primitiveType) |
Private Static Attributes Index
| static std::unordered_map< helios::rendering::mesh::PrimitiveType, std::shared_ptr< helios::rendering::mesh::MeshConfig > > | meshConfigs_ |
Description
Fluent configuration for setting up a Renderable on a GameObject.
Allows specification of shape, shader, primitive type, and color. Builds and attaches a RenderableComponent.
Definition at line 32 of file MeshRenderableConfig.ixx.
Public Constructors
MeshRenderableConfig()
| inline explicit |
Constructs a MeshRenderableConfig for the given GameObject.
- Parameters
-
<a href="/docs/helios/namespaces/helios/engine/builder/gameobject">gameObject</a> Target GameObject to configure.
Definition at line 81 of file MeshRenderableConfig.ixx.
Referenced by build, color, primitiveType, shader and shape.
Public Member Functions
attachTo()
| inline |
Builds the renderable and attaches it to a scene node.
- Parameters
-
parent Parent SceneNode for the new node.
Definition at line 142 of file MeshRenderableConfig.ixx.
References build and helios::engine::builder::gameObject::builders::configs::SceneNodeConfig::parent.
build()
| inline |
Builds and attaches the RenderableComponent.
- Returns
Reference to this config for chaining.
Definition at line 156 of file MeshRenderableConfig.ixx.
Reference MeshRenderableConfig.
Referenced by attachTo.
color()
| inline |
Sets the base color for the material.
- Parameters
-
color RGBA color vector.
- Returns
Reference to this config for chaining.
Definition at line 131 of file MeshRenderableConfig.ixx.
References color and MeshRenderableConfig.
Referenced by color.
primitiveType()
| inline |
Sets the primitive type for rendering.
- Parameters
-
primitiveType The OpenGL primitive type.
- Returns
Reference to this config for chaining.
Definition at line 118 of file MeshRenderableConfig.ixx.
References MeshRenderableConfig and primitiveType.
Referenced by primitiveType.
shader()
| inline |
Sets the shader program.
- Parameters
-
shader Shared pointer to the OpenGL shader.
- Returns
Reference to this config for chaining.
Definition at line 105 of file MeshRenderableConfig.ixx.
References MeshRenderableConfig and shader.
Referenced by shader.
shape()
| inline |
Sets the shape geometry.
- Parameters
-
shape Shared pointer to the shape.
- Returns
Reference to this config for chaining.
Definition at line 92 of file MeshRenderableConfig.ixx.
References MeshRenderableConfig and shape.
Referenced by shape.
Private Member Attributes
color_
|
The base color for the material.
Definition at line 57 of file MeshRenderableConfig.ixx.
gameObject_
|
Non-owning pointer to the target GameObject.
Definition at line 37 of file MeshRenderableConfig.ixx.
primitiveType_
|
The primitive type for mesh rendering.
Definition at line 52 of file MeshRenderableConfig.ixx.
shader_
|
The shader for rendering.
Definition at line 47 of file MeshRenderableConfig.ixx.
shape_
|
The shape geometry to render.
Definition at line 42 of file MeshRenderableConfig.ixx.
Private Static Functions
meshConfig()
| inline static |
Definition at line 64 of file MeshRenderableConfig.ixx.
Private Static Attributes
meshConfigs_
| static |
Definition at line 62 of file MeshRenderableConfig.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.