|
NAMEM_Geometry —
Agar-Math geometrical structures
SYNOPSIS#include <agar/math.h> DESCRIPTIONThe Agar-Math library implements a number of algorithms and operations on related to geometrical structures. The following basic structures are defined, see their respective manual pages for more details:
GENERIC GEOMETRIC ENTITIESA number of routines (e.g., computation of intersections) return sets of zero or more geometrical structures of different types, depending on theThe M_Geom2 structure defines a geometrical entity in R^2: typedef struct m_geom2 { M_GeomType type; union { M_Vector2 point; M_Line2 line; M_Circle2 circle; M_Triangle2 triangle; M_Rectangle2 rectangle; M_Polygon polygon; } g; } M_Geom2; Similarly, M_Geom3 defines an entity in R^3: typedef struct m_geom3 { M_GeomType type; union { M_Vector3 point; M_Line3 line; M_Circle3 circle; M_Triangle3 triangle; M_Rectangle3 rectangle; M_Polygon polygon; M_Sphere sphere; M_Plane plane; M_Polyhedron polyhedron; } g; } M_Geom3; The type field can take on the following values:
GENERIC GEOMETRIC ENTITIES: SETSSets of generic geometric entities in R^2 are described by the structure:typedef struct m_geom_set2 { M_Geom2 *g; Uint n; } M_GeomSet2; typedef struct m_geom_set3 { M_Geom3 *g; Uint n; } M_GeomSet3; The following routines allow the manipulation of these sets.
The The
SEE ALSOAG_Intro(3), M_Matrix(3), M_Real(3), M_Vector(3)HISTORYTheM_Geometry structure first appeared in Agar 1.3.4.
Visit the GSP FreeBSD Man Page Interface. |