This animation shoots the kart to a specified point on the track.
More...
#include <cannon_animation.hpp>
|
|
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.
◆ 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. |
◆ 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: