pcb 4.1.1
An interactive printed circuit board layout editor.
|
#include "gts.h"
Go to the source code of this file.
Functions | |
static void | triangle_normal (GtsTriangle *t, gdouble *nx, gdouble *ny, gdouble *nz, gdouble *nt) |
static void | boundary_preservation (GtsEdge *edge, GtsFace *f, GtsVector e1, GtsVector e2, GtsMatrix *H, GtsVector c) |
static gdouble | boundary_cost (GtsEdge *edge, GtsFace *f, GtsVertex *v) |
static gdouble | edge_boundary_cost (GtsEdge *e, GtsVertex *v) |
static gdouble | edge_volume_cost (GtsEdge *e, GtsVertex *v) |
static gdouble | edge_shape_cost (GtsEdge *e, GtsVertex *v) |
GtsVertex * | gts_volume_optimized_vertex (GtsEdge *edge, GtsVertexClass *klass, GtsVolumeOptimizedParams *params) |
gdouble | gts_volume_optimized_cost (GtsEdge *e, GtsVolumeOptimizedParams *params) |
Definition at line 123 of file vopt.c.
References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, GTS_POINT, GTS_SEGMENT, GTS_TRIANGLE, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.
Referenced by edge_boundary_cost().
static void boundary_preservation | ( | GtsEdge * | edge, |
GtsFace * | f, | ||
GtsVector | e1, | ||
GtsVector | e2, | ||
GtsMatrix * | H, | ||
GtsVector | c | ||
) | [static] |
Definition at line 73 of file vopt.c.
References _GtsTriangle::e1, _GtsTriangle::e2, _GtsTriangle::e3, GTS_POINT, GTS_SEGMENT, GTS_TRIANGLE, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.
Referenced by gts_volume_optimized_vertex().
Definition at line 149 of file vopt.c.
References boundary_cost(), f, gts_edge_is_boundary(), GTS_IS_EDGE, and GTS_SEGMENT.
Referenced by gts_volume_optimized_cost().
Definition at line 200 of file vopt.c.
References GTS_POINT, gts_point_distance2(), GTS_SEGMENT, and gts_vertex_neighbors().
Referenced by gts_volume_optimized_cost().
Definition at line 175 of file vopt.c.
References GTS_IS_FACE, GTS_POINT, GTS_SEGMENT, gts_vertex_triangles(), and triangle_normal().
Referenced by gts_volume_optimized_cost().
gdouble gts_volume_optimized_cost | ( | GtsEdge * | e, |
GtsVolumeOptimizedParams * | params | ||
) |
gts_volume_optimized_cost: : a GtsEdge. : a GtsVolumeOptimizedParams.
Returns: the cost for the collapse of as minimized by the function gts_volume_optimized_vertex().
Definition at line 501 of file vopt.c.
References _GtsVolumeOptimizedParams::boundary_weight, edge_boundary_cost(), edge_shape_cost(), edge_volume_cost(), GTS_OBJECT, gts_object_destroy(), GTS_POINT, gts_point_distance2(), GTS_SEGMENT, gts_vertex_class(), gts_volume_optimized_vertex(), _GtsVolumeOptimizedParams::shape_weight, and _GtsVolumeOptimizedParams::volume_weight.
GtsVertex* gts_volume_optimized_vertex | ( | GtsEdge * | edge, |
GtsVertexClass * | klass, | ||
GtsVolumeOptimizedParams * | params | ||
) |
gts_volume_optimized_vertex: : a GtsEdge. : a GtsVertexClass to be used for the new vertex. : a #GtsVolumeOptimizedParms.
Returns: a GtsVertex which can be used to replace for an edge collapse operation. The position of the vertex is optimized in order to minimize the changes in area and volume for the surface using . The volume enclosed by the surface is locally preserved. For more details see "Fast and memory efficient polygonal simplification" (1998) and "Evaluation of memoryless simplification" (1999) by Lindstrom and Turk.
Definition at line 236 of file vopt.c.
References boundary_preservation(), _GtsVolumeOptimizedParams::boundary_weight, c, f, gts_edge_is_boundary(), GTS_IS_EDGE, GTS_IS_FACE, gts_matrix3_inverse(), gts_matrix_compatible_row(), gts_matrix_destroy(), gts_matrix_new(), gts_matrix_print(), gts_matrix_quadratic_optimization(), gts_matrix_zero(), GTS_POINT, gts_point_distance2(), GTS_SEGMENT, gts_vector_print(), gts_vertex_neighbors(), gts_vertex_new(), gts_vertex_triangles(), n, _GtsVertex::segments, _GtsVolumeOptimizedParams::shape_weight, triangle_normal(), _GtsVolumeOptimizedParams::volume_weight, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.
Referenced by gts_volume_optimized_cost().
static void triangle_normal | ( | GtsTriangle * | t, |
gdouble * | nx, | ||
gdouble * | ny, | ||
gdouble * | nz, | ||
gdouble * | nt | ||
) | [static] |
Definition at line 26 of file vopt.c.
References _GtsTriangle::e1, _GtsTriangle::e2, GTS_POINT, GTS_SEGMENT, _GtsPoint::x, _GtsPoint::y, and _GtsPoint::z.
Referenced by edge_volume_cost(), and gts_volume_optimized_vertex().