csMath2 Class Reference
[Geometry utilities]
Various functions in 2D, such as 2D vector functions.
More...
#include <csgeom/math2d.h>
Static Public Member Functions | |
static float | Area2 (const csVector2 &a, const csVector2 &b, const csVector2 &c) |
Calculates 2 x the area of a given triangle. | |
static int | InPoly2D (const csVector2 &v, csVector2 *P, int n, csBox2 *bounding_box) |
Calculates whether a vector lies inside a given 2D polygon. | |
static float | Left (const csVector2 &a, const csVector2 &b, const csVector2 &c) |
Calculates whether a point lies to the left of a given line. | |
static bool | PlanesClose (const csPlane2 &p1, const csPlane2 &p2) |
Check if two planes are close together. | |
static bool | PlanesEqual (const csPlane2 &p1, const csPlane2 &p2) |
Check if two planes are almost equal. | |
static float | Right (const csVector2 &a, const csVector2 &b, const csVector2 &c) |
Calculates whether a point lies to the right of a given line. | |
static bool | Visible (const csVector2 &p, const csPlane2 &pl) |
Check if the plane is visible from the given point. | |
static int | WhichSide2D (const csVector2 &v, const csSegment2 &s) |
Calculates which side of a line a given point is on. | |
static int | WhichSide2D (const csVector2 &v, const csVector2 &s1, const csVector2 &s2) |
Calculates which side of a line a given point is on. |
Detailed Description
Various functions in 2D, such as 2D vector functions.This is a static class and contains only static member functions.
Definition at line 44 of file math2d.h.
Member Function Documentation
|
Calculates 2 x the area of a given triangle.
Definition at line 90 of file math2d.h. References csVector2::x, and csVector2::y. |
|
Calculates whether a vector lies inside a given 2D polygon.
|
|
Calculates whether a point lies to the left of a given line. Returns true iff c is strictly to the left of the directed line through a to b. |
|
Check if two planes are close together. Two planes are close if there are almost equal OR if the normalized versions are almost equal. |
|
Check if two planes are almost equal.
Definition at line 138 of file math2d.h. References ABS, csPlane2::CC, and csPlane2::norm. |
|
Calculates whether a point lies to the right of a given line.
|
|
Check if the plane is visible from the given point. This function does a back-face culling test to see whether the front face of plane pl is visible from point p. Definition at line 129 of file math2d.h. References csPlane2::Classify(). |
|
Calculates which side of a line a given point is on.
Definition at line 69 of file math2d.h. References csSegment2::End(), and csSegment2::Start(). |
|
Calculates which side of a line a given point is on.
Definition at line 53 of file math2d.h. References csVector2::x, and csVector2::y. |
The documentation for this class was generated from the following file:
- csgeom/math2d.h
Generated for Crystal Space by doxygen 1.4.6