54 m_bbox.Set(
SFVEC3F( aCenterPoint.x - aXSize / 2.0f, aCenterPoint.y - aYSize / 2.0f,
56 SFVEC3F( aCenterPoint.x + aXSize / 2.0f, aCenterPoint.y + aYSize / 2.0f,
66 if( ( t < FLT_EPSILON ) || ( t >= aHitInfo.
m_tHit ) )
98 if( ( t < FLT_EPSILON ) || ( t >= aMaxDistance ) )
117 return m_bbox.Intersects( aBBox );
OBJECT_3D(OBJECT_3D_TYPE aObjType)
const MATERIAL * m_material
bool Intersect(const RAY &aRay, HITINFO &aHitInfo) const override
bool Intersects(const BBOX_3D &aBBox) const override
XY_PLANE(const BBOX_3D &aBBox)
SFVEC3F GetDiffuseColor(const HITINFO &aHitInfo) const override
bool IntersectP(const RAY &aRay, float aMaxDistance) const override
Manage a bounding box defined by two SFVEC3F min max points.
const SFVEC3F GetExtent() const
SFVEC3F GetCenter() const
Return the center point of the bounding box.
Stores the hit information of a ray with a point on the surface of a object.
float m_tHit
( 4) distance
const OBJECT_3D * pHitObject
( 4) Object that was hitted
SFVEC3F m_HitNormal
(12) normal at the hit point
SFVEC3F m_HitPoint
(12) hit position
unsigned int m_dirIsNeg[3]
SFVEC3F at(float t) const