This animation shoots the kart to a specified point on the track.
More...
#include <cannon_animation.hpp>
|
| CannonAnimation (AbstractKart *kart, BareNetworkString *buffer) |
| The constructor for the cannon animation for kart during rewind.
|
|
| CannonAnimation (Flyable *flyable, BareNetworkString *buffer) |
| The constructor for the cannon animation for flyable during rewind.
|
|
void | init (Ipo *ipo, const Vec3 &start_left, const Vec3 &start_right, const Vec3 &end_left, const Vec3 &end_right, float skid_rot) |
| Common initialisation for kart-based and flyable-based animations.
|
|
void | initDeltaHeading (float skidding_rotation) |
|
void | restoreData (BareNetworkString *buffer) |
|
void | resetPowerUp () |
| In CTF mode call this to reset kart powerup when get hit.
|
|
void | restoreBasicState (BareNetworkString *buffer) |
| Used in constructor of sub-class as no virtual function can be used there.
|
|
float | getMaximumHeight (const Vec3 &up_vector, float height_remove) |
| Determine maximum rescue height with up-raycast.
|
|
|
CheckCannon * | m_check_cannon |
| The CheckCannon which created this animation.
|
|
float | m_skid_rot |
|
Vec3 | m_delta |
| This is the difference between the position of the kart when the cannon line is crossed and the curve interpolation at t=0.
|
|
AnimationBase * | m_curve |
| Stores the curve interpolation for the cannon.
|
|
Flyable * | m_flyable |
| If this animation is used for a flyable (e.g.
|
|
float | m_start_line_length |
| Length of the (adjusted, i.e.
|
|
float | m_end_line_length |
| Length of the (adjusted, i.e.
|
|
float | m_fraction_of_line |
| Stores the position of the kart relative to the line width at the current location.
|
|
btQuaternion | m_delta_heading |
| The initial heading of the kart when crossing the line.
|
|
uint32_t | m_current_rotation |
| Current rotation of the object, saved for rewinding usage if needed, it will be compressed by MiniGLM.
|
|
|
class | KartRewinder |
|
class | Flyable |
|
|
AbstractKart * | m_kart |
| A pointer to the kart which is animated by this class.
|
|
int | m_end_ticks |
| Time in ticks for the animation which ends in world count up ticks.
|
|
int | m_created_ticks |
| Time in ticks for the animation creation.
|
|
btTransform | m_created_transform |
| Transformation by the time the animation was created, used for rewind to recreate the animation with the same one.
|
|
int | m_created_transform_compressed [4] |
|
This animation shoots the kart to a specified point on the track.
◆ CannonAnimation() [1/2]
The constructor for the cannon animation.
- Parameters
-
kart | The kart to be animated. Can also be NULL if a basket ball etc is animated (e.g. cannon animation). |
cc | The CheckCannon which created this animation. |
end_left,end_right | Left and right end points of the line at which the kart finishes. |
skid_rot | Visual rotation of the kart due to skidding (while this value can be queried, the AbstractkartAnimation constructor resets the value to 0, so it needs to be passed in. |
◆ CannonAnimation() [2/2]
Constructor for a flyable.
It sets the kart data to NULL.
◆ getAnimationType()
virtual KartAnimationType CannonAnimation::getAnimationType |
( |
| ) |
const |
|
inlinevirtual |
◆ init()
void CannonAnimation::init |
( |
Ipo * |
ipo, |
|
|
const Vec3 & |
start_left, |
|
|
const Vec3 & |
start_right, |
|
|
const Vec3 & |
end_left, |
|
|
const Vec3 & |
end_right, |
|
|
float |
skid_rot |
|
) |
| |
|
protected |
Common initialisation for kart-based and flyable-based animations.
- Parameters
-
ipo | The IPO (blender interpolation curve) which the kart should follow. |
start_left,start_right | Left and right end points of the line that the kart just crossed. |
end_left,end_right | Left and right end points of the line at which the kart finishes. |
skid_rot | Visual rotation of the kart due to skidding (while this value can be queried, the AbstractkartAnimation constructor resets the value to 0, so it needs to be passed in. |
◆ restoreState()
◆ saveState()
◆ update()
void CannonAnimation::update |
( |
int |
ticks | ) |
|
|
virtual |
Updates the kart animation.
- Parameters
-
ticks | Number of time steps - should be 1. |
Reimplemented from AbstractKartAnimation.
◆ m_delta
Vec3 CannonAnimation::m_delta |
|
private |
This is the difference between the position of the kart when the cannon line is crossed and the curve interpolation at t=0.
This is added to each interpolated curve value to give the final kart position (so the kart moves relative to the curve).
◆ m_delta_heading
btQuaternion CannonAnimation::m_delta_heading |
|
private |
The initial heading of the kart when crossing the line.
This is used to smoothly orient the kart towards the normal of the curve.
◆ m_end_line_length
float CannonAnimation::m_end_line_length |
|
private |
Length of the (adjusted, i.e.
taking kart width into account) end line.
◆ m_flyable
Flyable* CannonAnimation::m_flyable |
|
private |
If this animation is used for a flyable (e.g.
basket ball) instead of a kart, m_flyable is defined and m_kart is NULL.
◆ m_start_line_length
float CannonAnimation::m_start_line_length |
|
private |
Length of the (adjusted, i.e.
taking kart width into account) start line.
The documentation for this class was generated from the following files: