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

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

#include <world_objects.h>

+ Inheritance diagram for BlamWorldObject_Primitive:
+ Collaboration diagram for BlamWorldObject_Primitive:

Public Member Functions

 BlamWorldObject_Primitive (Blam3DPrimitiveType _primitive_type, BlamWorldState *_world)
 Creates a new primitive world object. More...
 
 ~BlamWorldObject_Primitive ()
 
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...
 
virtual ~BlamWorldObject ()
 

Public Attributes

Blam3DPrimitiveType primitive_type = Blam3DPrimitiveType::Cuboid
 The type of primitive this object represents. More...
 
Ogre::ManualObject * manual_object = nullptr
 
Ogre::SceneNode * node = nullptr
 
Ogre::HlmsDatablock * datablock = nullptr
 
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...
 
BlamColor color = BlamColor(255, 255, 255)
 
bool solid = true
 
- 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...
 
int editor_folder_id = 0
 The editor folder that this object exists within. Only used within the editing kit. More...
 
uint64_t id = 0
 A unique identifier for this object. Used to identify objects during runtime. 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.
+ Here is the call graph for this function:

◆ ~BlamWorldObject_Primitive()

BlamWorldObject_Primitive::~BlamWorldObject_Primitive ( )
+ Here is the call graph for this function:

Member Function Documentation

◆ Render()

void BlamWorldObject_Primitive::Render ( )
virtual

Renders the object to the screen.

Reimplemented from BlamWorldObject.

+ Here is the call graph for this function:

Member Data Documentation

◆ color

BlamColor BlamWorldObject_Primitive::color = BlamColor(255, 255, 255)

◆ datablock

Ogre::HlmsDatablock* BlamWorldObject_Primitive::datablock = nullptr

◆ manual_object

Ogre::ManualObject* BlamWorldObject_Primitive::manual_object = nullptr

◆ node

Ogre::SceneNode* BlamWorldObject_Primitive::node = nullptr

◆ 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.

◆ solid

bool BlamWorldObject_Primitive::solid = true

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