DzERCLink Class Reference
[Property Objects]

DAZ Studio implementation of property links (aka ERC). More...

Inheritance diagram for DzERCLink:

DzNumericController DzController DzBase QObject Object List of all members.

Enumerations



enum  ERCType {
  ERCDeltaAdd = 0, ERCDivideInto, ERCDivideBy, ERCMultiply,
  ERCSubtract, ERCAdd
}

Properties

Boolean active
Number addend
Boolean autoOverride
Number scalar
ERCType type

Constructors

 DzERCLink (ERCType type, DzNumericProperty property, Number scalar=1.0, Number addend=0.0)
 DzERCLink (DzNumericProperty property, Number scalar=1.0, Number addend=0.0)
 DzERCLink ()

Methods

DzNumericProperty getCurrentProperty ()
DzNumericProperty getProperty ()
void setProperty (DzNumericProperty prop)

Signals

void propertyDeleted (DzProperty prop)
 Signature: "propertyDeleted(DzProperty*)"

Detailed Description

DAZ Studio implementation of property links (aka ERC).

This numeric controller implements an algorithm that is based on the value of another property. There are six formulas which correspond to the ERCType of the object - the default ERCType is ERCDeltaAdd. The formulas are:

Where:

As an example of ERC in action, lets say that there are 3 properties A, B, and C. B is linked to A with a 'ERCDeltaAdd' DzERCLink with a multiplier of 1.0 and an additive value of 0.0. C is linked to B with a 'ERCDeltaAdd' DzERCLink with a multiplier of 2.0 and an additive value of 1.0. So, if the keyed value of A is 10.0, B is 0.0, and C is 0.0, the final values of the properties would be calculated as:

A = 10.0 B = 0.0 + (10.0 * 1.0) + 0.0 = 10.0 C = 0.0 + (10.0 * 2.0) + 1.0 = 21.0

If B and C have keyed values - for example B is 5.0 and C is 2.0 - the final property values would be calculated as:

A = 10.0 B = 5.0 + (10.0 * 1.0) + 0.0 = 15.0 C = 2.0 + (15.0 * 2.0) + 1.0 = 33.0


Member Enumeration Documentation

enum DzERCLink::ERCType

The types of ERC that can be represented by this class.

Enumerator:
ERCDeltaAdd  This type of ERC is the most common, and implements the formula f(v) = v + (c * m) + a where:
  • v is the current value of the property this ERC link resides on.
  • c is the current value of the control property that drives this ERC link
  • m is the scalar of this ERC link
  • a is the addend of this ERC link
ERCDivideInto  This type of ERC implements the formula f(v) = (c / v) + a where:
  • v is the current value of the property this ERC link resides on.
  • c is the current value of the control property that drives this ERC link
  • a is the addend of this ERC link
ERCDivideBy  This type of ERC implements the formula f(v) = (v / c) + a where:
  • v is the current value of the property this ERC link resides on.
  • c is the current value of the control property that drives this ERC link
  • a is the addend of this ERC link
ERCMultiply  This type of implements the formula f(v) = (c * v) + a where:
  • v is the current value of the property this ERC link resides on.
  • c is the current value of the control property that drives this ERC link
  • a is the addend of this ERC link
ERCSubtract  This type of ERC implements the formula f(v) = v - c + a where:
  • v is the current value of the property this ERC link resides on.
  • c is the current value of the control property that drives this ERC link
  • a is the addend of this ERC link
ERCAdd  This type of ERC implements the formula f(v) = v + c + a where:
  • v is the current value of the property this ERC link resides on.
  • c is the current value of the control property that drives this ERC link
  • a is the addend of this ERC link


Constructor & Destructor Documentation

DzERCLink::DzERCLink (  ) 

Default constructor.

DzERCLink::DzERCLink ( DzNumericProperty  property,
Number  scalar = 1.0,
Number  addend = 0.0 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates a controller that is driven by property

Parameters:
prop The property that drives this controller
scalar The multiplier of the value
addend The addend to the value

DzERCLink::DzERCLink ( ERCType  type,
DzNumericProperty  property,
Number  scalar = 1.0,
Number  addend = 0.0 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Creates a controller that is driven by property

Parameters:
type The type of this controller
prop The property that drives this controller
scalar The multiplier of the value
addend The addend to the value


Member Function Documentation

DzNumericProperty DzERCLink::getCurrentProperty (  ) 

Returns:
The property that is currently acting as the linked property. Typically, this will return the same value as getProperty(), however, if autoOverride is enabled, and the property's owner is 'Fit To' another node, this will return the property on fit to node that this link has been redirected to.

DzNumericProperty DzERCLink::getProperty (  ) 

Returns:
The linked property.

void DzERCLink::propertyDeleted ( DzProperty  prop  )  [signal]

Signature: "propertyDeleted(DzProperty*)"

Emitted when the source property or current property is deleted.

void DzERCLink::setProperty ( DzNumericProperty  prop  ) 

Set the linked property.

Parameters:
prop A pointer to the property that this link follows.


Member Data Documentation

Boolean DzERCLink::active

This property determines whether or not the controller is applied.

Number DzERCLink::addend

This property holds the addend for the property link.

bool DzERCLink::autoOverride

This property determines whether or not the control will automatically be redirected when its owner is fit to another figure.

Number DzERCLink::scalar

This property holds the scalar (multiplier) for the property link.

ERCType DzERCLink::type

This property holds the type of property link.


Generated on Thu Sep 24 12:21:12 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.