nlib
|
The class with the collection of functions that determine intersections. More...
#include "nn/nlib/simd/SimdGeometry.h"
Public Types | |
enum | PlaneResult { kPlaneFront = 0, kPlaneInterect = 1, kPlaneBack = 2 } |
The return value types when determining intersection with a plane. The front of the plane is on the same side as the same direction of the normal of the plane. More... | |
Static Public Member Functions | |
static SimdVector | PlaneLine (SimdPlaneArg plane, SimdVectorArg line_point, SimdVectorArg line_dir_normalized) noexcept |
Calculates the point where a line intersects with a plane in three-dimensional space. More... | |
static SimdVector | PlaneRay (SimdPlaneArg plane, SimdVectorArg ray_point, SimdVectorArg ray_dir_normalized) noexcept |
Calculates the point where a ray intersects with a plane in three-dimensional space. More... | |
static SimdVector | PlaneSegment (SimdPlaneArg plane, SimdVectorArg segment_point0, SimdVectorArg segment_point1) noexcept |
Calculates the point where a line segment intersects with a plane in three-dimensional space. More... | |
static bool | SphereRay (float *distance, SimdSphereArg sphere, SimdVectorArg ray_point, SimdVectorArg ray_dir_normalized) noexcept |
Determines whether a sphere and ray intersect in three-dimensional space. More... | |
static bool | TriangleRay (float *distance, SimdVectorArg triangle_point0, SimdVectorArg triangle_point1, SimdVectorArg triangle_point2, SimdVectorArg ray_point, SimdVectorArg ray_dir_normalized) noexcept |
Determines whether a triangle and ray intersect in three-dimensional space. More... | |
static PlaneResult | TrianglePlane (SimdVectorArg triangle_point0, SimdVectorArg triangle_point1, SimdVectorArg triangle_point2, SimdPlaneArg plane_normalized) noexcept |
Determines whether a triangle and plane intersect in three-dimensional space. More... | |
static PlaneResult | SpherePlane (SimdSphereArg sphere, SimdPlaneArg plane_normalized) noexcept |
Determines whether a sphere and plane intersect in three-dimensional space. More... | |
static bool | SphereSphere (SimdSphereArg sphere0, SimdSphereArg sphere1) noexcept |
Determines whether two spheres intersect in three-dimensional space. More... | |
static f128x2 | PlanePlane (SimdPlaneArg plane0, SimdPlaneArg plane1) noexcept |
Determines whether two planes intersect in three-dimensional space. More... | |
static bool | SphereTriangle (SimdSphereArg sphere, SimdVectorArg triangle_point0, SimdVectorArg triangle_point1, SimdVectorArg triangle_point2) noexcept |
Determines whether a sphere and triangle intersect in three-dimensional space. More... | |
static PlaneResult | AxisAlignedBoxPlane (const AxisAlignedBox &aabb, SimdPlaneArg plane_normalized) noexcept |
Determines whether an AABB and plane intersect in three-dimensional space. More... | |
static bool | AxisAlignedBoxRay (const AxisAlignedBox &aabb, SimdVectorArg ray_point, SimdVectorArg ray_dir_normalized) noexcept |
Determines whether an AABB and ray intersect in three-dimensional space. More... | |
static bool | AxisAlignedBoxSphere (const AxisAlignedBox &aabb, SimdSphereArg sphere) noexcept |
Determines whether an AABB and sphere intersect in three-dimensional space. More... | |
static bool | AxisAlignedBoxAxisAlignedBox (const AxisAlignedBox &aabb0, const AxisAlignedBox &aabb1) noexcept |
Determines whether two AABBs intersect in three-dimensional space. More... | |
static bool | AxisAlignedBoxTriangle (const AxisAlignedBox &aabb, SimdVectorArg triangle_point0, SimdVectorArg triangle_point1, SimdVectorArg triangle_point2) noexcept |
Determines whether an AABB and triangle intersect in three-dimensional space. More... | |
static bool | OrientedBoxSphere (const OrientedBox &box, SimdSphereArg sphere) noexcept |
Determines whether an OBB and sphere intersect in three-dimensional space. More... | |
static bool | OrientedBoxAxisAlignedBox (const OrientedBox &box, const AxisAlignedBox &aabb) noexcept |
Determines whether an OBB and AABB intersect in three-dimensional space. More... | |
static bool | OrientedBoxOrientedBox (const OrientedBox &box0, const OrientedBox &box1) noexcept |
Determines whether two OBBs intersect in three-dimensional space. More... | |
static bool | OrientedBoxTriangle (const OrientedBox &box, SimdVectorArg triangle_point0, SimdVectorArg triangle_point1, SimdVectorArg triangle_point2) noexcept |
Determines whether an OBB and triangle intersect in three-dimensional space. More... | |
static PlaneResult | OrientedBoxPlane (const OrientedBox &box, SimdPlaneArg plane_normalized) noexcept |
Determines whether an OBB and plane intersect in three-dimensional space. More... | |
static bool | OrientedBoxRay (const OrientedBox &box, SimdVectorArg ray_point, SimdVectorArg ray_dir_normalized) noexcept |
Determines whether an OBB and ray intersect in three-dimensional space. More... | |
static bool | FrustumSphere (const Frustum &frustum, SimdSphereArg sphere) noexcept |
Determines whether a frustum and sphere intersect. More... | |
static bool | FrustumAxisAlignedBox (const Frustum &frustum, const AxisAlignedBox &aabb) noexcept |
Determines whether a frustum and AABB intersect. More... | |
static bool | FrustumOrientedBox (const Frustum &frustum, const OrientedBox &obb) noexcept |
Determines whether a frustum and OBB intersect. More... | |
static bool | FrustumTriangle (const Frustum &frustum, SimdVectorArg triangle_point0, SimdVectorArg triangle_point1, SimdVectorArg triangle_point2) noexcept |
Determines whether a frustum and triangle intersect. More... | |
static PlaneResult | FrustumPlane (const Frustum &frustum, SimdPlaneArg plane) noexcept |
Determines whether a frustum and plane intersect. More... | |
static bool | FrustumRay (const Frustum &frustum, SimdVectorArg ray_point, SimdVectorArg ray_dir_normalized) noexcept |
Determines whether a frustum and ray intersect. More... | |
The class with the collection of functions that determine intersections.
Definition at line 191 of file SimdGeometry.h.
The return value types when determining intersection with a plane. The front of the plane is on the same side as the same direction of the normal of the plane.
Enumerator | |
---|---|
kPlaneFront | The target object is in front of the plane. |
kPlaneInterect | The target object intersects with the plane. |
kPlaneBack | The target object is behind the plane. |
Definition at line 194 of file SimdGeometry.h.
|
staticnoexcept |
Determines whether two AABBs intersect in three-dimensional space.
[in] | aabb0 | An AABB in three-dimensional space. |
[in] | aabb1 | An AABB in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether an AABB and plane intersect in three-dimensional space.
[in] | aabb | An AABB in three-dimensional space. |
[in] | plane_normalized | The normalized plane in three-dimensional space. |
|
staticnoexcept |
Determines whether an AABB and ray intersect in three-dimensional space.
[in] | aabb | An AABB in three-dimensional space. |
[in] | ray_point | A three-dimensional vector representing the starting point of the ray. |
[in] | ray_dir_normalized | A unit vector representing the direction of the ray. |
true
if they intersect.
|
staticnoexcept |
Determines whether an AABB and sphere intersect in three-dimensional space.
[in] | aabb | An AABB in three-dimensional space. |
[in] | sphere | A sphere in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether an AABB and triangle intersect in three-dimensional space.
[in] | aabb | An AABB in three-dimensional space. |
[in] | triangle_point0 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point1 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point2 | A three-dimensional vector representing a vertex of the triangle. |
true
if they intersect.
|
staticnoexcept |
Determines whether a frustum and AABB intersect.
[in] | frustum | A frustum. |
[in] | aabb | An AABB in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether a frustum and OBB intersect.
[in] | frustum | A frustum. |
[in] | obb | An OBB in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether a frustum and plane intersect.
[in] | frustum | A frustum. |
[in] | plane | A plane in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether a frustum and ray intersect.
[in] | frustum | A frustum. |
[in] | ray_point | A three-dimensional vector representing the starting point of the ray. |
[in] | ray_dir_normalized | A unit vector representing the direction of the ray. |
true
if they intersect.
|
staticnoexcept |
Determines whether a frustum and sphere intersect.
[in] | frustum | A frustum. |
[in] | sphere | A sphere in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether a frustum and triangle intersect.
[in] | frustum | A frustum. |
[in] | triangle_point0 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point1 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point2 | A three-dimensional vector representing a vertex of the triangle. |
true
if they intersect.
|
staticnoexcept |
Determines whether an OBB and AABB intersect in three-dimensional space.
[in] | box | An OBB in three-dimensional space. |
[in] | aabb | An AABB in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether two OBBs intersect in three-dimensional space.
[in] | box0 | An OBB in three-dimensional space. |
[in] | box1 | An OBB in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether an OBB and plane intersect in three-dimensional space.
[in] | box | An OBB in three-dimensional space. |
[in] | plane_normalized | The normalized plane in three-dimensional space. |
|
staticnoexcept |
Determines whether an OBB and ray intersect in three-dimensional space.
[in] | box | An OBB in three-dimensional space. |
[in] | ray_point | A three-dimensional vector representing the starting point of the ray. |
[in] | ray_dir_normalized | A unit vector representing the direction of the ray. |
true
if they intersect.
|
staticnoexcept |
Determines whether an OBB and sphere intersect in three-dimensional space.
[in] | box | An OBB in three-dimensional space. |
[in] | sphere | A sphere in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether an OBB and triangle intersect in three-dimensional space.
[in] | box | An OBB in three-dimensional space. |
[in] | triangle_point0 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point1 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point2 | A three-dimensional vector representing a vertex of the triangle. |
true
if they intersect.
|
staticnoexcept |
Calculates the point where a line intersects with a plane in three-dimensional space.
[in] | plane | A plane in three-dimensional space. |
[in] | line_point | A three-dimensional vector representing the position of a point on a line. |
[in] | line_dir_normalized | A unit vector representing the direction of the line. |
NaN
set for each element.
|
staticnoexcept |
Determines whether two planes intersect in three-dimensional space.
[in] | plane0 | A plane in three-dimensional space. |
[in] | plane1 | A plane in three-dimensional space. |
NaN
set for each element.
|
staticnoexcept |
Calculates the point where a ray intersects with a plane in three-dimensional space.
[in] | plane | A plane in three-dimensional space. |
[in] | ray_point | A three-dimensional vector representing the starting point of the ray. |
[in] | ray_dir_normalized | A unit vector representing the direction of the ray. |
NaN
set for each element.
|
staticnoexcept |
Calculates the point where a line segment intersects with a plane in three-dimensional space.
[in] | plane | A plane in three-dimensional space. |
[in] | segment_point0 | The starting point of the line segment. |
[in] | segment_point1 | The ending point of the line segment. |
NaN
set for each element.
|
staticnoexcept |
Determines whether a sphere and plane intersect in three-dimensional space.
[in] | sphere | A sphere in three-dimensional space. |
[in] | plane_normalized | The normalized plane in three-dimensional space. |
|
staticnoexcept |
Determines whether a sphere and ray intersect in three-dimensional space.
[out] | distance | If not NULL and they intersect, stores the distance from the starting point of the ray to the point of intersection. |
[in] | sphere | A sphere in three-dimensional space. |
[in] | ray_point | A three-dimensional vector representing the starting point of the ray. |
[in] | ray_dir_normalized | A unit vector representing the direction of the ray. |
true
if they intersect.
|
staticnoexcept |
Determines whether two spheres intersect in three-dimensional space.
[in] | sphere0 | A sphere in three-dimensional space. |
[in] | sphere1 | A sphere in three-dimensional space. |
true
if they intersect.
|
staticnoexcept |
Determines whether a sphere and triangle intersect in three-dimensional space.
[in] | sphere | A sphere in three-dimensional space. |
[in] | triangle_point0 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point1 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point2 | A three-dimensional vector representing a vertex of the triangle. |
true
if they intersect.
|
staticnoexcept |
Determines whether a triangle and plane intersect in three-dimensional space.
[in] | triangle_point0 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point1 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point2 | A three-dimensional vector representing a vertex of the triangle. |
[in] | plane_normalized | The normalized plane in three-dimensional space. |
|
staticnoexcept |
Determines whether a triangle and ray intersect in three-dimensional space.
[out] | distance | If not NULL and they intersect, stores the distance from the starting point of the ray to the point of intersection. |
[in] | triangle_point0 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point1 | A three-dimensional vector representing a vertex of the triangle. |
[in] | triangle_point2 | A three-dimensional vector representing a vertex of the triangle. |
[in] | ray_point | A three-dimensional vector representing the starting point of the ray. |
[in] | ray_dir_normalized | A unit vector representing the direction of the ray. |
true
if they intersect. © 2012-2017 Nintendo Co., Ltd. All rights reserved.