Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.blamite
The core library for the Blamite Game Engine.
BlamWorldObject_Primitive Class Reference

Class representing a primitive-based world object. More...

#include <world.h>

+ Inheritance diagram for BlamWorldObject_Primitive:

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...
 
- Public Member Functions inherited from BlamWorldObject
 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...
 
- Public Attributes inherited from BlamWorldObject
std::string name = "unnamed"
 The unique name of this object. More...
 
std::string description = ""
 An optional description of this object. More...
 
BlamWorldStateworld = 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BlamWorldObject_Primitive()

BlamWorldObject_Primitive::BlamWorldObject_Primitive ( Blam3DPrimitiveType  _primitive_type,
BlamWorldState _world 
)

Creates a new primitive world object.

Parameters
_tag_data- The tag data that this object should represent.
_world- The world state this object should belong to.

Member Function Documentation

◆ Render()

void BlamWorldObject_Primitive::Render ( )
virtual

Renders the object to the screen.

Reimplemented from BlamWorldObject.

Member Data Documentation

◆ primitive_type

Blam3DPrimitiveType BlamWorldObject_Primitive::primitive_type = Blam3DPrimitiveType::Cuboid

The type of primitive this object represents.

◆ radius_0

float BlamWorldObject_Primitive::radius_0 = 1.0f

The radius of the primitive. Only used in cylinders.

◆ radius_1

float BlamWorldObject_Primitive::radius_1 = 1.0f

A secondary radius of the primitive. Only used in cylinders.

◆ resolution

int BlamWorldObject_Primitive::resolution = 5

The level of detail to use for the primitive. Only used in cylinders.


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