Data Structures |
|
struct | RpSpline |
Functions |
|
RpSpline * | RpSplineStreamRead (RwStream *stream) |
const RpSpline * | RpSplineStreamWrite (const RpSpline *spline, RwStream *stream) |
RwUInt32 | RpSplineStreamGetSize (const RpSpline *spline) |
RwInt32 | RpSplineGetNumControlPoints (const RpSpline *spline) |
RwV3d * | RpSplineGetControlPoint (RpSpline *spline, RwInt32 control, RwV3d *point) |
RpSpline * | RpSplineSetControlPoint (RpSpline *spline, RwInt32 control, RwV3d *point) |
RwV3d * | RpSplineFindPosition (RpSpline *spline, RwInt32 path, RwReal where, RwV3d *pos, RwV3d *tangent) |
RwReal | RpSplineFindMatrix (RpSpline *spline, RwInt32 path, RwReal where, RwV3d *up, RwMatrix *matrix) |
RpSpline * | RpSplineClone (RpSpline *spline) |
RpSpline * | RpSplineRead (RwChar *name) |
RwBool | RpSplineWrite (RpSpline *spline, RwChar *name) |
RwBool | RpSplineDestroy (RpSpline *spline) |
RpSpline * | RpSplineCreate (RwInt32 numCtrlPoints, RwInt32 type, RwV3d *ctrlPoints) |
RwBool | RpSplinePluginAttach (void) |
Functions provided allow you to create splines and store them in RpSpline datatypes. These splines can then be used within your application. Supporting functions include the ability to adjust the control points, find a location along a spline and generate Frenet matrices.
For more background on cubic uniform B-Splines, see the page 90 of the book: "Advanced Animation and Rendering Techniques", Watt and Watt, Addison Wesley, ISBN 0-201-54412-1. http://www.awlonline.com/productpage/?ISBN=0201544121
|
RpSplineClone copies the specified spline. This function creates a new spline with exactly the same attributes as the original. The spline plugin must be attached before using this function.
|
|
RpSplineCreate is used to create a new interpolating cubic spline of the specified type with the given array of control point positions. The number of control points must be greater than or equal to four.
|
|
RpSplineDestroy is used to destroy the specified spline. Note this function does not free the memory holding the original control point array if the spline was created with RpSplineCreate. The spline plugin must be attached before using this function.
|
|
RpSplineFindMatrix is used to calculate a matrix representing the Frenet matrix at the given parameter position along the specified spline. This matrix can be used to transform an object's frame to the given parameter position and orientation as follows: look-at vector tangent to the path (pointing in the sense of increasing parameter value), look-up vector as specified by up, and look-right vector pointing either towards or away from the center of curvature. The spline plugin must be attached before using this function.
|
|
RpSplineFindPosition is used to calculate the position and the unit tangent vector (pointing in the sense of increasing parameter value) of a point on the specified spline with the given parameter value. The spline plugin must be attached before using this function.
|
|
RpSplineGetControlPoint is used to retrieve the position of the given control point in the specified spline. The spline plugin must be attached before using this function.
|
|
RpSplineGetNumControlPoints is used to retrieve the number of control points defining the specified spline The spline plugin must be attached before using this function.
|
|
RpSplinePluginAttach is used to attach the spline plugin to the RenderWare system to enable the generation of interpolating cubic splines. The spline plugin must be attached between initializing the system with RwEngineInit and opening it with RwEngineOpen.
|
|
RpSplineRead is used to read a spline from the given disk file. This function uses the binary stream mechanism for reading the spline data. The spline plugin must be attached before using this function.
|
|
RpSplineSetControlPoint is used to redefine the position of the given contrl point in the specified spline and recalculate the spline. The spline plugin must be attached before using this function.
|
|
RpSplineStreamGetSize is used to determine the size in bytes of the binary representation of the specified spline object. This is used in the binary chunk header to indicate the size of the chunk. The size does not include the size of the chunk header. The spline plugin must be attached before using this function.
|
|
RpSplineStreamRead is used to read a spline from the specified binary stream. Note that prior to this function call a binary spline chunk must be found in the stream using the RwStreamFindChunk API function. The spline plugin must be attached before using this function. The sequence to locate and read a spline from a binary stream is as follows RwStream *stream; RpSpline *newSpline; stream = RwStreamOpen(rwSTREAMFILENAME, rwSTREAMREAD, "mybinary.xxx"); if( stream ) { if( RwStreamFindChunk(stream, rwID_SPLINE, NULL, NULL) ) { newSpline = RpSplineStreamRead(stream); } RwStreamClose(stream, NULL); }
|
|
RpSplineStreamWrite is used to write the specified spline to the given binary stream. Note that the stream will have been opened prior to this function call. The spline plugin must be attached before using this function.
|
|
RpSplineWrite is used to write the specified spline to the given disk file. This function uses the binary stream mechanism for writing the spline data. The spline plugin must be attached before using this function.
|
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |