Go to the documentation of this file.
6 #ifndef CNOID_UTIL_SCENE_DRAWABLES_H
7 #define CNOID_UTIL_SCENE_DRAWABLES_H
11 #include <cnoid/stdx/variant>
13 #include <initializer_list>
14 #include "exportdecl.h"
27 template<
typename Derived>
void setDiffuseColor(
const Eigen::MatrixBase<Derived>& c) {
28 diffuseColor_ = c.template cast<Vector3f::Scalar>(); }
30 template<
typename Derived>
void setEmissiveColor(
const Eigen::MatrixBase<Derived>& c) {
31 emissiveColor_ = c.template cast<Vector3f::Scalar>(); }
34 template<
typename Derived>
void setSpecularColor(
const Eigen::MatrixBase<Derived>& c) {
35 specularColor_ = c.template cast<Vector3f::Scalar>(); }
41 [[deprecated(
"Use specularExponent")]]
42 float shininess()
const;
45 [[deprecated(
"Use setSpecularExponent")]]
46 void setShininess(
float s);
55 Vector3f diffuseColor_;
56 Vector3f emissiveColor_;
57 Vector3f specularColor_;
58 float ambientIntensity_;
60 float specularExponent_;
71 SgImage(std::shared_ptr<Image> sharedImage);
78 bool empty()
const {
return image_->empty(); }
80 unsigned char* pixels();
81 const unsigned char*
pixels()
const {
return image_->pixels(); }
82 const unsigned char*
constPixels()
const {
return image_->pixels(); }
84 int width()
const {
return image_->width(); }
85 int height()
const {
return image_->height(); }
88 void setSize(
int width,
int height,
int nComponents);
89 void setSize(
int width,
int height);
95 std::shared_ptr<Image> image_;
104 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
110 template<
typename Derived>
void setCenter(
const Eigen::MatrixBase<Derived>& c) {
111 center_ = c.template cast<Vector3::Scalar>(); }
115 template<
typename Derived>
void setScale(
const Eigen::MatrixBase<Derived>& c) {
116 scale_ = c.template cast<Vector2::Scalar>(); }
118 template<
typename Derived>
void setTranslation(
const Eigen::MatrixBase<Derived>& c) {
119 translation_ = c.template cast<Vector3::Scalar>(); }
141 virtual int numChildObjects()
const override;
142 virtual SgObject* childObject(
int index)
override;
151 void setRepeat(
bool s,
bool t) { repeatS_ = s; repeatT_ = t; }
173 typedef std::vector<T> Container;
191 template<
class Element>
193 values.reserve(org.size());
194 for(
typename std::vector<Element>::const_iterator p = org.begin(); p != org.end(); ++p){
195 values.push_back(p->template cast<typename T::Scalar>());
212 bool empty()
const {
return values.empty(); }
219 T&
front() {
return values.front(); }
220 const T&
front()
const {
return values.front(); }
221 T&
back() {
return values.back(); }
222 const T&
back()
const {
return values.back(); }
227 template<
class... Args>
void emplace_back(Args&&... args) { values.emplace_back(args...); }
264 virtual int numChildObjects()
const override;
265 virtual SgObject* childObject(
int index)
override;
268 virtual void updateBoundingBox();
272 bool hasVertices()
const {
return (vertices_ && !vertices_->empty()); }
278 bool hasNormals()
const {
return (normals_ && !normals_->empty()); }
284 bool hasColors()
const {
return (colors_ && !colors_->empty()); }
290 bool hasTexCoords()
const {
return (texCoords_ && !texCoords_->empty()); }
343 virtual void updateBoundingBox()
override;
352 int numTriangles()
const {
return static_cast<int>(faceVertexIndices_.size()) / 3; }
358 return TriangleRef(&faceVertexIndices_[index * 3]);
367 const int i = index * 3;
368 faceVertexIndices_[i+0] = v0;
369 faceVertexIndices_[i+1] = v1;
370 faceVertexIndices_[i+2] = v2;
374 const size_t s = faceVertexIndices_.size();
375 faceVertexIndices_.resize(s + 3);
383 faceVertexIndices_.reserve(faceVertexIndices_.size() + il.size() * 3);
385 for(
int i=0; i < 3; ++i){
386 faceVertexIndices_.push_back(v[i]);
392 faceVertexIndices_.push_back(v0);
393 faceVertexIndices_.push_back(v1);
394 faceVertexIndices_.push_back(v2);
409 CYLINDER = CylinderType,
411 CAPSULE = CapsuleType
425 Sphere(
double radius) : radius(radius) { }
432 radius(radius), height(height), top(true), bottom(true), side(true) { }
442 Cone(
double radius,
double height) :
443 radius(radius), height(height), bottom(true), side(true) { }
453 radius(radius), height(height) { }
458 typedef stdx::variant<Mesh, Box, Sphere, Cylinder, Cone, Capsule>
Primitive;
462 const int primitiveType()
const {
return stdx::get_variant_index(primitive_); }
463 template<
class TPrimitive>
const TPrimitive&
primitive()
const {
return stdx::get<TPrimitive>(primitive_); }
476 ExtraDivisionPreferred = 0,
480 ExtraDivisionAll = ExtraDivisionX | ExtraDivisionY | ExtraDivisionZ
485 void transform(
const Affine3& T);
486 void transform(
const Affine3f& T);
487 void translate(
const Vector3f& translation);
488 void rotate(
const Matrix3f& R);
494 Primitive primitive_;
495 short divisionNumber_;
496 short extraDivisionNumber_;
497 short extraDivisionMode_;
509 virtual void updateBoundingBox()
override;
518 [[deprecated(
"Use faceVertexIndices")]]
520 [[deprecated(
"Use faceVertexIndices")]]
537 virtual int numChildObjects()
const override;
538 virtual SgObject* childObject(
int index)
override;
539 virtual const BoundingBox& boundingBox()
const override;
540 virtual const BoundingBox& untransformedBoundingBox()
const override;
545 SgMesh* getOrCreateMesh();
579 virtual int numChildObjects()
const override;
580 virtual SgObject* childObject(
int index)
override;
582 virtual const BoundingBox& boundingBox()
const override;
583 virtual const BoundingBox& untransformedBoundingBox()
const override;
584 void updateBoundingBox();
588 bool hasVertices()
const {
return (vertices_ && !vertices_->empty()); }
599 bool hasColors()
const {
return (colors_ && !colors_->empty()); }
615 bool hasNormals()
const {
return (normals_ && !normals_->empty()); }
670 [[deprecated(
"Use lineVertexIndices()")]]
673 [[deprecated(
"Use lineVertexIndices()")]]
677 int numLines()
const {
return static_cast<int>(lineVertexIndices_.size()) / 2; }
684 return LineRef(&lineVertexIndices_[index * 2]);
693 const int i = index * 2;
694 lineVertexIndices_[i+0] = v0;
695 lineVertexIndices_[i+1] = v1;
699 const size_t s = lineVertexIndices_.size();
700 lineVertexIndices_.resize(s + 2);
701 return LineRef(&lineVertexIndices_[s]);
705 lineVertexIndices_.push_back(v0);
706 lineVertexIndices_.push_back(v1);
710 colorIndices().resize(n * 2);
714 colorIndices()[lineIndex * 2 ] = colorIndex;
715 colorIndices()[lineIndex * 2 + 1] = colorIndex;
768 virtual void calcViewVolume(
double viewportWidth,
double viewportHeight,
ViewVolume& io_volume);
T & operator[](size_type i)
Definition: SceneDrawables.h:215
SgNormalArrayPtr normals_
Definition: SceneDrawables.h:324
void setPointSize(double size)
Definition: SceneDrawables.h:642
Eigen::Vector2d Vector2
Definition: EigenTypes.h:55
Definition: SceneDrawables.h:66
void setExtraDivisionNumber(int n)
Definition: SceneDrawables.h:472
const SgTextureTransform * textureTransform() const
Definition: SceneDrawables.h:154
void setScale(const Eigen::MatrixBase< Derived > &c)
Definition: SceneDrawables.h:115
ref_ptr< SgTextureTransform > SgTextureTransformPtr
Definition: SceneDrawables.h:131
float creaseAngle_
Definition: SceneDrawables.h:330
Eigen::Map< const Array3i > ConstTriangleRef
Definition: SceneDrawables.h:361
const SgImage * image() const
Definition: SceneDrawables.h:145
bool hasVertices() const
Definition: SceneDrawables.h:588
Definition: SceneDrawables.h:428
T & front()
Definition: SceneDrawables.h:219
ref_ptr< SgTexture > SgTexturePtr
Definition: SceneDrawables.h:168
void clearLines()
Definition: SceneDrawables.h:680
void reserveNumTriangles(int n)
Definition: SceneDrawables.h:354
void setTransparency(float t)
Definition: SceneDrawables.h:49
Definition: SceneDrawables.h:449
const SgIndexArray & normalIndices() const
Definition: SceneDrawables.h:620
const TPrimitive & primitive() const
Definition: SceneDrawables.h:463
void addTriangles(std::initializer_list< Array3i > il)
Definition: SceneDrawables.h:382
ref_ptr< SgImage > SgImagePtr
Definition: SceneDrawables.h:98
const SgIndexArray & lineVertices() const
Definition: SceneDrawables.h:671
Container::pointer pointer
Definition: SceneDrawables.h:182
const SgIndexArray & polygonVertices() const
Definition: SceneDrawables.h:521
Eigen::Vector3d Vector3
Definition: EigenTypes.h:57
bool empty() const
Definition: SceneDrawables.h:212
void setNumTriangles(int n)
Definition: SceneDrawables.h:353
Cone(double radius, double height)
Definition: SceneDrawables.h:442
ref_ptr< SgPolygonMesh > SgPolygonMeshPtr
Definition: SceneDrawables.h:527
ref_ptr< SgMesh > SgMeshPtr
Definition: SceneDrawables.h:500
const Vector3f & emissiveColor() const
Definition: SceneDrawables.h:29
void setBoundingBox(const BoundingBoxf &bb)
Definition: SceneDrawables.h:270
const SgIndexArray & normalIndices() const
Definition: SceneDrawables.h:303
ref_ptr< SgLineSet > SgLineSetPtr
Definition: SceneDrawables.h:734
Cone()
Definition: SceneDrawables.h:441
int extraDivisionMode() const
Definition: SceneDrawables.h:482
Definition: SceneDrawables.h:337
void reserveNumLines(int n)
Definition: SceneDrawables.h:679
bool bottom
Definition: SceneDrawables.h:446
SgColorArrayPtr colors_
Definition: SceneDrawables.h:326
const Vector2 & translation() const
Definition: SceneDrawables.h:117
Container::size_type size_type
Definition: SceneDrawables.h:178
stdx::variant< Mesh, Box, Sphere, Cylinder, Cone, Capsule > Primitive
Definition: SceneDrawables.h:458
const SgMaterial * material() const
Definition: SceneDrawables.h:595
SgMesh * mesh()
Definition: SceneDrawables.h:542
void setRotation(double rotation)
Definition: SceneDrawables.h:113
Definition: SceneDrawables.h:570
ref_ptr< SgColorArray > SgColorArrayPtr
Definition: SceneDrawables.h:248
SgIndexArray & triangleVertices()
Definition: SceneDrawables.h:349
iterator erase(iterator first, iterator last)
Definition: SceneDrawables.h:230
Container::const_reference const_reference
Definition: SceneDrawables.h:181
const Vector3f & specularColor() const
Definition: SceneDrawables.h:33
Definition: SceneGraph.h:220
const SgIndexArray & texCoordIndices() const
Definition: SceneDrawables.h:311
Sphere(double radius)
Definition: SceneDrawables.h:425
void setCreaseAngle(float angle)
Definition: SceneDrawables.h:315
ref_ptr< SgVertexArray > SgVertexArrayPtr
Definition: SceneDrawables.h:242
double height
Definition: SceneDrawables.h:445
void emplace_back(Args &&... args)
Definition: SceneDrawables.h:227
Box(Vector3 size)
Definition: SceneDrawables.h:419
Definition: SceneDrawables.h:660
double radius
Definition: SceneDrawables.h:433
SgVectorArray< Vector3f > SgVertexArray
Definition: SceneDrawables.h:241
bool hasNormals() const
Definition: SceneDrawables.h:278
void setSpecularColor(const Eigen::MatrixBase< Derived > &c)
Definition: SceneDrawables.h:34
Vector3 size
Definition: SceneDrawables.h:420
TriangleRef addTriangle()
Definition: SceneDrawables.h:380
float specularExponent() const
Definition: SceneDrawables.h:37
int width() const
Definition: SceneDrawables.h:84
ConstTriangleRef triangle(int index) const
Definition: SceneDrawables.h:362
BoundingBox bbox
Definition: SceneDrawables.h:321
SgIndexArray & polygonVertices()
Definition: SceneDrawables.h:519
double rotation() const
Definition: SceneDrawables.h:112
void setSpecularExponent(float e)
Definition: SceneDrawables.h:38
SgIndexArray & lineVertices()
Definition: SceneDrawables.h:675
Eigen::Map< const Array2i > ConstLineRef
Definition: SceneDrawables.h:687
void resize(size_type s, const T &v)
Definition: SceneDrawables.h:211
Definition: SceneDrawables.h:171
Scalar * data()
Definition: SceneDrawables.h:223
void setBoundingBox(const BoundingBox &bb)
Definition: SceneDrawables.h:269
size_type size() const
Definition: SceneDrawables.h:209
SgVectorArray< T > & operator=(const SgVectorArray< T > &rhs)
Definition: SceneDrawables.h:201
void clear()
Definition: SceneDrawables.h:231
SgVectorArray< Vector3f > SgColorArray
Definition: SceneDrawables.h:247
double height
Definition: SceneDrawables.h:455
SgIndexArray & faceVertexIndices()
Definition: SceneDrawables.h:298
SgIndexArray colorIndices_
Definition: SceneDrawables.h:327
iterator insert(const_iterator pos, std::initializer_list< T > il)
Definition: SceneDrawables.h:225
bool side
Definition: SceneDrawables.h:437
const BoundingBox & boundingBox() const
Definition: SceneDrawables.h:267
ref_ptr< SgPointSet > SgPointSetPtr
Definition: SceneDrawables.h:657
void addTriangle(int v0, int v1, int v2)
Definition: SceneDrawables.h:391
int divisionNumber() const
The value is -1 when the division number is not explicitly specified.
Definition: SceneDrawables.h:467
Definition: BoundingBox.h:61
bool hasNormals() const
Definition: SceneDrawables.h:615
double radius
Definition: SceneDrawables.h:426
bool hasTriangles() const
Definition: SceneDrawables.h:351
const unsigned char * pixels() const
Definition: SceneDrawables.h:81
void setAmbientIntensity(float intensity)
Definition: SceneDrawables.h:25
SgVectorArray(const std::vector< Element > &org)
Definition: SceneDrawables.h:192
const_iterator end() const
Definition: SceneDrawables.h:208
Container::const_iterator const_iterator
Definition: SceneDrawables.h:177
float transparency() const
Definition: SceneDrawables.h:48
const SgMaterial * material() const
Definition: SceneDrawables.h:548
SgVectorArray()
Definition: SceneDrawables.h:186
bool empty() const
Definition: SceneDrawables.h:78
SgVectorArray(std::initializer_list< T > init)
Definition: SceneDrawables.h:189
bool top
Definition: SceneDrawables.h:435
void setCenter(const Eigen::MatrixBase< Derived > &c)
Definition: SceneDrawables.h:110
const SgMesh * mesh() const
Definition: SceneDrawables.h:543
bool hasTexCoordIndices() const
Definition: SceneDrawables.h:310
SgTexture * texture()
Definition: SceneDrawables.h:552
@ ConeType
Definition: SceneDrawables.h:402
SgVertexArrayPtr vertices_
Definition: SceneDrawables.h:322
bool isSolid() const
Definition: SceneDrawables.h:317
SgTextureTransform * textureTransform()
Definition: SceneDrawables.h:153
iterator begin()
Definition: SceneDrawables.h:205
bool hasTexCoords() const
Definition: SceneDrawables.h:290
void setRepeat(bool s, bool t)
Definition: SceneDrawables.h:151
Definition: SceneDrawables.h:416
float creaseAngle() const
Definition: SceneDrawables.h:314
ConstLineRef line(int index) const
Definition: SceneDrawables.h:688
void setPrimitive(Primitive prim)
Definition: SceneDrawables.h:464
LineRef addLine()
Definition: SceneDrawables.h:698
double pointSize() const
Definition: SceneDrawables.h:647
void setEmissiveColor(const Eigen::MatrixBase< Derived > &c)
Definition: SceneDrawables.h:30
const SgIndexArray & colorIndices() const
Definition: SceneDrawables.h:605
const Image & constImage() const
Definition: SceneDrawables.h:76
double radius
Definition: SceneDrawables.h:454
ref_ptr< SgNormalArray > SgNormalArrayPtr
Definition: SceneDrawables.h:245
SgTexCoordArrayPtr texCoords_
Definition: SceneDrawables.h:328
double height
Definition: SceneDrawables.h:434
bool hasNormalIndices() const
Definition: SceneDrawables.h:302
void setTranslation(const Eigen::MatrixBase< Derived > &c)
Definition: SceneDrawables.h:118
iterator erase(iterator p)
Definition: SceneDrawables.h:229
ref_ptr< SgShape > SgShapePtr
Definition: SceneDrawables.h:567
void setDivisionNumber(int n)
Definition: SceneDrawables.h:468
bool repeatS() const
Definition: SceneDrawables.h:149
double zNear
Definition: SceneDrawables.h:764
PrimitiveType
Definition: SceneDrawables.h:397
SgVectorArray(const SgVectorArray &org)
Definition: SceneDrawables.h:199
int numComponents() const
Definition: SceneDrawables.h:86
void shrink_to_fit()
Definition: SceneDrawables.h:232
void reserve(size_type s)
Definition: SceneDrawables.h:213
ExtraDivisionMode
This mode is only valid for the box primitive.
Definition: SceneDrawables.h:475
Container::const_pointer const_pointer
Definition: SceneDrawables.h:183
Capsule()
Definition: SceneDrawables.h:451
const unsigned char * constPixels() const
Definition: SceneDrawables.h:82
const SgNormalArray * normals() const
Definition: SceneDrawables.h:617
const SgVertexArray * vertices() const
Definition: SceneDrawables.h:274
Definition: SceneDrawables.h:737
@ MeshType
Definition: SceneDrawables.h:398
const SgVertexArray * vertices() const
Definition: SceneDrawables.h:590
int numLines() const
Definition: SceneDrawables.h:677
const SgIndexArray & colorIndices() const
Definition: SceneDrawables.h:307
SgNormalArray * normals()
Definition: SceneDrawables.h:279
ref_ptr< SgTexCoordArray > SgTexCoordArrayPtr
Definition: SceneDrawables.h:251
Container::reference reference
Definition: SceneDrawables.h:180
const T & front() const
Definition: SceneDrawables.h:220
SgColorArray * colors()
Definition: SceneDrawables.h:285
Definition: SceneDrawables.h:503
T & at(size_type i)
Definition: SceneDrawables.h:217
const T & operator[](size_type i) const
Definition: SceneDrawables.h:216
Definition: AbstractSceneLoader.h:11
void addLine(int v0, int v1)
Definition: SceneDrawables.h:704
iterator end()
Definition: SceneDrawables.h:207
Definition: CloneMap.h:13
SgVectorArray< Vector3f > SgNormalArray
Definition: SceneDrawables.h:244
@ SphereType
Definition: SceneDrawables.h:400
SgIndexArray & lineVertexIndices()
Definition: SceneDrawables.h:667
Definition: SceneDrawables.h:759
SgVertexArray * vertices()
Definition: SceneDrawables.h:273
TriangleRef newTriangle()
Definition: SceneDrawables.h:373
Capsule(double radius, double height)
Definition: SceneDrawables.h:452
Definition: SceneDrawables.h:414
SgIndexArray & colorIndices()
Definition: SceneDrawables.h:308
double top
Definition: SceneDrawables.h:763
T::Scalar Scalar
Definition: SceneDrawables.h:184
Definition: SceneDrawables.h:101
const SgColorArray * colors() const
Definition: SceneDrawables.h:286
Definition: SceneDrawables.h:636
void setLineColor(int lineIndex, int colorIndex)
Definition: SceneDrawables.h:713
const Vector3f & diffuseColor() const
Definition: SceneDrawables.h:26
int numTriangles() const
Definition: SceneDrawables.h:352
SgColorArray * colors()
Definition: SceneDrawables.h:600
double left
Definition: SceneDrawables.h:760
LineRef line(int index)
Definition: SceneDrawables.h:683
SgIndexArray & normalIndices()
Definition: SceneDrawables.h:621
void setExtraDivisionMode(int mode)
Definition: SceneDrawables.h:483
SgIndexArray & texCoordIndices()
Definition: SceneDrawables.h:312
Container::value_type value_type
Definition: SceneDrawables.h:179
SgVectorArray(const std::vector< T > &org)
Definition: SceneDrawables.h:188
SgVectorArray(size_t size)
Definition: SceneDrawables.h:187
void setNumLines(int n)
Definition: SceneDrawables.h:678
ref_ptr< SgViewportOverlay > SgViewportOverlayPtr
Definition: SceneDrawables.h:775
const Vector2 & center() const
Definition: SceneDrawables.h:109
bool hasColors() const
Definition: SceneDrawables.h:599
ref_ptr< SgMaterial > SgMaterialPtr
Definition: SceneDrawables.h:63
Definition: Referenced.h:54
bool hasVertices() const
Definition: SceneDrawables.h:272
ref_ptr< SgPlot > SgPlotPtr
Definition: SceneDrawables.h:633
int extraDivisionNumber() const
The value is -1 when the extra division number is not explicitly specified.
Definition: SceneDrawables.h:471
SgIndexArray & normalIndices()
Definition: SceneDrawables.h:304
void setTriangle(int index, int v0, int v1, int v2)
Definition: SceneDrawables.h:366
Eigen::Map< Array2i > LineRef
Definition: SceneDrawables.h:682
float ambientIntensity() const
Definition: SceneDrawables.h:24
Definition: SceneDrawables.h:422
void resizeColorIndicesForNumLines(int n)
Definition: SceneDrawables.h:709
Definition: SceneDrawables.h:256
ref_ptr< SgMeshBase > SgMeshBasePtr
Definition: SceneDrawables.h:334
SgTexCoordArray * texCoords()
Definition: SceneDrawables.h:291
double right
Definition: SceneDrawables.h:761
SgIndexArray & colorIndices()
Definition: SceneDrawables.h:606
const SgIndexArray & faceVertexIndices() const
Definition: SceneDrawables.h:297
double zFar
Definition: SceneDrawables.h:765
std::vector< int > SgIndexArray
Definition: SceneDrawables.h:253
const SgTexCoordArray * texCoords() const
Definition: SceneDrawables.h:292
float lineWidth() const
Definition: SceneDrawables.h:723
int height() const
Definition: SceneDrawables.h:85
SgMaterial * material()
Definition: SceneDrawables.h:547
const Vector2 & scale() const
Definition: SceneDrawables.h:114
Definition: SceneDrawables.h:530
SgIndexArray texCoordIndices_
Definition: SceneDrawables.h:329
const Image & image() const
Definition: SceneDrawables.h:75
const SgIndexArray & lineVertexIndices() const
Definition: SceneDrawables.h:666
SgVectorArray< Vector2f, Eigen::aligned_allocator< Vector2f > > SgTexCoordArray
Definition: SceneDrawables.h:250
const T & at(size_type i) const
Definition: SceneDrawables.h:218
SgIndexArray normalIndices_
Definition: SceneDrawables.h:325
const SgNormalArray * normals() const
Definition: SceneDrawables.h:280
Box()
Definition: SceneDrawables.h:418
bool bottom
Definition: SceneDrawables.h:436
void setSolid(bool on)
Definition: SceneDrawables.h:318
SgIndexArray faceVertexIndices_
Definition: SceneDrawables.h:323
Eigen::Map< Array3i > TriangleRef
Definition: SceneDrawables.h:356
void push_back(const T &v)
Definition: SceneDrawables.h:226
ref_ptr< SgOverlay > SgOverlayPtr
Definition: SceneDrawables.h:749
const SgColorArray * colors() const
Definition: SceneDrawables.h:601
T & back()
Definition: SceneDrawables.h:221
bool side
Definition: SceneDrawables.h:447
Container::iterator iterator
Definition: SceneDrawables.h:176
Definition: SceneGraph.h:28
@ CapsuleType
Definition: SceneDrawables.h:403
@ BoxType
Definition: SceneDrawables.h:399
bool repeatT() const
Definition: SceneDrawables.h:150
void setDiffuseColor(const Eigen::MatrixBase< Derived > &c)
Definition: SceneDrawables.h:27
const SgTexture * texture() const
Definition: SceneDrawables.h:553
bool hasFaceVertexIndices() const
Definition: SceneDrawables.h:296
Definition: SceneDrawables.h:752
bool isSolid_
Definition: SceneDrawables.h:331
bool hasColors() const
Definition: SceneDrawables.h:284
Definition: SceneDrawables.h:439
Definition: SceneDrawables.h:18
@ CylinderType
Definition: SceneDrawables.h:401
Definition: SceneGraph.h:157
virtual Referenced * doClone(CloneMap *) const override
Definition: SceneDrawables.h:235
double bottom
Definition: SceneDrawables.h:762
const SgIndexArray & triangleVertices() const
Definition: SceneDrawables.h:348
SgImage * image()
Definition: SceneDrawables.h:144
Eigen::Affine3d Affine3
Definition: EigenTypes.h:62
Definition: BoundingBox.h:17
SgNormalArray * normals()
Definition: SceneDrawables.h:616
void resize(size_type s)
Definition: SceneDrawables.h:210
void setLine(int index, int v0, int v1)
Definition: SceneDrawables.h:692
const T & back() const
Definition: SceneDrawables.h:222
SgMaterial * material()
Definition: SceneDrawables.h:594
bool hasColorIndices() const
Definition: SceneDrawables.h:306
void setLineWidth(float width)
Definition: SceneDrawables.h:718
SgVertexArray * vertices()
Definition: SceneDrawables.h:589
const Scalar * data() const
Definition: SceneDrawables.h:224
Cylinder(double radius, double height)
Definition: SceneDrawables.h:431
size_type capacity() const
Definition: SceneDrawables.h:214
Definition: SceneDrawables.h:134
TriangleRef triangle(int index)
Definition: SceneDrawables.h:357
void pop_back()
Definition: SceneDrawables.h:228
Cylinder()
Definition: SceneDrawables.h:430
double radius
Definition: SceneDrawables.h:444
const int primitiveType() const
Definition: SceneDrawables.h:462
const_iterator begin() const
Definition: SceneDrawables.h:206
Sphere()
Definition: SceneDrawables.h:424