diff options
author | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-14 22:50:43 +0800 |
commit | 15740faf9fe9fe4be08965098bbf2947e096aeeb (patch) | |
tree | a730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Geometry/ComputionalGeometry.h |
Diffstat (limited to 'Runtime/Geometry/ComputionalGeometry.h')
-rw-r--r-- | Runtime/Geometry/ComputionalGeometry.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Runtime/Geometry/ComputionalGeometry.h b/Runtime/Geometry/ComputionalGeometry.h new file mode 100644 index 0000000..42f5e47 --- /dev/null +++ b/Runtime/Geometry/ComputionalGeometry.h @@ -0,0 +1,19 @@ +#ifndef COMPUTIONALGEOMETRY_H +#define COMPUTIONALGEOMETRY_H + +class Vector2f; +class Vector3f; +class Plane; + +float SignedTriangleArea2D (const Vector2f& a, const Vector2f& b, const Vector2f& c); +float SignedTriangleArea2D (const Vector3f* v); +float TriangleArea3D (const Vector3f& a, const Vector3f& b, const Vector3f& c); +float CalculateProjectedBoxArea2D (const Vector3f* v); +float CalculateTriangleAreaRotationless (Vector3f* v, float inFovy, float inScreenWidth, float inScreenHeight, Vector3f& viewPoint); +float CalculateTriangleAreaRadialFrustum (Vector3f* v, float inFovy, float inNear, float inFar, float inScreenHeight); +float CalculateBoxAreaRadialFrustum (Vector3f* v, float inFovy, float inNear, float inFar, float inScreenHeight); +float CalculateBoxAreaRadialFrustum2 (Vector3f* v, float a, float b, float c); +float CalculateTriangleAreaRadialFrustum2 (Vector3f* v, float a, float b, float c); +int ClipPolygonAgainstPlane(int vertexCount, const Vector3f *vertex, const Plane& plane, char *location, Vector3f *result); + +#endif |