StevEngine
StevEngine is a customizable C++ game engine.
|
UV-mapped sphere primitive renderer. More...
#include <visuals/Primitive.hpp>
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. | |
![]() | |
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. | |
Object & | GetObject () |
Local scale modifier. | |
Visuals::Material & | GetMaterial () |
Get material. | |
void | AddShader (ShaderProgram program) |
Add shader program. | |
void | RemoveShader (ShaderType type) |
Remove shader of specified type. | |
~RenderComponent () | |
Clean up component resources. | |
![]() | |
Component () | |
Create new component. | |
virtual | ~Component () |
Clean up component resources. | |
GameObject & | GetParent () const |
Get parent GameObject. | |
Scene & | GetScene () 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. | |
![]() | |
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 | |
![]() | |
Object | object |
Renderable object. | |
std::map< ShaderType, ShaderProgram > | shaders |
Shader programs by type. | |
![]() | |
std::vector< std::pair< Utilities::ID, std::string > > | handlers |
Event handler registrations. | |
UV-mapped sphere primitive renderer.
Renders a sphere using UV mapping for textures. Can use smooth or flat shading.
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.
position | Local position offset |
rotation | Local rotation offset |
scale | Local scale modifier |
material | Surface material |
smooth | Use smooth shading |
textureType | Texture mapping mode |
renderType | Object rendering mode |
StevEngine::Visuals::UVSpherePrimitive::UVSpherePrimitive | ( | Utilities::Stream & | stream | ) |
Create cube from serialized data.
stream | Stream containing serialized component data |
|
virtual |
Serialize component to a stream.
type | Type of stream to export to |
Reimplemented from StevEngine::Renderer::RenderComponent.
|
inlinevirtual |
Get component type.
Reimplemented from StevEngine::Renderer::RenderComponent.