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

geom_prototypes.h File Reference

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

public double fast_approx_sqrt (double y)
public Real fast_approx_distance_between_points (Point *p1, Point *p2)
public int clip_polygon_against_box (int n_points, Point points[], Real x_min, Real x_max, Real y_min, Real y_max, Real z_min, Real z_max, int n_output_points, Point output_points[])
public int clip_polygon_against_plane (int n_points, Point points[], Real plane_constant, Vector *normal, Point output_points[])
public void split_polygon_with_plane (int n_points, Point points[], Real plane_constant, Vector *normal, int *n_in, Point in_points[], int *n_out, Point out_points[])
public void get_closest_point_on_line_segment (Point *point, Point *p1, Point *p2, Point *closest_point)
public Real get_distance_to_line_segment (Point *point, Point *p1, Point *p2, Real *alpha)
public Real get_point_object_distance_sq (Point *point, object_struct *object, int obj_index, Point *object_point)
public Real get_point_object_distance (Point *point, object_struct *object, int obj_index, Point *object_point)
public Real get_point_object_vertex_distance (Point *point, object_struct *object, int obj_index, int *object_vertex)
public Real find_closest_point_on_object (Point *point, object_struct *object, int *obj_index, Point *point_on_object)
public Real find_closest_vertex_on_object (Point *point, object_struct *object, int *vertex_on_object)
public void get_polygon_vertex_curvatures (polygons_struct *polygons, int n_neighbours[], int *neighbours[], Real smoothing_distance, Real low_threshold, Real curvatures[])
public void flatten_around_vertex (Point *vertex, int n_neighbours, Point neighbours[], BOOLEAN closed_flag, Real x_flat[], Real y_flat[])
public void flatten_around_vertex_to_sphere (Real radius, Point *vertex, int n_neighbours, Point neighbours[], Real x_sphere[], Real y_sphere[], Real z_sphere[])
public int compute_distances_from_point (polygons_struct *polygons, int n_neighbours[], int *neighbours[], Point *point, int poly, Real max_distance, BOOLEAN distances_initialized, float distances[], int *list[])
 Compute distance in mesh structure.

public void find_polygon_normal_no_normalize (int n_points, Point points[], Real *nx, Real *ny, Real *nz)
public void find_polygon_normal (int n_points, Point points[], Vector *normal)
public void get_plane_through_points (int n_points, Point points[], Vector *normal, Real *plane_constant)
public Real distance_from_plane (Point *point, Vector *plane_normal, Real plane_constant)
public Real distance_from_line (Point *point, Point *end_point1, Point *end_point2)
public BOOLEAN line_segment_intersects_plane (Point *p1, Point *p2, Point *plane_origin, Vector *plane_normal, Point *intersection_point)
public BOOLEAN get_nearest_point_on_lines (Point *origin1, Vector *delta1, Point *origin2, Vector *delta2, Point *nearest_point)
public BOOLEAN clip_line_to_box (Point *origin, Vector *direction, Real x_min, Real x_max, Real y_min, Real y_max, Real z_min, Real z_max, Real *t_min, Real *t_max)
public void create_line_circle (Point *centre, int plane_axis, Real x_radius, Real y_radius, int n_points, lines_struct *lines)
public void get_polygon_interpolation_weights (Point *point, int n_points, Point points[], Real weights[])
public void map_point_between_polygons (polygons_struct *p1, int poly_index, Point *p1_point, polygons_struct *p2, Point *p2_point)
public Real map_point_to_unit_sphere (polygons_struct *p, Point *point, polygons_struct *unit_sphere, Point *unit_sphere_point)
public void map_unit_sphere_to_point (polygons_struct *unit_sphere, Point *unit_sphere_point, polygons_struct *p, Point *point)
public void polygon_transform_points (polygons_struct *src_polygons, polygons_struct *dest_polygons, int n_points, Point src_points[], Point dest_points[])
public void map_sphere_to_uv (Real x, Real y, Real z, Real *u, Real *v)
public void map_uv_to_sphere (Real u, Real v, Real *x, Real *y, Real *z)
public void find_path_between_polygons (int polygon1, int polygon2, int n_polygons, int end_indices[], Smallest_int visibilities[], int neighbours[], BOOLEAN *path_exists, int *path_length, int *path[])
public void create_unit_tetrahedron (polygons_struct *polygons)
public void create_unit_cube (polygons_struct *polygons)
public void create_unit_octohedron (polygons_struct *polygons)
public void create_unit_icosahedron (polygons_struct *polygons)
public void intersect_planes_with_polygons (polygons_struct *polygons, Point *plane_origin, Vector *plane_normal, lines_struct *lines)
public void intersect_planes_with_quadmesh (quadmesh_struct *quadmesh, Point *plane_origin, Vector *plane_normal, lines_struct *lines)
public BOOLEAN null_Point (Point *p)
public BOOLEAN null_Vector (Vector *v)
public Real distance_between_points (Point *p1, Point *p2)
public BOOLEAN points_within_distance (Point *p1, Point *p2, Real distance)
public void apply_point_to_min_and_max (Point *point, Point *min_point, Point *max_point)
public void expand_min_and_max_points (Point *min_point, Point *max_point, Point *min_to_check, Point *max_to_check)
public void get_range_points (int n_points, Point points[], Point *min_corner, Point *max_corner)
public void get_points_centroid (int n_points, Point points[], Point *centroid)
public void reverse_vectors (int n_vectors, Vector vectors[])
public Real get_angle_between_points (Point *prev_point, Point *this_point, Point *next_point)
public Real sq_distance_between_points (Point *p1, Point *p2)
public Real find_point_polygon_distance_sq (Point *point, int n_points, Point poly_points[], Point *closest_point)
public Real find_point_polygon_distance (Point *point, int n_points, Point poly_points[], Point *closest_point)
public int find_closest_polygon_point (Point *point, polygons_struct *polygons, Point *closest_point)
public void create_polygons_sphere (Point *centre, Real x_size, Real y_size, Real z_size, int n_up, int n_around, BOOLEAN subdividing_flag, polygons_struct *polygons)
public int get_sphere_point_index (int up, int around, int n_up, int n_around)
public BOOLEAN is_this_sphere_topology (polygons_struct *polygons)
public BOOLEAN get_tessellation_of_polygons_sphere (polygons_struct *polygons, int *tess)
public int get_tessellation_with_n_points (int n_points)
public void half_sample_sphere_tessellation (polygons_struct *polygons, polygons_struct *half)
public void initialize_intersect_directions (void)
public Real * get_intersect_directions (void)
public BOOLEAN point_within_polygon (Point *pt, int n_points, Point points[], Vector *polygon_normal)
public BOOLEAN line_intersects_ellipsoid (Point *line_origin, Vector *line_direction, Point *sphere_centre, Real x_size, Real y_size, Real z_size, Real *t_min, Real *t_max)
public BOOLEAN ray_intersects_sphere (Point *origin, Vector *direction, Point *centre, Real radius, Real *dist)
public void intersect_ray_object (Point *origin, Vector *direction, object_struct *object, int obj_index, int *closest_obj_index, Real *closest_dist, int *n_intersections, Real *distances[])
public int intersect_ray_with_object (Point *origin, Vector *direction, object_struct *object, int *obj_index, Real *dist, Real *distances[])
public void remove_invisible_polygons (polygons_struct *polygons, Smallest_int visibilities[])
public Real get_smooth_surface_curvature (polygons_struct *polygons, int n_neighbours[], int *neighbours[], int poly, int vertex, BOOLEAN distances_initialized, float distances[], Real smoothing_distance)
public void smooth_lines (lines_struct *lines, Real smooth_length)
public void create_line_spline (lines_struct *lines, int n_curve_segments, lines_struct *new_lines)
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)
public BOOLEAN get_interpolation_weights_2d (Real x, Real y, int n_points, Real xs[], Real ys[], Real weights[])
public BOOLEAN get_prediction_weights_2d (Real x, Real y, int n_points, Real xs[], Real ys[], Real *x_weights[2], Real *x_constant, Real *y_weights[2], Real *y_constant)
public BOOLEAN get_prediction_weights_3d (Real x, Real y, Real z, int n_points, Real xs[], Real ys[], Real zs[], Real *x_weights[3], Real *y_weights[3], Real *z_weights[3])
public BOOLEAN is_single_closed_curve (lines_struct *lines)
public void subdivide_lines (lines_struct *lines)
public void subdivide_polygons (polygons_struct *polygons)
public Real get_polygon_2d_area (int n_points, Point points[])
public Real get_polygon_surface_area (int n_points, Point points[])
public Real get_polygons_surface_area (polygons_struct *polygons)
public BOOLEAN is_this_tetrahedral_topology (polygons_struct *polygons)
public int get_tetra_tessellation_with_n_points (int n_points)
public void create_tetrahedral_sphere (Point *centre, Real rx, Real ry, Real rz, int n_triangles, polygons_struct *polygons)
public void half_sample_tetrahedral_tessellation (polygons_struct *polygons, polygons_struct *half)
public int convert_lines_to_tubes (lines_struct *lines, int n_around, Real radius, quadmesh_struct *quadmeshes[])
public void create_slice_quadmesh (Volume volume, int axis_index, Real voxel_position, int x_tess, int y_tess, Real x_min, Real x_max, Real y_min, Real y_max, quadmesh_struct *quadmesh)
public void create_slice_3d (Volume volume, Point *origin, Vector *normal, polygons_struct *polygons)


Function Documentation

public void apply_point_to_min_and_max Point *  point,
Point *  min_point,
Point *  max_point
 

Definition at line 141 of file points.c.

Referenced by get_range_points().

public BOOLEAN clip_line_to_box Point *  origin,
Vector *  direction,
Real  x_min,
Real  x_max,
Real  y_min,
Real  y_max,
Real  z_min,
Real  z_max,
Real *  t_min,
Real *  t_max
 

Definition at line 151 of file intersect.c.

References FALSE, and TRUE.

Referenced by clip_line_to_volume(), intersect_ray_with_cube(), ray_intersects_range(), and ray_intersects_tube().

public int clip_polygon_against_box int  n_points,
Point  points[],
Real  x_min,
Real  x_max,
Real  y_min,
Real  y_max,
Real  z_min,
Real  z_max,
int  n_output_points,
Point  output_points[]
 

Definition at line 6 of file clip_3d.c.

References FALSE, and TRUE.

Referenced by scan_a_polygon().

public int clip_polygon_against_plane int  n_points,
Point  points[],
Real  plane_constant,
Vector *  normal,
Point  output_points[]
 

Definition at line 127 of file clip_3d.c.

public int compute_distances_from_point polygons_struct polygons,
int  n_neighbours[],
int *  neighbours[],
Point *  point,
int  poly,
Real  max_distance,
BOOLEAN  distances_initialized,
float  distances[],
int *  list[]
 

Compute distance in mesh structure.

Compute single-source shortest path distances in the graph using Dijkstra's algorithm. If the upper bound (max_distance) is positive, then the search is terminated once this bound is reached.

Definition at line 30 of file geodesic_distance.c.

References DELETE_PRIORITY_QUEUE, distance_between_points(), polygons_struct::end_indices, find_polygon_with_vertex(), GET_OBJECT_SIZE, polygons_struct::indices, INITIALIZE_PRIORITY_QUEUE, INSERT_IN_PRIORITY_QUEUE, IS_PRIORITY_QUEUE_EMPTY, lookup_polygon_vertex(), polygons_struct::n_points, POINT_INDEX, polygons_struct::points, PRIORITY_QUEUE_STRUCT, and REMOVE_FROM_PRIORITY_QUEUE.

Referenced by get_smooth_surface_curvature().

public int convert_lines_to_tubes lines_struct lines,
int  n_around,
Real  radius,
quadmesh_struct quadmeshes[]
 

Definition at line 84 of file tubes.c.

References lines_struct::colours, create_tube(), lines_struct::end_indices, GET_OBJECT_SIZE, lines_struct::indices, lines_struct::n_items, POINT_INDEX, and lines_struct::points.

public void create_line_circle Point *  centre,
int  plane_axis,
Real  x_radius,
Real  y_radius,
int  n_points,
lines_struct lines
 

Definition at line 40 of file line_circle.c.

References lines_struct::end_indices, lines_struct::indices, initialize_lines(), lines_struct::n_items, lines_struct::n_points, lines_struct::points, and WHITE.

Referenced by check_correct_parametric_lines().

public void create_line_spline lines_struct lines,
int  n_curve_segments,
lines_struct new_lines
 

Definition at line 133 of file smooth_lines.c.

References add_point_to_line(), lines_struct::colours, lines_struct::end_indices, GET_OBJECT_SIZE, lines_struct::indices, initialize_lines(), lines_struct::line_thickness, lines_struct::n_items, lines_struct::n_points, POINT_INDEX, lines_struct::points, and start_new_line().

public void create_polygons_sphere Point *  centre,
Real  x_size,
Real  y_size,
Real  z_size,
int  n_up,
int  n_around,
BOOLEAN  subdividing_flag,
polygons_struct polygons
 

Definition at line 63 of file polygon_sphere.c.

References polygons_struct::colours, delete_polygons(), polygons_struct::end_indices, get_n_sphere_points(), get_sphere_point(), get_sphere_point_index(), get_subdivided_point(), get_tessellation_of_polygons_sphere(), polygons_struct::indices, initialize_polygons(), polygons_struct::n_items, polygons_struct::n_points, polygons_struct::normals, polygons_struct::points, and WHITE.

Referenced by check_correct_parametric_polygons(), check_correct_subsampled_polygons(), create_tetrahedral_sphere(), half_sample_sphere_tessellation(), and subdivide_polygons().

public void create_slice_3d Volume  volume,
Point *  origin,
Vector *  normal,
polygons_struct polygons
 

Definition at line 124 of file volume_slice.c.

References add_point_to_polygon(), get_volume_cross_section(), initialize_polygons(), and WHITE.

public void create_slice_quadmesh Volume  volume,
int  axis_index,
Real  voxel_position,
int  x_tess,
int  y_tess,
Real  x_min,
Real  x_max,
Real  y_min,
Real  y_max,
quadmesh_struct quadmesh
 

Definition at line 45 of file volume_slice.c.

References get_default_surfprop(), initialize_quadmesh(), set_quadmesh_point(), WHITE, and y.

public void create_tetrahedral_sphere Point *  centre,
Real  rx,
Real  ry,
Real  rz,
int  n_triangles,
polygons_struct polygons
 

Definition at line 101 of file tetrahedrons.c.

References compute_polygon_normals(), create_polygons_sphere(), create_unit_icosahedron(), create_unit_tetrahedron(), FALSE, polygons_struct::n_items, polygons_struct::n_points, polygons_struct::points, subdivide_polygons(), and y.

Referenced by check_correct_parametric_polygons(), check_correct_subsampled_polygons(), half_sample_tetrahedral_tessellation(), and io_polygons().

public void create_unit_cube polygons_struct polygons  ) 
 

Definition at line 66 of file platonics.c.

References fill_in_indices(), initialize_polygons_with_size(), polygons_struct::points, and WHITE.

public void create_unit_icosahedron polygons_struct polygons  ) 
 

Definition at line 121 of file platonics.c.

References fill_in_indices(), initialize_polygons_with_size(), polygons_struct::points, and WHITE.

Referenced by create_tetrahedral_sphere().

public void create_unit_octohedron polygons_struct polygons  ) 
 

Definition at line 95 of file platonics.c.

References fill_in_indices(), initialize_polygons_with_size(), polygons_struct::points, and WHITE.

public void create_unit_tetrahedron polygons_struct polygons  ) 
 

Definition at line 41 of file platonics.c.

References fill_in_indices(), initialize_polygons_with_size(), polygons_struct::points, and WHITE.

Referenced by create_tetrahedral_sphere().

public Real distance_between_points Point *  p1,
Point *  p2
 

Definition at line 79 of file points.c.

Referenced by compute_distances_from_point(), compute_model_point(), distance_from_line(), estimate_polygon_curvature(), find_closest_vertex_on_object(), flatten_around_vertex(), get_distance_to_line_segment(), get_lines_arc_point(), get_lines_length(), get_point_marker_distance(), get_point_polygon_vertex_distance(), get_smoothing_points(), map_point_to_unit_sphere(), and smooth_lines().

public Real distance_from_line Point *  point,
Point *  end_point1,
Point *  end_point2
 

Definition at line 213 of file geometry.c.

References distance_between_points().

public Real distance_from_plane Point *  point,
Vector *  plane_normal,
Real  plane_constant
 

Definition at line 190 of file geometry.c.

Referenced by get_plane_through_points().

public void expand_min_and_max_points Point *  min_point,
Point *  max_point,
Point *  min_to_check,
Point *  max_to_check
 

Definition at line 175 of file points.c.

Referenced by get_range_of_object().

public Real fast_approx_distance_between_points Point *  p1,
Point *  p2
 

Definition at line 57 of file approx_sqrt.c.

References FAST_SQRT.

public double fast_approx_sqrt double  y  ) 
 

Definition at line 17 of file approx_sqrt.c.

References FALSE, lookup(), MAX_SQRT_ARG, N_SQRT_PRECOMPUTE, TRUE, and y.

public Real find_closest_point_on_object Point *  point,
object_struct object,
int *  obj_index,
Point *  point_on_object
 

Definition at line 399 of file closest_point.c.

References quadmesh_struct::bintree, polygons_struct::bintree, lines_struct::bintree, lines_struct::end_indices, find_closest_point_in_bintree(), get_lines_ptr(), get_object_type(), get_point_object_distance(), get_polygons_ptr(), get_quadmesh_n_objects(), get_quadmesh_ptr(), LINES, MARKER, polygons_struct::n_items, lines_struct::n_items, POLYGONS, and QUADMESH.

Referenced by find_closest_polygon_point(), and polygon_transform_point().

public int find_closest_polygon_point Point *  point,
polygons_struct polygons,
Point *  closest_point
 

Definition at line 190 of file poly_dist.c.

References polygons_struct::bintree, find_closest_point_on_object(), find_point_polygon_distance_sq(), get_polygon_points(), MAX_POINTS_PER_POLYGON, polygons_struct::n_items, object_struct::object_type, POLYGONS, and object_struct::specific.

Referenced by map_point_to_unit_sphere(), and map_unit_sphere_to_point().

public Real find_closest_vertex_on_object Point *  point,
object_struct object,
int *  vertex_on_object
 

Definition at line 480 of file closest_point.c.

References polygons_struct::bintree, distance_between_points(), find_closest_vertex_in_bintree(), get_object_points(), get_object_type(), get_polygons_ptr(), and POLYGONS.

public void find_path_between_polygons int  polygon1,
int  polygon2,
int  n_polygons,
int  end_indices[],
Smallest_int  visibilities[],
int  neighbours[],
BOOLEAN *  path_exists,
int *  path_length,
int *  path[]
 

Definition at line 53 of file path_surface.c.

References FALSE, follow_path(), INVALID_DISTANCE, START_INDEX, and TRUE.

public Real find_point_polygon_distance Point *  point,
int  n_points,
Point  poly_points[],
Point *  closest_point
 

Definition at line 165 of file poly_dist.c.

References find_point_polygon_distance_sq().

public Real find_point_polygon_distance_sq Point *  point,
int  n_points,
Point  poly_points[],
Point *  closest_point
 

Definition at line 75 of file poly_dist.c.

References find_polygon_normal(), point_segment_sq_distance(), point_within_polygon(), and sq_distance_between_points().

Referenced by find_closest_polygon_point(), find_point_polygon_distance(), get_point_polygon_distance_sq(), and get_point_quadmesh_distance_sq().

public void find_polygon_normal int  n_points,
Point  points[],
Vector *  normal
 

Definition at line 129 of file geometry.c.

References find_polygon_normal_no_normalize(), nx, ny, and nz.

Referenced by compute_points_centroid_and_normal(), compute_polygon_normal(), compute_quadmesh_normals(), find_point_polygon_distance_sq(), get_plane_through_points(), and update_point_position().

public void find_polygon_normal_no_normalize int  n_points,
Point  points[],
Real *  nx,
Real *  ny,
Real *  nz
 

Definition at line 37 of file geometry.c.

References null_Vector(), nx, ny, nz, and y.

Referenced by find_polygon_normal().

public void flatten_around_vertex Point *  vertex,
int  n_neighbours,
Point  neighbours[],
BOOLEAN  closed_flag,
Real  x_flat[],
Real  y_flat[]
 

Definition at line 24 of file flatten.c.

References distance_between_points(), and get_angle_between_points().

Referenced by flatten_around_vertex_to_sphere().

public void flatten_around_vertex_to_sphere Real  radius,
Point *  vertex,
int  n_neighbours,
Point  neighbours[],
Real  x_sphere[],
Real  y_sphere[],
Real  z_sphere[]
 

Definition at line 74 of file flatten.c.

References flatten_around_vertex(), make_rotation_about_axis(), null_Vector(), TRUE, and y.

public Real get_angle_between_points Point *  prev_point,
Point *  this_point,
Point *  next_point
 

Definition at line 305 of file points.c.

Referenced by compute_polygon_normals(), flatten_around_vertex(), and get_average_curvature().

public void get_closest_point_on_line_segment Point *  point,
Point *  p1,
Point *  p2,
Point *  closest_point
 

Definition at line 165 of file closest_point.c.

References get_line_segment_alpha().

Referenced by get_point_line_segment_distance_sq(), point_segment_distance_squared(), and point_segment_sq_distance().

public Real get_distance_to_line_segment Point *  point,
Point *  p1,
Point *  p2,
Real *  alpha
 

Definition at line 192 of file closest_point.c.

References distance_between_points(), and get_line_segment_alpha().

Referenced by get_arbitrary_polygon_interpolation_weights().

public BOOLEAN get_interpolation_weights_2d Real  x,
Real  y,
int  n_points,
Real  xs[],
Real  ys[],
Real  weights[]
 

Definition at line 26 of file solve_plane.c.

References FALSE, TRUE, and y.

public Real* get_intersect_directions void   ) 
 

Definition at line 49 of file ray_intersect.c.

References dirs, and n_dirs.

public BOOLEAN get_nearest_point_on_lines Point *  origin1,
Vector *  delta1,
Point *  origin2,
Vector *  delta2,
Point *  nearest_point
 

Definition at line 93 of file intersect.c.

public void get_plane_through_points int  n_points,
Point  points[],
Vector *  normal,
Real *  plane_constant
 

Definition at line 160 of file geometry.c.

References distance_from_plane(), find_polygon_normal(), and get_points_centroid().

public Real get_point_object_distance Point *  point,
object_struct object,
int  obj_index,
Point *  object_point
 

Definition at line 313 of file closest_point.c.

References get_point_object_distance_sq().

Referenced by find_closest_point_on_object().

public Real get_point_object_distance_sq Point *  point,
object_struct object,
int  obj_index,
Point *  object_point
 

Definition at line 263 of file closest_point.c.

References get_lines_ptr(), get_marker_ptr(), get_object_type(), get_point_line_segment_distance_sq(), get_point_marker_distance(), get_point_polygon_distance_sq(), get_point_quadmesh_distance_sq(), get_polygons_ptr(), get_quadmesh_ptr(), LINES, MARKER, POLYGONS, and QUADMESH.

Referenced by get_point_object_distance(), and recursive_find_closest_point().

public Real get_point_object_vertex_distance Point *  point,
object_struct object,
int  obj_index,
int *  object_vertex
 

Definition at line 360 of file closest_point.c.

References get_object_type(), get_point_polygon_vertex_distance(), get_polygons_ptr(), and POLYGONS.

Referenced by recursive_find_closest_vertex().

public void get_points_centroid int  n_points,
Point  points[],
Point *  centroid
 

Definition at line 241 of file points.c.

References y.

Referenced by compute_points_centroid_and_normal(), get_average_curvature(), get_plane_through_points(), and update_point_position().

public Real get_polygon_2d_area int  n_points,
Point  points[]
 

Definition at line 36 of file surface_area.c.

public void get_polygon_interpolation_weights Point *  point,
int  n_points,
Point  points[],
Real  weights[]
 

Definition at line 339 of file map_polygons.c.

References get_arbitrary_polygon_interpolation_weights(), get_quadrilateral_interpolation_weights(), and get_triangle_interpolation_weights().

Referenced by map_point_between_polygons().

public Real get_polygon_surface_area int  n_points,
Point  points[]
 

Definition at line 71 of file surface_area.c.

Referenced by get_polygons_surface_area().

public void get_polygon_vertex_curvatures polygons_struct polygons,
int  n_neighbours[],
int *  neighbours[],
Real  smoothing_distance,
Real  low_threshold,
Real  curvatures[]
 

Definition at line 41 of file curvature.c.

References compute_points_centroid_and_normal(), compute_polygon_normals(), polygons_struct::end_indices, FALSE, GET_OBJECT_SIZE, get_smooth_surface_curvature(), polygons_struct::indices, initialized, polygons_struct::n_items, polygons_struct::n_points, POINT_INDEX, and TRUE.

public Real get_polygons_surface_area polygons_struct polygons  ) 
 

Definition at line 108 of file surface_area.c.

References get_polygon_points(), get_polygon_surface_area(), MAX_POINTS_PER_POLYGON, and polygons_struct::n_items.

public BOOLEAN get_prediction_weights_2d Real  x,
Real  y,
int  n_points,
Real  xs[],
Real  ys[],
Real *  x_weights[2],
Real *  x_constant,
Real *  y_weights[2],
Real *  y_constant
 

Definition at line 174 of file solve_plane.c.

References get_two_point_prediction(), TRUE, and y.

public BOOLEAN get_prediction_weights_3d Real  x,
Real  y,
Real  z,
int  n_points,
Real  xs[],
Real  ys[],
Real  zs[],
Real *  x_weights[3],
Real *  y_weights[3],
Real *  z_weights[3]
 

Definition at line 300 of file solve_plane.c.

References add_to_linear_least_squares(), delete_linear_least_squares(), FACTOR, FALSE, get_linear_least_squares_solution(), get_random_0_to_1(), initialize_linear_least_squares(), make_rotation_transform(), make_translation_transform(), TRUE, and y.

public void get_range_points int  n_points,
Point  points[],
Point *  min_corner,
Point *  max_corner
 

Definition at line 207 of file points.c.

References apply_point_to_min_and_max().

Referenced by coalesce_object_points(), create_lines_bintree(), create_polygons_bintree(), create_quadmesh_bintree(), and get_range_of_object().

public Real get_smooth_surface_curvature polygons_struct polygons,
int  n_neighbours[],
int *  neighbours[],
int  poly,
int  vertex,
BOOLEAN  distances_initialized,
float  distances[],
Real  smoothing_distance
 

Definition at line 57 of file smooth_curvature.c.

References compute_distances_from_point(), polygons_struct::end_indices, FALSE, get_average_curvature(), get_smoothing_points(), polygons_struct::indices, polygons_struct::n_points, polygons_struct::normals, POINT_INDEX, polygons_struct::points, and TRUE.

Referenced by get_polygon_vertex_curvatures().

public int get_sphere_point_index int  up,
int  around,
int  n_up,
int  n_around
 

Definition at line 252 of file polygon_sphere.c.

Referenced by create_polygons_sphere(), get_subdivided_point(), and half_sample_sphere_tessellation().

public BOOLEAN get_tessellation_of_polygons_sphere polygons_struct polygons,
int *  tess
 

Definition at line 437 of file polygon_sphere.c.

References FALSE, GET_OBJECT_SIZE, and polygons_struct::n_items.

Referenced by check_correct_general_polygons(), check_correct_parametric_polygons(), check_correct_subsampled_polygons(), create_polygons_sphere(), half_sample_sphere_tessellation(), and is_this_sphere_topology().

public int get_tessellation_with_n_points int  n_points  ) 
 

Definition at line 502 of file polygon_sphere.c.

References solve_quadratic().

Referenced by check_correct_parametric_polygons(), and check_correct_subsampled_polygons().

public int get_tetra_tessellation_with_n_points int  n_points  ) 
 

Definition at line 66 of file tetrahedrons.c.

Referenced by check_correct_parametric_polygons(), and check_correct_subsampled_polygons().

public void half_sample_sphere_tessellation polygons_struct polygons,
polygons_struct half
 

Definition at line 545 of file polygon_sphere.c.

References polygons_struct::colour_flag, polygons_struct::colours, create_polygons_sphere(), FALSE, get_sphere_point_index(), get_tessellation_of_polygons_sphere(), polygons_struct::n_points, ONE_COLOUR, PER_ITEM_COLOURS, PER_VERTEX_COLOURS, polygons_struct::points, and polygons_struct::surfprop.

Referenced by check_correct_general_polygons().

public void half_sample_tetrahedral_tessellation polygons_struct polygons,
polygons_struct half
 

Definition at line 213 of file tetrahedrons.c.

References polygons_struct::colour_flag, polygons_struct::colours, create_tetrahedral_sphere(), polygons_struct::n_items, polygons_struct::n_points, polygons_struct::normals, PER_VERTEX_COLOURS, and polygons_struct::points.

Referenced by check_correct_general_polygons().

public void initialize_intersect_directions void   ) 
 

Definition at line 40 of file ray_intersect.c.

References dirs, and n_dirs.

public void intersect_planes_with_polygons polygons_struct polygons,
Point *  plane_origin,
Vector *  plane_normal,
lines_struct lines
 

Definition at line 141 of file plane_polygon_intersect.c.

References coalesce_lines(), delete_hash2_table(), lines_struct::end_indices, polygons_struct::end_indices, GET_OBJECT_SIZE, lines_struct::indices, polygons_struct::indices, initialize_hash2_table(), initialize_lines(), insert_in_hash2_table(), lookup_in_hash2_table(), lines_struct::n_items, polygons_struct::n_items, lines_struct::n_points, POINT_INDEX, lines_struct::points, polygons_struct::points, start_new_line(), and WHITE.

public void intersect_planes_with_quadmesh quadmesh_struct quadmesh,
Point *  plane_origin,
Vector *  plane_normal,
lines_struct lines
 

Definition at line 255 of file plane_polygon_intersect.c.

References coalesce_lines(), delete_hash2_table(), lines_struct::end_indices, get_quadmesh_n_objects(), lines_struct::indices, initialize_hash2_table(), initialize_lines(), insert_in_hash2_table(), lookup_in_hash2_table(), quadmesh_struct::m, quadmesh_struct::n, lines_struct::n_items, lines_struct::n_points, lines_struct::points, quadmesh_struct::points, start_new_line(), and WHITE.

public void intersect_ray_object Point *  origin,
Vector *  direction,
object_struct object,
int  obj_index,
int *  closest_obj_index,
Real *  closest_dist,
int *  n_intersections,
Real *  distances[]
 

Definition at line 917 of file ray_intersect.c.

References get_lines_ptr(), get_marker_ptr(), get_object_type(), get_polygons_ptr(), get_quadmesh_ptr(), intersect_ray_polygon(), intersect_ray_quadmesh_patch(), intersect_ray_tube_segment(), intersect_ray_with_marker(), LINES, MARKER, POLYGONS, and QUADMESH.

Referenced by intersect_ray_with_object(), and recursive_intersect_ray().

public int intersect_ray_with_object Point *  origin,
Vector *  direction,
object_struct object,
int *  obj_index,
Real *  dist,
Real *  distances[]
 

Definition at line 988 of file ray_intersect.c.

References quadmesh_struct::bintree, polygons_struct::bintree, lines_struct::bintree, lines_struct::end_indices, get_lines_ptr(), get_object_type(), get_polygons_ptr(), get_quadmesh_n_objects(), get_quadmesh_ptr(), intersect_ray_object(), intersect_ray_with_bintree(), LINES, MARKER, polygons_struct::n_items, lines_struct::n_items, POLYGONS, and QUADMESH.

public BOOLEAN is_single_closed_curve lines_struct lines  ) 
 

Definition at line 188 of file subdivide_lines.c.

References lines_struct::end_indices, FALSE, lines_struct::indices, lines_struct::n_items, lines_struct::n_points, and TRUE.

Referenced by subdivide_lines().

public BOOLEAN is_this_sphere_topology polygons_struct polygons  ) 
 

Definition at line 415 of file polygon_sphere.c.

References get_tessellation_of_polygons_sphere().

Referenced by subdivide_polygons().

public BOOLEAN is_this_tetrahedral_topology polygons_struct polygons  ) 
 

Definition at line 38 of file tetrahedrons.c.

References polygons_struct::n_items.

Referenced by check_correct_general_polygons(), and io_polygons().

public BOOLEAN line_intersects_ellipsoid Point *  line_origin,
Vector *  line_direction,
Point *  sphere_centre,
Real  x_size,
Real  y_size,
Real  z_size,
Real *  t_min,
Real *  t_max
 

Definition at line 565 of file ray_intersect.c.

References FALSE, solve_quadratic(), and TRUE.

Referenced by ray_intersects_sphere().

public BOOLEAN line_segment_intersects_plane Point *  p1,
Point *  p2,
Point *  plane_origin,
Vector *  plane_normal,
Point *  intersection_point
 

Definition at line 39 of file intersect.c.

References FALSE, and TRUE.

public void map_point_between_polygons polygons_struct p1,
int  poly_index,
Point *  p1_point,
polygons_struct p2,
Point *  p2_point
 

Definition at line 377 of file map_polygons.c.

References get_polygon_interpolation_weights(), get_polygon_points(), and MAX_POINTS_PER_POLYGON.

Referenced by map_point_to_unit_sphere(), map_unit_sphere_to_point(), and polygon_transform_point().

public Real map_point_to_unit_sphere polygons_struct p,
Point *  point,
polygons_struct unit_sphere,
Point *  unit_sphere_point
 

Definition at line 427 of file map_polygons.c.

References distance_between_points(), find_closest_polygon_point(), and map_point_between_polygons().

public void map_sphere_to_uv Real  x,
Real  y,
Real  z,
Real *  u,
Real *  v
 

Definition at line 554 of file map_polygons.c.

References compute_clockwise_rotation(), and y.

public void map_unit_sphere_to_point polygons_struct unit_sphere,
Point *  unit_sphere_point,
polygons_struct p,
Point *  point
 

Definition at line 459 of file map_polygons.c.

References find_closest_polygon_point(), and map_point_between_polygons().

public void map_uv_to_sphere Real  u,
Real  v,
Real *  x,
Real *  y,
Real *  z
 

Definition at line 572 of file map_polygons.c.

References y.

public BOOLEAN null_Point Point *  p  ) 
 

Definition at line 36 of file points.c.

public BOOLEAN null_Vector Vector *  v  ) 
 

Definition at line 57 of file points.c.

Referenced by find_polygon_normal_no_normalize(), flatten_around_vertex_to_sphere(), get_two_d_coordinate(), and update_point_position().

public BOOLEAN point_within_polygon Point *  pt,
int  n_points,
Point  points[],
Vector *  polygon_normal
 

Definition at line 280 of file ray_intersect.c.

References point_within_polygon_2d(), and point_within_triangle_2d().

Referenced by find_point_polygon_distance_sq().

public BOOLEAN points_within_distance Point *  p1,
Point *  p2,
Real  distance
 

Definition at line 108 of file points.c.

public void polygon_transform_points polygons_struct src_polygons,
polygons_struct dest_polygons,
int  n_points,
Point  src_points[],
Point  dest_points[]
 

Definition at line 525 of file map_polygons.c.

References create_object(), get_polygons_ptr(), polygon_transform_point(), POLYGONS, and polygons_are_same_topology().

public BOOLEAN ray_intersects_sphere Point *  origin,
Vector *  direction,
Point *  centre,
Real  radius,
Real *  dist
 

Definition at line 630 of file ray_intersect.c.

References FALSE, and line_intersects_ellipsoid().

Referenced by intersect_ray_tube_segment(), and intersect_ray_with_marker().

public void remove_invisible_polygons polygons_struct polygons,
Smallest_int  visibilities[]
 

Definition at line 37 of file segment_polygons.c.

References polygons_struct::colour_flag, polygons_struct::colours, delete_polygons(), polygons_struct::end_indices, GET_OBJECT_SIZE, polygons_struct::indices, polygons_struct::n_items, polygons_struct::n_points, polygons_struct::normals, ONE_COLOUR, POINT_INDEX, and polygons_struct::points.

public void reverse_vectors int  n_vectors,
Vector  vectors[]
 

Definition at line 279 of file points.c.

Referenced by reverse_object_normals().

public void smooth_lines lines_struct lines,
Real  smooth_length
 

Definition at line 37 of file smooth_lines.c.

References lines_struct::colour_flag, lines_struct::colours, delete_lines(), distance_between_points(), lines_struct::end_indices, GET_OBJECT_SIZE, lines_struct::indices, lines_struct::n_items, lines_struct::n_points, ONE_COLOUR, POINT_INDEX, lines_struct::points, and TRUE.

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

public void split_polygon_with_plane int  n_points,
Point  points[],
Real  plane_constant,
Vector *  normal,
int *  n_in,
Point  in_points[],
int *  n_out,
Point  out_points[]
 

Definition at line 170 of file clip_3d.c.

Referenced by recursive_scan_polygon_to_voxels().

public Real sq_distance_between_points Point *  p1,
Point *  p2
 

Definition at line 36 of file poly_dist.c.

Referenced by find_point_polygon_distance_sq(), get_point_line_segment_distance_sq(), and point_segment_sq_distance().

public void subdivide_lines lines_struct lines  ) 
 

Definition at line 226 of file subdivide_lines.c.

References general_subdivide_lines(), is_single_closed_curve(), and subdivide_closed_curve().

public void subdivide_polygons polygons_struct polygons  ) 
 

Definition at line 49 of file subdivide_polygons.c.

References polygons_struct::colour_flag, polygons_struct::colours, create_polygon_point_neighbours(), create_polygons_sphere(), delete_polygon_point_neighbours(), delete_polygons(), polygons_struct::end_indices, FALSE, polygons_struct::indices, is_this_sphere_topology(), polygons_struct::n_items, polygons_struct::n_points, polygons_struct::normals, ONE_COLOUR, polygons_struct::points, subdivide_polygon(), and TRUE.

Referenced by create_tetrahedral_sphere().


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