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

geom_prototypes.h

Go to the documentation of this file.
00001 #ifndef DEF_geom_prototypes 00002 #define DEF_geom_prototypes 00003 00004 public double fast_approx_sqrt( 00005 double y ); 00006 00007 public Real fast_approx_distance_between_points( 00008 Point *p1, 00009 Point *p2 ); 00010 00011 public int clip_polygon_against_box( 00012 int n_points, 00013 Point points[], 00014 Real x_min, 00015 Real x_max, 00016 Real y_min, 00017 Real y_max, 00018 Real z_min, 00019 Real z_max, 00020 int n_output_points, 00021 Point output_points[] ); 00022 00023 public int clip_polygon_against_plane( 00024 int n_points, 00025 Point points[], 00026 Real plane_constant, 00027 Vector *normal, 00028 Point output_points[] ); 00029 00030 public void split_polygon_with_plane( 00031 int n_points, 00032 Point points[], 00033 Real plane_constant, 00034 Vector *normal, 00035 int *n_in, 00036 Point in_points[], 00037 int *n_out, 00038 Point out_points[] ); 00039 00040 public void get_closest_point_on_line_segment( 00041 Point *point, 00042 Point *p1, 00043 Point *p2, 00044 Point *closest_point ); 00045 00046 public Real get_distance_to_line_segment( 00047 Point *point, 00048 Point *p1, 00049 Point *p2, 00050 Real *alpha ); 00051 00052 public Real get_point_object_distance_sq( 00053 Point *point, 00054 object_struct *object, 00055 int obj_index, 00056 Point *object_point ); 00057 00058 public Real get_point_object_distance( 00059 Point *point, 00060 object_struct *object, 00061 int obj_index, 00062 Point *object_point ); 00063 00064 public Real get_point_object_vertex_distance( 00065 Point *point, 00066 object_struct *object, 00067 int obj_index, 00068 int *object_vertex ); 00069 00070 public Real find_closest_point_on_object( 00071 Point *point, 00072 object_struct *object, 00073 int *obj_index, 00074 Point *point_on_object ); 00075 00076 public Real find_closest_vertex_on_object( 00077 Point *point, 00078 object_struct *object, 00079 int *vertex_on_object ); 00080 00081 public void get_polygon_vertex_curvatures( 00082 polygons_struct *polygons, 00083 int n_neighbours[], 00084 int *neighbours[], 00085 Real smoothing_distance, 00086 Real low_threshold, 00087 Real curvatures[] ); 00088 00089 public void flatten_around_vertex( 00090 Point *vertex, 00091 int n_neighbours, 00092 Point neighbours[], 00093 BOOLEAN closed_flag, 00094 Real x_flat[], 00095 Real y_flat[] ); 00096 00097 public void flatten_around_vertex_to_sphere( 00098 Real radius, 00099 Point *vertex, 00100 int n_neighbours, 00101 Point neighbours[], 00102 Real x_sphere[], 00103 Real y_sphere[], 00104 Real z_sphere[] ); 00105 00106 public int compute_distances_from_point( 00107 polygons_struct *polygons, 00108 int n_neighbours[], 00109 int *neighbours[], 00110 Point *point, 00111 int poly, 00112 Real max_distance, 00113 BOOLEAN distances_initialized, 00114 float distances[], 00115 int *list[] ) ; 00116 00117 public void find_polygon_normal_no_normalize( 00118 int n_points, 00119 Point points[], 00120 Real *nx, 00121 Real *ny, 00122 Real *nz ); 00123 00124 public void find_polygon_normal( 00125 int n_points, 00126 Point points[], 00127 Vector *normal ); 00128 00129 public void get_plane_through_points( 00130 int n_points, 00131 Point points[], 00132 Vector *normal, 00133 Real *plane_constant ); 00134 00135 public Real distance_from_plane( 00136 Point *point, 00137 Vector *plane_normal, 00138 Real plane_constant ); 00139 00140 public Real distance_from_line( 00141 Point *point, 00142 Point *end_point1, 00143 Point *end_point2 ); 00144 00145 public BOOLEAN line_segment_intersects_plane( 00146 Point *p1, 00147 Point *p2, 00148 Point *plane_origin, 00149 Vector *plane_normal, 00150 Point *intersection_point ); 00151 00152 public BOOLEAN get_nearest_point_on_lines( 00153 Point *origin1, 00154 Vector *delta1, 00155 Point *origin2, 00156 Vector *delta2, 00157 Point *nearest_point ); 00158 00159 public BOOLEAN clip_line_to_box( 00160 Point *origin, 00161 Vector *direction, 00162 Real x_min, 00163 Real x_max, 00164 Real y_min, 00165 Real y_max, 00166 Real z_min, 00167 Real z_max, 00168 Real *t_min, 00169 Real *t_max ); 00170 00171 public void create_line_circle( 00172 Point *centre, 00173 int plane_axis, 00174 Real x_radius, 00175 Real y_radius, 00176 int n_points, 00177 lines_struct *lines ); 00178 00179 public void get_polygon_interpolation_weights( 00180 Point *point, 00181 int n_points, 00182 Point points[], 00183 Real weights[] ); 00184 00185 public void map_point_between_polygons( 00186 polygons_struct *p1, 00187 int poly_index, 00188 Point *p1_point, 00189 polygons_struct *p2, 00190 Point *p2_point ); 00191 00192 public Real map_point_to_unit_sphere( 00193 polygons_struct *p, 00194 Point *point, 00195 polygons_struct *unit_sphere, 00196 Point *unit_sphere_point ); 00197 00198 public void map_unit_sphere_to_point( 00199 polygons_struct *unit_sphere, 00200 Point *unit_sphere_point, 00201 polygons_struct *p, 00202 Point *point ); 00203 00204 public void polygon_transform_points( 00205 polygons_struct *src_polygons, 00206 polygons_struct *dest_polygons, 00207 int n_points, 00208 Point src_points[], 00209 Point dest_points[] ); 00210 00211 public void map_sphere_to_uv( 00212 Real x, 00213 Real y, 00214 Real z, 00215 Real *u, 00216 Real *v ); 00217 00218 public void map_uv_to_sphere( 00219 Real u, 00220 Real v, 00221 Real *x, 00222 Real *y, 00223 Real *z ); 00224 00225 public void find_path_between_polygons( 00226 int polygon1, 00227 int polygon2, 00228 int n_polygons, 00229 int end_indices[], 00230 Smallest_int visibilities[], 00231 int neighbours[], 00232 BOOLEAN *path_exists, 00233 int *path_length, 00234 int *path[] ); 00235 00236 public void create_unit_tetrahedron( 00237 polygons_struct *polygons ); 00238 00239 public void create_unit_cube( 00240 polygons_struct *polygons ); 00241 00242 public void create_unit_octohedron( 00243 polygons_struct *polygons ); 00244 00245 public void create_unit_icosahedron( 00246 polygons_struct *polygons ); 00247 00248 public void intersect_planes_with_polygons( 00249 polygons_struct *polygons, 00250 Point *plane_origin, 00251 Vector *plane_normal, 00252 lines_struct *lines ); 00253 00254 public void intersect_planes_with_quadmesh( 00255 quadmesh_struct *quadmesh, 00256 Point *plane_origin, 00257 Vector *plane_normal, 00258 lines_struct *lines ); 00259 00260 public BOOLEAN null_Point( 00261 Point *p ); 00262 00263 public BOOLEAN null_Vector( 00264 Vector *v ); 00265 00266 public Real distance_between_points( 00267 Point *p1, 00268 Point *p2 ); 00269 00270 public BOOLEAN points_within_distance( 00271 Point *p1, 00272 Point *p2, 00273 Real distance ); 00274 00275 public void apply_point_to_min_and_max( 00276 Point *point, 00277 Point *min_point, 00278 Point *max_point ); 00279 00280 public void expand_min_and_max_points( 00281 Point *min_point, 00282 Point *max_point, 00283 Point *min_to_check, 00284 Point *max_to_check ); 00285 00286 public void get_range_points( 00287 int n_points, 00288 Point points[], 00289 Point *min_corner, 00290 Point *max_corner ); 00291 00292 public void get_points_centroid( 00293 int n_points, 00294 Point points[], 00295 Point *centroid ); 00296 00297 public void reverse_vectors( 00298 int n_vectors, 00299 Vector vectors[] ); 00300 00301 public Real get_angle_between_points( 00302 Point *prev_point, 00303 Point *this_point, 00304 Point *next_point ); 00305 00306 public Real sq_distance_between_points( 00307 Point *p1, 00308 Point *p2 ); 00309 00310 public Real find_point_polygon_distance_sq( 00311 Point *point, 00312 int n_points, 00313 Point poly_points[], 00314 Point *closest_point ); 00315 00316 public Real find_point_polygon_distance( 00317 Point *point, 00318 int n_points, 00319 Point poly_points[], 00320 Point *closest_point ); 00321 00322 public int find_closest_polygon_point( 00323 Point *point, 00324 polygons_struct *polygons, 00325 Point *closest_point ); 00326 00327 public void create_polygons_sphere( 00328 Point *centre, 00329 Real x_size, 00330 Real y_size, 00331 Real z_size, 00332 int n_up, 00333 int n_around, 00334 BOOLEAN subdividing_flag, 00335 polygons_struct *polygons ); 00336 00337 public int get_sphere_point_index( 00338 int up, 00339 int around, 00340 int n_up, 00341 int n_around ); 00342 00343 public BOOLEAN is_this_sphere_topology( 00344 polygons_struct *polygons ); 00345 00346 public BOOLEAN get_tessellation_of_polygons_sphere( 00347 polygons_struct *polygons, 00348 int *tess ); 00349 00350 public int get_tessellation_with_n_points( 00351 int n_points ); 00352 00353 public void half_sample_sphere_tessellation( 00354 polygons_struct *polygons, 00355 polygons_struct *half ); 00356 00357 public void initialize_intersect_directions( void ); 00358 00359 public Real *get_intersect_directions( void ); 00360 00361 public BOOLEAN point_within_polygon( 00362 Point *pt, 00363 int n_points, 00364 Point points[], 00365 Vector *polygon_normal ); 00366 00367 public BOOLEAN line_intersects_ellipsoid( 00368 Point *line_origin, 00369 Vector *line_direction, 00370 Point *sphere_centre, 00371 Real x_size, 00372 Real y_size, 00373 Real z_size, 00374 Real *t_min, 00375 Real *t_max ); 00376 00377 public BOOLEAN ray_intersects_sphere( 00378 Point *origin, 00379 Vector *direction, 00380 Point *centre, 00381 Real radius, 00382 Real *dist ); 00383 00384 public void intersect_ray_object( 00385 Point *origin, 00386 Vector *direction, 00387 object_struct *object, 00388 int obj_index, 00389 int *closest_obj_index, 00390 Real *closest_dist, 00391 int *n_intersections, 00392 Real *distances[] ); 00393 00394 public int intersect_ray_with_object( 00395 Point *origin, 00396 Vector *direction, 00397 object_struct *object, 00398 int *obj_index, 00399 Real *dist, 00400 Real *distances[] ); 00401 00402 public void remove_invisible_polygons( 00403 polygons_struct *polygons, 00404 Smallest_int visibilities[] ); 00405 00406 public Real get_smooth_surface_curvature( 00407 polygons_struct *polygons, 00408 int n_neighbours[], 00409 int *neighbours[], 00410 int poly, 00411 int vertex, 00412 BOOLEAN distances_initialized, 00413 float distances[], 00414 Real smoothing_distance ); 00415 00416 public void smooth_lines( 00417 lines_struct *lines, 00418 Real smooth_length ); 00419 00420 public void create_line_spline( 00421 lines_struct *lines, 00422 int n_curve_segments, 00423 lines_struct *new_lines ); 00424 00425 public void smooth_polygon( 00426 polygons_struct *polygons, 00427 Real max_dist_from_original, 00428 Real fraction_to_move, 00429 Real stop_threshold, 00430 Real normal_ratio, 00431 BOOLEAN range_flag, 00432 volume_struct *volume, 00433 int min_value, 00434 int max_value ); 00435 00436 public BOOLEAN get_interpolation_weights_2d( 00437 Real x, 00438 Real y, 00439 int n_points, 00440 Real xs[], 00441 Real ys[], 00442 Real weights[] ); 00443 00444 public BOOLEAN get_prediction_weights_2d( 00445 Real x, 00446 Real y, 00447 int n_points, 00448 Real xs[], 00449 Real ys[], 00450 Real *x_weights[2], 00451 Real *x_constant, 00452 Real *y_weights[2], 00453 Real *y_constant ); 00454 00455 public BOOLEAN get_prediction_weights_3d( 00456 Real x, 00457 Real y, 00458 Real z, 00459 int n_points, 00460 Real xs[], 00461 Real ys[], 00462 Real zs[], 00463 Real *x_weights[3], 00464 Real *y_weights[3], 00465 Real *z_weights[3] ); 00466 00467 public BOOLEAN is_single_closed_curve( 00468 lines_struct *lines ); 00469 00470 public void subdivide_lines( 00471 lines_struct *lines ); 00472 00473 public void subdivide_polygons( 00474 polygons_struct *polygons ); 00475 00476 public Real get_polygon_2d_area( 00477 int n_points, 00478 Point points[] ); 00479 00480 public Real get_polygon_surface_area( 00481 int n_points, 00482 Point points[] ); 00483 00484 public Real get_polygons_surface_area( 00485 polygons_struct *polygons ); 00486 00487 public BOOLEAN is_this_tetrahedral_topology( 00488 polygons_struct *polygons ); 00489 00490 public int get_tetra_tessellation_with_n_points( 00491 int n_points ); 00492 00493 public void create_tetrahedral_sphere( 00494 Point *centre, 00495 Real rx, 00496 Real ry, 00497 Real rz, 00498 int n_triangles, 00499 polygons_struct *polygons ); 00500 00501 public void half_sample_tetrahedral_tessellation( 00502 polygons_struct *polygons, 00503 polygons_struct *half ); 00504 00505 public int convert_lines_to_tubes( 00506 lines_struct *lines, 00507 int n_around, 00508 Real radius, 00509 quadmesh_struct *quadmeshes[] ); 00510 00511 public void create_slice_quadmesh( 00512 Volume volume, 00513 int axis_index, 00514 Real voxel_position, 00515 int x_tess, 00516 int y_tess, 00517 Real x_min, 00518 Real x_max, 00519 Real y_min, 00520 Real y_max, 00521 quadmesh_struct *quadmesh ); 00522 00523 public void create_slice_3d( 00524 Volume volume, 00525 Point *origin, 00526 Vector *normal, 00527 polygons_struct *polygons ); 00528 #endif

Generated on Wed Jul 28 09:10:57 2004 for BICPL by doxygen 1.3.7