1 #ifndef SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_ 2 #define SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_ 53 class DecorativeGeometryImplementation;
178 int getBodyId()
const;
184 int getIndexOnBody()
const;
190 void* getUserRef()
const;
194 Real getResolution()
const;
204 const Vec3& getScaleFactors()
const;
226 const Vec3& getColor()
const;
228 Real getOpacity()
const;
231 Real getLineThickness()
const;
240 int getFaceCamera()
const;
254 bool isOwnerHandle()
const;
255 bool isEmptyHandle()
const;
258 const DecorativeGeometryRep&
getRep()
const {assert(rep);
return *rep;}
259 DecorativeGeometryRep&
updRep() {assert(rep);
return *rep;}
261 DecorativeGeometryRep*
rep;
276 const Vec3& getPoint()
const;
293 class DecorativePointRep& updRep();
294 const DecorativePointRep& getRep()
const;
328 const Vec3& getPoint1()
const;
329 const Vec3& getPoint2()
const;
333 class DecorativeLineRep& updRep();
334 const DecorativeLineRep& getRep()
const;
344 Real getRadius()
const;
361 class DecorativeCircleRep& updRep();
362 const DecorativeCircleRep& getRep()
const;
372 Real getRadius()
const;
389 class DecorativeSphereRep& updRep();
390 const DecorativeSphereRep& getRep()
const;
402 const Vec3& getRadii()
const;
419 class DecorativeEllipsoidRep& updRep();
420 const DecorativeEllipsoidRep& getRep()
const;
431 const Vec3& getHalfLengths()
const;
448 class DecorativeBrickRep& updRep();
449 const DecorativeBrickRep& getRep()
const;
461 Real getRadius()
const;
462 Real getHalfHeight()
const;
479 class DecorativeCylinderRep& updRep();
480 const DecorativeCylinderRep& getRep()
const;
491 Real getAxisLength()
const;
508 class DecorativeFrameRep& updRep();
509 const DecorativeFrameRep& getRep()
const;
519 const std::string& getText()
const;
524 bool getIsScreenText()
const;
542 class DecorativeTextRep& updRep();
543 const DecorativeTextRep& getRep()
const;
569 class DecorativeMeshRep& updRep();
570 const DecorativeMeshRep& getRep()
const;
582 const std::string& getMeshFile()
const;
602 class DecorativeMeshFileRep& updRep();
603 const DecorativeMeshFileRep& getRep()
const;
618 Real getTorusRadius()
const;
619 Real getTubeRadius()
const;
638 class DecorativeTorusRep& updRep();
639 const DecorativeTorusRep& getRep()
const;
657 const Vec3& getStartPoint()
const;
658 const Vec3& getEndPoint()
const;
659 const Real& getTipLength()
const;
682 class DecorativeArrowRep& updRep();
683 const DecorativeArrowRep& getRep()
const;
699 Real height = 1.0,
Real baseRadius = 0.5);
700 const Vec3& getOrigin()
const;
701 const UnitVec3& getDirection()
const;
702 const Real& getHeight()
const;
703 const Real& getBaseRadius()
const;
727 class DecorativeConeRep& updRep();
728 const DecorativeConeRep& getRep()
const;
755 int getNumDecorations()
const;
776 class DecorationsRep& updRep();
777 const DecorationsRep& getRep()
const;
803 #endif // SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_ DecorativeMesh & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:561
DecorativeCone & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:712
DecorativeArrow & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:669
DecorativeEllipsoid & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:406
DecorativeTorus & setUserRef(void *p)
Definition: DecorativeGeometry.h:624
#define SimTK_PIMPL_DOWNCAST(Derived, Parent)
Similar to the above but for private implementation abstract classes, that is, abstract class hierarc...
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:593
DecorativeMeshFile & setResolution(Real r)
Definition: DecorativeGeometry.h:592
DecorativeCircle & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:352
const Vec3 Orange
RGB=( 1,.5, 0)
DecorativeEllipsoid & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:410
DecorativeArrow & setResolution(Real r)
Definition: DecorativeGeometry.h:670
DecorativeMeshFile & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:594
DecorativeCone & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:720
DecorativeCylinder & setLineThickness(Real t)
Definition: DecorativeGeometry.h:473
DecorativeTorus & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:625
const Vec3 Yellow
RGB=( 1, 1, 0)
DecorativeCircle & setUserRef(void *p)
Definition: DecorativeGeometry.h:349
DecorativeMesh & setOpacity(Real o)
Definition: DecorativeGeometry.h:562
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:224
DecorativeTorus & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:627
DecorativeFrame & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:500
DecorativePoint & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:282
This defines a rectangular solid centered at the origin and aligned with the local frame axes...
Definition: DecorativeGeometry.h:426
UnitVec< Real, 1 > UnitVec3
Definition: UnitVec.h:41
DecorativeBrick & setLineThickness(Real t)
Definition: DecorativeGeometry.h:442
DecorativeTorus & setResolution(Real r)
Definition: DecorativeGeometry.h:626
DecorativeLine & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:321
DecorativeBrick & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:443
An arrow with start point, end point and tip-length.
Definition: DecorativeGeometry.h:654
DecorativeCone & setUserRef(void *p)
Definition: DecorativeGeometry.h:713
DecorativeText & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:537
DecorativeGeometry & setResolution(Real)
Each concrete DecorativeGeometry object is expected to have a default resolution that gets the point ...
This defines a text label with its base at the origin.
Definition: DecorativeGeometry.h:514
DecorativeCone & setOpacity(Real o)
Definition: DecorativeGeometry.h:718
DecorativeCone & setResolution(Real r)
Definition: DecorativeGeometry.h:715
This defines geometry to represent a coordinate frame.
Definition: DecorativeGeometry.h:486
DecorativeSphere & setLineThickness(Real t)
Definition: DecorativeGeometry.h:383
DecorativeText & setBodyId(int b)
Definition: DecorativeGeometry.h:527
DecorativeArrow & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:672
DecorativeEllipsoid & setOpacity(Real o)
Definition: DecorativeGeometry.h:412
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
DecorativeMesh & setResolution(Real r)
Definition: DecorativeGeometry.h:559
const Vec3 Gray
RGB=(.5,.5,.5)
Decorations & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:764
DecorativeCircle & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:353
DecorativeFrame & setOpacity(Real o)
Definition: DecorativeGeometry.h:501
DecorativeSphere & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:378
DecorativeEllipsoid & setBodyId(int b)
Definition: DecorativeGeometry.h:405
DecorativePoint & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:280
Decorations & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:766
DecorativeCylinder & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:474
DecorativeCylinder & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:470
DecorativeArrow & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:667
DecorativeTorus & setOpacity(Real o)
Definition: DecorativeGeometry.h:629
DecorativeMeshFile & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:589
DecorativeBrick & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:440
Decorations & setBodyId(int b)
Definition: DecorativeGeometry.h:761
DecorativeMeshFile & setOpacity(Real o)
Definition: DecorativeGeometry.h:595
DecorativeGeometry & setIndexOnBody(int index)
For selection or other purposes, you may want to use this method to store an index that can identify ...
DecorativeTorus & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:623
DecorativeMesh & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:556
DecorativeText & setUserRef(void *p)
Definition: DecorativeGeometry.h:529
DecorativeCircle & setOpacity(Real o)
Definition: DecorativeGeometry.h:354
DecorativeEllipsoid & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:408
DecorativeArrow & setBodyId(int b)
Definition: DecorativeGeometry.h:666
This defines an ellipsoidal solid centered at the origin and aligned with the local frame axes...
Definition: DecorativeGeometry.h:396
DecorativeGeometryRep & updRep()
Definition: DecorativeGeometry.h:259
DecorativeEllipsoid & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:411
DecorativeArrow & setLineThickness(Real t)
Definition: DecorativeGeometry.h:674
const DecorativeGeometryRep & getRep() const
Definition: DecorativeGeometry.h:258
DecorativeMesh & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:564
DecorativeMesh & setUserRef(void *p)
Definition: DecorativeGeometry.h:557
DecorativeCircle & setBodyId(int b)
Definition: DecorativeGeometry.h:347
DecorativeFrame & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:503
DecorativeCylinder & setBodyId(int b)
Definition: DecorativeGeometry.h:465
DecorativeSphere & setUserRef(void *p)
Definition: DecorativeGeometry.h:377
const Vec3 Red
RGB=( 1, 0, 0)
DecorativeBrick & setResolution(Real r)
Definition: DecorativeGeometry.h:438
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:606
DecorativeCircle & setLineThickness(Real t)
Definition: DecorativeGeometry.h:355
Representation
Drawing modes.
Definition: DecorativeGeometry.h:99
DecorativeGeometry & setColor(const Vec3 &rgb)
Request a specific color for this DecorativeGeometry object.
DecorativeCone & setLineThickness(Real t)
Definition: DecorativeGeometry.h:719
This defines a displayable torus, the torus is centered at the origin with the axial direction aligne...
Definition: DecorativeGeometry.h:612
DecorativePoint & setLineThickness(Real t)
Definition: DecorativeGeometry.h:287
DecorativeCylinder & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:468
DecorativePoint & setUserRef(void *p)
Definition: DecorativeGeometry.h:281
Decorations & setOpacity(Real o)
Definition: DecorativeGeometry.h:768
DecorativeCircle & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:348
DecorativeGeometry & setScale(Real scale)
Convenience method to set all three scale factors to the same value.
Definition: DecorativeGeometry.h:171
Decorations & setResolution(Real r)
Definition: DecorativeGeometry.h:765
const Vec3 Cyan
RGB=( 0, 1, 1)
DecorativeMeshFile & setLineThickness(Real t)
Definition: DecorativeGeometry.h:596
DecorativeSphere & setOpacity(Real o)
Definition: DecorativeGeometry.h:382
DecorativeGeometryRep * rep
Definition: DecorativeGeometry.h:261
DecorativeBrick & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:437
Decorations & setLineThickness(Real t)
Definition: DecorativeGeometry.h:769
DecorativeSphere & setBodyId(int b)
Definition: DecorativeGeometry.h:375
DecorativeGeometry & setRepresentation(const Representation &)
Request a particular rendering representation of this DecorativeGeometry object.
DecorativeCylinder & setOpacity(Real o)
Definition: DecorativeGeometry.h:472
DecorativePoint & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:288
DecorativeCircle & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:356
DecorativeTorus & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:628
DecorativeSphere & setResolution(Real r)
Definition: DecorativeGeometry.h:379
DecorativeGeometry & setBodyId(int bodyId)
By default the geometry should be placed relative to the Ground frame.
DecorativeFrame & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:495
Decorations & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:770
DecorativeLine & setBodyId(int b)
Definition: DecorativeGeometry.h:316
DecorativeMeshFile & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:593
A cone with origin point, direction, height and base radius.
Definition: DecorativeGeometry.h:696
DecorativeArrow & setOpacity(Real o)
Definition: DecorativeGeometry.h:673
DecorativeGeometry & setScaleFactors(const Vec3 &scale)
Each concrete DecorativeGeometry object is expected to have a default size around "1"...
DecorativeEllipsoid & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:414
DecorativeTorus & setLineThickness(Real t)
Definition: DecorativeGeometry.h:630
DecorativeCone & setBodyId(int b)
Definition: DecorativeGeometry.h:711
DecorativeLine & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:317
DecorativeSphere & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:380
DecorativeTorus & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:631
DecorativeBrick & setUserRef(void *p)
Definition: DecorativeGeometry.h:436
This defines a circle in the x-y plane, centered at the origin.
Definition: DecorativeGeometry.h:339
DecorativeCircle & setResolution(Real r)
Definition: DecorativeGeometry.h:351
DecorativeMesh & setLineThickness(Real t)
Definition: DecorativeGeometry.h:563
DecorativeMeshFile & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:591
DecorativeLine & setUserRef(void *p)
Definition: DecorativeGeometry.h:318
DecorativeBrick & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:439
DecorativeTorus & setBodyId(int b)
Definition: DecorativeGeometry.h:622
DecorativeGeometry & setLineThickness(Real)
Request an adjustment to the default rendering of lines and curves.
DecorativeCircle & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:350
DecorativeGeometry & setOpacity(Real)
Request a level of transparency for this DecorativeGeometry.
const Vec3 Blue
RGB=( 0, 0, 1)
DecorativeText & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:533
DecorativeGeometry()
Default constructor creates an empty handle.
Definition: DecorativeGeometry.h:89
DecorativeFrame & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:499
DecorativeCylinder & setResolution(Real r)
Definition: DecorativeGeometry.h:469
DecorativePoint & setBodyId(int b)
Definition: DecorativeGeometry.h:279
DecorativeEllipsoid & setLineThickness(Real t)
Definition: DecorativeGeometry.h:413
DecorativeBrick & setOpacity(Real o)
Definition: DecorativeGeometry.h:441
DecorativeLine & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:325
This class provides a description of a mesh made of polygonal faces (not limited to triangles)...
Definition: PolygonalMesh.h:70
DecorativeArrow & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:675
Decorations & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:762
const Vec3 Magenta
RGB=( 1, 0, 1)
This is the client-side interface to an implementation-independent representation of "Decorations" su...
Definition: DecorativeGeometry.h:86
This defines a sphere centered at the origin.
Definition: DecorativeGeometry.h:367
A point of interest.
Definition: DecorativeGeometry.h:269
DecorativeText & setOpacity(Real o)
Definition: DecorativeGeometry.h:534
DecorativeLine & setResolution(Real r)
Definition: DecorativeGeometry.h:320
DecorativeMeshFile & setUserRef(void *p)
Definition: DecorativeGeometry.h:590
Decorations & setUserRef(void *p)
Definition: DecorativeGeometry.h:763
DecorativeGeometry(class DecorativeGeometryRep *r)
Definition: DecorativeGeometry.h:256
DecorativeLine & setLineThickness(Real t)
Definition: DecorativeGeometry.h:324
virtual ~DecorativeGeometryImplementation()
Definition: DecorativeGeometry.h:784
DecorativeLine & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:319
DecorativeGeometry & setTransform(const Transform &X_BG)
This transform shifts the generated polygons with respect to this object's local frame.
DecorativeCylinder & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:471
DecorativeFrame & setUserRef(void *p)
Definition: DecorativeGeometry.h:496
DecorativeText & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:528
DecorativeCone & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:716
bool hasRep() const
Definition: DecorativeGeometry.h:257
DecorativeFrame & setLineThickness(Real t)
Definition: DecorativeGeometry.h:502
DecorativeEllipsoid & setUserRef(void *p)
Definition: DecorativeGeometry.h:407
const Vec3 White
RGB=( 1, 1, 1)
DecorativeText & setResolution(Real r)
Definition: DecorativeGeometry.h:531
DecorativeMeshFile & setBodyId(int b)
Definition: DecorativeGeometry.h:588
DecorativeCylinder & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:466
DecorativeBrick & setBodyId(int b)
Definition: DecorativeGeometry.h:434
DecorativeCone & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:714
DecorativePoint & setResolution(Real r)
Definition: DecorativeGeometry.h:283
DecorativeText & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:532
DecorativeMesh & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:558
DecorativeLine & setOpacity(Real o)
Definition: DecorativeGeometry.h:323
const Vec3 Purple
RGB=(.5, 0,.5)
DecorativeMeshFile & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:597
DecorativePoint & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:285
DecorativeGeometry & setFaceCamera(int shouldFace)
Set whether the geometry acts as a billboard, always rotating to face the camera. ...
This defines a displayable mesh by referencing a file name containing the mesh.
Definition: DecorativeGeometry.h:579
DecorativeSphere & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:381
This defines a single DecorativeGeometry object that is composed of a collection of other DecorativeG...
Definition: DecorativeGeometry.h:740
DecorativeText & setFaceCamera(int yn)
Definition: DecorativeGeometry.h:536
Vec< 3 > Vec3
This is the most common 3D vector type: a column of 3 Real values stored consecutively in memory (pac...
Definition: SmallMatrix.h:129
const Vec3 Green
RGB=( 0, 1, 0)
DecorativeFrame & setBodyId(int b)
Definition: DecorativeGeometry.h:494
A line between two points.
Definition: DecorativeGeometry.h:306
DecorativeMesh & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:560
DecorativeGeometry & setUserRef(void *userRef)
Use this method to store an arbitrary reference pointer with this DecorativeGeometry object...
This is the header which should be included in user programs that would like to make use of all the S...
DecorativeBrick & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:435
Use this abstract class to connect your implementation of decorative geometry to the implementation-i...
Definition: DecorativeGeometry.h:782
DecorativePoint & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:284
Decorations & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:767
DecorativeArrow & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:671
DecorativePoint & setOpacity(Real o)
Definition: DecorativeGeometry.h:286
DecorativeCone & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:717
DecorativeCylinder & setUserRef(void *p)
Definition: DecorativeGeometry.h:467
DecorativeFrame & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:497
DecorativeText & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:530
This defines a cylinder centered on the origin and aligned in the y direction.
Definition: DecorativeGeometry.h:455
DecorativeMesh & setBodyId(int b)
Definition: DecorativeGeometry.h:555
DecorativeEllipsoid & setResolution(Real r)
Definition: DecorativeGeometry.h:409
DecorativeText & setLineThickness(Real t)
Definition: DecorativeGeometry.h:535
DecorativeSphere & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:384
DecorativeSphere & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:376
DecorativeFrame & setResolution(Real r)
Definition: DecorativeGeometry.h:498
This defines a displayable mesh by referencing an already-existing PolygonalMesh object.
Definition: DecorativeGeometry.h:549
DecorativeArrow & setUserRef(void *p)
Definition: DecorativeGeometry.h:668
DecorativeLine & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:322
const Vec3 Black
RGB=( 0, 0, 0)