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

Description

Definition at line 8 of file ObjectKCL.hh.

Inheritance diagram for Field::ObjectKCL:

Public Member Functions

 ObjectKCL (const System::MapdataGeoObj &params)
 
void createCollision () override
 
void calcCollisionTransform () override
 
const EGG::Vector3fgetPosition () const override
 
f32 getCollisionRadius () const override
 
void initCollision () override
 
bool checkPointPartial (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointPartialPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointFull (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkPointFullPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkSpherePartial (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSpherePartialPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereFull (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereFullPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
void narrScLocal (f32 radius, const EGG::Vector3f &pos, KCLTypeMask mask, u32 timeOffset) override
 
bool checkPointCachedPartial (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointCachedPartialPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut) override
 
bool checkPointCachedFull (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkPointCachedFullPush (const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut) override
 
bool checkSphereCachedPartial (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereCachedPartialPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfoPartial *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereCachedFull (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
bool checkSphereCachedFullPush (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset) override
 
virtual void update (u32 timeOffset)
 
virtual void calcScale (u32 timeOffset)
 
virtual void setMovingObjVel (const EGG::Vector3f &v)
 
virtual const EGG::Matrix34fgetUpdatedMatrix (u32 timeOffset)
 
virtual f32 getScaleY (u32) const
 
virtual f32 colRadiusAdditionalLength () const
 
virtual bool shouldCheckColNoPush () const
 
virtual bool shouldCheckColPush () const
 
virtual bool checkCollision (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset)
 
virtual bool checkCollisionCached (f32 radius, const EGG::Vector3f &pos, const EGG::Vector3f &prevPos, KCLTypeMask mask, CollisionInfo *info, KCLTypeMask *maskOut, u32 timeOffset)
 
- Public Member Functions inherited from Field::ObjectDrivable
 ObjectDrivable (const System::MapdataGeoObj &params)
 
void load () override
 
virtual void loadAABB (f32 radius)
 
- 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 init ()
 
virtual void calc ()
 
virtual void calcModel ()
 
virtual const char * getResources () const
 
virtual void loadGraphics ()
 
virtual void loadAnims ()
 
virtual void loadRail ()
 
virtual const char * getName () const
 
virtual u32 loadFlags () 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 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
 

Protected Attributes

ObjColMgrm_objColMgr
 
EGG::Vector3f m_kclMidpoint
 
f32 m_bboxHalfSideLength
 
s32 m_lastMtxUpdateFrame
 
s32 m_lastScaleUpdateFrame
 
- 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
 

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::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)
 

Constructor & Destructor Documentation

◆ ObjectKCL()

Field::ObjectKCL::ObjectKCL ( const System::MapdataGeoObj & params)
0x8081A980

Definition at line 11 of file ObjectKCL.cc.

◆ ~ObjectKCL()

Field::ObjectKCL::~ObjectKCL ( )
override0x8067EAFC

Definition at line 15 of file ObjectKCL.cc.

Member Function Documentation

◆ calcCollisionTransform()

void Field::ObjectKCL::calcCollisionTransform ( )
overridevirtual0x80681490

Implements Field::ObjectBase.

Definition at line 29 of file ObjectKCL.cc.

◆ calcScale()

void Field::ObjectKCL::calcScale ( u32 timeOffset)
virtual0x8081AF28

Definition at line 262 of file ObjectKCL.cc.

◆ checkCollision()

bool Field::ObjectKCL::checkCollision ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardvirtual0x8081AFB4

Definition at line 284 of file ObjectKCL.cc.

◆ checkCollisionCached()

bool Field::ObjectKCL::checkCollisionCached ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardvirtual0x8081B16C

Definition at line 297 of file ObjectKCL.cc.

◆ checkPointCachedFull()

bool Field::ObjectKCL::checkPointCachedFull ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80680C84

Implements Field::ObjectDrivable.

Definition at line 169 of file ObjectKCL.cc.

◆ checkPointCachedFullPush()

bool Field::ObjectKCL::checkPointCachedFullPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80680D3C

Implements Field::ObjectDrivable.

Definition at line 179 of file ObjectKCL.cc.

◆ checkPointCachedPartial()

bool Field::ObjectKCL::checkPointCachedPartial ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80680B14

Implements Field::ObjectDrivable.

Definition at line 149 of file ObjectKCL.cc.

◆ checkPointCachedPartialPush()

bool Field::ObjectKCL::checkPointCachedPartialPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80680BCC

Implements Field::ObjectDrivable.

Definition at line 159 of file ObjectKCL.cc.

◆ checkPointFull()

bool Field::ObjectKCL::checkPointFull ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80681268

Implements Field::ObjectDrivable.

Definition at line 75 of file ObjectKCL.cc.

◆ checkPointFullPush()

bool Field::ObjectKCL::checkPointFullPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x80681320

Implements Field::ObjectDrivable.

Definition at line 85 of file ObjectKCL.cc.

◆ checkPointPartial()

bool Field::ObjectKCL::checkPointPartial ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x806810F8

Implements Field::ObjectDrivable.

Definition at line 55 of file ObjectKCL.cc.

◆ checkPointPartialPush()

bool Field::ObjectKCL::checkPointPartialPush ( const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut )
nodiscardoverridevirtual0x806811B0

Implements Field::ObjectDrivable.

Definition at line 65 of file ObjectKCL.cc.

◆ checkSphereCachedFull()

bool Field::ObjectKCL::checkSphereCachedFull ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80680A08

Implements Field::ObjectDrivable.

Definition at line 217 of file ObjectKCL.cc.

◆ checkSphereCachedFullPush()

bool Field::ObjectKCL::checkSphereCachedFullPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80680B04

Implements Field::ObjectDrivable.

Definition at line 231 of file ObjectKCL.cc.

◆ checkSphereCachedPartial()

bool Field::ObjectKCL::checkSphereCachedPartial ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x806807F0

Implements Field::ObjectDrivable.

Definition at line 189 of file ObjectKCL.cc.

◆ checkSphereCachedPartialPush()

bool Field::ObjectKCL::checkSphereCachedPartialPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x806808FC

Implements Field::ObjectDrivable.

Definition at line 203 of file ObjectKCL.cc.

◆ checkSphereFull()

bool Field::ObjectKCL::checkSphereFull ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80680FEC

Implements Field::ObjectDrivable.

Definition at line 123 of file ObjectKCL.cc.

◆ checkSphereFullPush()

bool Field::ObjectKCL::checkSphereFullPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfo * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x806810E8

Implements Field::ObjectDrivable.

Definition at line 136 of file ObjectKCL.cc.

◆ checkSpherePartial()

bool Field::ObjectKCL::checkSpherePartial ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80680DF4

Implements Field::ObjectDrivable.

Definition at line 95 of file ObjectKCL.cc.

◆ checkSpherePartialPush()

bool Field::ObjectKCL::checkSpherePartialPush ( f32 radius,
const EGG::Vector3f & pos,
const EGG::Vector3f & prevPos,
KCLTypeMask mask,
CollisionInfoPartial * info,
KCLTypeMask * maskOut,
u32 timeOffset )
nodiscardoverridevirtual0x80680EF0

Implements Field::ObjectDrivable.

Definition at line 109 of file ObjectKCL.cc.

◆ colRadiusAdditionalLength()

virtual f32 Field::ObjectKCL::colRadiusAdditionalLength ( ) const
inlinenodiscardvirtual0x8068143C

Definition at line 89 of file ObjectKCL.hh.

◆ createCollision()

void Field::ObjectKCL::createCollision ( )
overridevirtual0x8081AA58

Implements Field::ObjectBase.

Definition at line 20 of file ObjectKCL.cc.

◆ getCollisionRadius()

f32 Field::ObjectKCL::getCollisionRadius ( ) const
inlineoverridevirtual0x80687D70

Reimplemented from Field::ObjectDrivable.

Definition at line 22 of file ObjectKCL.hh.

◆ getPosition()

const EGG::Vector3f & Field::ObjectKCL::getPosition ( ) const
inlinenodiscardoverridevirtual0x80681448

Reimplemented from Field::ObjectBase.

Definition at line 17 of file ObjectKCL.hh.

◆ getScaleY()

virtual f32 Field::ObjectKCL::getScaleY ( u32 ) const
inlinenodiscardvirtual0x80687DB0

Definition at line 84 of file ObjectKCL.hh.

◆ getUpdatedMatrix()

const EGG::Matrix34f & Field::ObjectKCL::getUpdatedMatrix ( u32 timeOffset)
nodiscardvirtual0x807FEAC0

Definition at line 278 of file ObjectKCL.cc.

◆ initCollision()

void Field::ObjectKCL::initCollision ( )
overridevirtual0x8081AB4C

Reimplemented from Field::ObjectDrivable.

Definition at line 34 of file ObjectKCL.cc.

◆ narrScLocal()

void Field::ObjectKCL::narrScLocal ( f32 radius,
const EGG::Vector3f & pos,
KCLTypeMask mask,
u32 timeOffset )
overridevirtual0x806807E8

Reimplemented from Field::ObjectDrivable.

Definition at line 143 of file ObjectKCL.cc.

◆ setMovingObjVel()

virtual void Field::ObjectKCL::setMovingObjVel ( const EGG::Vector3f & v)
inlinevirtual0x80681450

Definition at line 77 of file ObjectKCL.hh.

◆ shouldCheckColNoPush()

virtual bool Field::ObjectKCL::shouldCheckColNoPush ( ) const
inlinenodiscardvirtual0x0x806808EC

Definition at line 94 of file ObjectKCL.hh.

◆ shouldCheckColPush()

virtual bool Field::ObjectKCL::shouldCheckColPush ( ) const
inlinenodiscardvirtual0x806809F8

Definition at line 99 of file ObjectKCL.hh.

◆ update()

void Field::ObjectKCL::update ( u32 timeOffset)
virtual0x8081AD6C

Definition at line 238 of file ObjectKCL.cc.

Member Data Documentation

◆ m_bboxHalfSideLength

f32 Field::ObjectKCL::m_bboxHalfSideLength
protected

Definition at line 113 of file ObjectKCL.hh.

◆ m_kclMidpoint

EGG::Vector3f Field::ObjectKCL::m_kclMidpoint
protected

Definition at line 112 of file ObjectKCL.hh.

◆ m_lastMtxUpdateFrame

s32 Field::ObjectKCL::m_lastMtxUpdateFrame
protected

Definition at line 114 of file ObjectKCL.hh.

◆ m_lastScaleUpdateFrame

s32 Field::ObjectKCL::m_lastScaleUpdateFrame
protected

Definition at line 115 of file ObjectKCL.hh.

◆ m_objColMgr

ObjColMgr* Field::ObjectKCL::m_objColMgr
protected

Definition at line 111 of file ObjectKCL.hh.