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  ObjectBasabasa
 Can be thought of as the bat "spawner". It's the class that manages an array of bats. More...
 
class  ObjectBasabasaDummy
 Represents a single bat. It's owned and managed by ObjectBasabasa. More...
 
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  ObjectBird
 Represents a group of birds. More...
 
class  ObjectBirdFollower
 Represents all but one of the birds in an @ObjectBird group. More...
 
class  ObjectBirdLeader
 The main bird within an ObjectBird. Other birds follow this leader. More...
 
class  ObjectBoble
 
class  ObjectBreakable
 
class  ObjectBulldozer
 Represents the bulldozers at the end of Toad's Factory. More...
 
class  ObjectCarA
 
class  ObjectCarTGE
 
class  ObjectChoropu
 Represents the MMM and rPG monty moles. More...
 
class  ObjectChoropuGround
 
class  ObjectChoropuHoll
 
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  ObjectCow
 The base class shared between ObjectCowLeader and ObjectCowFollower. More...
 
class  ObjectCowFollower
 A cow that follows a leader by sharing the same rail. More...
 
class  ObjectCowHerd
 The manager class that controls a group of cows. More...
 
class  ObjectCowLeader
 A cow who its own rail and whose position is not influenced by the path of the others. More...
 
class  ObjectCrane
 The moving crane platforms after the second turn of Toad's Factory. More...
 
class  ObjectDirector
 
class  ObjectDokan
 
class  ObjectDossun
 Base class for the various different Thwomp types in the game. More...
 
class  ObjectDossunc
 Holder class for one of various Thwomp "modes". More...
 
class  ObjectDossunNormal
 A Thwomp that remains in one position and stomps downward. More...
 
class  ObjectDossunSyuukai
 Thwomps that move along a rail and stomp. More...
 
class  ObjectDossunTsuibi
 Represents one of the two thwomps that oscillate and stomp in the long rBC hallway. More...
 
class  ObjectDossunTsuibiHolder
 The manager class for the pair of Thwomps in the long hallway on rBC. More...
 
class  ObjectDossunYokoMove
 Represents Thwomps that move sideways on the ground on rBC. More...
 
class  ObjectDrivable
 
class  ObjectDrivableDirector
 
class  ObjectEscalator
 Represents an individual escalator on Coconut Mall. More...
 
class  ObjectEscalatorGroup
 Represents a group of two escalators and the Pianta dancing in the middle. More...
 
class  ObjectFireball
 
class  ObjectFirebar
 
class  ObjectFireRing
 
class  ObjectFireSnake
 
class  ObjectFireSnakeKid
 
class  ObjectFireSnakeV
 
class  ObjectFlamePole
 The flamepole that erupts from a geyser on Bowser's Castle. More...
 
class  ObjectFlamePoleFoot
 Represents the geysers on Bowser's Castle. More...
 
class  ObjectFlamePoleV
 
class  ObjectFlowTable
 
class  ObjectHeyho
 Shy guys on DK Summit. More...
 
class  ObjectHeyhoBall
 The cannonball projectiles on GBA Shy Guy Beach. More...
 
class  ObjectHeyhoShip
 The ship on GBA Shy Guy Beach that shoots cannonballs. More...
 
class  ObjectHeyhoShipManager
 
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  ObjectKoopaBall
 
class  ObjectKoopaFigure64
 The Bowser statues on N64 Bowser's Castle. More...
 
class  ObjectKuribo
 
class  ObjectNoImpl
 
class  ObjectObakeBlock
 
class  ObjectObakeManager
 The manager class for SNES Ghost Valley 2 blocks. More...
 
class  ObjectOilSFC
 
class  ObjectPakkunF
 Represents the piranhas on GCN Mario Circuit. More...
 
class  ObjectParasolR
 
class  ObjectPenguin
 The base class for penguins on N64 Sherbet Land. More...
 
class  ObjectPenguinS
 Represents the penguins on N64 Sherbet Land that slide on their stomach. More...
 
class  ObjectPillar
 Represents the entirety of a pillar that falls on Dry Dry Ruins. More...
 
class  ObjectPillarBase
 The stationary portion of the Dry Dry Ruins pillars. It just acts as a wall. More...
 
class  ObjectPillarC
 Represents the part of the Dry Dry Ruins pillar that falls. More...
 
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  ObjectProjectile
 Abstract class that represents an object thrown by an ObjectProjectileLauncher. More...
 
class  ObjectProjectileLauncher
 Abstract class that moves along its own rail and throws projectiles. More...
 
class  ObjectPsea
 Represents the rising water on GCN Peach Beach and Delfino Pier battle stage. More...
 
class  ObjectPylon
 The traffic cones on Daisy Circuit. More...
 
class  ObjectRock
 The falling rocks on GCN DK Mountain. More...
 
class  ObjectSanbo
 
class  ObjectSandcone
 
class  ObjectShip64
 
class  ObjectSniper
 The base class for a manager object which is responsible for synchronizing a set of projectiles and a projectile launcher. More...
 
class  ObjectSunDS
 
class  ObjectSunManager
 Handles the synchronization between the ObjectSunDS and ObjectFireSnake projectiles. More...
 
class  ObjectTownBridge
 
class  ObjectTruckWagon
 The "spawner" for minecarts on Wario's Gold Mine. More...
 
class  ObjectTruckWagonCart
 The individual minecarts that spawn from the ObjectTruckWagon spawner. More...
 
class  ObjectTuribashi
 
class  ObjectTwistedWay
 The wavy road in Bowser's Castle. More...
 
class  ObjectVolcanoBall
 Represents a fireball that is launched from the volcanoes on Grumble Volcano. More...
 
class  ObjectVolcanoBallLauncher
 The manager class that launch fireballs on Grumble Volcano. More...
 
class  ObjectVolcanoPiece
 Represents an object that eventually shakes and then falls, e.g. the ultra rock on GV. More...
 
class  ObjectVolcanoRock
 The oscillating platforms before and after the indoor section on Grumble Volcano. More...
 
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
 Base class that represents different "states" for an object. More...
 
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 ,
  Psea = 0x2 ,
  Itembox = 0x65 ,
  DummyPole = 0x066 ,
  Woodbox = 0x70 ,
  SunDS = 0x72 ,
  WLWallGC = 0xcb ,
  CarA1 = 0xcc ,
  Basabasa = 0xcd ,
  HeyhoShipGBA = 0xce ,
  KoopaBall = 0xcf ,
  KartTruck = 0xd0 ,
  CarBody = 0xd1 ,
  W_Woodbox = 0xd3 ,
  ItemboxLine = 0xd5 ,
  VolcanoBall = 0xd6 ,
  PenguinS = 0xd7 ,
  PenguinM = 0xd8 ,
  Dossunc = 0xdb ,
  DossuncSoko = 0xdc ,
  Boble = 0xdd ,
  Seagull = 0xe3 ,
  BasabasaDummy = 0xe6 ,
  CarA2 = 0xe7 ,
  CarA3 = 0xe8 ,
  HeyhoBallGBA = 0xea ,
  DokanSFC = 0x12e ,
  CastleTree1c = 0x130 ,
  MarioTreeGCc = 0x134 ,
  PeachTreeGCc = 0x138 ,
  ObakeBlockSFCc = 0x13c ,
  WLDokanGC = 0x13f ,
  MarioGo64c = 0x140 ,
  KinokoT1 = 0x142 ,
  Pylon = 0x144 ,
  PalmTree = 0x145 ,
  Parasol = 0x146 ,
  HeyhoTreeGBAc = 0x14a ,
  GardenTreeDSc = 0x151 ,
  DKtreeA64c = 0x158 ,
  DKTreeB64c = 0x15a ,
  TownTreeDsc = 0x15b ,
  OilSFC = 0x15d ,
  ParasolR = 0x16e ,
  ObakeBlock2SFCc = 0x16f ,
  ObakeBlock3SFCc = 0x170 ,
  KoopaFigure64 = 0x18b ,
  Kuribo = 0x191 ,
  Choropu = 0x192 ,
  Cow = 0x193 ,
  PakkunF = 0x194 ,
  WLFirebarGC = 0x195 ,
  DKRockGC = 0x198 ,
  Sanbo = 0x199 ,
  Choropu2 = 0x19a ,
  TruckWagon = 0x19b ,
  Heyho = 0x19c ,
  Press = 0x19d ,
  PressSoko = 0x19e ,
  WLFireRingGC = 0x1a1 ,
  PakkunDokan = 0x1a2 ,
  FireSnake = 0x1a4 ,
  KoopaFirebar = 0x1a5 ,
  DCPillarC = 0x1a7 ,
  FireSnakeV = 0x1a8 ,
  PuchiPakkun = 0x1aa ,
  KinokoUd = 0x1f5 ,
  KinokoBend = 0x1f6 ,
  VolcanoRock = 0x1f7 ,
  BulldozerL = 0x1f8 ,
  BulldozerR = 0x1f9 ,
  KinokoNm = 0x1fa ,
  Crane = 0x1fb ,
  VolcanoPiece = 0x1fc ,
  FlamePole = 0x1fd ,
  TwistedWay = 0x1fe ,
  TownBridge = 0x1ff ,
  DKShip64 = 0x200 ,
  Turibashi = 0x202 ,
  FlamePoleEff = 0x203 ,
  Aurora = 0x204 ,
  DCPillar = 0x208 ,
  Sandcone = 0x209 ,
  FlamePoleV = 0x212 ,
  FlamePoleVBig = 0x216 ,
  Ami = 0x20e ,
  Mdush = 0x217 ,
  BeltEasy = 0x25a ,
  BeltCrossing = 0x25b ,
  BeltCurveA = 0x25c ,
  Escalator = 0x25e ,
  EscalatorGroup = 0x260
}
 
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)
 
template<typename T , void(T::*)() Enter, void(T::*)() Calc>
constexpr StateManagerEntry StateEntry (u16 id)
 

Variables

static f32 s_initialX
 Scoped within the TU so that ObjectBasabasa can set and ObjectBasabasaDummy can access.
 
static f32 s_initialY
 

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 202 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 102 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 132 of file ObjectId.hh.

◆ StateEntry()

template<typename T , void(T::*)() Enter, void(T::*)() Calc>
StateManagerEntry Field::StateEntry ( u16 id)
constexpr

Definition at line 16 of file StateManager.hh.

Variable Documentation

◆ s_initialX

f32 Field::s_initialX
static

Scoped within the TU so that ObjectBasabasa can set and ObjectBasabasaDummy can access.

Definition at line 12 of file ObjectBasabasa.cc.

◆ s_initialY

f32 Field::s_initialY
static

Definition at line 13 of file ObjectBasabasa.cc.