User Tools

Site Tools


DzMap

Base class for all property value maps. Meshes can have any number of maps of various types.

More...

Inherits :

Inherited By : DzVertexMap

Enumerations

Constructors

DAZ Script
DzMap ( MapType mapType=FloatMap )

Methods

Signals

voidlabelChanged ()
voidmapModified ()

Detailed Description

TODO: Add detailed description.

Enumerations


: MapType

The types of possible maps - each describes the type of values and dimension of the map.

  • FLOAT_MAP - 1 Dimensional map of float values.
  • FLOAT2_MAP - 2 Dimensional map of float values.
  • FLOAT3_MAP - 3 Dimensional map of float values.
  • INT_MAP - 1 Dimensional map of int values.
  • SHORT_MAP - 1 Dimensional map of short values.

Constructors


DzMap( MapType mapType=FloatMap )

Constructor. Creates a new map of the given type.

Parameter(s):

  • type - The type of map to create.

Methods


void : appendFloatValue( Number val )

Append a new value to the end of a float map.

Parameter(s):

  • val - The new value to append to the map.

Attention:

  • This function is only valid for maps of the FLOAT_MAP type.

void : appendIntValue( Number val )

Append a new value to the end of a integer map.

Parameter(s):

  • val - The new value to append to the map.

Attention:

  • This function is only valid for maps of the INT_MAP type.

void : appendPnt2Vec( DzVec3 val )

Appends a value to a float 2 map.

Parameter(s):

  • val - The value to append to the map. The z value of the vector is ignored.

Attention:

  • This function is only valid for maps of the FLOAT2_MAP type.

void : appendPnt3Vec( DzVec3 val )

Appends a value to a float 3 map.

Parameter(s):

  • val - The value to append to the map.

Attention:

  • This function is only valid for maps of the FLOAT3_MAP type.

void : appendShortValue( Number val )

Append a new value to the end of a short value map.

Parameter(s):

  • val - The new value to append to the map.

Attention:

  • This function is only valid for maps of the SHORT_MAP type.

void : clearAllData()

Clears all map values. After this call, the number of values in the map will be zero.


Number : getFloatMax( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The maximum value of this map - for maps of the FLOAT_MAP type.

Since:

  • 4.6.4.28

Number : getFloatMin( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The minimum value of this map - for maps of the FLOAT_MAP type.

Since:

  • 4.6.4.28

Number : getFloatValue( Number idx )

Return Value:

  • The value of this map at the specified index (if valid), or the default value if the index is out of range - for maps of the FLOAT_MAP type.

Number : getIntValue( Number idx )

Parameter(s):

  • idx - The index of the value to retrieve.

Return Value:

  • The value of this map at the specified index (if valid), or the default value if the index is out of range - for maps of the INT_MAP type.

Number : getIntValueMax( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The maximum value of this map - for maps of the INT_MAP type.

Since:

  • 4.6.4.28

Number : getIntValueMin( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The minimum value of this map - for maps of the INT_MAP type.

Since:

  • 4.6.4.28

String : getLabel()

Return Value:

  • The label for this map.

Number : getNumDimensions()

Return Value:

  • The number of dimensions for this map.

Number : getNumValues()

Return Value:

  • The number of values currently in this map.

DzGeometry : getOrderingGeometry()

Return Value:

  • The geometry that this map has been reordered to match, or NULL if none.

DzVec3 : getPnt2Vec( Number idx )

Parameter(s):

  • idx - The index of the value to retrieve.

Return Value:

  • The value of this map at the specified index (if valid), or the default value if the index is out of range - for maps of the FLOAT2_MAP type. The value will be contained in the X and Y components of the vector - the Z component will always be zero.

DzVec3 : getPnt2VecMax( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The maximum value of this map - for maps of the FLOAT2_MAP type.

Since:

  • 4.6.4.28

DzVec3 : getPnt2VecMin( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The minimum value of this map - for maps of the FLOAT2_MAP type.

Since:

  • 4.6.4.28

DzVec3 : getPnt3Vec( Number idx )

Parameter(s):

  • idx - The index of the value to retrieve.

Return Value:

  • The value of this map at the specified index (if valid), or the default value if the index is out of range - for maps of the FLOAT3_MAP type.

DzVec3 : getPnt3VecMax( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The maximum value of this map - for maps of the FLOAT3_MAP type.

Since:

  • 4.6.4.28

DzVec3 : getPnt3VecMin( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The minimum value of this map - for maps of the FLOAT3_MAP type.

Since:

  • 4.6.4.28

Number : getShortValue( Number idx )

Parameter(s):

  • idx - The index of the value to retrieve.

Return Value:

  • The value of this map at the specified index (if valid), or the default value if the index is out of range - for maps of the SHORT_MAP type.

Number : getShortValueMax( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The maximum value of this map - for maps of the SHORT_MAP type.

Since:

  • 4.6.4.28

Number : getShortValueMin( Number idx )

Parameter(s):

  • idx - Not used.

Return Value:

  • The minimum value of this map - for maps of the SHORT_MAP type.

Since:

  • 4.6.4.28

MapType : getType()

Return Value:

  • The type of this map.

Boolean : inUnitSpace()

Return Value:

  • true if the values of the map are in unit space, otherwise false.

Since:

  • 4.6.4.28

void : invalidateMinMax()

Invalidates the calculated minimum and maximum values for this map.

Since:

  • 4.6.4.28

DzMap : makeCopy()

Return Value:

  • A copy of this map.

Attention:

  • Currently only correctly copies DzMap, DzVertexMap, and DzUVSet. Other subclasses will only copy data included in these types and return an instance of the superclass

Since:

  • 4.11.0.300

void : preSize( Number num )

Pre-allocates size of the data array.

Parameter(s):

  • num - The new number of values to pre-allocate for this map.

void : setDefaultFloatValue( Number defaultVal )

Sets the default value for a float map. This is the value returned if the map is empty or a map data value is requested that is outside the index range of this map.

Parameter(s):

  • x - The new default value for the map.

Attention:

  • This function is only valid for maps of the FLOAT_MAP type.

void : setDefaultIntValue( Number defaultVal )

Sets the default value for an integer map. This is the value returned if the map is empty or a map data value is requested that is outside the index range of this map.

Parameter(s):

  • x - The new default value for the map.

Attention:

  • This function is only valid for maps of the INT_MAP type.

void : setDefaultPnt2Vec( DzVec3 defaultVal )

Sets the default value of a float 2 map.

Parameter(s):

  • defaultVal - The default value of this map. The z value of the vector is ignored.

void : setDefaultPnt3Vec( DzVec3 defaultVal )

Sets the default value of a float 3 map.

Parameter(s):

  • defaultVal - The default value of this map.

void : setDefaultShortValue( Number defaultVal )

Sets the default value for a short value map. This is the value returned if the map is empty or a map data value is requested that is outside the index range of this map.

Parameter(s):

  • x - The new default value for the map.

Attention:

  • This function is only valid for maps of the SHORT_MAP type.

void : setFloatValue( Number idx, Number val )

Set one of the currently existing data values on a float map.

Parameter(s):

  • idx - The index of the value to set.
  • val - The new value.

Attention:

  • This function is only valid for maps of the FLOAT_MAP type.

void : setIntValue( Number idx, Number val )

Set one of the currently existing data values on a integer map.

Parameter(s):

  • idx - The index of the entry to set.
  • val - The value of this map at the specified index (if valid).

Attention:

  • This function is only valid for maps of the INT_MAP type.

void : setLabel( String label )

Sets the user-readable label for the map.

Parameter(s):

  • label - The new label for the map.

void : setMapType( MapType mapType, Boolean keepData=false )

Changes the type of this map.

Parameter(s):

  • mapType - The new type for the map.
  • keepData - If true, the existing data will be converted to the new type as much as possible. If false, the existing data is lost, and the number of values in the map will be zero.

void : setNumValues( Number num )

Sets the size of the data array. Does not initialize newly allocated values.

Parameter(s):

  • num - The new number of values contained in this map.

void : setPnt2Vec( Number idx, DzVec3 val )

Set one of the currently existing data values on a float 2 map.

Parameter(s):

  • idx - The index of the entry to set.
  • val - The value of this map at the specified index (if valid). The z value of the vector is ignored.

Attention:

  • This function is only valid for maps of the FLOAT2_MAP type.

void : setPnt3Vec( Number idx, DzVec3 val )

Set one of the currently existing data values on a float 3 map.

Parameter(s):

  • idx - The index of the entry to set
  • val - The value of this map at the specified index (if valid).

Attention:

  • This function is only valid for maps of the FLOAT3_MAP type.

void : setShortValue( Number idx, Number val )

Set one of the currently existing data values on a short value map.

Parameter(s):

  • idx - The index of the entry to set.
  • val - The value of this map at the specified index (if valid).

Attention:

  • This function is only valid for maps of the SHORT_MAP type.

Signals


void : labelChanged()

Signature:“labelChanged()”

Emitted when the map's label changes.


void : mapModified()

Signature:“mapModified()”

Emitted whenever values are added, removed or modified on the map.