libnltrack/bezr.c File Reference

#include "libnltrack.h"
#include <math.h>

Include dependency graph for bezr.c:

Functions

int addBezier (float posX, float posY, float posZ, float cp1X, float cp1Y, float cp1Z, float cp2X, float cp2Y, float cp2Z, float roll, int continuesRoll, int equalDistanceCP, int relativeRoll, NlTrack *Track)
 Add a bezier.
void modifyBezier (int bezierindex, float posX, float posY, float posZ, float cp1X, float cp1Y, float cp1Z, float cp2X, float cp2Y, float cp2Z, float roll, int continuesRoll, int equalDistanceCP, int relativeRoll, NlTrack *Track)
 Modify a bezier.
void deleteBezier (int bezierindex, NlTrack *Track)
 Delete a bezier.
Bezier getBezier (int bezierindex, NlTrack *Track)
 Get a bezier.
int getNumBeziers (NlTrack *Track)
 Get the number of the beziers.

Function Documentation

int addBezier ( float  posX,
float  posY,
float  posZ,
float  cp1X,
float  cp1Y,
float  cp1Z,
float  cp2X,
float  cp2Y,
float  cp2Z,
float  roll,
int  continuesRoll,
int  equalDistanceCP,
int  relativeRoll,
NlTrack Track 
)

Add a bezier.

Parameters:
posX is the x-axis position of the bezier
posY is the y-axis position of the bezier
posZ is the z-axis position of the bezier
cp1X is the x-axis position of the first controll point
cp1Y is the y-axis position of the first controll point
cp1Z is the z-axis position of the first controll point
cp2X is the x-axis position of the second controll point
cp2Y is the y-axis position of the second controll point
cp2Z is the z-axis position of the second controll point
roll is the banking in radian. To convert from degree to radian, please use toRad().
continuesRoll is the controll roll attribute of the bezier. 1 for true and 0 for false.
equalDistanceCP Will determine that the controll points are equal. 1 for true and 0 for false.
relativeRoll is the relative roll attribute of the bezier. 1 for true and 0 for false.
Track a pointer to the NlTrack
Returns:
bezierindex will contain the index number of the added bezier
This function will add a new bezier. If you call this function, you'll have to add a new segment with addSegment() otherwise a segment error will occur.

References NlTrack::beziers, NlTrack::bezrsize, Bezier::continuesRoll, Bezier::cp1X, Bezier::cp1Y, Bezier::cp1Z, Bezier::cp2X, Bezier::cp2Y, Bezier::cp2Z, Bezier::equalDistanceCP, NlTrack::numBeziers, Bezier::posX, Bezier::posY, Bezier::posZ, Bezier::relativeRoll, and Bezier::roll.

void deleteBezier ( int  bezierindex,
NlTrack Track 
)

Delete a bezier.

Parameters:
bezierindex is the index value of the deleted bezier
Track a pointer to the NlTrack
This function will delete a bezier.

References NlTrack::beziers, NlTrack::bezrsize, and NlTrack::numBeziers.

Bezier getBezier ( int  bezierindex,
NlTrack Track 
)

Get a bezier.

Parameters:
bezierindex is the index value of the deleted bezier
Track a pointer to the NlTrack
Returns:
Bezier will contain the bezier datas
This function will get a bezier.

References NlTrack::beziers.

int getNumBeziers ( NlTrack Track  ) 

Get the number of the beziers.

Parameters:
Track a pointer to the NlTrack
Returns:
will contain the number of the beziers
This function will get the number of the beziers.

References NlTrack::numBeziers.

void modifyBezier ( int  bezierindex,
float  posX,
float  posY,
float  posZ,
float  cp1X,
float  cp1Y,
float  cp1Z,
float  cp2X,
float  cp2Y,
float  cp2Z,
float  roll,
int  continuesRoll,
int  equalDistanceCP,
int  relativeRoll,
NlTrack Track 
)

Modify a bezier.

Parameters:
bezierindex is the index value of the modified bezier
posX is the x-axis position of the bezier
posY is the y-axis position of the bezier
posZ is the z-axis position of the bezier
cp1X is the x-axis position of the first controll point
cp1Y is the y-axis position of the first controll point
cp1Z is the z-axis position of the first controll point
cp2X is the x-axis position of the second controll point
cp2Y is the y-axis position of the second controll point
cp2Z is the z-axis position of the second controll point
roll is the banking in radian. To convert from degree to radian, please use toRad().
continuesRoll is the controll roll attribute of the bezier. 1 for true and 0 for false.
equalDistanceCP Will determine that the controll points are equal. 1 for true and 0 for false.
relativeRoll is the relative roll attribute of the bezier. 1 for true and 0 for false.
Track a pointer to the NlTrack
This function will modify a bezier.

References NlTrack::beziers, Bezier::continuesRoll, Bezier::cp1X, Bezier::cp1Y, Bezier::cp1Z, Bezier::cp2X, Bezier::cp2Y, Bezier::cp2Z, Bezier::equalDistanceCP, Bezier::posX, Bezier::posY, Bezier::posZ, Bezier::relativeRoll, and Bezier::roll.


Generated on Sun May 25 21:42:45 2008 for libnltrack by  doxygen 1.5.6