Photon Fusion 1.1.12

Public Member Functions | Public Attributes | List of all members
UnitAttribute Class Reference

Unit Attribute class. Used to mark a field with the respective Fusion.Units More...

Inherits PropertyAttribute.

Public Member Functions

 UnitAttribute (Units unit)
 Specify the field Fusion.Units type, without Min and Max values More...
 
 UnitAttribute (Units unit, double min, double max)
 Specify the field Fusion.Units type, and its Min and Max values. More...
 

Public Attributes

bool ClampMax
 If entered values above this Max should be clamped. More...
 
bool ClampMin
 If entered values below this Min should be clamped. More...
 
int DecimalPlaces = 5
 The rounding used by the value slider. More...
 
int InverseDecimalPlaces = 5
 The rounding used by the inverse slider (if UseInverse is enabled). More...
 
string InverseName
 The label used for the inverse field (if used). More...
 
Units InverseUnit
 The Units used for the inverse, as they will be different than the primary field. More...
 
bool UseInverse
 Displays 1/value as a second field. More...
 
bool UseSlider
 Set to false to override the effect of setting the min or max range values, and prevent the slider from being used. Useful for cases where a min/max is desired for clamping, but a slider range is not appropriate. More...
 

Detailed Description

Unit Attribute class. Used to mark a field with the respective Fusion.Units

Constructor & Destructor Documentation

◆ UnitAttribute() [1/2]

UnitAttribute ( Units  unit)

Specify the field Fusion.Units type, without Min and Max values

Parameters
unitUnit type

◆ UnitAttribute() [2/2]

UnitAttribute ( Units  unit,
double  min,
double  max 
)

Specify the field Fusion.Units type, and its Min and Max values.

Parameters
unitUnit type
minMin value for this field
maxMax value for this field
clampIf values outside of the min/max range will get clamped, or be allowed.

Member Data Documentation

◆ ClampMax

bool ClampMax

If entered values above this Max should be clamped.

◆ ClampMin

bool ClampMin

If entered values below this Min should be clamped.

◆ DecimalPlaces

int DecimalPlaces = 5

The rounding used by the value slider.

◆ InverseDecimalPlaces

int InverseDecimalPlaces = 5

The rounding used by the inverse slider (if UseInverse is enabled).

◆ InverseName

string InverseName

The label used for the inverse field (if used).

◆ InverseUnit

Units InverseUnit

The Units used for the inverse, as they will be different than the primary field.

◆ UseInverse

bool UseInverse

Displays 1/value as a second field.

◆ UseSlider

bool UseSlider

Set to false to override the effect of setting the min or max range values, and prevent the slider from being used. Useful for cases where a min/max is desired for clamping, but a slider range is not appropriate.