Intersection math structs and functions
Plane struct (currently an alias for dmVMath::Vector4)
Returns the closest distance between a plane and a position
plane - plane equation
pos - position
distance - closest distance between plane and position
Frustum
m_Planes - ] plane equations: // left, right, bottom, top, near, far
Constructs a dmIntersection::Frustum from a View*Projection matrix
m - The matrix. Usually a "ViewProj" matrix
normalize - true if the normals should be normalized
frustum - the frustum output
Tests intersection between a frustum and a point
frustum - the frustum
pos - the position
skip_near_far - if true, the near+far planes of the frustum are ignored
intersects - Returns true if the objects intersect
Tests intersection between a frustum and a sphere
frustum - the frustum
pos - the center position of the sphere
radius - the radius of the sphere
skip_near_far - if true, the near+far planes of the frustum are ignored
intersects - Returns true if the objects intersect
Tests intersection between a frustum and a sphere
frustum - the frustum
pos - the center position of the sphere. The w component must be 1.
radius - the radius of the sphere
skip_near_far - if true, the near+far planes of the frustum are ignored
intersects - Returns true if the objects intersect
Tests intersection between a frustum and a sphere
frustum - the frustum
pos - the center position of the sphere
radius_sq - the squared radius of the sphere
skip_near_far - if true, the near+far planes of the frustum are ignored
intersects - Returns true if the objects intersect
Tests intersection between a frustum and a sphere
frustum - the frustum
pos - the center position of the sphere. The w component must be 1.
radius_sq - the squared radius of the sphere
skip_near_far - if true, the near+far planes of the frustum are ignored
intersects - Returns true if the objects intersect
Tests intersection between a frustum and an oriented bounding box (OBB)
frustum - the frustum
world - The world transform of the OBB
aabb_min - the minimum corner of the object. In local space.
aabb_max - the maximum corner of the object. In local space.
skip_near_far - if true, the near+far planes of the frustum are ignored
intersects - Returns true if the objects intersect