MdlDbg

(mdl_dbg.c:26)

Prototype:

  void MdlDbg(void *Obj)


Description:

Prints model objects to stderr. Should be linked to programs for debugging purposes, so model objects may be inspected from a debugger.

Parameters:

Obj: A model object - to be printed to stderr.


Returned Value:

void


Keywords:

debugging


MdlDescribeError

(mdl_err.c:41)

Prototype:

  const char *MdlDescribeError(MdlFatalErrorType ErrorNum)


Description:

Returns a string describing a the given error. Errors can be raised by any member of this mdl library as well as other users. Raised error will cause an invokation of MdlFatalError function which decides how to handle this error. MdlFatalError 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:

const char *: A string describing the error type.


Keywords:

error handling


MdlExtractUVCrv

(mdlcnvrt.c:121)

Prototype:

  CagdCrvStruct *MdlExtractUVCrv(MdlTrimSrfStruct *MdlSrf,
                                 MdlTrimSegStruct *MdlSeg)


Description:

Extracting the UV curve from MdlTrimSegStruct depending on the position of the current model surface.

Parameters:

MdlSrf: odel's trimming surface.
MdlSeg: odel's trimming curve segment.


Returned Value:

CagdCrvStruct *: Extracted UV curve.


Keywords:




MdlFatalError

(mdl_ftl.c:53)

Prototype:

  void MdlFatalError(MdlFatalErrorType ErrID)


Description:

Trap Mdl_lib errors right here. Provides a default error handler for the mdl library. Gets an error description using MdlDescribeError, prints it and exit the program using exit.

Parameters:

ErrID: Error type that was raised.


Returned Value:

void


Keywords:

error handling


MdlGetLoopSegIndex

(mdl_ptch.c:134)

Prototype:

  IritIntPtrSizeType MdlGetLoopSegIndex(MdlTrimSegRefStruct *TrimSeg,
                                        MdlTrimSegStruct *TrimSegList)


Description:

Returns the index of TrimSeg in TrimSegList, first index is 1. Index is going to be negative if the Reversed flag is on.

Parameters:

TrimSeg: To search in TrimSegList for its index.
TrimSegList: List of trimming curve segments.


Returned Value:

IritIntPtrSizeType: Index in list, or zero if not found. This is a special integer of a size of a pointer.


See Also:

MdlGetSrfIndex

Keywords:




MdlGetSrfIndex

(mdl_ptch.c:168)

Prototype:

  IritIntPtrSizeType MdlGetSrfIndex(MdlTrimSrfStruct *Srf,
                                    MdlTrimSrfStruct *TrimSrfList)


Description:

Returns the index of an Srf in TrimSrfList, first index is 1.

Parameters:

Srf: To search in TrimSrfList for its index.
TrimSrfList: List of surfaces.


Returned Value:

IritIntPtrSizeType: Index in list, or zero if not found. This is a special integer of a size of a pointer.


See Also:

MdlGetLoopSegIndex

Keywords:




MdlLoopCopy

(mdl_gen.c:425)

Prototype:

  MdlLoopStruct *MdlLoopCopy(MdlLoopStruct *MdlLoop,
                             MdlTrimSegStruct *TrimSegList)


Description:

Duplicates a trimming surface structure.

Parameters:

MdlLoop: A trimming surface to duplicate.
TrimSegList: The original trimmed segments.


Returned Value:

MdlLoopStruct *: A trimming surface structure.


Keywords:

allocation


MdlLoopCopyList

(mdl_gen.c:453)

Prototype:

  MdlLoopStruct *MdlLoopCopyList(MdlLoopStruct *MdlLoopList,
                                 MdlTrimSegStruct *TrimSegList)


Description:

Allocates and copies a list of Loops structures.

Parameters:

MdlLoopList: o be copied.
TrimSegList: The original trimmed segments.


Returned Value:

MdlLoopStruct *: A duplicated list of Loops.


Keywords:

copy


MdlLoopFree

(mdl_gen.c:130)

Prototype:

  void MdlLoopFree(MdlLoopStruct *MdlLoop)


Description:

Deallocates a Model Loop structure.

Parameters:

MdlLoop: A loop to free.


Returned Value:

void


Keywords:

allocation


MdlLoopFreeList

(mdl_gen.c:150)

Prototype:

  void MdlLoopFreeList(MdlLoopStruct *MdlLoopList)


Description:

Deallocates a Model Loop List structure.

Parameters:

MdlLoopList: list of loops to free.


Returned Value:

void


Keywords:

allocation


MdlLoopNew

(mdl_gen.c:728)

Prototype:

  MdlLoopStruct *MdlLoopNew(MdlTrimSegRefStruct *MdlTrimSegRefList)


Description:

Allocates a model loop structure.

Parameters:

MdlTrimSegRefList: List of model loops forming the trimming loop.


Returned Value:

MdlLoopStruct *: A model loop.


Keywords:

allocation


MdlModelBBox

(mdl_bbox.c:29)

Prototype:

  void MdlModelBBox(MdlModelStruct *Mdl, CagdBBoxStruct *BBox)


Description:

Computes a bounding box for a freeform model.

Parameters:

Mdl: A model to compute a bounding box for.
BBox: Where bounding information is to be saved.


Returned Value:

void


See Also:

MdlModelListBBox CagdCrvListBBox CagdSrfBBox CagdTightBBox

Keywords:

bbox bounding box


MdlModelCopy

(mdl_gen.c:545)

Prototype:

  MdlModelStruct *MdlModelCopy(MdlModelStruct *Model)


Description:

Duplicates a Model structure.

Parameters:

Model: A Model to duplicate.


Returned Value:

MdlModelStruct *: A Model structure.


Keywords:

allocation


MdlModelCopyList

(mdl_gen.c:577)

Prototype:

  MdlModelStruct *MdlModelCopyList(MdlModelStruct *ModelList)


Description:

Allocates and copies a list of Model structures.

Parameters:

ModelList: To be copied.


Returned Value:

MdlModelStruct *: A duplicated list of trimming surfaces.


Keywords:

copy


MdlModelFree

(mdl_gen.c:219)

Prototype:

  void MdlModelFree(MdlModelStruct *Model)


Description:

Deallocates a Model structure.

Parameters:

Model: Model to free.


Returned Value:

void


Keywords:

allocation


MdlModelFreeList

(mdl_gen.c:240)

Prototype:

  void MdlModelFreeList(MdlModelStruct *Model)


Description:

Deallocates a list of Model structures.

Parameters:

Model: list of trimmed surface to free.


Returned Value:

void


Keywords:

allocation


MdlModelListBBox

(mdl_bbox.c:62)

Prototype:

  void MdlModelListBBox(MdlModelStruct *Mdls, CagdBBoxStruct *BBox)


Description:

Computes a bounding box for freeform models.

Parameters:

Mdls: List of models to compute a bounding box for.
BBox: Where bounding information is to be saved.


Returned Value:

void


See Also:

MdlModelBBox CagdCrvListBBox CagdSrfBBox CagdTightBBox

Keywords:

bbox bounding box


MdlModelMatTransform

(mdl_gen.c:1059)

Prototype:

  void MdlModelMatTransform(MdlModelStruct *Model, CagdMType Mat)


Description:

Transforms, in place, the given model as specified by homogeneous matrix Mat.

Parameters:

Model: Model to transform.
Mat: Homogeneous transformation to apply to TV.


Returned Value:

void


Keywords:

models


MdlModelNew

(mdl_gen.c:951)

Prototype:

  MdlModelStruct *MdlModelNew(CagdSrfStruct *Srf,
                              CagdCrvStruct *LoopList,
                              CagdBType HasTopLvlTrim)


Description:

Constructor for a Model.

Parameters:

Srf: The original surface to be trimmed.
LoopList: A list of trimming loops
HasTopLvlTrim: If FALSE, add outer loops boundary.


Returned Value:

MdlModelStruct *: The Model.


Keywords:

Allocation


MdlModelNew2

(mdl_gen.c:992)

Prototype:

  MdlModelStruct *MdlModelNew2(MdlTrimSrfStruct *TrimSrfs,
                               MdlTrimSegStruct *TrimSegs)


Description:

Constructor for a Model. No attempt is mode to verify the consistency of the given data and proper pointers between the different data strcutres.

Parameters:

TrimSrfs: Trimming surfaces.
TrimSegs: A list of trimming segments.


Returned Value:

MdlModelStruct *: The construct Model.


See Also:

MdlModelNew MdlPatchTrimmingSegPointers

Keywords:

Allocation


MdlModelTransform

(mdl_gen.c:1024)

Prototype:

  void MdlModelTransform(MdlModelStruct *Model,
                         CagdRType *Translate,
                         CagdRType Scale)


Description:

Linearly transforms, in place, given model as specified by Translate and Scale.

Parameters:

Model: Model to transform.
Translate: Translation factor.
Scale: Scaling factor.


Returned Value:

void


Keywords:

models


MdlPatchTrimmingSegPointers

(mdl_ptch.c:39)

Prototype:

  void MdlPatchTrimmingSegPointers(MdlModelStruct *Model)


Description:

Patches a model to have proper (back) pointers between the different data structures. The assumtions are that all reference and back pointers are set as indices into the proper lists: 1. Every reference to a surface, is given as its index in the Model's TrimSrfList trimmed surfaces' list. 2. Every reference to a trimming segment, is given as its index in the Model's TrimSegList or trimming segments' list. All lists are indexed starting from 1, 0 denotes an error.

Parameters:

Model: To back patch its pointer.


Returned Value:

void


See Also:

MdlModelNew MdlModelNew2 MdlReadModelFromFile

Keywords:




MdlSetFatalErrorFunc

(mdl_ftl.c:28)

Prototype:

  MdlSetErrorFuncType MdlSetFatalErrorFunc(MdlSetErrorFuncType ErrorFunc)


Description:

Sets the error function to be used by Mdl_lib.

Parameters:

ErrorFunc: New error function to use.


Returned Value:

MdlSetErrorFuncType: Old error function reference.


Keywords:

error handling


MdlTrimConvert

(mdlcnvrt.c:28)

Prototype:

  TrimSrfStruct *MdlTrimConvert(MdlModelStruct *Model)


Description:

Converting the model into the list of trimming surfaces with reduced number points for trimming curves.

Parameters:

Model: Model to convert to a list of trimmed surfaces.


Returned Value:

TrimSrfStruct *: List of trimming surfaces.


See Also:

TrimCrvSegNew TrimCrvNew TrimsrfNew MdlExtractUVCrv

Keywords:




MdlTrimSegCopy

(mdl_gen.c:268)

Prototype:

  MdlTrimSegStruct *MdlTrimSegCopy(MdlTrimSegStruct *MdlTrimSeg,
                                   MdlTrimSrfStruct *TrimSrfList)


Description:

Duplicates a trimming segments structure. The reference pointers to the (upto) two surfaces are replaced with the indices of the surfaces in TrimSrfList.

Parameters:

MdlTrimSeg: A trimming segment to duplicate.
TrimSrfList: The original trimmed surfaces.


Returned Value:

MdlTrimSegStruct *: A trimming segment structure.


Keywords:

allocation


MdlTrimSegCopyList

(mdl_gen.c:324)

Prototype:

  MdlTrimSegStruct *MdlTrimSegCopyList(MdlTrimSegStruct *MdlTrimSegList,
                                       MdlTrimSrfStruct *TrimSrfList)


Description:

Allocates and copies a list of trimming segment structures. The reference pointers to the (upto) two surfaces are replaced with the indices of the surfaces in TrimSrfList.

Parameters:

MdlTrimSegList: To be copied.
TrimSrfList: The original trimmed surfaces.


Returned Value:

MdlTrimSegStruct *: A duplicated list of trimming segments.


Keywords:

copy


MdlTrimSegFree

(mdl_gen.c:41)

Prototype:

  void MdlTrimSegFree(MdlTrimSegStruct *MTSeg)


Description:

Deallocates a Model Trimming Segments structure.

Parameters:

MTSeg: A Trimming Segment to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegFreeList

(mdl_gen.c:63)

Prototype:

  void MdlTrimSegFreeList(MdlTrimSegStruct *MTSegList)


Description:

Deallocates a Model Trimming Segments List structure.

Parameters:

MTSegList: A Trimming Segment List to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegNew

(mdl_gen.c:618)

Prototype:

  MdlTrimSegStruct *MdlTrimSegNew(CagdCrvStruct *UVCrv1,
                                  CagdCrvStruct *UVCrv2,
                                  CagdCrvStruct *EucCrv1,
                                  MdlTrimSrfStruct *SrfFirst,
                                  MdlTrimSrfStruct *SrfSecond)


Description:

Allocates a model trimming segment structure. Allows periodic and float end conditions - converts them to open end.

Parameters:

UVCrv1: A UV curve for SrfFirst. Must be an E2 curve.
UVCrv2: A UV curve for SrfSecond. Must be an E2 curve.
EucCrv1: Optional Euclidean curve for SrfFirst. Must be an E3 curve.
SrfFirst: First surface of the segment.
SrfSecond: Second surface of the segment.


Returned Value:

MdlTrimSegStruct *: A model trimming segment structure.


Keywords:

allocation


MdlTrimSegRefCopy

(mdl_gen.c:360)

Prototype:

  MdlTrimSegRefStruct *MdlTrimSegRefCopy(MdlTrimSegRefStruct *MTSegRefList,
                                         MdlTrimSegStruct *TrimSegList)


Description:

Duplicates a trimming segment reference structure. The reference pointer to the trimming segment is replaced with the index of trimming segment in TrimSegList.

Parameters:

MTSegRefList: A trimming curve segment reference to duplicate.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSegRefStruct *: A trimming segment reference structure.


Keywords:

allocation


MdlTrimSegRefCopyList

(mdl_gen.c:393)

Prototype:

  MdlTrimSegRefStruct *MdlTrimSegRefCopyList(MdlTrimSegRefStruct *MTSegRefList,
                                             MdlTrimSegStruct *TrimSegList)


Description:

Allocates and copies a list of trimming segment reference structures. The reference pointer to the trimming segment is replaced with the index of trimming segment in TrimSegList.

Parameters:

MTSegRefList: To be copied.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSegRefStruct *: A duplicated list of trimming segments.


Keywords:

copy


MdlTrimSegRefFree

(mdl_gen.c:87)

Prototype:

  void MdlTrimSegRefFree(MdlTrimSegRefStruct *MTSegRef)


Description:

Deallocates a Model Trimming Segment Reference structure.

Parameters:

MTSegRef: Segments Reference to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegRefFreeList

(mdl_gen.c:106)

Prototype:

  void MdlTrimSegRefFreeList(MdlTrimSegRefStruct *MTSegRefList)


Description:

Deallocates a Model Trimming Segment Reference List structure.

Parameters:

MTSegRefList: list of loops to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSegRefNew

(mdl_gen.c:701)

Prototype:

  MdlTrimSegRefStruct *MdlTrimSegRefNew(MdlTrimSegStruct *MdlTrimSeg)


Description:

Allocates a model trimming segment reference structure.

Parameters:

MdlTrimSeg: List of model trimming segments forming the trimming curve.


Returned Value:

MdlTrimSegRefStruct *: A trimmig curve.


Keywords:

allocation


MdlTrimSrfCopy

(mdl_gen.c:484)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfCopy(MdlTrimSrfStruct *MdlTrimSrf,
                                   MdlTrimSegStruct *TrimSegList)


Description:

Duplicates a trimming surface structure.

Parameters:

MdlTrimSrf: A trimming surface to duplicate.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSrfStruct *: A trimming surface structure.


Keywords:

allocation


MdlTrimSrfCopyList

(mdl_gen.c:514)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfCopyList(MdlTrimSrfStruct *MdlTrimSrfList,
                                       MdlTrimSegStruct *TrimSegList)


Description:

Allocates and copies a list of trimming surface structures.

Parameters:

MdlTrimSrfList: To be copied.
TrimSegList: The original trimmed segments.


Returned Value:

MdlTrimSrfStruct *: A duplicated list of trimming surfaces.


Keywords:

copy


MdlTrimSrfFree

(mdl_gen.c:174)

Prototype:

  void MdlTrimSrfFree(MdlTrimSrfStruct *TrimSrf)


Description:

Deallocates a Model Trimming Surface structure.

Parameters:

TrimSrf: A surface to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSrfFreeList

(mdl_gen.c:195)

Prototype:

  void MdlTrimSrfFreeList(MdlTrimSrfStruct *MdlTrimSrfList)


Description:

Deallocates a Model Trimming Surface List structure.

Parameters:

MdlTrimSrfList: list of trimming curve to free.


Returned Value:

void


Keywords:

allocation


MdlTrimSrfNew

(mdl_gen.c:757)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfNew(CagdSrfStruct *Srf,
                                  MdlLoopStruct *LoopList,
                                  CagdBType HasTopLvlTrim)


Description:

Constructor for a model trimmed surface.

Parameters:

Srf: Surface to make into a trimmed surface.
LoopList: A list of loops.
HasTopLvlTrim: Do we have a top level outer most trimming curve?


Returned Value:

MdlTrimSrfStruct *: The trimmed surface.


Keywords:

allocation


MdlTrimSrfNew2

(mdl_gen.c:911)

Prototype:

  MdlTrimSrfStruct *MdlTrimSrfNew2(CagdSrfStruct *Srf,
                                   CagdCrvStruct *LoopList,
                                   CagdBType HasTopLvlTrim)


Description:

Constructor for a model trimmed surface.

Parameters:

Srf: The original surface to be trimmed.
LoopList: A list of trimming loops.
HasTopLvlTrim: If FALSE, add outer loops boundary.


Returned Value:

MdlTrimSrfStruct *: The trimmed surface.


Keywords:

allocation