Attr2StringMalloc

(miscattr.c:1487)

Prototype:

  const char *Attr2StringMalloc(const IPAttributeStruct *Attr,
                                int DataFileFormat)


Description:

Routine to convert an attribute to a string.

Parameters:

Attr: To convert to a string.
DataFileFormat: If TRUE, the attribute is formated in the IRIT data file format. Otherwise, just the attribute value is returned as a string.


Returned Value:

const char *: A pointer to a string representing/describing the given attribute.


Keywords:

attributes


Attr2StringToData

(miscattr.c:1347)

Prototype:

  const char *Attr2StringToData(const IPAttributeStruct *Attr,
                                int DataFileFormat,
                                char *Str)


Description:

Routine to convert an attribute to a string.

Parameters:

Attr: To convert to a string.
DataFileFormat: If TRUE, the attribute is formated in the IRIT data file format. Otherwise, just the attribute value is returned as a string.
Str: A pointer to data string representing/describing the given attribute.


Returned Value:

const char *: A pointer to a string representing/describing the given attribute.


Keywords:

attributes


AttrCopyAttributes

(miscattr.c:1829)

Prototype:

  IPAttributeStruct *AttrCopyAttributes(const IPAttributeStruct *Src)


Description:

Routine to copy an attribute list. Attributes prefixed with '_' are considered internal and are not copied.

Parameters:

Src: Attribute list to duplicate.


Returned Value:

IPAttributeStruct *: Duplicated attribute list.


See Also:

AttrCopyAttributes2 AttrCopyOneAttribute

Keywords:

attributes


AttrCopyAttributes2

(miscattr.c:1853)

Prototype:

  IPAttributeStruct *AttrCopyAttributes2(const IPAttributeStruct *Src,
                                         int AllAttrs)


Description:

Routine to copy an attribute list.

Parameters:

Src: Attribute list to duplicate.
AllAttrs: If FALSE, attributes prefixed with '_' are not copied. If TRUE, all attributes are copied.


Returned Value:

IPAttributeStruct *: Duplicated attribute list.


See Also:

AttrCopyAttributes AttrCopyOneAttribute2

Keywords:

attributes


AttrCopyOneAttribute

(miscatt3.c:35)

Prototype:

  IPAttributeStruct *AttrCopyOneAttribute(const IPAttributeStruct *Src)


Description:

Routine to copy one attribute. This routine also exists in attribut.c with object handling. It will be linked in iff no object handling is used. Attributes prefixed with '_' are considered internal and are not copied.

Parameters:

Src: Attribute to duplicate.


Returned Value:

IPAttributeStruct *: Duplicated attribute.


See Also:

AttrCopyAttributes2 AttrCopyOneAttribute2

Keywords:

attributes


AttrCopyOneAttribute2

(miscatt3.c:61)

Prototype:

  IPAttributeStruct *AttrCopyOneAttribute2(const IPAttributeStruct *Src,
                                           int AllAttr)


Description:

Routine to copy one attribute. This routine also exists in attribut.c with object handling. It will be linked in iff no object handling is used.

Parameters:

Src: Attribute to duplicate.
AllAttr: If FALSE, attributes prefixed with '_' are not copied. If TRUE, all attributes are copied.


Returned Value:

IPAttributeStruct *: Duplicated attribute.


See Also:

AttrCopyAttributes2 AttrCopyOneAttribute

Keywords:

attributes


AttrCopyValidAttrNameList

(miscattr.c:1771)

Prototype:

  const char **AttrCopyValidAttrNameList(const char **AttrNames)


Description:

Sets the NULL terminated list of attribute's names to copy.

Parameters:

AttrNames: Vector of attribute names to use in attr list copy.


Returned Value:

const char **: Old list of valid attributes to copy.


Keywords:

attributes


AttrFindAttribute

(miscattr.c:1546)

Prototype:

  IPAttributeStruct *AttrFindAttribute(const IPAttributeStruct *Attrs,
                                       const char *Name)


Description:

Routine to search for an attribute by Name.

Parameters:

Attrs: Attribute list to search.
Name: Attribute to search by this name.


Returned Value:

IPAttributeStruct *: Attribute if found, otherwise NULL.


See Also:

AttrIDFindAttribute

Keywords:

attributes


AttrFindAttributeHashNum

(miscatt1.c:188)

Prototype:

  IPAttributeStruct *AttrFindAttributeHashNum(const IPAttributeStruct *Attrs,
                                              IPAttrNumType AttrHashNum)


Description:

Routine to search for an attribute by hashed numeric index.

Parameters:

Attrs: Attribute list to search.
AttrHashNum: Attribute numeric index to search by this number.


Returned Value:

IPAttributeStruct *: Attribute if found, otherwise NULL.


Keywords:




AttrFreeAttributes

(miscattr.c:1733)

Prototype:

  void AttrFreeAttributes(IPAttributeStruct **Attrs)


Description:

Routine to remove and delete all attributes of the given Attr list.

Parameters:

Attrs: To remove and delete.


Returned Value:

void


Keywords:

attributes


AttrFreeOneAttribute

(miscattr.c:1683)

Prototype:

  void AttrFreeOneAttribute(IPAttributeStruct **Attrs, const char *Name)


Description:

Routine to remove and delete the attribute named Name from the given Attr list.

Parameters:

Attrs: To search for an attribute named Name and remove and delete it.
Name: Name of attribute to remove and delete.


Returned Value:

void


Keywords:

attributes


AttrGetAttribHashNumber

(miscatt1.c:132)

Prototype:

  IPAttrNumType AttrGetAttribHashNumber(const char *AttribName)


Description:

This function returns the matching attribute hash number to the specified attribute name. If the attribute name doesn't exist it is created.

Parameters:

AttribName: he Attribute name to seek its hashed number (or create if not found.)


Returned Value:

IPAttrNumType: The hashed attribute number.


Keywords:




AttrGetAttribName

(miscatt1.c:54)

Prototype:

  const char *AttrGetAttribName(const IPAttributeStruct *Attr)


Description:

This function returns the name of the attribute.

Parameters:

Attr: The attribute structure.


Returned Value:

const char *: The name of the attribute, "__undefined__" if don't exist.


Keywords:




AttrGetIndexColor

(miscattr.c:75)

Prototype:

  void AttrGetIndexColor(int Color, int *Red, int *Green, int *Blue)


Description:

Routine to fetch one of 16 basic colors based on its index.

Parameters:

Color: Index of color between 0 and 15.
Red, Green, Blue: Component of RGB color.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrSetObjectRGBColor

Keywords:

attributes color rgb


AttrGetIntAttrib

(miscattr.c:325)

Prototype:

  int AttrGetIntAttrib(const IPAttributeStruct *Attrs, const char *Name)


Description:

Routine to get an integer attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

int: Found attribute, or IP_ATTR_BAD_INT if not found.


See Also:

AttrSetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetIntAttrib2

Keywords:

attributes


AttrGetIntAttrib2

(miscattr.c:355)

Prototype:

  int AttrGetIntAttrib2(const IPAttributeStruct *Attrs, IPAttrNumType AttrNum)


Description:

Routine to get an integer attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

int: Found attribute, or IP_ATTR_BAD_INT if not found.


See Also:

AttrSetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetIntAttrib

Keywords:

attributes


AttrGetLastAttr

(miscattr.c:2010)

Prototype:

  IPAttributeStruct *AttrGetLastAttr(IPAttributeStruct *AList)


Description:

Returns a pointer to last attribute of a list.

Parameters:

AList: A list of attributes.


Returned Value:

IPAttributeStruct *: Last attribute in AList.


Keywords:

linked lists last element


AttrGetPrevAttr

(miscattr.c:2031)

Prototype:

  IPAttributeStruct *AttrGetPrevAttr(IPAttributeStruct *AList,
                                     const IPAttributeStruct *A)


Description:

Returns a pointer to previous attribute in AList to A.

Parameters:

AList: A list of attributes.
A: For which the previous attribute in AList is pursuit.


Returned Value:

IPAttributeStruct *: Previous attribute to A in AList if found, NULL otherwise.


Keywords:

previous element linked lists


AttrGetPtrAttrib

(miscattr.c:472)

Prototype:

  VoidPtr AttrGetPtrAttrib(const IPAttributeStruct *Attrs, const char *Name)


Description:

Routine to get a pointer attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

VoidPtr: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRefPtrAttrib AttrGetRefPtrAttrib AttrGetPtrAttrib2

Keywords:

attributes


AttrGetPtrAttrib2

(miscattr.c:505)

Prototype:

  VoidPtr AttrGetPtrAttrib2(const IPAttributeStruct *Attrs,
                            IPAttrNumType AttrNum)


Description:

Routine to get a pointer attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

VoidPtr: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRefPtrAttrib AttrGetRefPtrAttrib AttrGetPtrAttrib2

Keywords:

attributes


AttrGetRGBColor2

(miscattr.c:109)

Prototype:

  int AttrGetRGBColor2(const IPAttributeStruct *Attrs,
                       const char *Name,
                       int *Red,
                       int *Green,
                       int *Blue)


Description:

Routine to return a RGB attribute or COLOR attribute converted to RGB. Beside, it can be used to get other color attributes: specular, etc.

Parameters:

Attrs: For which we would like to know the RGB of.
Name: Name of the attribute, if NULL default is taken.
Red, Green, Blue: Component of RGB color to initialize.


Returned Value:

int: TRUE if does have any color attribute, FALSE otherwise.


See Also:

AttrSetIntAttrib AttrGetObjectRGBColor AttrSetRGBDoubleColor AttrGetRGBDoubleColor

Keywords:

attributes color rgb


AttrGetRGBDoubleColor

(miscattr.c:209)

Prototype:

  int AttrGetRGBDoubleColor(const IPAttributeStruct *Attrs,
                            double *Red,
                            double *Green,
                            double *Blue)


Description:

Routine to return a RGB attribute.

Parameters:

Attrs: For which we would like to know the RGB of.
Red, Green, Blue: Component of RGB color to initialize.


Returned Value:

int: TRUE if does have an RGB color attribute, FALSE otherwise.


See Also:

AttrSetIntAttrib AttrGetObjectRGBColor AttrSetRGBDoubleColor

Keywords:

attributes color rgb


AttrGetRealAttrib

(miscattr.c:759)

Prototype:

  IrtRType AttrGetRealAttrib(const IPAttributeStruct *Attrs, const char *Name)


Description:

Routine to get a IrtRType attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

IrtRType: Found attribute, or IP_ATTR_BAD_REAL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetRealAttrib2 AttrGetRealPtrAttrib

Keywords:

attributes


AttrGetRealAttrib2

(miscattr.c:791)

Prototype:

  IrtRType AttrGetRealAttrib2(const IPAttributeStruct *Attrs,
                              IPAttrNumType AttrNum)


Description:

Routine to get a IrtRType attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

IrtRType: Found attribute, or IP_ATTR_BAD_REAL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetRealAttrib AttrGetRealPtrAttrib

Keywords:

attributes


AttrGetRealPtrAttrib

(miscattr.c:928)

Prototype:

  IrtRType *AttrGetRealPtrAttrib(const IPAttributeStruct *Attrs,
                                 const char *Name)


Description:

Routine to get a IrtRType * attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

IrtRType *: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetRealAttrib2 AttrGetRealPtrAttrib

Keywords:

attributes


AttrGetRealPtrAttrib2

(miscattr.c:960)

Prototype:

  IrtRType *AttrGetRealPtrAttrib2(const IPAttributeStruct *Attrs,
                                  IPAttrNumType AttrNum)


Description:

Routine to get a IrtRType * attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

IrtRType *: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetRealAttrib AttrGetRealPtrAttrib

Keywords:

attributes


AttrGetRefPtrAttrib

(miscattr.c:617)

Prototype:

  VoidPtr AttrGetRefPtrAttrib(const IPAttributeStruct *Attrs, const char *Name)


Description:

Routine to get a pointer reference attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

VoidPtr: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrGetRefPtrAttrib2

Keywords:

attributes


AttrGetRefPtrAttrib2

(miscattr.c:650)

Prototype:

  VoidPtr AttrGetRefPtrAttrib2(const IPAttributeStruct *Attrs,
                               IPAttrNumType AttrNum)


Description:

Routine to get a pointer reference attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

VoidPtr: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrGetRefPtrAttrib

Keywords:

attributes


AttrGetStrAttrib

(miscattr.c:1224)

Prototype:

  const char *AttrGetStrAttrib(const IPAttributeStruct *Attrs, const char *Name)


Description:

Routine to get a string attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

const char *: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrGetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetStrAttrib2

Keywords:

attributes


AttrGetStrAttrib2

(miscattr.c:1255)

Prototype:

  const char *AttrGetStrAttrib2(const IPAttributeStruct *Attrs,
                                IPAttrNumType AttrNum)


Description:

Routine to get a string attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

const char *: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrGetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetStrAttrib

Keywords:

attributes


AttrGetUVAttrib

(miscattr.c:1072)

Prototype:

  float *AttrGetUVAttrib(const IPAttributeStruct *Attrs, const char *Name)


Description:

Routine to get a UV attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
Name: Name of requested attribute.


Returned Value:

float *: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrSetStrAttrib AttrSetUVAttrib AttrGetUVAttrib2 AttrGetStrAttrib AttrGetUVAttrib

Keywords:

attributes


AttrGetUVAttrib2

(miscattr.c:1102)

Prototype:

  float *AttrGetUVAttrib2(const IPAttributeStruct *Attrs, IPAttrNumType AttrNum)


Description:

Routine to get a UV attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttrNum: Unique ID derived from name of requested attribute.


Returned Value:

float *: Found attribute, or NULL if not found.


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrGetUVAttrib

Keywords:

attributes


AttrIDCopyValidAttrIDList

(miscattr.c:1798)

Prototype:

  const IPAttrIDType *AttrIDCopyValidAttrIDList(const IPAttrIDType *AttrIDs,
                                                int *IsValidList)


Description:

Sets the NULL terminated list of attribute's names to copy.

Parameters:

AttrIDs: Vector of attribute IDs to use in attr list copy.
IsValidList: TRUE if AttrIDs are the list of valid attribute to copy, FALSE, if the list contains invalid attrs to purge. Updated in place with the old IsValidList value.


Returned Value:

const IPAttrIDType *: Old list of valid attribute IDs to copy.


Keywords:

attributes


AttrIDFindAttribute

(miscatt1.c:280)

Prototype:

  IPAttributeStruct *AttrIDFindAttribute(const IPAttributeStruct *Attrs,
                                         IPAttrIDType AttrID)


Description:

Routine to search for an attribute by ID numeric index.

Parameters:

Attrs: Attribute list to search.
AttrID: Attribute ID to search by this number.


Returned Value:

IPAttributeStruct *: Attribute if found, otherwise NULL.


See Also:

AttrFindAttribute

Keywords:




AttrIDFreeOneAttribute

(misc_attr_ids.c:1016)

Prototype:

  void AttrIDFreeOneAttribute(IPAttributeStruct **Attrs, IPAttrIDType AttrID)


Description:

Routine to remove and delete the attribute named Name from the given Attr list.

Parameters:

Attrs: To search for an attribute named Name and remove and delete it.
AttrID: ID of attribute to remove and delete.


Returned Value:

void


See Also:

AttrIDRemoveOneAttribute

Keywords:

attributes


AttrIDGetAttribID

(miscatt1.c:235)

Prototype:

  IPAttrIDType AttrIDGetAttribID(const char *AttribName)


Description:

This function returns the matching attribute ID to the specified attribute name. Does a slow traversal over all string attributes but is rarely called (only when saving files, etc.).

Parameters:

AttribName: he Attribute name of the given AttribName or IRIT_ATTR_CREATE_ID(INVALID_ATTR) if error.


Returned Value:

IPAttrIDType: The attribute ID number, or INVALID if not found.


Keywords:




AttrIDGetColor

(misc_attr_ids.c:80)

Prototype:

  int AttrIDGetColor(const IPAttributeStruct *Attrs)


Description:

Routine to return a color attribute ID.

Parameters:

Attrs: For which we would like to know the color of.


Returned Value:

int: Color or IP_ATTR_NO_COLOR if no color set.


See Also:

AttrIDSetColor AttrIDSetRGBColor AttrIDGetRGBColor AttrIDSetWidth AttrIDGetWidth AttrIDGetIntAttrib AttrIDGetObjectColor

Keywords:

attributes color


AttrIDGetIntAttrib

(misc_attr_ids.c:471)

Prototype:

  int AttrIDGetIntAttrib(const IPAttributeStruct *Attrs,
                         IPAttrIDType AttribID)


Description:

Routine to get an integer attribute ID.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

int: Found attribute, or IP_ATTR_BAD_INT if not found.


See Also:

AttrIDSetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttIDrGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetIntAttrib AttrIDSetRealAttrib

Keywords:

attributes


AttrIDGetPtrAttrib

(misc_attr_ids.c:555)

Prototype:

  VoidPtr AttrIDGetPtrAttrib(const IPAttributeStruct *Attrs,
                             IPAttrIDType AttribID)


Description:

Routine to get a pointer attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

VoidPtr: Found attribute, or NULL if not found.


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetRefPtrAttrib AttrIDGetRefPtrAttrib AttrIDSetRealAttrib AttrIDGetPtrAttrib2

Keywords:

attributes


AttrIDGetRGBColor

(misc_attr_ids.c:162)

Prototype:

  int AttrIDGetRGBColor(const IPAttributeStruct *Attrs,
                        int *Red,
                        int *Green,
                        int *Blue)


Description:

Routine to return a RGB attribute ID.

Parameters:

Attrs: For which we would like to know the RGB of.
Red, Green, Blue: Component of RGB color to initialize.


Returned Value:

int: TRUE if does have an RGB color attribute, FALSE otherwise.


See Also:

AttrIDSetColor AttrIDGetColor AttrIDSetRGBColor AttrIDSetWidth AttrIDSetIntAttrib AttrIDGetObjectRGBColor AttrIDSetRGBDoubleColor AttrIDGetRGBDoubleColor AttrIDGetWidth

Keywords:

attributes color rgb


AttrIDGetRGBColor2

(misc_attr_ids.c:205)

Prototype:

  int AttrIDGetRGBColor2(const IPAttributeStruct *Attrs,
                         IPAttrIDType AttrID,
                         int *Red,
                         int *Green,
                         int *Blue)


Description:

Routine to return a RGB attribute ID.

Parameters:

Attrs: For which we would like to know the RGB of.
AttrID: Attribute unique ID of requested attribute.
Red, Green, Blue: Component of RGB color to initialize.


Returned Value:

int: TRUE if does have an RGB color attribute, FALSE otherwise.


See Also:

AttrIDSetColor AttrIDGetColor AttrIDSetRGBColor AttrIDSetWidth AttrIDSetIntAttrib AttrIDGetObjectRGBColor AttrIDSetRGBDoubleColor AttrIDGetRGBDoubleColor AttrIDGetWidth

Keywords:

attributes color rgb


AttrIDGetRGBDoubleColor

(misc_attr_ids.c:305)

Prototype:

  int AttrIDGetRGBDoubleColor(const IPAttributeStruct *Attrs,
                              double *Red,
                              double *Green,
                              double *Blue)


Description:

Routine to return a RGB attribute ID.

Parameters:

Attrs: For which we would like to know the RGB of.
Red, Green, Blue: Component of RGB color to initialize.


Returned Value:

int: TRUE if does have an RGB color attribute, FALSE otherwise.


See Also:

AttrIDSetColor AttrIDGetColor AttrIDSetRGBColor AttrIDSetWidth AttrIDGetWidth AttrIDSetIntAttrib AttrIDGetObjectRGBColor AttrIDSetRGBDoubleColor

Keywords:

attributes color rgb


AttrIDGetRealAttrib

(misc_attr_ids.c:709)

Prototype:

  IrtRType AttrIDGetRealAttrib(const IPAttributeStruct *Attrs,
                               IPAttrIDType AttribID)


Description:

Routine to get a IrtRType attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

IrtRType: Found attribute, or IP_ATTR_BAD_REAL if not found.


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib

Keywords:

attributes


AttrIDGetRealPtrAttrib

(misc_attr_ids.c:808)

Prototype:

  IrtRType *AttrIDGetRealPtrAttrib(const IPAttributeStruct *Attrs,
                                   IPAttrIDType AttribID)


Description:

Routine to get a IrtRType * attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

IrtRType *: Found attribute, or NULL if not found.


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib

Keywords:

attributes


AttrIDGetRefPtrAttrib

(misc_attr_ids.c:633)

Prototype:

  VoidPtr AttrIDGetRefPtrAttrib(const IPAttributeStruct *Attrs,
                                IPAttrIDType AttribID)


Description:

Routine to get a pointer reference attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

VoidPtr: Found attribute, or NULL if not found.


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDGetRefPtrAttrib

Keywords:

attributes


AttrIDGetStrAttrib

(misc_attr_ids.c:985)

Prototype:

  const char *AttrIDGetStrAttrib(const IPAttributeStruct *Attrs,
                                 IPAttrIDType AttribID)


Description:

Routine to get a string attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

const char *: Found attribute, or NULL if not found.


See Also:

AttrIDSetColor AttrIDGetColor AttrIDSetRGBColor AttrIDGetRGBColor AttrIDSetRGBDoubleColor AttrIDGetRGBDoubleColor AttrIDSetWidth AttrIDGetWidth AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetRefPtrAttrib AttrIDSetRealAttrib AttrIDGetRealAttrib AttrIDSetRealPtrAttrib AttrIDGetRealPtrAttrib AttrIDSetUVAttrib AttrIDGetUVAttrib

Keywords:

attributes


AttrIDGetUVAttrib

(misc_attr_ids.c:889)

Prototype:

  float *AttrIDGetUVAttrib(const IPAttributeStruct *Attrs,
                           IPAttrIDType AttribID)


Description:

Routine to get a UV attribute.

Parameters:

Attrs: Attribute list to search for requested attribute.
AttribID: Attribute unique ID of requested attribute.


Returned Value:

float *: Found attribute, or NULL if not found.


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttIDrGetPtrAttrib AttrIDSetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDGetUVAttrib

Keywords:

attributes


AttrIDGetWidth

(misc_attr_ids.c:381)

Prototype:

  IrtRType AttrIDGetWidth(const IPAttributeStruct *Attrs)


Description:

Routine to return a width attribute ID.

Parameters:

Attrs: For which we would like to know the width of.


Returned Value:

IrtRType: Width or IP_ATTR_NO_WIDTH if no width set.


See Also:

AttrIDSetColor AttrIDGetColor AttrIDSetRGBColor AttrIDGetRGBColor AttrIDSetWidth AttrIDGetRealAttrib AttrIDGetObjectWidth

Keywords:

attributes width


AttrIDRemoveOneAttribute

(misc_attr_ids.c:1066)

Prototype:

  void AttrIDRemoveOneAttribute(IPAttributeStruct **Attrs, IPAttrIDType AttrID)


Description:

Routine to remove the attribute named Name from the given Attr list.

Parameters:

Attrs: To search for an attribute named Name and remove it.
AttrID: ID of attribute to remove.


Returned Value:

void


See Also:

AttrIDFreeOneAttribute

Keywords:

attributes


AttrIDSetColor

(misc_attr_ids.c:43)

Prototype:

  void AttrIDSetColor(IPAttributeStruct **Attrs, int Color)


Description:

Routine to set a color attribute ID.

Parameters:

Attrs: Where to place the color attribute.
Color: New color.


Returned Value:

void


See Also:

AttrIDGetColor AttrIDSetRGBColor AttrIDGetRGBColor AttrIDSetWidth AttrIDGetWidth AttrIDSetIntAttrib AttrIDSetObjectColor

Keywords:

attributes color


AttrIDSetIntAttrib

(misc_attr_ids.c:431)

Prototype:

  void AttrIDSetIntAttrib(IPAttributeStruct **Attrs,
                          IPAttrIDType AttribID,
                          int Data)


Description:

Routine to set an integer attribute ID.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
Data: Ingeter attribute to save.


Returned Value:

void


See Also:

AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetRealAttrib AttrIDSetUVAttrib AttrIDSetIntAttrib

Keywords:

attributes


AttrIDSetPtrAttrib

(misc_attr_ids.c:514)

Prototype:

  void AttrIDSetPtrAttrib(IPAttributeStruct **Attrs,
                          IPAttrIDType AttribID,
                          VoidPtr Data)


Description:

Routine to set a pointer attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
Data: Pointer attribute to save.


Returned Value:

void


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDGetPtrAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetRefPtrAttrib AttrIDGetRefPtrAttrib AttrIDSetRealAttrib AttrIDSetPtrAttrib

Keywords:

attributes


AttrIDSetRGBColor

(misc_attr_ids.c:117)

Prototype:

  void AttrIDSetRGBColor(IPAttributeStruct **Attrs, int Red, int Green, int Blue)


Description:

Routine to set an RGB color attribute ID.

Parameters:

Attrs: Where to place the TGB color attribute.
Red, Green, Blue: Component of RGB color.


Returned Value:

void


See Also:

AttrIDSetColor AttrIDGetColor AttrIDGetRGBColor AttrIDSetWidth AttrIDSetIntAttrib AttrIDSetObjectRGBColor AttrIDGetWidth

Keywords:

attributes color rgb


AttrIDSetRGBDoubleColor

(misc_attr_ids.c:260)

Prototype:

  void AttrIDSetRGBDoubleColor(IPAttributeStruct **Attrs,
                               double Red,
                               double Green,
                               double Blue)


Description:

Routine to set a double floating point RGB color attribute ID.

Parameters:

Attrs: Where to place the TGB color attribute.
Red, Green, Blue: Component of RGB color.


Returned Value:

void


See Also:

AttrIDSetColor AttrIDGetColor AttrIDGetRGBColor AttrIDSetWidth AttrIDSetIntAttrib AttrIDSetObjectRGBColor AttrIDGetRGBDoubleColor AttrIDGetWidth

Keywords:

attributes color rgb


AttrIDSetRealAttrib

(misc_attr_ids.c:669)

Prototype:

  void AttrIDSetRealAttrib(IPAttributeStruct **Attrs,
                           IPAttrIDType AttribID,
                           IrtRType Data)


Description:

Routine to set a IrtRType attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
Data: IrtRType attribute to save.


Returned Value:

void


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib

Keywords:

attributes


AttrIDSetRealPtrAttrib

(misc_attr_ids.c:758)

Prototype:

  void AttrIDSetRealPtrAttrib(IPAttributeStruct **Attrs,
                              IPAttrIDType AttribID,
                              IrtRType *Data,
                              int DataLen)


Description:

Routine to set a IrtRType * attribute. Attribute will own Data.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
Data: IrtRType * attribute to save.
DataLen: If positive allocates and copies that many reals from Data. Otherwise, Data (of length -DataLen) is used directly.


Returned Value:

void


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib

Keywords:

attributes


AttrIDSetRefPtrAttrib

(misc_attr_ids.c:592)

Prototype:

  void AttrIDSetRefPtrAttrib(IPAttributeStruct **Attrs,
                             IPAttrIDType AttribID,
                             VoidPtr Data)


Description:

Routine to set a pointer reference attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
Data: Pointer attribute to save.


Returned Value:

void


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDGetPtrAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttrIDGetRealPtrAttrib AttrIDSetStrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRefPtrAttrib

Keywords:

attributes


AttrIDSetStrAttrib

(misc_attr_ids.c:941)

Prototype:

  void AttrIDSetStrAttrib(IPAttributeStruct **Attrs,
                          IPAttrIDType AttribID,
                          const char *Data)


Description:

Routine to set a string attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
Data: String attribute to save.


Returned Value:

void


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRealAttrib AttrIDGetRealAttrib AttrIDSetRealPtrAttrib AttrIDGetStrAttrib AttrIDGetUVAttrib AttrIDSetUVAttrib AttrIDSetStrAttrib

Keywords:

attributes


AttrIDSetUVAttrib

(misc_attr_ids.c:848)

Prototype:

  void AttrIDSetUVAttrib(IPAttributeStruct **Attrs,
                         IPAttrIDType AttribID,
                         IrtRType U,
                         IrtRType V)


Description:

Routine to set a UV attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribID: Attribute unique ID of requested attribute.
U, V: UV attribute to save.


Returned Value:

void


See Also:

AttrIDSetIntAttrib AttrIDGetIntAttrib AttrIDSetPtrAttrib AttrIDGetPtrAttrib AttrIDSetRealAttrib AttrIDSetRealPtrAttrib AttrIDGetRealAttrib AttrIDGetStrAttrib AttrIDSetUVAttrib AttrIDSetStrAttrib

Keywords:

attributes


AttrIDSetWidth

(misc_attr_ids.c:343)

Prototype:

  void AttrIDSetWidth(IPAttributeStruct **Attrs, IrtRType Width)


Description:

Routine to set a width attribute ID.

Parameters:

Attrs: Where to place the width attribute.
Width: New width.


Returned Value:

void


See Also:

AttrIDSetColor AttrIDGetColor AttrIDSetRGBColor AttrIDGetRGBColor AttrIDGetWidth AttrIDSetRealAttrib AttrIDSetRealPtrAttrib AttrIDSetObjectWidth

Keywords:

attributes width


AttrInitHashTbl

(miscatt1.c:347)

Prototype:

  void AttrInitHashTbl(void)


Description:

Initialize the hash table for attributes names.

Parameters:

None


Returned Value:

void


Keywords:




AttrMergeAttributes

(miscattr.c:1926)

Prototype:

  IPAttributeStruct *AttrMergeAttributes(IPAttributeStruct *Orig,
                                         const IPAttributeStruct *Src,
                                         int Replace)


Description:

Routine to copy an attribute list.

Parameters:

Orig: Original list of attributes. Updated in place.
Src: Attribute list to duplicate and merge into orig.
Replace: If TRUE, original attributes with the same name are replaced by old ones. If FALSE, original attributes with same name are left intact.


Returned Value:

IPAttributeStruct *: Merged attribute list.


Keywords:

attributes


AttrReverseAttributes

(miscattr.c:1508)

Prototype:

  IPAttributeStruct *AttrReverseAttributes(IPAttributeStruct *Attr)


Description:

Routine to reverse the given Attr list.

Parameters:

Attr: To reverse, in place.


Returned Value:

IPAttributeStruct *: The reversed list, in place.


Keywords:

attributes


AttrSetIntAttrib

(miscattr.c:253)

Prototype:

  void AttrSetIntAttrib(IPAttributeStruct **Attrs, const char *Name, int Data)


Description:

Routine to set an integer attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduced attribute.
Data: Integer attribute to save.


Returned Value:

void


See Also:

AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetIntAttrib2

Keywords:

attributes


AttrSetIntAttrib2

(miscattr.c:287)

Prototype:

  void AttrSetIntAttrib2(IPAttributeStruct **Attrs,
                         IPAttrNumType AttribNum,
                         int Data)


Description:

Routine to set an integer attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
Data: Ingeter attribute to save.


Returned Value:

void


See Also:

AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetIntAttrib

Keywords:

attributes


AttrSetPtrAttrib

(miscattr.c:397)

Prototype:

  void AttrSetPtrAttrib(IPAttributeStruct **Attrs,
                        const char *Name,
                        VoidPtr Data)


Description:

Routine to set a pointer attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduced attribute.
Data: Pointer attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRefPtrAttrib AttrGetRefPtrAttrib AttrSetPtrAttrib2

Keywords:

attributes


AttrSetPtrAttrib2

(miscattr.c:432)

Prototype:

  void AttrSetPtrAttrib2(IPAttributeStruct **Attrs,
                         IPAttrNumType AttribNum,
                         VoidPtr Data)


Description:

Routine to set a pointer attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
Data: Pointer attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRefPtrAttrib AttrGetRefPtrAttrib AttrSetPtrAttrib

Keywords:

attributes


AttrSetRGBDoubleColor

(miscattr.c:162)

Prototype:

  void AttrSetRGBDoubleColor(IPAttributeStruct **Attrs,
                             double Red,
                             double Green,
                             double Blue)


Description:

Routine to set a Floating point 64 RGB color attribute.

Parameters:

Attrs: Where to place the TGB color attribute.
Red, Green, Blue: Component of RGB color.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrSetObjectRGBColor AttrGetRGBDoubleColor

Keywords:

attributes color rgb


AttrSetRealAttrib

(miscattr.c:686)

Prototype:

  void AttrSetRealAttrib(IPAttributeStruct **Attrs,
                         const char *Name,
                         IrtRType Data)


Description:

Routine to set a IrtRType attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduce dattribute.
Data: IrtRType attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRealAttrib2 AttrSetRealPtrAttrib

Keywords:

attributes


AttrSetRealAttrib2

(miscattr.c:720)

Prototype:

  void AttrSetRealAttrib2(IPAttributeStruct **Attrs,
                          IPAttrNumType AttribNum,
                          IrtRType Data)


Description:

Routine to set a IrtRType attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
Data: IrtRType attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRealAttrib AttrSetRealPtrAttrib

Keywords:

attributes


AttrSetRealPtrAttrib

(miscattr.c:840)

Prototype:

  void AttrSetRealPtrAttrib(IPAttributeStruct **Attrs,
                            const char *Name,
                            IrtRType *Data,
                            int DataLen)


Description:

Routine to set a IrtRType * attribute. Attribute will own Data.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduce dattribute.
Data: IrtRType * attribute to save.
DataLen: If positive allocates and copies that many reals from Data. Otherwise, Data (of length -DataLen) is used directly.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRealAttrib2 AttrSetRealPtrAttrib

Keywords:

attributes


AttrSetRealPtrAttrib2

(miscattr.c:878)

Prototype:

  void AttrSetRealPtrAttrib2(IPAttributeStruct **Attrs,
                             IPAttrNumType AttribNum,
                             IrtRType *Data,
                             int DataLen)


Description:

Routine to set a IrtRType * attribute. Attribute will own Data.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
Data: IrtRType * attribute to save.
DataLen: If positive allocates and copies that many reals from Data. Otherwise, Data (of length -DataLen) is used directly.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetRealAttrib AttrSetRealPtrAttrib

Keywords:

attributes


AttrSetRefPtrAttrib

(miscattr.c:542)

Prototype:

  void AttrSetRefPtrAttrib(IPAttributeStruct **Attrs,
                           const char *Name,
                           VoidPtr Data)


Description:

Routine to set a pointer reference attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduced attribute.
Data: Pointer attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRefPtrAttrib2

Keywords:

attributes


AttrSetRefPtrAttrib2

(miscattr.c:577)

Prototype:

  void AttrSetRefPtrAttrib2(IPAttributeStruct **Attrs,
                            IPAttrNumType AttribNum,
                            VoidPtr Data)


Description:

Routine to set a pointer reference attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
Data: Pointer attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetRealPtrAttrib AttrSetStrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRefPtrAttrib

Keywords:

attributes


AttrSetStrAttrib

(miscattr.c:1152)

Prototype:

  void AttrSetStrAttrib(IPAttributeStruct **Attrs,
                        const char *Name,
                        const char *Data)


Description:

Routine to set a string attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduced attribute.
Data: String attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrGetRealAttrib AttrSetRealPtrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetStrAttrib2

Keywords:

attributes


AttrSetStrAttrib2

(miscattr.c:1185)

Prototype:

  void AttrSetStrAttrib2(IPAttributeStruct **Attrs,
                         IPAttrNumType AttribNum,
                         const char *Data)


Description:

Routine to set a string attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
Data: String attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrGetRealAttrib AttrSetRealPtrAttrib AttrGetStrAttrib AttrGetUVAttrib AttrSetUVAttrib AttrSetStrAttrib

Keywords:

attributes


AttrSetUVAttrib

(miscattr.c:999)

Prototype:

  void AttrSetUVAttrib(IPAttributeStruct **Attrs,
                       const char *Name,
                       IrtRType U,
                       IrtRType V)


Description:

Routine to set a UV attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
Name: Name of the newly introduced attribute.
U, V: UV attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrSetStrAttrib AttrGetStrAttrib AttrSetUVAttrib2

Keywords:

attributes


AttrSetUVAttrib2

(miscattr.c:1033)

Prototype:

  void AttrSetUVAttrib2(IPAttributeStruct **Attrs,
                        IPAttrNumType AttribNum,
                        IrtRType U,
                        IrtRType V)


Description:

Routine to set a UV attribute.

Parameters:

Attrs: Attribute list where to place new attribute.
AttribNum: Unique ID derived from name of requested attribute.
U, V: UV attribute to save.


Returned Value:

void


See Also:

AttrSetIntAttrib AttrGetIntAttrib AttrSetPtrAttrib AttrGetPtrAttrib AttrSetRealAttrib AttrSetRealPtrAttrib AttrGetRealAttrib AttrGetStrAttrib AttrSetUVAttrib2 AttrSetStrAttrib

Keywords:

attributes


AttrTraceAttributes

(miscattr.c:1291)

Prototype:

  const IPAttributeStruct *AttrTraceAttributes(
                                           const IPAttributeStruct *TraceAttrs,
                                           const IPAttributeStruct *FirstAttrs)


Description:

Routine to aid in scanning a list of attributes. If TraceAttrs != NULL, a ptr to its attribute list is saved and the next attribute is returned every call until the end of the list is reached, in which NULL is returned. FirstAttrs should be NULL in all but the first call in the sequence. Attributes with names starting with an underscore '_' are assumed to be temporary or internal and are skipped.

Parameters:

TraceAttrs: If not NULL, contains the previously returned attribute.
FirstAttrs: First attribute in list, usually NULL in all but the first invocation.


Returned Value:

const IPAttributeStruct *: Next attribute in list.


Keywords:

attributes


E2TFreeNodetree

(exprtree.c:1819)

Prototype:

  void E2TFreeNodetree(IritE2TExprNodeStruct *Root)


Description:

Routine to free a tree - release all memory allocated by it.

Parameters:

Root: Tree to release.


Returned Value:

void


See Also:



Keywords:




GAGetArgs

(getarg.c:201)

Prototype:

  int GAGetArgs(int va_alist, ...)


Description:

Routine to access command line arguments and interpret them, by getting access to the main routine's argc/argv interface and a control string that prescribes the expected options. Returns ARG_OK (0) is case of succesfull parsing, error code else... Format of CtrlStr format: The control string passed to GAGetArgs controls the way argv (argc) are parsed. Each entry in this string must have no spaces in it. The First Entry is the name of the program which is usually ignored except when GAPrintHowTo is called. All the other entries (except the last one which will be discussed shortly) must have the following format: 1. One letter which sets the option letter (i.e. 'x' for option '-x'). 2. '!' or '%' to determines if this option is really optional ('%') or it must be provided by the user ('!'). 3. '-' always. 4. Alpha numeric string (and '|' to denote a space), usually ignored, but used by GAPrintHowTo to describe the meaning of this option. 5. Sequences that start with either '!' or '%'. Again if '!' then this sequence must exists (only if its option flag is given), and if '%' it is optional. Each sequence will be followed by one or two characters which defines the kind of the input: 5.1. d, x, o, u - integer is expected (decimal, hex, octal base or unsigned). 5.2. D, X, O, U - long integer is expected (same as above). 5.3. f - float number is expected. 5.4. F - double number is expected. 5.5. s - string is expected. 5.6. *? - any number of '?' kind (d, x, o, u, D, X, O, U, f, F, s) will match this one. If '?' is numeric, it scans until none numeric input is given. If '?' is 's' then it scans up to the next option or end of argv. If the last parameter given in the CtrlStr, is not an option (i.e. the second char is not in ['!', '%'] and the third one is not '-'), all what remained from argv is hooked to it. The variables passed to GAGetArgs (starting from 4th parameter) MUST match the order of options in the CtrlStr. For each option, an address of an integer must be passed. This integer must initialized by 0. If that option is given in the command line, it will be set to one. Otherwise, this integer will not be affected. In addition, the sequences that might follow an option require the following parameter(s) to be passed 1. d, x, o, u - pointer to an integer (int *). 2. D, X, O, U - pointer to a long (long *). 3. f - pointer to a float (float *). 4. F - pointer to a double (double *). 5. s - pointer to a char * (char **). NO pre-allocation is required. 6. *? - TWO variables are passed for each such wild character request. The first variable is an address of an integer, and it will return the number of parameters actually hooked to this sequence. The second variable is a pointer to a pointer to type ? (? **). It will return an address of a vector of pointers of type ?, terminated with a NULL pointer. NO pre-allocation is required. These two variables behaves very much like the argv/argc pair and are used the "trap" unused command line options. Examples:
   "Example1  i%-OneInteger!d  s%-Strings!*s  j%-  k!-Double!F  Files!*s"
Will match: Example1 -i 77 -s String1 String2 String3 -k 88.2 File1 File2
  or match: Example1 -s String1 -k 88.3 -i 999 -j
   but not: Example1 -i 77 78 (i expects one integer, k must be specified).

The option k must exists in the above example and if '-i' is prescribed one integer argument must follow it. In the first example, File1 & File2, will match Files in the control string. The order of the options in the command line is irrelevant. A call to GAPrintHowTo with this CtrlStr will print the info:
Example1 [-i OneIngeter] [-s Strings...] [-j] -k Float Files...

The parameters below are stdarg style and in fact are expecting the following:
  GAGetArgs(argc, argv, CtrlStr, ...);

1. argc, argv: The usual C interface from the main routine of the program. 2. CtrlStr: Defining the types/options to expect in the command line. 3. ...: list of addreses of variables to initialize according to parsed command line.

Parameters:

va_alist: Do "man stdarg".
...: Rest of optional parameters


Returned Value:

int: TRUE if command line was valid, FALSE otherwise.


See Also:

GAPrintErrMsg GAPrintHowTo

Keywords:

command line arguments


GAPrintErrMsg

(getarg.c:793)

Prototype:

  void GAPrintErrMsg(int Error)


Description:

Routine to print a description of an error, for this module:

Parameters:

Error: Error type as returned by GAGetArgs.


Returned Value:

void


See Also:

GAStringErrMsg GAPrintHowTo GAGetArgs

Keywords:

command line arguments


GAPrintHowTo

(getarg.c:922)

Prototype:

  void GAPrintHowTo(const char *CtrlStr)


Description:

Routine to print the correct format of command line allowed. For example, for the following control string,
   "Example1  i%-OneInteger!d  s%-Strings!*s  j%-  k!-Double!F  Files"

This routine will print
Example1 [-i OneIngeter] [-s Strings...] [-j] -k Double Files...


Parameters:

CtrlStr: Defining the types/options to expect in the command line.


Returned Value:

void


See Also:

GAPrintErrMsg GAStringHowTo GAGetArgs

Keywords:

command line arguments


GAStringErrMsg

(getarg.c:742)

Prototype:

  char *GAStringErrMsg(int Error, char *OutStr)


Description:


Routine to print a description of an error to a string.

Parameters:

Error: Error type as returned by GAGetArgs.
OutStr: Where to place the error message.


Returned Value:

char *: The error message string (OutStr).


See Also:

GAPrintErrMsg GAStringHowTo GAGetArgs

Keywords:

command line arguments


GAStringHowTo

(getarg.c:821)

Prototype:

  char *GAStringHowTo(const char *CtrlStr, char *OutStr)


Description:

Routine to write the correct format of command line allowed, to a string. For example, for the following control string,
   "Example1  i%-OneInteger!d  s%-Strings!*s  j%-  k!-Double!F  Files"

This routine will write
Example1 [-i OneIngeter] [-s Strings...] [-j] -k Double Files...


Parameters:

CtrlStr: Defining the types/options to expect in the command line.
OutStr: Where to place the how to message.


Returned Value:

char *: The how-to message string (OutStr).


See Also:

GAPrintHowTo GAStringErrMsg GAGetArgs

Keywords:

command line arguments


IritApproxStrStrMatch

(xgeneral.c:240)

Prototype:

  IrtRType IritApproxStrStrMatch(const char *Str1,
                                 const char *Str2,
                                 int IgnoreCase)


Description:


Provides an approximated comparison between two strings.

Parameters:

Str1, Str2: he two strings to compare.
IgnoreCase: RUE to ignore case, FALSE to consider as different.


Returned Value:

IrtRType: Perfect match returns 1.0, otherwise match estimation between 0.0 and 1.0.


Keywords:




IritAscii2WChar

(config.c:755)

Prototype:

  wchar_t *IritAscii2WChar(const char *Str)


Description:

Converts an Ascii (multi-byte) string to a wide (multi-short) string.

Parameters:

Str: Input multi byte Ascii string to convert to a wide string.


Returned Value:

wchar_t *: Converted string, allocated dynamically.


See Also:

IritWChar2Ascii IritTextLocaleInit

Keywords:




IritCPUTime

(xgeneral.c:447)

Prototype:

  IrtRType IritCPUTime(int Reset)


Description:

Routine to compute the cpu time, in second, of the running process.

Parameters:

Reset: If TRUE, clock is reset back to zero.


Returned Value:

IrtRType: CPU time since last reset or beginning of execution.


Keywords:

time


IritConfig

(config.c:184)

Prototype:

  const char *IritConfig(const char *PrgmName,
                         const IritConfigStruct *SetUp,
                         int NumVar,
                         char *FoundName)


Description:

Main routine of configuration file handling. Gets the program name, PrgmName, and the configuration data base that defines the acceptable variables, Setup, with Numvar entries.

Parameters:

PrgmName: Name of program that uses this data base.
SetUp: Configuration data based.
NumVar: Number of entries on configuration data base.
FoundName: ame of config file read or NULL to disable.


Returned Value:

const char *: Name of config file read, or NULL if error. Same as FoundName.


Keywords:

configuration cfg files


IritConfigInitState

(config.c:619)

Prototype:

  void IritConfigInitState(void)


Description:

An initialization function that is invoked at the very beginning of every main function in irit.

Parameters:

None


Returned Value:

void


Keywords:




IritConfigPrint

(config.c:69)

Prototype:

  void IritConfigPrint(const IritConfigStruct *SetUp, int NumVar)


Description:

Routine to print the current configuration data structure contents.

Parameters:

SetUp: Configuration data based.
NumVar: Number of entries on configuration data base.


Returned Value:

void


Keywords:

configuration cfg files


IritConfigSave

(config.c:472)

Prototype:

  int IritConfigSave(const char *FileName,
                     const IritConfigStruct *SetUp,
                     int NumVar)


Description:

Saves the given configuration into a file.

Parameters:

FileName: File to save configuration at.
SetUp: Configuration data based.
NumVar: Number of entries on configuration data base.


Returned Value:

int: TRUE if saved successfully, FALSE otherwise.


Keywords:

configuration cfg files


IritDynMemoryDbgCheckMark

(imalloc.c:177)

Prototype:

  void IritDynMemoryDbgCheckMark(IrtRType *Start,
                                 IrtRType *KeepStackStep,
                                 IrtRType *TrackAllocID)


Description:

Sets/clear dynamic memory check marks and reports. Initializes the dynamic memory testing routines, if not initialized until now.

Parameters:

Start: 1 to initial check mark, 2 to also request stack trace info, 0 to terminate and dump result.
KeepStackStep: f Start = 2, sets stack-keeping every n'th alloc.
TrackAllocID: if non-zero, also track the unique allocation ID.


Returned Value:

void


See Also:

IritFree IritMalloc IritRealloc IritDynMemoryDbgTestAll

Keywords:




IritDynMemoryDbgInitTest

(imalloc.c:255)

Prototype:

  void IritDynMemoryDbgInitTest(void)


Description:

Initialize dynamic memory testing routines, using envvars.

Parameters:

None


Returned Value:

void


See Also:

IritFree IritMalloc IritRealloc IritDynMemoryDbgCheckMark IritDynMemoryDbgInitTest2

Keywords:




IritDynMemoryDbgInitTest2

(imalloc.c:296)

Prototype:

  void IritDynMemoryDbgInitTest2(int DebugMalloc, int DebugSearchAllocID)


Description:

Initialize dynamic memory testing routines.

Parameters:

DebugMalloc: Bitwise control over what to test: 0x02 - List possibly freed yet not malloced ptrs. 0x04 - Track unfreed memory blocks. 0x08 - Under windows use windows CrtDbg check. 0x10 - Under windows use windows CrtDbg check every 16 mallocs. 0x20 - Under windows, enable stack info trace. See IRIT_DEBUG_MALLOC_* at the beginning of file.
DebugSearchAllocID: Allocation ID to trace, 0 for no ID to trace.


Returned Value:

void


See Also:

IritFree IritMalloc IritRealloc IritDynMemoryDbgCheckMark IritDynMemoryDbgInitTest

Keywords:




IritDynMemoryDbgMallocSearchID

(imalloc.c:615)

Prototype:

  void IritDynMemoryDbgMallocSearchID(int ID)


Description:

Set the searched malloced ID. This function will take affect iff IritDebugMalloc is non zero as set via "IRIT_MALLOC" env.

Parameters:

ID: Allocation ID to seek and abort at.


Returned Value:

void


See Also:

IritFree IritMalloc IritRealloc IritDynMemoryDbgTestAll IritDebugMallocSearchPtr IritDebugMallocAllocated IritDynMemoryDbgInitTest IritDynMemoryDbgCheckMark

Keywords:




IritDynMemoryDbgNoReport

(imalloc.c:777)

Prototype:

  void *IritDynMemoryDbgNoReport(void *p)


Description:

remember this pointer as a special pointer we allocated statically once per entry so we will not report it as mem leak.

Parameters:

p: Dynamically allocated pointer.


Returned Value:

void *: Exactly p, for composition of functions.


See Also:



Keywords:




IritDynMemoryDbgTestAll

(imalloc.c:119)

Prototype:

  void IritDynMemoryDbgTestAll(void)


Description:

Tests the content of the dynamic memory allocated.

Parameters:

None


Returned Value:

void


See Also:

IritFree IritMalloc IritRealloc IritDynMemoryDbgInitTest

Keywords:




IritE2Expr2TreeDefaultFetchParamValue

(exprtree.c:148)

Prototype:

  IrtRType IritE2Expr2TreeDefaultFetchParamValue(MiscExprTreeGenInfoStruct *GI,
                                                 const char *SData)


Description:

Default function to fetch the value of a parameter, during evaluation.

Parameters:

GI: General info. for the expression tree parsing functions.
SData: The parameter to fetch.


Returned Value:

IrtRType: Fetched value of parameter.


Keywords:




IritE2Expr2TreeSetFetchParamValueFunc

(exprtree.c:124)

Prototype:

  IritE2TExprNodeParamFuncType IritE2Expr2TreeSetFetchParamValueFunc(
                              MiscExprTreeGenInfoStruct *GI,
                              IritE2TExprNodeParamFuncType FetchParamValueFunc)


Description:

Sets the function to use to fetch a parameter value, given its name, during evaluation.

Parameters:

GI: General info. for the expression tree parsing functions.
FetchParamValueFunc: Function pointer to use to fetch a value of a parameter, given its name.


Returned Value:

IritE2TExprNodeParamFuncType: Old function pointer.


Keywords:




IritE2TCmpTree

(exprtree.c:1692)

Prototype:

  int IritE2TCmpTree(const IritE2TExprNodeStruct *Root1,
                     const IritE2TExprNodeStruct *Root2)


Description:

Routine to compere two trees - for equality: The trees are compered to be symbolically equal i.e. A*B == B*A !

Parameters:

Root1, Root2: The two trees to compare.


Returned Value:

int: TRUE if equal, FALSE otherwise.


See Also:



Keywords:




IritE2TCopyTree

(exprtree.c:958)

Prototype:

  IritE2TExprNodeStruct *IritE2TCopyTree(const IritE2TExprNodeStruct *Root)


Description:

Routine to create a new copy of a given tree.

Parameters:

Root: Tree to duplicate.


Returned Value:

IritE2TExprNodeStruct *: Duplicated tree.


See Also:



Keywords:




IritE2TDerivError

(exprtree.c:1920)

Prototype:

  int IritE2TDerivError(MiscExprTreeGenInfoStruct *GI)


Description:

Get a derivative error is was one or 0 in none.

Parameters:

GI: General info. for the expression tree parsing functions.


Returned Value:

int: Error or 0 in none.


Keywords:




IritE2TDerivTree

(exprtree.c:1160)

Prototype:

  IritE2TExprNodeStruct *IritE2TDerivTree(MiscExprTreeGenInfoStruct *GI,
                                          const IritE2TExprNodeStruct *Root,
                                          int Param)


Description:

Routine to generate the tree represent the derivative of tree Root.

Parameters:

GI: General info. for the expression tree parsing functions.
Root: To derive.
Param: The parameter to differentiate according to.


Returned Value:

IritE2TExprNodeStruct *: Derived tree.


See Also:



Keywords:




IritE2TEvalTree

(exprtree.c:1025)

Prototype:

  IrtRType IritE2TEvalTree(MiscExprTreeGenInfoStruct *GI,
                           const IritE2TExprNodeStruct *Root)


Description:

Routine to evaluate a value of a given tree Root and set parameters.

Parameters:

GI: General info. for the expression tree parsing functions.
Root: Tree to evaluate.


Returned Value:

IrtRType: Evaluated result.


See Also:



Keywords:




IritE2TExpr2Tree

(exprtree.c:248)

Prototype:

  IritE2TExprNodeStruct *IritE2TExpr2Tree(MiscExprTreeGenInfoStruct *GI,
                                          const char s[])


Description:

Routine to convert the expression in string S into a binary tree. Algorithm: Using operator precedence with the following grammer: EXPR ::= EXPR | EXPR + EXPR | EXPR - EXPR EXPR ::= EXPR | EXPR * EXPR | EXPR / EXPR EXPR ::= EXPR | EXPR ^ EXPR EXPR ::= NUMBER | -EXPR | (EXPR) | FUNCTION FUCTION ::= SIN(EXPR) | COS(EXPR) | TAN(EXPR) ARCSIN(EXPR) | ARCCOS(EXPR) | ARCTAN(EXPR) SQRT(EXPR) | SQR(EXPR) | ABS(EXPR) LN(EXPR) | LOG(EXPR) | EXP(EXPR) And left associativity for +, -, *, /, ^. Precedence of operators is as usual: {unar minus} {^} {*,/} {+,-} Returns NULL if an error was found, and error is in E2TParsingError

Parameters:

GI: General info. for the expression tree parsing functions.
s: String expression to parse.


Returned Value:

IritE2TExprNodeStruct *: Built binary tree.


See Also:



Keywords:




IritE2TExpr2TreeFree

(exprtree.c:101)

Prototype:

  void IritE2TExpr2TreeFree(MiscExprTreeGenInfoStruct *GI)


Description:

Frees the local data and info needed by the expression tree module.

Parameters:

GI: .S.F.I.


Returned Value:

void


Keywords:




IritE2TExpr2TreeInit

(exprtree.c:74)

Prototype:

  MiscExprTreeGenInfoStruct *IritE2TExpr2TreeInit()


Description:

Initializes local data and info needed by the expression tree module.

Parameters:

None


Returned Value:

MiscExprTreeGenInfoStruct *: Local info. structure.


Keywords:




IritE2TFreeTree

(exprtree.c:1101)

Prototype:

  void IritE2TFreeTree(IritE2TExprNodeStruct *Root)


Description:

Frees a given expression tree.

Parameters:

Root: Tree to free.


Returned Value:

void


See Also:



Keywords:




IritE2TParamInTree

(exprtree.c:1758)

Prototype:

  int IritE2TParamInTree(const IritE2TExprNodeStruct *Root,
                         const char *ParamName)


Description:

Routine to test if the parameter is in the tree: If ParamName is NULL then any parameter return TRUE.

Parameters:

Root: Tree to examine for an existence of a parameter.
ParamName: Name of parameter to seek, or NULL to seek if any param.


Returned Value:

int: TRUE if parameter exists, FALSE otherwise.


See Also:



Keywords:




IritE2TParseError

(exprtree.c:1898)

Prototype:

  int IritE2TParseError(MiscExprTreeGenInfoStruct *GI)


Description:

Get a parsing error is was one or 0 in none.

Parameters:

GI: General info. for the expression tree parsing functions.


Returned Value:

int: Error or 0 in none.


Keywords:




IritE2TPrintTree

(exprtree.c:784)

Prototype:

  void IritE2TPrintTree(const IritE2TExprNodeStruct *Root, char *Str)


Description:

Routine to print a content of Root (using inorder traversal): If *str = NULL print on stdout, else on given string str.

Parameters:

Root: Tree to print.
Str: Destination.


Returned Value:

void


See Also:



Keywords:




IritE2TSetParamValue

(exprtree.c:1879)

Prototype:

  void IritE2TSetParamValue(MiscExprTreeGenInfoStruct *GI,
                            IrtRType Value,
                            int Index)


Description:

Routine to set the value of a Parameter before evaluating an expression.

Parameters:

GI: General info. for the expression tree parsing functions.
Value: New value to assign to a parameter.
Index: The index of the parameter.


Returned Value:

void


Keywords:




IritEmulatePthreadMutexLock

(xgeneral.c:888)

Prototype:

  void IritEmulatePthreadMutexLock(IRIT_MUTEX *Mx)


Description:

Locking a mutex and also initializing it on the fly if so needed. Used by parallel code if needed.

Parameters:

Mx: The mutex to initialize/lock.


Returned Value:

void


Keywords:




IritEmulatePthreadMutexUnLock

(xgeneral.c:917)

Prototype:

  void IritEmulatePthreadMutexUnLock(IRIT_MUTEX Mx)


Description:

Unlocking a mutex. Used by parallel code if needed.

Parameters:

Mx: The mutex to unlock.


Returned Value:

void


Keywords:




IritFatalError

(irit_ftl.c:60)

Prototype:

  void IritFatalError(const char *Msg)


Description:

Default trap for IRIT programs for irit fatal errors. This function just prints the given error message and die.

Parameters:

Msg: Error message to print.


Returned Value:

void


See Also:

IritWarningMsg IritInformationMsg IritFatalErrorPrintf

Keywords:

error trap


IritFatalErrorPrintf

(irit2ftl.c:35)

Prototype:

  void IritFatalErrorPrintf(const char *va_alist, ...)


Description:

Default trap for IRIT programs for irit fatal errors, printf style.

Parameters:

va_alist: Do "man stdarg".


Returned Value:

void


See Also:

IritFatalError IritWarningMsgPrintf IritInformationMsgPrintf

Keywords:

error trap


IritFree

(imalloc.c:639)

Prototype:

  void IritFree(VoidPtr p)


Description:

Routine to free dynamic memory for all IRIT program/tool/libraries. All requests to free dynamic memory should invoke this function.

Parameters:

p: Pointer to a block that needs to be freed.


Returned Value:

void


See Also:

IritMalloc IritRealloc IritDynMemoryDbgCheckMark IritDynMemoryDbgInitTest

Keywords:

allocation


IritFree2UnixFree

(imalloc.c:150)

Prototype:

  void IritFree2UnixFree(void *p)


Description:

For those who need to call IRIT insiead of C library functions.

Parameters:

p: Dynamically allocated pointer to free.


Returned Value:

void


Keywords:




IritGaussJordan

(levenmar.c:575)

Prototype:

  int IritGaussJordan(IrtRType *A, IrtRType *B, unsigned N, unsigned M)


Description:

This functions solves the linear equation Ax=B, using the Gauss-Jordan elimination algorithm.

Parameters:

A: matrix of N*N elements, is invalid on exit.
B: matrix of N*M elements, contains the result on exit.
N: escribed above.
M: escribed above.


Returned Value:

int: TRUE on success, FALSE if singular.


See Also:



Keywords:

Gauss-Jordan elimination


IritHashTableCreate

(hash_tbl.c:38)

Prototype:

  IritHashTableStruct *IritHashTableCreate(IrtRType MinKeyVal,
                                           IrtRType MaxKeyVal,
                                           IrtRType KeyEps,
                                           int VecSize)


Description:

Constructs a simple hasing table.

Parameters:

MinKeyVal: Minimum expected key value.
MaxKeyVal: Maximum expected key value.
KeyEps: Tolerance of two keys to be considered the same. Negative to never consider the same.
VecSize: Size of hash table to use.


Returned Value:

IritHashTableStruct *: Constructed has table.


See Also:

IritHashTableInsert IritHashTableRemove IritHashTableFree IritHashTableFind

Keywords:




IritHashTableFind

(hash_tbl.c:163)

Prototype:

  VoidPtr IritHashTableFind(IritHashTableStruct *IHT,
                            VoidPtr Data,
                            IritHashCmpFuncType HashCmpFunc,
                            IrtRType Key)


Description:

Find an element in the hashing table. Search is conducted in two steps. First the search is performed by key and then by HashCmpFunc against Data.

Parameters:

IHT: IritHashTable structure.
Data: Element to compare against during the search.
HashCmpFunc: Test function to compare two data items. Returns -1,0,1 if first item is less, equal, greater than second item. If NULL, search is conducted by the Key only.
Key: Key with which to search in the table.


Returned Value:

VoidPtr: Found element, or NULL if none.


See Also:

IritHashTableCreate IritHashTableRemove IritHashTableInsert IritHashTableFree

Keywords:




IritHashTableFree

(hash_tbl.c:277)

Prototype:

  void IritHashTableFree(IritHashTableStruct *IHT)


Description:

Free the entire hash table.

Parameters:

IHT: IritHashTable structure to free.


Returned Value:

void


See Also:

IritHashTableCreate IritHashTableInsert IritHashTableFind IritHashTableRemove

Keywords:




IritHashTableInsert

(hash_tbl.c:89)

Prototype:

  int IritHashTableInsert(IritHashTableStruct *IHT,
                          VoidPtr Data,
                          IritHashCmpFuncType HashCmpFunc,
                          IrtRType Key,
                          int RplcSame)


Description:

Insert one element into the hashing table.

Parameters:

IHT: IritHashTable structure.
Data: Element to insert into the hash table.
HashCmpFunc: Test function to compare two data items. Returns -1,0,1 if first item is less, equal, greater than second item. If NULL, search is conducted by the Key only.
Key: Key with which to insert into the table.
RplcSame: RUE, to replace a similar Data if detected, FALSE to skip.


Returned Value:

int: TRUE if old element with the same key was found and replaced, FALSE if indeed a data with new key.


See Also:

IritHashTableCreate IritHashTableFind IritHashTableRemove IritHashTableFree

Keywords:




IritHashTableRemove

(hash_tbl.c:219)

Prototype:

  int IritHashTableRemove(IritHashTableStruct *IHT,
                          VoidPtr Data,
                          IritHashCmpFuncType HashCmpFunc,
                          IrtRType Key)


Description:

Remove an element from the hashing table. Search is conducted in two steps. First the search is performed by key and then by HashCmpFunc against Data.

Parameters:

IHT: IritHashTable structure.
Data: Element to compare against during the search.
HashCmpFunc: Test function to compare two data items. Returns -1,0,1 if first item is less, equal, greater than second item. If NULL, search is conducted by the Key only.
Key: Key with which to search in the table.


Returned Value:

int: TRUE if element found and removed, FALSE if not found.


See Also:

IritHashTableCreate IritHashTableFind IritHashTableInsert IritHashTableFree

Keywords:




IritImgPrcssAppFunOnLine

(img_prcss.c:746)

Prototype:

  void IritImgPrcssAppFunOnLine(IritImgPrcssImgStruct *Image,
                                int X0,
                                int Y0,
                                int X1,
                                int Y1,
                                IritImgPrcssFunctionOnPixel F,
                                void *Data)


Description:

Given an image and two points on the image, iterates over the pixels that lay on the line between the two points, and for each pixel, calls the function with the provided data and the pixel coordinates

Parameters:

Image: The image processing library image struct.
X0, Y0: The coordinates for the first image.
X1, Y1: The coordinates for the second image.
F: The function to call on the iterated pixels
Data: Data for the function


Returned Value:

void


Keywords:




IritImgPrcssBiSobel

(img_prcss.c:409)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssBiSobel(const IritImgPrcssImgStruct *Image)


Description:

Given an image, applies the Sobel operator twice(vertical and horizontal) on it. it then calculates the final color value by: SQRT ((G1 ^ 2) + (G2 ^ 2)) where G1 and G2 are the gray scale intensities for the results of the vertical and horizontal runs. Equivalent to calling ApplyConvolution3Image with the following filters { -1, 0, 1, -2, 0, 2, -1, 0, 1 } { -1, -2, -1, 0, 0, 0, 1, 2, 1 }.

Parameters:

Image: The image to apply the Bi Directional Sobel operator on.


Returned Value:

IritImgPrcssImgStruct *: A copy of the image after applying the Bi Directional Sobel operator.


Keywords:

Convolution filter Sobel Edges Edge detection Bi Directional


IritImgPrcssConv3

(img_prcss.c:305)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssConv3(const IritImgPrcssImgStruct *Image,
                                           float Filter[9],
                                           int Normalize)


Description:

Given an image and a 3x3 filter, applies the filter on a zero padded version of the image. the function prepares the filter for convolution.

Parameters:

Image: The image to apply the convolution on.
Filter: An array of floats containing the 3x3 filter data.
Normalize: RUE to clip to [0, 1] the results.


Returned Value:

IritImgPrcssImgStruct *: The image after applying the filter by convolution.


Keywords:

convolution filter


IritImgPrcssCopyImg

(img_prcss.c:150)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssCopyImg(const IritImgPrcssImgStruct *Image)


Description:

Allocates a new image filled with pixels from provided Image.

Parameters:

Image: Image to copy.


Returned Value:

IritImgPrcssImgStruct *: A copy of the provided image.


Keywords:

Copy image copy constructor


IritImgPrcssCreateBlkImg

(img_prcss.c:93)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssCreateBlkImg(unsigned int Height,
                                                  unsigned int Width)


Description:

Allotcates a new image filled with black pixels of the dimensions Height and Width.

Parameters:

Height: Height of the image to be produced.
Width: Width of the image to be produced.


Returned Value:

IritImgPrcssImgStruct *: The black produced image.


Keywords:

Create image constructor black


IritImgPrcssCreateImg

(img_prcss.c:122)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssCreateImg(unsigned int Height,
                                               unsigned int Width,
                                               float *Data)


Description:

Allotcates a new image filled with pixels from provided data of the dimensions Height and Width.

Parameters:

Height: Height of the image to be produced.
Width: Width of the image to be produced.
Data: Data to occupy the image with of size Height * Width * 4.


Returned Value:

IritImgPrcssImgStruct *: The newly allocated image.


Keywords:

create image constructor


IritImgPrcssCreateWhiteImg

(img_prcss.c:67)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssCreateWhiteImg(unsigned int Height,
                                                    unsigned int Width)


Description:

Allotcates a new image filled with white pixels of the dimensions Height and Width.

Parameters:

Height: Height of the image to be produced.
Width: Width of the image to be produced.


Returned Value:

IritImgPrcssImgStruct *: The white produced image.


Keywords:

Create image constructor white


IritImgPrcssDeleteImg

(img_prcss.c:277)

Prototype:

  void IritImgPrcssDeleteImg(IritImgPrcssImgStruct *Image)


Description:

Deletes the allocated memory for the given image.

Parameters:

Image: Pointer for the image to free.


Returned Value:

void


Keywords:

delete free


IritImgPrcssDetectEdges

(img_prcss.c:592)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssDetectEdges(const IritImgPrcssImgStruct
                                                                         *Image,
                                                 int BlurAmount)


Description:

Given an image, detects the edges in the image by applying gaussian blue BlurAmount times and then running the Bi-Sobel operator on the blurred.

Parameters:

Image: The image to Detect its edges.
BlurAmount: The amount of times to blur the image before applying the bi Sobel operator.


Returned Value:

IritImgPrcssImgStruct *: The edges in the image.


Keywords:

convolution filter Sharpening


IritImgPrcssGaussianBlur

(img_prcss.c:470)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssGaussianBlur(const IritImgPrcssImgStruct
                                                                         *Image)


Description:

Given an image, applies the Gaussian Blur filter on it. Equivilant to calling ApplyConvolution3Image with the following filter { 1, 2, 1, 2, 4, 2, 1, 2, 1 }.

Parameters:

Image: The image to apply the convolution on.


Returned Value:

IritImgPrcssImgStruct *: A copy of the image after applying the Gaussian Blur operator.


Keywords:

convolution filter Gaussian blur


IritImgPrcssGaussianBlurMult

(img_prcss.c:504)

Prototype:

  IritImgPrcssImgStruct *
                   IritImgPrcssGaussianBlurMult(IritImgPrcssImgStruct *Image,
                                                int Amount)


Description:

Given an image, applies the Gaussian Blur filter on it multiple times. Equivalent to calling ApplyConvolution3Image with the following filter (1 / 16) * {1, 2, 1, 2, 4, 2, 1, 2, 1} multiple times.

Parameters:

Image: The image to apply the convolution on.
Amount: he amount of times to run the Gaussian blur on the given image.


Returned Value:

IritImgPrcssImgStruct *: A copy of the image after applying the Gaussian blur operator Amount times.


Keywords:

convolution filter blur gaussian blur


IritImgPrcssGetPixelVal

(img_prcss.c:177)

Prototype:

  int IritImgPrcssGetPixelVal(const IritImgPrcssImgStruct *Image,
                              unsigned int i,
                              unsigned int j,
                              float Color[4])


Description:

Returns the values of the (j, i) pixel in the provided color array.

Parameters:

Image: Image struct to read the pixel value from.
i: Column index for the pixel.
j: Row index for the pixel.
Color: Array of floats to save the pixel data in.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

get pixel read pixel


IritImgPrcssInvert

(img_prcss.c:544)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssInvert(const IritImgPrcssImgStruct *Image)


Description:

Given an image, inverts its colors.

Parameters:

Image: The image to invert.


Returned Value:

IritImgPrcssImgStruct *: A copy of the image after applying the sharpen operator.


Keywords:

filter Invert


IritImgPrcssReadImg

(img_prcss.c:621)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssReadImg(const char *Path)


Description:

Given a path, reads the image in that path and creates an image processing library image struct out of it.

Parameters:

Path: The path for the image to load.


Returned Value:

IritImgPrcssImgStruct *: Read image.


Keywords:




IritImgPrcssSetPixelVal

(img_prcss.c:209)

Prototype:

  int IritImgPrcssSetPixelVal(IritImgPrcssImgStruct *Image,
                               unsigned int i,
                               unsigned int j,
                               const float color[4])


Description:

Puts the given pixel in the (j, i) pixel of the provided image.

Parameters:

Image: Image struct to write the pixel value to.
i: Column index for the pixel.
j: Row index for the pixel.
color: Array of floats containing the pixel data.


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:

set pixel write pixel


IritImgPrcssSharpen

(img_prcss.c:378)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssSharpen(const IritImgPrcssImgStruct *Image)


Description:

Given an image, applies the sharpen filter on it. Equivalent to calling ApplyConvolution3Image with the following filter { 0, -1, 0, -1, 5, -1, 0, -1, 0 }.

Parameters:

Image: The image to apply the convolution on.


Returned Value:

IritImgPrcssImgStruct *: A copy of the image after applying the sharpen operator.


Keywords:

Convolution filter Sharpe


IritImgPrcssToGrayScale

(img_prcss.c:235)

Prototype:

  IritImgPrcssImgStruct *IritImgPrcssToGrayScale(const IritImgPrcssImgStruct
                                                                         *Image)


Description:

Creates a gray scale image out of the provided image Gray intensity is calculated according to Y = 0.2126R + 0.7152G + 0.0722B following CIE 1931 (i.e. https://en.wikipedia.org/wiki/Grayscale)

Parameters:

Image: Input color image to convert to gray scale.


Returned Value:

IritImgPrcssImgStruct *: Grayscale image of the provided image.


Keywords:

gray scale


IritImgPrcssWriteImg

(img_prcss.c:686)

Prototype:

  void IritImgPrcssWriteImg(IritImgPrcssImgStruct *Image, const char *SavePath)


Description:

Given a path, write the image to that path

Parameters:

Image: The image processing library image struct.
SavePath: The path to save the image to


Returned Value:

void


See Also:

IritImgWriteImg

Keywords:




IritInformationMsg

(irit_inf.c:121)

Prototype:

  void IritInformationMsg(const char *Msg)


Description:

Default trap for IRIT programs for irit information. This function just prints the given message.

Parameters:

Msg: Error message to print.


Returned Value:

void


See Also:

IritInformationMsgPrintf IritFatalError IritWarningMsg IritInformationWMsg

Keywords:

information messages


IritInformationMsgPrintf

(irit2inf.c:35)

Prototype:

  void IritInformationMsgPrintf(const char *va_alist, ...)


Description:

Default trap for IRIT programs for irit warning errors, printf style.

Parameters:

va_alist: Do "man stdarg".


Returned Value:

void


See Also:

IritInformationMsg IritFatalErrorPrintf IritWarningMsgPrintf

Keywords:

information messages


IritInformationWMsg

(irit_inf.c:181)

Prototype:

  void IritInformationWMsg(const wchar_t *Msg)


Description:

Default trap for IRIT programs for irit information. This function just prints the given message.

Parameters:

Msg: Error message to print.


Returned Value:

void


See Also:

IritInformationMsgPrintf IritFatalError IritWarningMsg IritInformationMsg

Keywords:

information messages


IritIntrvlArithAbs

(intrv_arit.c:234)

Prototype:

  void IritIntrvlArithAbs(const IritIntrvlArithStruct *A,
                          IritIntrvlArithStruct *Result)


Description:

Calcualtes the absolute value of an interval.

Parameters:

A: Interval A.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithAdd

(intrv_arit.c:32)

Prototype:

  void IritIntrvlArithAdd(const IritIntrvlArithStruct *A,
                          const IritIntrvlArithStruct *B,
                          IritIntrvlArithStruct *Result)


Description:

Adds two intervals.

Parameters:

A: Interval A.
B: Interval B.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithDiv

(intrv_arit.c:129)

Prototype:

  void IritIntrvlArithDiv(const IritIntrvlArithStruct *A,
                          const IritIntrvlArithStruct *B,
                          IritIntrvlArithStruct *Result)


Description:

divides interval A by interval B.

Parameters:

A: Interval A.
B: Interval B.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithMult

(intrv_arit.c:92)

Prototype:

  void IritIntrvlArithMult(const IritIntrvlArithStruct *A,
                           const IritIntrvlArithStruct *B,
                           IritIntrvlArithStruct *Result)


Description:

Multiplies two intervals.

Parameters:

A: Interval A.
B: Interval B.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithMultScalar

(intrv_arit.c:200)

Prototype:

  void IritIntrvlArithMultScalar(const IritIntrvlArithStruct *A,
                                 IrtRType Val,
                                 IritIntrvlArithStruct *Result)


Description:

Multiplies an interval by a scalar value.

Parameters:

A: Interval A.
Val: A scalar value.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithSqrt

(intrv_arit.c:174)

Prototype:

  void IritIntrvlArithSqrt(const IritIntrvlArithStruct *A,
                           IritIntrvlArithStruct *Result)


Description:

Calculates the square root of an interval.

Parameters:

A: Interval A.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithSub

(intrv_arit.c:62)

Prototype:

  void IritIntrvlArithSub(const IritIntrvlArithStruct *A,
                          const IritIntrvlArithStruct *B,
                          IritIntrvlArithStruct *Result)


Description:

Subtracts interval B from Interval A.

Parameters:

A: Interval A.
B: Interval B.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithUnion

(intrv_arit.c:275)

Prototype:

  void IritIntrvlArithUnion(const IritIntrvlArithStruct *A,
                            const IritIntrvlArithStruct *B,
                            IritIntrvlArithStruct *Result)


Description:

Calcualtes the union of two intervals.

Parameters:

A: Interval A.
B: Interval B.
Result: The resulting interval.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVAdd

(intrv_arit.c:301)

Prototype:

  void IritIntrvlArithVAdd(const IritIntrvlArithStruct *A,
                           const IritIntrvlArithStruct *B,
                           IritIntrvlArithStruct *Result)


Description:

Adds two vector(3d) intervals.

Parameters:

A: Interval vector A.
B: Interval vector B.
Result: The resulting interval vector.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVCross

(intrv_arit.c:364)

Prototype:

  void IritIntrvlArithVCross(const IritIntrvlArithStruct *A,
                             const IritIntrvlArithStruct *B,
                             IritIntrvlArithStruct *Result)


Description:

The cross product of two vector(3d) intervals.

Parameters:

A: Interval vector A.
B: Interval vector B.
Result: The resulting interval vector.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVDot

(intrv_arit.c:330)

Prototype:

  void IritIntrvlArithVDot(const IritIntrvlArithStruct *A,
                           const IritIntrvlArithStruct *B,
                           IritIntrvlArithStruct *Result)


Description:

The dot product of two vector(3d) intervals.

Parameters:

A: Interval vector A.
B: Interval vector B.
Result: The resulting interval vector.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVFromCone

(intrv_arit.c:401)

Prototype:

  void IritIntrvlArithVFromCone(const IrtRType *Dir,
                                IrtRType Angle,
                                IritIntrvlArithStruct *Result)


Description:

Generates an interval vector from a given cone (apex at origin).

Parameters:

Dir: Cone direction (axis).
Angle: Cone angle.
Result: The resulting interval vector.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVMultScalar

(intrv_arit.c:579)

Prototype:

  void IritIntrvlArithVMultScalar(const IritIntrvlArithStruct *A,
                                  IrtRType Val,
                                  IritIntrvlArithStruct *Result)


Description:

Multiplies an interval vector by a scalar value.

Parameters:

A: The interval vector.
Val: A scalar value.
Result: The resulting interval vector.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVToCone

(intrv_arit.c:436)

Prototype:

  void IritIntrvlArithVToCone(const IritIntrvlArithStruct *IntervalV,
                              IrtRType *Dir,
                              IrtRType *Angle)


Description:

Generates a cone (apex at origin) from a given interval vector.

Parameters:

IntervalV: The interval vector.
Dir: Cone direction (axis).
Angle: Cone angle.


Returned Value:

void


See Also:



Keywords:




IritIntrvlArithVToSphere

(intrv_arit.c:541)

Prototype:

  void IritIntrvlArithVToSphere(const IritIntrvlArithStruct *IntervalV,
                                IrtRType *Center,
                                IrtRType *Radius)


Description:

Generates a sphere of an average radius around the interval vector.

Parameters:

IntervalV: The interval vector.
Center: sphere center.
Radius: Sphere radius.


Returned Value:

void


See Also:



Keywords:




IritLevenMarMin

(levenmar.c:433)

Prototype:

  IrtRType IritLevenMarMin(IrtRType **X,
                           IrtRType Y[],
                           IrtRType Sigma[],
                           unsigned NumberOfDataElements,
                           IrtRType ModelParams[],
                           IritLevenEvalFuncType *ShapeFunc,
                           IritLevenNumerProtectionFuncType *ProtectionFunc,
                           IritLevenIsModelValidFuncType *ModelValidatorFunc,
                           unsigned NumberOfModelParams,
                           IrtRType Tolerance)


Description:

This function calculates the levenberg-marquardt minimization of the Specified function.

Parameters:

X: Pointer to a list of data.
Y: Pointer to the list of expected results.
Sigma: Pointer to the expected variance vector.
NumberOfDataElements: he number of data elements in X, Y & Sigma.
ModelParams: The model params to be checked.
ShapeFunc: The shape function.
ProtectionFunc: The numerical protection function.
ModelValidatorFunc: The model validator.
NumberOfModelParams: he number of model params.
Tolerance: If the error is smaller then Tolerance return.


Returned Value:

IrtRType: The squared sum of the error.


See Also:

IritLevenMarMinSig1 IritLevenMarSetMaxIterations

Keywords:




IritLevenMarMinSig1

(levenmar.c:510)

Prototype:

  IrtRType IritLevenMarMinSig1(IrtRType **X,
                               IrtRType Y[],
                               unsigned NumberOfDataElements,
                               IrtRType ModelParams[],
                               IritLevenEvalFuncType *ShapeFunc,
                               IritLevenNumerProtectionFuncType *ProtectionFunc,
                               IritLevenIsModelValidFuncType *ModelValidatorFunc,
                               unsigned NumberOfModelParams,
                               IrtRType Tolerance)


Description:

This function calculates the levenberg-marquardt minimization of the Specified function. This function is similar to LevenMin except that sigma is allways 1.

Parameters:

X: Pointer to a list of data.
Y: Pointer to the list of expected results.
NumberOfDataElements: he number of data elements in X, Y & Sigma.
ModelParams: The model params to be checked.
ShapeFunc: The shape function.
ProtectionFunc: The numerical protection function.
ModelValidatorFunc: The model validator.
NumberOfModelParams: he number of model params.
Tolerance: If the error is smaller then Tolerance return.


Returned Value:

IrtRType: The squared sum of the error.


See Also:

IritLevenMarMin IritLevenMarSetMaxIterations

Keywords:




IritLevenMarSetMaxIterations

(levenmar.c:88)

Prototype:

  unsigned IritLevenMarSetMaxIterations(unsigned NewVal)


Description:

This function modifies the maximum number of iteration when calculating Levenberg-Marquardt.

Parameters:

NewVal: he new maximum number of iterations.


Returned Value:

unsigned: The old maximum number of iterations.


See Also:

IritLevenMarMinSig1 IritLevenMarMin

Keywords:




IritLineHasCntrlChar

(irit_inf.c:91)

Prototype:

  int IritLineHasCntrlChar(const char *Line)


Description:

Test if the given line contains control chars.

Parameters:

Line: ine to examine for control char's existence.


Returned Value:

int: TRUE if this line holds control chars, FALSE otherwise.


Keywords:




IritMalloc

(imalloc.c:494)

Prototype:

  VoidPtr IritMalloc(unsigned Size,
                     const char *ObjType,
                     const char *FileName,
                     int LineNum)


Description:

Routine to allocate dynamic memory for all IRIT program/tool/libraries. All requests for dynamic memory should invoke this function. If the environment variable "IRIT_MALLOC" is set when an IRIT program is executed, the consistency of the dynamic memory is tested on every invokation of this routine. See IritDynMemoryDbgTestAll function for more.

Parameters:

Size: Size of block to allocate, in bytes.
ObjType: This variable exists iff "#define DEBUG_IRIT_MALLOC". This holds the object descriptions.
FileName: his variable exists iff "#define DEBUG_IRIT_MALLOC". This holds the file name where the call is invoked from.
LineNum: This variable exists iff "#define DEBUG_IRIT_MALLOC". This holds the line number where the call is invoked from.


Returned Value:

VoidPtr: A pointer to the allocated block. A function calling this may assume return value will never be NULL, since no more memory cases are trapped locally.


See Also:

IritFree IritRealloc IritDynMemoryDbgCheckMark IritDynMemoryDbgInitTest

Keywords:

allocation


IritPQCompFunc

(priorque.c:98)

Prototype:

  void IritPQCompFunc(IritPQCompFuncType NewCompFunc)


Description:

Sets (a pointer to) the function that is used in comparing two items in the queue. This comparison function will get two item pointers, and should return >0, 0, <0 as comparison result for greater than, equal, or less than relation, respectively.

Parameters:

NewCompFunc: A comparison function to used on item in the queue.


Returned Value:

void


Keywords:

priority queue


IritPQDelete

(priorque.c:197)

Prototype:

  VoidPtr IritPQDelete(IritPriorQue **PQ, VoidPtr OldItem)


Description:

Deletes an old item from the queue, using comparison function CompFunc. Returns a pointer to Deleted item if was fould and deleted from the queue, NULL otherwise.

Parameters:

PQ: To delete OldItem from.
OldItem: Old element in priority queue PQ to remove from.


Returned Value:

VoidPtr: Removed OldItem if found, NULL otherwise.


Keywords:

priority queue


IritPQEmpty

(priorque.c:76)

Prototype:

  int IritPQEmpty(IritPriorQue *PQ)


Description:

returns TRUE iff PQ priority queue is empty.

Parameters:

PQ: Priority queue to test for containment.


Returned Value:

int: TRUE if not empty, FALSE otherwise.


Keywords:

priority queue


IritPQFind

(priorque.c:278)

Prototype:

  VoidPtr IritPQFind(IritPriorQue *PQ, VoidPtr OldItem)


Description:

Finds old item on the queue, PQ, using the comparison function CompFunc. Returns a pointer to item if was fould, NULL otherwise.

Parameters:

PQ: To search for OldItem at.
OldItem: Element to search in PQ.


Returned Value:

VoidPtr: Found element or othewise NULL.


Keywords:

priority queue


IritPQFirst

(priorque.c:118)

Prototype:

  VoidPtr IritPQFirst(IritPriorQue **PQ, int Delete)


Description:

Returns the first element in the given priority queue, and delete it from the queue if Delete is TRUE. returns NULL if empty queue.

Parameters:

PQ: To examine/remove first element from.
Delete: If TRUE first element is being removed from the queue.


Returned Value:

VoidPtr: A pointer to the first element in the queue.


Keywords:

priority queue


IritPQFree

(priorque.c:416)

Prototype:

  void IritPQFree(IritPriorQue *PQ, int FreeItem)


Description:

Frees the given queue. The elelents are also freed if FreeItems is TRUE.

Parameters:

PQ: Priority queue to release.
FreeItem: If TRUE, elements are being freed as well.


Returned Value:

void


Keywords:

priority queue


IritPQFreeFunc

(priorque.c:444)

Prototype:

  void IritPQFreeFunc(IritPriorQue *PQ, void (*FreeFunc)(VoidPtr))


Description:

Frees the given queue. The elelents are also freed by invoking FreeFunc onall of them as FreeFunc's only argument.

Parameters:

PQ: Priority queue to release.
FreeFunc: "Printing function".


Returned Value:

void


Keywords:

priority queue


IritPQInit

(priorque.c:57)

Prototype:

  void IritPQInit(IritPriorQue **PQ)


Description:

Initializes the priority queue.

Parameters:

PQ: To initialize.


Returned Value:

void


Keywords:

priority queue


IritPQInsert

(priorque.c:154)

Prototype:

  VoidPtr IritPQInsert(IritPriorQue **PQ, VoidPtr NewItem)


Description:

Insert a new element into the queue (NewItem is a pointer to new element) using given compare function CompFunc (See IritPQCompFunc). Insert element will always be a leaf of the constructed tree. Returns a pointer to old element if was replaced or NULL if the element is new.

Parameters:

PQ: To insert a new element to.
NewItem: The new element to insert.


Returned Value:

VoidPtr: An old element NewItem replaced, or NULL otherwise.


Keywords:

priority queue


IritPQNext

(priorque.c:319)

Prototype:

  VoidPtr IritPQNext(IritPriorQue *PQ, VoidPtr CmpItem, VoidPtr LargerThan)


Description:

Returns the smallest element in PQ that is larger than given element CmpItem. PQ is not modified. Return NULL if none was found. LargerThan will allways hold the smallest Item Larger than current one.

Parameters:

PQ: To examine.
CmpItem: To find the smallest item in PQ that is larger than it.
LargerThan: The item that is found larger so far.


Returned Value:

VoidPtr: The samllest item in PQ that is larger than CmpItem or NULL if no found.


Keywords:

priority queue


IritPQPrint

(priorque.c:390)

Prototype:

  void IritPQPrint(IritPriorQue *PQ, void (*PrintFunc)(VoidPtr))


Description:

Scans the priority queue in order and invokes the "printing" routine, PrintFunc on every item in the queue as its only argument.

Parameters:

PQ: Pritority queue to traverse.
PrintFunc: "Printing function".


Returned Value:

void


Keywords:

priority queue


IritPQSize

(priorque.c:363)

Prototype:

  int IritPQSize(IritPriorQue *PQ)


Description:

Computes the size of the given tree - number of nodes/elements.

Parameters:

PQ: Pritority queue to traverse.


Returned Value:

int: Number of nodes in tree == number of elements.


Keywords:




IritPseudoRandom

(xgeneral.c:403)

Prototype:

  IrtRType IritPseudoRandom()


Description:

Computes a pseudo random number generator using the large Bezier evaluation table of the cagd library...

Parameters:

None


Returned Value:

IrtRType: A pseudo random number between zero and one.


See Also:

CagdIChooseKTable IritPseudoRandomInit IritRandom

Keywords:




IritPseudoRandomInit

(xgeneral.c:381)

Prototype:

  void IritPseudoRandomInit(unsigned int Seed)


Description:

A seed generator for a pseudo random number generator using the large Bezier evaluation table of the cagd library...

Parameters:

Seed: New seed for the randomization process.


Returned Value:

void


See Also:

CagdIChooseKTable IritPseudoRandom IritRandom

Keywords:




IritQRFactorization

(qrfactor.c:52)

Prototype:

  int IritQRFactorization(IrtRType *A,
                          int n,
                          int m,
                          IrtRType *Q,
                          IrtRType *R)


Description:

Performs a QR factorization of matrix A.

Parameters:

A: The matrix of size n by m (m <= n), must be preallocated dynamically by the user.
n, m: Dimensions of matrix A.
Q, R: The computed decomposition matrices, must be preallocated dynamically by the user. Q is n by m (like A), R is m by m.


Returned Value:

int: TRUE if Singular, FALSE otherwise.


See Also:

SvdLeastSqr

Keywords:

QR factorization linear systems matrices


IritQRUnderdetermined

(qrfactor.c:285)

Prototype:

  int IritQRUnderdetermined(IrtRType *A,
                            IrtRType *x,
                            const IrtRType *b,
                            int m,
                            int n,
                            void **QRCache)


Description:

Solve for Ax = b when the system is under-determined (singular). The solution is a minimum 2-norm solution. See "matrix Computation", by Gene H. Golub and Charles F. Van Loan, 3rd edition, pp 271-272. Caches the QR factorizations so we can solve multiples b's as follows:
  1. If A != NULL a QR factorization is computed for A and cached.
  2. if A == NULL and X != NULL, a solution is computed for the given b.
  3. If A == NULL and x == NULL the cache is freed.


Parameters:

A: The matrix of size m by n (m <= n), must be preallocated dynamically by the user.
x: The solution vector of size n.
b: A vector of size m.
m, n: Dimensions of matrix A. Because A is under-determined m <= n.
QRCache: A reference to a cache used internally.


Returned Value:

int: TRUE if Singular, FALSE otherwise.


See Also:

IritQRFactorization IritSolveUpperDiagMatrix SvdLeastSqr

Keywords:

QR factorization linear systems matrices


IritQRUnderdetermined2

(qrfactor.c:377)

Prototype:

  int IritQRUnderdetermined2(IrtRType *A,
                             IrtRType *x,
                             const IrtRType *b,
                             int m,
                             int n)


Description:


Solve for Ax = b when the system is under-determined (singular). The solution is a minimum 2-norm solution. See "matrix Computation", by Gene H. Golub and Charles F. Van Loan, 3rd edition, pp 271-272. Same as IritQRUnderdetermined but handles one solution vector.

Parameters:

A: The matrix of size m by n (m <= n), must be preallocated dynamically by the user.
x: The solution vector of size n.
b: A vector of size m.
m, n: Dimensions of matrix A. Because A is under-determined m <= n.


Returned Value:

int: TRUE if Singular, FALSE otherwise.


See Also:

IritQRFactorization IritSolveUpperDiagMatrix SvdLeastSqr IritQRUnderdetermined

Keywords:

QR factorization linear systems matrices


IritRLAdd

(mincover.c:279)

Prototype:

  void IritRLAdd(VoidPtr RLC, IrtRType l, IrtRType r, int Attr)


Description:

Creates and links a new range node to an existing list of nodes.

Parameters:

RLC: An existing list which will be added a new node.
l, r, Attr: Node details; Left, Right and Attribute.


Returned Value:

void


See Also:

IritRLNew IritRLFindCyclicCover IritRLDelete

Keywords:




IritRLDelete

(mincover.c:233)

Prototype:

  void IritRLDelete(VoidPtr RLC)


Description:

Cleanup of RLStruct (a whole list)

Parameters:

RLC: list to be deleted.


Returned Value:

void


See Also:

IritRLNew IritRLAdd IritRLFindCyclicCover

Keywords:




IritRLFindCyclicCover

(mincover.c:1103)

Prototype:

  int *IritRLFindCyclicCover(VoidPtr RLC, IrtRType Tol)


Description:

Finds a cyclic cover from nodes in RL to cover [0,1] This function decides the type of the cover SignleRange or MultiRange and calls the suitable internal function to find a cover.

Parameters:

RLC: A list (RL) of candidate ranges to cover [0,1].
Tol: Accuracy of merges of sets.


Returned Value:

int *: A vector of indices (attributes) of covering set, terminated by -1.


See Also:

IritRLNew IritRLAdd IritRLDelete

Keywords:




IritRLNew

(mincover.c:194)

Prototype:

  VoidPtr IritRLNew(void)


Description:

Initializes a new Range List (RL) - which is an empty double link list The list specifier is Plist*, which points, always, at the tail.

Parameters:

None


Returned Value:

VoidPtr: The new allocated list structure.


See Also:

IritRLAdd IritRLFindCyclicCover IritRLDelete

Keywords:




IritRLSetGaurdiansNumber

(mincover.c:109)

Prototype:

  int IritRLSetGaurdiansNumber(int g)


Description:

Sets the maximum number of views allowed to generate a min cover. Actually this is the maximum number of subsets to be generated by the FindMRCyclicCover() function.

Parameters:

g: Maximum number of gaurdians required.


Returned Value:

int: The previously used number of gaurdians.


See Also:

IritRLAdd IritRLFindCyclicCover IritRLDelete

Keywords:




IritRandom

(xgeneral.c:339)

Prototype:

  IrtRType IritRandom(IrtRType Min, IrtRType Max)


Description:

Routine to compute a random number in a specified range. See also IritRandomInit.

Parameters:

Min: Minimum range of random number requested.
Max: Maximum range of random number requested.


Returned Value:

IrtRType: A random number between Min andMax.


See Also:

IritRandomInit IritPseudoRandom

Keywords:

random numbers


IritRandomInit

(xgeneral.c:304)

Prototype:

  void IritRandomInit(long Seed)


Description:

Routine to initialize the random number generator.

Parameters:

Seed: To initialize the random number generator with.


Returned Value:

void


See Also:

IritRandom IritPseudoRandom

Keywords:

random numbers


IritRealTimeDate

(xgeneral.c:524)

Prototype:

  char *IritRealTimeDate(char *StrTime)


Description:

Routine to create and return a string describing current date and time.

Parameters:

StrTime: Where to save the written date/time. Same as return value.


Returned Value:

char *: A string describing current date and time. Same as StrTime.


Keywords:

date time


IritRealloc

(imalloc.c:447)

Prototype:

  VoidPtr IritRealloc(VoidPtr p, unsigned OldSize, unsigned NewSize)


Description:

Routine to reallocate dynamic memory for all IRIT program/tool/libraries. All requests for dynamic memory should invoke this function. If the environment variable "IRIT_MALLOC" is set when an IRIT program is executed, the consistency of the dynamic memory is tested on every invokation of this routine. See IritDynMemoryDbgTestAll function for more.

Parameters:

p: Old pointer to reallocate. Freed at the end of this routine.
OldSize: Size of old block pointed by p, zero if unknown.
NewSize: Size of new block to allocate, in bytes. Must be larger than OldSize.


Returned Value:

VoidPtr: A pointer to the allocated block. A function calling this may assume return value will never be NULL, since no more memory cases are trapped locally.


See Also:

IritFree IritMalloc IritDynMemoryDbgCheckMark IritDynMemoryDbgInitTest

Keywords:

allocation


IritSearch2DFindElem

(search.c:210)

Prototype:

  int IritSearch2DFindElem(VoidPtr S2D,
                           IrtRType XKey,
                           IrtRType YKey,
                           VoidPtr Data)


Description:

Looks for an existing element in the data structure. If found an element within prescribed tolerance, Data is updated with the saved data

Parameters:

S2D: Internal data structure, aiding search.
XKey, YKey: The 2D coordinates to search for.
Data: A pointer to the location to copy the found data into.


Returned Value:

int: TRUE if element was found, FALSE otherwise.


See Also:

IritSearch2DFree IritSearch2DInsertElem IritSearch2DInit

Keywords:




IritSearch2DFree

(search.c:119)

Prototype:

  void IritSearch2DFree(VoidPtr S2D)


Description:

Free auxiliary data structure aiding in 2D search.

Parameters:

S2D: Internal data structure, aiding search, to be freed.


Returned Value:

void


See Also:

IritSearch2DInsertElem IritSearch2DFindElem IritSearch2DInit

Keywords:




IritSearch2DInit

(search.c:58)

Prototype:

  VoidPtr IritSearch2DInit(IrtRType XMin,
                           IrtRType XMax,
                           IrtRType YMin,
                           IrtRType YMax,
                           IrtRType Tol,
                           int DataSize)


Description:

Initialize the search data structure.

Parameters:

XMin, XMax, YMin, YMax: Dimensions of 2D domain.
Tol: Tolerance of expected search.
DataSize: Size, in bytes, of expected data elements to keep.


Returned Value:

VoidPtr: An internal auxiliary structure to be provided to the insertion and searching routines, NULL if error.


See Also:

IritSearch2DInsertElem IritSearch2DFindElem IritSearch2DFree

Keywords:




IritSearch2DInsertElem

(search.c:167)

Prototype:

  void IritSearch2DInsertElem(VoidPtr S2D,
                              IrtRType XKey,
                              IrtRType YKey,
                              VoidPtr Data)


Description:

Insert a new element into the data structure. No test is made if a similar element already exists.

Parameters:

S2D: Internal data structure, aiding search.
XKey, YKey: The new 2D coordinates to insert.
Data: A pointer to the data to save with this 2D coordinate key.


Returned Value:

void


See Also:

IritSearch2DFree IritSearch2DFindElem IritSearch2DInit

Keywords:




IritSetFatalErrorFunc

(irit_ftl.c:30)

Prototype:

  IritFatalMsgFuncType IritSetFatalErrorFunc(IritFatalMsgFuncType FatalMsgFunc)


Description:

Sets the warning function of irit.

Parameters:

FatalMsgFunc: New function to use.


Returned Value:

IritFatalMsgFuncType: Old function reference.


Keywords:

error handling


IritSetInfoMsgFunc

(irit_inf.c:36)

Prototype:

  IritInfoMsgFuncType IritSetInfoMsgFunc(IritInfoMsgFuncType InfoMsgFunc)


Description:

Sets the warning function of irit.

Parameters:

InfoMsgFunc: New function to use.


Returned Value:

IritInfoMsgFuncType: Old function reference.


See Also:

IritSetInfoWMsgFunc

Keywords:

error handling


IritSetInfoWMsgFunc

(irit_inf.c:65)

Prototype:

  IritInfoWMsgFuncType IritSetInfoWMsgFunc(IritInfoWMsgFuncType InfoWMsgFunc)


Description:

Sets the warning function of irit (for wide charachers).

Parameters:

InfoWMsgFunc: New function to use.


Returned Value:

IritInfoWMsgFuncType: Old function reference.


See Also:

IritSetInfoMsgFunc

Keywords:

error handling


IritSetIritParallelExec

(xgeneral.c:938)

Prototype:

  int IritSetIritParallelExec(int Prll)


Description:

Controls parallel execution - enab;ed and maximal number of threads.

Parameters:

Prll: If not zero enables parallel computation, while a positive value controls the maximal number of threads.


Returned Value:

int: old value of Prll flag.


Keywords:

parallel computation


IritSetWarningMsgFunc

(irit_wrn.c:30)

Prototype:

  IritWarningMsgFuncType IritSetWarningMsgFunc(IritWarningMsgFuncType WrnMsgFunc)


Description:

Sets the warning function of irit.

Parameters:

WrnMsgFunc: New function to use.


Returned Value:

IritWarningMsgFuncType: Old function reference.


Keywords:

error handling


IritSleep

(xgeneral.c:158)

Prototype:

  void IritSleep(int MilliSeconds)


Description:

Routine to force a process to sleep.

Parameters:

MilliSeconds: Sleeping time required, in miliseconds.


Returned Value:

void


Keywords:

sleep


IritSolveLowerDiagMatrix

(qrfactor.c:232)

Prototype:

  int IritSolveLowerDiagMatrix(const IrtRType *A,
                               int n,
                               const IrtRType *b,
                               IrtRType *x)


Description:

Solve for Ax = b when R is lower diagonal using forward substitution.

Parameters:

A: The diagonal matrix of size n by n, must be preallocated dynamically by the user.
n: Dimension of matrix A.
b: A vector of size n.
x: The solution vector of size n.


Returned Value:

int: TRUE if Singular, FALSE otheriwse.


See Also:

IritSolveUpperDiagMatrix IritQRFactorization IritQRUnderdetermined SvdLeastSqr

Keywords:

QR factorization linear systems matrices


IritSolveUpperDiagMatrix

(qrfactor.c:188)

Prototype:

  int IritSolveUpperDiagMatrix(const IrtRType *A,
                               int n,
                               const IrtRType *b,
                               IrtRType *x)


Description:

Solve for Ax = b when R is upper diagonal using back substitution.

Parameters:

A: The diagonal matrix of size n by n, must be preallocated dynamically by the user.
n: Dimension of matrix A.
b: A vector of size n.
x: The solution vector of size n.


Returned Value:

int: TRUE if Singular, FALSE otheriwse.


See Also:

IritSolveLowerDiagMatrix IritQRFactorization IritQRUnderdetermined SvdLeastSqr

Keywords:

QR factorization linear systems matrices


IritStrIStr

(xgeneral.c:697)

Prototype:

  const char *IritStrIStr(const char *s, const char *Pattern)


Description:

Routine to search for a Pattern (no regular expression) in s. Returns address in s of first occurrence of Pattern, NULL if non found. Case insensitive.

Parameters:

s: To search for Pattern in.
Pattern: To search in s.


Returned Value:

const char *: Address in s where Pattern was 1st found, NULL otherwise.


Keywords:




IritStrLower

(xgeneral.c:118)

Prototype:

  char *IritStrLower(char *s)


Description:

Routine to convert all upper case chars into lower case, in place.

Parameters:

s: String to convert to lower case.


Returned Value:

char *: Reference to s.


Keywords:

lower case upper case


IritStrUpper

(xgeneral.c:94)

Prototype:

  char *IritStrUpper(char *s)


Description:

Routine to convert all lower case chars into upper case, in place.

Parameters:

s: String to convert to upper case.


Returned Value:

char *: Reference to s.


Keywords:

upper case lower case


IritStrdup

(xgeneral.c:69)

Prototype:

  char *IritStrdup(const char *s)


Description:

Routine to duplicate a string. Exists in some computer environments.

Parameters:

s: String to duplicate.


Returned Value:

char *: Duplicated string.


Keywords:

strdup


IritSubstStr

(xgeneral.c:733)

Prototype:

  char *IritSubstStr(const char *s,
                     const char *Src,
                     const char *Dst,
                     int CaseInsensitive)


Description:

A find (Src) and replace (into Dst) function.

Parameters:

s: Input string.
Src: Pattern to look for in S and substitute with Dst.
Dst: Replacement patter for Src.
CaseInsensitive: TRUE for case insensitive, FALSE for case sensitive.


Returned Value:

char *: new string, allocated dynamically.


Keywords:




IritTextLocaleInit

(config.c:728)

Prototype:

  const char *IritTextLocaleInit(void)


Description:

Initializes the text locale to be used.

Parameters:

None


Returned Value:

const char *: The locale initialized ot NULL if failed.


See Also:

IritWChar2Ascii IritAscii2WChar

Keywords:




IritWChar2Ascii

(config.c:784)

Prototype:

  char *IritWChar2Ascii(const wchar_t *Str)


Description:

Converts a wide (multi-short) string to an Ascii (multi-byte) string.

Parameters:

Str: Input wide (multi-short) string to convert to a multi-byte Ascii string.


Returned Value:

char *: Converted string, allocated dynamically, or NULL if error.


See Also:

IritDspAscii2WChar IritTextLocaleInit

Keywords:




IritWarningMsg

(irit_wrn.c:60)

Prototype:

  void IritWarningMsg(const char *Msg)


Description:

Default trap for IRIT programs for irit warnings. This function just prints the given warning message.

Parameters:

Msg: Error message to print.


Returned Value:

void


See Also:

IritWarningMsgPrintf IritFatalError

Keywords:

warning trap error trap


IritWarningMsgPrintf

(irit2wrn.c:35)

Prototype:

  void IritWarningMsgPrintf(const char *va_alist, ...)


Description:

Default trap for IRIT programs for irit warning errors, printf style.

Parameters:

va_alist: Do "man stdarg".


Returned Value:

void


See Also:

IritWarningMsg IritFatalErrorPrintf

Keywords:

warning trap error trap


IrtDitherBurkes

(dither2.c:427)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherBurkes(IrtImgRGBAPxlStruct *Image,
                                        int XSize,
                                        int YSize,
                                        int NumColors,
                                        const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine Burkes error diffusion algorithm. PAPER: Presentation of the Burkes error filter for use in preparing continuous-tone images for presentation on bi-level devices (Burkes, 1988)

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherFloydSteinberg IrtDitherJarvisJudiceNinke IrtDitherSierraFirst IrtDitherSierraSecond IrtDitherSierraThird IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Burkes


IrtDitherFloydSteinberg

(dither2.c:343)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherFloydSteinberg(
                                        IrtImgRGBAPxlStruct *Image,
                                        int XSize,
                                        int YSize,
                                        int NumColors,
                                        const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine FloydSteinberg error diffusion algorithm. PAPER: An adaptive algorithm for spatial grey scale (Floyd & Steinberg, 1976)

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherJarvisJudiceNinke IrtDitherBurkes IrtDitherSierraFirst IrtDitherSierraSecond IrtDitherSierraThird IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Floyd-Steinberg


IrtDitherJarvisJudiceNinke

(dither2.c:385)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherJarvisJudiceNinke(
                                        IrtImgRGBAPxlStruct *Image,
                                        int XSize,
                                        int YSize,
                                        int NumColors,
                                        const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine Jarvis-Judice-Ninke ED algorithm. PAPER: A Survey of Techniques for the Display of Continuous Tone Pictures on Bi-level Displays (Jarvis, Judice and Ninke, 1976)

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherFloydSteinberg IrtDitherBurkes IrtDitherSierraFirst IrtDitherSierraSecond IrtDitherSierraThird IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Jarvis-Judice-Ninke


IrtDitherSierraFirst

(dither2.c:467)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherSierraFirst(
                                       IrtImgRGBAPxlStruct *Image,
                                       int XSize,
                                       int YSize,
                                       int NumColors,
                                       const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine Sierra First error diffusion algorithm. PAPER: Frankie Sierra, in LIB 17 (Developer's Den), CIS Graphics Support Forum, 1989.

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherFloydSteinberg IrtDitherJarvisJudiceNinke IrtDitherBurkes IrtDitherSierraSecond IrtDitherSierraThird IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Sierra


IrtDitherSierraSecond

(dither2.c:509)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherSierraSecond(
                                        IrtImgRGBAPxlStruct *Image,
                                        int XSize,
                                        int YSize,
                                        int NumColors,
                                        const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine Sierra Second error diffusion algorithm. PAPER: Frankie Sierra, in LIB 17 (Developer's Den), CIS Graphics Support Forum, 1989.

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherFloydSteinberg IrtDitherJarvisJudiceNinke IrtDitherBurkes IrtDitherSierraFirst IrtDitherSierraThird IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Sierra


IrtDitherSierraThird

(dither2.c:549)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherSierraThird(
                                        IrtImgRGBAPxlStruct *Image,
                                        int XSize,
                                        int YSize,
                                        int NumColors,
                                        const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine Sierra Third error diffusion algorithm. PAPER: Frankie Sierra, in LIB 17 (Developer's Den), CIS Graphics Support Forum, 1989

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherFloydSteinberg IrtDitherJarvisJudiceNinke IrtDitherBurkes IrtDitherSierraFirst IrtDitherSierraSecond IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Sierra


IrtDitherStucki

(dither2.c:300)

Prototype:

  IrtImgRGBAPxlStruct *IrtDitherStucki(IrtImgRGBAPxlStruct *Image,
                                       int XSize,
                                       int YSize,
                                       int NumColors,
                                       const IrtImgRGBAPxlStruct *DitherColors)


Description:

A function implementing serpentine Stucki error diffusion algorithm. PAPER: Mecca-a multiple-error correcting computation algorithm for bilevel image hardcopy reproduction (Stucki, 1981)

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherFloydSteinberg IrtDitherJarvisJudiceNinke IrtDitherBurkes IrtDitherSierraFirst IrtDitherSierraSecond IrtDitherSierraThird IrtDitherSerpentineSimpleAlgorithm IrtImgDitherImageClr

Keywords:

Dithering Dither Error Diffusion Stucki.


IrtImgCnvrtRGB2RGBA

(writimag.c:406)

Prototype:

  IrtImgRGBAPxlStruct *IrtImgCnvrtRGB2RGBA(const IrtImgPixelStruct *RGBImg,
                                           int XSize,
                                           int YSize)


Description:

Maps an RGB image to RGBA image with a full alpha coverage.

Parameters:

RGBImg: Input RGB image.
XSize, YSize: imensions of input RGB image.


Returned Value:

IrtImgRGBAPxlStruct *: Mapped image into RGBA space.


See Also:



Keywords:




IrtImgDitherImage

(dither.c:524)

Prototype:

  IrtImgRGBAPxlStruct *IrtImgDitherImage(IrtImgRGBAPxlStruct *Image,
                                         int XSize,
                                         int YSize,
                                         int DitherSize,
                                         IrtBType ErrorDiffusion,
                                         int NumColors,
                                         const IrtImgRGBAPxlStruct *DitherColors)


Description:

A wrapper routine to read an image from a file, dither it and save into a file the dithered image.

Parameters:

Image: To dither.
XSize, YSize: Size of the image to dither.
DitherSize: Dithering matrices size: 2, 3, or 4.
ErrorDiffusion: RUE, to also diffuse the error in the image.
NumColors: Optional set of colors (in DitherColors) to color dither the image. 0 to ignore (and do B&W dithering).
DitherColors: Optional set of NumDitherColors colors to color-dither. NULL to ignore (and do B&W dithering).


Returned Value:

IrtImgRGBAPxlStruct *: Dithered image.


See Also:

IrtImgDitherImage2 IrtImgDitherImageBW IrtImgDitherImageClr IrtImgDitherImageBW2

Keywords:




IrtImgDitherImage2

(dither.c:571)

Prototype:

  int IrtImgDitherImage2(const char *InputImage,
                         const char *OutputImage,
                         int DitherSize,
                         IrtBType ErrorDiffusion,
                         int NumColors,
                         const IrtImgRGBAPxlStruct *DitherColors)


Description:

A wrapper routine to read an image from a file, dither it and save into a file the dithered image.

Parameters:

InputImage: To dither.
OutputImage: Dithered image.
DitherSize: Dithering matrices size: 2, 3, or 4.
ErrorDiffusion: RUE, to also diffuse the error in the image.
NumColors: Optional set of colors (in DitherColors) to color dither the image. 0 to ignore (and do B&W dithering).
DitherColors: Optional set of NumDitherColors colors to color-dither. NULL to ignore (and do B&W dithering).


Returned Value:

int: TRUE if successful, FALSE if failed.


See Also:

IrtImgDitherImage IrtImgDitherImageBW IrtImgDitherImageBW2 IrtImgDitherImageClr

Keywords:




IrtImgDitherImage3

(dither2.c:653)

Prototype:

  int IrtImgDitherImage3(const char *InputImage,
                         const char *OutputImage,
                         int NumColors,
                         const IrtImgRGBAPxlStruct *DitherColors,
                         IrtImgImageDitherType DitherMethod)


Description:

A wrapper routine to read an image from a file, dither it and save into a file the dithered image.

Parameters:

InputImage: To dither.
OutputImage: Dithered image.
NumColors: Optional set of colors (in DitherColors) to color dither the image. 0 to ignore (and do B&W dithering).
DitherColors: Optional set of NumDitherColors colors to color-dither. NULL to ignore (and do B&W dithering).
DitherMethod: Dithering matrix to use.


Returned Value:

int: TRUE if successful, FALSE if failed.


See Also:

IrtImgDitherImage IrtImgDitherImageBW IrtImgDitherImageBW2 IrtImgDitherImageClr IrtImgDitherImageClr3

Keywords:




IrtImgDitherImageBW

(dither.c:187)

Prototype:

  IrtBType *IrtImgDitherImageBW(IrtImgRGBAPxlStruct *Image,
                                int XSize,
                                int YSize,
                                int DitherSize,
                                IrtBType ErrorDiffusion)


Description:

Routine to dither a given Image of RGBA pixels using dithering matrices of size DitherSize to B&W. Alpha is duplicated.

Parameters:

Image: To dither.
XSize, YSize: Size of the image to dither.
DitherSize: Dithering matrices size: 2, 3, or 4.
ErrorDiffusion: RUE, to also diffuse the error in the image.


Returned Value:

IrtBType *: The dithered B&W image of size X/YSize * DitherSize.


See Also:

IrtImgDitherImage IrtImgDitherImage2 IrtImgDitherImageClr IrtImgDitherImageBW1 IrtImgDitherImageBW2

Keywords:




IrtImgDitherImageBW1

(dither.c:257)

Prototype:

  IrtBType *IrtImgDitherImageBW1(IrtImgPixelStruct *Image,
                                 int XSize,
                                 int YSize,
                                 int DitherSize,
                                 IrtBType ErrorDiffusion)


Description:

Routine to dither a given Image of RGB pixels using dithering matrices of size DitherSize to B&W.

Parameters:

Image: To dither.
XSize, YSize: Size of the image to dither.
DitherSize: Dithering matrices size: 2, 3, or 4.
ErrorDiffusion: RUE, to also diffuse the error in the image.


Returned Value:

IrtBType *: The dithered B&W image of size X/YSize * DitherSize.


See Also:

IrtImgDitherImage IrtImgDitherImage2 IrtImgDitherImageBW IrtImgDitherImageBW2 IrtImgDitherImageClr

Keywords:




IrtImgDitherImageBW2

(dither.c:296)

Prototype:

  IrtImgRGBAPxlStruct *IrtImgDitherImageBW2(IrtImgRGBAPxlStruct *Image,
                                            int XSize,
                                            int YSize,
                                            int DitherSize,
                                            IrtBType ErrorDiffusion)


Description:

Routine to dither a given Image of RGB pixels using dithering matrices of size DitherSize to B&W.

Parameters:

Image: To dither.
XSize, YSize: Size of the image to dither.
DitherSize: Dithering matrices size: 2, 3, or 4.
ErrorDiffusion: RUE, to also diffuse the error in the image.


Returned Value:

IrtImgRGBAPxlStruct *: Dithered B&W image of size X/YSize * DitherSize.


See Also:

IrtImgDitherImage IrtImgDitherImage2 IrtImgDitherImageClr IrtImgDitherImageBW IrtImgDitherImageBW1

Keywords:




IrtImgDitherImageClr

(dither.c:466)

Prototype:

  IrtImgRGBAPxlStruct *IrtImgDitherImageClr(
                                         IrtImgRGBAPxlStruct *Image,
                                         int XSize,
                                         int YSize,
                                         int DitherSize,
                                         IrtBType ErrorDiffusion,
                                         int NumColors,
                                         const IrtImgRGBAPxlStruct *DitherColors)


Description:

Routine to dither a given Image of RGBA pixels using dithering matrices of size DitherSize to colors. Alpha is duplicated.

Parameters:

Image: To dither.
XSize, YSize: Size of the image to dither.
DitherSize: Dithering matrices size: 2, 3, or 4.
ErrorDiffusion: RUE, to also diffuse the error in the image.
NumColors: Optional set of colors (in DitherColors) to color dither the image.
DitherColors: Optional set of NumDitherColors colors to color-dither.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered colored image of size X/YSize * DitherSize.


See Also:

IrtImgDitherImage IrtImgDitherImage2 IrtImgDitherImageBW IrtImgDitherImageBW2

Keywords:




IrtImgDitherImageClr3

(dither2.c:589)

Prototype:

  IrtImgRGBAPxlStruct *IrtImgDitherImageClr3(
                                        IrtImgRGBAPxlStruct *Image,
                                        int XSize,
                                        int YSize,
                                        int NumColors,
                                        const IrtImgRGBAPxlStruct *DitherColors,
                                        IrtImgImageDitherType DitherMethod)


Description:

A function implementing the chosen error diffusion algorithm, I chose to use Stucki algorithm.

Parameters:

Image: The image to diffuse.
XSize: The width of the image.
YSize: The height of the image
NumColors: The number of colors in the palette.
DitherColors: The color palette to dither into.
DitherMethod: Dithering matrix to use.


Returned Value:

IrtImgRGBAPxlStruct *: The dithered output image.


See Also:

IrtDitherStucki IrtDitherFloydSteinberg IrtDitherJarvisJudiceNinke IrtDitherBurkes IrtDitherSierraFirst IrtDitherSierraSecond IrtDitherSierraThird IritDitherSerpentineSimpleAlgorithm IrtImgDitherImage3

Keywords:

Dithering Dither Error Diffusion


IrtImgDitherImageClrBatch

(dither2.c:715)

Prototype:

  void IrtImgDitherImageClrBatch(const char **ImagePaths,
                                 int NumImages,
                                 const char *OutputFolder,
                                 int NumColors,
                                 const IrtImgRGBAPxlStruct *DitherColors,
                                 IrtImgImageDitherType DitherMethod)


Description:

Applies dithering to a given set of images, in parallel. We assume all parameters to be valid, and the files and folders to exist. We also assume the images to have 4 channels per pixel.

Parameters:

ImagePaths: an array of the image file paths that we want to dither.
NumImages: The number of the images we want to dither.
OutputFolder: he folder path to put the output images in.
NumColors: The number of colors in the palette.
DitherColors: he color palette to dither into.
DitherMethod: he dithering function to use.


Returned Value:

void


See Also:

IrtImgDitherImageClr.

Keywords:

Dither Batch Parallel Layered Dithering.


IrtImgFlipHorizontallyImage

(editimag.c:134)

Prototype:

  IrtImgPixelStruct *IrtImgFlipHorizontallyImage(const IrtImgPixelStruct *Img,
                                                 int MaxX,
                                                 int MaxY,
                                                 int Alpha)


Description:

Reads one image in from a file named ImageFileName. The image is returned as a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3.

Parameters:

Img: Image to flip its X and Y axes.
MaxX: Maximum X of Img image.
MaxY: Maximum Y of Img image.
Alpha: RUE if this image has alpha and is actually RGBARGBA...


Returned Value:

IrtImgPixelStruct *: Flipped image.


See Also:

IrtImgNegateImage IrtImgScaleImage

Keywords:




IrtImgFlipVerticallyImage

(editimag.c:193)

Prototype:

  IrtImgPixelStruct *IrtImgFlipVerticallyImage(const IrtImgPixelStruct *Img,
                                               int MaxX,
                                               int MaxY,
                                               int Alpha)


Description:

Reads one image in from a file named ImageFileName. The image is returned as a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3.

Parameters:

Img: Image to flip its X and Y axes.
MaxX: Maximum X of Img image.
MaxY: Maximum Y of Img image.
Alpha: RUE if this image has alpha and is actually RGBARGBA...


Returned Value:

IrtImgPixelStruct *: Flipped image.


See Also:

IrtImgNegateImage IrtImgScaleImage

Keywords:




IrtImgFlipXYImage

(editimag.c:36)

Prototype:

  IrtImgPixelStruct *IrtImgFlipXYImage(const IrtImgPixelStruct *Img,
                                       int MaxX,
                                       int MaxY,
                                       int Alpha)


Description:

Reads one image in from a file named ImageFileName. The image is returned as a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3.

Parameters:

Img: Image to flip its X and Y axes.
MaxX: Maximum X of Img image.
MaxY: Maximum Y of Img image.
Alpha: RUE if this image has alpha and is actually RGBARGBA...


Returned Value:

IrtImgPixelStruct *: Flipped image.


See Also:

IrtImgNegateImage IrtImgScaleImage

Keywords:




IrtImgGetImageSize

(readimag.c:447)

Prototype:

  int IrtImgGetImageSize(const char *ImageFileName,
                         int *Width,
                         int *Height)


Description:

Reads the dimensions of one image in from a file named ImageFileName.

Parameters:

ImageFileName: Name of image to read.
Width: The width of the image.
Height: The height of the image.


Returned Value:

int: TRUE, if loaded successfully. Otherwise FALSE.


Keywords:




IrtImgNegateImage

(editimag.c:92)

Prototype:

  IrtImgPixelStruct *IrtImgNegateImage(const IrtImgPixelStruct *InImage,
                                       int MaxX,
                                       int MaxY)


Description:

Negate an image.

Parameters:

InImage: A vector of IrtImgPixelStruct of size (MaxX+1) * (MaxY+1).
MaxX: Maximum X of input image.
MaxY: Maximum Y of input image.


Returned Value:

IrtImgPixelStruct *: The scaled image as vector of RGBRGB (or RGBARGBA).


See Also:

IrtImgFlipXYImage IrtImgScaleImage

Keywords:




IrtImgParsePTextureString

(readimag.c:1161)

Prototype:

  int IrtImgParsePTextureString(const char *PTexture,
                                char *FName,
                                IrtRType *Scale,
                                int *Flip,
                                int *NewImage)


Description:

Parses the string of the "ptexture" attribute. "ImageName {, S X Y {Z}} {, F} {, N}" where 1. X, Y, and possibly Z are scaling factors of how many times the image should fit into the object, 2. 'F' optionally request to flip X and Y axes of the image. 3. 'N' optionally forces reload the image as a New image, even if an image by this exact same name was already loaded and cached.

Parameters:

PTexture: The string of the "ptexture" attribute.
FName: The texture file name will be placed here.
Scale: The scaling vector in XYZ or just XY if Z = IRIT_INFNTY.
Flip: If Image flipping was requested.
NewImage: if a new image of same name - replace in cache.


Returned Value:

int: TRUE if parsed succesfully, FALSE otherwise.


Keywords:




IrtImgParsePTextureString2

(readimag.c:1078)

Prototype:

  int IrtImgParsePTextureString2(const char *PTexture,
                                 char *FName,
                                 IrtRType *Scale,
                                 int *Flip,
                                 int *NewImage,
                                 int *FlipHorizontally,
                                 int *FlipVertically)


Description:

Parses the string of the "ptexture" attribute. "ImageName {, S X Y {Z}} {, F} {, N}, {, H}, {, V}" where 1. X, Y, and possibly Z are scaling factors of how many times the image should fit into the object, 2. 'F' optionally request to flip X and Y axes of the image. 3. 'N' optionally forces reload the image as a New image, even if an image by this exact same name was already loaded and cached. 4. 'H' optionally request to filp the image pixels horizontally. 5. 'V' optionally request to flip the image pixels vertically

Parameters:

PTexture: The string of the "ptexture" attribute.
FName: The texture file name will be placed here.
Scale: The scaling vector in XYZ or just XY if Z = IRIT_INFNTY.
Flip: If Image flipping was requested.
NewImage: if a new image of same name - replace in cache.
FlipHorizontally: If horizontal Image flipping was requested.
FlipVertically: If vertical Image flipping was requested.


Returned Value:

int: TRUE if parsed succesfully, FALSE otherwise.


Keywords:




IrtImgReadClrCache

(readimag.c:367)

Prototype:

  void IrtImgReadClrCache(void)


Description:

Clears the cache of read images.

Parameters:

None


Returned Value:

void


See Also:

IrtImgReadImage2 IrtImgReadClrOneImage IrtImgReadUpdateCache

Keywords:




IrtImgReadClrOneImage

(readimag.c:396)

Prototype:

  void IrtImgReadClrOneImage(const char *ImageName)


Description:

Removes one image, by name from the cache of images.

Parameters:

ImageName: Name of image to remove.


Returned Value:

void


See Also:

IrtImgReadImage2 IrtImgReadClrCache

Keywords:




IrtImgReadImage

(readimag.c:131)

Prototype:

  IrtImgPixelStruct *IrtImgReadImage(const char *ImageFileName,
                                     int *MaxX,
                                     int *MaxY,
                                     int *Alpha)


Description:

Reads one image in from a file named ImageFileName. The image is returned as a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3.

Parameters:

ImageFileName: Name of image to read.
MaxX: Maximum X of read image is saved here.
MaxY: Maximum Y of read image is saved here.
Alpha: If TRUE, will attempt to load alpha channel if has any and will return TRUE if successful in loading it.


Returned Value:

IrtImgPixelStruct *: A vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3 or NULL if failed. If however, Alpha is requested and found RGBARGBA... is returned as IrtImgRGBAPxlStruct.


See Also:

IrtImgReadImage2 IrtImgReadImage3 IrtImgReadImageXAlign

Keywords:




IrtImgReadImage2

(readimag.c:205)

Prototype:

  IrtImgPixelStruct *IrtImgReadImage2(const char *ImageFileName,
                                      int *MaxX,
                                      int *MaxY,
                                      int *Alpha)


Description:

Same as IrtImgReadImage2 but if a name of an image repeats itself, the image is read only once.

Parameters:

ImageFileName: Name of image to read.
MaxX: Maximum X of read image is saved here.
MaxY: Maximum Y of read image is saved here.
Alpha: If TRUE, will attempt to load alpha channel if has any and will return TRUE if successful in loading it.


Returned Value:

IrtImgPixelStruct *: A vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3 or NULL if failed. If however, Alpha is requested and found RGBARGBA... is returned as IrtImgRGBAPxlStruct.


See Also:

IrtImgReadImage IrtImgReadImage3 IrtImgReadClrCache IrtImgReadUpdateCache

Keywords:




IrtImgReadImage3

(readimag.c:268)

Prototype:

  IrtImgPixelStruct *IrtImgReadImage3(const char *ImageFileName,
                                      int *MaxX,
                                      int *MaxY,
                                      int *Alpha)


Description:

Same as IrtImgReadImage2 but if a name of an image repeats itself, the new image replaces the old one.

Parameters:

ImageFileName: Name of image to read.
MaxX: Maximum X of read image is saved here.
MaxY: Maximum Y of read image is saved here.
Alpha: If TRUE, will attempt to load alpha channel if has any and will return TRUE if successful in loading it.


Returned Value:

IrtImgPixelStruct *: A vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3 or NULL if failed. If however, Alpha is requested and found RGBARGBA... is returned as IrtImgRGBAPxlStruct.


See Also:

IrtImgReadImage IrtImgReadImage2 IrtImgReadClrCache IrtImgReadUpdateCache

Keywords:




IrtImgReadImageXAlign

(readimag.c:92)

Prototype:

  int IrtImgReadImageXAlign(int Alignment)


Description:

Sets an alignment of the width of the image. For example, OGL requires images to have width aligned on 4-bytes words (alignment 4).

Parameters:

Alignment: Word size alignment required.


Returned Value:

int: old alignment.


See Also:

IrtImgReadImage IritImgWriteImg

Keywords:




IrtImgReadUpdateCache

(readimag.c:330)

Prototype:

  int IrtImgReadUpdateCache(const char *ImageFileName,
                            int MaxX,
                            int MaxY,
                            int Alpha,
                            IrtBType *Image)


Description:

Update the cached image with the given one, in place, if found.

Parameters:

ImageFileName: ame of image to update.
MaxX: Maximum X of updated image.
MaxY: Maximum Y of updated image.
Alpha: TRUE if image has alpha channel, in which case Image is a sequence of RGBA. FALSE if only RGB is given in Image.
Image: The new image to replace old one with.


Returned Value:

int: TRUE if image was found and updated. FALSE otherwise.


See Also:

IrtImgReadImage2 IrtImgReadImage3 IrtImgReadClrOneImage IrtImgReadClrCache

Keywords:




IrtImgWriteCloseFile

(writimag.c:369)

Prototype:

  void IrtImgWriteCloseFile(MiscWriteGenInfoStruct *GI)


Description:

Closes output image file.

Parameters:

GI: General info of the image write module.


Returned Value:

void


Keywords:

output image


IrtImgWriteGetType

(writimag.c:225)

Prototype:

  IrtImgImageType IrtImgWriteGetType(const char *ImageType)


Description:

Gets image type.

Parameters:

ImageType: A string describing the image type.


Returned Value:

IrtImgImageType: Returns the detected type.


Keywords:




IrtImgWriteOpenFile

(writimag.c:279)

Prototype:

  MiscWriteGenInfoStruct *IrtImgWriteOpenFile(const char **argv,
                                              const char *FName,
                                              IrtImgImageType ImageType,
                                              int Alpha,
                                              int XSize,
                                              int YSize)


Description:

Opens output image file.

Parameters:

argv: Pointer to the name of this program.
FName: Filename to open, or NULL for stdout.
ImageType: Type of image to open.
Alpha: Do we have an alpha channel.
XSize: X dimension of the image.
YSize: Y dimension of the image.


Returned Value:

MiscWriteGenInfoStruct *: A handle on local image info if successful, NULL otherwise.


Keywords:

output image


IrtImgWritePutLine

(writimag.c:339)

Prototype:

  void IrtImgWritePutLine(MiscWriteGenInfoStruct *GI,
                          IrtBType *Alpha,
                          IrtImgPixelStruct *Pixels)


Description:

Outputs given line of color pixels and alpha correction values to the ouput image file.

Parameters:

GI: General info of the image write module.
Alpha: Array of alpha values.
Pixels: Array of color pixels.


Returned Value:

void


Keywords:

output image


IrtMovieParsePMovieString

(readmovi.c:871)

Prototype:

  int IrtMovieParsePMovieString(const char *PMovie,
                                char *FName,
                                IrtRType *Scale,
                                int *NewImage,
                                int *Flip,
                                int *Restart,
                                IrtRType *TimeSetup,
                                int *FlipHorizontally,
                                int *FlipVertically)


Description:

Parses the string of the "pmovie" attribute. Can be "MovieName {, S X Y {Z}} {,F} {,R} {, T=tmin,tmax} where 1. X, Y, and possibly Z are scaling factors of how many times the image should fit into the object, 2. F optionally request to flip X and Y axes of the image. 3. R optionally request to restart the movie once it gets to the end. 4. T=tmin,tmax sets the time range of the movie.

Parameters:

PMovie: The string of the "pmovie" attribute.
FName: The texture file name will be placed here.
Scale: The scaling vector in XYZ or just XY if Z = IRIT_INFNTY.
NewImage: Force read an image even if in cache as the file is new?
Flip: If Image flipping was requested.
Restart: TRUE to restart the movie onces it ends.
TimeSetup: A vector of 3 slots to hold (tmin, tmax, dt) if specified or all are zero if not specified.
FlipHorizontally: If horizontal Image flipping was requested.
FlipVertically: If vertical Image flipping was requested.


Returned Value:

int: TRUE if parsed successfully, FALSE otherwise.


Keywords:




IrtMovieReadClrCache

(readmovi.c:366)

Prototype:

  void IrtMovieReadClrCache(void)


Description:

Clears the cache of read images.

Parameters:

None


Returned Value:

void


See Also:

IrtMovieReadMovie2

Keywords:




IrtMovieReadMovie

(readmovi.c:115)

Prototype:

  IrtImgPixelStruct **IrtMovieReadMovie(const char *MovieFileName,
                                        int *MaxX,
                                        int *MaxY,
                                        int *Alpha)


Description:

Reads a movie in from a file named MovieFileName. The movies are returned as a vector of images: vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3.

Parameters:

MovieFileName: Name of movie to read.
MaxX: Maximum X of read image is saved here.
MaxY: Maximum Y of read image is saved here.
Alpha: If TRUE, will attempt to load alpha channel if has any and will return TRUE if successful in loading it.


Returned Value:

IrtImgPixelStruct **: A NULL terminated vector of images. Each image is itself a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3 or NULL if failed. If however, Alpha is requested and found RGBARGBA... is returned as IrtImgRGBAPxlStruct.


See Also:

IrtMovieReadMovie2 IrtMovieReadMovie3 IrtImgReadMovieXAlign

Keywords:




IrtMovieReadMovie2

(readmovi.c:181)

Prototype:

  IrtImgPixelStruct **IrtMovieReadMovie2(const char *MovieFileName,
                                         int *MaxX,
                                         int *MaxY,
                                         int *Alpha)


Description:

Same as IrtMovieReadMovie but if a name of a movie repeats itself, the movie is read only once.

Parameters:

MovieFileName: Name of movie to read.
MaxX: Maximum X of read image is saved here.
MaxY: Maximum Y of read image is saved here.
Alpha: If TRUE, will attempt to load alpha channel if has any and will return TRUE if successful in loading it.


Returned Value:

IrtImgPixelStruct **: A NULL terminated vector of images. Each image is itself a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3 or NULL if failed. If however, Alpha is requested and found RGBARGBA... is returned as IrtImgRGBAPxlStruct.


See Also:

IrtMovieReadMovie IrtImgReadMovie3 IrtMovieReadClrCache

Keywords:




IrtMovieReadMovie3

(readmovi.c:242)

Prototype:

  IrtImgPixelStruct **IrtMovieReadMovie3(const char *MovieFileName,
                                         int *MaxX,
                                         int *MaxY,
                                         int *Alpha)


Description:

Same as IrtMovieReadMovie2 but if a name of a movie repeats itself, the new movie replaces the old one.

Parameters:

MovieFileName: Name of movie to read.
MaxX: Maximum X of read image is saved here.
MaxY: Maximum Y of read image is saved here.
Alpha: If TRUE, will attempt to load alpha channel if has any and will return TRUE if successful in loading it.


Returned Value:

IrtImgPixelStruct **: A NULL terminated vector of images. Each image is itself a vector of RGBRGB... of size (MaxX+1) * (MaxY+1) * 3 or NULL if failed. If however, Alpha is requested and found RGBARGBA... is returned as IrtImgRGBAPxlStruct.


See Also:

IrtMovieReadMovie IrtImgReadMovie2 IrtMovieReadClrCache

Keywords:




Mat2x2Determinant

(gnrl_mat.c:665)

Prototype:

  IrtRType Mat2x2Determinant(IrtRType a11,
                             IrtRType a12,
                             IrtRType a21,
                             IrtRType a22)


Description:

Computes a 2x2 determinant.

Parameters:

a11, a12, a21, a22: Coefficients of the 2x2 matrix.


Returned Value:

IrtRType: The determinant.


Keywords:




Mat3x3Determinant

(gnrl_mat.c:691)

Prototype:

  IrtRType Mat3x3Determinant(IrtRType a11,
                             IrtRType a12,
                             IrtRType a13,
                             IrtRType a21,
                             IrtRType a22,
                             IrtRType a23,
                             IrtRType a31,
                             IrtRType a32,
                             IrtRType a33)


Description:

Computes 3x3 determinant.

Parameters:

a11, a12, a13, a21, a22, a23, a31, a32, a33: oefficients of 3x3 matrix.


Returned Value:

IrtRType: The determinant.


Keywords:




MatAddTwo4by4

(hmgn_mat.c:371)

Prototype:

  void MatAddTwo4by4(IrtHmgnMatType MatRes,
                     IrtHmgnMatType Mat1,
                     IrtHmgnMatType Mat2)


Description:

Routine to add two 4by4 matrices. MatRes may be one of Mat1 or Mat2.

Parameters:

MatRes: Result of matrix addition.
Mat1, Mat2: The two operand of the matrix addition.


Returned Value:

void


See Also:

MatGnrlAddTwo4by4 MatSubTwo4by4 MatMultTwo4by4

Keywords:

transformations matrix addition


MatDeterminantMatrix

(hmgn_mat.c:601)

Prototype:

  IrtRType MatDeterminantMatrix(IrtHmgnMatType Mat)


Description:

Computes the determinant of a 4 by 4 matrix.

Parameters:

Mat: Input matrix.


Returned Value:

IrtRType: Determinant of Mat.


Keywords:

determinant


MatGenMatRotX

(hmgn_mat.c:209)

Prototype:

  void MatGenMatRotX(IrtRType CosTeta, IrtRType SinTeta, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Rotate around the X axis by Teta, given the sin and cosine of Teta

Parameters:

CosTeta, SinTeta: Amount of rotation, given as sine and cosine of Teta.
Mat: Matrix to initialize as a rotation matrix.


Returned Value:

void


Keywords:

transformations rotation


MatGenMatRotX1

(hmgn_mat.c:185)

Prototype:

  void MatGenMatRotX1(IrtRType Teta, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Rotate around the X axis by Teta radians.

Parameters:

Teta: Amount of rotation, in radians.
Mat: Matrix to initialize as a rotation matrix.


Returned Value:

void


Keywords:

transformations rotation


MatGenMatRotY

(hmgn_mat.c:257)

Prototype:

  void MatGenMatRotY(IrtRType CosTeta, IrtRType SinTeta, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Rotate around the Y axis by Teta, given the sin and cosine of Teta

Parameters:

CosTeta, SinTeta: Amount of rotation, given as sine and cosine of Teta.
Mat: Matrix to initialize as a rotation matrix.


Returned Value:

void


Keywords:

transformations rotation


MatGenMatRotY1

(hmgn_mat.c:233)

Prototype:

  void MatGenMatRotY1(IrtRType Teta, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Rotate around the Y axis by Teta radians.

Parameters:

Teta: Amount of rotation, in radians.
Mat: Matrix to initialize as a rotation matrix.


Returned Value:

void


Keywords:

transformations rotation


MatGenMatRotZ

(hmgn_mat.c:305)

Prototype:

  void MatGenMatRotZ(IrtRType CosTeta, IrtRType SinTeta, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Rotate around the Z axis by Teta, given the sin and cosine of Teta

Parameters:

CosTeta, SinTeta: Amount of rotation, given as sine and cosine of Teta.
Mat: Matrix to initialize as a rotation matrix.


Returned Value:

void


Keywords:

transformations rotation


MatGenMatRotZ1

(hmgn_mat.c:281)

Prototype:

  void MatGenMatRotZ1(IrtRType Teta, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Rotate around the Z axis by Teta radians.

Parameters:

Teta: Amount of rotation, in radians.
Mat: Matrix to initialize as a rotation matrix.


Returned Value:

void


Keywords:

transformations rotation


MatGenMatScale

(hmgn_mat.c:143)

Prototype:

  void MatGenMatScale(IrtRType Sx, IrtRType Sy, IrtRType Sz, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to Scale x, y, z in Sx, Sy, Sz amounts.

Parameters:

Sx, Sy, Sz: Scaling factors requested.
Mat: Matrix to initialize as a scaling matrix.


Returned Value:

void


Keywords:

transformations scaling


MatGenMatTrans

(hmgn_mat.c:121)

Prototype:

  void MatGenMatTrans(IrtRType Tx, IrtRType Ty, IrtRType Tz, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to translate in Tx, Ty, Tz amounts.

Parameters:

Tx, Ty, Tz: Translational amounts requested.
Mat: Matrix to initialize as a translation matrix.


Returned Value:

void


Keywords:

transformations translation


MatGenMatUnifScale

(hmgn_mat.c:165)

Prototype:

  void MatGenMatUnifScale(IrtRType Scale, IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 matrix to uniformly scale Scale amount.

Parameters:

Scale: Uniform scaling factor requested.
Mat: Matrix to initialize as a scaling matrix.


Returned Value:

void


Keywords:

transformations scaling


MatGenUnitMat

(hmgn_mat.c:31)

Prototype:

  void MatGenUnitMat(IrtHmgnMatType Mat)


Description:

Routine to generate a 4*4 unit matrix:

Parameters:

Mat: Matrix to initialize as a unit matrix.


Returned Value:

void


See Also:

MatGnrlUnitMat

Keywords:

transformations unit matrix


MatGnrlAddTwoMat

(gnrl_mat.c:164)

Prototype:

  void MatGnrlAddTwoMat(IrtGnrlMatType MatRes,
                        IrtGnrlMatType Mat1,
                        IrtGnrlMatType Mat2,
                        int n)


Description:

Routine to add two general matrices. MatRes may be one of Mat1 or Mat2.

Parameters:

MatRes: Result of matrix addition.
Mat1, Mat2: The two operand of the matrix addition.
n: Size of matrices MatRes/Mat1/Mat2.


Returned Value:

void


See Also:

MatAddTwoMat MatGntlMultTwomat MatGnrlSubTwoMat MatGnrlScaleMat

Keywords:

transformations matrix addition


MatGnrlCopy

(gnrl_mat.c:29)

Prototype:

  void MatGnrlCopy(IrtGnrlMatType Dst, IrtGnrlMatType Src, int n)


Description:

Routine to copy a (n x n) matrix:

Parameters:

Dst: Matrix to copy to.
Src: Matrix to copy from.
n: Size of matrix Mat.


Returned Value:

void


Keywords:

transformations


MatGnrlDetMatrix

(gnrl_mat.c:480)

Prototype:

  IrtRType MatGnrlDetMatrix(IrtGnrlMatType M, int n)


Description:

Given a general matrix, computes its determinant, recorsively. Note this process is exponential as a function of n (as you might expect) so use it with care (for small matrices only).

Parameters:

M: The square matrix of size (n x n) to compute its determinant.
n: Size of the Matrix.


Returned Value:

IrtRType: Value of the determinant.


See Also:

MatGnrlInverseMatrix MatGnrlTranspMatrix

Keywords:




MatGnrlInverseMatrix

(gnrl_mat.c:340)

Prototype:

  int MatGnrlInverseMatrix(IrtGnrlMatType M, IrtGnrlMatType InvM, int n)


Description:

Routine to compute the INVERSE of a given matrix M which is not modified. Return TRUE if inverted matrix (InvM) do exists.

Parameters:

M: Original matrix to invert.
InvM: Inverted matrix will be placed here.
n: Sizes of matrices M/InvM.


Returned Value:

int: TRUE if inverse exists, FALSE otherwise.


See Also:

MatInverseMatrix MatGnrlTranspMatrix

Keywords:

transformations matrix inverse


MatGnrlIsUnitMatrix

(gnrl_mat.c:83)

Prototype:

  int MatGnrlIsUnitMatrix(IrtGnrlMatType Mat, IrtRType Eps, int n)


Description:

Test if the given matrix is a unit matrix to within Eps.

Parameters:

Mat: Matrix to test if a unit matrix.
Eps: Epsilon of test.
n: Size of matrix Mat.


Returned Value:

int: TRUE if unit matrix to within epsilon, FALSE otherwise.


See Also:

MatGnrlUnitMat MatIsUnitMatrix

Keywords:




MatGnrlMultTwoMat

(gnrl_mat.c:119)

Prototype:

  void MatGnrlMultTwoMat(IrtGnrlMatType MatRes,
                         IrtGnrlMatType Mat1,
                         IrtGnrlMatType Mat2,
                         int n)


Description:

Routine to multiply two general matrices. MatRes may be one of Mat1 or Mat2 - it is only updated in the end.

Parameters:

MatRes: Result of matrix product.
Mat1, Mat2: The two operand of the matrix product.
n: Size of matrices MatRes/Mat1/Mat2.


Returned Value:

void


See Also:

MatMultTwoMat MatGnrlAddTwoMat MatGnrlSubTwoMat

Keywords:

transformations matrix product


MatGnrlMultVecbyMat

(gnrl_mat.c:256)

Prototype:

  void MatGnrlMultVecbyMat(IrtVecGnrlType VecRes,
                           IrtGnrlMatType Mat,
                           IrtVecGnrlType Vec,
                           int n)


Description:

Routine to mult a vector of len n by a general matrix of size (n x n), as VecRes = Mat * Vec.

Parameters:

VecRes: Result of vector - matrix product. Can be Vec.
Mat: General matrix.
Vec: Vector to transform using Matrix.
n: Sizes of vectors Vec/VecRes and of matrix Mat.


Returned Value:

void


See Also:

MatMultVecby4by4 MatGnrlMultVecbyMat2

Keywords:

transformations vector matrix product


MatGnrlMultVecbyMat2

(gnrl_mat.c:299)

Prototype:

  void MatGnrlMultVecbyMat2(IrtVecGnrlType VecRes,
                            IrtVecGnrlType Vec,
                            IrtGnrlMatType Mat,
                            int n)


Description:

Routine to mult a vector of len n by a general matrix of size (n x n), as VecRes = Vec * Mat.

Parameters:

VecRes: Result of vector - matrix product. Can be Vec.
Vec: Vector to transform using Matrix.
Mat: General matrix.
n: Sizes of vectors Vec/VecRes and of matrix Mat.


Returned Value:

void


See Also:

MatMultVecby4by4 MatGnrlMultVecbyMat

Keywords:

transformations vector matrix product


MatGnrlOrthogonalSubspace

(gnrl_mat.c:529)

Prototype:

  int MatGnrlOrthogonalSubspace(IrtGnrlMatType M, int n)


Description:

Given m (m < n) vectors as rows in matrix M, and zeros at the rest of the rows, computes n-m new vectors of the orthogonal space to the space spanned by the input m vectors. Uses SVD in the computation and saves the new, orthogonal, vectors in the last n-m rows of M, in place.

Parameters:

M: A matrix holding m (m < n) vectors as rows.
n: Size of marix M (and the space).


Returned Value:

int: TRUE if successful, FALSE otherwise.


Keywords:




MatGnrlPrintMatrix

(gnrl_mat.c:637)

Prototype:

  void MatGnrlPrintMatrix(IrtGnrlMatType M, int n, FILE *F)


Description:

Routine to print matrix M to file F.

Parameters:

M: Matrix to print.
n: Size of matrix Mat.
F: What file to print to.


Returned Value:

void


Keywords:

transformations matrix transpose


MatGnrlScaleMat

(gnrl_mat.c:225)

Prototype:

  void MatGnrlScaleMat(IrtGnrlMatType MatRes,
                       IrtGnrlMatType Mat,
                       IrtRType *Scale,
                       int n)


Description:

Routine to scale a general matrix, by a scalar value. MatRes may be Mat.

Parameters:

MatRes: Result of matrix scaling.
Mat: The two operand of the matrix scaling.
Scale: Scalar value to multiple matrix with.
n: Size of matrices MatRes/Mat.


Returned Value:

void


See Also:

MatScaleMat MatGnrlAddTwoMat MatGntlMultTwoMat

Keywords:

transformations matrix scaling


MatGnrlSubTwoMat

(gnrl_mat.c:194)

Prototype:

  void MatGnrlSubTwoMat(IrtGnrlMatType MatRes,
                        IrtGnrlMatType Mat1,
                        IrtGnrlMatType Mat2,
                        int n)


Description:

Routine to subtract two general matrices. MatRes may be one of Mat1 or Mat2.

Parameters:

MatRes: Result of matrix subtraction.
Mat1, Mat2: The two operand of the matrix subtraction.
n: Size of matrices MatRes/Mat1/Mat2.


Returned Value:

void


See Also:

MatSubTwoMat MatGnrlAddTwoMat MatGntlMultTwoMat MatGnrlScaleMat

Keywords:

transformations matrix subtraction


MatGnrlTranspMatrix

(gnrl_mat.c:445)

Prototype:

  void MatGnrlTranspMatrix(IrtGnrlMatType M, IrtGnrlMatType TranspM, int n)


Description:

Routine to compute the TRANSPOSE of matrix M which is not modified.

Parameters:

M: Original matrix to transpose.
TranspM: Transposed matrix will be placed here.
n: Sizes of matrices M/TranspM.


Returned Value:

void


See Also:

MatTranspMatrix MatGnrlTranspMatrix

Keywords:

transformations matrix transpose


MatGnrlUnitMat

(gnrl_mat.c:51)

Prototype:

  void MatGnrlUnitMat(IrtGnrlMatType Mat, int n)


Description:

Routine to generate a (n x n) unit matrix:

Parameters:

Mat: Matrix to initialize as a unit matrix.
n: Size of matrix Mat.


Returned Value:

void


See Also:

MatGenUnitMat

Keywords:

transformations unit matrix


MatInverseMatrix

(hmgn_mat.c:643)

Prototype:

  int MatInverseMatrix(IrtHmgnMatType M, IrtHmgnMatType InvM)


Description:

Routine to compute the INVERSE of a given matrix M which is not modified. The matrix is assumed to be 4 by 4 (transformation matrix). Return TRUE if inverted matrix (InvM) do exists.

Parameters:

M: Original matrix to invert.
InvM: Inverted matrix will be placed here. Can be same as M.


Returned Value:

int: TRUE if inverse exists, FALSE otherwise.


See Also:

MatTranspMatrix

Keywords:

transformations matrix inverse


MatIsUnitMatrix

(hmgn_mat.c:60)

Prototype:

  int MatIsUnitMatrix(IrtHmgnMatType Mat, IrtRType Eps)


Description:

Test if the given matrix is a unit matrix to within Eps.

Parameters:

Mat: Matrix to test if a unit matrix.
Eps: Epsilon of test.


Returned Value:

int: TRUE if unit matrix to within epsilon, FALSE otherwise.


See Also:

MatGenUnitMat MatGnrlIsUnitMatrix MatIsWeightAffected

Keywords:




MatIsWeightAffected

(hmgn_mat.c:92)

Prototype:

  int MatIsWeightAffected(IrtHmgnMatType Mat, IrtRType Eps)


Description:

Test if the given matrix affects the weight in any way (i.e. W = 1 will not be W = 1 after the transform).

Parameters:

Mat: Matrix to test if weight is affected by it.
Eps: Epsilon of test.


Returned Value:

int: TRUE if matrix indeed affects the weight coefficient.


See Also:

MatGenUnitMat MatGnrlIsUnitMatrix MatIsUnitMatrix

Keywords:




MatMultPtby4by4

(hmgn_mat.c:524)

Prototype:

  void MatMultPtby4by4(IrtPtType PtRes,
                       const IrtPtType Pt,
                       IrtHmgnMatType Mat)


Description:

Routine to multiply a XYZ point by 4by4 matrix: The point has only 3 components (X, Y, Z) and it is assumed that W = 1. PtRes may be Pt as it is only updated in the end.

Parameters:

PtRes: Result of point - matrix product.
Pt: Point to transfrom using Matrix.
Mat: Transformation matrix.


Returned Value:

void


See Also:

MatMultVecby4by4 MatMultWVec2by4by4

Keywords:

transformations vector matrix product


MatMultTwo4by4

(hmgn_mat.c:335)

Prototype:

  void MatMultTwo4by4(IrtHmgnMatType MatRes,
                      IrtHmgnMatType Mat1,
                      IrtHmgnMatType Mat2)


Description:

Routine to multiply two 4by4 matrices. MatRes = Mat1 * Mat2 assumed Mat[i][j] refers to row i and column j. MatRes may be one of Mat1 or Mat2 - it is only updated in the end.

Parameters:

MatRes: Result of matrix product.
Mat1, Mat2: The two operand of the matrix product.


Returned Value:

void


See Also:

MatGnrlMultTwo4by4 MatSubTwo4by4 MatAddTwo4by4

Keywords:

transformations matrix product


MatMultVecby4by4

(hmgn_mat.c:491)

Prototype:

  void MatMultVecby4by4(IrtVecType VecRes,
                        const IrtVecType Vec,
                        IrtHmgnMatType Mat)


Description:

Routine to multiply an XYZ Vector by 4by4 matrix: The Vector has only 3 components (X, Y, Z) and it is assumed that W = 0. VRes may be Vec as it is only updated in the end.

Parameters:

VecRes: Result of vector - matrix product.
Vec: Vector to transfrom using Matrix.
Mat: Transformation matrix.


Returned Value:

void


See Also:

MatMultPtby4by4 MatMultWVec2by4by4

Keywords:

transformations vector matrix product


MatMultWVecby4by4

(hmgn_mat.c:572)

Prototype:

  void MatMultWVecby4by4(IrtRType VRes[4],
                         const IrtRType Vec[4],
                         IrtHmgnMatType Mat)


Description:

Routine to multiply a WXYZ Vector by 4by4 matrix: The Vector has only 4 components (X, Y, Z, W). VRes may be Vec as it is only updated in the end.

Parameters:

VRes: Result of vector - matrix product.
Vec: Vector to transfrom using Matrix.
Mat: Transformation matrix.


Returned Value:

void


See Also:

MatMultPtby4by4 MatMultVec2by4by4

Keywords:

transformations vector matrix product


MatRotSclFactorMatrix

(hmgn_mat.c:883)

Prototype:

  void MatRotSclFactorMatrix(IrtHmgnMatType M, IrtHmgnMatType RotSclMat)


Description:

Routine to estimate the rotation and scale factors in a matrix.

Parameters:

M: Matrix to extract rotation and scale factors from.
RotSclMat: The rotation and scale factors of matrix M.


Returned Value:

void


See Also:

MatScaleFactorMatrix MatRotateFactorMatrix MatTranslateFactorMatrix

Keywords:

transformations


MatRotateFactorMatrix

(hmgn_mat.c:842)

Prototype:

  void MatRotateFactorMatrix(IrtHmgnMatType M, IrtHmgnMatType RotMat)


Description:

Routine to estimate the rotation factor in a matrix.

Parameters:

M: Matrix to extract rotation factors.
RotMat: The rotational factors of matrix M.


Returned Value:

void


See Also:

MatScaleFactorMatrix MatTranslateFactorMatrix MatRotSclFactorMatrix

Keywords:

transformations


MatSameTwo4by4

(hmgn_mat.c:455)

Prototype:

  int MatSameTwo4by4(IrtHmgnMatType Mat1,
                     IrtHmgnMatType Mat2,
                     IrtRType Eps)


Description:

Compare two homogeneous matrices for approximate equality.

Parameters:

Mat1, Mat2: Two homogeneous matrices to compare.
Eps: Tolerance of comparison.


Returned Value:

int: TRUE if similar, FALSE otherwise.


Keywords:




MatScale4by4

(hmgn_mat.c:430)

Prototype:

  void MatScale4by4(IrtHmgnMatType MatRes,
                    IrtHmgnMatType Mat,
                    const IrtRType *Scale)


Description:

Routine to scale a 4by4 matrix. MatRes may be Mat.

Parameters:

MatRes: Result of matrix scaling.
Mat: The two operand of the matrix scaling.
Scale: Scalar value to multiple matrix with.


Returned Value:

void


See Also:

MatGnrlScaleMat MatSubTwo4by4 MatAddTwo4by4 MatMultTwo4by4

Keywords:

transformations matrix scaling


MatScaleFactorMatrix

(hmgn_mat.c:765)

Prototype:

  IrtRType MatScaleFactorMatrix(IrtHmgnMatType M)


Description:

Routine to estimate the scaling factor in a matrix by computing the SVD decomposition of the matrix and if fails, use average of the scale of the X, Y, and Z unit vectors.

Parameters:

M: Matrix to estimate scaling factors (assume positive scales).


Returned Value:

IrtRType: Estimated Scaling factor (returns positive scale values).


See Also:

MatRotateFactorMatrix MatTranslateFactorMatrix MatRotSclFactorMatrix MatScaleFactorMatrix2

Keywords:

transformations


MatScaleFactorMatrix2

(hmgn_mat.c:795)

Prototype:

  IrtRType *MatScaleFactorMatrix2(IrtHmgnMatType M, IrtVecType ScaleVec)


Description:

Routine to estimate the scaling factor in a matrix by computing the SVD decomposition of the matrix and if fails, maps and measures the scale of unit vectors in the X, Y, and Z direction.

Parameters:

M: Matrix to estimate scaling factors (assume positive scales).
ScaleVec: To save the eEstimated Scaling factor in the XYZ directions.


Returned Value:

IrtRType *: Estimated Scaling factor in the XYZ directions. Same as ScaleVec.


See Also:

MatRotateFactorMatrix MatTranslateFactorMatrix MatRotSclFactorMatrix MatScaleFactorMatrix

Keywords:

transformations


MatSubTwo4by4

(hmgn_mat.c:400)

Prototype:

  void MatSubTwo4by4(IrtHmgnMatType MatRes,
                     IrtHmgnMatType Mat1,
                     IrtHmgnMatType Mat2)


Description:

Routine to subtract two 4by4 matrices. MatRes may be one of Mat1 or Mat2.

Parameters:

MatRes: Result of matrix subtraction.
Mat1, Mat2: The two operand of the matrix subtraction.


Returned Value:

void


See Also:

MatGnrlSubTwo4by4 MatAddTwo4by4 MatMultTwo4by4

Keywords:

transformations matrix subtraction


MatTranslateFactorMatrix

(hmgn_mat.c:908)

Prototype:

  void MatTranslateFactorMatrix(IrtHmgnMatType M, IrtVecType Trans)


Description:

Routine to estimate the translation factors in a matrix.

Parameters:

M: Matrix to extract rotation factors.
Trans: The translation factors of matrix M.


Returned Value:

void


See Also:

MatScaleFactorMatrix MatRotateFactorMatrix

Keywords:

transformations


MatTranspMatrix

(hmgn_mat.c:732)

Prototype:

  void MatTranspMatrix(IrtHmgnMatType M, IrtHmgnMatType TranspM)


Description:

Routine to compute the TRANSPOSE of a given matrix M which is not modified. The matrix is assumed to be 4 by 4 (transformation matrix).

Parameters:

M: Original matrix to transpose.
TranspM: Transposed matrix will be placed here. Can be same as M.


Returned Value:

void


See Also:

MatInverseMatrix

Keywords:

transformations matrix transpose


MiscBiPrComputeMinCostRecMatching

(bipartte2.c:102)

Prototype:

  int *MiscBiPrComputeMinCostRecMatching(const IrtRType *CostMat,
                                         int NumRows,
                                         int NumCols)


Description:

Implementation of Kunh-Munkres algorithm version of the Hungarian alg. for the rectangular (unbalanced) weighted bi-partite graph. The original Munkres algorithm finds the minimal assignment between N workers and N jobs given the N x N cost matrix, by starring and priming the cost matrix and covering and uncovering the rows and columns. This implementation is the modified version of Munkres algorithm to handle the rectangular M x N cost matrix. When k = min (M, N), this function finds at most k assignments. The cost matrix (CostMat) is a 1D array storing the costs(weights) in a column-major order: CostMat[r + NumRows * c] stores the cost at row r and column c from the cost matrix. Invalid costs are represented as infinity. The flow diagram of the algorithm is as follows: * Step 1(Preprocess) -> Step 2 -> Exit -> Step 3 -> Step 4 -> Step 2 -> Step 5 -> Step 3 Time complexity of Munkres algorithm is O(n^3). * [Reference] 1. J. Munkres. Algorithms for the Assignment and Transportation Problems. Journal of the Society for Industrial and Applied Mathematics, Vol. 5, No. 1, pp. 32--38, 1958. 2. R.A. Pilgrim, Munkres' Assignment Algorithm. Modified for Rectangular Matrices. (http://csclab.murraystate.edu/~bob.pilgrim/445/munkres.html), Course notes, Murray State University. 3. M. Buehren. Functions for the rectangular assignment problem. (https://www.mathworks.com/matlabcentral/fileexchange/ 6543-functions-for-the-rectangular-assignment-problem), MATLAB Central File Exchange. 2020.

Parameters:

CostMat: Cost matrix of size R x C. The costs are stored in a column- major, i.e., CostMat[r + NumRows * c]. Costs should be always nonnegative and invalid weights are represented as infinity.
NumRows: Number of rows in the cost matrix.
NumCols: Number of columns in the cost matrix.


Returned Value:

int *: A 1D array of size R. Stores the matched column index for each row when Match[i] = -1, row i does not match to any column.


See Also:



Keywords:




MiscBiPrWeightedMatchBipartite

(bipartte.c:84)

Prototype:

  int MiscBiPrWeightedMatchBipartite(const IrtRType **Weight,
                                     IritBiPrWeightedMatchStruct *Match,
                                     int n)


Description:

Implementation of Shortest-Path variation of the Hungarian algorithm, from "Assignment Problems" by R. Burkard, M. Dell'Amico, S. Martello Algorithm 4.10 Hungarian_SP, page 97. Complexity: O(n^3) The sacnning order of the graph's vertices is chosen at random.

Parameters:

Weight: Cost matrix of size n*n, passed as an array of size n holding pointers to arrays of size n. Weight[i][j] is the cost of the edge between vertices i and j. Negative entry denotes that there is no edge (== edge cost is infinite).
Match: Array of size n allocated in advance. Returns with the optimal matching found. For every 0 <= i < n Match[i].m1 = i Match[i].m2 = vertex that is matched to i Match[i].m3 = unused
n: Number of vertices in each side of the bi-partite graph.


Returned Value:

int: 0 if an optimal match was found - in such case the array Match is filled with the optimal matching found. Negative value if there is no match in the graph - in such case Match may be undefined.


Keywords:




MiscDescribeError

(misc_err.c:43)

Prototype:

  const char *MiscDescribeError(MiscFatalErrorType ErrorNum)


Description:

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


MiscFatalError

(misc_ftl.c:57)

Prototype:

  void MiscFatalError(MiscFatalErrorType ErrID, char *ErrDesc)


Description:

Trap Misc_lib errors right here. Provides a default error handler for the misc library. Gets an error description using MiscDescribeError, prints it and exit the program using exit.

Parameters:

ErrID: Error type that was raised.
ErrDesc: Possibly, an additional description on error.


Returned Value:

void


Keywords:

error handling


MiscHashAddElement

(hash2tbl.c:136)

Prototype:

  int MiscHashAddElement(MiscHashPtrType Hash,
                         void *Elem,
                         unsigned long SizeInByte)


Description:

Hash the given element and insert it into the table. The added element is the returned value from the CopyFunc given to MiscHashNewHash. More than one identical element can exist in the table. The element's auxilary data is initialized to 0.

Parameters:

Hash: The hash table.
Elem: The element to hash.
SizeInByte: he second parameter to pass to the hash function.


Returned Value:

int: -1 if unable to add, 0 otherwise.


Keywords:




MiscHashFindElement

(hash2tbl.c:233)

Prototype:

  int MiscHashFindElement(MiscHashPtrType Hash,
                          void *Elem,
                          unsigned long SizeInByte)


Description:

Looks for the given element in the hash table (using the CompFunc given to MiscHashNewHash). The Element and SizeInByte will be passed to the hash function.

Parameters:

Hash: The hash table.
Elem: The element to hash.
SizeInByte: he second parameter to pass to the hash function. If the second parameter is not equal to the one used to hash the element, the element may not be found even if it is in the hash table.


Returned Value:

int: 0 if found, -1 otherwise.


Keywords:




MiscHashFreeHash

(hash2tbl.c:288)

Prototype:

  void MiscHashFreeHash(MiscHashPtrType Hash)


Description:

Frees the given hash table.

Parameters:

Hash: he hash table to free.


Returned Value:

void


Keywords:




MiscHashGetElementAuxData

(hash2tbl.c:265)

Prototype:

  long *MiscHashGetElementAuxData(MiscHashPtrType Hash,
                                  void *Elem,
                                  unsigned long SizeInByte)


Description:

Find the first occurence of Elem in the hash table (using the CompFunc given to MiscHashNewHash) and return a pointer to its auxilary data (The auxilary data may be changed without influencing the hash table). The Element and SizeInByte will be passed to the hash function.

Parameters:

Hash: The hash table.
Elem: The element to retrieve its auxilary data.
SizeInByte: he second parameter to pass to the hash function. If the second parameter is not equal to the one used to hash the element, the element may not be found even if it is in the hash table.


Returned Value:

long *: Pointer to Elem's auxilary data. NULL if Elem doesn't exist in the hash table.


Keywords:




MiscHashNewHash

(hash2tbl.c:75)

Prototype:

  MiscHashPtrType MiscHashNewHash(unsigned long Size,
                                  MiscHashFuncType HashFunc,
                                  MiscHashCopyFuncType CopyFunc,
                                  MiscHashFreeFuncType FreeFunc,
                                  MiscHashCompFuncType CompFunc)


Description:

Creates a new Hash Table.

Parameters:

Size: The size of the hash table (the range of the hash function should be compatible).
HashFunc: The function used for hashing (the range should be compatible with HashSize). Receives 2 parameters to make it easy to hash arrays.
CopyFunc: The function that will be used to copy elements (for example when hashing a new element).
FreeFunc: The function that will be used to free elements (for example when freeing the hash table).
CompFunc: The function that will be used to compare elements (for example when looking for an element in the hash table).


Returned Value:

MiscHashPtrType: The new hash table if successful, of NULL if failed.


Keywords:




MiscISCAddPicture

(imgstcvr.c:1648)

Prototype:

  int MiscISCAddPicture(MiscISCCalculatorPtrType Calc, MiscISCPixelType *Picture)


Description:

Adds a picture to the calculator. Copies the picture (will be freed when the calculator is freed).

Parameters:

Calc: The calculator to add the picture to.
Picture: he picture to add.


Returned Value:

int: FALSE if error occurred.


See Also:



Keywords:




MiscISCCalculateExact

(imgstcvr.c:2685)

Prototype:

  int MiscISCCalculateExact(MiscISCCalculatorPtrType Calc,
                            int SizeLimit,
                            int **SolutionByIndex,
                            int *SolutionSize,
                            IrtRType *CoverPart)


Description:

Calculates the cover. Uses an exact exponential Algorithm. Each MiscISCCalculatorPtrType can be used only once with any search algorithm. Calling this funcion will move the calculator to compute phase.

Parameters:

Calc: The calculator.
SizeLimit: IN, if this value is greater than 0 the algorithm will stop adding pictures when getting to that size of pictures combinations and revert to search in other branches. This will speed the algorithm though may not find any solution at all in which case the combination with the best cover will be returned.
SolutionByIndex: UT, The solution as indices of pictures.
SolutionSize: OUT, The size of the solution (size of SolutionByIndex).
CoverPart: OUT, The part of the uprocessed picture covered by the solution.


Returned Value:

int: FALSE if error occurred.


See Also:



Keywords:

MiscISCCalculateExactAux


MiscISCCalculateExhaustive

(imgstcvr.c:2909)

Prototype:

  int MiscISCCalculateExhaustive(MiscISCCalculatorPtrType Calc,
                                 IrtRType CoverLimit,
                                 int SizeLimit,
                                 int **SolutionByIndex,
                                 int *SolutionSize,
                                 IrtRType *CoverPart)


Description:

Calculates the cover. Uses an exhaustive exponential Algorithm. Each MiscISCCalculatorPtrType can be used only once with any search algorithm. Calling this funcion will move the calculator to compute phase.

Parameters:

Calc: The calculator.
CoverLimit: IN, if this value is in (0,1), the algorithm will consider a combination of pictures which covers CoverLimit part of the image as a valid solution.
SizeLimit: IN, if this value is greater than 0 the algorithm will stop adding pictures when getting to that size of pictures combinations and revert to search in other branches. This will speed the algorithm though may not find any solution at all in which case the combination with the best cover will be returned.
SolutionByIndex: UT, The solution as indices of pictures.
SolutionSize: OUT, The size of the solution (size of SolutionByIndex).
CoverPart: OUT, The part of the unprocessed pictured covered by the solution.


Returned Value:

int: FALSE if error occurred.


See Also:



Keywords:

MiscISCCalculateExact


MiscISCCalculateGreedy

(imgstcvr.c:3389)

Prototype:

  int MiscISCCalculateGreedy(MiscISCCalculatorPtrType Calc,
                             int **SolutionByIndex,
                             int *SolutionSize,
                             IrtRType *CoverPart)


Description:

Calculates the cover using quick and not optimal greedy algorithm. In each step the algorithm choose the next picture to be the picture which covers the maximum number of pixel out of the original unprocessed picture. If Calc -> UseCoverLimit is TRUE, the algorithm's search will stop when reaching cover the size of Calc -> CoverLimit and return the solution. Each MiscISCCalculatorPtrType can be used only once with any search algorithm. Calling this funcion will move the calculator to compute phase.

Parameters:

Calc: The calculator.
SolutionByIndex: UT, The solution as indices of pictures by the order they were added to the solution.
SolutionSize: OUT, The size of the solution (size of SolutionByIndex).
CoverPart: OUT, The part of the unprocessed image covered by the solution.


Returned Value:

int: FALSE if error occurred.


Keywords:

MiscISCCalculateGreedyAux


MiscISCFreeCalculator

(imgstcvr.c:1560)

Prototype:

  void MiscISCFreeCalculator(MiscISCCalculatorPtrType Calc)


Description:

Frees memory allocated for the calculator.

Parameters:

Calc: he calculator.


Returned Value:

void


See Also:



Keywords:




MiscISCNewCalculator

(imgstcvr.c:1422)

Prototype:

  MiscISCCalculatorPtrType MiscISCNewCalculator(int MaxPictures,
                                                MiscISCImageSizeType ImageSize,
                                                MiscISCColorTypeEnum ColorType,
                                                MiscISCPrintFuncType Print)


Description:

Creates a new calculator.

Parameters:

MaxPictures: he maximal number of pictures the calculator will hold.
ImageSize: The number of pixels in each picture.
ColorType: Are the pictures in black & white or gray.
Print: Pointer to a printing routine where texture data should go to or NULL to ignore.


Returned Value:

MiscISCCalculatorPtrType: The new calculator or NULL if fails.


Keywords:




MiscISCSetImageToCover

(imgstcvr.c:1612)

Prototype:

  int MiscISCSetImageToCover(MiscISCCalculatorPtrType Calc,
                             MiscISCPixelType *RequiredCover)


Description:

Set the image to be covered. A pixel with value 0 means that the pixel isn't required to be covered. A pixel with value 1 means that the pixel is required to be covered. If this function isn't called than all the pixel are required to be covered. The function makes an inner copy of RequiredCover (that copy will be freed when the calculator is freed). The user may free or change RequiredCover's memory without harming the process.

Parameters:

Calc: The calculator to add the picture to.
RequiredCover: he cover picture to add.


Returned Value:

int: FALSE if error occurred.


See Also:



Keywords:




MiscListAddElement

(list.c:91)

Prototype:

  int MiscListAddElement(MiscListPtrType List,
                         void *Elem,
                         unsigned long SizeInByte)


Description:

Adds a new element to the beginning of the list. The added element is the returned value from the CopyFunc given to MiscListNewEmptyList.

Parameters:

List: The list where the element will be inserted.
Elem: The element to add to the list. Must be compatible with the functions given to MiscListNewEmptyList.
SizeInByte: an be used to pass an array size, for the Copy Function.


Returned Value:

int: -1 if unable to add, 0 otherwise.


Keywords:




MiscListCompLists

(list.c:158)

Prototype:

  int MiscListCompLists(MiscListPtrType L1, MiscListPtrType L2)


Description:

Compares the 2 given list element by element. The list are considered equal if they have the same number of elements, in the same order.

Parameters:

L1: A lists to compare.
L2: A lists to compare.


Returned Value:

int: 0 if the lists are equal.


Keywords:




MiscListFindElementInList

(list.c:126)

Prototype:

  int MiscListFindElementInList(MiscListPtrType List,
                                void *Elem,
                                unsigned long SizeInByte)


Description:

Looks for the give element in the list (using the CompFunc given to MiscListNewEmptyList).

Parameters:

List: The list where the element will be looked for.
Elem: The element to look for.
SizeInByte: he second parameter to pass to the CompFunc (CompFunc takes 2 parametes to make it easy to compare arrays).


Returned Value:

int: -1 if not found, 0 otherwise.


Keywords:




MiscListFreeList

(list.c:201)

Prototype:

  void MiscListFreeList(MiscListPtrType List)


Description:

Frees the List (and elements).

Parameters:

List: he list to free.


Returned Value:

void


Keywords:




MiscListFreeListIterator

(list.c:264)

Prototype:

  void MiscListFreeListIterator(MiscListIteratorPtrType It)


Description:

Frees the given iterator.

Parameters:

It: The iterator to free.


Returned Value:

void


Keywords:




MiscListGetListIterator

(list.c:236)

Prototype:

  MiscListIteratorPtrType MiscListGetListIterator(MiscListPtrType List)


Description:

Returns a new iterator to the given list. Before MiscListIteratorFirst is used the place where the iterator points to is undefined.

Parameters:

List: The list to iterate over.


Returned Value:

MiscListIteratorPtrType: The new iterator, of NULL if fails.


Keywords:




MiscListIteratorAtEnd

(list.c:333)

Prototype:

  int MiscListIteratorAtEnd(MiscListIteratorPtrType It)


Description:

Returns 1 if at the end of the List.

Parameters:

It: The iterator to check.


Returned Value:

int: 1 if at the end of the list, 0 otherwise.


Keywords:




MiscListIteratorFirst

(list.c:286)

Prototype:

  void *MiscListIteratorFirst(MiscListIteratorPtrType It)


Description:

Resets the iterator to the head of the list.

Parameters:

It: The iterator to reset.


Returned Value:

void *: The element at the head of the list.


See Also:



Keywords:




MiscListIteratorNext

(list.c:309)

Prototype:

  void *MiscListIteratorNext(MiscListIteratorPtrType It)


Description:

Moves the iterator to the next element in the list. If used when the iterator is at the end of the list the result is undefined.

Parameters:

It: The iterator to move.


Returned Value:

void *: The element at the new location in the list (if the new location is the end of the list, the return value is NULL).


Keywords:




MiscListIteratorValue

(list.c:355)

Prototype:

  void *MiscListIteratorValue(MiscListIteratorPtrType It)


Description:

Returns the data stored the the current element.

Parameters:

It: The iterator.


Returned Value:

void *: The data stored the the current element.


Keywords:




MiscListNewEmptyList

(list.c:50)

Prototype:

  MiscListPtrType MiscListNewEmptyList(MiscListCopyFuncType CopyFunc,
                                       MiscListFreeFuncType FreeFunc,
                                       MiscListCompFuncType CompFunc)


Description:

Creates a new List.

Parameters:

CopyFunc: he function that will be used to copy elements (for example when adding a new element to the list).
FreeFunc: he function that will be used to free elements (for example when freeing the list).
CompFunc: he function that will be used to compare elements (for example when looking for an element in the list).


Returned Value:

MiscListPtrType: The new list if successful, of NULL if fails.


Keywords:




MiscPHashMapCreate

(phashmap.c:56)

Prototype:

  MiscPHashMap MiscPHashMapCreate(int HashSize)


Description:

Creates a hash map.

Parameters:

HashSize: ize of the hash array.


Returned Value:

MiscPHashMap: New hash map.


Keywords:




MiscPHashMapDelete

(phashmap.c:94)

Prototype:

  void MiscPHashMapDelete(MiscPHashMap HMap)


Description:

Destroys a hash map.

Parameters:

HMap: ash map to destroy.


Returned Value:

void


Keywords:




MiscPHashMapGet

(phashmap.c:168)

Prototype:

  MiscPHMResult MiscPHashMapGet(MiscPHashMap HMap,
                                MiscPHashMapKey Key,
                                MiscPHashMapValue *Value)


Description:

Gets the value of a given key in a hash map.

Parameters:

HMap: ash map.
Key: ey to search for.
Value: eturn parameter of the key value if found.


Returned Value:

MiscPHMResult: MISC_P_HMSUCCESS in success and MISC_P_MFAILURE otherwise.


Keywords:




MiscPHashMapIterate

(phashmap.c:247)

Prototype:

  void MiscPHashMapIterate(MiscPHashMap HMap, MiscPHashMapCBFunc CBFunc)


Description:

Iterates over the entries of a hash map and calls a call back function on them.

Parameters:

HMap: ash map.
CBFunc: ntries call back function.


Returned Value:

void


Keywords:




MiscPHashMapPrint

(phashmap.c:274)

Prototype:

  void MiscPHashMapPrint(MiscPHashMap HMap)


Description:

Prints the entries and other information of a hash map.

Parameters:

HMap: ash map.


Returned Value:

void


Keywords:




MiscPHashMapRemove

(phashmap.c:203)

Prototype:

  MiscPHMResult MiscPHashMapRemove(MiscPHashMap HMap, MiscPHashMapKey Key)


Description:

Removes key and its value from the hash map.

Parameters:

HMap: Hash map.
Key: Key to search for.


Returned Value:

MiscPHMResult: MISC_P_HMSUCCESS in success and MISC_P_MFAILURE otherwise if the key is not found.


Keywords:




MiscPHashMapSet

(phashmap.c:127)

Prototype:

  MiscPHMResult MiscPHashMapSet(MiscPHashMap HMap,
                                MiscPHashMapKey Key,
                                MiscPHashMapValue Value)


Description:

Add a key and a value to a hash map. If the key exists, its value is replaced.

Parameters:

HMap: ash map.
Key, Value: air of key,value to add.


Returned Value:

MiscPHMResult: MISC_P_HMSUCCESS in success and MISC_P_MFAILURE otherwise.


Keywords:




MiscSetFatalErrorFunc

(misc_ftl.c:28)

Prototype:

  MiscSetErrorFuncType MiscSetFatalErrorFunc(MiscSetErrorFuncType ErrorFunc)


Description:

Sets the error function to be used by Misc_lib.

Parameters:

ErrorFunc: New error function to use.


Returned Value:

MiscSetErrorFuncType: Old error function reference.


Keywords:

error handling


RLNewFromFile

(mincover.c:1180)

Prototype:

  RLStruct *RLNewFromFile(const char *FileName)


Description:

Initializes an new RL using a file to describe the ranges.

Parameters:

FileName: The file name containing the required details


Returned Value:

RLStruct *: A new constrcuted RL


See Also:

RLNew

Keywords:

RLNew


_AttrMallocAttributeHashNum

(miscattr.c:1631)

Prototype:

  IPAttributeStruct *_AttrMallocAttributeHashNum(IPAttrNumType AttribHashNum,
                                                 IPAttributeType Type)


Description:

Allocated a new attribute structure, by hash number.

Parameters:

AttribHashNum: Hash number of newly created attribute.
Type: Type of newly created attribute.


Returned Value:

IPAttributeStruct *: The newly created attribute.


Keywords:




_AttrMallocAttributeIDType

(miscattr.c:1602)

Prototype:

  IPAttributeStruct *_AttrMallocAttributeIDType(IPAttrNumType AttribID,
                                                IPAttributeType Type)


Description:

Allocated a new attribute structure, by hash number.

Parameters:

AttribID: ID of newly created attribute.
Type: Type of newly created attribute.


Returned Value:

IPAttributeStruct *: The newly created attribute.


See Also:

_AttrMallocAttributeNameType

Keywords:




_AttrMallocAttributeNameType

(miscattr.c:1577)

Prototype:

  IPAttributeStruct *_AttrMallocAttributeNameType(const char *Name,
                                                  IPAttributeType Type)


Description:

Allocated a new attribute structure.

Parameters:

Name: Name of newly created attribute.
Type: Type of newly created attribute.


Returned Value:

IPAttributeStruct *: The newly created attribute.


See Also:

_AttrMallocAttributeIDType

Keywords:




_IrtImgVerifyAlignment

(readimag.c:486)

Prototype:

  IrtBType *_IrtImgVerifyAlignment(IrtBType *Data,
                                   int *MaxX,
                                   int *MaxY,
                                   int Alpha)


Description:

Verifies the alignment of the image. Returned is either the input Data if aligned, or a new aligned copy (and Data is freed).

Parameters:

Data: Image data to verify alignment, in place.
MaxX: Current dimension of image. Might be changed after alignment.
MaxY: Current dimension of image.
Alpha: Do we have Alpha in the image?


Returned Value:

IrtBType *: The verified image data.


Keywords:




_wfopen

(xgeneral.c:980)

Prototype:

  FILE *_wfopen(const wchar_t *Filename, const wchar_t *Mode)


Description:

Emulate, under non Windows OSs, the function _wfopen, by coercing the wchar strings to ascii...

Parameters:

Filename: The file name.
Mode: The file mode.


Returned Value:

FILE *: Open file, or NULL if error.


See Also:

_wpopen _wgetenv

Keywords:




_wgetenv

(xgeneral.c:1043)

Prototype:

  wchar_t *_wgetenv(const wchar_t *WName)


Description:

Emulate, under non Windows OSs, the function _wgetenv, by coercing the wchar strings to ascii...

Parameters:

WName: Name of env. var. tofetch.


Returned Value:

wchar_t *: Env. var. value, or NULL if not found.


See Also:

_wfopen _wpopen

Keywords:




_wpopen

(xgeneral.c:1012)

Prototype:

  FILE *_wpopen(const wchar_t *Command, const wchar_t *Mode)


Description:

Emulate, under non Windows OSs, the function _wpopen, by coercing the wchar strings to ascii...

Parameters:

Command: The comamnd to execute.
Mode: The file mode.


Returned Value:

FILE *: Open file, or NULL if error.


See Also:

_wfopen _wgetenv

Keywords:




getcwd

(xgeneral.c:866)

Prototype:

  char *getcwd(char *s, int Len)


Description:

Get current working directory - BSD4.3 style. *

Parameters:

s: Where to save current working direction.
Len: Length of s.


Returned Value:

char *: Same as s.


Keywords:




movmem

(xgeneral.c:558)

Prototype:

  void movmem(VoidPtr Src, VoidPtr Dest, int Len)


Description:

Routine to move a block in memory. Unlike memcpy/bcopy, this routine should support overlaying blocks. This stupid implementation will copy it twice - to a temporary block and back again. The temporary block size will be allocated by demand.

Parameters:

Src: Of block to copy.
Dest: Of block to copy.
Len: Of block to copy.


Returned Value:

void


Keywords:

copy


searchpath

(xgeneral.c:588)

Prototype:

  const char *searchpath(const char *Name, char *FullPath)


Description:

Routine to search for a given file name.

Parameters:

Name: Of file to search for.
FullPath: Where returned path will be written. Same as returned value.


Returned Value:

const char *: Complete file name of Name. Same as FullPath.


See Also:

searchpathW

Keywords:




searchpathW

(xgeneral.c:639)

Prototype:

  const wchar_t *searchpathW(const wchar_t *Name, wchar_t *FullPath)


Description:

Routine to search for a given file name.

Parameters:

Name: Of file to search for.
FullPath: Where returned path will be written. Same as returned value.


Returned Value:

const wchar_t *: Complete file name of Name. Same as FullPath.


See Also:

searchpath

Keywords:




stricmp

(xgeneral.c:803)

Prototype:

  int stricmp(const char *s1, const char *s2)


Description:

Routine to compare two strings, ignoring case.

Parameters:

s1, s2: The two strings to compare.


Returned Value:

int: <0, 0, >0 according to the relation between s1 and s2.


Keywords:




strnicmp

(xgeneral.c:775)

Prototype:

  int strnicmp(const char *s1, const char *s2, int n)


Description:

Routine to compare two strings, ignoring case, up to given length.

Parameters:

s1, s2: The two strings to compare.
n: maximum number of characters to compare.


Returned Value:

int: <0, 0, >0 according to the relation between s1 and s2.


Keywords:




strstr

(xgeneral.c:835)

Prototype:

  char *strstr(const char *s, const char *Pattern)


Description:

Routine to search for a Pattern (no regular expression) in s. Returns address in s of first occurance of Pattern, NULL if non found.

Parameters:

s: To search for Pattern in.
Pattern: To search in s.


Returned Value:

char *: Address in s where Pattern was first found, NULL otherwise.


Keywords: