Web Analytics Made Easy - Statcounter
Skip to content

Class SBGRenderStructuralModel#

ClassList > SBGRenderStructuralModel

The class SBGRenderStructuralModel is used to render the structural model node.

  • #include <SBGRenderStructuralModel.hpp>

Inherits the following classes: SBGRenderNode

Inherited by the following classes: SBGRenderFragment

Public Types inherited from SBGRenderNode#

See SBGRenderNode

Type Name
enum Type

Public Functions#

Type Name
SBGRenderStructuralModel (SBStructuralModel * model)
SB_DECLARE_DATA (SBGRenderStructuralModel)
void collectAmbientOcclusion (const SBPosition3 & boxOrigin, const SBPosition3 & boxSize, unsigned int nCellsX, unsigned int nCellsY, unsigned int nCellsZ, float * ambientOcclusionData)
void connectToStructuralModel ()
Connect the render model to the structural model.
void disconnectFromStructuralModel ()
Disconnect the render model from the structural model.
virtual void display (SBNode::RenderingPass renderingPass) override
Display the node.
void expandBounds (SBIAPosition3 & bounds) const
Expands the bounds to make sure the structural model fits inside them.
virtual void forEachNodeDepthFirst (void(*)(SBGRenderNode *node) action) override
virtual void forEachNodeDepthFirst (SBCClass * object, void(SBCClass::*)(SBGRenderNode *node) action) override
const float * getAtomColorData () const
Return the atom color data.
const unsigned int * getAtomFlagData () const
Return the atom flag data.
const unsigned int * getAtomNodeIndexData () const
Return the atom node index data.
const SBPointerIndexer< SBNode > * getAtomPointerIndexer () const
Return the index of currently displayed atoms.
const float * getAtomPositionData () const
Return the atom position data.
float getAtomRadius () const
float getAtomSizeProportionalToVdWRadius () const
const float * getBondAtomColorData () const
Return the bond atom color data.
const unsigned int * getBondAtomIndexData () const
Return the bond atom index data.
const SBPointerIndexer< SBNode > * getBondAtomPointerIndexer () const
Return the index of atoms in currently displayed bonds.
const float * getBondAtomPositionData () const
Return the bond atom position data.
const float * getBondDisplacementData () const
Return the bond displacement data.
const unsigned int * getBondFlagData () const
Return the bond flag data.
bool getBondMultipleDisplay () const
const unsigned int * getBondNodeIndexData () const
Return the bond node index data.
const float * getBondOrderData () const
Return the bond order data.
const SBPointerIndexer< SBNode > * getBondPointerIndexer () const
Return the index of currently displayed bonds.
float getBondRadius () const
bool getConstantAtomRadiusFlag () const
const unsigned int * getHydrogenBondAtomIndexData () const
Return the H-bond atom index data.
const SBPointerIndexer< SBNode > * getHydrogenBondAtomPointerIndexer () const
Return the index of atoms in currently displayed H-bonds.
const float * getHydrogenBondAtomPositionData () const
Return the H-bond atom position data.
const float * getHydrogenBondColorData () const
Return the H-bond atom color data.
const unsigned int * getHydrogenBondFlagData () const
Return the H-bond flag data.
const unsigned int * getHydrogenBondNodeIndexData () const
Return the H-bond node index data.
const float * getHydrogenBondOrderData () const
Return the H-bond order data.
const SBPointerIndexer< SBNode > * getHydrogenBondPointerIndexer () const
Return the index of currently displayed H-bonds.
virtual void getNodes (std::vector< SBGRenderNode * > & selection) override
virtual void getNodes (std::vector< SBGRenderNode * > & selection, SBGRenderNode::Type type) override
virtual void getNodes (std::vector< SBGRenderNode * > & selection, bool(*)(SBGRenderNode *) selectionRule) override
virtual void getNodes (std::vector< SBGRenderNode * > & selection, bool(*)(SBGRenderNode *) visitRule, bool(*)(SBGRenderNode *) selectionRule) override
virtual Type getType () override const
Return type of the render node.
void onBaseEvent (SBBaseEvent * event)
Handle structural model events.
void onStructuralEvent (SBStructuralEvent * event)
Handle structural events from structural models (moves, etc.)
virtual void print (unsigned int offset=0) override const
Print debug information.
void setAtomRadius (float atomRadius)
void setAtomSizeProportionalToVdWRadius (float ratio)
void setBondMultipleDisplay (bool multipleDisplay)
void setBondRadius (float bondRadius)
void setConstantAtomRadiusFlag (bool flag)
void setupFlagData (SBNode * root)
Update the flags in the tree starting at root.
virtual ~SBGRenderStructuralModel ()

Public Functions inherited from SBGRenderNode#

See SBGRenderNode

Type Name
virtual void display (SBNode::RenderingPass renderingPass) = 0
Display the node.
virtual void forEachNodeDepthFirst (void(*)(SBGRenderNode *node) action)
virtual void forEachNodeDepthFirst (SBCClass * object, void(SBCClass::*)(SBGRenderNode *node) action)
virtual void getNodes (std::vector< SBGRenderNode * > & selection)
virtual void getNodes (std::vector< SBGRenderNode * > & selection, SBGRenderNode::Type type)
virtual void getNodes (std::vector< SBGRenderNode * > & selection, bool(*)(SBGRenderNode *) selectionRule)
virtual void getNodes (std::vector< SBGRenderNode * > & selection, bool(*)(SBGRenderNode *) visitRule, bool(*)(SBGRenderNode *) selectionRule)
virtual SBGRenderNode * getParent () const
Return parent of the render node.
virtual Type getType () const
Return type of the render node.
virtual void print (unsigned int offset=0) const
Print debug information.
virtual void requestViewportUpdate ()
Request a viewport update.

Public Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

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

Public Static Functions#

Type Name
bool selectAll (SBNode * node)
bool selectHighlightedNodes (SBNode * node)
bool selectNodesByType (SBNode * node)
bool selectSelectedNodes (SBNode * node)
bool selectVisibleNodes (SBNode * node)

Public Static Functions inherited from SBGRenderNode#

See SBGRenderNode

Type Name
void forEachNodeInSelection (std::vector< SBGRenderNode * > & selection, void(*)(SBGRenderNode *node) action)
void forEachNodeInSelection (std::vector< SBGRenderNode * > & selection, SBCClass * object, void(SBCClass::*)(SBGRenderNode *node) action)
std::string getTypeString (Type type)
Return string representation of the type of the render node.

Protected Attributes#

Type Name
SBGRenderStructuralModelData * dataPointer

Protected Attributes inherited from SBCReferenceTarget#

See SBCReferenceTarget

Type Name
SBCReferenceTargetData * dataPointer

Protected Functions#

Type Name
void addStructuralNodes ()
Add structural nodes to internal data structures.
void addStructuralNodes (SBNode * root)
Add structural nodes to internal data structures.
void copyAtomData (unsigned int & sourceIndex, unsigned int & destinationIndex)
void copyBondAtomData (unsigned int & sourceIndex, unsigned int & destinationIndex)
void copyBondData (unsigned int & sourceIndex, unsigned int & destinationIndex)
void copyHydrogenBondAtomData (unsigned int sourceIndex, unsigned int destinationIndex)
void copyHydrogenBondData (unsigned int sourceIndex, unsigned int destinationIndex)
void moveAtom (SBAtom * atom)
void removeStructuralNodes ()
Remove structural nodes from internal data structures.
void removeStructuralNodes (SBNode * root)
Remove structural nodes from internal data structures.
void setupAtomData (SBAtom * atom, unsigned int & index)
void setupBondAtomData (SBAtom * atom, unsigned int & index)
void setupBondData (SBBond * bond, unsigned int & index)
void setupBondDisplacementData (SBBond * bond, unsigned int & index)
void setupHydrogenBondAtomData (SBAtom * atom, unsigned int index)
void setupHydrogenBondColorData (SBHydrogenBond * hydrogenBond, unsigned int index)
void setupHydrogenBondData (SBHydrogenBond * hydrogenBond, unsigned int index)
void setupHydrogenBondOrderData (SBHydrogenBond * hydrogenBond, unsigned int index)
void setupMaterials (SBNode * root)
void updateAtomRadiusData ()
void updateAtomRadiusData (SBAtom * atom)
void updateHydrogenBondOrderData ()
void updateHydrogenBonds ()
void updateStructuralNodes ()
Display attributes.

Protected Functions inherited from SBGRenderNode#

See SBGRenderNode

Type Name
SBGRenderNode ()
Build a base object.
virtual ~SBGRenderNode ()

Protected Functions inherited from SBCReferenceTarget#

See SBCReferenceTarget

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

Public Functions Documentation#

function SBGRenderStructuralModel#

SBGRenderStructuralModel::SBGRenderStructuralModel (
    SBStructuralModel * model
) 

function SB_DECLARE_DATA#

SBGRenderStructuralModel::SB_DECLARE_DATA (
    SBGRenderStructuralModel
) 

function collectAmbientOcclusion#

void SBGRenderStructuralModel::collectAmbientOcclusion (
    const SBPosition3 & boxOrigin,
    const SBPosition3 & boxSize,
    unsigned int nCellsX,
    unsigned int nCellsY,
    unsigned int nCellsZ,
    float * ambientOcclusionData
) 

function connectToStructuralModel#

Connect the render model to the structural model.

void SBGRenderStructuralModel::connectToStructuralModel () 


function disconnectFromStructuralModel#

Disconnect the render model from the structural model.

void SBGRenderStructuralModel::disconnectFromStructuralModel () 


function display#

Display the node.

virtual void SBGRenderStructuralModel::display (
    SBNode::RenderingPass renderingPass
) override

Implements SBGRenderNode::display


function expandBounds#

Expands the bounds to make sure the structural model fits inside them.

void SBGRenderStructuralModel::expandBounds (
    SBIAPosition3 & bounds
) const


function forEachNodeDepthFirst [1/2]#

virtual void SBGRenderStructuralModel::forEachNodeDepthFirst (
    void(*)( SBGRenderNode *node) action
) override

Implements SBGRenderNode::forEachNodeDepthFirst


function forEachNodeDepthFirst [2/2]#

virtual void SBGRenderStructuralModel::forEachNodeDepthFirst (
    SBCClass * object,
    void(SBCClass::*)( SBGRenderNode *node) action
) override

Implements SBGRenderNode::forEachNodeDepthFirst


function getAtomColorData#

Return the atom color data.

const float * SBGRenderStructuralModel::getAtomColorData () const


function getAtomFlagData#

Return the atom flag data.

const unsigned int * SBGRenderStructuralModel::getAtomFlagData () const


function getAtomNodeIndexData#

Return the atom node index data.

const unsigned int * SBGRenderStructuralModel::getAtomNodeIndexData () const


function getAtomPointerIndexer#

Return the index of currently displayed atoms.

const SBPointerIndexer< SBNode > * SBGRenderStructuralModel::getAtomPointerIndexer () const


function getAtomPositionData#

Return the atom position data.

const float * SBGRenderStructuralModel::getAtomPositionData () const


function getAtomRadius#

float SBGRenderStructuralModel::getAtomRadius () const

function getAtomSizeProportionalToVdWRadius#

float SBGRenderStructuralModel::getAtomSizeProportionalToVdWRadius () const

function getBondAtomColorData#

Return the bond atom color data.

const float * SBGRenderStructuralModel::getBondAtomColorData () const


function getBondAtomIndexData#

Return the bond atom index data.

const unsigned int * SBGRenderStructuralModel::getBondAtomIndexData () const


function getBondAtomPointerIndexer#

Return the index of atoms in currently displayed bonds.

const SBPointerIndexer< SBNode > * SBGRenderStructuralModel::getBondAtomPointerIndexer () const


function getBondAtomPositionData#

Return the bond atom position data.

const float * SBGRenderStructuralModel::getBondAtomPositionData () const


function getBondDisplacementData#

Return the bond displacement data.

const float * SBGRenderStructuralModel::getBondDisplacementData () const


function getBondFlagData#

Return the bond flag data.

const unsigned int * SBGRenderStructuralModel::getBondFlagData () const


function getBondMultipleDisplay#

bool SBGRenderStructuralModel::getBondMultipleDisplay () const

function getBondNodeIndexData#

Return the bond node index data.

const unsigned int * SBGRenderStructuralModel::getBondNodeIndexData () const


function getBondOrderData#

Return the bond order data.

const float * SBGRenderStructuralModel::getBondOrderData () const


function getBondPointerIndexer#

Return the index of currently displayed bonds.

const SBPointerIndexer< SBNode > * SBGRenderStructuralModel::getBondPointerIndexer () const


function getBondRadius#

float SBGRenderStructuralModel::getBondRadius () const

function getConstantAtomRadiusFlag#

bool SBGRenderStructuralModel::getConstantAtomRadiusFlag () const

function getHydrogenBondAtomIndexData#

Return the H-bond atom index data.

const unsigned int * SBGRenderStructuralModel::getHydrogenBondAtomIndexData () const


function getHydrogenBondAtomPointerIndexer#

Return the index of atoms in currently displayed H-bonds.

const SBPointerIndexer< SBNode > * SBGRenderStructuralModel::getHydrogenBondAtomPointerIndexer () const


function getHydrogenBondAtomPositionData#

Return the H-bond atom position data.

const float * SBGRenderStructuralModel::getHydrogenBondAtomPositionData () const


function getHydrogenBondColorData#

Return the H-bond atom color data.

const float * SBGRenderStructuralModel::getHydrogenBondColorData () const


function getHydrogenBondFlagData#

Return the H-bond flag data.

const unsigned int * SBGRenderStructuralModel::getHydrogenBondFlagData () const


function getHydrogenBondNodeIndexData#

Return the H-bond node index data.

const unsigned int * SBGRenderStructuralModel::getHydrogenBondNodeIndexData () const


function getHydrogenBondOrderData#

Return the H-bond order data.

const float * SBGRenderStructuralModel::getHydrogenBondOrderData () const


function getHydrogenBondPointerIndexer#

Return the index of currently displayed H-bonds.

const SBPointerIndexer< SBNode > * SBGRenderStructuralModel::getHydrogenBondPointerIndexer () const


function getNodes [1/4]#

virtual void SBGRenderStructuralModel::getNodes (
    std::vector< SBGRenderNode * > & selection
) override

Implements SBGRenderNode::getNodes


function getNodes [2/4]#

virtual void SBGRenderStructuralModel::getNodes (
    std::vector< SBGRenderNode * > & selection,
    SBGRenderNode::Type type
) override

Implements SBGRenderNode::getNodes


function getNodes [3/4]#

virtual void SBGRenderStructuralModel::getNodes (
    std::vector< SBGRenderNode * > & selection,
    bool(*)( SBGRenderNode *) selectionRule
) override

Implements SBGRenderNode::getNodes


function getNodes [4/4]#

virtual void SBGRenderStructuralModel::getNodes (
    std::vector< SBGRenderNode * > & selection,
    bool(*)( SBGRenderNode *) visitRule,
    bool(*)( SBGRenderNode *) selectionRule
) override

Implements SBGRenderNode::getNodes


function getType#

Return type of the render node.

virtual Type SBGRenderStructuralModel::getType () override const

Implements SBGRenderNode::getType


function onBaseEvent#

Handle structural model events.

void SBGRenderStructuralModel::onBaseEvent (
    SBBaseEvent * event
) 


function onStructuralEvent#

Handle structural events from structural models (moves, etc.)

void SBGRenderStructuralModel::onStructuralEvent (
    SBStructuralEvent * event
) 


function print#

Print debug information.

virtual void SBGRenderStructuralModel::print (
    unsigned int offset=0
) override const

Implements SBGRenderNode::print


function setAtomRadius#

void SBGRenderStructuralModel::setAtomRadius (
    float atomRadius
) 

function setAtomSizeProportionalToVdWRadius#

void SBGRenderStructuralModel::setAtomSizeProportionalToVdWRadius (
    float ratio
) 

function setBondMultipleDisplay#

void SBGRenderStructuralModel::setBondMultipleDisplay (
    bool multipleDisplay
) 

function setBondRadius#

void SBGRenderStructuralModel::setBondRadius (
    float bondRadius
) 

function setConstantAtomRadiusFlag#

void SBGRenderStructuralModel::setConstantAtomRadiusFlag (
    bool flag
) 

function setupFlagData#

Update the flags in the tree starting at root.

void SBGRenderStructuralModel::setupFlagData (
    SBNode * root
) 


function ~SBGRenderStructuralModel#

virtual SBGRenderStructuralModel::~SBGRenderStructuralModel () 

Public Static Functions Documentation#

function selectAll#

static bool SBGRenderStructuralModel::selectAll (
    SBNode * node
) 

function selectHighlightedNodes#

static bool SBGRenderStructuralModel::selectHighlightedNodes (
    SBNode * node
) 

function selectNodesByType#

template<SBNode::Type type>
static inline bool SBGRenderStructuralModel::selectNodesByType (
    SBNode * node
) 

function selectSelectedNodes#

static bool SBGRenderStructuralModel::selectSelectedNodes (
    SBNode * node
) 

function selectVisibleNodes#

static bool SBGRenderStructuralModel::selectVisibleNodes (
    SBNode * node
) 

Protected Attributes Documentation#

variable dataPointer#

SBGRenderStructuralModelData* dataPointer;

Protected Functions Documentation#

function addStructuralNodes [1/2]#

Add structural nodes to internal data structures.

void SBGRenderStructuralModel::addStructuralNodes () 


function addStructuralNodes [2/2]#

Add structural nodes to internal data structures.

void SBGRenderStructuralModel::addStructuralNodes (
    SBNode * root
) 


function copyAtomData#

void SBGRenderStructuralModel::copyAtomData (
    unsigned int & sourceIndex,
    unsigned int & destinationIndex
) 

function copyBondAtomData#

void SBGRenderStructuralModel::copyBondAtomData (
    unsigned int & sourceIndex,
    unsigned int & destinationIndex
) 

function copyBondData#

void SBGRenderStructuralModel::copyBondData (
    unsigned int & sourceIndex,
    unsigned int & destinationIndex
) 

function copyHydrogenBondAtomData#

void SBGRenderStructuralModel::copyHydrogenBondAtomData (
    unsigned int sourceIndex,
    unsigned int destinationIndex
) 

function copyHydrogenBondData#

void SBGRenderStructuralModel::copyHydrogenBondData (
    unsigned int sourceIndex,
    unsigned int destinationIndex
) 

function moveAtom#

void SBGRenderStructuralModel::moveAtom (
    SBAtom * atom
) 

function removeStructuralNodes [1/2]#

Remove structural nodes from internal data structures.

void SBGRenderStructuralModel::removeStructuralNodes () 


function removeStructuralNodes [2/2]#

Remove structural nodes from internal data structures.

void SBGRenderStructuralModel::removeStructuralNodes (
    SBNode * root
) 


function setupAtomData#

void SBGRenderStructuralModel::setupAtomData (
    SBAtom * atom,
    unsigned int & index
) 

function setupBondAtomData#

void SBGRenderStructuralModel::setupBondAtomData (
    SBAtom * atom,
    unsigned int & index
) 

function setupBondData#

void SBGRenderStructuralModel::setupBondData (
    SBBond * bond,
    unsigned int & index
) 

function setupBondDisplacementData#

void SBGRenderStructuralModel::setupBondDisplacementData (
    SBBond * bond,
    unsigned int & index
) 

function setupHydrogenBondAtomData#

void SBGRenderStructuralModel::setupHydrogenBondAtomData (
    SBAtom * atom,
    unsigned int index
) 

function setupHydrogenBondColorData#

void SBGRenderStructuralModel::setupHydrogenBondColorData (
    SBHydrogenBond * hydrogenBond,
    unsigned int index
) 

function setupHydrogenBondData#

void SBGRenderStructuralModel::setupHydrogenBondData (
    SBHydrogenBond * hydrogenBond,
    unsigned int index
) 

function setupHydrogenBondOrderData#

void SBGRenderStructuralModel::setupHydrogenBondOrderData (
    SBHydrogenBond * hydrogenBond,
    unsigned int index
) 

function setupMaterials#

void SBGRenderStructuralModel::setupMaterials (
    SBNode * root
) 

function updateAtomRadiusData [1/2]#

void SBGRenderStructuralModel::updateAtomRadiusData () 

function updateAtomRadiusData [2/2]#

void SBGRenderStructuralModel::updateAtomRadiusData (
    SBAtom * atom
) 

function updateHydrogenBondOrderData#

void SBGRenderStructuralModel::updateHydrogenBondOrderData () 

function updateHydrogenBonds#

void SBGRenderStructuralModel::updateHydrogenBonds () 

function updateStructuralNodes#

Display attributes.

void SBGRenderStructuralModel::updateStructuralNodes ()