MQObject class contains vertices, faces and so on in an object.
Basic | |
DeleteThis | Delete this object |
GetUniqueID | Get an unique ID of an object |
GetType | Get an object type |
SetType | Set an object type |
Clone | Duplicate an object |
Merge | Merge two objects |
Freeze | Polygonize attributes such as a patch or a mirroring |
GetName | Get an object's name |
SetName | Set an object's name |
GetSelected | Get a selection status of an object |
SetSelected | Set a selection status of an object |
Vertex | |
GetVertexCount | Get a number of vertices |
GetVertex | Get a position of a vertex |
SetVertex | Set a position of a vertex |
GetVertexArray | Get positions of all the vertices |
AddVertex | Add a vertex |
DeleteVertex | Delete a vertex |
GetVertexRefCount | Get a reference count of a vertex |
GetVertexUniqueID | Get an unique ID assigned to a vertex |
GetVertexIndexFromUniqueID | Get an index of a vertex that the specified unique ID is assigned to |
GetVertexRelatedFaces | Get faces shared with a vertex |
GetVertexWeight | Get a weight for a patch in a face |
SetVertexWeight | Set a weight for a patch in a face |
CopyVertexAttribute | Copy vertex attributes to the other vertex |
Face | |
GetFaceCount | Get a number of faces |
GetFacePointCount | Get a number of vertices in a face |
GetFacePointArray | Get indices of vertices in a face |
GetFaceCoordinateArray | Get UV coordinates of vertices in a face |
SetFaceCoordinateArray | Set UV coordinates of vertices in a face |
GetFaceVertexColor | Get a vertex color in a face |
SetFaceVertexColor | Get a vertex color in a face |
GetFaceEdgeCrease | Get a sharp crease of an edge in a face |
SetFaceEdgeCrease | Set a sharp crease of an edge in a face |
GetFaceVisible | Get a visibility of a face |
SetFaceVisible | Set a visibility of a face |
GetFaceMaterial | Get an index of a material assigned to a face |
SetFaceMaterial | Assign a material to a face |
GetFaceUniqueID | Get an unique ID assigned to a face |
GetFaceIndexFromUniqueID | Get an index of a face by an unique ID |
AddFace | Add a face |
InsertFace | Insert a face into the specified index |
DeleteFace | Delete a face |
InvertFace | Invert a direction of a face |
Misc | |
OptimizeVertex | Combine vertices in the specified distance |
Compact | Compact indices of vertices and faces |
Attribute | |
GetVisible | Get a visibility of the object |
SetVisible | Set a visibility of the object |
GetPatchType | Get a patch type |
SetPatchType | Set a patch type |
GetPatchSegment | Get a division number of a patch |
SetPatchSegment | Set a division number of a patch |
GetPatchTriangle | Get a method of a division for triangles in Catmull-Clark |
SetPatchTriangle | Set a method of a division for triangles in Catmull-Clark |
GetPatchSmoothTriangle | Get a method of a smoothing for triangles in OpenSubdiv |
SetPatchSmoothTriangle | Set a method of a smoothing for triangles in OpenSubdiv |
GetPatchMeshInterp | Get an interpolation method for open faces |
SetPatchMeshInterp | Set an interpolation method for open faces |
GetPatchUVInterp | Get an interpolation method for UV borders |
SetPatchUVInterp | Set an interpolation method for UV borders |
GetShading | Get a smoothing type |
SetShading | Set a smoothing type |
GetSmoothAngle | Get a smoothing angle |
SetSmoothAngle | Set a smoothing angle |
GetMirrorType | Get a type of a mirroring |
SetMirrorType | Set a type of a mirroring |
GetMirrorAxis | Get an axis for a mirroring |
SetMirrorAxis | Set an axis for a mirroring |
GetMirrorDistance | Get a connection distance for a mirroring |
SetMirrorDistance | Set a connection distance for a mirroring |
GetLatheType | Get a lathe type |
SetLatheType | Set a lathe type |
GetLatheAxis | Get an axis of a lathe |
SetLatheAxis | Set an axis of a lathe |
GetLatheSegment | Get a division number of a lathe |
SetLatheSegment | Set a division number of a lathe |
GetDepth | Get a depth of the hierarchy |
SetDepth | Set a depth of the hierarchy |
GetFolding | Check if the child object is invisible by holding up |
SetFolding | Hold the child object up and make it invisible |
GetLocking | Get whether the editing is prohibited |
SetLocking | Set whether to prohibit the editing |
GetColor | Get a displayed color for vertices and lines |
SetColor | Set a displayed color for vertices and lines |
GetColorValid | Get whether th displayed color is valid |
SetColorValid | Set whether th displayed color is valid |
Local coordinate | |
GetScaling | Get a scaling factor in a local coordinate |
SetScaling | Set a scaling factor in a local coordinate |
GetRotation | Get a rotation in a local coordinate |
SetRotation | Set a rotation in a local coordinate |
GetTranslation | Get a translation in a local coordinate |
SetTranslation | Set a translation in a local coordinate |
GetLocalMatrix | Get a transformation matrix in a local coordinate |
SetLocalMatrix | Set a transformation matrix in a local coordinate |
GetLocalInverseMatrix | Get an inverse transformation matrix in a local coordinate |
Lighting parameter | |
GetLightValue | Get a light intensity |
SetLightValue | Set a light intensity |
GetLightAttenuation | Get a light attenuation |
SetLightAttenuation | Set a light attenuation |
GetLightFallOffEnd | Get a fall-off distance of a light |
SetLightFallOffEnd | Set a fall-off distance of a light |
GetLightFallOffHalf | Get a half-attenuation distance of a light |
SetLightFallOffHalf | Set a half-attenuation distance of a light |
Rendering flags | |
AddRenderFlag | Display the item forcely |
RemoveRenderFlag | Cancel the force displaying |
AddRenderEraseFlag | Hide the item forcely |
RemoveRenderEraseFlag | Cancel the force hiding |
User data | |
AllocUserData | Allocate an object user data |
FreeUserData | Free an object user data |
GetUserData | Get an object user data |
GetUserDataPart | Get an object user data partially |
SetUserData | Set an object user data |
SetUserDataPart | Set an object user data partially |
AllocVertexUserData | Allocate a vertex user data |
FreeVertexUserData | Free a vertex user data |
GetVertexUserData | Get a vertex user data |
GetVertexUserDataPart | Get a vertex user data partially |
SetVertexUserData | Set a vertex user data |
SetVertexUserDataPart | Set a vertex user data partially |
AllocFaceUserData | Allocate a face user data |
FreeFaceUserData | Free a face user data |
GetFaceUserData | Get a face user data |
GetFaceUserDataPart | Get a face user data partially |
SetFaceUserData | Set a face user data |
SetFaceUserDataPart | Set a face user data partially |
void MQObject::DeleteThis(void);
It deletes an object class.
This function is available for the object registered in a document. You must use
MQDocument::DeleteObject() to delete an object that is not registered
to any documents.
UINT MQObject::GetUniqueID(void);
(new in Rev2.40)
It gets an unique ID of this object.
An unique ID is assigned when an object is registered to the document by MQDocument::AddObject(). The Clone() function does not duplicate an unique ID.
int MQObject::GetType(void);
(new in Rev3.00)
It gets a type of this object.
void MQObject::SetType(int type);
(new in Rev3.00)
It sets a type of this object.
MQObject MQObject::Clone(void);
It duplicates this object class.
void MQObject::Merge(MQObject source);
The 'source' object merges to this object. A content of the 'source' object is not changed.
void MQObject::Freeze(DWORD flag);
It polygonizes attributes such as a patch or a mirroring.
void MQObject::GetName(char *buffer, int size);
It gets an object's name to the 'buffer'.
void MQObject::SetName(const char *buffer);
It sets an object's name.
BOOL MQObject::GetSelected();
(new in Rev3.10)
it gets a selection status of the object.
This selection indicates a status for multiple selections on the object panel. A current object can be obtained by MQDocument::GetCurrentObjectIndex().
void MQObject::SetSelected(BOOL flag);
(new in Rev3.10)
it sets a selection status of the object.
This selection indicates a status for multiple selections on the object panel. A current object can be set by MQDocument::SetCurrentObjectIndex().
int MQObject::GetVertexCount(void);
It gets a number of vertices.
The return value is not a number of vertices actually exist but a size of an array for vertices that contain deleted vertices. It is necessary to check whether MQObject::GetVertexRefCount() returns except 0 for each vertex to count an actual number of the vertices.
MQPoint MQObject::GetVertex(int index);
It gets a position of the specified vertex.
This function must be used for vertices return nonzero by
MQObject::GetVertexRefCount().
void MQObject::SetVertex(int index, MQPoint pts);
It sets a position of the specified vertex
void MQObject::GetVertexArray(MQPoint *ptsarray);
It gets positions of all the vertices in this object.
An number of an array of the 'ptsarray'
must be equal to or larger than the number returned by
MQObject::GetVertexCount().
int MQObject::AddVertex(MQPoint p);
It add a new vertex to this object.
It will return -1 if it failed to allocate the vertex data for out of memory.
BOOL MQObject::DeleteVertex(int index);
It deletes the specified vertex.
When a face has the specified vertex, the face will be also deleted together.
After deleting a vertex, The number returned by MQObject::GetVertexCount() will not be changed after deleting a vertex. And MQObject::GetVertexRefCount() for the specified index will return 0.
int MQObject::GetVertexRefCount(int index);
It gets how many faces use the specified vertex. The vertex does not exist when it returns 0.
A reference count is set 1 by MQObject::AddVertex(). MQObject::AddFace() makes it increase by one, and MQObject::DeleteFace() makes it decrease by one.
UINT MQObject::GetVertexUniqueID(int index);
(new in Rev2.40)
It gets an unique ID assigned to the specified vertex.
An unique ID is a value that is not overlapped to the other IDs of the other vertices in this object. You can use to identify a particular vertex since an unique is not changed whenever an index of the vertex is changed by Compact() and so on.
int MQObject::GetVertexIndexFromUniqueID(UINT unique_id);
(new in Rev2.40)
It gets an index of the vertex assigned the specified unique ID. It will return -1 if the vertex has been deleted or the unique ID originally does not exist.
UINT MQObject::GetVertexRelatedFaces(int vertex, int *faces);
(new in Rev3.00)
It gets faces shared with the specified vertex. This method can process faster than brute force with MQObject::GetFacePointArray().
It only gets a number of faces when NULL is specified for faces.
If except NULL is specified for faces, indices of the faces are stored. An array of faces must be same as or larger than the returned value.
DWORD MQObject::GetVertexColor(int index);
(in Rev2.40)
This function is obsolete. You can use MQObject::GetFaceVertexColor() to get vertex colors.
void MQObject::SetVertexColor(int index, DWORD color);
(in Rev2.40)
This function is obsolete. You can use MQObject::SetFaceVertexColor() to set vertex colors.
float MQObject::GetVertexWeight(int index);
It gets a weight value for a patch in the specified vertex.
The weight value will be from 0 to 1.
void MQObject::SetVertexWeight(int index, float value);
It sets a weight value for a patch in the specified vertex.
The weight value must be from 0 to 1.
void MQObject::CopyVertexAttribute(int vert1, MQObject obj2, int vert2);
It copies attributes currently assigned to vert2 in obj2, such as a visibility, a fixed status, a vertex color and a weight, to vert1.
int MQObject::GetFaceCount(void);
It gets a number of faces in this object.
The return value is not a number of faces actually exist but a size of an array for faces that contain deleted faces. It is necessary to check whether MQObject::GetFacePointCount() returns except 0 for each face to count an actual number of the faces.
int MQObject::GetFacePointCount(int face);
It gets a number of vertices in the specified face.
When 0 is returned, the face has been deleted by MQObject::DeleteFace() and it is no more.
(in Rev4.00)
Not only 4 or less but also 5 or larger number is returned for a polygon.
void MQObject::GetFacePointArray(int face, int *vertex);
It gets an array of indices of vertices in the specified face.
The 'vertex' must be equal or larger size of an array than the number returned by MQObject::GetFacePointCount().
void MQObject::GetFaceCoordinateArray(int face, MQCoordinate *uvarray);
It gets UV coordinates array of the vertices in the specified face.
The 'uvarray' must be equal or larger size of an array than the number returned by MQObject::GetFacePointCount().
void MQObject::SetFaceCoordinateArray(int face, MQCoordinate *uvarray);
It sets UV coordinates of the vertices in the specified face with an array.
The 'uvarray' must be equal or larger size of an array than the number returned by MQObject::GetFacePointCount().
DWORD MQObject::GetFaceVertexColor(int face, int vertex);
(new in Rev2.30)
It gets a vertex color of the vertex in the specified face.
The 'vertex' must be lesser than the number obtained by MQObject::GetFacePointCount().
The 32-bit DWORD of color consists of opacity (0xFF000000), red (0x000000FF), green (0x0000FF00) and blue (0x00FF0000).
void MQObject::SetFaceVertexColor(int face, int vertex, DWORD color);
(new in Rev2.30)
It sets a vertex color of the vertex in the specified face.
The 'vertex' must be lesser than the number obtained by MQObject::GetFacePointCount().
The 32-bit DWORD of color consists of opacity (0xFF000000), red (0x000000FF), green (0x0000FF00) and blue (0x00FF0000).
float MQObject::GetFaceEdgeCrease(int face, int line);
(new in Rev3.10)
It gets a crease for a patch in a specified edge.
line must be lesser than a number returned by MQObject::GetFacePointCount().
void MQObject::SetFaceEdgeCrease(int face, int vertex, float crease);
(new in Rev3.10)
It sets a crease for a patch in the specified edge.
line must be lesser than a number returned by MQObject::GetFacePointCount().
crease must be 0 or 1 for Catmull-Clark subdivision, and be 0 or larger for OpenSubdiv subdivision.
BOOL MQObject::GetFaceVisible(int face);
(new in Rev3.00)
It gets a visibility of the specified face.
You can use MQScene::GetVisibleFace() if you want to know the current visible state in the scene with the view angle and display options.
void MQObject::SetFaceVisible(int face, BOOL flag);
(new in Rev3.00)
It sets a visibility of the specified face.
int MQObject::GetFaceMaterial(int face);
It gets an index of the material assigned to the specified face.
-1 will be returned when any material does not be assigned to the face.
void MQObject::SetFaceMaterial(int face, int material);
It assigns the material to the specified face.
UINT MQObject::GetFaceUniqueID(int face);
(new in Rev2.40)
It gets an unique ID assigned to the specified face.
An unique ID is a value that is not overlapped to the other IDs of the other faces in this object. You can use to
identify a particular face since an unique is not changed whenever an index of the face is changed by
Compact() and so on.
int MQObject::GetFaceIndexFromUniqueID(UINT unique_id);
(new in Rev2.40)
It gets an index of the face with the specified unique ID. It will return -1 if the face has been deleted or the
unique ID originally does not exist.
int MQObject::AddFace(int count, int *index);
It adds a new face to this object. The face has 'count' number of indices of vertices contained in 'index'.
It means a line when the 'count' is 2.
It returns -1 when it is impossible to allocate data for faces because the lack of the memory.
int MQObject::InsertFace(int face_index, int count, int *vert_index);
(new in Rev4.10)
It adds a new face into the specified index by face_index. The index of the face must be already deleted by MQObject::DeleteFace().
The face has 'count' number of indices of vertices contained in 'index'.
It means a line when the 'count' is 2.
It returns -1 when a face already exists in the specified index or it is impossible to allocate data for faces because the lack of the memory.
BOOL MQObject::DeleteFace(int index);
It deletes the specified face.
A vertex which is contained by only this face is also deleted automatically.
After deleting, the number obtained by MQObject::GetFaceCount() is not changed, and MQObject::GetFacePointCount() with the index of the deleted face returns 0.
BOOL MQObject::InvertFace(int index);
It inverts a direction of the face.
void MQObject::OptimizeVertex(float distance, MQBool *apply);
It combines the vertices which are in the specified 'distance' among the vertices in this object.
When a size of an array of 'apply' is same as a number of a vertices, it can specify whether combine together for every vertex. When 'apply' is NULL, all the vertices are the targets of combination.
After loading a file like DXF that a position of a vertex is directly contained in a face information, it is very effective to use this API.
void MQObject::Compact(void);
It shortens arrays for vertices in this object by removing deleted vertices which return 0 by MQObject::GetVertexRefCount(), and arrays for faces by removing deleted faces which return 0 by MQObject::GetFacePointCount().
Please be careful that the indices of vertices and faces will be changed.
It is recommended to call this function after doing large operations for the object. It will make the amount of the data in this object smaller.
DWORD MQObject::GetVisible(void);
It gets a visibility of this object.
The return value will be changed that it specifies the visibilities of the vertices, lines and faces with bit mask in the future version.
void MQObject::SetVisible(DWORD visible);
It sets a visibility of this object.
The return value will be changed that it specifies the visibilities of the vertices, lines and faces with bit mask in the future version.
DWORD MQObject::GetPatchType(void);
It gets a type of a patch specified to this object.
void MQObject::SetPatchType(DWORD type);
It specifies a type of a patch to this object.
int MQObject::GetPatchSegment(void);
It gets a division number of a patch specified to this object.
void MQObject::SetPatchSegment(int segment);
It specifies a division number of a patch to this object.
BOOL MQObject::GetPatchTriangle(void);
(new in Rev3.10)
It gets a method of a division for triangles when a Catmull-Clark subdivision scheme is applied.
void MQObject::SetPatchTriangle(BOOL flag);
(new in Rev3.10)
It sets a method of a division for triangles when a Catmull-Clark subdivision scheme is applied.
BOOL MQObject::GetPatchSmoothTriangle(void);
(new in Rev4.20)
It gets a method of a smoothing for triangles when a OpenSubdiv subdivision scheme is applied.
void MQObject::SetPatchSmoothTriangle(BOOL flag);
(new in Rev4.20)
It sets a method of a smoothing for triangles when a OpenSubdiv subdivision scheme is applied.
int MQObject::GetPatchMeshInterp(void);
(new in Rev4.30)
It returns an interpolation method for open faces when a OpenSubdiv subdivision scheme is applied.
void MQObject::SetPatchMeshInterp(int interp);
(new in Rev4.30)
It specifies an interpolation method for open faces when a OpenSubdiv subdivision scheme is applied.
int MQObject::GetPatchUVInterp(void);
(new in Rev4.30)
It returns an interpolation method for UV borders when a OpenSubdiv subdivision scheme is applied.
void MQObject::SetPatchUVInterp(int interp);
(new in Rev4.30)
It specifies an interpolation method for UV borders when a OpenSubdiv subdivision scheme is applied.
int MQObject::GetShading(void);
(new in Rev2.10)
It gets a type of a smoothing specified to this object.
void MQObject::SetShading(int type);
(new in Rev2.10)
It specifies a type of a smoothing to this object.
float MQObject::GetSmoothAngle(void);
(new in Rev2.10)
It gets a smoothing angle specified to this object.
The angle will be from 0 to 180.
void MQObject::SetSmoothAngle(float degree);
(new in Rev2.10)
It specifies a smoothing angle specified to this object.
The 'degree' must be from 0 to 180.
int MQObject::GetMirrorType(void);
(new in Rev2.10)
It gets a type of mirroring specified to this object.
void MQObject::SetMirrorType(int type);
(new in Rev2.10)
It specifies a type of mirroring to this object.
DWORD MQObject::GetMirrorAxis(void);
(new in Rev2.10)
It gets an axis of mirroring specified to this object.
void MQObject::SetMirrorAxis(DWORD axis);
(new in Rev2.10)
It specifies an axis of mirroring to this object.
float MQObject::GetMirrorDistance(void);
(new in Rev2.10)
It gets a maximum distance to connect the left and right side for a mirroring.
void MQObject::SetMirrorDistance(float dis);
(new in Rev2.10)
It specifies a maximum distance to connect the left and right side for a mirroring.
int MQObject::GetLatheType(void);
(new in Rev2.10)
It gets a type of a lathe specified to the object.
void MQObject::SetLatheType(int type);
(new in Rev2.10)
It specifies a type of a lathe.
DWORD MQObject::GetLatheAxis(void);
(new in Rev2.10)
It gets a rotation axis of a lathe specified to the object.
void MQObject::SetLatheAxis(DWORD axis);
(new in Rev2.10)
It specifies a rotation axis of a lathe to the object.
int MQObject::GetLatheSegment(void);
(new in Rev2.10)
It gets a division number of a lathe specified to the object.
void MQObject::SetLatheSegment(int segment);
(new in Rev2.10)
It specifies a division number of a lathe to the object.
int MQObject::GetDepth(void);
(new in Rev2.40)
It gets a depth of the hierarchy of this object. 0 will be returned if this object is at the root.
A depth is not duplicated by Clone().
void MQObject::SetDepth(int depth);
(new in Rev2.40)
It sets a depth of the hierarchy of this object.
Please be careful for the mismatching of a hierarchy when you specify the depth.
BOOL MQObject::GetFolding(void);
(new in Rev2.40)
It gets whether the children are folded up and they are invisible in the object panel.
void MQObject::SetFolding(BOOL flag);
(new in Rev2.40)
It sets the object to be invisible by folding up in the object panel.
BOOL MQObject::GetLocking(void);
(new in Rev2.40)
It gets whether the object is disabled to edit.
void MQObject::SetLocking(BOOL flag);
(new in Rev2.40)
It sets an object to be disabled to edit or be editable.
MQColor MQObject::GetColor(void);
(new in Rev2.40)
It returns a displayed color for vertices and lines.
void MQObject::SetColor(MQColor color);
(new in Rev2.40)
It sets a displayed color for vertices and lines.
The specified color is not applied until you set TRUE inl SetColorValid().
BOOL MQObject::GetColorValid(void);
(new in Rev2.40)
It returns whether the displayed color is valid or invalid.
When it is invalid, vertices and lines are displayed with a default color.
void MQObject::SetColorValid(BOOL flag);
(new in Rev2.40)
It sets whether the displayed color is valid or invalid.
When it is invalid, vertices and lines are displayed with a default color.
MQPoint MQObject::GetScaling(void);
(new in Rev2.40)
It gets a scaling factor in a local coordinate.
void MQObject::SetScaling(MQPoint scale);
(new in Rev2.40)
It sets a scaling factor in a local coordinate.
MQAngle MQObject::GetRotation(void);
(new in Rev2.40)
It gets a rotation angle in a local coordinate.
void MQObject::SetRotation(MQAngle angle);
(new in Rev2.40)
It sets a rotation angle in a local coordinate.
MQPoint MQObject::GetTranslation(void);
(new in Rev2.40)
It gets a translation in a local coordinate.
void MQObject::SetTranslation(MQPoint trans);
(new in Rev2.40)
It sets a translation in a local coordinate.
MQMatrix MQObject::GetLocalMatrix(void);
(new in Rev2.40)
It gets a transform matrix of a local coordinate.
void MQObject::SetLocalMatrix(const MQMatrix& mtx);
(new in Rev2.40)
It sets a transform matrix of a local coordinate.
MQMatrix MQObject::GetLocalInverseMatrix(void);
(new in Rev2.40)
It gets an inverse transform matrix of a local coordinate.
float MQObject::GetLightValue(void);
(new in Rev3.00)
It gets an intensity of a light for a lighting object.
void MQObject::SetLightValue(float value);
(new in Rev3.00)
It sets an intensity of a light for a lighting object.
int MQObject::GetLightAttenuation(void);
(new in Rev3.00)
It gets a light attenuation from a lighting object.
void MQObject::SetLightAttenuation(int value);
(new in Rev3.00)
It sets a light attenuation to a lighting object.
float MQObject::GetLightFallOffEnd(void);
(new in Rev3.00)
It gets an end distance of a light attenuation from a lighting object.
void MQObject::SetLightAttenuation(float distance);
(new in Rev3.00)
It sets an end distance of a light attenuation to a lighting object.
float MQObject::GetLightFallOffHalf(void);
(new in Rev3.00)
It gets a half-attenuation distance of a light from a lighting object.
void MQObject::SetLightFallOffHalf(float distance);
(new in Rev3.00)
It sets a half-attenuation distance of a light to a lighting object.
void MQObject::AddRenderFlag(MQOBJECT_RENDER_FLAG flag);
(new in Rev4.02)
It enabled to display the specified item forcely.
This functions is usually applied for objects created by MQStationPlugin::CreateDrawingObject().
void MQObject::RemoveRenderFlag(MQOBJECT_RENDER_FLAG flag);
(new in Rev4.02)
It cancels a force display for the specified item.
void MQObject::AddRenderEraseFlag(MQOBJECT_RENDER_FLAG flag);
(new in Rev4.02)
It enabled to hide the specified item forcely.
This functions is usually applied for objects created by MQStationPlugin::CreateDrawingObject().
void MQObject::RemoveRenderEraseFlag(MQOBJECT_RENDER_FLAG flag);
(new in Rev4.02)
It cancels a force hiding for the specified item.
BOOL MQObject::AllocUserData(int userdata_id);
(new in Rev3.10)
It allocates a memory area for an user data in the object.
It uses an user data ID created by MQDocument::CreateObjectUserData() for 'userdata_id'.
When an user data that is already allocated is specified, this function will return TRUE without performing anything.
Please do not allocate an user data until it is actually needed because it is necessary for a memory.
void MQObject::FreeUserData(int userdata_id);
(new in Rev3.10)
It frees a memory area for an user data allocated by MQObject::AllocUserData().
Please free it immediately when it is not necessary any longer. A memory will be wasted if it continues allocating carelessly.
BOOL MQObject::GetUserData(int userdata_id, void *buffer);
(new in Rev3.10)
It gets an user data for an object.
A size of buffer must be equal to or larger than a size specified in MQDocument::CreateObjectUserData().
It will return FALSE when you specify an user data that has not been allocated yet. And the buffer are filled with 0 when you specify an user data that has not been set yet by MQObject::SetUserData().
BOOL MQObject::GetUserDataPart(int userdata_id, int offset, int copy_bytes, void *buffer);
(new in Rev3.10)
It partially gets an user data for an object.
An area begins from the offset is stored to the buffer.
A size of buffer must be equal to or larger than copy_bytes. A whole user data, that is, a number of bytes specified in MQDocument::CreateObjectUserData() is copied when 0 is specified for copy_bytes.
It will return FALSE when you specify an user data that has not been allocated yet. And the buffer are filled with 0 when you specify an user data that has not been set yet by MQObject::SetUserData().
BOOL MQObject::SetUserData(int userdata_id, const void *buffer);
(new in Rev3.10)
It sets an user data with the buffer.
A size of buffer must be equal to or larger than a size specified in MQDocument::CreateObjectUserData().
It will return FALSE when you specify an user data that has not been allocated yet.
BOOL MQObject::SetUserDataPart(int userdata_id, int offset, int copy_bytes, const void *buffer);
(new in Rev3.10)
It partially sets an user data for an object.
A data in the buffer is copied to an area begins from the offset.
A size of buffer must be equal to or larger than copy_bytes. A whole user data, that is, a number of bytes specified in MQDocument::CreateObjectUserData() is copied when 0 is specified for copy_bytes.
It will return FALSE when you specify an user data that has not been allocated yet.
BOOL MQObject::AllocVertexUserData(int userdata_id);
(new in Rev3.10)
It allocates a memory area for an user data in vertices.
It uses an user data ID created by MQDocument::CreateVertexUserData() for 'userdata_id'.
When an user data that is already allocated is specified, this function will return TRUE without performing anything.
Please do not allocate an user data until it is actually needed because it is necessary for a memory.
void MQObject::FreeVertexUserData(int userdata_id);
(new in Rev3.10)
It frees a memory area for an user data allocated by MQObject::AllocVertexUserData().
Please free it immediately when it is not necessary any longer. A memory will be wasted if it continues allocating carelessly.
BOOL MQObject::GetVertexUserData(int userdata_id, void *buffer);
(new in Rev3.10)
It gets an user data for a vertex.
A size of buffer must be equal to or larger than a size specified in MQDocument::CreateVertexUserData().
It will return FALSE when you specify an user data that has not been allocated yet. And the buffer are filled with 0 when you specify an user data that has not been set yet by MQObject::SetVertexUserData().
BOOL MQObject::GetVertexUserDataPart(int userdata_id, int vertex_start_index, int copy_vertex_num, int offset, int copy_bytes, void *buffer);
(new in Rev3.10)
It partially gets an user data for a vertex (or vertices).
An area begins from the offset is stored to the buffer.
A size of buffer must be equal to or larger than copy_bytes. A whole user data, that is, a number of bytes specified in MQDocument::CreateVertexUserData() is copied when 0 is specified for copy_bytes.
It will return FALSE when you specify an user data that has not been allocated yet. And the buffer are filled with 0 when you specify an user data that has not been set yet by MQObject::SetVertexUserData().
BOOL MQObject::SetVertexUserData(int userdata_id, const void *buffer);
(new in Rev3.10)
It sets an user data with the buffer.
A size of buffer must be equal to or larger than a size specified in MQDocument::CreateVertexUserData().
It will return FALSE when you specify an user data that has not been allocated yet.
BOOL MQObject::SetVertexUserDataPart(int userdata_id, int vertex_start_index, int copy_vertex_num, int offset, int copy_bytes, const void *buffer);
(new in Rev3.10)
It partially sets an user data for a vertex (or vertices).
A data in the buffer is copied to an area begins from the offset.
A size of buffer must be equal to or larger than copy_bytes. A whole user data, that is, a number of bytes specified in MQDocument::CreateVertexUserData() is copied when 0 is specified for copy_bytes.
It will return FALSE when you specify an user data that has not been allocated yet.
BOOL MQObject::AllocFaceUserData(int userdata_id);
(new in Rev3.10)
It allocates a memory area for an user data in vertices.
It uses an user data ID created by MQDocument::CreateFaceUserData() for 'userdata_id'.
When an user data that is already allocated is specified, this function will return TRUE without performing anything.
Please do not allocate an user data until it is actually needed because it is necessary for a memory.
void MQObject::FreeFaceUserData(int userdata_id);
(new in Rev3.10)
It frees a memory area for an user data allocated by MQObject::AllocFaceUserData().
Please free it immediately when it is not necessary any longer. A memory will be wasted if it continues allocating carelessly.
BOOL MQObject::GetFaceUserData(int userdata_id, void *buffer);
(new in Rev3.10)
It gets an user data for a face.
A size of buffer must be equal to or larger than a size specified in MQDocument::CreateFaceUserData().
It will return FALSE when you specify an user data that has not been allocated yet. And the buffer are filled with 0 when you specify an user data that has not been set yet by MQObject::SetFaceUserData().
BOOL MQObject::GetFaceUserDataPart(int userdata_id, int face_start_index, int copy_face_num, int offset, int copy_bytes, void *buffer);
(new in Rev3.10)
It partially gets an user data for a face (or faces).
An area begins from the offset is stored to the buffer.
A size of buffer must be equal to or larger than copy_face_num*copy_bytes. A whole user data, that is, a number of bytes specified in MQDocument::CreateFaceUserData() is copied when 0 is specified for copy_bytes.
It will return FALSE when you specify an user data that has not been allocated yet. And the buffer are filled with 0 when you specify an user data that has not been set yet by MQObject::SetFaceUserData().
BOOL MQObject::SetFaceUserData(int userdata_id, const void *buffer);
(new in Rev3.10)
It sets an user data with the buffer.
A size of buffer must be equal to or larger than a size specified in MQDocument::CreateFaceUserData().
It will return FALSE when you specify an user data that has not been allocated yet.
BOOL MQObject::SetFaceUserDataPart(int userdata_id, int face_start_index, int copy_face_num, int offset, int copy_bytes, const void *buffer);
(new in Rev3.10)
It partially sets an user data for a face (or faces).
A data in the buffer is copied to an area begins from the offset.
A size of buffer must be equal to or larger than copy_face_num*copy_bytes. A whole user data, that is, a number of bytes specified in MQDocument::CreateFaceUserData() is copied when 0 is specified for copy_bytes.
It will return FALSE when you specify an user data that has not been allocated yet.