Loading...
Searching...
No Matches
SBGRenderStructuralModel Class Reference

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

Debugging

SBGRenderStructuralModelData * dataPointer
 
virtual void print (unsigned int offset=0) const override
 Print debug information.
 
 SB_DECLARE_DATA (SBGRenderStructuralModel)
 
void updateStructuralNodes ()
 Display attributes.
 
void addStructuralNodes ()
 Add structural nodes to internal data structures.
 
void addStructuralNodes (SBNode *root)
 Add structural nodes to internal data structures.
 
void removeStructuralNodes ()
 Remove structural nodes from internal data structures.
 
void removeStructuralNodes (SBNode *root)
 Remove structural nodes from internal data structures.
 
void setupMaterials (SBNode *root)
 
void moveAtom (SBAtom *atom)
 
void setupAtomData (SBAtom *atom, unsigned int &index)
 
void setupBondAtomData (SBAtom *atom, unsigned int &index)
 
void setupBondAtomNormalData (SBAtom *atom, unsigned int &index)
 
void setupBondData (SBBond *bond, unsigned int &index)
 
void setupBondDisplacementData (SBBond *bond, unsigned int &index)
 
void updateBondDisplacements ()
 
void setupHydrogenBondAtomData (SBAtom *atom, unsigned int index)
 
void setupHydrogenBondData (SBHydrogenBond *hydrogenBond, unsigned int index)
 
void setupHydrogenBondOrderData (SBHydrogenBond *hydrogenBond, unsigned int index)
 
void setupHydrogenBondColorData (SBHydrogenBond *hydrogenBond, unsigned int index)
 
void updateHydrogenBondOrderData ()
 
void updateHydrogenBonds ()
 
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 updateAtomRadiusData ()
 
void updateAtomRadiusData (SBAtom *atom)
 

Constructors and destructors

 SBGRenderStructuralModel (SBStructuralModel *model)
 
virtual ~SBGRenderStructuralModel ()
 

Identity

virtual Type getType () const override
 Return type of the render node.
 

Structure

const SBPointerIndexer< SBNode > * getAtomPointerIndexer () const
 Return the index of currently displayed atoms.
 
const SBPointerIndexer< SBNode > * getBondPointerIndexer () const
 Return the index of currently displayed bonds.
 
const SBPointerIndexer< SBNode > * getBondAtomPointerIndexer () const
 Return the index of atoms in currently displayed bonds.
 
const SBPointerIndexer< SBNode > * getHydrogenBondPointerIndexer () const
 Return the index of currently displayed H-bonds.
 
const SBPointerIndexer< SBNode > * getHydrogenBondAtomPointerIndexer () const
 Return the index of atoms in currently displayed H-bonds.
 
const float * getAtomPositionData () const
 Return the atom position data.
 
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 float * getBondAtomPositionData () const
 Return the bond atom position data.
 
const float * getBondAtomColorData () const
 Return the bond atom color data.
 
const unsigned int * getBondAtomIndexData () const
 Return the bond atom index data.
 
const float * getBondOrderData () const
 Return the bond order data.
 
const unsigned int * getBondFlagData () const
 Return the bond flag data.
 
const unsigned int * getBondNodeIndexData () const
 Return the bond node index data.
 
const float * getBondDisplacementData () const
 Return the bond displacement data.
 
const float * getHydrogenBondAtomPositionData () const
 Return the H-bond atom position data.
 
const unsigned int * getHydrogenBondAtomIndexData () const
 Return the H-bond atom index data.
 
const float * getHydrogenBondColorData () const
 Return the H-bond atom color data.
 
const float * getHydrogenBondOrderData () const
 Return the H-bond order data.
 
const unsigned int * getHydrogenBondFlagData () const
 Return the H-bond flag data.
 
const unsigned int * getHydrogenBondNodeIndexData () const
 Return the H-bond node index data.
 
void expandBounds (SBIAPosition3 &bounds) const
 Expands the bounds to make sure the structural model fits inside them.
 

Event management

void connectToStructuralModel ()
 Connect the render model to the structural model.
 
void disconnectFromStructuralModel ()
 Disconnect the render model from the structural model.
 
void onBaseEvent (SBBaseEvent *event)
 Handle structural model events

 
void onStructuralEvent (SBStructuralEvent *event)
 Handle structural events from structural models (moves, etc.)
 
void setupFlagData (SBNode *root)
 Update the flags in the tree starting at root.
 

Rendering

virtual void display (SBNode::RenderingPass renderingPass) override
 Display the node.
 
void collectAmbientOcclusion (const SBPosition3 &boxOrigin, const SBPosition3 &boxSize, unsigned int nCellsX, unsigned int nCellsY, unsigned int nCellsZ, float *ambientOcclusionData)
 
float getAtomRadius () const
 
void setAtomRadius (float atomRadius)
 
float getBondRadius () const
 
void setBondRadius (float bondRadius)
 
bool getBondMultipleDisplay () const
 
void setBondMultipleDisplay (bool multipleDisplay)
 
float getAtomSizeProportionalToVdWRadius () const
 
void setAtomSizeProportionalToVdWRadius (float ratio)
 
bool getConstantAtomRadiusFlag () const
 
void setConstantAtomRadiusFlag (bool flag)
 

Selection functions

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(*selectionRule)(SBGRenderNode *)) override
 
virtual void getNodes (std::vector< SBGRenderNode * > &selection, bool(*visitRule)(SBGRenderNode *), bool(*selectionRule)(SBGRenderNode *)) override
 

Visitor functions

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

Selection rules

static bool selectVisibleNodes (SBNode *node)
 
static bool selectSelectedNodes (SBNode *node)
 
static bool selectHighlightedNodes (SBNode *node)
 
static bool selectAll (SBNode *node)
 
template<SBNode::Type type>
static bool selectNodesByType (SBNode *node)
 

Additional Inherited Members

- Public Types inherited from SBGRenderNode
enum class  Type {
  Undefined ,
  DocumentManager ,
  Document ,
  Folder ,
  Controller ,
  Label ,
  Presentation ,
  Light ,
  StructuralModel ,
  VisualModel ,
  Mesh ,
  DynamicalModel ,
  InteractionModel ,
  PropertyModel ,
  Simulator ,
  StateUpdater
}
 
- Public Member Functions inherited from SBGRenderNode
virtual SBGRenderNodegetParent () const
 Return parent of the render node.
 
virtual void requestViewportUpdate ()
 Request a viewport update.
 
- Public Member Functions inherited from SBCReferenceTarget
unsigned int getMemoryFootprint () const
 
void printReferencesToOwners () const
 
 SBCReferenceTarget ()
 
virtual ~SBCReferenceTarget ()
 
- Static Public Member Functions inherited from SBGRenderNode
static std::string getTypeString (Type type)
 Return string representation of the type of the render node.
 
static void forEachNodeInSelection (std::vector< SBGRenderNode * > &selection, void(*action)(SBGRenderNode *node))
 
static void forEachNodeInSelection (std::vector< SBGRenderNode * > &selection, SBCClass *object, void(SBCClass::*action)(SBGRenderNode *node))
 
- Protected Member Functions inherited from SBGRenderNode
 SBGRenderNode ()
 Build a base object.
 
virtual ~SBGRenderNode ()
 
- Protected Member Functions inherited from SBCReferenceTarget
void removeAllReferenceOwners ()
 
 SBCReferenceTarget (SBCReferenceTargetData *dataPointer)
 
- Protected Attributes inherited from SBCReferenceTarget
SBCReferenceTargetData * dataPointer
 

Member Function Documentation

◆ display()

void SBGRenderStructuralModel::display ( SBNode::RenderingPass  renderingPass)
overridevirtual

Implements SBGRenderNode.

◆ forEachNodeDepthFirst() [1/2]

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

Reimplemented from SBGRenderNode.

◆ forEachNodeDepthFirst() [2/2]

void SBGRenderStructuralModel::forEachNodeDepthFirst ( void(*)(SBGRenderNode *node)  action)
overridevirtual

Reimplemented from SBGRenderNode.

◆ getNodes() [1/4]

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

Reimplemented from SBGRenderNode.

◆ getNodes() [2/4]

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

Reimplemented from SBGRenderNode.

◆ getNodes() [3/4]

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

Reimplemented from SBGRenderNode.

◆ getNodes() [4/4]

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

Reimplemented from SBGRenderNode.

◆ getType()

SBGRenderNode::Type SBGRenderStructuralModel::getType ( ) const
overridevirtual

Reimplemented from SBGRenderNode.

◆ print()

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

Reimplemented from SBGRenderNode.