Class SBDColorSchemeConstantIllustrate#
ClassList > SBDColorSchemeConstantIllustrate
This class describes an illustrative constant color scheme inspired by the "Molecule of the Month" style of the Protein Data Bank. More...
#include <SBDColorSchemeConstantIllustrate.hpp>
Inherits the following classes: SBDColorSchemeConstant
Public Functions#
| Type | Name |
|---|---|
| SBDColorSchemeConstantIllustrate () Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f) |
|
| SBDColorSchemeConstantIllustrate (float red, float green, float blue, float alpha=1.0f) Constructs a color scheme with the given color (red, green, blue, alpha) |
|
| SBDColorSchemeConstantIllustrate (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) Constructs a color scheme with the given color (red, green, blue, alpha) |
|
| SBDColorSchemeConstantIllustrate (float * color) Constructs a color scheme with the given color (color[0], color[1], color[2], color[3]) |
|
| SBDColorSchemeConstantIllustrate (const SBColor & color) Constructs a color scheme with the given color color . |
|
| 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 | ~SBDColorSchemeConstantIllustrate () Destructs the color scheme. |
Public Functions inherited from SBDColorSchemeConstant#
| Type | Name |
|---|---|
| SBDColorSchemeConstant () Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f) |
|
| SBDColorSchemeConstant (float red, float green, float blue, float alpha=1.0f) Constructs a color scheme with the given color (red, green, blue, alpha) |
|
| SBDColorSchemeConstant (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) Constructs a color scheme with the given color (red, green, blue, alpha) |
|
| SBDColorSchemeConstant (float * color) Constructs a color scheme with the given color (color[0], color[1], color[2], color[3]) |
|
| SBDColorSchemeConstant (const SBColor & color) Constructs a color scheme with the given color color . |
|
| 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 scheme. |
Public Functions inherited from SBDDataGraphNodeColorScheme#
See SBDDataGraphNodeColorScheme
| Type | Name |
|---|---|
| SBDDataGraphNodeColorScheme () Constructs a color scheme. |
|
| 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 () Builds the reference target. |
|
| unsigned int | getMemoryFootprint () const Returns the memory footprint. |
| void | printReferencesToOwners () const Prints the references to the owners of this reference target. |
| virtual | ~SBCReferenceTarget () Destructor. |
Protected Attributes inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTargetData * | dataPointer A pointer to the private data. |
Protected Functions inherited from SBDDataGraphNodeColorScheme#
See SBDDataGraphNodeColorScheme
| Type | Name |
|---|---|
| SBDDataGraphNodeColorScheme (SBDDataGraphNodeColorSchemeData * dataPointer) Protected constructor. |
Protected Functions inherited from SBCReferenceTarget#
| Type | Name |
|---|---|
| SBCReferenceTarget (SBCReferenceTargetData * dataPointer) Protected constructor. |
|
| void | removeAllReferenceOwners () Stops all the reference owners from referencing this reference target. |
Detailed Description#
Please refer to Color schemes for more information.
Short name: SBColorSchemeConstantIllustrate
See also: Color schemes
Public Functions Documentation#
function SBDColorSchemeConstantIllustrate [1/5]#
Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)
Constructs a constant color scheme with the default white color (1.0, 1.0, 1.0, 1.0).
function SBDColorSchemeConstantIllustrate [2/5]#
Constructs a color scheme with the given color (red, green, blue, alpha)
SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate (
float red,
float green,
float blue,
float alpha=1.0f
)
Constructs a constant color scheme with the specified RGBA values.
Parameters:
redRed component of the color (0.0‑1.0).greenGreen component of the color (0.0‑1.0).blueBlue component of the color (0.0‑1.0).alphaAlpha component of the color (0.0‑1.0). Defaults to 1.0.
function SBDColorSchemeConstantIllustrate [3/5]#
Constructs a color scheme with the given color (red, green, blue, alpha)
SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate (
unsigned char red,
unsigned char green,
unsigned char blue,
unsigned char alpha=255
)
Constructs a constant color scheme with the specified RGBA values (0‑255).
Parameters:
redRed component (0‑255).greenGreen component (0‑255).blueBlue component (0‑255).alphaAlpha component (0‑255). Defaults to 255.
function SBDColorSchemeConstantIllustrate [4/5]#
Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])
Constructs a constant color scheme with the given color array.
Parameters:
colorPointer to an array of four floats representing RGBA values.
function SBDColorSchemeConstantIllustrate [5/5]#
Constructs a color scheme with the given color color .
Constructs a constant color scheme with the given SBColor object.
Parameters:
colorThe SBColor defining the constant color.
function clone#
Returns a copy of the color scheme.
Creates a copy of the constant color scheme.
Returns:
Pointer to a new SBDDataGraphNodeColorScheme instance representing the cloned color scheme.
Implements SBDColorSchemeConstant::clone
function getColor#
Returns a color given a node and / or aposition .
virtual void SBDColorSchemeConstantIllustrate::getColor (
float * color,
SBDDataGraphNode * node=nullptr,
const SBPosition3 & position=SBPosition3::zero
) override const
Retrieves the constant color for the specified node and position.
Parameters:
colorPointer to an array of four floats that will receive the RGBA color.nodePointer to the node for which the color is requested. May be null.positionThe position in space for which the color is requested. Not used in this scheme. If the node is an atom of element carbon or phosphorus, the color is lightened.
Implements SBDColorSchemeConstant::getColor
function isSerializable#
Returns true __
Returns whether the color scheme supports serialization.
Returns:
true, indicating the color scheme is serializable.
Implements SBDColorSchemeConstant::isSerializable
function serialize#
Serializes the document.
virtual void SBDColorSchemeConstantIllustrate::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 using the provided serializer.
Parameters:
serializerPointer to the serializer object.nodeIndexerIndexer for node identification.sdkVersionNumberSDK version number used for serialization.classVersionNumberVersion number of the class for serialization.
Implements SBDColorSchemeConstant::serialize
function unserialize#
Unserializes the document.
virtual void SBDColorSchemeConstantIllustrate::unserialize (
SBCSerializer * serializer,
const SBNodeIndexer & nodeIndexer,
const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER,
const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0)
) override
Deserializes the color scheme from the provided serializer.
Parameters:
serializerPointer to the serializer object.nodeIndexerIndexer for node identification.sdkVersionNumberSDK version number used for deserialization.classVersionNumberVersion number of the class for deserialization.
Implements SBDColorSchemeConstant::unserialize
function ~SBDColorSchemeConstantIllustrate#
Destructs the color scheme.
Destroys the constant color scheme.