Object Editing Functions

The following functions can be used to control the interactive editing of an object.

Function NameDescription
XintView3DChangeEditVectorDirChanges the direction of the edit vector.
XintView3DChangeEditVectorLocChanges the location of the edit vector.
XintView3DDisableEditVectorDisable editing of objects.
XintView3DVectorGetCountGet the number of vertices in the specified object.
XintView3DVectorGetValueGet the object vertex value at the specified index.
XintView3DEnableEditVectorEnable editing of objects.
XintView3DUpdateModelRecalculate the object limits after an object has been modified.
XintView3DUpdateObjectUpdate an object after it has been edited.
XintView3DVectorSetValueSet a new vertex value for the specified object.


XintView3DChangeEditVectorDir

This function changes the direction of the edit vector.

     void XintView3DChangeEditVectorDir (...)

WidgetwidgetID of the View3D widget.
XintVector3new_directionThe new direction for the edit vector.


XintView3DChangeEditVectorLoc

This function changes the location of the edit vector.

     void XintView3DChangeEditVectorLoc (...)

WidgetwidgetID of the View3D widget.
XintVector3new_locationThe new location for the edit vector.


XintView3DDisableEditVector

This function can be used to terminate editing of an object's point. It can be called only if function XintView3DEnableEditVector has been previously called. Function XintView3DDisableEditVector removes the vector used to guide editing and changes the cursor back to its original mode.

     void XintView3DDisableEditVector (...)

WidgetwidgetID of the View3D widget.


XintView3DVectorGetCount

This function returns the number of vertices contained in the specified object.

     int XintView3DVectorGetCount (...)

XintView3DObject *objectID of the object of interest.


XintView3DVectorGetValue

This function returns the value of an object vertex at the specified index.

     void XintView3DVectorGetValue (...)

XintView3DObject *objectThe object (must be a Surface, Line or Point object).
intindexIndex of the vertex (between 0 and nvertices-1).
XintVector3valueContains the value of the vertex at the specified index when the function returns.


XintView3DEnableEditVector

This function enables the editing of objects. It draws a colored line showing the location of the vertex being edited and the direction where editing is permitted.

     void XintView3DEnableEditVector (...)

WidgetwidgetView3D widget.
XintVector3locationOrigin of the point to edit.
XintVector3directionDirection where editing is constrained.
XintView3DEditVectorTypetypeSet to XintEDIT_VECTOR_LINE.
XintView3DEditVectorLimitslimitsSet to XintLIMIT_NONE for no limits, or XintLIMIT_MODEL to limit to model boundary, or XintLIMIT_USER to limit to user coords specified as next two arguments.
XintVector3top_user_limitTop user limit.
XintVector3bot_user_limitBottom user limit.


XintView3DUpdateModel

This function recalculates the limits of the model (maximum and minimum values in X, Y and Z across all objects). It should be called after an object has been edited only if argument limit_to_model (see function XintView3DEnableEditVector) was set to False.

     void XintView3DUpdateModel (...)

WidgetwidgetID of the View3D widget.


XintView3DUpdateObject

This function must be called after editing of an object's point or points is completed. It is required so that new normals and internal structures can be recalculated.

     void XintView3DUpdateObject (...)

XintView3DObjectobjectID of the View3D object of interest.


XintView3DVectorSetValue

This function is used to modify the vertex value of an object.

     void XintView3DVectorSetValue (...)

XintView3DObject *objectObject to modify (must be a Surface, Line or Point object).
intindexIndex of the vertex (between 0 and nvertices-1).
XintVector3valueNew vertex value.