User Tools

Site Tools


DzVertexMesh

Base class for meshes that have a list of vertices.

More...

Inherits :

Inherited By : DzFacetMesh

Methods

Signals

Detailed Description

Methods


void : activateVertexGroup( String name )

Activates a vertex group, creating it if it does not exist yet. All vertices added after this call will be added to the given group. To stop adding vertices to the group, you must call deactivateVertexGroup(). More than one vertex group can be active at a time.

Parameter(s):

  • name - The name of the vertex group to activate.

void : addToVertexGroup( String name )

Adds all selected vertices to the given group. Fails if the group does not exist.

Parameter(s):

  • name - The name of the group to add all selected vertices to.

Number : addVertex( Number x, Number y, Number z )

Parameter(s):

  • x - The X axis position of the vertex to add.
  • y - The Y axis position of the vertex to add.
  • z - The Z axis position of the vertex to add.

Return Value:

  • The index at which the vertex was added.

Number : addVertex( DzVec3 pnt )

Parameter(s):

  • pnt - The position of the vertex to add.

Return Value:

  • The index at which the vertex was added.

void : addVerticesFromMesh( DzVertexMesh mesh )

Adds all the vertices from the given mesh to this mesh.

Parameter(s):

  • mesh - The vertex mesh that contains the vertices to add to this mesh.

void : beginVertexSelectionEdit()

Begins an edit of the vertex selection. Must be called before editing vertex selection of the mesh and paired with a call to finishVertexSelectionEdit().


Boolean : createVertexGroup( String name )

Creates a new vertex group from the set of currently selected vertices.

Parameter(s):

  • name - The name to assign to the group.

Return Value:

  • true if there were vertices selected and the group was created, otherwise false.

void : deactivateAllVertexGroups()

Deactivates all vertex groups.


void : deactivateVertexGroup( String name )

Deactivates a vertex group.

Parameter(s):

  • name - The name of the vertex group to deactivate.

void : finishVertexSelectionEdit()

Finishes an edit of the vertex selection. Must be called after editing vertex selection of the mesh is completed and after beginVertexSelectionEdit() is called.


DzVertexGroup : getActiveVertexGroup( Number index )

Parameter(s):

  • index - The index of the vertex group.

Return Value:

  • The active vertex group at the specified index (if valid), otherwise null.

Array : getLockedVertices()

Return Value:

  • A list of locked vertex indicies.

Since:

  • 4.11.0.75

Number : getNumActiveVertexGroups()

Return Value:

  • The number of active vertex groups.

Number : getNumVertexGroups()

Return Value:

  • The number of vertex groups.

Number : getNumVertices()

Return Value:

  • The number of vertices in this geometry.

Array : getSelectedVertices()

Return Value:

  • A list of unlocked vertex indicies for the selected vertices.

Since:

  • 4.11.0.75

Array : getUnusedVertices()

Return Value:

  • A list of unlocked vertex indicies.

Since:

  • 4.11.0.75

DzVec3 : getVertex( Number index )

Parameter(s):

  • index - The index of the vertex.

Return Value:

  • The vertex at the specified index (if valid).

DzVertexGroup : getVertexGroup( Number index )

Parameter(s):

  • index - The index of the vertex group.

Return Value:

  • The vertex group at the specified index (if valid), otherwise null.

void : invertVertexSelection()

Inverts the selected state of vertices.


Boolean : isVertexLocked( Number index )

Parameter(s):

  • index - The index of the vertex to check.

Return Value:

  • true if the vertex at the given index is locked, otherwise false.

Attention:

  • index is not checked to for whether or not it is within the [0, getNumVertices() - 1] range.

Since:

  • 4.11.0.75

Boolean : isVertexSelected( Number index )

Parameter(s):

  • index - The index of the vertex to check.

Return Value:

  • true if the vertex at the given index is selected, otherwise false.

Attention:

  • index is not checked to for whether or not it is within the [0, getNumVertices() - 1] range.

DzError : preSizeVertexArray( Number numVerts )

Pre-sizes the array of vertices in this mesh. This function should only be called between calls to beginEdit() and finishEdit(). This allocates the memory needed to store the given number of vertices, but unlike setVertexArray() it does not change the number of vertices in the mesh - this is intended to presize the vertices array before using the addVertex() function. This should only be used when you know exactly how many vertices are going to be in the final list, or can approximate very accurately as any unused slots will be wasted.

Parameter(s):

  • numVerts - The number of vertices to presize to.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

void : selectAllVertices( Boolean onOff=true )

Selects/Deselects all vertices.

Parameter(s):

  • onOff - If true, selects all vertices. If false, deselects all vertices.

void : selectVertex( Number index, Boolean onOff=true )

Selects/deselects the vertex at the given index in the list.

Parameter(s):

  • index - The index of the vertex to select/deselect; must be in the [0, getNumVertices() - 1] range.
  • onOff - If true, selects the vertex. If false, deselects the vertex.

void : selectVerticesByIndexList( DzIndexList list, Boolean onOff=true )

Selects/Deselects a list of vertices.

Parameter(s):

  • list - The list of vertices to select/deselect.
  • onOff - If true, selects vertices in the list. If false, deselects vertices in the list.

void : setVertex( Number index, DzVec3 pnt )

Sets the vertex at the given index to the given position.

Parameter(s):

  • index - The index of the vertex to set the position of.
  • pnt - The position to move the vertex to.

void : setVertexArray( Number numVerts )

Resizes the vertex array to numVerts items. This can be used for fast mesh copying when converting from another kind of shape type, etc.

Parameter(s):

  • numVerts - The number of vertices to resize to.

Signals


void : topologyChanged()

Signature:“topologyChanged()”

Emitted when the topology of the geometry has changed.


void : vertexSelectionChanged()

Signature:“vertexSelectionChanged()”

Emitted when the vertex selection state has changed.