Description |
| Create or set a material property value.
The following combinations of arguments are permitted for p_value and p_units:
p_value | p_units | Is the property created in the material already? | Result |
Any value | Appropriate units for this property, or NULL, if the property is unitless | NO | Property is created with the given units and value. |
Any value | NULL | NO | Property is created with the given value using the appropriate units from the owner model. |
Any value | Current units for this property, or NULL, if the property is unitless | YES | Property value is changed to the new value. |
Any value | NULL | YES | Property value is changed to the new value (which is interpreted as being in the units from the owner model) |
The current value | New appropriate units | YES | Property units are changed but the value is interpreted as being for the new units. |
NULL | New appropriate units | YES | Property units are changed and the current value is converted to the new units. | |
Replacement in Object TOOLKIT: | pfcMaterial::SetPropertyValue |
| pfcMaterial::SetPropertyUnits |
Synopsis |
#include <ProMaterial.h> |
ProError | ProMaterialPropertySet | ( |
| ProMaterialItem* p_material | |
| /*
(In) |
| The material. |
| */ |
| ProMaterialPropertyType prop_type | |
| /*
(In) |
| The material property type. |
| */ |
| ProParamvalue* p_value | |
| /*
(In) |
| The material property value. Can be NULL, see the table above. |
| */ |
| ProUnititem* p_units | |
| /*
(In) |
| The material property units. Can be NULL, see the table above. |
| */ |
) |
Returns |
|
|