Choreonoid
1.8
|
#include <SceneDrawables.h>
Classes | |
class | Box |
class | Capsule |
class | Cone |
class | Cylinder |
class | Mesh |
class | Sphere |
Public Types | |
enum | PrimitiveType { MeshType, BoxType, SphereType, CylinderType, ConeType, CapsuleType, MESH = MeshType, BOX = BoxType, SPHERE = SphereType, CYLINDER = CylinderType, CONE = ConeType, CAPSULE = CapsuleType } |
enum | ExtraDivisionMode { ExtraDivisionPreferred = 0, ExtraDivisionX = 1, ExtraDivisionY = 2, ExtraDivisionZ = 4, ExtraDivisionAll = ExtraDivisionX | ExtraDivisionY | ExtraDivisionZ } |
This mode is only valid for the box primitive. More... | |
typedef Eigen::Map< Array3i > | TriangleRef |
typedef Eigen::Map< const Array3i > | ConstTriangleRef |
typedef stdx::variant< Mesh, Box, Sphere, Cylinder, Cone, Capsule > | Primitive |
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 | |
SgMesh () | |
SgMesh (const SgMesh &org, CloneMap *cloneMap=nullptr) | |
virtual void | updateBoundingBox () override |
const SgIndexArray & | triangleVertices () const |
SgIndexArray & | triangleVertices () |
bool | hasTriangles () const |
int | numTriangles () const |
void | setNumTriangles (int n) |
void | reserveNumTriangles (int n) |
TriangleRef | triangle (int index) |
ConstTriangleRef | triangle (int index) const |
void | setTriangle (int index, int v0, int v1, int v2) |
TriangleRef | newTriangle () |
TriangleRef | addTriangle () |
void | addTriangles (std::initializer_list< Array3i > il) |
void | addTriangle (int v0, int v1, int v2) |
SgMesh (Primitive primitive) | |
const int | primitiveType () const |
template<class TPrimitive > | |
const TPrimitive & | primitive () const |
void | setPrimitive (Primitive prim) |
int | divisionNumber () const |
The value is -1 when the division number is not explicitly specified. More... | |
void | setDivisionNumber (int n) |
int | extraDivisionNumber () const |
The value is -1 when the extra division number is not explicitly specified. More... | |
void | setExtraDivisionNumber (int n) |
int | extraDivisionMode () const |
void | setExtraDivisionMode (int mode) |
void | transform (const Affine3 &T) |
void | transform (const Affine3f &T) |
void | translate (const Vector3f &translation) |
void | rotate (const Matrix3f &R) |
Public Member Functions inherited from cnoid::SgMeshBase | |
virtual int | numChildObjects () const override |
virtual SgObject * | childObject (int index) override |
const BoundingBox & | boundingBox () const |
void | setBoundingBox (const BoundingBox &bb) |
void | setBoundingBox (const BoundingBoxf &bb) |
bool | hasVertices () const |
SgVertexArray * | vertices () |
const SgVertexArray * | vertices () const |
SgVertexArray * | setVertices (SgVertexArray *vertices) |
SgVertexArray * | getOrCreateVertices (int size=0) |
bool | hasNormals () const |
SgNormalArray * | normals () |
const SgNormalArray * | normals () const |
SgNormalArray * | setNormals (SgNormalArray *normals) |
SgNormalArray * | getOrCreateNormals () |
bool | hasColors () const |
SgColorArray * | colors () |
const SgColorArray * | colors () const |
SgColorArray * | setColors (SgColorArray *colors) |
SgColorArray * | getOrCreateColors (int size=0) |
bool | hasTexCoords () const |
SgTexCoordArray * | texCoords () |
const SgTexCoordArray * | texCoords () const |
SgTexCoordArray * | setTexCoords (SgTexCoordArray *texCoords) |
SgTexCoordArray * | getOrCreateTexCoords () |
bool | hasFaceVertexIndices () const |
const SgIndexArray & | faceVertexIndices () const |
SgIndexArray & | faceVertexIndices () |
bool | hasNormalIndices () const |
const SgIndexArray & | normalIndices () const |
SgIndexArray & | normalIndices () |
bool | hasColorIndices () const |
const SgIndexArray & | colorIndices () const |
SgIndexArray & | colorIndices () |
bool | hasTexCoordIndices () const |
const SgIndexArray & | texCoordIndices () const |
SgIndexArray & | texCoordIndices () |
float | creaseAngle () const |
void | setCreaseAngle (float angle) |
bool | isSolid () const |
void | setSolid (bool on) |
Public Member Functions inherited from cnoid::SgObject | |
SgObject * | clone () const |
SgObject * | clone (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 |
SgNode * | toNode () |
bool | isGroupNode () const |
SgGroup * | toGroupNode () |
bool | isTransformNode () const |
SgTransform * | toTransformNode () |
Public Member Functions inherited from cnoid::Referenced | |
virtual | ~Referenced () |
Protected Member Functions | |
virtual Referenced * | doClone (CloneMap *cloneMap) const override |
Protected Member Functions inherited from cnoid::SgMeshBase | |
SgMeshBase () | |
SgMeshBase (const SgMeshBase &org, CloneMap *cloneMap=nullptr) | |
~SgMeshBase () | |
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 |
Additional Inherited Members | |
Static Public Member Functions inherited from cnoid::SgObject | |
static bool | checkNonNodeCloning (const CloneMap &cloneMap) |
static void | setNonNodeCloning (CloneMap &cloneMap, bool on) |
Protected Attributes inherited from cnoid::SgMeshBase | |
BoundingBox | bbox |
SgVertexArrayPtr | vertices_ |
SgIndexArray | faceVertexIndices_ |
SgNormalArrayPtr | normals_ |
SgIndexArray | normalIndices_ |
SgColorArrayPtr | colors_ |
SgIndexArray | colorIndices_ |
SgTexCoordArrayPtr | texCoords_ |
SgIndexArray | texCoordIndices_ |
float | creaseAngle_ |
bool | isSolid_ |
typedef Eigen::Map<const Array3i> cnoid::SgMesh::ConstTriangleRef |
typedef Eigen::Map<Array3i> cnoid::SgMesh::TriangleRef |
SgMesh::SgMesh | ( | ) |
SgMesh::SgMesh | ( | Primitive | primitive | ) |
|
inline |
|
inline |
|
inline |
|
inline |
The value is -1 when the division number is not explicitly specified.
|
overrideprotectedvirtual |
Reimplemented from cnoid::SgObject.
|
inline |
|
inline |
The value is -1 when the extra division number is not explicitly specified.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void SgMesh::rotate | ( | const Matrix3f & | R | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void SgMesh::transform | ( | const Affine3 & | T | ) |
void SgMesh::transform | ( | const Affine3f & | T | ) |
void SgMesh::translate | ( | const Vector3f & | translation | ) |
|
inline |
|
inline |
|
inline |
|
inline |
Triangle indices (triangles variable) should be CCW.
|
overridevirtual |
Reimplemented from cnoid::SgMeshBase.