DzMap Class Reference
[Object and Geometry Objects]

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

Inheritance diagram for DzMap:

DzStorable DzBase QObject Object DzVertexMap List of all members.

Enumerations

enum  MapType {
  FLOAT_MAP = 0, FLOAT2_MAP, FLOAT3_MAP, INT_MAP,
  SHORT_MAP
}

Methods

void appendFloatValue (Number val)
void appendIntValue (Number val)
void appendPnt2Vec (DzVec3 val)
void appendPnt3Vec (DzVec3 val)
void appendShortValue (Number val)
void clearAllData ()
Number getFloatValue (Number idx)
Number getIntValue (Number idx)
String getLabel ()
Number getNumDimensions ()
Number getNumValues ()
DzGeometry getOrderingGeometry ()
DzVec3 getPnt2Vec (Number idx)
DzVec3 getPnt3Vec (Number idx)
Number getShortValue (Number idx)
MapType getType ()
void setDefaultFloatValue (Number defaultVal)
void setDefaultIntValue (Number defaultVal)
void setDefaultPnt2Vec (DzVec3 defaultVal)
void setDefaultPnt3Vec (DzVec3 defaultVal)
void setDefaultShortValue (Number defaultVal)
void setFloatValue (Number idx, Number val)
void setIntValue (Number idx, Number val)
void setMapType (MapType mapType, Boolean keepData=false)
void setNumValues (Number num)
void setPnt2Vec (Number idx, DzVec3 val)
void setPnt3Vec (Number idx, DzVec3 val)
void setShortValue (Number idx, Number val)

Constructors

 DzMap (MapType mapType=FLOAT_MAP)

Signals

void labelChanged ()
 Signature: "labelChanged()"
void mapModified ()
 Signature: "mapModified()"

Detailed Description

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


Member Enumeration Documentation

enum DzMap::MapType

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

Enumerator:
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


Constructor & Destructor Documentation

DzMap::DzMap ( MapType  type = FLOAT_MAP  ) 

Constructor. Creates a new map of the given type.

Parameters:
type The type of map to create


Member Function Documentation

void DzMap::appendFloatValue ( Number  val  ) 

Append a new value to the end of a float map This function is only valid for maps of FLOAT_MAP type.

Parameters:
val The new value to append to the map.

void DzMap::appendIntValue ( Number  val  ) 

Append a new value to the end of a integer map This function is only valid for maps of INT_MAP type.

Parameters:
val The new value to append to the map.

void DzMap::appendPnt2Vec ( DzVec3  val  ) 

This function is provided for DAZ Script access to float 2 maps. It is considerably slower than appendPnt2Value(), so plugin developers should avoid using this function. This function is only valid for maps of FLOAT2_MAP type.

Parameters:
val The value to append to the map. The z value of the vector is ignored.
See also:
appendPnt2Value()

void DzMap::appendPnt3Vec ( DzVec3  val  ) 

This function is provided for DAZ Script access to float 3 maps. It is considerably slower than appendPnt3Value(), so plugin developers should avoid using this function. This function is only valid for maps of FLOAT3_MAP type.

Parameters:
val The value to append to the map.
See also:
appendPnt3Value()

void DzMap::appendShortValue ( Number  val  ) 

Append a new value to the end of a short value map This function is only valid for maps of SHORT_MAP type.

Parameters:
val The new value to append to the map.

void DzMap::clearAllData (  ) 

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

Number DzMap::getFloatValue ( Number  idx  ) 

This function is only valid for maps of FLOAT_MAP type.

Returns:
The value of this map for the given index, or the default value if the index is out of range - for a float map

Number DzMap::getIntValue ( Number  idx  ) 

This function is only valid for maps of INT_MAP type.

Returns:
The value of this map for the given index, or the default value if the index is out of range - for a integer map

String DzMap::getLabel (  ) 

Returns:
The map's label.

Number DzMap::getNumDimensions (  ) 

Returns:
Number of dimensions for this map.

Number DzMap::getNumValues (  ) 

Returns:
Number of values currently in the map table.

DzGeometry DzMap::getOrderingGeometry (  ) 

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

DzVec3 DzMap::getPnt2Vec ( Number  idx  ) 

This function is only valid for maps of FLOAT2_MAP type.

Returns:
The value of this map for the given index, or the default value if the index is out of range - for a 2D float map. The value will be contained in the X and Y components of the vector - the Z component will always be zero.

DzVec3 DzMap::getPnt3Vec ( Number  idx  ) 

This function is only valid for maps of FLOAT3_MAP type.

Returns:
The value of this map for the given index, or the default value if the index is out of range - for a 3D float map.

Number DzMap::getShortValue ( Number  idx  ) 

This function is only valid for maps of SHORT_MAP type.

Returns:
The value of this map for the given index, or the default value if the index is out of range - for a short value map

MapType DzMap::getType (  ) 

Returns:
The map type.

void DzMap::labelChanged (  )  [signal]

Signature: "labelChanged()"

Emitted when the map's label changes

void DzMap::mapModified (  )  [signal]

Signature: "mapModified()"

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

void DzMap::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. This function is only valid for maps of FLOAT_MAP type.

Parameters:
x The new default value for the map.

void DzMap::setDefaultIntValue ( Number  defaultVal  ) 

Sets the default value for an integer map. Thi 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. This function is only valid for maps of INT_MAP type.

Parameters:
x The new default value for the map.

void DzMap::setDefaultPnt2Vec ( DzVec3  defaultVal  ) 

This function is provided for DAZ Script access to float 2 maps. It is considerably slower than setDefaultPnt2Value(), so plugin developers should avoid using this function.

Parameters:
defaultVal The default value of this map. The z value of the vector is ignored.
See also:
setDefaultPnt2Value()

void DzMap::setDefaultPnt3Vec ( DzVec3  defaultVal  ) 

This function is provided for DAZ Script access to float 3 maps. It is considerably slower than setDefaultPnt3Value(), so plugin developers should avoid using this function.

Parameters:
defaultVal The default value of this map.
See also:
setDefaultPnt3Value()

void DzMap::setDefaultShortValue ( Number  defaultVal  ) 

Sets the default value for a short value map. Thi 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. This function is only valid for maps of SHORT_MAP type.

Parameters:
x The new default value for the map.

void DzMap::setFloatValue ( Number  idx,
Number  val 
)

Set one of the currently existing data values on a float map This function is only valid for maps of FLOAT_MAP type.

Parameters:
idx The index of the value to set.
val The new value.

void DzMap::setIntValue ( Number  idx,
Number  val 
)

Set one of the currently existing data values on a integer map This function is only valid for maps of INT_MAP type.

Parameters:
idx The index of the entry to set
val The value of this map for the given index.

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

Changes the type of this map

Parameters:
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 DzMap::setNumValues ( Number  num  ) 

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

Parameters:
num The new number of values contained in the map.

void DzMap::setPnt2Vec ( Number  idx,
DzVec3  val 
)

This function is only valid for maps of FLOAT2_MAP type.

Parameters:
idx The index of the entry to set
val The value of this map for the given index. The z value of the vector is ignored.

void DzMap::setPnt3Vec ( Number  idx,
DzVec3  val 
)

This function is only valid for maps of FLOAT3_MAP type.

Parameters:
idx The index of the entry to set
val The value of this map for the given index.

void DzMap::setShortValue ( Number  idx,
Number  val 
)

Set one of the currently existing data values on a short value map This function is only valid for maps of SHORT_MAP type.

Parameters:
idx The index of the entry to set
val The value of this map for the given index.


Generated on Thu Sep 24 12:21:13 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.