User Tools

Site Tools


DzGeometry

The base class for all mesh or geometry type objects.

More...

Inherits :

Inherited By : DzVertexMesh

Enumerations

Properties

Static Methods

DAZ Script
DzGeometrygetCurrentGeometryForNode ( DzNode node )

Methods

DAZ Script
voidbeginEdit ( Boolean enableUndo=true )
voidcancelEdit ()
BooleancopyFrom ( DzVertexMesh mesh, Boolean shareVerts=false, Boolean shareFacets=true )
voidfinishEdit ()
DzBox3getBoundingBox ()
DzBox3getGroupBoundingBox ( String groupName, DzMatrix3 transform )
DzBox3getGroupBoundingBox ( String groupName )
DzOrientedBox3getGroupOrientedBox ( String groupName, DzMatrix3 transform, DzVec3 pos, DzQuat rot, DzVec3 scale )
DzOrientedBox3getGroupOrientedBox ( String groupName, DzVec3 pos, DzQuat rot, DzVec3 scale )
NumbergetNumUVSets ()
NumbergetNumVertices ()
DzOrientedBox3getOrientedBox ( DzVec3 pos, DzQuat rot, DzVec3 scale )
NumbergetUniqueId ()
DzMapgetUVs ()
DzUVSetgetUVSet ( Number which )
BooleanisEmpty ()
BooleanisRuntimeGenerated ()
voidrotate ( DzQuat rot )
voidscale ( DzVec3 vec )
voidscale ( Number scalar )
voidtransform ( DzMatrix3 matrix )
voidtranslate ( DzVec3 vec )

Signals

voidneedRebuild ( Boolean onOff )
voidvisibilityChanged ()

Detailed Description

The base class for all mesh and geometry objects that can be referenced by DzShape, passed through the geometry pipeline, and drawn in the 3d view.

Enumerations

Properties


Boolean : hasPendingChanges

Holds whether or not this geometry has pending changes.

Since:

  • 4.9.2.8

Static Methods


DzGeometry : getCurrentGeometryForNode( DzNode node )

Parameter(s):

  • node - The node to get the geometry from.

Return Value:

  • The current geometry for node, or NULL if node has no geometry associated with it.

Since:

  • 4.9.3.57

Methods


void : beginEdit( Boolean enableUndo=true )

Parameter(s):

  • enableUndo - If true, operations performed on the geometry after this call will be undoable.

Begin an edit operation on the geometry. Most meshes will require that this function is called before any topology change (i.e., adding/removing vertices, polygons, etc).

Attention:


void : cancelEdit()

Cancel the current edit operation on the geometry.


Boolean : copyFrom( DzVertexMesh mesh, Boolean shareVerts=false, Boolean shareFacets=true )

Parameter(s):

  • mesh - The vertex mesh to make this a copy of.
  • shareVerts - If true, the vertex list will be shared between the given mesh and this mesh. If false, the vertex list will be a deep copy.
  • shareFacets - If true, the facet set will be shared between the given mesh and this mesh. If false, the facet set will be a deep copy.

Return Value:

  • true if this geometry is a copy of mesh (either already or as a result of this operation), otherwise false.

Since:

  • 4.9.3.57

void : finishEdit()

Finish the current edit operation on the geometry.


DzBox3 : getBoundingBox()

Return Value:

  • A local space bounding box for this geometry.

DzBox3 : getGroupBoundingBox( String groupName, DzMatrix3 transform )

Parameter(s):

  • groupName - The name of the group to get a bounding box for.
  • transform - The transform to apply to the box.

Return Value:

  • A box encompassing all geometry in the group named groupName (if any), transformed according to transform.

DzBox3 : getGroupBoundingBox( String groupName )

Parameter(s):

  • groupName - The name of the group to get the bounding box for.

Return Value:

  • A box encompassing all geometry in the group named groupName (if any).

DzOrientedBox3 : getGroupOrientedBox( String groupName, DzMatrix3 transform, DzVec3 pos, DzQuat rot, DzVec3 scale )

Parameter(s):

  • groupName - The name of the group to get an oriented bounding box for.
  • transform - The transform to apply to the box.
  • pos - The position to apply to the box.
  • rot - The rotation to apply to the box.
  • scale - The scale to apply to the box.

Return Value:

  • An oriented box encompassing all geometry in the group named groupName (if any), transformed according to transform, pos, rot and scale.

DzOrientedBox3 : getGroupOrientedBox( String groupName, DzVec3 pos, DzQuat rot, DzVec3 scale )

Parameter(s):

  • groupName - The name of the group to get an oriented bounding box for.
  • pos - The position to apply to the box.
  • rot - The rotation to apply to the box.
  • scale - The scale to apply to the box.

Return Value:

  • An oriented box encompassing all geometry in the group named groupName (if any), transformed according to pos, rot and scale.

Number : getNumUVSets()

Return Value:

  • The number of UV sets on this geometry.

Number : getNumVertices()

Return Value:

  • The number of vertices in this geometry.

DzOrientedBox3 : getOrientedBox( DzVec3 pos, DzQuat rot, DzVec3 scale )

Parameter(s):

  • pos - The vector that represents the position of the bounding box.
  • rot - The quaternion that represents the rotation of the bounding box.
  • scale - The vector that represents the scale of the bounding box.

Return Value:

  • A local space bounding box for this geometry.

Parameter(s):

  • pos - The position to apply to the box.
  • rot - The rotation to apply to the box.
  • scale - The scale to apply to the box.

Return Value:

  • An oriented box encompassing the geometry, transformed according to pos, rot and scale.

Number : getUniqueId()

Return Value:

  • A unique identifier for this geometry.

DzMap : getUVs()

Return Value:

  • The active UV set for this geometry.

DzUVSet : getUVSet( Number which )

Parameter(s):

  • which - The index of the UV set to get; must be in the [0, getNumUVSets() - 1] range.

Return Value:

  • The UV set at the specified index (if any), otherwise null.

Boolean : isEmpty()

Return Value:

  • true if the geometry is empty, otherwise false.

Boolean : isRuntimeGenerated()

Return Value:

  • true if this geometry is generated at runtime (rather than being read from file), otherwise false.

Since:

  • 4.11.0.292

void : rotate( DzQuat rot )

Rotate this geometry by the given rotation.

Parameter(s):

  • rot - The quaternion that represents the rotation the geometry should rotate itself by.

void : scale( DzVec3 vec )

Scale this geometry by the given vector.

Parameter(s):

  • vec - The vector that the geometry should scale itself by.

void : scale( Number scalar )

Scale this geometry by the given uniform scale.

Parameter(s):

  • scalar - The value that the geometry should scale itself by.

void : transform( DzMatrix3 matrix )

Transforms this geometry through the specified matrix. For multiple operations (i.e., translating and rotating, or rotating, scaling and translating) this method is the most efficient. For individual operations use the translate(), rotate() or scale() methods.

Parameter(s):

  • matrix - The matrix that the geometry should transform itself through.

void : translate( DzVec3 vec )

Translate this geometry by the given vector.

Parameter(s):

  • vec - The vector that the geometry should translate itself by.

Signals


void : needRebuild( Boolean onOff )

Signature:“needRebuild(bool)”

Emitted when the geometry needs to be rebuilt.

Parameter(s):

  • onOff - Whether or not the geometry needs to be rebuilt.

void : visibilityChanged()

Signature:“visibilityChanged()”

Emitted when the visibility of the geometry has changed.