Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

smooth_polygons.c File Reference

#include <volume_io/internal_volume_io.h>
#include <bicpl/geom.h>

Include dependency graph for smooth_polygons.c:

Include dependency graph

Go to the source code of this file.

Defines

#define CHECK_INTERVAL   1.0
#define MAX_NEIGHBOURS   100
#define MAX_CUTS_IN_HALF   4

Functions

private void smooth_points (polygons_struct *polygons, Point current_points[], Point new_points[], Smallest_int point_done[], Real max_dist_from_original, Real fraction_to_move, Real normal_ratio, BOOLEAN range_flag, volume_struct *volume, int min_value, int max_value, Real *avg_moved, Real *max_moved)
private Real update_point_position (polygons_struct *polygons, int poly, int vertex_index, int point_index, Point current_points[], Point *new_point, Real max_dist_from_original, Real fraction_to_move, Real normal_ratio, BOOLEAN range_flag, volume_struct *volume, int min_value, int max_value)
private BOOLEAN point_inside_range (volume_struct *volume, Point *point, int min_value, int max_value)
public void smooth_polygon (polygons_struct *polygons, Real max_dist_from_original, Real fraction_to_move, Real stop_threshold, Real normal_ratio, BOOLEAN range_flag, volume_struct *volume, int min_value, int max_value)


Define Documentation

#define CHECK_INTERVAL   1.0
 

Definition at line 22 of file smooth_polygons.c.

Referenced by smooth_polygon().

#define MAX_CUTS_IN_HALF   4
 

Referenced by update_point_position().

#define MAX_NEIGHBOURS   100
 

Definition at line 238 of file smooth_polygons.c.

Referenced by compute_points_centroid_and_normal(), compute_polygon_point_centroid(), and update_point_position().


Function Documentation

private BOOLEAN point_inside_range volume_struct *  volume,
Point *  point,
int  min_value,
int  max_value
 

Definition at line 373 of file smooth_polygons.c.

References y.

Referenced by update_point_position().

private void smooth_points polygons_struct polygons,
Point  current_points[],
Point  new_points[],
Smallest_int  point_done[],
Real  max_dist_from_original,
Real  fraction_to_move,
Real  normal_ratio,
BOOLEAN  range_flag,
volume_struct *  volume,
int  min_value,
int  max_value,
Real *  avg_moved,
Real *  max_moved
 

Definition at line 175 of file smooth_polygons.c.

References polygons_struct::end_indices, FALSE, GET_OBJECT_SIZE, polygons_struct::indices, polygons_struct::n_items, polygons_struct::n_points, POINT_INDEX, TRUE, and update_point_position().

Referenced by smooth_polygon().

public void smooth_polygon polygons_struct polygons,
Real  max_dist_from_original,
Real  fraction_to_move,
Real  stop_threshold,
Real  normal_ratio,
BOOLEAN  range_flag,
volume_struct *  volume,
int  min_value,
int  max_value
 

Definition at line 80 of file smooth_polygons.c.

References CHECK_INTERVAL, check_polygons_neighbours_computed(), polygons_struct::n_points, polygons_struct::points, and smooth_points().

private Real update_point_position polygons_struct polygons,
int  poly,
int  vertex_index,
int  point_index,
Point  current_points[],
Point *  new_point,
Real  max_dist_from_original,
Real  fraction_to_move,
Real  normal_ratio,
BOOLEAN  range_flag,
volume_struct *  volume,
int  min_value,
int  max_value
 

Definition at line 253 of file smooth_polygons.c.

References find_polygon_normal(), get_neighbours_of_point(), get_points_centroid(), MAX_CUTS_IN_HALF, MAX_NEIGHBOURS, null_Vector(), point_inside_range(), and polygons_struct::points.

Referenced by smooth_points().


Generated on Wed Jul 28 09:11:20 2004 for BICPL by doxygen 1.3.7