pcb 4.1.1
An interactive printed circuit board layout editor.

vopt.c File Reference

#include "gts.h"
Include dependency graph for vopt.c:

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)
GtsVertexgts_volume_optimized_vertex (GtsEdge *edge, GtsVertexClass *klass, GtsVolumeOptimizedParams *params)
gdouble gts_volume_optimized_cost (GtsEdge *e, GtsVolumeOptimizedParams *params)

Function Documentation

static gdouble boundary_cost ( GtsEdge edge,
GtsFace f,
GtsVertex v 
) [static]
static void boundary_preservation ( GtsEdge edge,
GtsFace f,
GtsVector  e1,
GtsVector  e2,
GtsMatrix H,
GtsVector  c 
) [static]
static gdouble edge_boundary_cost ( GtsEdge e,
GtsVertex v 
) [static]

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().

Here is the call graph for this function:

static gdouble edge_shape_cost ( GtsEdge e,
GtsVertex v 
) [static]

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().

Here is the call graph for this function:

static gdouble edge_volume_cost ( GtsEdge e,
GtsVertex v 
) [static]

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().

Here is the call graph for this function:

gdouble gts_volume_optimized_cost ( GtsEdge e,
GtsVolumeOptimizedParams params 
)
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().

Here is the call graph for this function:

static void triangle_normal ( GtsTriangle t,
gdouble *  nx,
gdouble *  ny,
gdouble *  nz,
gdouble *  nt 
) [static]