Constructors and destructors | |
SBGRenderFragment (const SBNodeIndexer &nodeIndexer) | |
virtual | ~SBGRenderFragment () |
Rendering | |
virtual void | display (SBNode::RenderingPass renderingPass, const SBSpatialTransform &transform=SBSpatialTransform::identity, const SBColor &diffuseColor=SBColor::black, float diffuseColorReplacement=0.0f, float opacity=1.0f, unsigned int flagModifier=0, unsigned int nodeIndexModifier=0) |
Displays the visual model. | |
SB_DECLARE_DATA (SBGRenderFragment) | |
void | addStructuralNodes (SBNode *root) |
Add structural nodes to internal data structures. | |
void | onBaseEvent (SBBaseEvent *event) |
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 SBGRenderStructuralModel | |
virtual void | print (unsigned int offset=0) const override |
Print debug information. | |
SB_DECLARE_DATA (SBGRenderStructuralModel) | |
SBGRenderStructuralModel (SBStructuralModel *model) | |
virtual | ~SBGRenderStructuralModel () |
virtual Type | getType () const override |
Return type of the render node. | |
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. | |
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. | |
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) |
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 |
virtual void | forEachNodeDepthFirst (void(*action)(SBGRenderNode *node)) override |
virtual void | forEachNodeDepthFirst (SBCClass *object, void(SBCClass::*action)(SBGRenderNode *node)) override |
Public Member Functions inherited from SBGRenderNode | |
virtual SBGRenderNode * | getParent () 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 SBGRenderStructuralModel | |
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) |
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 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) |
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 SBGRenderStructuralModel | |
SBGRenderStructuralModelData * | dataPointer |
Protected Attributes inherited from SBCReferenceTarget | |
SBCReferenceTargetData * | dataPointer |
The class SBGRenderFragment can be used to render fragments, i.e. a collection of nodes. It can be used to display fragments without adding them into the data graph in the dedicated display functions of editors and visual models by calling the fragment's display function.