fastest 3D software for linux

Linux 3D
interactive ray-tracing
[1 introduction] [2 overview] [3 reference] [4 GUI]

Index

 E3dSpline_GetTransformedBoundingBox
 E3dSpline_FreeCVs
 E3dSpline_GetDrawingArcLengthParameters
 E3dSplineCV_Init
 E3dSplineCVs_Init
 E3dSplineCVs_New
 E3dSpline_GetUsAtCVs
 E3dSpline_UpdateSegmentLengths
 E3dSpline_GetXYRange
 E3dSpline_GetYValueFromX
 E3dSpline_Get3DPosition
 E3dSplines_ReadFromCSV

E3dSpline_GetTransformedBoundingBox

Get the bounding box of a Spline aligned to an arbitrary coordinate system

Syntax
EBool E3dSpline_GetTransformedBoundingBox(E3dSpline* PSpline, const E3dMatrix PMatrix, E3dBBox* PBBox)

Arguments
PSpline Pointer to the Spline structure PMatrix The Matrix that defines the coordinate system PBBMin Returned bounding box point 0 PBBMax Returned bounding box point 1
Description
This function transforms each CV of the given Spline with the given Matrix and returns the minimum and maximum XYZ values of the resulting bounding box.

Example
E3dSpline_GetTransformedBoundingBox(PSpline, LModel->LocalToWorldMatrix, PBBMin, PBBMax); This will return the "world-aligned" bounding box of the PSpline (assuming that PSpline is a Geometry of LModel). Return value
TRUE if successful, FALSE in case of an error.

See also
E3dSpline_GetBoundingBox

E3dSpline_FreeCVs

Free Control Vertices of a Spline

Syntax
void E3dSpline_FreeCVs(E3dSpline* PSpline)

Argument
PSpline Pointer to the Spline structure
Description
This function frees all the CVs of the given Spline.

Return value
None.

See also
E3dSplineCVs_New

E3dSpline_GetDrawingArcLengthParameters

Get visual arc-length parameters (following "DrawSteps") of Spline

Syntax
E3dCoordinate E3dSpline_GetDrawingArcLengthParameters(const E3dSpline* PSpline, const E3dCoordinate PGapSize, const EBool PInvert, E3dCoordinate* PTable, EIndex* PNumOfGapsP)

Arguments
PSpline Pointer to the Spline PInvert If TRUE, get parameters in reverse order PGapSize Gap size in U space. If < 0, all segments are considered visible PTable Pre-allocated array of at least PSpline->NumOfLinSegments + 1 elements for the result PNumOfGapsP Return the number of gaps here (number of segments marked invisible)
Description
Fills in the length-proportional values in PTable, walking through the piece-wise linear approximation of the Spline that is used for rendering.

Return value
The total "drawn length" of the Spline (the sum of the lengths of the linear segments).

See also
E3dSpline_CreateLinearSegments

E3dSplineCV_Init

Set a Spline Control Vertex to a default

Syntax
void E3dSplineCV_Init(E3dSplineCV* PCV, const int PSegmentType)

Arguments
PSplineType Type of the Spline the CVs will be used with PCV Pointer to the Spline CV
Description
Initializes the given Spline CV (control vertex).

Return value
None.

See also
E3dSplineCVs_New

E3dSplineCVs_Init

Set Spline Control Vertices to a default

Syntax
void E3dSplineCVs_Init(E3dSplineCV* PCVs, const int PSegmentType, const EIndex PN)

Arguments
PSplineType Type of the Spline the CVs will be used with PCV Pointer to the Spline CV PN The number of CVs to initialize
Description
Initializes the given Spline CV (control vertex).

Return value
None.

See also
E3dSplineCVs_New

E3dSplineCVs_New

Allocate array of Spline Control Vertices (CVs)

Syntax
E3dSplineCV* E3dSplineCVs_New(const int PType, const EIndex PNumOfCVs)

Arguments
PType Type of the Spline the CVs will be used with PNumOfCVs Number of CVs to allocate
Description
Allocates a number of Spline CVs (control vertex) in an array and initializes them. The type of the structures allocated depends on LSplineType.

Return value
Pointer to the array of allocated CVs or NULL in case of an error.

E3dSpline_GetUsAtCVs

Return U values at the CVs of a Spline

Syntax
E3dCoordinate* E3dSpline_GetUsAtCVs(E3dSpline* PSpline)

Arguments
PSpline Pointer to the Spline
Description
Return normalized arc-length distance values (0 to 1) at the CVs of PSpline.

Return value
Array of U values, or NULL, if the U values can not be determined (e.g. the Spline's total length is invalid)

E3dSpline_UpdateSegmentLengths

(Re)compute segment lengths and the total length of a Spline

Syntax
E3dCoordinate E3dSpline_UpdateSegmentLengths(E3dSpline* PSpline, EIndex PLinSteps)

Argument
PSpline Pointer to the Spline structure PLinSteps Number of steps for curved segments
Description
This function recomputes the length of all the segments in the given Spline and stores the length value on each Spline CV (CV). As any other segment-related information, the segment length is stored on the segment's starting key. Lengths of curved segments are computed with explicit integration. The PLinSteps argument determines the number of steps (samples) within each curved segment. The higher this number, the higher the precision of the computation will be. If this value is 0, PSpline->NumOfStepsForLength will be used.

Return value
The total length of the Spline.

E3dSpline_GetXYRange

Calculate signed 2D BBox of a Spline

Syntax
int E3dSpline_GetXYRange(const E3dSpline* PSpline, E3dCoord2* PXY0, E3dCoord2* PXY1)

Arguments
PSpline Pointer to the Spline PXY0 Pointer to the first XY position PXY1 Pointer to the last XY position
Description
Return the XY position of the first and last points on PSpline. Note that this is not quite the same as a bounding box. PXY0.X may be > PXY1.X and / or PXY0.Y may be > PXY1.Y. PXY0.X > PXY1.X indicates that the Spline needs to be inverted if it is to be used for E3dSpline_GetYValueFromX.

Return value
E_SUCCESS if all went well and the X and Y coordinates of the first and last positions on the Spline in PXY0 and PXY1. If the values could not the determined, E_NO_DATA is returned.

See also
E3dSpline_GetYValueFromX

E3dSpline_GetYValueFromX

Compute 3D position along a Spline

Syntax
int E3dSpline_GetYValueFromX(E3dSpline* PSpline, const E3dCoordinate PX, E3dCoordinate* PY)

Arguments
PSpline Pointer to the Spline structure PX Parameter (0.0...1.0) PY Pointer to the return value
Description
Computes the Y value on a given Spline, at a given X value. The postion returned is in the Spline's local coordinate system. It is used for key-frame animation, guided extrude etc. Note that for performance reasons, this function doesn't do all possible validity tests for PSpline, so: - The Spline must represent a 1D function (no loops etc.). - X coordinates must increase from the first CV toward the last (use E3dSpline_GetXYRange() to determine this and invert the Spline if necessary, via E3dSpline_Invert()).

Return value
E_SUCCESS if all went well and the Y value in *PY.

See also
E3dSpline_UpdateSegmentLengths, E3dSpline_GetXYRange, E3dSpline_Invert

E3dSpline_Get3DPosition

Compute 3D position along a Spline

Syntax
int E3dSpline_Get3DPosition(E3dSpline* PSpline, E3dCoordinate PTime, E3dCoord3* PPositionP, E3dCoord3* PTangentP, E3dCoord3* PNormalP)

Arguments
PSpline Pointer to the Spline structure PTime Parameter (0.0...1.0) PPositionP Pointer to structure for the return value
Description
This function computes the 3D position along the given Spline, defined by the "Time" parameter. The parameter value 0.0 represents the starting point and 1.0 represents the end point of the Spline, while values in-between refer to a point along the Spline. The segment lengths and the total length of the Spline must be up-to-date when calling this function. The postion returned is in the Spline's local coordinate system.

Return value
E_SUCCESS if all went well.

See also
E3dSpline_UpdateSegmentLengths

E3dSplines_ReadFromCSV

Read CSV data (comma separated values) with X,Y, values, into Splines

Syntax
int E3dSplines_ReadFromCSV(const char* PBuffer, const EIndex PBufferSize, E3dSpline*** PSplinesP, EIndex* PSplines_CountP)

Arguments
PBuffer Pointer to the string (e.g. from an ASCII file) PBufferSize The lenght of the string PSplinesP Pointer for returning the Splines PSplines_CountP Pointer for returning the number of Splines read
Description
Reads CSV data (comma separated values) with X,Y, values, into Splines. It checks each line for 1, 2 or 3 values and uses those as the X,Y and Z coordinates of each CV of a Spline. The first line is the names of the coordinate axes. If the number of names is a multiple of 2,

Return value
None.
© 1996-2024 By Gabor Nagy