#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "geom.h"
#include "bezier.h"
#include "gpath.h"
Functions | |
| GPathPolyLine * | gpath_init (struct GPathPolyLine *plp) |
| Initializes data structure members and returns a pointer. | |
| int | gpath_add_element (struct GPathPolyLine *plp, int type, int np, struct point_3D p[], int direction) |
| Adds a path element to a polyline. | |
| double | gpath_element_length (struct GPathElement *pe) |
| Length of the GPathElement. | |
| int | gpath_write_all_elements_to_file (FILE *fp, struct GPathPolyLine *plp) |
| Writes the all of the GPathElements of GPathPolyline to the specified file. | |
| int | gpath_write_element_to_file (FILE *fp, struct GPathElement *pe) |
| Writes the GPathElement to the specified file. | |
| int | gpath_scan_from_string_and_add_element (char str[], struct GPathPolyLine *plp) |
| Scans the GPathElement from a supplied string and appends it to the GPathPolyLine. | |
| int | gpath_append_polyline (struct GPathPolyLine *plp1, struct GPathPolyLine *plp2, int direction) |
| Appends another path polyline to a first polyline. | |
| point_3D * | gpath_get_first_point_on_path (struct GPathPolyLine *plp) |
| Returns a pointer to the first point on a path. | |
| point_3D * | gpath_get_last_point_on_path (struct GPathPolyLine *plp) |
| Returns a pointer to the last point on a path. | |
| int | gpath_polyline_set_subrange (struct GPathPolyLine *plp, double t0, double t1) |
| Set the parameter subrange for subsequent evaluations of position. | |
| int | gpath_polyline_eval (struct GPathPolyLine *plp, double t_in_subrange, struct point_3D *loc) |
| Evaluate the position on the polyline at given parameter t. | |
| int | gpath_polyline_translate (struct GPathPolyLine *plp, double dx, double dy, double dz) |
| Translate the polyline position by dx,dy,dz. | |
| int | coons_patch (struct GPathPolyLine *c1, struct GPathPolyLine *c2, struct GPathPolyLine *c3, struct GPathPolyLine *c4, double r, double s, struct point_3D *d) |
| Compute a location on the Coons patch at parameter position (r,s). | |
| int | TFI_3D_no_array (struct GPathPolyLine *c0, struct GPathPolyLine *c1, struct GPathPolyLine *c2, struct GPathPolyLine *c3, struct GPathPolyLine *c4, struct GPathPolyLine *c5, struct GPathPolyLine *c6, struct GPathPolyLine *c7, struct GPathPolyLine *c8, struct GPathPolyLine *c9, struct GPathPolyLine *c10, struct GPathPolyLine *c11, double r, double s, double t, struct point_3D *d) |
| Compute a location within the 3D volume at parameter position (r,s,t). | |
| int | TFI_3D (struct GPathPolyLine *c[], double r, double s, double t, struct point_3D *d) |
| Compute a location within the 3D volume at parameter position (r,s,t). | |
| int | line_translate (struct point_3D B[], double dx, double dy, double dz) |
| Translate the straight-line position by dx,dy,dz. | |
| int | line_eval (struct point_3D B[], double t, struct point_3D *loc) |
| Evaluate the straight-line position with parameter t. | |
| double | line_length (struct point_3D B[]) |
| Returns an estimate of the length of a straight line. | |
| int | arc_translate (struct point_3D B[], double dx, double dy, double dz) |
| Translate the arc position by dx,dy,dz. | |
| int | arc_eval_position_and_length (struct point_3D B[], double t, struct point_3D *loc, double *length) |
| Evaluate the position on an arc for parameter t and the length of the original arc. (This function does the real work.). | |
| int | arc_eval (struct point_3D B[], double t, struct point_3D *loc) |
| Evaluate the position on an arc for parameter t. | |
| double | arc_length (struct point_3D B[]) |
| Returns an estimate of the length of an arc. | |
|
||||||||||||||||
|
Evaluate the position on an arc for parameter t. Returns 0 if everything was OK, -1 if there was a problem. The real work is delegated to a helper function because there is so much common code between the arc_length calculation and the position calculation.
|
|
||||||||||||||||||||
|
Evaluate the position on an arc for parameter t and the length of the original arc. (This function does the real work.). Returns 0 if everything was OK, -1 if there was a problem.
|
|
|
Returns an estimate of the length of an arc. The real work is delegated.
|
|
||||||||||||||||||||
|
Translate the arc position by dx,dy,dz. Returns 0 if everything was OK, -1 if there was a problem.
|
|
||||||||||||||||||||||||||||||||
|
Compute a location on the Coons patch at parameter position (r,s). Returns 0 for a normal return, -1 otherwise.
|
|
||||||||||||||||||||||||
|
Adds a path element to a polyline. Returns the new number of elements on success, -1 otherwise. Presently, these polylines may consist of disjoint segments. Maybe we should test that the ends of adjacent segments are coincident; maybe we shouldn't.
|
|
||||||||||||||||
|
Appends another path polyline to a first polyline. Returns the new number of elements on success, -1 otherwise.
|
|
|
Length of the GPathElement.
|
|
|
Initializes data structure members and returns a pointer.
< length should be always current < default subrange is the whole path < == 0 indicates that the path is open |
|
||||||||||||||||
|
Evaluate the position on the polyline at given parameter t. Returns 0 if everything was OK, -1 if there was a problem.
|
|
||||||||||||||||
|
Set the parameter subrange for subsequent evaluations of position.
|
|
||||||||||||||||||||
|
Translate the polyline position by dx,dy,dz. Returns 0 if everything was OK, -1 if there was a problem.
|
|
||||||||||||
|
Scans the GPathElement from a supplied string and appends it to the GPathPolyLine. Returns 0 if successful, -1 otherwise. |
|
||||||||||||
|
Writes the all of the GPathElements of GPathPolyline to the specified file.
|
|
||||||||||||
|
Writes the GPathElement to the specified file. Returns number of characters written if successful, -1 otherwise. |
|
||||||||||||||||
|
Evaluate the straight-line position with parameter t. Returns 0 if everything was OK, -1 if there was a problem.
|
|
|
Returns an estimate of the length of a straight line.
|
|
||||||||||||||||||||
|
Translate the straight-line position by dx,dy,dz. Returns 0 if everything was OK, -1 if there was a problem.
|
|
||||||||||||||||||||||||
|
Compute a location within the 3D volume at parameter position (r,s,t). Returns 0 for a normal return, -1 otherwise.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Compute a location within the 3D volume at parameter position (r,s,t). This function allows us to specify the edges individually but delegates the actual work to TFI_3D. The point of this function is to allow easy access from Python code. |
1.4.4