Loading...
Searching...
No Matches
SBDColorSchemePerAttribute< Output > Class Template Reference

This class describes a color scheme based on node attributes.

Attributes

Output * minValue
 The current minimum value for the attribute bounds used for colorization.
 
Output * maxValue
 The current maximum value for the attribute bounds used for colorization.
 
Output * defaultMinValue
 The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.
 
Output * defaultMaxValue
 The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.
 
SBNodeIndexer nodeIndexer
 
SBDDataGraphNodePredicatenodePredicate
 
SBDDataGraphNodeGetter< Output > * nodeGetter
 
Output getMinimumValue () const
 
Output getMaximumValue () const
 
Output getDefaultMinimumValue () const
 
Output getDefaultMaximumValue () const
 
void setMinimumValue (Output value)
 
void setMaximumValue (Output value)
 

Constructors and destructors

 SBDColorSchemePerAttribute ()
 
 SBDColorSchemePerAttribute (const SBNodeIndexer &nodeIndexer, const SBDDataGraphNodePredicate &nodePredicate, const SBDDataGraphNodeGetter< Output > &nodeGetter)
 
virtual ~SBDColorSchemePerAttribute ()
 

Serialization

virtual bool isSerializable () const override
 Returns true when the class is serializable.
 
virtual void serialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0)) const override
 Serializes the color scheme.
 
virtual void unserialize (SBCSerializer *serializer, const SBNodeIndexer &nodeIndexer, const SBVersionNumber &sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber &classVersionNumber=SBVersionNumber(1, 0, 0)) override
 Unserializes the color scheme.
 

Colors

virtual void getColor (float *color, SBDDataGraphNode *node=nullptr, const SBPosition3 &position=SBPosition3::zero) const override
 Returns a color given a node and / or a position.
 

Color palette

virtual bool canHavePalette () const override
 Returns whether the color scheme requires and therefore can have a color palette.
 
virtual SBDPalettegetDefaultPalette () const override
 Returns a clone of the default color palette for this color scheme.
 

Additional Inherited Members

- Public Member Functions inherited from SBDDataGraphNodeColorScheme
 SBDDataGraphNodeColorScheme ()
 Constructs a color scheme.
 
virtual ~SBDDataGraphNodeColorScheme ()
 Destructs the color scheme.
 
virtual SBDDataGraphNodeColorSchemeclone () const
 Returns a copy of the color scheme.
 
bool hasPalette () const
 Returns whether the color scheme has a color palette defined.
 
const SBDPalettegetPalette () const
 Returns a pointer to a color palette owned by the color scheme.
 
void setPalette (SBDPalette *palette)
 Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.
 
void resetPalette ()
 Resets the color palette to the default one for color schemes that can have it.
 
void requestUpdate ()
 Requests a material update for a node to which the material that owns this color scheme is applied.
 
 SB_DECLARE_DATA (SBDDataGraphNodeColorScheme)
 
- Public Member Functions inherited from SBCReferenceTarget
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
- Protected Member Functions inherited from SBDDataGraphNodeColorScheme
 SBDDataGraphNodeColorScheme (SBDDataGraphNodeColorSchemeData *dataPointer)
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

Member Function Documentation

◆ canHavePalette()

template<typename Output >
virtual bool SBDColorSchemePerAttribute< Output >::canHavePalette ( ) const
inlineoverridevirtual

Reimplemented from SBDDataGraphNodeColorScheme.

◆ getColor()

template<typename Output >
virtual void SBDColorSchemePerAttribute< Output >::getColor ( float *  color,
SBDDataGraphNode node = nullptr,
const SBPosition3 position = SBPosition3::zero 
) const
inlineoverridevirtual

Reimplemented from SBDDataGraphNodeColorScheme.

Reimplemented in SBDColorSchemePerChainIllustrate.

◆ getDefaultPalette()

◆ isSerializable()

◆ serialize()

◆ unserialize()