![]() |
Blamite Game Engine - blam!
00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
|
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 (BlamWorldObjectType _type, BlamWorldState *_world) | |
| Creates a new primitive world object. More... | |
| BlamWorldObject_Primitive (BlamWorldObjectType _type, BlamWorldObject *_parent) | |
| ~BlamWorldObject_Primitive () | |
| void | Render (float delta) override |
| Renders the object to the screen. More... | |
| void | SetCustomDatabablock (Ogre::HlmsDatablock *datablock, bool wireframe) |
| void | ShowImGuiEditControls () override |
| void | MarkForRebuild () |
| void | SetDepthCheckEnabled (bool enable) |
| void | SetQueryMask (uint32_t mask) |
| uint32_t | GetQueryMask () override |
| BlamOrientedBoundingBox | GetWorldOBB () override |
Public Member Functions inherited from BlamWorldObject | |
| BlamWorldObject (BlamWorldState *_world, BlamWorldObjectType _type) | |
| Creates a new world object. More... | |
| BlamWorldObject (BlamWorldObject *_parent, BlamWorldObjectType _type) | |
| virtual | ~BlamWorldObject () |
| virtual void | Tick (int tick, int total_ticks) |
| 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) |
| 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 | |
| Ogre::ManualObject * | manual_object = nullptr |
| Ogre::HlmsDatablock * | datablock = nullptr |
| Ogre::HlmsDatablock * | datablock_wireframe = nullptr |
| BlamColor | color = BlamColor(255, 255, 255) |
| BlamColor | color_wireframe = BlamColor(255, 255, 255) |
| Blam3DPrimitiveRenderMode | render_mode = Blam3DPrimitiveRenderMode::Solid |
| bool | show_backfaces = false |
| bool | cast_shadows = true |
Public Attributes inherited from BlamWorldObject | |
| 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 |
| BlamWorldState * | world = nullptr |
| The world state this object belongs to. More... | |
| BlamWorldObject * | parent = nullptr |
| BlamWorldObjectType | type = BlamWorldObjectType::Unspecified |
| The type of this world object. More... | |
| Ogre::SceneNode * | scene_node = nullptr |
Protected Member Functions | |
| virtual void | CreateManualObject () |
Protected Attributes | |
| ManualMesh * | manual_mesh = nullptr |
| bool | custom_datablock = false |
| bool | custom_wireframe_datablock = false |
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 | ( | BlamWorldObjectType | _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. |
Here is the call graph for this function:| BlamWorldObject_Primitive::BlamWorldObject_Primitive | ( | BlamWorldObjectType | _type, |
| BlamWorldObject * | _parent | ||
| ) |
Here is the call graph for this function:| BlamWorldObject_Primitive::~BlamWorldObject_Primitive | ( | ) |
Here is the call graph for this function:
|
protectedvirtual |
Reimplemented in BlamGizmoTriangle.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Reimplemented from BlamWorldObject.
|
overridevirtual |
| void BlamWorldObject_Primitive::MarkForRebuild | ( | ) |
Here is the caller graph for this function:
|
overridevirtual |
Renders the object to the screen.
Reimplemented from BlamWorldObject.
Reimplemented in BlamWorldObject_PrimitiveLine, BlamWorldObject_PrimitiveCylinder, and BlamWorldObject_PrimitiveSphere.
Here is the call graph for this function:
Here is the caller graph for this function:| void BlamWorldObject_Primitive::SetCustomDatabablock | ( | Ogre::HlmsDatablock * | datablock, |
| bool | wireframe | ||
| ) |
Here is the call graph for this function:| void BlamWorldObject_Primitive::SetDepthCheckEnabled | ( | bool | enable | ) |
| void BlamWorldObject_Primitive::SetQueryMask | ( | uint32_t | mask | ) |
Here is the caller graph for this function:
|
overridevirtual |
Reimplemented from BlamWorldObject.
Reimplemented in BlamWorldObject_PrimitiveLine, BlamWorldObject_PrimitiveCylinder, and BlamWorldObject_PrimitiveSphere.
Here is the call graph for this function:
Here is the caller graph for this function:| bool BlamWorldObject_Primitive::cast_shadows = true |
| BlamColor BlamWorldObject_Primitive::color = BlamColor(255, 255, 255) |
| BlamColor BlamWorldObject_Primitive::color_wireframe = BlamColor(255, 255, 255) |
|
protected |
|
protected |
| Ogre::HlmsDatablock* BlamWorldObject_Primitive::datablock = nullptr |
| Ogre::HlmsDatablock* BlamWorldObject_Primitive::datablock_wireframe = nullptr |
|
protected |
| Ogre::ManualObject* BlamWorldObject_Primitive::manual_object = nullptr |
| Blam3DPrimitiveRenderMode BlamWorldObject_Primitive::render_mode = Blam3DPrimitiveRenderMode::Solid |
| bool BlamWorldObject_Primitive::show_backfaces = false |