A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectDrivable.cc
1#include "ObjectDrivable.hh"
2
3#include "game/field/ObjectDrivableDirector.hh"
4
5namespace Field {
6
8ObjectDrivable::ObjectDrivable(const System::MapdataGeoObj &params) : ObjectBase(params) {}
9
11ObjectDrivable::~ObjectDrivable() = default;
12
14void ObjectDrivable::load() {
15 createCollision();
16 initCollision();
17 loadAABB(getCollisionRadius());
18
19 ObjectDrivableDirector::Instance()->addObject(this);
20}
21
23void ObjectDrivable::loadAABB(f32 radius) {
24 auto *boxColMgr = BoxColManager::Instance();
25 const EGG::Vector3f &pos = getPosition();
26 m_boxColUnit = boxColMgr->insertDrivable(radius, 0.0f, &pos, false, this);
27}
28
29} // namespace Field
Pertains to collision.
A 3D float vector.
Definition Vector.hh:83