#include "lib/lib.h"
#include "geomlib/types.h"
#include "geomlib/numeric.h"
#include "geomlib/vector.h"
Go to the source code of this file.
Defines | |
| #define | GEOM_PARABOLIC_ARC_ASSERT(a) |
| Makes assertions to test validity of geom_parabolic_arc structure. | |
| #define | GEOM_HYPERBOLIC_ARC_ASSERT(a) |
| Makes assertions to test validity of geom_hyperbolic_arc structure. | |
| #define | GEOM_CONIC_ASSERT(a) |
| Makes assertions to test validity of geom_conic structure. | |
Enumerations | |
| enum | geom_conic_arc_type { GEOM_CONIC_ARC_START_ENTIRE, GEOM_CONIC_ARC_START_DIF, GEOM_CONIC_ARC_POINT_ENTIRE, GEOM_CONIC_ARC_POINT_DIF, GEOM_CONIC_ARC_CCW, GEOM_CONIC_ARC_CW, GEOM_CONIC_ARC_SMALLER, GEOM_CONIC_ARC_BIGGER, GEOM_CONIC_ARC_MIDDLE, GEOM_CONIC_ARC_OPPOSITE, GEOM_CONIC_ARC_ENTIRE, GEOM_CONIC_ARC_MAX, GEOM_CONIC_ARC_0P = GEOM_CONIC_ARC_START_DIF, GEOM_CONIC_ARC_1P = GEOM_CONIC_ARC_POINT_DIF, GEOM_CONIC_ARC_2P = GEOM_CONIC_ARC_BIGGER, GEOM_CONIC_ARC_3P = GEOM_CONIC_ARC_OPPOSITE } |
Functions | |
| int | geom_parabolic_arc_valid (const struct geom_parabolic_arc *arc) |
| Test validity of geom_parabolic_arc structure. | |
| void | geom_parabolic_arc_dump (const struct geom_parabolic_arc *arc) |
| Dumps geom_parabolic_arc structure data. | |
| void | geom_parabolic_arc_set (struct geom_parabolic_arc *arc, const struct geom_point *center, const real rotation, const real distance, const real start, const real end) |
| Initialize parabolic arc. | |
| void | geom_parabolic_arc_set_unit (struct geom_parabolic_arc *arc, const struct geom_point *center, const real rotation, const real distance) |
| Initialize "unit" parabolic arc. | |
| int | geom_parabolic_arc_normalize (struct geom_parabolic_arc *arc) |
| Normalize parabolic arc structure. Rotation angle is aligned to [0, 2 * PI]. | |
| int | geom_parabolic_arc_set_endpoints (struct geom_parabolic_arc *arc, const struct geom_point *start, const struct geom_point *end) |
| Sets parabolic arc endpoints. Given points should be near the parabola. | |
| int | geom_parabolic_arc_point_at (const struct geom_parabolic_arc *arc, const real time, struct geom_point *point) |
| Returns point on parabola for given parameter (see parabola in parametric form). | |
| int | geom_parabolic_arc_focus (const struct geom_parabolic_arc *arc, struct geom_point *focus) |
| Compute focus point of given parabola. | |
| int | geom_parabolic_arc_directrix (const struct geom_parabolic_arc *arc, struct geom_point *point, struct geom_vector *vector) |
| Compute directrix of given parabola. | |
| real | geom_parabolic_arc_focal_parameter (const struct geom_parabolic_arc *arc) |
| Compute focal parameter of given parabola (distance of focus to directrix). | |
| real | geom_parabolic_arc_latus_rectum (const struct geom_parabolic_arc *arc) |
| Compute latus rectum of given parabola. | |
| int | geom_parabolic_arc_to_poly (const struct geom_parabolic_arc *arc, real *poly) |
| Converts parabola to form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0. | |
| int | geom_parabolic_arc_to_bezier (const struct geom_parabolic_arc *arc, struct geom_bezier *bezier) |
| Converts parabolic arc to single bezier curve. | |
| int | geom_parabolic_arc_to_path (const struct geom_parabolic_arc *arc, struct geom_path *path) |
| Converts parabolic arc to single bezier curve and adds it to end of given path. | |
| int | geom_hyperbolic_arc_valid (const struct geom_hyperbolic_arc *arc) |
| Test validity of geom_hyperbolic_arc structure. | |
| void | geom_hyperbolic_arc_dump (const struct geom_hyperbolic_arc *arc) |
| Dumps geom_hyperbolic_arc structure data. | |
| void | geom_hyperbolic_arc_set (struct geom_hyperbolic_arc *arc, const struct geom_point *center, const real rotation, const real major, const real minor, const real start, const real end) |
| Initialize hyperbolic arc. | |
| void | geom_hyperbolic_arc_set_unit (struct geom_hyperbolic_arc *arc, const struct geom_point *center, const real rotation, const real major, const real minor) |
| Initialize "unit" hyperbolic arc. | |
| int | geom_hyperbolic_arc_normalize (struct geom_hyperbolic_arc *arc) |
| Normalize hyperbolic arc structure. Rotation angle is aligned to [0, 2 * PI]. | |
| int | geom_hyperbolic_arc_set_endpoints (struct geom_hyperbolic_arc *arc, const struct geom_point *start, const struct geom_point *end) |
| Sets hyperbolic arc endpoints. Given points should be near one branch of hyperbola. | |
| int | geom_hyperbolic_arc_point_at (const struct geom_hyperbolic_arc *arc, const real time, struct geom_point *point) |
| Returns point on hyperbola for given parameter (see hyperbola in parametric form). | |
| int | geom_hyperbolic_arc_to_poly (const struct geom_hyperbolic_arc *arc, real *poly) |
| Converts hyperbola to form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0. | |
| int | geom_hyperbolic_arc_to_bezier (const struct geom_hyperbolic_arc *arc, struct geom_bezier *bezier) |
| Converts hyperbolic arc to single bezier curve. | |
| int | geom_hyperbolic_arc_to_path (const struct geom_hyperbolic_arc *arc, struct geom_path *path) |
| Converts hyperbolic arc to single bezier curve and adds it to end of given path. | |
| int | geom_conic_valid (struct geom_conic *conic) |
| Test validity of geom_conic structure. | |
| void | geom_conic_dump (struct geom_conic *conic) |
| Dumps geom_conic structure data. | |
| int | geom_conic_to_poly (struct geom_conic *conic, real *poly) |
| Converts conic to form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0. | |
| int | geom_conic_to_bezier (struct geom_conic *conic, struct geom_bezier *bezier) |
| Converts conic to single bezier curve. | |
| int | geom_conic_to_path (struct geom_conic *conic, struct geom_path *path) |
| Converts conic to list of bezier curves and adds them to end of given path. | |
| int | geom_conic_from_poly (struct geom_conic *conic, const real *poly) |
| Convers form AX^2 + Bxy + Cy^2 + Dx + Ey + F = 0 to conic curve. | |
| int | geom_conic_from_5_points (struct geom_conic *conic, const struct geom_point *points) |
| Find conic containing 5 given points. | |
| int | geom_conic_from_rotation_and_4_points (struct geom_conic *conic, const real rotation, const struct geom_point *points) |
| Find conic containing 4 given points and with axis in given angle. | |
| int | geom_conic_from_2_tangents_and_point (struct geom_conic *conic, const real *angles, const struct geom_point *points) |
| Finds conic for 3 given points and 2 tangential angles in first 2 of them. | |
Copyright (c) 2004-2005 The VRR Team <vrr@ucw.cz> This program is distributed under GNU General Public License, see COPYING.
|
|
Value: do{ \ GEOM_BASSERT((a) != NULL); \ switch ((a)->type) { \ case GEOM_CONIC_PARABOLIC_ARC: GEOM_PARABOLIC_ARC_ASSERT(&(a)->data.parabolic_arc); break; \ case GEOM_CONIC_ARC: GEOM_ARC_ASSERT(&(a)->data.arc); break; \ case GEOM_CONIC_ELLIPTIC_ARC: GEOM_ELLIPTIC_ARC_ASSERT(&(a)->data.elliptic_arc); break; \ case GEOM_CONIC_HYPERBOLIC_ARC: GEOM_HYPERBOLIC_ARC_ASSERT(&(a)->data.hyperbolic_arc); break; \ default: GEOM_BASSERT(0); \ } \ }while(0)
|
|
|
Value: do{ \ GEOM_BASSERT((a) != NULL); \ GEOM_POINT_ASSERT(&(a)->center); \ GEOM_BASSERT(isfinite((a)->rotation)); \ GEOM_BASSERT(isfinite((a)->major)); \ GEOM_BASSERT((a)->major >= 0); \ GEOM_BASSERT(isfinite((a)->minor)); \ GEOM_BASSERT((a)->minor >= 0); \ GEOM_BASSERT(isfinite((a)->start)); \ GEOM_BASSERT(isfinite((a)->end)); \ }while(0)
|
|
|
Value: do{ \ GEOM_BASSERT((a) != NULL); \ GEOM_POINT_ASSERT(&(a)->center); \ GEOM_BASSERT(isfinite((a)->rotation)); \ GEOM_BASSERT(isfinite((a)->distance)); \ GEOM_BASSERT((a)->distance >= 0); \ GEOM_BASSERT(isfinite((a)->start)); \ GEOM_BASSERT(isfinite((a)->end)); \ }while(0)
|
|
|
Dumps geom_conic structure data.
|
|
||||||||||||||||
|
Finds conic for 3 given points and 2 tangential angles in first 2 of them.
|
|
||||||||||||
|
Find conic containing 5 given points.
|
|
||||||||||||
|
Convers form AX^2 + Bxy + Cy^2 + Dx + Ey + F = 0 to conic curve.
|
|
||||||||||||||||
|
Find conic containing 4 given points and with axis in given angle.
|
|
||||||||||||
|
Converts conic to single bezier curve.
|
|
||||||||||||
|
Converts conic to list of bezier curves and adds them to end of given path.
|
|
||||||||||||
|
Converts conic to form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.
|
|
|
Test validity of geom_conic structure.
|
|
|
Dumps geom_hyperbolic_arc structure data.
|
|
|
Normalize hyperbolic arc structure. Rotation angle is aligned to [0, 2 * PI].
|
|
||||||||||||||||
|
Returns point on hyperbola for given parameter (see hyperbola in parametric form).
|
|
||||||||||||||||||||||||||||||||
|
Initialize hyperbolic arc.
|
|
||||||||||||||||
|
Sets hyperbolic arc endpoints. Given points should be near one branch of hyperbola.
|
|
||||||||||||||||||||||||
|
Initialize "unit" hyperbolic arc.
|
|
||||||||||||
|
Converts hyperbolic arc to single bezier curve.
|
|
||||||||||||
|
Converts hyperbolic arc to single bezier curve and adds it to end of given path.
|
|
||||||||||||
|
Converts hyperbola to form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.
|
|
|
Test validity of geom_hyperbolic_arc structure.
|
|
||||||||||||||||
|
Compute directrix of given parabola.
|
|
|
Dumps geom_parabolic_arc structure data.
|
|
|
Compute focal parameter of given parabola (distance of focus to directrix).
|
|
||||||||||||
|
Compute focus point of given parabola.
|
|
|
Compute latus rectum of given parabola.
|
|
|
Normalize parabolic arc structure. Rotation angle is aligned to [0, 2 * PI].
|
|
||||||||||||||||
|
Returns point on parabola for given parameter (see parabola in parametric form).
|
|
||||||||||||||||||||||||||||
|
Initialize parabolic arc.
|
|
||||||||||||||||
|
Sets parabolic arc endpoints. Given points should be near the parabola.
|
|
||||||||||||||||||||
|
Initialize "unit" parabolic arc.
|
|
||||||||||||
|
Converts parabolic arc to single bezier curve.
|
|
||||||||||||
|
Converts parabolic arc to single bezier curve and adds it to end of given path.
|
|
||||||||||||
|
Converts parabola to form: Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0.
|
|
|
Test validity of geom_parabolic_arc structure.
|
1.3.5