57 aCenterPoint.y - aYSize / 2.0f,
59 SFVEC3F( aCenterPoint.x + aXSize / 2.0f,
60 aCenterPoint.y + aYSize / 2.0f,
70 if( ( t < FLT_EPSILON ) ||
103 if( ( t < FLT_EPSILON ) ||
104 ( t >= aMaxDistance ) )
bool IntersectP(const RAY &aRay, float aMaxDistance) const override
Functions Intersect for shadow test.
bool Intersects(const CBBOX &aBBox) const
Function Intersects test if a bounding box intersects this box.
const CMATERIAL * m_material
float m_tHit
( 4) distance
void Set(const SFVEC3F &aPbMin, const SFVEC3F &aPbMax)
Function Set Set bounding box with new parameters.
SFVEC3F at(float t) const
bool Intersect(const RAY &aRay, HITINFO &aHitInfo) const override
Functions Intersect.
SFVEC3F m_HitPoint
(12) hit position
SFVEC3F GetCenter() const
Function GetCenter return the center point of the bounding box.
const SFVEC3F GetExtent() const
Function GetExtent.
SFVEC3F GetDiffuseColor(const HITINFO &aHitInfo) const override
unsigned int m_dirIsNeg[3]
CXYPLANE(const CBBOX &aBBox)
const COBJECT * pHitObject
( 4) Object that was hitted
bool Intersects(const CBBOX &aBBox) const override
Function Intersects.
Stores the hit information of a ray with a point on the surface of a object.
SFVEC3F m_HitNormal
(12) normal at the hit point
void PerturbeNormal(SFVEC3F &aNormal, const RAY &aRay, const HITINFO &aHitInfo) const
Class CBBOX manages a bounding box defined by two SFVEC3F min max points.
void Reset()
Function Reset reset the bounding box to zero and de-initialized it.