5#ifndef NIRT_PLANE_3D_HPP_INCLUDED
6#define NIRT_PLANE_3D_HPP_INCLUDED
8#include <nirtcpp/core/engine/irrMath.hpp>
9#include <nirtcpp/core/engine/vector3d.hpp>
139 if (
d < -ROUNDING_ERROR_f32)
142 if (
d > ROUNDING_ERROR_f32)
143 return ISREL3D_FRONT;
145 return ISREL3D_PLANAR;
165 return cross.getLength() > core::ROUNDING_ERROR_f32;
182 if (
fabs(
det) < ROUNDING_ERROR_f64 )
217 return F32_LOWER_EQUAL_0 (
d );
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
Template plane class with some intersection testing methods.
Definition plane3d.hpp:34
bool getIntersectionWithPlanes(const plane3d< T > &o1, const plane3d< T > &o2, vector3d< T > &outPoint) const
Get the intersection point with two other planes if there is one.
Definition plane3d.hpp:195
T D
Distance from origin.
Definition plane3d.hpp:231
bool getIntersectionWithPlane(const plane3d< T > &other, vector3d< T > &outLinePoint, vector3d< T > &outLineVect) const
Intersects this plane with another.
Definition plane3d.hpp:173
vector3d< T > Normal
Normal vector of the plane.
Definition plane3d.hpp:228
vector3d< T > getMemberPoint() const
Gets a member point of the plane.
Definition plane3d.hpp:155
EIntersectionRelation3D classifyPointRelation(const vector3d< T > &point) const
Classifies the relation of a point to this plane.
Definition plane3d.hpp:135
void recalculateD(const vector3d< T > &MPoint)
Recalculates the distance from origin by applying a new member point to the plane.
Definition plane3d.hpp:149
bool getIntersectionWithLine(const vector3d< T > &linePoint, const vector3d< T > &lineVect, vector3d< T > &outIntersection) const
Get an intersection with a 3d line.
Definition plane3d.hpp:86
bool existsIntersection(const plane3d< T > &other) const
Tests if there is an intersection with the other plane.
Definition plane3d.hpp:162
f32 getKnownIntersectionWithLine(const vector3d< T > &linePoint1, const vector3d< T > &linePoint2) const
Get percentage of line between two points where an intersection with this plane happens.
Definition plane3d.hpp:107
bool isFrontFacing(const vector3d< T > &lookDirection) const
Test if the triangle would be front or backfacing from any point.
Definition plane3d.hpp:214
T getDistanceTo(const vector3d< T > &point) const
Get the distance to a point.
Definition plane3d.hpp:222
bool getIntersectionWithLimitedLine(const vector3d< T > &linePoint1, const vector3d< T > &linePoint2, vector3d< T > &outIntersection) const
Get an intersection with a 3d line, limited between two 3d points.
Definition plane3d.hpp:121
EIntersectionRelation3D
Enumeration for intersection relations of 3d objects.
Definition plane3d.hpp:18
bool equals(const T a, const T b, const T tolerance=roundingError< T >())
returns if a equals b, taking possible rounding errors into account
Definition irrMath.hpp:243
As of Nirtcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
double f64
64 bit floating point variable.
Definition irrTypes.hpp:114
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110