|
enum | AnimationFrameType {
AF_BEGIN
, AF_DEFAULT = AF_BEGIN
, AF_LEFT
, AF_STRAIGHT
,
AF_RIGHT
, AF_LOSE_START
, AF_LOSE_LOOP_START
, AF_LOSE_END
,
AF_LOSE_END_STRAIGHT
, AF_BEGIN_EXPLOSION
, AF_END_EXPLOSION
, AF_JUMP_START
,
AF_JUMP_LOOP
, AF_JUMP_END
, AF_WIN_START
, AF_WIN_LOOP_START
,
AF_WIN_END
, AF_WIN_END_STRAIGHT
, AF_SELECTION_START
, AF_SELECTION_END
,
AF_BACK_LEFT
, AF_BACK_STRAIGHT
, AF_BACK_RIGHT
, AF_END =AF_BACK_RIGHT
,
AF_COUNT
} |
|
|
| KartModel (bool is_master) |
| Default constructor which initialises all variables with defaults.
|
|
| ~KartModel () |
| Destructor.
|
|
KartModel * | makeCopy (std::shared_ptr< GE::GERenderInfo > ri) |
| This function returns a copy of this object.
|
|
void | reset () |
| Resets the kart model.
|
|
void | loadInfo (const XMLNode &node) |
| This function loads the information about the kart from a xml file.
|
|
bool | loadModels (const KartProperties &kart_properties) |
| Loads the 3d model and all wheels.
|
|
void | setDefaultSuspension () |
|
void | update (float dt, float distance, float steer, float speed, float current_lean_angle, int gt_replay_index=-1) |
| Rotates and turns the wheels appropriately, and adjust for suspension updates the speed-weighted objects' animations.
|
|
void | finishedRace () |
| Called when the kart finished the race.
|
|
void | resetVisualWheelPosition () |
| Called when a kart is rescued to reset all visual wheels to their default position to avoid that some wheels look too far away from the kart (which is not that visible while a kart is driving).
|
|
scene::ISceneNode * | attachModel (bool animatedModels, bool human_player) |
| Attach the kart model and wheels to the scene node.
|
|
scene::IAnimatedMesh * | getModel () const |
| Returns the animated mesh of this kart model.
|
|
scene::IMesh * | getWheelModel (const int i) const |
| Returns the mesh of the wheel for this kart.
|
|
int | getBaseFrame () const |
| Since karts might be animated, we might need to know which base frame to use.
|
|
int | getFrame (AnimationFrameType f) const |
|
float | getAnimationSpeed () const |
|
const Vec3 & | getWheelGraphicsPosition (unsigned int i) const |
| Returns the position of a wheel relative to the kart.
|
|
const Vec3 * | getWheelsGraphicsPosition () const |
| Returns the position of wheels relative to the kart.
|
|
float | getWheelGraphicsRadius (unsigned int i) const |
| Returns the radius of the graphical wheels.
|
|
const Vec3 & | getNitroEmittersPositon (unsigned int i) const |
| Returns the position of nitro emitter relative to the kart.
|
|
const bool | hasNitroEmitters () const |
| Returns true if kart has nitro emitters.
|
|
size_t | getSpeedWeightedObjectsCount () const |
| Returns the number of speed weighted objects for this kart.
|
|
const SpeedWeightedObject & | getSpeedWeightedObject (int i) const |
| Returns the position of a speed weighted object relative to the kart.
|
|
float | getLength () const |
| Returns the length of the kart model.
|
|
float | getWidth () const |
| Returns the width of the kart model.
|
|
float | getHeight () const |
| Returns the height of the kart.
|
|
float | getHighestPoint () const |
| Highest coordinate on up axis.
|
|
float | getLowestPoint () const |
| Lowest coordinate on up axis.
|
|
AnimationFrameType | getAnimation () |
| Returns information about currently played animation.
|
|
void | setAnimation (AnimationFrameType type, bool play_non_loop=false) |
| Enables- or disables the end animation.
|
|
void | setKart (AbstractKart *k) |
| Sets the kart this model is currently used for.
|
|
void | setHatMeshName (const std::string &name) |
| Name of the hat mesh to use.
|
|
scene::ISceneNode ** | getWheelNodes () |
| Returns the array of wheel nodes.
|
|
scene::IAnimatedMeshSceneNode * | getAnimatedNode () |
|
std::shared_ptr< GE::GERenderInfo > | getRenderInfo () |
|
bool | supportColorization () const |
|
void | toggleHeadlights (bool on) |
|
const core::matrix4 & | getInverseBoneMatrix (const std::string &bone_name) const |
|
const std::string & | getExhaustXML () const |
|
bool | hasWheel () const |
|
const KartProperties * | getKartProperties () const |
|
|
void | loadWheelInfo (const XMLNode &node, const std::string &wheel_name, int index) |
| Loads a single wheel node.
|
|
void | loadNitroEmitterInfo (const XMLNode &node, const std::string &emitter_name, int index) |
| Loads a single nitro emitter node.
|
|
void | loadSpeedWeightedInfo (const XMLNode *speed_weighted_node) |
| Loads a single speed weighted node.
|
|
void | loadHeadlights (const XMLNode &node) |
|
void | OnAnimationEnd (scene::IAnimatedMeshSceneNode *node) |
| Called from irrlicht when a non-looped animation ends.
|
|
void | initInverseBoneMatrices () |
| Called when a kart is load.
|
|
void | configNode (scene::ISceneNode *node, const core::matrix4 &global_mat, const core::matrix4 &inv_mat) |
|
|
int | m_animation_frame [AF_COUNT] |
| Which frame number starts/end which animation.
|
|
float | m_animation_speed |
| Animation speed.
|
|
scene::IAnimatedMesh * | m_mesh |
| The mesh of the model.
|
|
scene::IAnimatedMeshSceneNode * | m_animated_node |
| This is a pointer to the scene node of the kart this model belongs to.
|
|
core::matrix4 * | m_hat_location |
| Location of hat in object space.
|
|
std::string | m_hat_bone |
| Name of the bone for hat attachment.
|
|
std::string | m_hat_name |
| Name of the hat to use for this kart.
|
|
std::string | m_model_filename |
| Name of the 3d model file.
|
|
scene::IMesh * | m_wheel_model [4] |
| The four wheel models.
|
|
scene::ISceneNode * | m_wheel_node [4] |
| The four scene nodes the wheels are attached to.
|
|
std::string | m_wheel_filename [4] |
| Filename of the wheel models.
|
|
Vec3 | m_wheel_graphics_position [4] |
| The position of all four wheels in the 3d model.
|
|
float | m_wheel_graphics_radius [4] |
| Radius of the graphical wheels.
|
|
Vec3 | m_nitro_emitter_position [2] |
| The position of the nitro emitters.
|
|
bool | m_has_nitro_emitter |
| True if kart has nitro emitters.
|
|
SpeedWeightedObjectList | m_speed_weighted_objects |
| The speed weighted objects.
|
|
std::vector< HeadlightObject > | m_headlight_objects |
|
float | m_default_physics_suspension [4] |
| Length of the physics suspension when the kart is at rest.
|
|
float | m_min_suspension [4] |
| Minimum suspension length (i.e.
|
|
float | m_max_suspension [4] |
| Maximum suspension length (i.e.
|
|
float | m_dampen_suspension_amplitude [4] |
| value used to divide the visual movement of wheels (because the actual movement of wheels in bullet is too large and looks strange).
|
|
AnimationFrameType | m_current_animation |
| Which animation is currently being played.
|
|
float | m_kart_width |
| Width of kart.
|
|
float | m_kart_length |
| Length of kart.
|
|
float | m_kart_height |
| Height of kart.
|
|
float | m_kart_highest_point |
| Largest coordinate on up axis.
|
|
float | m_kart_lowest_point |
| Smallest coordinate on up axis.
|
|
bool | m_is_master |
| True if this is the master copy, managed by KartProperties.
|
|
AbstractKart * | m_kart |
| Pointer to the kart object belonging to this kart model.
|
|
std::shared_ptr< GE::GERenderInfo > | m_render_info |
| For our engine to get the desired hue for colorization.
|
|
bool | m_support_colorization |
| True if this kart model can be colorization in red / blue (now only used in soccer mode).
|
|
std::unordered_map< std::string, core::matrix4 > | m_inverse_bone_matrices |
| Used to cache inverse bone matrices for each bone in straight frame for attachment.
|
|
unsigned | m_version |
| Version of kart model (in kart.xml).
|
|
std::string | m_exhaust_xml |
| Exhaust particle file (xml) for the kart, empty if disabled.
|
|
const KartProperties * | m_kart_properties |
|
This class stores a 3D kart model.
It takes especially care of attaching the wheels, which are loaded as separate objects. The wheels can turn and (for the front wheels) rotate. The implementation is dependent on the OpenGL library used. Note that this object is copied using the default copy function. See kart.cpp.