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

Detailed Description

Pertains to collision.

TODO: Also need 806d2908.

Classes

struct  BoxColHighPoint
 
struct  BoxColLowPoint
 
class  BoxColManager
 Spatial indexing manager for entities with dynamic collision. More...
 
struct  BoxColUnit
 A representation of the boundaries of an entity that has dynamic collision. More...
 
class  CollisionDirector
 Manages the caching of colliding KCL triangles and exposes queries for collision checks. More...
 
struct  CollisionInfo
 
struct  CollisionInfoPartial
 
class  CourseColMgr
 Manager for course KCL interactions. More...
 
struct  GJKState
 Houses the state of an object in terms of the Gilbert–Johnson–Keerthi (GJK) algorithm. More...
 
class  KColData
 Performs lookups for KCL triangles. More...
 
struct  KColHeader
 The header of the KCL file format. It is 0x3C bytes long (for Mario Kart Wii). More...
 
class  ObjColMgr
 Manager for an object's KCL interactions. More...
 
class  ObjectAmi
 
class  ObjectAurora
 
class  ObjectBase
 
class  ObjectBelt
 The base class for a conveyer belt which induces road velocity. More...
 
class  ObjectBeltCrossing
 The conveyers in the first section of Toad's Factory. More...
 
class  ObjectBeltCurveA
 The curved conveyer belt at the end of the factory on Toad's Factory. More...
 
class  ObjectBeltEasy
 The conveyers outside of the factory on Toad's Factory. More...
 
class  ObjectBoble
 
class  ObjectBreakable
 
class  ObjectBulldozer
 Represents the bulldozers at the end of Toad's Factory. More...
 
class  ObjectCarTGE
 
class  ObjectCollidable
 
class  ObjectCollisionBase
 The base class that all objects' collision inherits from. More...
 
class  ObjectCollisionBox
 
class  ObjectCollisionConvexHull
 Smallest convex shape that encloses a given set of points. More...
 
class  ObjectCollisionCylinder
 
class  ObjectCollisionKart
 Relates a KartObject with its convex hull representation. More...
 
class  ObjectCollisionSphere
 
class  ObjectCrane
 The moving crane platforms after the second turn of Toad's Factory. More...
 
class  ObjectDirector
 
class  ObjectDokan
 
class  ObjectDrivable
 
class  ObjectDrivableDirector
 
class  ObjectFireball
 
class  ObjectFirebar
 
class  ObjectFireRing
 
class  ObjectFlowTable
 
class  ObjectHighwayManager
 
class  ObjectHitTable
 
class  ObjectItemboxLine
 Object which represents a line of itemboxes, a brick block which may be pressed into an itembox, and a stomper. The stomper is held and managed by ObjectItemboxPress. More...
 
class  ObjectItemboxPress
 Responsible for stomper state management. More...
 
class  ObjectKCL
 
class  ObjectKinoko
 The base class for a mushroom object with jump pad properties. More...
 
class  ObjectKinokoBend
 Mushrooms which bend in a certain direction. More...
 
class  ObjectKinokoNm
 The class for a mushroom object with normal road properties, for the most part. More...
 
class  ObjectKinokoUd
 Mushrooms which oscillate up and down. The stem does not move. More...
 
class  ObjectKuribo
 
class  ObjectNoImpl
 
class  ObjectObakeBlock
 
class  ObjectObakeManager
 The manager class for SNES Ghost Valley 2 blocks. More...
 
class  ObjectOilSFC
 
class  ObjectParasolR
 
class  ObjectPress
 Represents the Toad's Factory stompers. More...
 
class  ObjectPressSenko
 The stompers on the left and right side of the first TF factory room. More...
 
class  ObjectSanbo
 
class  ObjectSandcone
 
class  ObjectTownBridge
 
class  ObjectTuribashi
 
class  ObjectWLWallGC
 
class  ObjectWoodbox
 
class  ObjectWoodboxW
 
class  ObjectWoodboxWSub
 
class  Rail
 
class  RailInterpolator
 
class  RailLine
 
class  RailLinearInterpolator
 
struct  RailLineTransition
 
class  RailManager
 
class  RailSmoothInterpolator
 
class  RailSpline
 
struct  RailSplineTransition
 
struct  SObjectCollisionSet
 Structure of the ObjFlow.bin table entry. Contains dependencies and collision parameters. More...
 
class  StateManager
 
class  StateManager< ObjectCarTGE >
 
class  StateManager< ObjectKuribo >
 
class  StateManagerBase
 
struct  StateManagerEntry
 

Typedefs

typedef EGG::TBitFlag< u32, eBoxColFlagBoxColFlag
 
typedef bool(KColData::* CollisionCheckFunc) (f32 *distOut, EGG::Vector3f *fnrmOut, u16 *attributeOut)
 
typedef u32 KCLTypeMask
 
typedef ObjectDokan ObjectPuchiPakkun
 This is just to help with readability. The rMR piranhas are really just pipes.
 

Enumerations

enum class  eBoxColFlag {
  Driver = 0 ,
  Object = 3 ,
  Drivable = 4 ,
  PermRecalcAABB = 8 ,
  Intangible = 9 ,
  Active = 10 ,
  TempRecalcAABB = 11
}
 A bitfield that represents the state and type of a given BoxColUnit. More...
 
enum class  ObjectId {
  None = 0x0 ,
  Itembox = 0x65 ,
  DummyPole = 0x066 ,
  Woodbox = 0x70 ,
  WLWallGC = 0xcb ,
  KartTruck = 0xd0 ,
  CarBody = 0xd1 ,
  W_Woodbox = 0xd3 ,
  ItemboxLine = 0xd5 ,
  Boble = 0xdd ,
  DokanSFC = 0x12e ,
  CastleTree1c = 0x130 ,
  MarioTreeGCc = 0x134 ,
  PeachTreeGCc = 0x138 ,
  ObakeBlockSFCc = 0x13c ,
  WLDokanGC = 0x13f ,
  MarioGo64c = 0x140 ,
  KinokoT1 = 0x142 ,
  PalmTree = 0x145 ,
  Parasol = 0x146 ,
  HeyhoTreeGBAc = 0x14a ,
  GardenTreeDSc = 0x151 ,
  DKtreeA64c = 0x158 ,
  DKTreeB64c = 0x15a ,
  TownTreeDsc = 0x15b ,
  OilSFC = 0x15d ,
  ParasolR = 0x16e ,
  ObakeBlock2SFCc = 0x16f ,
  ObakeBlock3SFCc = 0x170 ,
  Kuribo = 0x191 ,
  WLFirebarGC = 0x195 ,
  Sanbo = 0x199 ,
  Press = 0x19d ,
  PressSoko = 0x19e ,
  WLFireRingGC = 0x1a1 ,
  PakkunDokan = 0x1a2 ,
  PuchiPakkun = 0x1aa ,
  KinokoUd = 0x1f5 ,
  KinokoBend = 0x1f6 ,
  BulldozerL = 0x1f8 ,
  BulldozerR = 0x1f9 ,
  KinokoNm = 0x1fa ,
  Crane = 0x1fb ,
  TownBridge = 0x1ff ,
  Turibashi = 0x202 ,
  Aurora = 0x204 ,
  Sandcone = 0x209 ,
  Ami = 0x20e ,
  Mdush = 0x217 ,
  BeltEasy = 0x25a ,
  BeltCrossing = 0x25b ,
  BeltCurveA = 0x25c
}
 
enum class  BlacklistedObjectId {
  Itembox = 0x65 ,
  CastleTree2 = 0x131 ,
  CastleFlower1 = 0x132 ,
  MarioTreeGC = 0x133 ,
  DonkyTree1GC = 0x135 ,
  DonkyTree2GC = 0x136 ,
  PeachTreeGC = 0x137 ,
  PeachHunsuiGC = 0x141 ,
  GardenTreeDS = 0x150 ,
  FlagA1 = 0x152 ,
  FlagA2 = 0x153 ,
  FlagB1 = 0x154 ,
  FlagB2 = 0x155 ,
  FlagA3 = 0x156 ,
  DKTreeA64 = 0x157 ,
  DKTreeB64 = 0x159 ,
  MiiBalloon = 0x160 ,
  Windmill = 0x161 ,
  TownTreeDS = 0x163 ,
  Hanabi = 0x16a ,
  LightHouse = 0x16d ,
  FlagA5 = 0x180 ,
  SentakuDS = 0x189 ,
  FlagB3 = 0x2c4 ,
  FlagB4 = 0x2c7 ,
  UtsuboDokan = 0x2d6 ,
  EnvSnow = 0x2ef
}
 
enum class  KinokoType : u16 {
  Light = 0 ,
  Dark = 1
}
 
enum class  CollisionMode {
  None = 0 ,
  Sphere = 1 ,
  Cylinder = 2 ,
  Box = 3 ,
  Ground = 4 ,
  Original = 5
}
 Maps to SObjectCollisionSet::mode. Determines what type of collision an object has. More...
 

Functions

 STATIC_ASSERT (sizeof(KColHeader)==0x3c)
 
static constexpr bool IsObjectBlacklisted (u16 id)
 
 STATIC_ASSERT (sizeof(SObjectCollisionSet)==0x74)
 

Typedef Documentation

◆ BoxColFlag

Definition at line 35 of file BoxColManager.hh.

◆ CollisionCheckFunc

typedef bool( KColData::* Field::CollisionCheckFunc) (f32 *distOut, EGG::Vector3f *fnrmOut, u16 *attributeOut)

Definition at line 18 of file CourseColMgr.hh.

◆ KCLTypeMask

typedef u32 Field::KCLTypeMask

Definition at line 193 of file KCollisionTypes.hh.

◆ ObjectPuchiPakkun

This is just to help with readability. The rMR piranhas are really just pipes.

Definition at line 8 of file ObjectPuchiPakkun.hh.

Enumeration Type Documentation

◆ BlacklistedObjectId

enum class Field::BlacklistedObjectId
strong

Definition at line 62 of file ObjectId.hh.

◆ CollisionMode

enum class Field::CollisionMode
strong

Maps to SObjectCollisionSet::mode. Determines what type of collision an object has.

Definition at line 8 of file ObjectFlowTable.hh.

◆ eBoxColFlag

enum class Field::eBoxColFlag
strong

A bitfield that represents the state and type of a given BoxColUnit.

The lower 8 bits represent the type, while the remaining bits represent the state. There are originally two flags for objects, but one is for CPUs, which we can ignore for now.

Enumerator
PermRecalcAABB 

Recalculate this unit's spatial indexing every frame.

Intangible 

Ignore collision with the unit.

TempRecalcAABB 

Only recalculate once.

Definition at line 26 of file BoxColManager.hh.

◆ KinokoType

enum class Field::KinokoType : u16
strong

Definition at line 7 of file ObjectKinoko.hh.

◆ ObjectId

enum class Field::ObjectId
strong

Definition at line 7 of file ObjectId.hh.

Function Documentation

◆ IsObjectBlacklisted()

static constexpr bool Field::IsObjectBlacklisted ( u16 id)
staticconstexpr

Definition at line 92 of file ObjectId.hh.