Class SBDColorSchemeConstant#
ClassList > SBDColorSchemeConstant
This class describes a constant color scheme. More...
#include <SBDColorSchemeConstant.hpp>
Inherits the following classes: SBDDataGraphNodeColorScheme
Inherited by the following classes: SBDColorSchemeConstantIllustrate
Public Functions#
Type | Name |
---|---|
SBDColorSchemeConstant () Constructs a color (1.0f, 1.0f, 1.0f, 1.0f) |
|
SBDColorSchemeConstant (float red, float green, float blue, float alpha=1.0f) Constructs a color (red, green, blue, alpha) |
|
SBDColorSchemeConstant (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) Constructs a color (red, green, blue, alpha) |
|
SBDColorSchemeConstant (float * color) Constructs a color (color[0], color[1], color[2], color[3]) |
|
SBDColorSchemeConstant (const SBColor & color) Constructs a color (color[0], color[1], color[2], color[3]) |
|
SB_DECLARE_DATA (SBDColorSchemeConstant) |
|
virtual SBDDataGraphNodeColorScheme * | clone () override const Returns a copy of the color scheme. |
virtual void | getColor (float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const Returns a color given a node and / or aposition . |
virtual bool | isSerializable () override const Returns true. |
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 document. |
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 document. |
virtual | ~SBDColorSchemeConstant () Destructs the color. |
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#
Type | Name |
---|---|
SBCReferenceTarget () |
|
unsigned int | getMemoryFootprint () const |
void | printReferencesToOwners () const |
virtual | ~SBCReferenceTarget () |
Protected Attributes inherited from SBCReferenceTarget#
Type | Name |
---|---|
SBCReferenceTargetData * | dataPointer |
Protected Functions inherited from SBDDataGraphNodeColorScheme#
See SBDDataGraphNodeColorScheme
Type | Name |
---|---|
SBDDataGraphNodeColorScheme (SBDDataGraphNodeColorSchemeData * dataPointer) |
Protected Functions inherited from SBCReferenceTarget#
Type | Name |
---|---|
SBCReferenceTarget (SBCReferenceTargetData * dataPointer) |
|
void | removeAllReferenceOwners () |
Detailed Description#
This class describes a constant color scheme. Please refer to Color schemes for more information.
Short name: SBColorSchemeConstant
See also: Color schemes
Public Functions Documentation#
function SBDColorSchemeConstant [1/5]#
Constructs a color (1.0f, 1.0f, 1.0f, 1.0f)
function SBDColorSchemeConstant [2/5]#
Constructs a color (red, green, blue, alpha)
SBDColorSchemeConstant::SBDColorSchemeConstant (
float red,
float green,
float blue,
float alpha=1.0f
)
function SBDColorSchemeConstant [3/5]#
Constructs a color (red, green, blue, alpha)
SBDColorSchemeConstant::SBDColorSchemeConstant (
unsigned char red,
unsigned char green,
unsigned char blue,
unsigned char alpha=255
)
function SBDColorSchemeConstant [4/5]#
Constructs a color (color[0], color[1], color[2], color[3])
function SBDColorSchemeConstant [5/5]#
Constructs a color (color[0], color[1], color[2], color[3])
function SB_DECLARE_DATA#
function clone#
Returns a copy of the color scheme.
Implements SBDDataGraphNodeColorScheme::clone
function getColor#
Returns a color given a node
and / or aposition
.
virtual void SBDColorSchemeConstant::getColor (
float * color,
SBDDataGraphNode * node=nullptr,
const SBPosition3 & position=SBPosition3::zero
) override const
Implements SBDDataGraphNodeColorScheme::getColor
function isSerializable#
Returns true.
Implements SBDDataGraphNodeColorScheme::isSerializable
function serialize#
Serializes the document.
virtual void SBDColorSchemeConstant::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 unserialize#
Unserializes the document.
virtual void SBDColorSchemeConstant::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 ~SBDColorSchemeConstant#
Destructs the color.