Object


This is the main object class from which other ingame objects are derived.



Members and Functions


Members:
static int objectsamount: This static variable holds the total number of objects in a world.
Buoyant::byVec3 pos: holds the object's position.
Buoyant::byVec3 scale: holds the object's scale.
Buoyant::byVec3 rot: holds the object's rotation.
bool visible: determines if the object wlll be rendered.

Con-/Destructor:
Object(): Increments the objectsamount variable.

~Object(): Decrements the objectsamount variable.

Functions:
virtual void SetPosition(float x, float y, float z)=0: Pure virtual function, is defined in classes derived from Object.

virtual void SetPosition(Buoyant::byVec3 p)=0: Pure virtual function, is defined in classes derived from Object.

virtual void SetRotation(float x, float y, float z)=0: Pure virtual function, is defined in classes derived from Object.

virtual void SetRotation(Buoyant::byVec3 r)=0: Pure virtual function, is defined in classes derived from Object.

virtual void Move(int axis, float amount): This method moves the Object in the direction derived from the Object's Vec3 rotation values, along the x, y or z axis defined by variable axis (0,1,2 respectively). This method's definition can be overridden by classes derived from Object.

virtual void Rotate(Buoyant::byVec3 r): This method adds the input r to the Object's rotation values, effectively rotating the Object along the x, y and/or z axis. This method's definition can be overridden by classes derived from Object.

virtual void Render()=0: Pure virtual function, is defined in classes derived from Object.




Example of Usage


Under Construction.


Copyright 2017 Evil Turtle Productions. All Rights Reserved.