Class SBDColorSchemeCPKPerStructuralModelCarbons#
ClassList > SBDColorSchemeCPKPerStructuralModelCarbons
This class describes a color scheme that sets colors for carbons based on their structural model and CPK colors for other atom element types. More...
#include <SBDColorSchemeCPKPerStructuralModelCarbons.hpp>
Inherits the following classes: SBDColorSchemePerStructuralModel
Public Functions#
| Type | Name |
|---|---|
| SBDColorSchemeCPKPerStructuralModelCarbons () Constructs a color scheme. |
|
| SBDColorSchemeCPKPerStructuralModelCarbons (const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr) Constructs a color scheme. |
|
| 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 SBDPalette * | getDefaultPalette () override const Returns a clone of the default color palette for this color scheme. |
| 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 | ~SBDColorSchemeCPKPerStructuralModelCarbons () Destructs the color scheme. |
Public Functions inherited from SBDColorSchemePerStructuralModel#
See SBDColorSchemePerStructuralModel
| Type | Name |
|---|---|
| SBDColorSchemePerStructuralModel () Constructs a color scheme. |
|
| SBDColorSchemePerStructuralModel (const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr) Constructs a color scheme. |
|
| virtual bool | canHavePalette () override const Returns whether the color scheme requires and therefore can have a color palette. |
| 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 SBDPalette * | getDefaultPalette () override const Returns a clone of the default color palette for this color scheme. |
| 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 | ~SBDColorSchemePerStructuralModel () 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: SBColorSchemeCPKPerStructuralModelCarbons
See also: Color schemes
Public Functions Documentation#
function SBDColorSchemeCPKPerStructuralModelCarbons [1/2]#
Constructs a color scheme.
Constructs a color scheme with default settings.
function SBDColorSchemeCPKPerStructuralModelCarbons [2/2]#
Constructs a color scheme.
SBDColorSchemeCPKPerStructuralModelCarbons::SBDColorSchemeCPKPerStructuralModelCarbons (
const SBNodeIndexer & nodeIndexer,
const SBDPalette * palette=nullptr
)
Constructs a color scheme with a given node indexer and optional palette.
Parameters:
nodeIndexerIndexer used to identify nodes in the structural model.paletteOptional pointer to a palette; if nullptr, the default palette is used.
function clone#
Returns a copy of the color scheme.
virtual SBDDataGraphNodeColorScheme * SBDColorSchemeCPKPerStructuralModelCarbons::clone () override const
Creates a copy of the color scheme.
Returns:
Pointer to a newly allocated copy of the color scheme.
Implements SBDColorSchemePerStructuralModel::clone
function getColor#
Returns a color given a node and / or aposition .
virtual void SBDColorSchemeCPKPerStructuralModelCarbons::getColor (
float * color,
SBDDataGraphNode * node=nullptr,
const SBPosition3 & position=SBPosition3::zero
) override const
Retrieves the color for a given node and position.
Parameters:
colorOutput array of four floats to receive the RGBA color. Must not be null.nodeOptional pointer to a data graph node; if null, only the position is considered.positionPosition in 3D space; defaults to the origin.
The method determines the appropriate color based on the node type and position, applying CPK colors for non‑carbon atoms and structural model colors for carbon atoms.
Implements SBDColorSchemePerStructuralModel::getColor
function getDefaultPalette#
Returns a clone of the default color palette for this color scheme.
virtual SBDPalette * SBDColorSchemeCPKPerStructuralModelCarbons::getDefaultPalette () override const
Retrieves the default color palette for this color scheme.
Returns:
Pointer to a newly cloned default palette.
Implements SBDColorSchemePerStructuralModel::getDefaultPalette
function isSerializable#
Returns true __
Returns whether the color scheme supports serialization.
Returns:
true, indicating the color scheme is serializable.
Implements SBDColorSchemePerStructuralModel::isSerializable
function serialize#
Serializes the document.
virtual void SBDColorSchemeCPKPerStructuralModelCarbons::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.
Parameters:
serializerSerializer used for writing the data.nodeIndexerNode indexer for the structural model.sdkVersionNumberSDK version number.classVersionNumberClass version number.
Implements SBDColorSchemePerStructuralModel::serialize
function unserialize#
Unserializes the document.
virtual void SBDColorSchemeCPKPerStructuralModelCarbons::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.
Parameters:
serializerSerializer used for reading the data.nodeIndexerNode indexer for the structural model.sdkVersionNumberSDK version number.classVersionNumberClass version number.
Implements SBDColorSchemePerStructuralModel::unserialize
function ~SBDColorSchemeCPKPerStructuralModelCarbons#
Destructs the color scheme.
Destroys the color scheme and releases resources.