#include "geomlib/vector.h"
#include "geomlib/cache.h"
Go to the source code of this file.
Defines | |
| #define | GEOM_DUMP_CLASS 0x1 |
| #define | GEOM_DUMP_OWNER 0x2 |
| #define | GEOM_DUMP_ITEMS 0x4 |
| #define | GEOM_DUMP_RECURSIVE 0x8 |
| #define | GEOM_DUMP_ALL 0xffffffff |
| #define | GEOM_ITEM_FLAGS(i) GEOM_INSTANCE_FLAGS2(i) |
| #define | GEOM_ITEM_CLOSED 0x01 |
| #define | GEOM_ITEM_GROUP 0x02 |
| #define | GEOM_ITEM_PATH 0x04 |
| #define | GEOM_ITEM_ZERO_FLAG 0x80 |
| #define | GEOM_ITEM_EXPANSION_VALID 0x08 |
| #define | geom_item_VMT |
| #define | geom_item_INIT |
| #define | GEOM_ITEM_CALL(method) GEOM_INSTANCE_VMT(item, item, method)(item) |
| #define | GEOM_ITEM_CALL2(method,) GEOM_INSTANCE_VMT(item, item, method)(item, __VA_ARGS__) |
| #define | GEOM_ITEM_CALL_RET(method) return GEOM_INSTANCE_VMT(item, item, method)(item) |
| #define | GEOM_ITEM_CALL2_RET(method,) return GEOM_INSTANCE_VMT(item, item, method)(item, __VA_ARGS__) |
| #define | GEOM_ITEM_EDEF(method) static inline int geom_item_##method##__invalid(void UNUSED *item) { GEOM_FUNC; GEOM_ERET(GEOM_ERR_ITEM_INVALID); } |
| #define | GEOM_ITEM_EDEF2(method,) static inline int geom_item_##method##__invalid(void UNUSED *item, __VA_ARGS__) { GEOM_FUNC; GEOM_ERET(GEOM_ERR_ITEM_INVALID); } |
| #define | GEOM_ITEM_RDEF(method) static inline real geom_item_##method##__invalid(void UNUSED *item) { GEOM_FUNC; geom_errno = GEOM_ERR_ITEM_INVALID; GEOM_RRET(NAN); } |
| #define | GEOM_ITEM_RDEF2(method,) static inline real geom_item_##method##__invalid(void UNUSED *item, __VA_ARGS__) { GEOM_FUNC; geom_errno = GEOM_ERR_ITEM_INVALID; GEOM_RRET(NAN); } |
| #define | GEOM_ITEM_ASSERT(nclass, i) GEOM_ASSERT2(item_call,(void *)i,GEOM_CLASS(nclass)) |
| #define | GEOM_ITEM_ASSERTX(nclass, i) GEOM_ASSERTX2(item_call,(void *)i,GEOM_CLASS(nclass)) |
| #define | GEOM_ITEM_INIT(item, nclass) GEOM_INSTANCE_INIT(item, nclass) |
| #define | GEOM_ITEM_ZERO_INIT(item, nclass) GEOM_INSTANCE_ZERO_INIT(item, nclass) |
| #define | GEOM_ITEM_CREATE(item, nclass) do{GEOM_INSTANCE_CREATE(item, nclass, geom_##nclass##_create);}while(0) |
| #define | GEOM_ITEM_ZERO_CREATE(item, nclass) do{GEOM_INSTANCE_ZERO_CREATE(item, nclass, geom_##nclass##_create);}while(0) |
| #define | GEOM_ITEM_DESTROY(item) GEOM_INSTANCE_DESTROY(item) |
Functions | |
| GEOM_CLASS_HEAD (item, o) | |
| void | geom_item_create (struct geom_item UNUSED *item) |
| Item constructor. | |
| void | geom_item_destroy (struct geom_item UNUSED *item) |
| Item destructor. | |
| const void * | geom_item_assert (const void *item, GEOM_ASSERT_DEF) |
| const void * | geom_item_call_assert (GEOM_ASSERT_DEF, const void *item, struct geom_class *pclass) |
| int | geom_item_valid (const void *item) |
| Item validation. | |
| int | geom_item_valid__default (const void UNUSED *item) |
| void | geom_item_dump (const void *item, uns flags) |
| Dump a given item. | |
| void | geom_item_subdump (const struct geom_item UNUSED *item, uns UNUSED flags) |
| void | geom_item_copy (void *item, void *src) |
| Makes an exact copy of another item. | |
| void | geom_item_copy__default (void *item, void *src) |
| void | geom_item_copy__fail (void *item, void *src) |
| void * | geom_item_duplicate (void *item) |
| Allocate a new item of same class type and copy data. | |
| void | geom_item_after_change (void *item) |
| Should be called after any manual change to item's data. | |
| void | geom_item_after_change__empty (void UNUSED *item) |
| real | geom_item_tlength (void *item) |
| Returns TIME parametrization length (1 for elementary curves). | |
| real | geom_item_alength (void *item) |
| Returns Euclidean arc length (ATIME parametrization). | |
| int | geom_item_blength (void *item) |
| Returns BTIME parametrization length. | |
| real | geom_item_time_to_atime (void *item, real time) |
| Conversion from TIME to ATIME parametrization. | |
| int | geom_item_times_to_atimes (void *item, uns count, real *times, real *atimes) |
| Converstion from TIME to ATIME parametrization. | |
| real | geom_item_atime_to_time (void *item, real atime) |
| Conversion from ATIME to TIME parametrization. | |
| int | geom_item_atimes_to_times (void *item, uns count, real *atimes, real *times) |
| Converstion from ATIME to TIME parametrization. | |
| real | geom_item_time_to_ratime (void *item, real time) |
| Conversion from TIME to RATIME parametrization. | |
| int | geom_item_times_to_ratimes (void *item, uns count, real *times, real *ratimes) |
| Converstion from TIME to RATIME parametrization. | |
| real | geom_item_ratime_to_time (void *item, real ratime) |
| Conversion from RATIME to TIME parametrization. | |
| int | geom_item_ratimes_to_times (void *item, uns count, real *ratimes, real *times) |
| Converstion from RATIME to TIME parametrization. | |
| int | geom_item_time_dif_btime (void *item) |
| Returns whether TIME and BTIME are different. | |
| real | geom_item_time_to_btime (void *item, struct geom_expansion *expansion, real time) |
| Conversion from TIME to BTIME parametrization. | |
| int | geom_item_times_to_btimes (void *item, struct geom_expansion *expansion, uns count, real *times, real *btimes) |
| Converstion from TIME to BTIME parametrization. | |
| real | geom_item_btime_to_time (void *item, struct geom_expansion *expansion, real btime) |
| Conversion from BTIME to TIME parametrization. | |
| int | geom_item_btimes_to_times (void *item, struct geom_expansion *expansion, uns count, real *btimes, real *times) |
| Converstion from BTIME to TIME parametrization. | |
| const struct geom_expansion * | geom_expansion_assert (GEOM_ASSERT_DEF, const struct geom_expansion *expansion) |
| int | geom_item_expansion_append (void *item, struct geom_fpath *expansion) |
| Expand curve to tail of expansion path. | |
| geom_expansion * | geom_item_expand (void *item) |
| Makes one reference to item expansion. | |
| void | geom_expansion_unref (struct geom_expansion *ref) |
| Unref one reference to expansion structure. | |
| int | geom_item_to_bezier (void *item, struct geom_bezier *bezier) |
| Convert curve to single Bezier curve, if possible. | |
| int | geom_item_conversion_append (void *item, uns flags, struct geom_fpath *result) |
| int | geom_item_convert (void *item, uns flags, struct geom_fpath *result) |
| int | geom_old_expand (void *item, struct geom_path *path) |
| int | geom_item_split (void *item, real time, void *left, void *right) |
| int | geom_item_split_middle (void *item, void *left, void *right) |
| int | geom_item_reverse (void *item, void UNUSED *result) |
| int | geom_item_part (void *item, real left_time, real right_time, void UNUSED *result) |
| int | geom_item_transform (void *item, struct geom_transform *transform, void *dest) |
| Apply affine transformation to a given curve. | |
| int | geom_item_is_closed (void *item) |
| Returns whether item is a closed curve. | |
| int | geom_item_point_start (void *item, struct geom_point *result) |
| Returns starting point of given curve. | |
| int | geom_item_point_end (void *item, struct geom_point *result) |
| Returns ending point of given curve. | |
| int | geom_item_point_at_time (void *item, real time, struct geom_point *result) |
| Returns curve point at given parameter. | |
| int | geom_item_derivation_start (void *item, struct geom_vector *result) |
| Returns first derivation in curve starting point. | |
| int | geom_item_derivation_end (void *item, struct geom_vector *result) |
| Returns first derivation in curve ending point. | |
| int | geom_item_derivation_at_time (void *item, real time, struct geom_vector *result) |
| Returns first derivation in a given curve point. | |
| int | geom_item_bbox (void *item, struct geom_rectangle *bbox) |
| Returns bounding box of a given curve. | |
| int | geom_item_nearest_to_point (void *item, struct geom_point *point, uns flags, struct geom_nearest *nearest) |
| Finds nearest point on curve to a given point. | |
| int | geom_item_direction_times (void *item, struct geom_vector *dir, struct garr *result) |
| Find TIME parameters, with derivation vector parallel to a given vector. | |
| int | geom_item_horizontal_times (void *item, struct garr *result) |
| Find TIME parameters, with derivation vector parallel to X-axis. | |
| int | geom_item_distance_times (void *item, struct geom_point *point, real dist, struct garr *result) |
| int | geom_items_intersections (void *item, void *item2, uns flags, struct garr *result) |
| Finds intersections of two given curves. | |
Copyright (c) 2004-2005 The VRR Team <vrr@ucw.cz> This program is distributed under GNU General Public License, see COPYING.
|
|
Unref one reference to expansion structure. If number of references decreased to zero, expansion can be destroyed anytime. |
|
|
Should be called after any manual change to item's data. Invalidates cache of item and derived groups.
|
|
|
Returns Euclidean arc length (ATIME parametrization).
|
|
||||||||||||
|
Conversion from ATIME to TIME parametrization.
|
|
||||||||||||||||||||
|
Converstion from ATIME to TIME parametrization.
|
|
||||||||||||
|
Returns bounding box of a given curve.
|
|
|
Returns BTIME parametrization length.
|
|
||||||||||||||||
|
Conversion from BTIME to TIME parametrization.
|
|
||||||||||||||||||||||||
|
Converstion from BTIME to TIME parametrization.
|
|
||||||||||||
|
Makes an exact copy of another item. Owner of destination item is not changed. Can be used as item constructor.
|
|
||||||||||||||||
|
Returns first derivation in a given curve point.
|
|
||||||||||||
|
Returns first derivation in curve ending point.
|
|
||||||||||||
|
Returns first derivation in curve starting point.
|
|
||||||||||||||||
|
Find TIME parameters, with derivation vector parallel to a given vector. Parameters (reals) are added to current garr position.
|
|
||||||||||||
|
Dump a given item.
|
|
|
Allocate a new item of same class type and copy data. Resulting item should be destroyed by GEOM_INSTANCE_FREE or equivalent routine.
|
|
|
Makes one reference to item expansion. If item cannot be expanded to Bezier path, result is NULL and no reference is made.
|
|
||||||||||||
|
Expand curve to tail of expansion path. If curve is closed, input path should be empty and function should close resulting path.
|
|
||||||||||||
|
Find TIME parameters, with derivation vector parallel to X-axis. Parameters (reals) are added to current garr position.
|
|
|
Returns whether item is a closed curve.
|
|
||||||||||||||||||||
|
Finds nearest point on curve to a given point.
|
|
||||||||||||||||
|
Returns curve point at given parameter.
|
|
||||||||||||
|
Returns ending point of given curve.
|
|
||||||||||||
|
Returns starting point of given curve.
|
|
||||||||||||
|
Conversion from RATIME to TIME parametrization.
|
|
||||||||||||||||||||
|
Converstion from RATIME to TIME parametrization.
|
|
|
Returns whether TIME and BTIME are different.
|
|
||||||||||||
|
Conversion from TIME to ATIME parametrization.
|
|
||||||||||||||||
|
Conversion from TIME to BTIME parametrization.
|
|
||||||||||||
|
Conversion from TIME to RATIME parametrization.
|
|
||||||||||||||||||||
|
Converstion from TIME to ATIME parametrization.
|
|
||||||||||||||||||||||||
|
Converstion from TIME to BTIME parametrization.
|
|
||||||||||||||||||||
|
Converstion from TIME to RATIME parametrization.
|
|
|
Returns TIME parametrization length (1 for elementary curves).
|
|
||||||||||||
|
Convert curve to single Bezier curve, if possible.
|
|
||||||||||||||||
|
Apply affine transformation to a given curve.
|
|
|
Item validation.
|
|
||||||||||||||||||||
|
Finds intersections of two given curves. Intersections (geom_intersection structures) are added to current garr position.
|
1.3.5