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

#include <SceneDrawables.h>

Inheritance diagram for cnoid::SgMeshBase:
cnoid::SgObject cnoid::ClonableReferenced cnoid::Referenced cnoid::SgMesh cnoid::SgPolygonMesh

Public Member Functions

virtual int numChildObjects () const override
 
virtual SgObjectchildObject (int index) override
 
const BoundingBoxboundingBox () const
 
virtual void updateBoundingBox ()
 
void setBoundingBox (const BoundingBox &bb)
 
void setBoundingBox (const BoundingBoxf &bb)
 
bool hasVertices () const
 
SgVertexArrayvertices ()
 
const SgVertexArrayvertices () const
 
SgVertexArraysetVertices (SgVertexArray *vertices)
 
SgVertexArraygetOrCreateVertices (int size=0)
 
bool hasNormals () const
 
SgNormalArraynormals ()
 
const SgNormalArraynormals () const
 
SgNormalArraysetNormals (SgNormalArray *normals)
 
SgNormalArraygetOrCreateNormals ()
 
bool hasColors () const
 
SgColorArraycolors ()
 
const SgColorArraycolors () const
 
SgColorArraysetColors (SgColorArray *colors)
 
SgColorArraygetOrCreateColors (int size=0)
 
bool hasTexCoords () const
 
SgTexCoordArraytexCoords ()
 
const SgTexCoordArraytexCoords () const
 
SgTexCoordArraysetTexCoords (SgTexCoordArray *texCoords)
 
SgTexCoordArraygetOrCreateTexCoords ()
 
bool hasFaceVertexIndices () const
 
const SgIndexArrayfaceVertexIndices () const
 
SgIndexArrayfaceVertexIndices ()
 
bool hasNormalIndices () const
 
const SgIndexArraynormalIndices () const
 
SgIndexArraynormalIndices ()
 
bool hasColorIndices () const
 
const SgIndexArraycolorIndices () const
 
SgIndexArraycolorIndices ()
 
bool hasTexCoordIndices () const
 
const SgIndexArraytexCoordIndices () const
 
SgIndexArraytexCoordIndices ()
 
float creaseAngle () const
 
void setCreaseAngle (float angle)
 
bool isSolid () const
 
void setSolid (bool on)
 
- 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

 SgMeshBase ()
 
 SgMeshBase (const SgMeshBase &org, CloneMap *cloneMap=nullptr)
 
 ~SgMeshBase ()
 
- Protected Member Functions inherited from cnoid::SgObject
 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
 

Protected Attributes

BoundingBox bbox
 
SgVertexArrayPtr vertices_
 
SgIndexArray faceVertexIndices_
 
SgNormalArrayPtr normals_
 
SgIndexArray normalIndices_
 
SgColorArrayPtr colors_
 
SgIndexArray colorIndices_
 
SgTexCoordArrayPtr texCoords_
 
SgIndexArray texCoordIndices_
 
float creaseAngle_
 
bool isSolid_
 

Additional Inherited Members

- 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
 
- Static Public Member Functions inherited from cnoid::SgObject
static bool checkNonNodeCloning (const CloneMap &cloneMap)
 
static void setNonNodeCloning (CloneMap &cloneMap, bool on)
 

Constructor & Destructor Documentation

◆ SgMeshBase() [1/2]

SgMeshBase::SgMeshBase ( )
protected

◆ SgMeshBase() [2/2]

SgMeshBase::SgMeshBase ( const SgMeshBase org,
CloneMap cloneMap = nullptr 
)
protected

◆ ~SgMeshBase()

SgMeshBase::~SgMeshBase ( )
protected

Member Function Documentation

◆ boundingBox()

const BoundingBox& cnoid::SgMeshBase::boundingBox ( ) const
inline

◆ childObject()

SgObject * SgMeshBase::childObject ( int  index)
overridevirtual

Reimplemented from cnoid::SgObject.

◆ colorIndices() [1/2]

SgIndexArray& cnoid::SgMeshBase::colorIndices ( )
inline

◆ colorIndices() [2/2]

const SgIndexArray& cnoid::SgMeshBase::colorIndices ( ) const
inline

◆ colors() [1/2]

SgColorArray* cnoid::SgMeshBase::colors ( )
inline

◆ colors() [2/2]

const SgColorArray* cnoid::SgMeshBase::colors ( ) const
inline

◆ creaseAngle()

float cnoid::SgMeshBase::creaseAngle ( ) const
inline

◆ faceVertexIndices() [1/2]

SgIndexArray& cnoid::SgMeshBase::faceVertexIndices ( )
inline

◆ faceVertexIndices() [2/2]

const SgIndexArray& cnoid::SgMeshBase::faceVertexIndices ( ) const
inline

◆ getOrCreateColors()

SgColorArray * SgMeshBase::getOrCreateColors ( int  size = 0)

◆ getOrCreateNormals()

SgNormalArray * SgMeshBase::getOrCreateNormals ( )

◆ getOrCreateTexCoords()

SgTexCoordArray * SgMeshBase::getOrCreateTexCoords ( )

◆ getOrCreateVertices()

SgVertexArray * SgMeshBase::getOrCreateVertices ( int  size = 0)

◆ hasColorIndices()

bool cnoid::SgMeshBase::hasColorIndices ( ) const
inline

◆ hasColors()

bool cnoid::SgMeshBase::hasColors ( ) const
inline

◆ hasFaceVertexIndices()

bool cnoid::SgMeshBase::hasFaceVertexIndices ( ) const
inline

◆ hasNormalIndices()

bool cnoid::SgMeshBase::hasNormalIndices ( ) const
inline

Normals are assinged for vertices in triangles.

◆ hasNormals()

bool cnoid::SgMeshBase::hasNormals ( ) const
inline

◆ hasTexCoordIndices()

bool cnoid::SgMeshBase::hasTexCoordIndices ( ) const
inline

◆ hasTexCoords()

bool cnoid::SgMeshBase::hasTexCoords ( ) const
inline

◆ hasVertices()

bool cnoid::SgMeshBase::hasVertices ( ) const
inline

◆ isSolid()

bool cnoid::SgMeshBase::isSolid ( ) const
inline

◆ normalIndices() [1/2]

SgIndexArray& cnoid::SgMeshBase::normalIndices ( )
inline

◆ normalIndices() [2/2]

const SgIndexArray& cnoid::SgMeshBase::normalIndices ( ) const
inline

◆ normals() [1/2]

SgNormalArray* cnoid::SgMeshBase::normals ( )
inline

◆ normals() [2/2]

const SgNormalArray* cnoid::SgMeshBase::normals ( ) const
inline

◆ numChildObjects()

int SgMeshBase::numChildObjects ( ) const
overridevirtual

Reimplemented from cnoid::SgObject.

◆ setBoundingBox() [1/2]

void cnoid::SgMeshBase::setBoundingBox ( const BoundingBox bb)
inline

◆ setBoundingBox() [2/2]

void cnoid::SgMeshBase::setBoundingBox ( const BoundingBoxf bb)
inline

◆ setColors()

SgColorArray * SgMeshBase::setColors ( SgColorArray colors)

◆ setCreaseAngle()

void cnoid::SgMeshBase::setCreaseAngle ( float  angle)
inline

◆ setNormals()

SgNormalArray * SgMeshBase::setNormals ( SgNormalArray normals)

◆ setSolid()

void cnoid::SgMeshBase::setSolid ( bool  on)
inline

◆ setTexCoords()

SgTexCoordArray * SgMeshBase::setTexCoords ( SgTexCoordArray texCoords)

◆ setVertices()

SgVertexArray * SgMeshBase::setVertices ( SgVertexArray vertices)

◆ texCoordIndices() [1/2]

SgIndexArray& cnoid::SgMeshBase::texCoordIndices ( )
inline

◆ texCoordIndices() [2/2]

const SgIndexArray& cnoid::SgMeshBase::texCoordIndices ( ) const
inline

◆ texCoords() [1/2]

SgTexCoordArray* cnoid::SgMeshBase::texCoords ( )
inline

◆ texCoords() [2/2]

const SgTexCoordArray* cnoid::SgMeshBase::texCoords ( ) const
inline

◆ updateBoundingBox()

void SgMeshBase::updateBoundingBox ( )
virtual

Reimplemented in cnoid::SgPolygonMesh, and cnoid::SgMesh.

◆ vertices() [1/2]

SgVertexArray* cnoid::SgMeshBase::vertices ( )
inline

◆ vertices() [2/2]

const SgVertexArray* cnoid::SgMeshBase::vertices ( ) const
inline

Member Data Documentation

◆ bbox

BoundingBox cnoid::SgMeshBase::bbox
protected

◆ colorIndices_

SgIndexArray cnoid::SgMeshBase::colorIndices_
protected

◆ colors_

SgColorArrayPtr cnoid::SgMeshBase::colors_
protected

◆ creaseAngle_

float cnoid::SgMeshBase::creaseAngle_
protected

◆ faceVertexIndices_

SgIndexArray cnoid::SgMeshBase::faceVertexIndices_
protected

◆ isSolid_

bool cnoid::SgMeshBase::isSolid_
protected

◆ normalIndices_

SgIndexArray cnoid::SgMeshBase::normalIndices_
protected

◆ normals_

SgNormalArrayPtr cnoid::SgMeshBase::normals_
protected

◆ texCoordIndices_

SgIndexArray cnoid::SgMeshBase::texCoordIndices_
protected

◆ texCoords_

SgTexCoordArrayPtr cnoid::SgMeshBase::texCoords_
protected

◆ vertices_

SgVertexArrayPtr cnoid::SgMeshBase::vertices_
protected

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