3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Math::BoundingPlane Struct Reference

Represents a plane with the equation p(x,y,z) = Normal.X * x + Normal.Y * y + Normal.Z * z + D. More...

#include <BoundingPlane.hpp>

Collaboration diagram for Engine3DRadSpace.Math::BoundingPlane:

Public Member Functions

bool Intersects (const BoundingBox &box) const
 Does this plane intersect with the given bounding box?
bool Intersects (const BoundingSphere &sphere) const
 Does this plane intersect with the given bounding sphere?
bool Intersects (const Ray &ray) const
 Does this plane intersect with the given ray?
bool Contains (const Vector3 &p) const
 Is p on this plane?

Public Attributes

Vector3 Normal
 Normal vector of the plane. Should be normalized.
float D = 0
 Distance from the origin.

Detailed Description

Represents a plane with the equation p(x,y,z) = Normal.X * x + Normal.Y * y + Normal.Z * z + D.

Member Function Documentation

◆ Contains()

bool Engine3DRadSpace.Math::BoundingPlane::Contains ( const Vector3 & p) const

Is p on this plane?

Parameters
pPoint p
Returns
True if p is on this plane, false otherwise.

◆ Intersects() [1/3]

bool BoundingPlane::Intersects ( const BoundingBox & box) const

Does this plane intersect with the given bounding box?

Parameters
boxThe bounding box to test for intersection
Returns
True if this plane intersects with the given bounding box, false otherwise.

◆ Intersects() [2/3]

bool BoundingPlane::Intersects ( const BoundingSphere & sphere) const

Does this plane intersect with the given bounding sphere?

Parameters
sphereThe bounding sphere to test for intersection

◆ Intersects() [3/3]

bool BoundingPlane::Intersects ( const Ray & ray) const

Does this plane intersect with the given ray?

Parameters
rayThe ray to test for intersection
Returns
True if this plane intersects with the given ray, false otherwise.

Member Data Documentation

◆ D

float Engine3DRadSpace.Math::BoundingPlane::D = 0

Distance from the origin.

◆ Normal

Vector3 Engine3DRadSpace.Math::BoundingPlane::Normal

Normal vector of the plane. Should be normalized.


The documentation for this struct was generated from the following files: