User Tools

Site Tools


DzFigure

Implements a weight mapped defined figure.

More...

Inherits :

Static Methods

DAZ Script
DzFigureconvertPropToFigure ( DzNode srcNode, String rootBoneName, Boolean localMaps=true, Boolean inheritSkeleton=true )

Constructors

DAZ Script
DzFigure ()

Methods

Signals

Detailed Description

A specialization of DzSkeleton that represents a figure where the associated geometry is bound to its bones using a set of weight maps.

When serving the role of “follower”, this type of figure supports “culling” (hiding) facets in the geometry of another figure (i.e., a “follow target”). This can be useful for purposes of hiding areas of an underlying figure to mitigate occurrences of “poke-through” (visible intersection of meshes), where an inner-layer mesh is revealed through an outer-layer mesh.

Further, this type of figure also supports “grafting” (integrating) its geometry into the geometry of another figure (i.e., a “follow target”). In horticultural terms, the “follower” serves the role of “scion” and the “follow target” serves the role of “stock.”

“Grafting” between the geometries of figures relies on them each having vertices that are exactly coincident in their respective base shapes. “Culling” can be used to create an open edge in the “stock” that matches an open edge in the “scion” in order to establish a “graft” that blends smoothly, when a “follower” is assigned a “follow target.”

See Also:

Static Methods


DzFigure : convertPropToFigure( DzNode srcNode, String rootBoneName, Boolean localMaps=true, Boolean inheritSkeleton=true )

Attempts to convert a simple node with geometry into a figure.

Parameter(s):

  • srcNode - The source node to convert.
  • rootBoneName - The name to assign to the root bone of the figure.
  • localMaps - If true (default), local weight maps will be created, otherwise a general weight map will be created.
  • inheritSkeleton - If true (default) and srcNode is parented to a bone, the skeleton that bone belongs to and the bone hierarchy up to that bone will be used to create the new figure.

Return Value:

  • The figure produced by the conversion (if any), otherwise null.

Constructors


DzFigure()

Default Constructor. Creates a new weight map based figure.

Methods


void : addFollowTargetHiddenFace( Number faceIdx )

Adds a face in the figure that this figure is following (if any) to hide.

Parameter(s):

  • faceIdx - The index of the face to hide.

void : addWeldPoint( Number followerIdx, Number targetIdx, Boolean notifyChange=true )

Adds a pair of vertex indices in the geometry of this figure, and in the geometry of the figure that this figure is following (if any), to the list of vertices to weld together in order to “graft” (integrate) them.

Parameter(s):

  • followerIdx - The index of the vertex in the geometry of this figure.
  • targetIdx - The index of the vertex in the geometry of the follow target.
  • notifyChange - If true (default), notifies listeners of the weldListChanged() signal.

void : clearFollowTargetHiddenFaces()

Clears the list of faces to hide in the figure that this figure is following (if any).


void : clearWeldPoints()

Clears the list of vertex index pairs used to weld vertices in the geometry of this figure to vertices in the geometry of another figure.

Since:

  • 4.9.0.53

DzFigure : getCullFigure( Number which )

Parameter(s):

  • which - The index of the figure that is culling this figure.

Return Value:

  • The figure that is culling (hiding geometry of) this figure at the specified index (if valid), otherwise null.

Number : getFollowerWeldIndex( Number which )

Parameter(s):

  • which - The index of the vertex index pair to weld.

Return Value:

  • The index of the vertex in the geometry of this figure.

Number : getFollowTargetFaceCount()

Return Value:

  • The face count of the figure that this figure is following (if any).

Number : getFollowTargetVertexCount()

Return Value:

  • The vertex count of the figure that this figure is following (if any).

Number : getFollowTargetWeldIndex( Number which )

Parameter(s):

  • which - The index of the vertex index pair to weld.

Return Value:

  • The index of the vertex in the geometry of the follow target.

DzFigure : getGraftFigure( Number which )

Parameter(s):

  • which - The index of the figure that is grafting into this figure.

Return Value:

  • The figure that is grafting (integrating its geometry) into this figure at the specified index (if valid), otherwise null.

Number : getNumCullFigures()

Return Value:

  • The number of figures that are culling (hiding geometry of) this figure.

Number : getNumFollowTargetHiddenFaces()

Return Value:

  • The number of faces in the figure that this figure is following (if any) to hide.

Number : getNumGraftFigures()

Return Value:

  • The number of figures that are grafting (integrating their geometry) into this figure.

Number : getNumWeldPoints()

Return Value:

  • The number of vertex index pairs in the list of vertices to weld together between the geometry of this figure, and the geometry of the figure that this figure is following (if any), in order to “graft” (integrate) them.

DzSkinBinding : getSkinBinding()

Return Value:

  • The skin binding for this figure

See Also:


Boolean : isGraftFollowing()

Return Value:

  • true if a follower is grafting to this figure, otherwise false.

DzError : mergeFollowers()

Merges all current followers of this figure into a single follower.

Attention:

  • It is the responsibility of a developer to perform the appropriate checks to ensure followers exist and can be merged prior to calling this function.

Return Value:

  • DZ_NO_ERROR on success, otherwise an appropriate error code.

Since:

  • 4.6.3.0

void : optimizeWeldPoints()

Optimizes the list of vertex index pairs used to weld vertices in the geometry of this figure to vertices in the geometry of another figure - removes duplicates and releases any memory not required to store the items.

See Also:

Since:

  • 4.9.0.53

void : presizeFollowTargetHiddenFaces( Number num )

Pre-sizes the list of faces to hide in the figure that this figure is following (if any).

Parameter(s):

  • num - The number of faces that will be hidden.

void : presizeWeldPoints( Number num )

Pre-sizes the list of vertex index pairs used to “graft” (integrate) the geometry of this figure into the geometry of the figure that this figure is following (if any).

Parameter(s):

  • num - The number of vertex index pairs.

void : removeDuplicateWeldPoints()

Removes duplicates from the list of vertex index pairs used to weld vertices in the geometry of this figure to vertices in the geometry of another figure.

Since:

  • 4.9.0.53

void : removeWeldPoint( Number which )

Removes a pair of vertex indices in the geometry of this figure, and in the geometry of the figure that this figure is following (if any), from the list of vertices to weld together in order to “graft” (integrate) them.

Parameter(s):

  • which - The index of the pair to remove.

Since:

  • 4.9.0.53

void : setFollowTargetFaceCount( Number num )

Stores the face count of the figure that this figure is following (if any).

Parameter(s):

  • num - The number of faces.

void : setFollowTargetVertexCount( Number num )

Stores the vertex count of the figure that this figure is following (if any).

Parameter(s):

  • num - The number of vertices.

Boolean : willGraftInDraw()

Return Value:

  • true if this figure will graft during drawing operations, otherwise false.

Since:

  • 4.9.2.58

Boolean : willGraftInRender( DzRenderSettings settings=null )

Parameter(s):

  • settings - The render settings that will be used during the render operation.

Return Value:

  • true if this figure will graft during rendering operations, otherwise false.

Since:

  • 4.9.2.58

Signals


void : followTargetHiddenListChanged()

Signature:“followTargetHiddenListChanged()”

Emitted when the list of hidden facets in the geometry of a follow target has changed.


void : graftListChanged()

Signature:“graftListChanged()”

Emitted when the list of figures that “graft” (integrate) their geometries into the geometry of this figure has changed.


void : weldListChanged()

Signature:“weldListChanged()”

Emitted when the number of vertex index pairs in the list of vertices to weld together, between the geometry of this figure and the geometry of the follow target (if any), has changed.