cee::ug::PartSettingsPropertyHandler Class Reference

Property handler for part settings properties. More...

Public Types

enum  PropertyKey {
  CONTEXT_GEOMETRY_INDEX, CONTEXT_PART_ID, VISIBLE, DRAW_STYLE,
  COLOR, OPACITY, SPECULAR_INTENSITY, LIGHTING,
  SMOOTH_SHADING, LINE_WIDTH, POINT_SIZE, FRINGES_VISIBLE,
  CONTOUR_LINES_VISIBLE, VECTORS_VISIBLE, DISPLACEMENT_VISIBLE, ELEMENTSET_FILTERING_ENABLED,
  EYE_LIFT_FACTOR, TEXTURE_IMAGE_NAME, TEXTURE_ENVIRONMENT_MAPPING, TEXTURE_REPEAT_FACTOR,
  TEXTURE_AUTO_IMAGE_SCALE, TEXTURE_MODULATE, TEXTURE_FILTER_NEAREST
}
 List of property keys for PartSettingsPropertyHandler. More...
 

Public Member Functions

 PartSettingsPropertyHandler (PropertySet *propSet, ImageResources *imageResources)
 Creates a part setting property handler from a given property set propSet and image resources. More...
 
Variant propertyValue (PropertyKey key) const
 Returns the property value for the specified property key. More...
 
void setPropertyValue (PropertyKey key, Variant data)
 Sets the property key and value to this handlers property set. More...
 
bool decodeContext (size_t *geoIdx, int *partId) const
 Decodes the context from the properties. More...
 
void encodeContext (size_t geoIdx, int partId)
 Encodes the context as properties. More...
 
void applyToPartSettings (PartSettings *partSettings) const
 Applies the properties in this property set to the specified part settings. More...
 
void buildProperties (const PartSettings &partSettings)
 Sets the property keys and values for this property set from the part settings. More...
 

Static Public Member Functions

static Str propertySetClassType ()
 Returns the class type of the property set. More...
 
static bool isValidPropertySet (const PropertySet &propSet)
 Returns true if the specified property set is a valid part settings property set. More...
 

Detailed Description

Property handler for part settings properties.

Member Enumeration Documentation

List of property keys for PartSettingsPropertyHandler.

Enumerator
CONTEXT_GEOMETRY_INDEX 

Index of context geometry.

CONTEXT_PART_ID 

Id of context part.

VISIBLE 

Visibility on/off.

DRAW_STYLE 

Part draw style.

COLOR 

Part color.

OPACITY 

Opacity.

SPECULAR_INTENSITY 

Specular intensity.

LIGHTING 

Lighting.

SMOOTH_SHADING 

Smooth shading on/off.

LINE_WIDTH 

The width of the lines drawn.

POINT_SIZE 

The size of the points drawn.

FRINGES_VISIBLE 

Fringes visibility.

CONTOUR_LINES_VISIBLE 

Contour lines visibility.

VECTORS_VISIBLE 

Vector visibility.

DISPLACEMENT_VISIBLE 

Displacement visibility.

ELEMENTSET_FILTERING_ENABLED 

Element set filtering enabled/disabled.

EYE_LIFT_FACTOR 

Eye lift factor (to avoid z-fighting)

TEXTURE_IMAGE_NAME 

Texture image name.

TEXTURE_ENVIRONMENT_MAPPING 

Texture environment mapping.

TEXTURE_REPEAT_FACTOR 

Texture repeat factor.

TEXTURE_AUTO_IMAGE_SCALE 

Texture, use automatic image scaling.

TEXTURE_MODULATE 

Texture modulate.

TEXTURE_FILTER_NEAREST 

Texture filter nearest.

Constructor & Destructor Documentation

cee::ug::PartSettingsPropertyHandler::PartSettingsPropertyHandler ( PropertySet propSet,
ImageResources imageResources 
)

Creates a part setting property handler from a given property set propSet and image resources.

Member Function Documentation

void cee::ug::PartSettingsPropertyHandler::applyToPartSettings ( PartSettings partSettings) const

Applies the properties in this property set to the specified part settings.

void cee::ug::PartSettingsPropertyHandler::buildProperties ( const PartSettings partSettings)

Sets the property keys and values for this property set from the part settings.

bool cee::ug::PartSettingsPropertyHandler::decodeContext ( size_t *  geoIdx,
int *  partId 
) const

Decodes the context from the properties.

void cee::ug::PartSettingsPropertyHandler::encodeContext ( size_t  geoIdx,
int  partId 
)

Encodes the context as properties.

bool cee::ug::PartSettingsPropertyHandler::isValidPropertySet ( const PropertySet propSet)
static

Returns true if the specified property set is a valid part settings property set.

Str cee::ug::PartSettingsPropertyHandler::propertySetClassType ( )
static

Returns the class type of the property set.

cee::Variant cee::ug::PartSettingsPropertyHandler::propertyValue ( PropertyKey  key) const

Returns the property value for the specified property key.

Returns an empty Variant if the property key was not found.

void cee::ug::PartSettingsPropertyHandler::setPropertyValue ( PropertyKey  key,
Variant  data 
)

Sets the property key and value to this handlers property set.

If key exists in the property set, the paired property value is updated to data. Otherwise the key/value pair is added to the property set.