IntrSrfRayFreePreprocess

(user_lib/srfray.c:271)

Prototype:

  void IntrSrfRayFreePreprocess(VoidPtr Handle)


Description:

Releases the pre processed data structed created by the function IntrSrfRayPreprocessSrf.

Parameters:

Handle: As returned by IntrSrfRayPreprocessSrf to release


Returned Value:

void


Keywords:

ray surface intersection


IntrSrfRayPreprocessSrf

(user_lib/srfray.c:59)

Prototype:

  VoidPtr IntrSrfRayPreprocessSrf(CagdSrfStruct *Srf, int FineNess)


Description:

Preprocess a surface for fast computation of ray-surface intersection. Returns NULL if fails, otherwise a pointer to preprocessed data structure. The preprocessed data is in fact a hierarchy of bounding boxes extracted while the surface is being polygonized.

Parameters:

Srf: To preprocess.
FineNess: Control on accuracy, the higher the finer. The surface will be subdivided into approximately FineNess regions in each of the two parametric directions.


Returned Value:

VoidPtr: A handle on the preprocessed data, NULL otherwise.


Keywords:

ray surface intersection


IntrSrfRayTestRay

(user_lib/srfray.c:304)

Prototype:

  CagdBType IntrSrfRayTestRay(VoidPtr Handle,
                              CagdPType RayOrigin,
                              CagdVType RayDir,
                              CagdUVType InterUV)


Description:

Computes the first intersection of a given ray with the given surface, if any. If TRUE is returned, the InterUV is updated to the interesection.

Parameters:

Handle: As returned by IntrSrfRayPreprocessSrf to release
RayOrigin: tarting point of ray.
RayDir: Direction of ray.


Returned Value:

CagdBType: TRUE if found intersection, FALSE otherwise.


Keywords:

ray surface intersection


UserCntrSrfWithPlane

(user_lib/srf_cntr.c:150)

Prototype:

  IPPolygonStruct *UserCntrSrfWithPlane(CagdSrfStruct *Srf,
                                        PlaneType Plane,
                                        RealType FineNess)


Description:

Computes the intersection of a freeform surface and a plane by approximating the surface by polygons and calling Boolean tools. If PSrfObj is a scalar surface then it is promoted first into a 3D Euclidean surface with UV as YZ coordinates (and X has scalar field).

Parameters:

Srf: To approximate its intersection with the given plane.
Plane: To intersect with the given surface. If NULL the XY plane is used.
Fineness: Control of polygonal approximation of surface. See IritSurface2Polygons function.


Returned Value:

IPPolygonStruct *: A list of polylines approximating the contour.


See Also:

UserCntrScalarFieldAndEval

Keywords:

contouring


UserDescribeError

(user_lib/user_err.c:42)

Prototype:

  char *UserDescribeError(UserFatalErrorType ErrorNum)


Description:

Returns a string describing a the given error. Errors can be raised by any member of this user library as well as other users. Raised error will cause an invokation of UserFatalError function which decides how to handle this error. UserFatalError can for example, invoke this routine with the error type, print the appropriate message and quit the program.

Parameters:

ErrorNum: Type of the error that was raised.


Returned Value:

char *: A string describing the error type.


Keywords:

error handling


UserFatalError

(user_lib/user_ftl.c:28)

Prototype:

  void UserFatalError(UserFatalErrorType ErrID)


Description:

Trap User_lib errors right here. Provides a default error handler for the user library. Gets an error description using UserDescribeError, prints it and exit the program using exit.

Parameters:

ErrID: Error type that was raised.


Returned Value:

void


Keywords:

error handling


UserPolyline2LinBsplineCrv

(user_lib/usrcnvrt.c:62)

Prototype:

  CagdCrvStruct *UserPolyline2LinBsplineCrv(IPPolygonStruct *Poly)


Description:

Returns a linear Bspline curve constructed from given polyline.

Parameters:

Poly: To convert to a linear bspline curve.


Returned Value:

CagdCrvStruct *: A linear Bspline curve representing Poly.


See Also:

CnvrtPolyline2LinBsplineCrv UserPolylines2LinBsplineCrvs

Keywords:

linear curves conversion


UserPolylines2LinBsplineCrvs

(user_lib/usrcnvrt.c:30)

Prototype:

  CagdCrvStruct *UserPolylines2LinBsplineCrvs(IPPolygonStruct *Polys)


Description:

Returns a list of linear Bspline curves constructed from given polylines.

Parameters:

Polys: To convert to linear bspline curves.


Returned Value:

CagdCrvStruct *: Linear Bspline curves representing Poly.


See Also:

CnvrtPolyline2LinBsplineCrv UserPolyline2LinBsplineCrv

Keywords:

linear curves conversion


UserSrfVisibConeDecomp

(user_lib/visible.c:41)

Prototype:

  IPObjectStruct *UserSrfVisibConeDecomp(CagdSrfStruct *Srf,
                                         CagdRType Resolution,
                                         CagdRType ConeAngle)


Description:

Computes a decomposition of surface Srf into regions that are visible with normals deviating in a cone of size as set via ConeAngle.

Parameters:

Srf: To decompose into visibility cones.
Resolution: Of polygonal approximation of surface Srf.
ConeAngle: Of coverage over the unit sphere. ConeAngle prescribes the opening angle of the cone. In Radians.


Returned Value:

IPObjectStruct *: A list of trimmed surface regions of surface Srf that are visible from a selected direction (available as "VIewDir" attribute on them) ad that the union of the list covers the entire surface Srf.


See Also:

UserViewingConeSrfDomains UserVisibilityClassify

Keywords:




UserViewingConeSrfDomains

(user_lib/visible.c:175)

Prototype:

  IPObjectStruct *UserViewingConeSrfDomains(CagdSrfStruct *Srf,
                                            CagdSrfStruct *NSrf,
                                            IPPolygonStruct *ConeDirs,
                                            CagdRType Resolution,
                                            CagdRType ConeAngle,
                                            CagdRType Euclidean)


Description:

Computes the domain in given surface Srf that is inside the given cones of directions ConeDirs and opening angle ConeAngle.

Parameters:

Srf: To compute its visibility.
NSrf: The normal surface computed symbollically for Srf.
ConeDirs: Direction of cone's axes.
Resolution: Of Cone - normal surface intersection, for polygonal approximation accuracy.
ConeAngle: The opening angle of the cone, in Radians.
Euclidean: Contours are in Euclidean (TRUE) or parametric (FALSE) space of Srf.


Returned Value:

IPPolygonStruct *: Set of piecewise linear contours, approximating the intersections of the normal viewing cones and the original surface.


See Also:

UserVisibilityClassify UserSrfVisibConeDecomp

Keywords:




UserVisibilityClassify

(user_lib/visible.c:108)

Prototype:

  TrimSrfStruct *UserVisibilityClassify(IPObjectStruct *SclrSrf,
                                        TrimSrfStruct *TrimmedSrfs)


Description:

Given a decomposition of surface Srf into a set of TrimmedSrfs into regions that are inside the normal viewing cone as prescribed by SclrSrf, eliminate all regions (trimmed surfaces) that are outside the viewing cone in the given list, TrimmedSrfs.

Parameters:

SclrSrf: The scalar surface computed symbollically in UserViewingConeSrfDomains, forming this decomosition.
TrimmedSrfs: To verify they are within the viewing code of ViewingDir. Trimmed surfaces inside this list that are outside the viewing cone are eliminated, in place.


Returned Value:

TrimSrfStruct *: The trimmed regions inside the viewing cone, as a subset of TrimmedSrfs.


See Also:

UserViewingConeSrfDomains UserSrfVisibConeDecomp

Keywords: