#include <ObjectWanwan.hh>
Represents Chain Chomps chained to a stake that attack in a limited arc.
Definition at line 35 of file ObjectWanwan.hh.
Public Member Functions | |
| ObjectWanwan (const System::MapdataGeoObj ¶ms) | |
| void | init () override |
| void | calc () override |
| u32 | loadFlags () const override |
| Kart::Reaction | onCollision (Kart::KartObject *kartObj, Kart::Reaction reactionOnKart, Kart::Reaction reactionOnObj, EGG::Vector3f &hitDepth) override |
Public Member Functions inherited from Kinoko::Field::ObjectCollidable | |
| ObjectCollidable (const System::MapdataGeoObj ¶ms) | |
| ObjectCollidable (const char *name, const EGG::Vector3f &pos, const EGG::Vector3f &rot, const EGG::Vector3f &scale) | |
| void | load () override |
| void | calcCollisionTransform () override |
| f32 | getCollisionRadius () const override |
| Finds the radius that fits fully in a BoxColUnit. | |
| virtual void | loadAABB (f32 maxSpeed) |
| virtual void | loadAABB (f32 radius, f32 maxSpeed) |
| virtual void | processKartReactions (Kart::KartObject *kartObj, Kart::Reaction &reactionOnKart, Kart::Reaction &reactionOnObj) |
| virtual void | onWallCollision (Kart::KartObject *, const EGG::Vector3f &) |
| virtual void | onObjectCollision (Kart::KartObject *) |
| virtual bool | checkCollision (ObjectCollisionBase *lhs, EGG::Vector3f &dist) |
| virtual const EGG::Vector3f & | getCollisionTranslation () const |
| virtual ObjectCollisionBase * | collision () const |
Public Member Functions inherited from Kinoko::Field::ObjectBase | |
| ObjectBase (const System::MapdataGeoObj ¶ms) | |
| ObjectBase (const char *name, const EGG::Vector3f &pos, const EGG::Vector3f &rot, const EGG::Vector3f &scale) | |
| virtual void | calcModel () |
| virtual const char * | getResources () const |
| virtual void | loadGraphics () |
| virtual void | loadAnims () |
| virtual void | loadRail () |
| virtual const char * | getName () const |
| virtual const char * | getKclName () const |
| virtual void | resize (f32 radius, f32 maxSpeed) |
| virtual void | unregisterCollision () |
| virtual void | disableCollision () const |
| virtual void | enableCollision () const |
| virtual const BoxColUnit * | getUnit () const |
| const RailInterpolator * | railInterpolator () const |
| virtual const EGG::Vector3f & | getPosition () const |
| virtual ObjectId | id () const |
| const EGG::Vector3f & | pos () const |
| void | setPos (const EGG::Vector3f &pos) |
| void | setScale (const EGG::Vector3f &scale) |
| void | setTransform (const EGG::Matrix34f &mat) |
| const EGG::Vector3f & | scale () const |
Private Member Functions | |
| void | enterWait () |
| void | enterAttack () |
| void | enterBack () |
| void | calcWait () |
| void | calcAttack () |
| void | calcBack () |
| void | calcPos () |
| void | calcCollision () |
| void | calcMat () |
| void | calcChainAttachMat () |
| void | calcSpeed () |
| void | calcBounce () |
| void | calcWanderTimer () |
| void | calcWanderEnd () |
| void | calcChain () |
| void | calcTangent (f32 t) |
| void | calcUp (f32 t) |
| void | calcRandomTarget () |
| void | initTransformKeyframes () |
| void | calcAttackPos () |
| void | calcChainAttachPos (EGG::Matrix34f mat) |
Static Private Member Functions | |
| static f32 | CrossXZ (const EGG::Vector3f &v0, const EGG::Vector3f &v1, const EGG::Vector3f &v2) |
| static void | SampleHermiteInterp (f32 start, f32 end, f32 startTangent, f32 endTangent, std::span< f32 > dst) |
Private Attributes | |
| EGG::Vector3f | m_vel |
| EGG::Vector3f | m_accel |
| f32 | m_speed |
| f32 | m_pitch |
| EGG::Vector3f | m_tangent |
| EGG::Vector3f | m_up |
| EGG::Vector3f | m_targetUp |
| std::array< EGG::Matrix34f, 15 > | m_transformKeyframes |
| const f32 | m_chainLength |
| const f32 | m_attackDistance |
| const f32 | m_attackArcTargetX |
| const f32 | m_attackArcTargetZ |
| u32 | m_chainCount |
| EGG::Vector3f | m_chainAttachPos |
| Where the chain attaches to the Chain Chomp. | |
| EGG::Vector3f | m_initPos |
| EGG::Vector3f | m_anchor |
| Effectively the position of the wooden stake. | |
| EGG::Vector3f | m_attackArcCenter |
| bool | m_touchingFloor |
| bool | m_chainTaut |
| Chain Chomp cannot move further because the chain is fully taut. | |
| u32 | m_frame |
| Counts up every frame. | |
| EGG::Vector3f | m_target |
| Where the chain chomp is currently moving towards. | |
| EGG::Vector3f | m_targetDir |
| bool | m_retarget |
| Tracks whether the target position has changed in the wait state. | |
| u32 | m_wanderTimer |
| How long the chain chomp has been wandering for. | |
| bool | m_attackStill |
| True when lurched forward and stationary. | |
| u32 | m_idleDuration |
| f32 | m_attackArc |
| Half of size of the arc the chain chomp can lurch within (in degrees) | |
| EGG::Vector3f | m_backDir |
| EGG::Matrix34f | m_chainAttachMat |
| Represents the position and rotation of where the Chain Chomp attaches to the chain. | |
Static Private Attributes | |
| static constexpr f32 | SCALE = 2.0f |
| static constexpr EGG::Vector3f | GRAVITY = EGG::Vector3f(0.0f, 2.5f, 0.0f) |
| static constexpr f32 | CHAIN_LENGTH = 135.0f |
| static constexpr std::array< StateManagerEntry, 3 > | STATE_ENTRIES |
Additional Inherited Members | |
Public Types inherited from Kinoko::Field::ObjectBase | |
| enum class | eFlags { Position = 0 , Rotation = 1 , Matrix = 2 , Scale = 3 } |
| typedef EGG::TBitFlag< u16, eFlags > | Flags |
Protected Member Functions inherited from Kinoko::Field::ObjectCollidable | |
| void | createCollision () override |
| virtual const EGG::Vector3f & | collisionCenter () const |
| void | registerManagedObject () |
Protected Member Functions inherited from Kinoko::Field::ObjectBase | |
| void | calcTransform () |
| void | calcRotLock () |
| void | linkAnims (const std::span< const char * > &names, const std::span< Render::AnmType > types) |
| void | setMatrixTangentTo (const EGG::Vector3f &up, const EGG::Vector3f &tangent) |
| void | setMatrixFromOrthonormalBasisAndPos (const EGG::Vector3f &v) |
Protected Member Functions inherited from Kinoko::Field::StateManager | |
| StateManager (void *obj, const std::span< const StateManagerEntry > &entries) | |
| void | calc () |
Static Protected Member Functions inherited from Kinoko::Field::ObjectBase | |
| static f32 | CheckPointAgainstLineSegment (const EGG::Vector3f &point, const EGG::Vector3f &a, const EGG::Vector3f &b) |
| Calculates on what side of line segment ab point lies. | |
| static EGG::Vector3f | RotateXZByYaw (f32 angle, const EGG::Vector3f &v) |
| Rotates a vector around the Y-axis and returns the XZ-plane portion of the vector. | |
| static EGG::Vector3f | RotateAxisAngle (f32 angle, const EGG::Vector3f &axis, const EGG::Vector3f &v1) |
| static void | SetRotTangentHorizontal (EGG::Matrix34f &mat, const EGG::Vector3f &up, const EGG::Vector3f &tangent) |
| static EGG::Matrix34f | OrthonormalBasis (const EGG::Vector3f &v) |
| static EGG::Matrix34f | RailOrthonormalBasis (const RailInterpolator &railInterpolator) |
| static EGG::Vector3f | AdjustVecForward (f32 sidewaysScalar, f32 forwardScalar, f32 minSpeed, const EGG::Vector3f &src, EGG::Vector3f forward) |
| static f32 | CalcParabolicDisplacement (f32 initVel, f32 accel, u32 frame) |
| Solves the standard kinematic equation \(y(t) = v_0\, t - \frac{1}{2} a t^{2}\). | |
| static EGG::Vector3f | Interpolate (f32 t, const EGG::Vector3f &v0, const EGG::Vector3f &v1) |
Protected Attributes inherited from Kinoko::Field::ObjectCollidable | |
| ObjectCollisionBase * | m_collision |
Protected Attributes inherited from Kinoko::Field::ObjectBase | |
| Render::DrawMdl * | m_drawMdl |
| Abstract::g3d::ResFile * | m_resFile |
| ObjectId | m_id |
| RailInterpolator * | m_railInterpolator |
| BoxColUnit * | m_boxColUnit |
| Flags | m_flags |
| EGG::Vector3f | m_pos |
| EGG::Vector3f | m_scale |
| EGG::Vector3f | m_rot |
| bool | m_rotLock |
| EGG::Matrix34f | m_transform |
| const System::MapdataGeoObj * | m_mapObj |
Protected Attributes inherited from Kinoko::Field::StateManager | |
| u16 | m_currentStateId |
| s32 | m_nextStateId |
| u32 | m_currentFrame |
| std::span< u16 > | m_entryIds |
| std::span< const StateManagerEntry > | m_entries |
| void * | m_obj |
|
0x806E4224 |
Definition at line 15 of file ObjectWanwan.cc.
|
overridevirtual0x806E4F2C |
Reimplemented from Kinoko::Field::ObjectBase.
Definition at line 99 of file ObjectWanwan.cc.
|
private0x806E6F6C |
Definition at line 224 of file ObjectWanwan.cc.
|
private0x806E9084 |
Definition at line 452 of file ObjectWanwan.cc.
|
private0x806E7494 |
Definition at line 274 of file ObjectWanwan.cc.
|
private0x806E794C |
Definition at line 381 of file ObjectWanwan.cc.
|
inlineprivate0x806E7BA4 |
Definition at line 80 of file ObjectWanwan.hh.
|
private0x806E5EDC |
Definition at line 351 of file ObjectWanwan.cc.
|
private |
Definition at line 475 of file ObjectWanwan.cc.
|
private0x806E5A8C |
Definition at line 303 of file ObjectWanwan.cc.
|
private0x806E5D70 |
Definition at line 333 of file ObjectWanwan.cc.
|
private0x806E59BC |
Definition at line 295 of file ObjectWanwan.cc.
|
private0x806E87C8 |
Definition at line 411 of file ObjectWanwan.cc.
|
private0x806E78B0 |
Definition at line 366 of file ObjectWanwan.cc.
|
private0x806E7E38 |
Definition at line 391 of file ObjectWanwan.cc.
|
private0x806E7F64 |
Definition at line 401 of file ObjectWanwan.cc.
|
private0x806E63A4 |
Definition at line 187 of file ObjectWanwan.cc.
|
inlineprivate0x806E7B7C |
Definition at line 73 of file ObjectWanwan.hh.
|
inlineprivate0x806E79E4 |
Definition at line 68 of file ObjectWanwan.hh.
|
inlinestaticnodiscardprivate0x806B38A8 |
Definition at line 94 of file ObjectWanwan.hh.
|
private0x806E6EB0 |
Definition at line 155 of file ObjectWanwan.cc.
|
private0x806E73C4 |
Definition at line 171 of file ObjectWanwan.cc.
|
private0x806E6208 |
Definition at line 129 of file ObjectWanwan.cc.
|
overridevirtual0x806E4B9C |
Reimplemented from Kinoko::Field::ObjectBase.
Definition at line 77 of file ObjectWanwan.cc.
|
private0x806E8A60 |
Definition at line 425 of file ObjectWanwan.cc.
|
inlinenodiscardoverridevirtual0x806E94BC |
Reimplemented from Kinoko::Field::ObjectBase.
Definition at line 44 of file ObjectWanwan.hh.
|
overridevirtual0x806E526C |
Reimplemented from Kinoko::Field::ObjectCollidable.
Definition at line 119 of file ObjectWanwan.cc.
|
staticprivate0x806E8F4C |
Definition at line 486 of file ObjectWanwan.cc.
|
staticconstexprprivate |
Definition at line 138 of file ObjectWanwan.hh.
|
staticconstexprprivate |
Definition at line 137 of file ObjectWanwan.hh.
|
private |
Definition at line 103 of file ObjectWanwan.hh.
|
private |
Effectively the position of the wooden stake.
Definition at line 117 of file ObjectWanwan.hh.
|
private |
Half of size of the arc the chain chomp can lurch within (in degrees)
Definition at line 128 of file ObjectWanwan.hh.
|
private |
Definition at line 118 of file ObjectWanwan.hh.
|
private |
Definition at line 112 of file ObjectWanwan.hh.
|
private |
Definition at line 113 of file ObjectWanwan.hh.
|
private |
Definition at line 111 of file ObjectWanwan.hh.
|
private |
True when lurched forward and stationary.
Definition at line 126 of file ObjectWanwan.hh.
|
private |
Definition at line 129 of file ObjectWanwan.hh.
|
private |
Represents the position and rotation of where the Chain Chomp attaches to the chain.
This is normally housed in the DrawMdl's ScnObj, but for the purposes of time trial physics, it can be defined here for simplicity.
Definition at line 134 of file ObjectWanwan.hh.
|
private |
Where the chain attaches to the Chain Chomp.
Definition at line 115 of file ObjectWanwan.hh.
|
private |
Definition at line 114 of file ObjectWanwan.hh.
|
private |
Definition at line 110 of file ObjectWanwan.hh.
|
private |
Chain Chomp cannot move further because the chain is fully taut.
Definition at line 120 of file ObjectWanwan.hh.
|
private |
Counts up every frame.
Definition at line 121 of file ObjectWanwan.hh.
|
private |
Definition at line 127 of file ObjectWanwan.hh.
|
private |
Definition at line 116 of file ObjectWanwan.hh.
|
private |
Definition at line 105 of file ObjectWanwan.hh.
|
private |
Tracks whether the target position has changed in the wait state.
Definition at line 124 of file ObjectWanwan.hh.
|
private |
Definition at line 104 of file ObjectWanwan.hh.
|
private |
Definition at line 106 of file ObjectWanwan.hh.
|
private |
Where the chain chomp is currently moving towards.
Definition at line 122 of file ObjectWanwan.hh.
|
private |
Definition at line 123 of file ObjectWanwan.hh.
|
private |
Definition at line 108 of file ObjectWanwan.hh.
|
private |
Definition at line 119 of file ObjectWanwan.hh.
|
private |
Definition at line 109 of file ObjectWanwan.hh.
|
private |
Definition at line 107 of file ObjectWanwan.hh.
|
private |
Definition at line 102 of file ObjectWanwan.hh.
|
private |
How long the chain chomp has been wandering for.
Definition at line 125 of file ObjectWanwan.hh.
|
staticconstexprprivate |
Definition at line 136 of file ObjectWanwan.hh.
|
staticconstexprprivate |
Definition at line 140 of file ObjectWanwan.hh.