1 #ifndef SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
2 #define SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
53 class DecorativeGeometryImplementation;
176 int getBodyId()
const;
182 int getIndexOnBody()
const;
188 void* getUserRef()
const;
192 Real getResolution()
const;
202 const Vec3& getScaleFactors()
const;
224 const Vec3& getColor()
const;
226 Real getOpacity()
const;
229 Real getLineThickness()
const;
238 int getFaceCamera()
const;
246 Representation getRepresentation()
const;
252 bool isOwnerHandle()
const;
253 bool isEmptyHandle()
const;
256 const DecorativeGeometryRep&
getRep()
const {assert(rep);
return *rep;}
257 DecorativeGeometryRep&
updRep() {assert(rep);
return *rep;}
259 DecorativeGeometryRep*
rep;
274 const Vec3& getPoint()
const;
291 class DecorativePointRep& updRep();
292 const DecorativePointRep& getRep()
const;
326 const Vec3& getPoint1()
const;
327 const Vec3& getPoint2()
const;
331 class DecorativeLineRep& updRep();
332 const DecorativeLineRep& getRep()
const;
342 Real getRadius()
const;
359 class DecorativeCircleRep& updRep();
360 const DecorativeCircleRep& getRep()
const;
370 Real getRadius()
const;
387 class DecorativeSphereRep& updRep();
388 const DecorativeSphereRep& getRep()
const;
400 const Vec3& getRadii()
const;
417 class DecorativeEllipsoidRep& updRep();
418 const DecorativeEllipsoidRep& getRep()
const;
429 const Vec3& getHalfLengths()
const;
446 class DecorativeBrickRep& updRep();
447 const DecorativeBrickRep& getRep()
const;
459 Real getRadius()
const;
460 Real getHalfHeight()
const;
477 class DecorativeCylinderRep& updRep();
478 const DecorativeCylinderRep& getRep()
const;
489 Real getAxisLength()
const;
506 class DecorativeFrameRep& updRep();
507 const DecorativeFrameRep& getRep()
const;
517 const std::string& getText()
const;
522 bool getIsScreenText()
const;
540 class DecorativeTextRep& updRep();
541 const DecorativeTextRep& getRep()
const;
566 class DecorativeMeshRep& updRep();
567 const DecorativeMeshRep& getRep()
const;
576 const std::string& getMeshFile()
const;
593 class DecorativeMeshFileRep& updRep();
594 const DecorativeMeshFileRep& getRep()
const;
622 int getNumDecorations()
const;
643 class DecorationsRep& updRep();
644 const DecorationsRep& getRep()
const;
667 #endif // SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
DecorativeMesh & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:558
DecorativeEllipsoid & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:404
#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:564
DecorativeMeshFile & setResolution(Real r)
Definition: DecorativeGeometry.h:583
DecorativeCircle & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:350
const Vec3 Orange
RGB=( 1,.5, 0)
DecorativeEllipsoid & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:408
DecorativeMeshFile & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:585
DecorativeCylinder & setLineThickness(Real t)
Definition: DecorativeGeometry.h:471
const Vec3 Yellow
RGB=( 1, 1, 0)
DecorativeCircle & setUserRef(void *p)
Definition: DecorativeGeometry.h:347
DecorativeMesh & setOpacity(Real o)
Definition: DecorativeGeometry.h:559
#define SimTK_SimTKCOMMON_EXPORT
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:202
DecorativeFrame & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:498
DecorativePoint & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:280
This defines a rectangular solid centered at the origin and aligned with the local frame axes...
Definition: DecorativeGeometry.h:424
DecorativeBrick & setLineThickness(Real t)
Definition: DecorativeGeometry.h:440
DecorativeLine & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:319
DecorativeBrick & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:441
const DecorativeGeometryRep & getRep() const
Definition: DecorativeGeometry.h:256
DecorativeText & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:535
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:512
This defines geometry to represent a coordinate frame.
Definition: DecorativeGeometry.h:484
DecorativeSphere & setLineThickness(Real t)
Definition: DecorativeGeometry.h:381
DecorativeText & setBodyId(int b)
Definition: DecorativeGeometry.h:525
DecorativeEllipsoid & setOpacity(Real o)
Definition: DecorativeGeometry.h:410
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:556
const Vec3 Gray
RGB=(.5,.5,.5)
Decorations & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:631
DecorativeCircle & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:351
DecorativeFrame & setOpacity(Real o)
Definition: DecorativeGeometry.h:499
DecorativeSphere & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:376
DecorativeEllipsoid & setBodyId(int b)
Definition: DecorativeGeometry.h:403
DecorativePoint & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:278
Decorations & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:633
DecorativeCylinder & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:472
DecorativeCylinder & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:468
DecorativeMeshFile & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:580
DecorativeBrick & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:438
Decorations & setBodyId(int b)
Definition: DecorativeGeometry.h:628
DecorativeMeshFile & setOpacity(Real o)
Definition: DecorativeGeometry.h:586
DecorativeGeometry & setIndexOnBody(int index)
For selection or other purposes, you may want to use this method to store an index that can identify ...
DecorativeMesh & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:553
DecorativeText & setUserRef(void *p)
Definition: DecorativeGeometry.h:527
DecorativeCircle & setOpacity(Real o)
Definition: DecorativeGeometry.h:352
DecorativeEllipsoid & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:406
This defines an ellipsoidal solid centered at the origin and aligned with the local frame axes...
Definition: DecorativeGeometry.h:394
DecorativeGeometryRep & updRep()
Definition: DecorativeGeometry.h:257
DecorativeEllipsoid & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:409
DecorativeMesh & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:561
DecorativeMesh & setUserRef(void *p)
Definition: DecorativeGeometry.h:554
DecorativeCircle & setBodyId(int b)
Definition: DecorativeGeometry.h:345
DecorativeFrame & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:501
DecorativeCylinder & setBodyId(int b)
Definition: DecorativeGeometry.h:463
DecorativeSphere & setUserRef(void *p)
Definition: DecorativeGeometry.h:375
const Vec3 Red
RGB=( 1, 0, 0)
DecorativeBrick & setResolution(Real r)
Definition: DecorativeGeometry.h:436
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:577
DecorativeCircle & setLineThickness(Real t)
Definition: DecorativeGeometry.h:353
Representation
Drawing modes.
Definition: DecorativeGeometry.h:99
DecorativeGeometry & setColor(const Vec3 &rgb)
Request a specific color for this DecorativeGeometry object.
DecorativePoint & setLineThickness(Real t)
Definition: DecorativeGeometry.h:285
DecorativeCylinder & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:466
DecorativePoint & setUserRef(void *p)
Definition: DecorativeGeometry.h:279
Decorations & setOpacity(Real o)
Definition: DecorativeGeometry.h:635
DecorativeCircle & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:346
DecorativeGeometry & setScale(Real scale)
Convenience method to set all three scale factors to the same value.
Definition: DecorativeGeometry.h:169
Decorations & setResolution(Real r)
Definition: DecorativeGeometry.h:632
const Vec3 Cyan
RGB=( 0, 1, 1)
DecorativeMeshFile & setLineThickness(Real t)
Definition: DecorativeGeometry.h:587
DecorativeSphere & setOpacity(Real o)
Definition: DecorativeGeometry.h:380
DecorativeGeometryRep * rep
Definition: DecorativeGeometry.h:259
DecorativeBrick & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:435
Decorations & setLineThickness(Real t)
Definition: DecorativeGeometry.h:636
DecorativeSphere & setBodyId(int b)
Definition: DecorativeGeometry.h:373
DecorativeGeometry & setRepresentation(const Representation &)
Request a particular rendering representation of this DecorativeGeometry object.
DecorativeCylinder & setOpacity(Real o)
Definition: DecorativeGeometry.h:470
DecorativePoint & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:286
DecorativeCircle & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:354
DecorativeSphere & setResolution(Real r)
Definition: DecorativeGeometry.h:377
DecorativeGeometry & setBodyId(int bodyId)
By default the geometry should be placed relative to the Ground frame.
DecorativeFrame & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:493
Decorations & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:637
DecorativeLine & setBodyId(int b)
Definition: DecorativeGeometry.h:314
DecorativeMeshFile & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:584
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:412
DecorativeLine & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:315
DecorativeSphere & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:378
DecorativeBrick & setUserRef(void *p)
Definition: DecorativeGeometry.h:434
This defines a circle in the x-y plane, centered at the origin.
Definition: DecorativeGeometry.h:337
DecorativeCircle & setResolution(Real r)
Definition: DecorativeGeometry.h:349
DecorativeMesh & setLineThickness(Real t)
Definition: DecorativeGeometry.h:560
DecorativeMeshFile & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:582
DecorativeLine & setUserRef(void *p)
Definition: DecorativeGeometry.h:316
DecorativeBrick & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:437
DecorativeGeometry & setLineThickness(Real)
Request an adjustment to the default rendering of lines and curves.
DecorativeCircle & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:348
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:531
DecorativeGeometry()
Default constructor creates an empty handle.
Definition: DecorativeGeometry.h:89
DecorativeFrame & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:497
DecorativeCylinder & setResolution(Real r)
Definition: DecorativeGeometry.h:467
DecorativePoint & setBodyId(int b)
Definition: DecorativeGeometry.h:277
DecorativeEllipsoid & setLineThickness(Real t)
Definition: DecorativeGeometry.h:411
DecorativeBrick & setOpacity(Real o)
Definition: DecorativeGeometry.h:439
DecorativeLine & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:323
This class provides a description of a mesh made of polygonal faces (not limited to triangles)...
Definition: PolygonalMesh.h:70
Decorations & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:629
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:365
A point of interest.
Definition: DecorativeGeometry.h:267
DecorativeText & setOpacity(Real o)
Definition: DecorativeGeometry.h:532
DecorativeLine & setResolution(Real r)
Definition: DecorativeGeometry.h:318
DecorativeMeshFile & setUserRef(void *p)
Definition: DecorativeGeometry.h:581
Decorations & setUserRef(void *p)
Definition: DecorativeGeometry.h:630
DecorativeGeometry(class DecorativeGeometryRep *r)
Definition: DecorativeGeometry.h:254
DecorativeLine & setLineThickness(Real t)
Definition: DecorativeGeometry.h:322
virtual ~DecorativeGeometryImplementation()
Definition: DecorativeGeometry.h:651
DecorativeLine & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:317
bool hasRep() const
Definition: DecorativeGeometry.h:255
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:469
DecorativeFrame & setUserRef(void *p)
Definition: DecorativeGeometry.h:494
DecorativeText & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:526
DecorativeFrame & setLineThickness(Real t)
Definition: DecorativeGeometry.h:500
DecorativeEllipsoid & setUserRef(void *p)
Definition: DecorativeGeometry.h:405
const Vec3 White
RGB=( 1, 1, 1)
DecorativeText & setResolution(Real r)
Definition: DecorativeGeometry.h:529
DecorativeMeshFile & setBodyId(int b)
Definition: DecorativeGeometry.h:579
DecorativeCylinder & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:464
DecorativeBrick & setBodyId(int b)
Definition: DecorativeGeometry.h:432
DecorativePoint & setResolution(Real r)
Definition: DecorativeGeometry.h:281
DecorativeText & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:530
DecorativeMesh & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:555
DecorativeLine & setOpacity(Real o)
Definition: DecorativeGeometry.h:321
const Vec3 Purple
RGB=(.5, 0,.5)
DecorativeMeshFile & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:588
DecorativePoint & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:283
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:573
DecorativeSphere & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:379
This defines a single DecorativeGeometry object that is composed of a collection of other DecorativeG...
Definition: DecorativeGeometry.h:607
DecorativeText & setFaceCamera(int yn)
Definition: DecorativeGeometry.h:534
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:492
A line between two points.
Definition: DecorativeGeometry.h:304
DecorativeMesh & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:557
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:433
Use this abstract class to connect your implementation of decorative geometry to the implementation-i...
Definition: DecorativeGeometry.h:649
DecorativePoint & setScaleFactors(const Vec3 &s)
Definition: DecorativeGeometry.h:282
Decorations & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:634
DecorativePoint & setOpacity(Real o)
Definition: DecorativeGeometry.h:284
DecorativeCylinder & setUserRef(void *p)
Definition: DecorativeGeometry.h:465
DecorativeFrame & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:495
DecorativeText & setTransform(const Transform &X_BD)
Definition: DecorativeGeometry.h:528
This defines a cylinder centered on the origin and aligned in the y direction.
Definition: DecorativeGeometry.h:453
DecorativeMesh & setBodyId(int b)
Definition: DecorativeGeometry.h:552
DecorativeEllipsoid & setResolution(Real r)
Definition: DecorativeGeometry.h:407
DecorativeText & setLineThickness(Real t)
Definition: DecorativeGeometry.h:533
DecorativeSphere & setRepresentation(const Representation &r)
Definition: DecorativeGeometry.h:382
DecorativeSphere & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:374
DecorativeFrame & setResolution(Real r)
Definition: DecorativeGeometry.h:496
This defines a displayable mesh by referencing an already-existing PolygonalMesh object.
Definition: DecorativeGeometry.h:546
DecorativeLine & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:320
const Vec3 Black
RGB=( 0, 0, 0)