Choreonoid  1.8
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
cnoid::SgObject Class Reference

#include <SceneGraph.h>

Inheritance diagram for cnoid::SgObject:
cnoid::ClonableReferenced cnoid::Referenced cnoid::SgImage cnoid::SgMaterial cnoid::SgMeshBase cnoid::SgNode cnoid::SgSwitch cnoid::SgTexture cnoid::SgTextureTransform cnoid::SgVectorArray< T, Alloc > cnoid::SgVectorArray< Vector2f, Eigen::aligned_allocator< Vector2f > > cnoid::SgVectorArray< Vector3f >

Public Types

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

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)
 
virtual int numChildObjects () const
 
virtual SgObjectchildObject (int index)
 
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 ()
 

Static Public Member Functions

static bool checkNonNodeCloning (const CloneMap &cloneMap)
 
static void setNonNodeCloning (CloneMap &cloneMap, bool on)
 

Protected Member Functions

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

Member Typedef Documentation

◆ const_parentIter

typedef ParentContainer::const_iterator cnoid::SgObject::const_parentIter

◆ ParentContainer

◆ parentIter

typedef ParentContainer::iterator cnoid::SgObject::parentIter

Member Enumeration Documentation

◆ Attribute

Enumerator
Node 
GroupNode 
TransformNode 
Composite 
Geometry 
Appearance 
NodeDecoration 
Marker 
Operable 
MaxAttributeBit 
GroupAttribute 
NodeDecorationGroup 
MarkerAttribute 

Constructor & Destructor Documentation

◆ SgObject() [1/2]

SgObject::SgObject ( )
protected

◆ SgObject() [2/2]

SgObject::SgObject ( const SgObject org)
protected

Member Function Documentation

◆ absoluteUri()

const std::string & SgObject::absoluteUri ( ) const

◆ addParent()

void SgObject::addParent ( SgObject parent,
SgUpdateRef  update = nullptr 
)

◆ attributes()

int cnoid::SgObject::attributes ( ) const
inline

◆ checkNonNodeCloning()

bool SgObject::checkNonNodeCloning ( const CloneMap cloneMap)
static

◆ childObject()

SgObject * SgObject::childObject ( int  index)
virtual

◆ clearUri()

void cnoid::SgObject::clearUri ( )
inline

◆ clone() [1/2]

SgObject* cnoid::SgObject::clone ( ) const
inline

◆ clone() [2/2]

SgObject* cnoid::SgObject::clone ( CloneMap cloneMap) const
inline

◆ doClone()

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

◆ hasAbsoluteUri()

bool cnoid::SgObject::hasAbsoluteUri ( ) const
inline

◆ hasAttribute()

bool cnoid::SgObject::hasAttribute ( int  attr) const
inline

◆ hasAttributes()

bool cnoid::SgObject::hasAttributes ( int  attrs) const
inline

◆ hasParents()

bool cnoid::SgObject::hasParents ( ) const
inline

◆ hasUri()

bool cnoid::SgObject::hasUri ( ) const
inline

◆ hasUriFragment()

bool cnoid::SgObject::hasUriFragment ( ) const
inline

◆ hasValidBoundingBoxCache()

bool cnoid::SgObject::hasValidBoundingBoxCache ( ) const
inline

◆ invalidateBoundingBox()

void cnoid::SgObject::invalidateBoundingBox ( )
inline

◆ isGroupNode()

bool cnoid::SgObject::isGroupNode ( ) const
inline

◆ isNode()

bool cnoid::SgObject::isNode ( ) const
inline

◆ isTransformNode()

bool cnoid::SgObject::isTransformNode ( ) const
inline

◆ name()

const std::string& cnoid::SgObject::name ( ) const
inline

◆ notifyUpdate() [1/2]

void cnoid::SgObject::notifyUpdate ( int  action = SgUpdate::Modified)
inline

◆ notifyUpdate() [2/2]

void cnoid::SgObject::notifyUpdate ( SgUpdate update)
inline

◆ notifyUpperNodesOfUpdate() [1/2]

void SgObject::notifyUpperNodesOfUpdate ( SgUpdate update)
protected

◆ notifyUpperNodesOfUpdate() [2/2]

void SgObject::notifyUpperNodesOfUpdate ( SgUpdate update,
bool  doInvalidateBoundingBox 
)
protected

◆ numChildObjects()

int SgObject::numChildObjects ( ) const
virtual

◆ numParents()

int cnoid::SgObject::numParents ( ) const
inline

◆ parentBegin()

const_parentIter cnoid::SgObject::parentBegin ( ) const
inline

◆ parentEnd()

const_parentIter cnoid::SgObject::parentEnd ( ) const
inline

◆ removeParent()

void SgObject::removeParent ( SgObject parent)

◆ setAttribute()

void cnoid::SgObject::setAttribute ( int  attr)
inline

◆ setAttributes()

void cnoid::SgObject::setAttributes ( int  attrs)
inline

◆ setBoundingBoxCacheReady()

void cnoid::SgObject::setBoundingBoxCacheReady ( ) const
inline

◆ setName()

void cnoid::SgObject::setName ( const std::string &  name)
inline

◆ setNonNodeCloning()

void SgObject::setNonNodeCloning ( CloneMap cloneMap,
bool  on 
)
static

◆ setUri()

void SgObject::setUri ( const std::string &  uri,
const std::string &  absoluteUri 
)

◆ setUriByFilePathAndBaseDirectory()

void SgObject::setUriByFilePathAndBaseDirectory ( const std::string &  filePath,
const std::string &  baseDirectory 
)

◆ setUriByFilePathAndCurrentDirectory()

void SgObject::setUriByFilePathAndCurrentDirectory ( const std::string &  filePath)

◆ setUriFragment()

void SgObject::setUriFragment ( const std::string &  fragment)

◆ sigGraphConnection()

SignalProxy<void(bool on)> cnoid::SgObject::sigGraphConnection ( )
inline

This signal is emitted when the object is first attached to an upper node or the object is detached from all the upper node.

◆ sigUpdated()

SignalProxy<void(const SgUpdate& update)> cnoid::SgObject::sigUpdated ( )
inline

◆ toGroupNode()

SgGroup * cnoid::SgObject::toGroupNode ( )
inline

◆ toNode()

SgNode * cnoid::SgObject::toNode ( )
inline

◆ toTransformNode()

SgTransform * cnoid::SgObject::toTransformNode ( )
inline

◆ uri()

const std::string & SgObject::uri ( ) const

◆ uriFragment()

const std::string & SgObject::uriFragment ( ) const

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