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

Cube primitive renderer. More...

#include <visuals/Primitive.hpp>

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

Public Member Functions

 CubePrimitive (Utilities::Vector3 position=Utilities::Vector3(), Utilities::Quaternion rotation=Utilities::Quaternion(), Utilities::Vector3 scale=Utilities::Vector3(1), const Material &material=Material(), TextureType textureType=REPEAT, Renderer::RenderType renderType=Renderer::SOLID)
 Create cube primitive.
 
 CubePrimitive (Utilities::Stream &stream)
 Create cube 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.
 
virtual void Deactivate ()
 Clean up when component is deactivated.
 
virtual void Update (double deltaTime)
 Update component logic.
 

Public Attributes

const Visuals::TextureType textureType
 Texture mapping mode.
 
- 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

Cube primitive renderer.

Renders a textured cube with six faces. Supports different texture mapping modes.

Constructor & Destructor Documentation

◆ CubePrimitive() [1/2]

StevEngine::Visuals::CubePrimitive::CubePrimitive ( Utilities::Vector3 position = Utilities::Vector3(),
Utilities::Quaternion rotation = Utilities::Quaternion(),
Utilities::Vector3 scale = Utilities::Vector3(1),
const Material & material = Material(),
TextureType textureType = REPEAT,
Renderer::RenderType renderType = Renderer::SOLID )

Create cube primitive.

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

◆ CubePrimitive() [2/2]

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

Create cube from serialized data.

Parameters
streamStream containing serialized component data

Member Function Documentation

◆ Export()

Utilities::Stream StevEngine::Visuals::CubePrimitive::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::CubePrimitive::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: