StevEngine
StevEngine is a customizable C++ game engine.
Loading...
Searching...
No Matches
StevEngine::Visuals::CapsulePrimitive Class Reference

Capsule primitive renderer. More...

#include <visuals/Primitive.hpp>

Inheritance diagram for StevEngine::Visuals::CapsulePrimitive:
StevEngine::Renderer::RenderComponent StevEngine::Component

Public Member Functions

 CapsulePrimitive (Utilities::Vector3 position=Utilities::Vector3(), Utilities::Quaternion rotation=Utilities::Quaternion(), Utilities::Vector3 scale=Utilities::Vector3(1), Material material=Material(), bool smooth=true, TextureType textureType=COVER, Renderer::RenderType renderType=Renderer::SOLID)
 Create capsule primitive.
 
 CapsulePrimitive (Utilities::Stream &stream)
 Create capsule from serialized data.
 
std::string GetType () const
 Get component type.
 
Utilities::Stream Export (Utilities::StreamType type) const
 Serialize component to a stream.
 
- Public Member Functions inherited from StevEngine::Renderer::RenderComponent
 RenderComponent (const Object &object)
 Create render component.
 
 RenderComponent (const Object &object, Utilities::Vector3 position, Utilities::Quaternion rotation, Utilities::Vector3 scale)
 Create render component with transform.
 
 RenderComponent (const Object &object, Utilities::Stream &stream)
 Create from serialized data.
 
ObjectGetObject ()
 Local scale modifier.
 
Visuals::MaterialGetMaterial ()
 Get material.
 
void AddShader (ShaderProgram program)
 Add shader program.
 
void RemoveShader (ShaderType type)
 Remove shader of specified type.
 
 ~RenderComponent ()
 Clean up component resources.
 
- Public Member Functions inherited from StevEngine::Component
 Component ()
 Create new component.
 
virtual ~Component ()
 Clean up component resources.
 
GameObjectGetParent () const
 Get parent GameObject.
 
SceneGetScene () const
 Get containing Scene.
 
virtual void Start ()
 Initialize component after creation.
 

Public Attributes

const Visuals::TextureType textureType
 Texture mapping mode.
 
const bool smooth
 Whether to use smooth shading.
 
- Public Attributes inherited from StevEngine::Renderer::RenderComponent
Utilities::Vector3 position = Utilities::Vector3()
 
Utilities::Quaternion rotation = Utilities::Quaternion()
 Local position offset.
 
Utilities::Vector3 scale = Utilities::Vector3(1, 1, 1)
 Local rotation offset.
 

Additional Inherited Members

- Protected Attributes inherited from StevEngine::Renderer::RenderComponent
Object object
 Renderable object.
 
std::map< ShaderType, ShaderProgramshaders
 Shader programs by type.
 
- Protected Attributes inherited from StevEngine::Component
std::vector< std::pair< Utilities::ID, std::string > > handlers
 Event handler registrations.
 

Detailed Description

Capsule primitive renderer.

Renders a capsule (cylinder with spherical ends). Supports smooth or flat shading.

Constructor & Destructor Documentation

◆ CapsulePrimitive() [1/2]

StevEngine::Visuals::CapsulePrimitive::CapsulePrimitive ( Utilities::Vector3 position = Utilities::Vector3(),
Utilities::Quaternion rotation = Utilities::Quaternion(),
Utilities::Vector3 scale = Utilities::Vector3(1),
Material material = Material(),
bool smooth = true,
TextureType textureType = COVER,
Renderer::RenderType renderType = Renderer::SOLID )

Create capsule primitive.

Parameters
positionLocal position offset
rotationLocal rotation offset
scaleLocal scale modifier
materialSurface material
smoothUse smooth shading
textureTypeTexture mapping mode
renderTypeObject rendering mode

◆ CapsulePrimitive() [2/2]

StevEngine::Visuals::CapsulePrimitive::CapsulePrimitive ( Utilities::Stream & stream)

Create capsule from serialized data.

Parameters
streamStream containing serialized component data

Member Function Documentation

◆ Export()

Utilities::Stream StevEngine::Visuals::CapsulePrimitive::Export ( Utilities::StreamType type) const
virtual

Serialize component to a stream.

Parameters
typeType of stream to export to
Returns
Serialized stream

Reimplemented from StevEngine::Renderer::RenderComponent.

◆ GetType()

std::string StevEngine::Visuals::CapsulePrimitive::GetType ( ) const
inlinevirtual

Get component type.

Returns
Type identifier string

Reimplemented from StevEngine::Renderer::RenderComponent.


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