Choreonoid  1.8
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cnoid::SgGroup Class Reference

#include <SceneGraph.h>

Inheritance diagram for cnoid::SgGroup:
cnoid::SgNode cnoid::SgObject cnoid::ClonableReferenced cnoid::Referenced cnoid::BoundingBoxMarker cnoid::SceneWidgetRoot cnoid::SgFixedPixelSizeGroup cnoid::SgHighlight cnoid::SgInvariantGroup cnoid::SgLightweightRenderingGroup cnoid::SgOverlay cnoid::SgPolygonDrawStyle cnoid::SgSwitchableGroup cnoid::SgTransform cnoid::SgTransparentGroup cnoid::SgUnpickableGroup

Public Types

typedef Container::iterator iterator
 
typedef Container::reverse_iterator reverse_iterator
 
typedef Container::const_iterator const_iterator
 
typedef Container::const_reverse_iterator const_reverse_iterator
 
- Public Types inherited from cnoid::SgObject
enum  Attribute {
  Node = 1 << 0, GroupNode = 1 << 1, TransformNode = 1 << 2, Composite = 1 << 3,
  Geometry = 1 << 4, Appearance = 1 << 5, NodeDecoration = 1 << 6, Marker = 1 << 7,
  Operable = 1 << 8, MaxAttributeBit = 9, GroupAttribute = GroupNode, NodeDecorationGroup = NodeDecoration,
  MarkerAttribute = Marker
}
 
typedef std::set< SgObject * > ParentContainer
 
typedef ParentContainer::iterator parentIter
 
typedef ParentContainer::const_iterator const_parentIter
 

Public Member Functions

 SgGroup ()
 
 SgGroup (const SgGroup &org, CloneMap *cloneMap=nullptr)
 
 ~SgGroup ()
 
virtual int numChildObjects () const override
 
virtual SgObjectchildObject (int index) override
 
virtual const BoundingBoxboundingBox () const override
 
iterator begin ()
 
iterator end ()
 
const_iterator cbegin ()
 
const_iterator cend ()
 
reverse_iterator rbegin ()
 
reverse_iterator rend ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
iterator erase (iterator pos)
 
bool empty () const
 
int numChildren () const
 
SgNodechild (int index)
 
const SgNodechild (int index) const
 
bool contains (SgNode *node) const
 
int findChildIndex (SgNode *child) const
 
template<class NodeType >
NodeType * getChild (int index)
 This throws an exeption when the index is invalid or the type is not matched. More...
 
void addChild (SgNode *node, SgUpdateRef update=nullptr)
 
bool addChildOnce (SgNode *node, SgUpdateRef update=nullptr)
 
void insertChild (int index, SgNode *node, SgUpdateRef update=nullptr)
 
void insertChild (SgNode *nextNode, SgNode *node, SgUpdateRef update=nullptr)
 
void setSingleChild (SgNode *node, SgUpdateRef update=nullptr)
 
iterator removeChild (iterator childIter, SgUpdateRef update=nullptr)
 
bool removeChild (SgNode *node, SgUpdateRef update=nullptr)
 
void removeChildAt (int index, SgUpdateRef update=nullptr)
 
void clearChildren (SgUpdateRef update=nullptr)
 
void copyChildrenTo (SgGroup *group, SgUpdateRef update=nullptr)
 
void moveChildrenTo (SgGroup *group, SgUpdateRef update=nullptr)
 
void insertChild (SgNode *node, int index, SgUpdateRef update=nullptr)
 
SgGroupnextChainedGroup ()
 
void insertChainedGroup (SgGroup *group, SgUpdateRef update=nullptr)
 
void removeChainedGroup (SgGroup *group, SgUpdateRef update=nullptr)
 
template<class NodeType >
NodeType * findNodeOfType (int depth=-1)
 
- Public Member Functions inherited from cnoid::SgNode
 SgNode ()
 
 SgNode (const SgNode &org)
 
 ~SgNode ()
 
int classId () const
 
SgNodecloneNode () const
 
SgNodecloneNode (CloneMap &cloneMap) const
 
virtual const BoundingBoxuntransformedBoundingBox () const
 
SgNodePath findNode (const std::string &name, Affine3 &out_T)
 
void addDecorationReference ()
 
void releaseDecorationReference ()
 
bool isDecoratedSomewhere () const
 
- Public Member Functions inherited from cnoid::SgObject
SgObjectclone () const
 
SgObjectclone (CloneMap &cloneMap) const
 
void setAttribute (int attr)
 
void setAttributes (int attrs)
 
int attributes () const
 
bool hasAttribute (int attr) const
 
bool hasAttributes (int attrs) const
 
const std::string & name () const
 
void setName (const std::string &name)
 
SignalProxy< void(const SgUpdate &update)> sigUpdated ()
 
void notifyUpdate (SgUpdate &update)
 
void notifyUpdate (int action=SgUpdate::Modified)
 
void addParent (SgObject *parent, SgUpdateRef update=nullptr)
 
void removeParent (SgObject *parent)
 
int numParents () const
 
bool hasParents () const
 
const_parentIter parentBegin () const
 
const_parentIter parentEnd () const
 
SignalProxy< void(bool on)> sigGraphConnection ()
 
bool hasValidBoundingBoxCache () const
 
void invalidateBoundingBox ()
 
void setBoundingBoxCacheReady () const
 
bool hasUri () const
 
const std::string & uri () const
 
bool hasAbsoluteUri () const
 
const std::string & absoluteUri () const
 
bool hasUriFragment () const
 
const std::string & uriFragment () const
 
void setUriByFilePathAndBaseDirectory (const std::string &filePath, const std::string &baseDirectory)
 
void setUriByFilePathAndCurrentDirectory (const std::string &filePath)
 
void setUri (const std::string &uri, const std::string &absoluteUri)
 
void setUriFragment (const std::string &fragment)
 
void clearUri ()
 
bool isNode () const
 
SgNodetoNode ()
 
bool isGroupNode () const
 
SgGrouptoGroupNode ()
 
bool isTransformNode () const
 
SgTransformtoTransformNode ()
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Protected Member Functions

 SgGroup (int classId)
 
virtual ReferenceddoClone (CloneMap *cloneMap) const override
 
- Protected Member Functions inherited from cnoid::SgNode
 SgNode (int classId)
 
- Protected Member Functions inherited from cnoid::SgObject
 SgObject ()
 
 SgObject (const SgObject &org)
 
void notifyUpperNodesOfUpdate (SgUpdate &update)
 
void notifyUpperNodesOfUpdate (SgUpdate &update, bool doInvalidateBoundingBox)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Protected Attributes

BoundingBox bboxCache
 

Additional Inherited Members

- Static Public Member Functions inherited from cnoid::SgNode
static int findClassId (const std::type_info &nodeType)
 
template<class NodeType >
static int findClassId ()
 
template<class NodeType >
static int findPolymorphicId ()
 
- Static Public Member Functions inherited from cnoid::SgObject
static bool checkNonNodeCloning (const CloneMap &cloneMap)
 
static void setNonNodeCloning (CloneMap &cloneMap, bool on)
 

Member Typedef Documentation

◆ const_iterator

typedef Container::const_iterator cnoid::SgGroup::const_iterator

◆ const_reverse_iterator

typedef Container::const_reverse_iterator cnoid::SgGroup::const_reverse_iterator

◆ iterator

typedef Container::iterator cnoid::SgGroup::iterator

◆ reverse_iterator

typedef Container::reverse_iterator cnoid::SgGroup::reverse_iterator

Constructor & Destructor Documentation

◆ SgGroup() [1/3]

SgGroup::SgGroup ( )

◆ SgGroup() [2/3]

SgGroup::SgGroup ( const SgGroup org,
CloneMap cloneMap = nullptr 
)

◆ ~SgGroup()

SgGroup::~SgGroup ( )

◆ SgGroup() [3/3]

SgGroup::SgGroup ( int  classId)
protected

Member Function Documentation

◆ addChild()

void SgGroup::addChild ( SgNode node,
SgUpdateRef  update = nullptr 
)

◆ addChildOnce()

bool SgGroup::addChildOnce ( SgNode node,
SgUpdateRef  update = nullptr 
)

◆ begin() [1/2]

iterator cnoid::SgGroup::begin ( )
inline

◆ begin() [2/2]

const_iterator cnoid::SgGroup::begin ( ) const
inline

◆ boundingBox()

const BoundingBox & SgGroup::boundingBox ( ) const
overridevirtual

◆ cbegin()

const_iterator cnoid::SgGroup::cbegin ( )
inline

◆ cend()

const_iterator cnoid::SgGroup::cend ( )
inline

◆ child() [1/2]

SgNode* cnoid::SgGroup::child ( int  index)
inline

◆ child() [2/2]

const SgNode* cnoid::SgGroup::child ( int  index) const
inline

◆ childObject()

SgObject * SgGroup::childObject ( int  index)
overridevirtual

Reimplemented from cnoid::SgObject.

Reimplemented in cnoid::SgBoundingBox.

◆ clearChildren()

void SgGroup::clearChildren ( SgUpdateRef  update = nullptr)

◆ contains()

bool SgGroup::contains ( SgNode node) const

◆ copyChildrenTo()

void SgGroup::copyChildrenTo ( SgGroup group,
SgUpdateRef  update = nullptr 
)

◆ doClone()

Referenced * SgGroup::doClone ( CloneMap cloneMap) const
overrideprotectedvirtual

◆ empty()

bool cnoid::SgGroup::empty ( ) const
inline

◆ end() [1/2]

iterator cnoid::SgGroup::end ( )
inline

◆ end() [2/2]

const_iterator cnoid::SgGroup::end ( ) const
inline

◆ erase()

iterator cnoid::SgGroup::erase ( iterator  pos)
inline

◆ findChildIndex()

int SgGroup::findChildIndex ( SgNode child) const

◆ findNodeOfType()

template<class NodeType >
NodeType* cnoid::SgGroup::findNodeOfType ( int  depth = -1)
inline

◆ getChild()

template<class NodeType >
NodeType* cnoid::SgGroup::getChild ( int  index)
inline

This throws an exeption when the index is invalid or the type is not matched.

◆ insertChainedGroup()

void SgGroup::insertChainedGroup ( SgGroup group,
SgUpdateRef  update = nullptr 
)

◆ insertChild() [1/3]

void SgGroup::insertChild ( int  index,
SgNode node,
SgUpdateRef  update = nullptr 
)

◆ insertChild() [2/3]

void SgGroup::insertChild ( SgNode nextNode,
SgNode node,
SgUpdateRef  update = nullptr 
)

◆ insertChild() [3/3]

void cnoid::SgGroup::insertChild ( SgNode node,
int  index,
SgUpdateRef  update = nullptr 
)
inline

◆ moveChildrenTo()

void SgGroup::moveChildrenTo ( SgGroup group,
SgUpdateRef  update = nullptr 
)

◆ nextChainedGroup()

SgGroup * SgGroup::nextChainedGroup ( )

◆ numChildObjects()

int SgGroup::numChildObjects ( ) const
overridevirtual

Reimplemented from cnoid::SgObject.

Reimplemented in cnoid::SgBoundingBox.

◆ numChildren()

int cnoid::SgGroup::numChildren ( ) const
inline

◆ rbegin() [1/2]

reverse_iterator cnoid::SgGroup::rbegin ( )
inline

◆ rbegin() [2/2]

const_reverse_iterator cnoid::SgGroup::rbegin ( ) const
inline

◆ removeChainedGroup()

void SgGroup::removeChainedGroup ( SgGroup group,
SgUpdateRef  update = nullptr 
)

◆ removeChild() [1/2]

SgGroup::iterator SgGroup::removeChild ( iterator  childIter,
SgUpdateRef  update = nullptr 
)

◆ removeChild() [2/2]

bool SgGroup::removeChild ( SgNode node,
SgUpdateRef  update = nullptr 
)

◆ removeChildAt()

void SgGroup::removeChildAt ( int  index,
SgUpdateRef  update = nullptr 
)

◆ rend() [1/2]

reverse_iterator cnoid::SgGroup::rend ( )
inline

◆ rend() [2/2]

const_reverse_iterator cnoid::SgGroup::rend ( ) const
inline

◆ setSingleChild()

void SgGroup::setSingleChild ( SgNode node,
SgUpdateRef  update = nullptr 
)

Member Data Documentation

◆ bboxCache

BoundingBox cnoid::SgGroup::bboxCache
mutableprotected

The documentation for this class was generated from the following files: