A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
ObjectWoodbox.cc
1#include "ObjectWoodbox.hh"
2
3namespace Field {
4
6ObjectWoodbox::ObjectWoodbox(const System::MapdataGeoObj &params) : ObjectBreakable(params) {}
7
9ObjectWoodbox::~ObjectWoodbox() = default;
10
12void ObjectWoodbox::calcCollisionTransform() {
13 constexpr f32 HALF_SIZE = 100.0f;
14 constexpr EGG::Vector3f POS_OFFSET = EGG::Vector3f(0.0f, HALF_SIZE, 0.0f);
15
16 if (!m_collision) {
17 return;
18 }
19
20 calcTransform();
21 EGG::Vector3f nextPos = m_pos + POS_OFFSET;
22 m_transform.setBase(3, nextPos);
23 m_collision->transform(m_transform, m_scale, getCollisionTranslation());
24}
25
26} // namespace Field
Pertains to collision.
A 3D float vector.
Definition Vector.hh:87