Web Analytics Made Easy - Statcounter
Skip to content

Class SBDColorSchemePerAttribute#

template <typename Output>

ClassList > SBDColorSchemePerAttribute

This class describes a color scheme based on node attributes. More...

  • #include <SBDColorSchemePerAttribute.hpp>

Inherits the following classes: SBDDataGraphNodeColorScheme

Public Functions#

Type Name
SBDColorSchemePerAttribute ()
SBDColorSchemePerAttribute (const SBNodeIndexer & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const SBDDataGraphNodeGetter< Output > & nodeGetter)
virtual bool canHavePalette () override const
Returns whether the color scheme requires and therefore can have a color palette.
virtual void getColor (float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const
Returns a color given a node and / or aposition .
Output getDefaultMaximumValue () const
Output getDefaultMinimumValue () const
virtual SBDPalette * getDefaultPalette () override const
Returns a clone of the default color palette for this color scheme.
Output getMaximumValue () const
Output getMinimumValue () const
virtual bool isSerializable () override const
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)) override const
Serializes the color scheme.
void setMaximumValue (Output value)
void setMinimumValue (Output value)
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.
virtual ~SBDColorSchemePerAttribute ()

Public Functions inherited from SBDDataGraphNodeColorScheme#

See SBDDataGraphNodeColorScheme

Type Name
SBDDataGraphNodeColorScheme ()
Constructs a color scheme.
SB_DECLARE_DATA (SBDDataGraphNodeColorScheme)
virtual bool canHavePalette () const
Returns whether the color scheme requires and therefore can have a color palette.
virtual SBDDataGraphNodeColorScheme * clone () const
Returns a copy of the color scheme.
virtual void getColor (float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const
Returns a color given a node and / or aposition .
virtual SBDPalette * getDefaultPalette () const
Returns a clone of the default color palette for this color scheme.
const SBDPalette * getPalette () const
Returns a pointer to a color palette owned by the color scheme.
bool hasPalette () const
Returns whether the color scheme has a color palette defined.
virtual bool isSerializable () const
Returns true when the class is serializable.
void requestUpdate ()
Requests a material update for a node to which the material that owns this color scheme is applied.
void resetPalette ()
Resets the color palette to the default one for color schemes that can have it.
virtual void serialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0)) const
Serializes 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.
virtual void unserialize (SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber(1, 0, 0))
Unserializes the color scheme.
virtual ~SBDDataGraphNodeColorScheme ()
Destructs the color scheme.

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget ()
unsigned int getMemoryFootprint () const
void printReferencesToOwners () const
virtual ~SBCReferenceTarget ()

Protected Attributes#

Type Name
Output * defaultMaxValue
The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.
Output * defaultMinValue
The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.
Output * maxValue
The current maximum value for the attribute bounds used for colorization.
Output * minValue
The current minimum value for the attribute bounds used for colorization.
SBDDataGraphNodeGetter< Output > * nodeGetter
SBNodeIndexer nodeIndexer
SBDDataGraphNodePredicate * nodePredicate

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer

Protected Functions inherited from SBDDataGraphNodeColorScheme#

See SBDDataGraphNodeColorScheme

Type Name
SBDDataGraphNodeColorScheme (SBDDataGraphNodeColorSchemeData * dataPointer)

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTarget (SBCReferenceTargetData * dataPointer)
void removeAllReferenceOwners ()

Detailed Description#

Short name: SBColorSchemePerAttribute

Public Functions Documentation#

function SBDColorSchemePerAttribute [1/2]#

inline SBDColorSchemePerAttribute::SBDColorSchemePerAttribute () 

function SBDColorSchemePerAttribute [2/2]#

inline SBDColorSchemePerAttribute::SBDColorSchemePerAttribute (
    const SBNodeIndexer & nodeIndexer,
    const SBDDataGraphNodePredicate & nodePredicate,
    const SBDDataGraphNodeGetter < Output > & nodeGetter
) 

function canHavePalette#

Returns whether the color scheme requires and therefore can have a color palette.

inline virtual bool SBDColorSchemePerAttribute::canHavePalette () override const

Implements SBDDataGraphNodeColorScheme::canHavePalette


function getColor#

Returns a color given a node and / or aposition .

inline virtual void SBDColorSchemePerAttribute::getColor (
    float * color,
    SBDDataGraphNode * node=nullptr,
    const SBPosition3 & position=SBPosition3::zero
) override const

Implements SBDDataGraphNodeColorScheme::getColor


function getDefaultMaximumValue#

inline Output SBDColorSchemePerAttribute::getDefaultMaximumValue () const

function getDefaultMinimumValue#

inline Output SBDColorSchemePerAttribute::getDefaultMinimumValue () const

function getDefaultPalette#

Returns a clone of the default color palette for this color scheme.

inline virtual SBDPalette * SBDColorSchemePerAttribute::getDefaultPalette () override const

Implements SBDDataGraphNodeColorScheme::getDefaultPalette


function getMaximumValue#

inline Output SBDColorSchemePerAttribute::getMaximumValue () const

function getMinimumValue#

inline Output SBDColorSchemePerAttribute::getMinimumValue () const

function isSerializable#

Returns true when the class is serializable.

inline virtual bool SBDColorSchemePerAttribute::isSerializable () override const

Implements SBDDataGraphNodeColorScheme::isSerializable


function serialize#

Serializes the color scheme.

inline virtual void SBDColorSchemePerAttribute::serialize (
    SBCSerializer * serializer,
    const SBNodeIndexer & nodeIndexer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
    const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override const

Implements SBDDataGraphNodeColorScheme::serialize


function setMaximumValue#

inline void SBDColorSchemePerAttribute::setMaximumValue (
    Output value
) 

function setMinimumValue#

inline void SBDColorSchemePerAttribute::setMinimumValue (
    Output value
) 

function unserialize#

Unserializes the color scheme.

inline virtual void SBDColorSchemePerAttribute::unserialize (
    SBCSerializer * serializer,
    const SBNodeIndexer & nodeIndexer,
    const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
    const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override

Implements SBDDataGraphNodeColorScheme::unserialize


function ~SBDColorSchemePerAttribute#

inline virtual SBDColorSchemePerAttribute::~SBDColorSchemePerAttribute () 

Protected Attributes Documentation#

variable defaultMaxValue#

The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.

Output* defaultMaxValue;


variable defaultMinValue#

The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.

Output* defaultMinValue;


variable maxValue#

The current maximum value for the attribute bounds used for colorization.

Output* maxValue;


variable minValue#

The current minimum value for the attribute bounds used for colorization.

Output* minValue;


variable nodeGetter#

SBDDataGraphNodeGetter<Output>* nodeGetter;

variable nodeIndexer#

SBNodeIndexer nodeIndexer;

variable nodePredicate#

SBDDataGraphNodePredicate* nodePredicate;