![]() |
Blamite Game Engine - blam!
00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
|
Class representing a primitive-based world object. More...
#include <world.h>
Public Member Functions | |
BlamWorldObject_Primitive (Blam3DPrimitiveType _primitive_type, BlamWorldState *_world) | |
Creates a new primitive world object. More... | |
void | Render () |
Renders the object to the screen. More... | |
![]() | |
BlamWorldObject (BlamWorldState *_world, BlamWorldObjectType _type) | |
Creates a new world object. More... | |
Public Attributes | |
Blam3DPrimitiveType | primitive_type = Blam3DPrimitiveType::Cuboid |
The type of primitive this object represents. More... | |
float | radius_0 = 1.0f |
The radius of the primitive. Only used in cylinders. More... | |
float | radius_1 = 1.0f |
A secondary radius of the primitive. Only used in cylinders. More... | |
int | resolution = 5 |
The level of detail to use for the primitive. Only used in cylinders. More... | |
![]() | |
std::string | name = "unnamed" |
The unique name of this object. More... | |
std::string | description = "" |
An optional description of this object. More... | |
BlamWorldState * | world = nullptr |
The world state this object belongs to. More... | |
BlamVector3 | position = { 0, 0, 0 } |
The position of this object in world space. More... | |
BlamVector3 | rotation = { 0, 0, 0 } |
The rotation of this object in world space. More... | |
BlamVector3 | scale = { 1, 1, 1 } |
The scale/size of the object. More... | |
BlamWorldObjectType | type = BlamWorldObjectType::Unspecified |
The type of this world object. More... | |
Class representing a primitive-based world object.
Primitive world objects are simple world objects that render a generic 3D shape. These are currently planned to only be used for early testing and debugging, and will be eventually be replaced with tags once the proper tag classes are implemented.
For all possible primitive types, see Blam3DPrimitiveType.
BlamWorldObject_Primitive::BlamWorldObject_Primitive | ( | Blam3DPrimitiveType | _primitive_type, |
BlamWorldState * | _world | ||
) |
Creates a new primitive world object.
_tag_data | - The tag data that this object should represent. |
_world | - The world state this object should belong to. |
|
virtual |
Renders the object to the screen.
Reimplemented from BlamWorldObject.
Blam3DPrimitiveType BlamWorldObject_Primitive::primitive_type = Blam3DPrimitiveType::Cuboid |
The type of primitive this object represents.
float BlamWorldObject_Primitive::radius_0 = 1.0f |
The radius of the primitive. Only used in cylinders.
float BlamWorldObject_Primitive::radius_1 = 1.0f |
A secondary radius of the primitive. Only used in cylinders.
int BlamWorldObject_Primitive::resolution = 5 |
The level of detail to use for the primitive. Only used in cylinders.