Base 3D Object.
More...
#include <V3DObject.h>
|
|
typedef VBase | VSUPERCLASS |
| | Used to call parent class functions when they are overrided in class.
|
| |
|
| | V3DObject (sf::Vector3f position, sf::Vector3f rotation, sf::Vector3f scale) |
| |
| | V3DObject (float posX=0, float posY=0, float posZ=0, float rotX=0, float rotY=0, float rotZ=0, float scaleX=1, float scaleY=1, float scaleZ=1) |
| |
| sf::Vector3f | GetMinimum () |
| |
| sf::Vector3f | GetMaximum () |
| |
| virtual void | Reset (sf::Vector3f newPos) |
| |
| virtual void | Reset (float x, float y, float z) |
| |
| virtual void | Hurt (float damage) |
| |
| virtual void | UpdateShader (V3DShader *shader, V3DCamera *camera) |
| |
| virtual void | Update (float dt) override |
| |
| virtual void | Draw (sf::RenderTarget &RenderTarget) override |
| |
|
virtual void | Destroy () |
| | Destroys object and any data that must be destroyed.
|
| |
| virtual void | Kill () |
| |
|
virtual void | Revive () |
| | Revives the object by setting both alive and exists back to true.
|
| |
|
|
sf::Vector3f | Position |
| | Position Transform.
|
| |
|
sf::Vector3f | Rotation |
| | Rotation Transform.
|
| |
|
sf::Vector3f | Scale |
| | Scale transform.
|
| |
|
sf::Vector3f | Last |
| | Last Position.
|
| |
|
sf::Vector3f | AngleVelocity |
| | Velocity of Rotation.
|
| |
|
sf::Vector3f | AngleAcceleration |
| | Acceleration of Rotation.
|
| |
|
sf::Vector3f | AngleDrag |
| | Drag of Rotation.
|
| |
|
sf::Vector3f | AngleMax |
| | Max Velocity of Rotation.
|
| |
|
bool | Moves = true |
| | If true, position and rotation transforms will be updated.
|
| |
|
sf::Vector3f | Velocity |
| | Velocity of Movement.
|
| |
|
sf::Vector3f | Acceleration |
| | Acceleration of Movement.
|
| |
|
sf::Vector3f | Drag |
| | Drag of Movement.
|
| |
|
sf::Vector3f | MaxVelocity |
| | Max Velocity of Movement.
|
| |
|
float | Health = 100 |
| | Standard health value (object dies if health is <= 0)
|
| |
|
float | Radius |
| | Radius from the centre of the object as a sphere.
|
| |
|
sf::Vector3f | Origin |
| | Centre of the 3D object, useful for collisions.
|
| |
|
bool | active = true |
| | Base can be updated using Update if true.
|
| |
|
bool | visible = true |
| | Base can be rendered using Draw if true.
|
| |
|
bool | alive = true |
| | Helper member that is mainly used filter out behaviours to objects which aren't alive in the scene.
|
| |
|
bool | exists = true |
| | Base can be updated and rendered if true, else it would no longer be treated as being part of the scene.
|
| |
|
VType | type = NONE |
| | Base object type, typically set in the constructor of an inherited object to specify what type it is.
|
| |
|
uint32_t | RefCount = 0 |
| | Counts the amount of times the object is referenced in groups, ensures an object is only destroyed when no longer part of a single group.
|
| |
|
|
sf::Vector3f | minimum |
| | Minimum size of the object bounding box.
|
| |
|
sf::Vector3f | maximum |
| | Maximum size of the object bounding box.
|
| |
|
| static const wchar_t * | VString (const char *fmt,...) |
| |
| static void | VLog (const char *fmt,...) |
| |
| static void | VLogError (const char *fmt,...) |
| |
| static void | VClearLog () |
| |
◆ V3DObject() [1/2]
| V3DObject::V3DObject |
( |
sf::Vector3f |
position, |
|
|
sf::Vector3f |
rotation, |
|
|
sf::Vector3f |
scale |
|
) |
| |
- Parameters
-
| position | Position of the object. |
| rotation | Angle of the object. |
| scale | Scale of the object. |
◆ V3DObject() [2/2]
| V3DObject::V3DObject |
( |
float |
posX = 0, |
|
|
float |
posY = 0, |
|
|
float |
posZ = 0, |
|
|
float |
rotX = 0, |
|
|
float |
rotY = 0, |
|
|
float |
rotZ = 0, |
|
|
float |
scaleX = 1, |
|
|
float |
scaleY = 1, |
|
|
float |
scaleZ = 1 |
|
) |
| |
- Parameters
-
| posX | X position of the object. |
| posY | Y position of the object. |
| posZ | Z position of the object. |
| rotX | X angle of the object. |
| rotY | Y angle of the object. |
| rotZ | Z angle of the object. |
| scaleX | X scale of the object. |
| scaleY | Y scale of the object. |
| scaleZ | Z scale of the object. |
◆ Draw()
| virtual void V3DObject::Draw |
( |
sf::RenderTarget & |
RenderTarget | ) |
|
|
overridevirtual |
Draws 3D object.
- Parameters
-
| RenderTarget | The game's sf::RenderTarget object to render data onto. |
Reimplemented from VBase.
Reimplemented in V3DModel, and V3DObjModel.
◆ GetMaximum()
| sf::Vector3f V3DObject::GetMaximum |
( |
| ) |
|
- Returns
- Maximum size of the object bounding box.
◆ GetMinimum()
| sf::Vector3f V3DObject::GetMinimum |
( |
| ) |
|
- Returns
- Minimum size of the object bounding box.
◆ Hurt()
| virtual void V3DObject::Hurt |
( |
float |
damage | ) |
|
|
virtual |
Reduces Health and Kills Object if Health is <= 0.
- Parameters
-
| damage | The value to subtract from Healh. |
◆ Reset() [1/2]
| virtual void V3DObject::Reset |
( |
sf::Vector3f |
newPos | ) |
|
|
virtual |
Resets object
- Parameters
-
| newPos | Sets Position with a new sf::Vector3f. |
◆ Reset() [2/2]
| virtual void V3DObject::Reset |
( |
float |
x, |
|
|
float |
y, |
|
|
float |
z |
|
) |
| |
|
virtual |
Resets object
- Parameters
-
| x | Sets Position.x. |
| y | Sets Position.y. |
| z | Sets Position.z. |
◆ Update()
| virtual void V3DObject::Update |
( |
float |
dt | ) |
|
|
overridevirtual |
Updates 3D object and any data it contains.
- Parameters
-
| dt | Delta Time between the previous and current frame. |
Reimplemented from VBase.
◆ updateMotion()
| virtual void V3DObject::updateMotion |
( |
float |
dt | ) |
|
|
protectedvirtual |
Updates the position and rotation of object. By default all velocity values will be set using the computeVelocity function + velocity * delta time.
- Parameters
-
| dt | Delta Time between the previous and current frame. |
◆ UpdateShader()
Updates the shader with the current camera and object specific values.
- Parameters
-
| shader | The scene shader. |
| camera | The scene camera. |
Reimplemented in V3DModel, and V3DObjModel.
The documentation for this class was generated from the following file:
- D:/Development/Libs/Vigilante-Game-Framework/VFrame/V3DObject.h