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

Class representing a world object. More...

#include <world_objects.h>

+ Inheritance diagram for BlamWorldObject:
+ Collaboration diagram for BlamWorldObject:

Public Member Functions

 BlamWorldObject (BlamWorldState *_world, BlamWorldObjectType _type)
 Creates a new world object. More...
 
 BlamWorldObject (BlamWorldObject *_parent, BlamWorldObjectType _type)
 
virtual ~BlamWorldObject ()
 
virtual void Render (float delta)
 Renders the object to the screen. More...
 
virtual void Tick (int tick, int total_ticks)
 
virtual void ShowImGuiEditControls ()
 
uint64_t GetID ()
 
Ogre::SceneNode * GetParentSceneNode ()
 
BlamVector3 GetRotation ()
 
void SetRotation (BlamVector3 _rotation, bool local_axes=true)
 
void SetRotation (float x, float y, float z, bool local_axes=true)
 
void SetRotation (BlamAxis axis, float amount, bool local_axes=true)
 
BlamVector3 GetAbsolutePosition ()
 
BlamVector3 GetPosition ()
 
void SetPosition (BlamVector3 position)
 
void SetPosition (float x, float y, float z)
 
BlamVector3 GetScale ()
 
void SetScale (BlamVector3 scale)
 
void SetScale (float x, float y, float z)
 
BlamVector3 GetScaleModifier ()
 
void SetScaleModifier (BlamVector3 scale)
 
void SetScaleModifier (float x, float y, float z)
 
bool IsHidden ()
 
bool GetHidden ()
 
void SetHidden (bool hidden)
 
std::string GetName ()
 
void SetName (std::string name)
 
void Translate (BlamVector3 offset, BlamTransformSpace transform_space=BlamTransformSpace::Parent)
 
void Rotate (BlamVector3 axis, float rotation_amount, BlamTransformSpace transform_space=BlamTransformSpace::Parent)
 
BlamVector3 GetDirection ()
 
virtual void OnMouseHoverEnter ()
 
virtual void OnMouseHoverExit ()
 
virtual void OnMouseMove (MouseMoveEvent *event)
 
virtual void OnMouseClick (MouseClickEvent *event)
 
virtual void OnMouseUnclick (MouseUnclickEvent *event)
 
virtual uint32_t GetQueryMask ()
 
virtual BlamOrientedBoundingBox GetWorldOBB ()
 
void CreateSceneNode ()
 
void SetShaderParameter (std::string id, float value)
 
void SetShaderParameter (std::string id, BlamVector2 value)
 
void SetShaderParameter (std::string id, BlamVector3 value)
 
void SetShaderParameter (std::string id, BlamVector4 value)
 
float GetShaderParameterFloat (std::string id)
 
BlamVector2 GetShaderParameterVector2 (std::string id)
 
BlamVector3 GetShaderParameterVector3 (std::string id)
 
BlamVector4 GetShaderParameterVector4 (std::string id)
 

Public Attributes

uint64_t id = 0
 A unique identifier for this object. Used to identify objects during runtime. 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...
 
bool disable_culling = false
 
uint64_t state_flags = BGFX_STATE_DEFAULT | BGFX_STATE_CULL_CCW | BGFX_STATE_BLEND_ALPHA
 
BlamWorldStateworld = nullptr
 The world state this object belongs to. More...
 
BlamWorldObjectparent = nullptr
 
BlamWorldObjectType type = BlamWorldObjectType::Unspecified
 The type of this world object. More...
 
Ogre::SceneNode * scene_node = nullptr
 

Detailed Description

Class representing a world object.

The world object will have several properties that can be modified on a per-object basis, such as a custom name, position, and rotation.

Constructor & Destructor Documentation

◆ BlamWorldObject() [1/2]

BlamWorldObject::BlamWorldObject ( BlamWorldState _world,
BlamWorldObjectType  _type 
)

Creates a new world object.

Parameters
_world- The world state this object should belong to.
_type- The type of world object being created.

◆ BlamWorldObject() [2/2]

BlamWorldObject::BlamWorldObject ( BlamWorldObject _parent,
BlamWorldObjectType  _type 
)

◆ ~BlamWorldObject()

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

Member Function Documentation

◆ CreateSceneNode()

void BlamWorldObject::CreateSceneNode ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAbsolutePosition()

BlamVector3 BlamWorldObject::GetAbsolutePosition ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDirection()

BlamVector3 BlamWorldObject::GetDirection ( )
+ Here is the call graph for this function:

◆ GetHidden()

bool BlamWorldObject::GetHidden ( )
+ Here is the caller graph for this function:

◆ GetID()

uint64_t BlamWorldObject::GetID ( )
+ Here is the caller graph for this function:

◆ GetName()

std::string BlamWorldObject::GetName ( )
+ Here is the caller graph for this function:

◆ GetParentSceneNode()

Ogre::SceneNode * BlamWorldObject::GetParentSceneNode ( )

◆ GetPosition()

BlamVector3 BlamWorldObject::GetPosition ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetQueryMask()

uint32_t BlamWorldObject::GetQueryMask ( )
virtual

Reimplemented in BlamWorldObject_Primitive, and BlamWorldObject_Tag.

+ Here is the caller graph for this function:

◆ GetRotation()

BlamVector3 BlamWorldObject::GetRotation ( )
+ Here is the caller graph for this function:

◆ GetScale()

BlamVector3 BlamWorldObject::GetScale ( )
+ Here is the caller graph for this function:

◆ GetScaleModifier()

BlamVector3 BlamWorldObject::GetScaleModifier ( )

◆ GetShaderParameterFloat()

float BlamWorldObject::GetShaderParameterFloat ( std::string  id)

◆ GetShaderParameterVector2()

BlamVector2 BlamWorldObject::GetShaderParameterVector2 ( std::string  id)

◆ GetShaderParameterVector3()

BlamVector3 BlamWorldObject::GetShaderParameterVector3 ( std::string  id)

◆ GetShaderParameterVector4()

BlamVector4 BlamWorldObject::GetShaderParameterVector4 ( std::string  id)

◆ GetWorldOBB()

BlamOBB BlamWorldObject::GetWorldOBB ( )
virtual

Reimplemented in BlamWorldObject_GizmoGrid, BlamWorldObject_Primitive, and BlamWorldObject_TagRenderModel.

+ Here is the caller graph for this function:

◆ IsHidden()

bool BlamWorldObject::IsHidden ( )
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OnMouseClick()

void BlamWorldObject::OnMouseClick ( MouseClickEvent *  event)
virtual

Reimplemented in BlamGizmoCuboid, and BlamGizmoTriangle.

◆ OnMouseHoverEnter()

void BlamWorldObject::OnMouseHoverEnter ( )
virtual

Reimplemented in BlamGizmoCuboid, and BlamGizmoTriangle.

+ Here is the caller graph for this function:

◆ OnMouseHoverExit()

void BlamWorldObject::OnMouseHoverExit ( )
virtual

Reimplemented in BlamGizmoCuboid, and BlamGizmoTriangle.

+ Here is the caller graph for this function:

◆ OnMouseMove()

void BlamWorldObject::OnMouseMove ( MouseMoveEvent *  event)
virtual

Reimplemented in BlamWorldObject_GizmoTransform.

+ Here is the caller graph for this function:

◆ OnMouseUnclick()

void BlamWorldObject::OnMouseUnclick ( MouseUnclickEvent *  event)
virtual

◆ Render()

◆ Rotate()

void BlamWorldObject::Rotate ( BlamVector3  axis,
float  rotation_amount,
BlamTransformSpace  transform_space = BlamTransformSpace::Parent 
)
+ Here is the call graph for this function:

◆ SetHidden()

void BlamWorldObject::SetHidden ( bool  hidden)
+ Here is the caller graph for this function:

◆ SetName()

void BlamWorldObject::SetName ( std::string  name)
+ Here is the caller graph for this function:

◆ SetPosition() [1/2]

void BlamWorldObject::SetPosition ( BlamVector3  position)
+ Here is the caller graph for this function:

◆ SetPosition() [2/2]

void BlamWorldObject::SetPosition ( float  x,
float  y,
float  z 
)
+ Here is the call graph for this function:

◆ SetRotation() [1/3]

void BlamWorldObject::SetRotation ( BlamAxis  axis,
float  amount,
bool  local_axes = true 
)
+ Here is the call graph for this function:

◆ SetRotation() [2/3]

void BlamWorldObject::SetRotation ( BlamVector3  _rotation,
bool  local_axes = true 
)
+ Here is the caller graph for this function:

◆ SetRotation() [3/3]

void BlamWorldObject::SetRotation ( float  x,
float  y,
float  z,
bool  local_axes = true 
)
+ Here is the call graph for this function:

◆ SetScale() [1/2]

void BlamWorldObject::SetScale ( BlamVector3  scale)
+ Here is the caller graph for this function:

◆ SetScale() [2/2]

void BlamWorldObject::SetScale ( float  x,
float  y,
float  z 
)
+ Here is the call graph for this function:

◆ SetScaleModifier() [1/2]

void BlamWorldObject::SetScaleModifier ( BlamVector3  scale)
+ Here is the caller graph for this function:

◆ SetScaleModifier() [2/2]

void BlamWorldObject::SetScaleModifier ( float  x,
float  y,
float  z 
)
+ Here is the call graph for this function:

◆ SetShaderParameter() [1/4]

void BlamWorldObject::SetShaderParameter ( std::string  id,
BlamVector2  value 
)

◆ SetShaderParameter() [2/4]

void BlamWorldObject::SetShaderParameter ( std::string  id,
BlamVector3  value 
)

◆ SetShaderParameter() [3/4]

void BlamWorldObject::SetShaderParameter ( std::string  id,
BlamVector4  value 
)

◆ SetShaderParameter() [4/4]

void BlamWorldObject::SetShaderParameter ( std::string  id,
float  value 
)

◆ ShowImGuiEditControls()

void BlamWorldObject::ShowImGuiEditControls ( )
virtual

◆ Tick()

virtual void BlamWorldObject::Tick ( int  tick,
int  total_ticks 
)
inlinevirtual

◆ Translate()

void BlamWorldObject::Translate ( BlamVector3  offset,
BlamTransformSpace  transform_space = BlamTransformSpace::Parent 
)
+ Here is the call graph for this function:

Member Data Documentation

◆ description

std::string BlamWorldObject::description = ""

An optional description of this object.

◆ disable_culling

bool BlamWorldObject::disable_culling = false

◆ editor_folder_id

int BlamWorldObject::editor_folder_id = 0

The editor folder that this object exists within. Only used within the editing kit.

◆ id

uint64_t BlamWorldObject::id = 0

A unique identifier for this object. Used to identify objects during runtime.

◆ parent

BlamWorldObject* BlamWorldObject::parent = nullptr

◆ scene_node

Ogre::SceneNode* BlamWorldObject::scene_node = nullptr

◆ state_flags

uint64_t BlamWorldObject::state_flags = BGFX_STATE_DEFAULT | BGFX_STATE_CULL_CCW | BGFX_STATE_BLEND_ALPHA

◆ type

The type of this world object.

◆ world

BlamWorldState* BlamWorldObject::world = nullptr

The world state this object belongs to.


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