#include <math3d.h>
Static Public Methods | |
bool | IntersectPolygon (const csPlane3 &plane, csPoly3D *poly, csSegment3 &segment) |
Intersect a plane with a 3D polygon and return the line segment corresponding with this intersection. More... | |
int | IntersectSegment (csPlane3 *planes, int num_planes, csSegment3 &seg) |
Intersect a segment with a frustum (given as a set of planes). More... | |
bool | IntersectTriangle (const csVector3 &tr1, const csVector3 &tr2, const csVector3 &tr3, const csSegment3 &seg, csVector3 &isect) |
Intersect a 3D segment with a triangle. More... | |
void | Plane (const csVector3 &u, const csVector3 &v, const csVector3 &normal, const csVector3 &a, csVector3 &isect, float &dist) |
Intersect a 3D segment with a plane. More... | |
bool | Plane (const csVector3 &u, const csVector3 &v, const csPlane3 &p, csVector3 &isect, float &dist) |
Intersect a 3D segment with a plane. More... | |
bool | Planes (const csPlane3 &p1, const csPlane3 &p2, const csPlane3 &p3, csVector3 &isect) |
Intersect 3 planes to get the point that is part of all three planes. More... | |
bool | PlaneXPlane (const csPlane3 &p1, float x2, csPlane2 &isect) |
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. More... | |
bool | PlaneYPlane (const csPlane3 &p1, float y2, csPlane2 &isect) |
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. More... | |
bool | PlaneZPlane (const csPlane3 &p1, float z2, csPlane2 &isect) |
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. More... | |
bool | PlaneAxisPlane (const csPlane3 &p1, int nr, float pos, csPlane2 &isect) |
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. More... | |
float | Z0Plane (const csVector3 &v1, const csVector3 &v2, csVector3 &isect) |
Intersect a 3D segment with the z = 0 plane. More... | |
float | Z0Plane (const csSegment3 &uv, csVector3 &isect) |
Intersect a 3D segment with the z = 0 plane. More... | |
float | ZPlane (float zval, const csVector3 &u, const csVector3 &v, csVector3 &isect) |
Intersect a 3D segment with the plane z = zval. More... | |
float | ZPlane (float zval, const csSegment3 &uv, csVector3 &isect) |
Intersect a 3D segment with the plane z = zval. More... | |
float | XFrustum (float A, const csVector3 &u, const csVector3 &v, csVector3 &isect) |
Intersect a 3D segment with the frustum plane Ax + z = 0. More... | |
float | XFrustum (float A, const csSegment3 &uv, csVector3 &isect) |
Intersect a 3D segment with the frustum plane Ax + z = 0. More... | |
float | YFrustum (float B, const csVector3 &u, const csVector3 &v, csVector3 &isect) |
Intersect a 3D segment with the frustum plane By + z = 0. More... | |
float | YFrustum (float B, const csSegment3 &uv, csVector3 &isect) |
Intersect a 3D segment with the frustum plane By + z = 0. More... | |
int | BoxSegment (const csBox3 &box, const csSegment3 &segment, csVector3 &isect, float *pr=NULL) |
Intersect a segment with a box and returns true if it intersects. More... |
This is a static class and contains only static member functions.
|
Intersect a segment with a box and returns true if it intersects. The intersection point is also returned. If 'pr' is given then a number between 0 and 1 is returned which corresponds to the position on the segment. If we were in the box this this function will also return true. In this case 'isect' will be set to the start of the segment and *pr to 0. |
|
Intersect a plane with a 3D polygon and return the line segment corresponding with this intersection. Returns true if there is an intersection. If false then 'segment' will not be valid. |
|
Intersect a segment with a frustum (given as a set of planes). Returns the clipped segment (i.e. the part of the segment that is visible in the frustum). Returns -1 if the segment is entirely outside the frustum. Returns 0 if the segment is not modified and returns 1 otherwise. The input segment will be modified. @@ WARNING! This function may not work completely ok. It has only barely been tested and is now unused. |
|
Intersect a 3D segment with a triangle. Returns true if there is an intersection. In that case the intersection point will be in 'isect'. |
|
Intersect a 3D segment with a plane. Returns true if there is an intersection, with the intersection point returned in isect. The distance from u to the intersection point is returned in dist. The distance that is returned is a normalized distance with respect to the given input vector. i.e. a distance of 0.5 means that the intersection point is halfway u and v. |
|
Intersect a 3D segment with a plane. Returns true if there is an intersection, with the intersection point returned in isect. |
|
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. This intersection is defined on the axis aligned plane. Returns false if there is no intersection. |
|
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. This intersection is defined on the axis aligned plane. Returns false if there is no intersection. |
|
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. This intersection is defined on the axis aligned plane. Returns false if there is no intersection. |
|
Intersect a regular plane and an axis aligned plane and return the intersection (line) as a 2D plane. This intersection is defined on the axis aligned plane. Returns false if there is no intersection. |
|
Intersect 3 planes to get the point that is part of all three planes. Returns true, if there is a single point that fits. If some planes are parallel, then it will return false. |
|
Intersect a 3D segment with the frustum plane Ax + z = 0. Assumes an intersection, and returns the intersection point in isect. |
|
Intersect a 3D segment with the frustum plane Ax + z = 0. Assumes an intersection, and returns the intersection point in isect. |
|
Intersect a 3D segment with the frustum plane By + z = 0. Assumes an intersection, and returns the intersection point in isect. |
|
Intersect a 3D segment with the frustum plane By + z = 0. Assumes an intersection, and returns the intersection point in isect. |
|
Intersect a 3D segment with the z = 0 plane. Assumes that there is an intersection (fails if the segment is parallel to the plane), and returns the distance from u to the intersection point. The intersection point is returned in isect. |
|
Intersect a 3D segment with the z = 0 plane. Assumes that there is an intersection (fails if the segment is parallel to the plane), and returns the distance from u to the intersection point. The intersection point is returned in isect. |
|
Intersect a 3D segment with the plane z = zval. Assumes that there is an intersection (fails if the segment is parallel to the plane), and returns the distance from u to the intersection point. The intersection point is returned in isect. |
|
Intersect a 3D segment with the plane z = zval. Assumes that there is an intersection (fails if the segment is parallel to the plane), and returns the distance from u to the intersection point. The intersection point is returned in isect. |