|
Graphite Version 3
An experimental 3D geometry processing program
|
Geometric functions in 2d and 3d. More...
Go to the source code of this file.
Classes | |
| struct | GEO::Plane |
| A 3D Plane. More... | |
| class | GEO::Box |
| Axis-aligned bounding box. More... | |
| class | GEO::Box2d |
| Axis-aligned bounding box. More... | |
| struct | GEO::Ray |
| A Ray, in parametric form. More... | |
Namespaces | |
| namespace | GEO |
| Global Vorpaline namespace. | |
| namespace | GEO::Geom |
| Geometric functions and utilities. | |
Typedefs | |
| typedef vecng< 2, Numeric::float64 > | GEO::vec2 |
| Represents points and vectors in 2d. | |
| typedef vecng< 3, Numeric::float64 > | GEO::vec3 |
| Represents points and vectors in 3d. | |
| typedef vecng< 4, Numeric::float64 > | GEO::vec4 |
| Represents points and vectors in 4d. | |
| typedef vecng< 2, Numeric::float32 > | GEO::vec2f |
| Represents points and vectors in 2d with single-precision coordinates. | |
| typedef vecng< 3, Numeric::float32 > | GEO::vec3f |
| Represents points and vectors in 3d with single-precision coordinates. | |
| typedef vecng< 4, Numeric::float32 > | GEO::vec4f |
| Represents points and vectors in 4d with single-precision coordinates. | |
| typedef vecng< 2, Numeric::int32 > | GEO::vec2i |
| Represents points and vectors in 2d with integer coordinates. | |
| typedef vecng< 3, Numeric::int32 > | GEO::vec3i |
| Represents points and vectors in 3d with integer coordinates. | |
| typedef vecng< 4, Numeric::int32 > | GEO::vec4i |
| Represents points and vectors in 4d with integer coordinates. | |
| typedef vecng< 2, Numeric::uint32 > | GEO::vec2u |
| Represents points and vectors in 2d with unsigned integer coordinates. | |
| typedef vecng< 3, Numeric::uint32 > | GEO::vec3u |
| Represents points and vectors in 3d with unsigned integer coordinates. | |
| typedef vecng< 4, Numeric::uint32 > | GEO::vec4u |
| Represents points and vectors in 4d with unsigned integer coordinates. | |
| typedef Matrix< 2, Numeric::float64 > | GEO::mat2 |
| Represents a 2x2 matrix. | |
| typedef Matrix< 3, Numeric::float64 > | GEO::mat3 |
| Represents a 3x3 matrix. | |
| typedef Matrix< 4, Numeric::float64 > | GEO::mat4 |
| Represents a 4x4 matrix. | |
| typedef Box | GEO::Box3d |
Functions | |
| double | GEO::det (const mat2 &M) |
| Computes the determinant of a 2x2 matrix. | |
| vec3 | GEO::Geom::barycenter (const vec3 &p1, const vec3 &p2) |
| Computes the barycenter of two points in 3d. | |
| vec3 | GEO::Geom::barycenter (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
| Computes the barycenter of three points in 3d. | |
| double | GEO::Geom::cos_angle (const vec3 &a, const vec3 &b) |
| Computes the cosine of the angle between two 3d vectors. | |
| double | GEO::Geom::angle (const vec3 &a, const vec3 &b) |
| Computes the angle between two 3d vectors. | |
| double | GEO::Geom::det (const vec2 &a, const vec2 &b) |
| Computes the determinant of two vectors. | |
| vec3 | GEO::Geom::triangle_normal (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
| Computes the normal of a 3d triangle. | |
| double | GEO::Geom::triangle_area_3d (const double *p1, const double *p2, const double *p3) |
| Computes the area of a 3d triangle. | |
| double | GEO::Geom::triangle_area (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
| Computes the area of a 3d triangle. | |
| double | GEO::Geom::triangle_signed_area_2d (const double *p1, const double *p2, const double *p3) |
| Computes the area of a 2d triangle. | |
| double | GEO::Geom::triangle_signed_area (const vec2 &p1, const vec2 &p2, const vec2 &p3) |
| Computes the area of a 2d triangle. | |
| double | GEO::Geom::triangle_area_2d (const double *p1, const double *p2, const double *p3) |
| Computes the area of a 2d triangle. | |
| vec2 | GEO::Geom::triangle_circumcenter (const vec2 &p1, const vec2 &p2, const vec2 &p3) |
| Computes the center of the circumscribed circle of a 2d triangle. | |
| bool | GEO::Geom::has_nan (const vec3 &v) |
| Tests whether a 3d vector has a NaN (not a number) coordinate. | |
| vec3 | GEO::Geom::perpendicular (const vec3 &V) |
| Computes a 3d vector orthogonal to another one. | |
| double | GEO::Geom::tetra_signed_volume (const vec3 &p1, const vec3 &p2, const vec3 &p3, const vec3 &p4) |
| Computes the signed volume of a 3d tetrahedron. | |
| double | GEO::Geom::tetra_signed_volume (const double *p1, const double *p2, const double *p3, const double *p4) |
| Computes the signed volume of a 3d tetrahedron. | |
| double | GEO::Geom::tetra_volume (const vec3 &p1, const vec3 &p2, const vec3 &p3, const vec3 &p4) |
| Computes the volume of a 3d tetrahedron. | |
| vec3 | GEO::Geom::tetra_circum_center (const vec3 &p1, const vec3 &p2, const vec3 &p3, const vec3 &p4) |
| Computes the center of the circumscribed sphere of 3d tetrahedron. | |
| void | GEO::Geom::triangle_centroid (const vec3 &p, const vec3 &q, const vec3 &r, double a, double b, double c, vec3 &Vg, double &V) |
| Computes the centroid of a 3d triangle with weighted points. | |
| double | GEO::Geom::triangle_mass (const vec3 &p, const vec3 &q, const vec3 &r, double a, double b, double c) |
| Computes the mass of a 3d triangle with weighted points. | |
| vec3 | GEO::Geom::random_point_in_triangle (const vec3 &p1, const vec3 &p2, const vec3 &p3) |
| Generates a random point in a 3d triangle. | |
| bool | GEO::bboxes_overlap (const Box &B1, const Box &B2) |
| Tests whether two Boxes have a non-empty intersection. | |
| void | GEO::bbox_union (Box &target, const Box &B1, const Box &B2) |
| Computes the smallest Box that encloses two Boxes. | |
| bool | GEO::bboxes_overlap (const Box2d &B1, const Box2d &B2) |
| Tests whether two Box2d have a non-empty intersection. | |
| void | GEO::bbox_union (Box2d &target, const Box2d &B1, const Box2d &B2) |
| Computes the smallest Box2d that encloses two Box2d. | |
| template<class FT > | |
| vecng< 3, FT > | GEO::transform_vector (const vecng< 3, FT > &v, const Matrix< 4, FT > &m) |
| Applies a 3d transform to a 3d vector. | |
| template<class FT > | |
| vecng< 3, FT > | GEO::transform_point (const vecng< 3, FT > &v, const Matrix< 4, FT > &m) |
| Applies a 3d transform to a 3d point. | |
| template<class FT > | |
| vecng< 3, FT > | GEO::transform_point (const Matrix< 4, FT > &m, const vecng< 3, FT > &v) |
| Applies a 3d transform to a 3d point. | |
| template<class FT > | |
| vecng< 4, FT > | GEO::transform_vector (const vecng< 4, FT > &v, const Matrix< 4, FT > &m) |
| Applies a 4d transform to a 4d point. | |
| mat4 | GEO::create_translation_matrix (const vec3 &T) |
| Creates a translation matrix from a vector. | |
| mat4 | GEO::create_scaling_matrix (double s) |
| Creates a scaling matrix. | |
Geometric functions in 2d and 3d.
Definition in file geometry.h.