#include <object.h>
Inheritance diagram for Object:
Public Member Functions | |
Object (Model *model, Vec3 position=Vec3(0.0, 0.0, 0.0), dMatrix3 orientation=NULL, Vec3 scale=Vec3(1.0, 1.0, 1.0), double mass=1.0, bool on=false, bool stationary=true, bool movable=false, const bool rotatable[3]=NULL) | |
virtual EffectHandler | get_effect_handler (Effect *effect) |
virtual void | render (bool selected=false) |
void | draw_decor (const Vec3 &color) |
virtual void | apply_transform (void) |
virtual void | tick (double t) |
virtual void | start_sim (void) |
virtual void | stop_sim (void) |
virtual void | collide (dContact *contact) |
notify the object that he has been collided with. | |
void | set_id (int id) |
void | set_position (const Vec3 &pos) |
void | set_orientation_mat (const dMatrix3 orientation) |
void | set_orientation_quat (const dQuaternion orientation) |
void | set_scale (const Vec3 s) |
void | set_stationary (const bool s) |
void | set_movable (const bool s) |
void | set_rotatable (const bool s[3]) |
void | set_ethereal (const bool e) |
void | set_on (const bool o) |
void | set_bbox_color (const Vec3 &v) |
int | get_id () const |
Vec3 | get_position (void) const |
void | get_orientation_mat (dMatrix3 dmat3) const |
Mat4 | get_orientation_mat () const |
void | get_orientation_quat (dQuaternion dquat) const |
Quat | get_orientation_quat () const |
Vec3 | get_forward_vec () const |
Vec3 | get_up_vec () const |
virtual double | get_mass (void) const |
virtual Vec3 | get_scale (void) const |
virtual bool | is_stationary (void) const |
virtual bool | is_movable (void) const |
virtual bool | is_rotatable (int i) const |
virtual bool | is_ethereal (void) const |
virtual bool | is_on (void) const |
virtual Vec3 | get_bbox_color () const |
virtual Model * | get_model () const |
virtual string | get_type_str () const |
virtual string | get_info () const |
Vec3 | get_init_position (void) const |
void | get_init_orientation_mat (dMatrix3 dmat3) const |
void | get_init_orientation_quat (dQuaternion dquat) const |
bool | is_sim_on (void) const |
const dBodyID | get_body_id () |
const dGeomID | get_geom_id () |
void | enable_body (void) |
void | disable_body (void) |
Protected Member Functions | |
void | setup_geom (void) |
Protected Attributes | |
Model * | _model |
my graphical representation | |
Vec3 | _scale |
the scaling factor | |
int | _id |
dBodyID | _body_id |
dGeomID | _geom_id |
Vec3 | _init_position |
dQuaternion | _init_orientation |
bool | _sim_on |
dMass | _mass |
bool | _stationary |
does the physical simulation affect me? | |
bool | _movable |
can the user move me? | |
bool | _rotatable [3] |
can the user rotate me about x,y,z? | |
bool | _ethereal |
can objects collide with me / can I overlap objects | |
bool | _on |
am i activated? | |
Vec3 | _bbox_color |
Objects are physical things in the scene, and interact with each other via effects. To receive effects, an Object must implement get_effect_handler(), and return the function it wants called whenever it receives a effect of a given type.
|
Constructor.
|
|
Draw a decoration around the object to show its status. |
|
Have the object determine what kind of Effect effect is, and return a method pointer that will handle applications of that effect.
|
|
Render the object to the screen. I think this will actually just call the model's render() function. |
|
Accessor functions. These give access to private object data. See variables for details. |
|
This is called every game loop, with however many seconds passed since the last call. Implements Actor. |