Header to include: iobj.h
Iobj *imodObjectNew()
Iobj *imodObjectsNew(int size)
void imodObjectDefault(Iobj *obj)
int imodObjectDelete(Iobj *obj)
int imodObjectsDelete(Iobj *obj, int size)
int imodObjectCopy(Iobj *from, Iobj *to)
Iobj *imodObjectDup(Iobj *obj)
Icont *imodObjectGetContour(Iobj *inObject, int inIndex)
Imesh *imodObjectGetMesh(Iobj *inObject, int inIndex)
int imodObjectAddMesh(Iobj *inObject, Imesh *inMesh)
int imodObjectSort(Iobj *obj)
float imodObjectVolume(Iobj *obj)
int imodel_object_centroid(Iobj *obj, Ipoint *rcp)
int imodObjectAddContour(Iobj *obj, Icont *ncont)
int imodObjectInsertContour(Iobj *obj, Icont *ncont, int index)
int imodObjectRemoveContour(Iobj *obj, int index)
void imodObjectCleanSurf(Iobj *obj)
int imodObjectSortSurf(Iobj *obj)
int imodObjectGetBBox(Iobj *obj, Ipoint *ll, Ipoint *ur)
void imodObjectGetColor(Iobj *inObject,
float *outRed, float *outGreen, float *outBlue)
void imodObjectSetColor(Iobj *inObject,
float inRed, float inGreen, float inBlue)
int imodObjectGetMaxContour(Iobj *inObject)
char *imodObjectGetName(Iobj *inObject)
int imodObjectSetName(Iobj *obj, char *inName)
Ilabel *imodObjectGetLabel(Iobj *obj)
Ilabel *imodObjectNewLabel(Iobj *obj)
int imodObjectGetValue(Iobj *inObject, int inValueType)
void imodObjectSetValue(Iobj *inObject, int inValueType, int inValue)
Allocates one new object initialized to default values; returns NULL if error.
Allocates an array of objects of length size, initialized to default values; returns NULL if error.
Initializes the object obj to default values.
Deletes the object obj, freeing all contour, mesh, and label data and the object structure itself. Returns -1 if error.
Deletes the array of objects of length size in obj, freeing all contour, mesh, and label data and the object array itself. It cannot be used on part of an array. Returns -1 if error.
Copies object structure from object from to object to. Returns -1 if error.
Duplicates object obj, including all contour, mesh, and label data, and returns pointer to copy, or NULL if error.
Returns pointer to the contour at inIndex in object inObject, or NULL if error.
Returns pointer to the mesh at inIndex in the mesh array of object inObject, or NULL if error.
Adds the mesh pointed to by inMesh to the mesh array of object inObject. All pointers are transferred to the new mesh array element and no data are duplicated. If inMesh was allocated, such as with imodMeshNew , it should be freed with free. Returns index of new array element or -1 if error.
Sorts the contours in object obj by their z values. If the object contains time-dependent data, then the contours are sorted first by time then by z. Returns non-zero for error.
Returns volume of object obj,computed from contour areas, or zero for a non-closed contour object
Returns centroid of object obj into the point rcp. For closed-contour objects, computes centroid of area enclosed by each contour and forms the overall centroid from that. For open-contour objects, computes the centroid of each contour line from the segments along the line, then forms an overall centroid from that. Does not work for scattered point objects. Does not account for Z-scaling. Returns 1 for error computing a contour centroid or if there are no contours.
Adds contour ncont to the end of the contour array of object obj. Pointers are copied so no data are duplicated. If ncont was allocated, such as with imodContourNew , it should be freed with free. Returns index of new contour or -1 if error.
Inserts contour ncont at position index into the contour array of object obj. Pointers are copied so no data are duplicated. If ncont was allocated, such as with imodContourNew , it should be freed with free. Returns index of new contour or -1 if error.
Removes the contour at index from object obj without deleting the contour data; this is thus appropriate after adding the contour to another object with imodObjectAddContour. Returns 1 if error.
Updates surface information for object obj by removing labels for surfaces that no longer exist and recomputing the maximum surface number.
Analyzes the mesh of object obj to determine which contours are connected by the mesh and assigns a separate surface number to each set of separately connected contours. Returns 1 if there is no mesh information or 2 for memory error.
Finds the minimum and maximum coordinates of all contours in object obj and returns them in points ll and ur, respectively. If there are no contours but there are meshes, it finds the bounding box from all meshes instead. Returns -1 for an error (including no contours or meshes), 0 for values from contours, or 1 for values from meshes.
Returns color values of object inObject.
Sets the color of object inObject to the given values.
Returns number of contours in object inObject (not the maximum contour index).
Returns pointer to object name.
Sets name of object obj to inName. Returns 1 if the string is truncated to IOBJ_STRSIZE - 1 (63).
Returns a pointer to the label element of object obj, or NULL if the label or obj is NULL.
Makes a new, empty label element in ojbect obj, deleting an existing one if any, and returns a pointer to the new label. Returns NULL if label allocation failed or obj is NULL.
Returns one value for inObject; possible values for inValueType are IobjMaxContour, IobjLineWidth, IobjLineWidth2, IobjPointSize, IobjMaxMesh, IobjMaxSurface, IobjSymType, IobjSymSize, IobjSymFlags, IobjFlagClosed, IobjFlagConnected, IobjFlagFilled, IobjFlagDraw, IobjFlagMesh, IobjFlagLine, IobjFlagTime, IobjFlagExtraInModv, and IobjFlagPntOnSec. IobjFlagConnected is 0 for scattered point objects.
Sets one value for inObject to inValue; possible values for inValueType are IobjLineWidth, IobjLineWidth2, IobjPointSize, IobjSymType, IobjSymSize, IobjSymFlags, IobjFlagClosed, IobjFlagConnected, IobjFlagFilled, IobjFlagDraw, IobjFlagMesh, IobjFlagLine, IobjFlagExtraInModv (for drawing an extra object in model view window), and IobjFlagPntOnSec.