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

UV-mapped sphere primitive renderer. More...

#include <visuals/Primitive.hpp>

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

Public Member Functions

 UVSpherePrimitive (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 UV sphere primitive.
 
 UVSpherePrimitive (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.
 
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

UV-mapped sphere primitive renderer.

Renders a sphere using UV mapping for textures. Can use smooth or flat shading.

Constructor & Destructor Documentation

◆ UVSpherePrimitive() [1/2]

StevEngine::Visuals::UVSpherePrimitive::UVSpherePrimitive ( 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 UV sphere primitive.

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

◆ UVSpherePrimitive() [2/2]

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

Create cube from serialized data.

Parameters
streamStream containing serialized component data

Member Function Documentation

◆ Export()

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