4 this->
centerPosition =
object->GetTransform()->GetPosition() +
object->GetCenterOffset();
10 this->
minimum = centerPosition - objectSize / 2.0f;
11 this->
maximum = centerPosition + objectSize / 2.0f;
56 minimumExt = bO->
position - sphereSize;
57 maximumExt = bO->
position + sphereSize;
Defines the BoundaryCube class for representing and managing axis-aligned bounding cubes.
Represents an axis-aligned bounding cube for collision detection and physics.
Vector3D GetMinimum()
Retrieves the minimum coordinates of the cube.
void Update(float dT, Vector3D acceleration, Quaternion rotation)
Updates the cube's state based on time, acceleration, and rotation.
Vector3D velocity
Velocity of the cube.
void CollideSphere(float elasticity, BoundarySphere *bO)
Handles collision with a BoundarySphere.
Vector3D GetSize()
Retrieves the size of the cube.
Vector3D position
Current position of the cube.
Vector3D GetMaximum()
Retrieves the maximum coordinates of the cube.
Vector3D centerPosition
Center position of the bounding cube.
Vector3D GetPosition()
Retrieves the current position of the cube.
BoundaryCube(Object3D *object)
Constructs a BoundaryCube object based on the given 3D object.
Vector3D IsIntersecting(BoundaryCube *bO)
Checks for intersection with another BoundaryCube.
Vector3D minimum
Minimum coordinates of the bounding cube.
Vector3D maximum
Maximum coordinates of the bounding cube.
Quaternion previousRotation
Previous rotation of the object.
Represents a spherical boundary object for motion and collision simulations.
Vector3D velocity
Velocity vector of the sphere.
Vector3D position
Current position of the sphere.
float GetRadius()
Gets the radius of the sphere.
static T Constrain(T value, T minimum, T maximum)
Constrains a value between minimum and maximum.
Represents a 3D object with geometry, material, and transformation data.
A mathematical construct representing a rotation in 3D space.
Quaternion MultiplicativeInverse() const
Returns the multiplicative inverse of this quaternion, such that q * q^-1 = identity.
Vector2D RotateVector(const Vector2D &v) const
Rotates a 2D vector by this quaternion, projecting it in 2D.
Quaternion Multiply(const Quaternion &quaternion) const
Multiplies (composes) this quaternion with another (order matters).
Represents a 3D vector (X, Y, Z) and provides methods for vector arithmetic.
float Z
The Z-component of the 3D vector.
float X
The X-component of the 3D vector.
float Y
The Y-component of the 3D vector.