1#include "ObjectCollisionSphere.hh"
6ObjectCollisionSphere::ObjectCollisionSphere(f32 radius,
const EGG::Vector3f ¢er)
7 : m_radius(radius), m_pos(center), m_scaledRadius(radius), m_scaledPos(center),
11ObjectCollisionSphere::~ObjectCollisionSphere() =
default;
16 m_translation = speed;
18 if (scale.x != 1.0f) {
19 m_scaledPos = m_pos * scale.x;
20 m_scaledRadius = m_radius * scale.x;
24 m_center = m_worldPos - speed;
32 return m_worldPos.
dot(v) > m_center.dot(v) ? m_worldPos : m_center;
Vector3f multVector(const Vector3f &vec) const
Multiplies a vector by a matrix.
f32 dot(const Vector3f &rhs) const
The dot product between two vectors.