User Tools

Site Tools


DzVertexMap

Implements a map with one value per vertex, as well as supporting discontinuous values.

More...

Inherits :

Inherited By : DzUVSet

Constructors

DAZ Script
DzVertexMap ( MapType mapType=FLOAT_MAP )

Methods

DAZ Script
voidaddDctFloatValue ( Number vertexIdx, Number facetIdx, Number val )
voidaddDctIntValue ( Number vertexIdx, Number facetIdx, Number val )
voidaddDctPnt2Vec ( Number vertexIdx, Number facetIdx, DzVec3 val )
voidaddDctPnt3Vec ( Number vertexIdx, Number facetIdx, DzVec3 val )
voidaddDctShortValue ( Number vertexIdx, Number facetIdx, Number val )
voidclearDiscontinuousData ()
NumbergetMapIndex ( Number vertexIdx, Number facetIdx )
NumbergetNumDiscontinuousVerts ()
NumbergetTargetVertexCount ()
voidpreSizeDiscontinuous ( Number disconCount )
voidsetDctIndex ( Number vertexIdx, Number facetIdx, Number mapIdx )
voidsetTargetVertexCount ( Number vertCount )
voidsqueezeDiscontinuous ()
voidupdateDctValue ( Number oldIdx, Number newIdx, Number facetIdx )

Detailed Description

This class maps an arbitrary numeric value to a vertex in the geometry. It should always contain at a minimum one value per vertex. It also supports discontinuous vertex maps - where different facets can have different values for the same vertex.

Constructors


DzVertexMap( MapType mapType=FLOAT_MAP )

Creates a new vertex map of the given type.

Parameter(s):

  • mapType - The type of data that will be stored in this map.

Methods


void : addDctFloatValue( Number vertexIdx, Number facetIdx, Number val )

Adds a discontinuous data item to the map.

Parameter(s):

  • vertexIdx - The index of the vertex that this data is for.
  • facetIdx - The index of the facet that this data is for.
  • val - The data value to add to the map.

void : addDctIntValue( Number vertexIdx, Number facetIdx, Number val )

Adds a discontinuous data item to the map.

Parameter(s):

  • vertexIdx - The index of the vertex that this data is for.
  • facetIdx - The index of the facet that this data is for.
  • val - The data value to add to the map.

void : addDctPnt2Vec( Number vertexIdx, Number facetIdx, DzVec3 val )

Adds a discontinuous data item to the map.

Parameter(s):

  • vertexIdx - The index of the vertex that this data is for.
  • facetIdx - The index of the facet that this data is for.
  • val - The data value to add to the map.

void : addDctPnt3Vec( Number vertexIdx, Number facetIdx, DzVec3 val )

Adds a discontinuous data item to the map.

Parameter(s):

  • vertexIdx - The index of the vertex that this data is for.
  • facetIdx - The index of the facet that this data is for.
  • val - The data value to add to the map.

void : addDctShortValue( Number vertexIdx, Number facetIdx, Number val )

Adds a discontinuous data item to the map.

Parameter(s):

  • vertexIdx - The index of the vertex that this data is for.
  • facetIdx - The index of the facet that this data is for.
  • val - The data value to add to the map.

void : clearDiscontinuousData()

Removes all the discontinuous values from the map


Number : getMapIndex( Number vertexIdx, Number facetIdx )

Parameter(s):

  • vertexIdx - The index of the vertex to get data for
  • facetIdx - The index of the facet to get data for

Return Value:

  • The index of the data item in the map for the given facet vertex.

Number : getNumDiscontinuousVerts()

Return Value:

  • The number of discontinuous vertices in the map.

Number : getTargetVertexCount()

Return Value:

  • The number of vertices in the geometry that this vertex map is for.

Since:

  • 4.9.3.137

void : preSizeDiscontinuous( Number disconCount )

Pre-sizes the discontinuous data for better memory performance.


void : setDctIndex( Number vertexIdx, Number facetIdx, Number mapIdx )

Sets the facet vertex to have discontinuous data which points to the given map index. This function will update existing data for the facet vertex, or will create new data if necessary.

It assumes that the valid value is already in the map.

Parameter(s):

  • vertexIdx - The index of the vertex that this data is for.
  • facetIdx - The index of the facet to set the discontinuous map index for.
  • mapIdx - The index of the map item that this facet vertex will use.

void : setTargetVertexCount( Number vertCount )

Sets the vertex count of this vertex map.

Parameter(s):

  • vertCount - The number of vertices in the mesh that this map is for.

Since:

  • 4.9.3.137

void : squeezeDiscontinuous()

Reduces discontinuous data down to the minimum space required.


void : updateDctValue( Number oldIdx, Number newIdx, Number facetIdx )

Updates a discontinuous value for a given facet and oldIdx. This does not remove any values from the map, it may add a new discontinuous value if the newIdx and oldIdx have different map values.