A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
Field::ObjectSunDS Class Reference

Description

Definition at line 10 of file ObjectSunDS.hh.

Inheritance diagram for Field::ObjectSunDS:

Public Member Functions

 ObjectSunDS (const System::MapdataGeoObj &params)
 
void init () override
 
void calc () override
 
u32 loadFlags () const override
 
void createCollision () override
 
s16 launchPointIdx () override
 Used by ObjectSniper to check which object (if any) should be thrown.
 
- Public Member Functions inherited from Field::ObjectProjectileLauncher
 ObjectProjectileLauncher (const System::MapdataGeoObj &params)
 
- Public Member Functions inherited from Field::ObjectCollidable
 ObjectCollidable (const System::MapdataGeoObj &params)
 
 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 Kart::Reaction onCollision (Kart::KartObject *, Kart::Reaction reactionOnKart, Kart::Reaction, EGG::Vector3f &)
 
virtual void onWallCollision (Kart::KartObject *, const EGG::Vector3f &)
 
virtual void onObjectCollision (Kart::KartObject *)
 
virtual bool checkCollision (ObjectCollisionBase *lhs, EGG::Vector3f &dist)
 
virtual const EGG::Vector3fgetCollisionTranslation () const
 
virtual ObjectCollisionBasecollision () const
 
- Public Member Functions inherited from Field::ObjectBase
 ObjectBase (const System::MapdataGeoObj &params)
 
 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 BoxColUnitgetUnit () const
 
const RailInterpolatorrailInterpolator () const
 
virtual const EGG::Vector3fgetPosition () const
 
virtual ObjectId id () const
 
const EGG::Vector3fpos () const
 
void setPos (const EGG::Vector3f &pos)
 
void setScale (const EGG::Vector3f &scale)
 
void setTransform (const EGG::Matrix34f &mat)
 
const EGG::Vector3fscale () const
 

Private Member Functions

void enterStill ()
 
void enterRevolving ()
 
void calcStill ()
 
void calcRevolving ()
 
- Private Member Functions inherited from Field::StateManager< ObjectSunDS >
 StateManager (ObjectSunDS *obj)
 Defined outside of the class declaration so that typename T will be a complete type.
 
void calc ()
 

Private Attributes

friend StateManager< ObjectSunDS >
 
const f32 m_revolutionSpeed
 Speed of sun revolving around the course.
 
const s32 m_startFrame
 The sun is inactive until this frame.
 
u32 m_stillDuration
 How long the sun remains stationary for before moving again.
 
- Private Attributes inherited from Field::StateManager< ObjectSunDS >
u16 m_currentStateId
 
s32 m_nextStateId
 
u32 m_currentFrame
 
std::span< u16m_entryIds
 
std::span< const StateManagerEntry< ObjectSunDS > > m_entries
 
ObjectSunDSm_obj
 

Static Private Attributes

static constexpr std::array< StateManagerEntry< ObjectSunDS >, 2 > STATE_ENTRIES
 

Additional Inherited Members

- Public Types inherited from Field::ObjectBase
enum class  eFlags {
  Position = 0 ,
  Rotation = 1 ,
  Matrix = 2 ,
  Scale = 3
}
 
typedef EGG::TBitFlag< u16, eFlags > Flags
 
- Protected Member Functions inherited from Field::ObjectCollidable
virtual const EGG::Vector3fcollisionCenter () const
 
void registerManagedObject ()
 
- Protected Member Functions inherited from Field::ObjectBase
void calcTransform ()
 
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)
 
- Static Protected Member Functions inherited from 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 Interpolate (f32 t, const EGG::Vector3f &v0, const EGG::Vector3f &v1)
 
- Protected Attributes inherited from Field::ObjectCollidable
ObjectCollisionBasem_collision
 
- Protected Attributes inherited from Field::ObjectBase
Render::DrawMdlm_drawMdl
 
Abstract::g3d::ResFilem_resFile
 
ObjectId m_id
 
RailInterpolatorm_railInterpolator
 
BoxColUnitm_boxColUnit
 
Flags m_flags
 
EGG::Vector3f m_pos
 
EGG::Vector3f m_rot
 
EGG::Vector3f m_scale
 
EGG::Matrix34f m_transform
 
const System::MapdataGeoObjm_mapObj
 

Constructor & Destructor Documentation

◆ ObjectSunDS()

Field::ObjectSunDS::ObjectSunDS ( const System::MapdataGeoObj & params)
0x806DDDD8

Definition at line 8 of file ObjectSunDS.cc.

Member Function Documentation

◆ calc()

void Field::ObjectSunDS::calc ( )
overridevirtual0x806DE03C

Reimplemented from Field::ObjectBase.

Definition at line 17 of file ObjectSunDS.cc.

◆ calcRevolving()

void Field::ObjectSunDS::calcRevolving ( )
inlineprivate0x806DE454

Definition at line 53 of file ObjectSunDS.hh.

◆ calcStill()

void Field::ObjectSunDS::calcStill ( )
inlineprivate0x806DE1E4

Definition at line 46 of file ObjectSunDS.hh.

◆ createCollision()

void Field::ObjectSunDS::createCollision ( )
inlineoverridevirtual

Reimplemented from Field::ObjectCollidable.

Definition at line 30 of file ObjectSunDS.hh.

◆ enterRevolving()

void Field::ObjectSunDS::enterRevolving ( )
inlineprivate0x806DE408

Definition at line 41 of file ObjectSunDS.hh.

◆ enterStill()

void Field::ObjectSunDS::enterStill ( )
inlineprivate0x806DE1C8

Definition at line 36 of file ObjectSunDS.hh.

◆ init()

void Field::ObjectSunDS::init ( )
inlineoverridevirtual0x806DDFD4

Reimplemented from Field::ObjectBase.

Definition at line 18 of file ObjectSunDS.hh.

◆ launchPointIdx()

s16 Field::ObjectSunDS::launchPointIdx ( )
nodiscardoverridevirtual0x806DE598

Used by ObjectSniper to check which object (if any) should be thrown.

Implements Field::ObjectProjectileLauncher.

Definition at line 39 of file ObjectSunDS.cc.

◆ loadFlags()

u32 Field::ObjectSunDS::loadFlags ( ) const
inlinenodiscardoverridevirtual0x806DE614

Reimplemented from Field::ObjectBase.

Definition at line 25 of file ObjectSunDS.hh.

Member Data Documentation

◆ m_revolutionSpeed

const f32 Field::ObjectSunDS::m_revolutionSpeed
private

Speed of sun revolving around the course.

Definition at line 55 of file ObjectSunDS.hh.

◆ m_startFrame

const s32 Field::ObjectSunDS::m_startFrame
private

The sun is inactive until this frame.

Definition at line 56 of file ObjectSunDS.hh.

◆ m_stillDuration

u32 Field::ObjectSunDS::m_stillDuration
private

How long the sun remains stationary for before moving again.

Definition at line 57 of file ObjectSunDS.hh.

◆ STATE_ENTRIES

std::array<StateManagerEntry<ObjectSunDS>, 2> Field::ObjectSunDS::STATE_ENTRIES
staticconstexprprivate
Initial value:
= {{
{0, &ObjectSunDS::enterStill, &ObjectSunDS::calcStill},
{1, &ObjectSunDS::enterRevolving, &ObjectSunDS::calcRevolving},
}}

Definition at line 59 of file ObjectSunDS.hh.

◆ StateManager< ObjectSunDS >

Definition at line 11 of file ObjectSunDS.hh.