Simbody 3.7
Loading...
Searching...
No Matches
DecorativeGeometry.h
Go to the documentation of this file.
1#ifndef SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
2#define SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
3
4/* -------------------------------------------------------------------------- *
5 * Simbody(tm): SimTKcommon *
6 * -------------------------------------------------------------------------- *
7 * This is part of the SimTK biosimulation toolkit originating from *
8 * Simbios, the NIH National Center for Physics-Based Simulation of *
9 * Biological Structures at Stanford, funded under the NIH Roadmap for *
10 * Medical Research, grant U54 GM072970. See https://simtk.org/home/simbody. *
11 * *
12 * Portions copyright (c) 2005-15 Stanford University and the Authors. *
13 * Authors: Michael Sherman *
14 * Contributors: Jack Middleton, Peter Eastman, Ayman Habib *
15 * *
16 * Licensed under the Apache License, Version 2.0 (the "License"); you may *
17 * not use this file except in compliance with the License. You may obtain a *
18 * copy of the License at http://www.apache.org/licenses/LICENSE-2.0. *
19 * *
20 * Unless required by applicable law or agreed to in writing, software *
21 * distributed under the License is distributed on an "AS IS" BASIS, *
22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
23 * See the License for the specific language governing permissions and *
24 * limitations under the License. *
25 * -------------------------------------------------------------------------- */
26
32
33#include <cassert>
34
35
36namespace SimTK {
37
38// Some common RGB values;
50
51// Drawing representations
52
53class DecorativeGeometryImplementation;
54
87public:
89DecorativeGeometry() : rep(0) { }
97
100 Hide = 0,
101 DrawPoints = 1,
102 DrawWireframe = 2,
103 DrawSurface = 3,
104
105 DrawDefault = -1
107
119
128
143
150
160
169
171DecorativeGeometry& setScale(Real scale) {return setScaleFactors(Vec3(scale));}
172
178int getBodyId() const;
179
184int getIndexOnBody() const;
185
190void* getUserRef() const;
191
195
199const Transform& getTransform() const;
200
204const Vec3& getScaleFactors() const;
205
211DecorativeGeometry& setColor(const Vec3& rgb); // 0-1 for each color
212
216DecorativeGeometry& setOpacity(Real); // 0-1; default is 1 (opaque)
217
223
226const Vec3& getColor() const;
232
240int getFaceCamera() const;
241
246
249
251
252// Bookkeeping below here -- internal use only. Don't look below or you will
253// turn into a pillar of salt.
254bool isOwnerHandle() const;
255bool isEmptyHandle() const;
256explicit DecorativeGeometry(class DecorativeGeometryRep* r) : rep(r) { }
257bool hasRep() const {return rep!=0;}
258const DecorativeGeometryRep& getRep() const {assert(rep); return *rep;}
259DecorativeGeometryRep& updRep() {assert(rep); return *rep;}
260protected:
261DecorativeGeometryRep* rep;
262};
263
264
270public:
271 explicit DecorativePoint(const Vec3& p=Vec3(0));
272
273 // These are specific to DecorativePoint.
274
276 const Vec3& getPoint() const;
277
278 // Retain the derived type when setting generic geometry options.
279 DecorativePoint& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
280 DecorativePoint& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
281 DecorativePoint& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
282 DecorativePoint& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
283 DecorativePoint& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
284 DecorativePoint& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
285 DecorativePoint& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
286 DecorativePoint& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
287 DecorativePoint& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
289 { DecorativeGeometry::setRepresentation(r); return *this; }
290
292private:
293 class DecorativePointRep& updRep();
294 const DecorativePointRep& getRep() const;
295};
296
307public:
308 explicit DecorativeLine(const Vec3& p1=Vec3(0), const Vec3& p2=Vec3(1)); // line between p1 and p2
309
310 // These are specific to lines.
313 DecorativeLine& setEndpoints(const Vec3& p1, const Vec3& p2);
314
315 // Retain the derived type when setting generic geometry options.
316 DecorativeLine& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
317 DecorativeLine& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
318 DecorativeLine& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
319 DecorativeLine& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
320 DecorativeLine& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
321 DecorativeLine& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
322 DecorativeLine& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
323 DecorativeLine& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
324 DecorativeLine& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
326 { DecorativeGeometry::setRepresentation(r); return *this; }
327
328 const Vec3& getPoint1() const;
329 const Vec3& getPoint2() const;
330
332private:
333 class DecorativeLineRep& updRep();
334 const DecorativeLineRep& getRep() const;
335};
336
340public:
341 explicit DecorativeCircle(Real radius=0.5);
342
345
346 // Retain the derived type when setting generic geometry options.
347 DecorativeCircle& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
348 DecorativeCircle& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
349 DecorativeCircle& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
350 DecorativeCircle& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
351 DecorativeCircle& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
352 DecorativeCircle& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
353 DecorativeCircle& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
354 DecorativeCircle& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
355 DecorativeCircle& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
357 { DecorativeGeometry::setRepresentation(r); return *this; }
358
360private:
361 class DecorativeCircleRep& updRep();
362 const DecorativeCircleRep& getRep() const;
363};
364
368public:
369 explicit DecorativeSphere(Real radius=0.5);
370
373
374 // Retain the derived type when setting generic geometry options.
375 DecorativeSphere& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
376 DecorativeSphere& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
377 DecorativeSphere& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
378 DecorativeSphere& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
379 DecorativeSphere& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
380 DecorativeSphere& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
381 DecorativeSphere& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
382 DecorativeSphere& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
383 DecorativeSphere& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
385 { DecorativeGeometry::setRepresentation(r); return *this; }
386
388private:
389 class DecorativeSphereRep& updRep();
390 const DecorativeSphereRep& getRep() const;
391};
392
397public:
398 explicit DecorativeEllipsoid(const Vec3& radii =
399 Vec3(Real(0.5),Real(1/3.),Real(0.25)));
400
402 const Vec3& getRadii() const;
403
404 // Retain the derived type when setting generic geometry options.
405 DecorativeEllipsoid& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
406 DecorativeEllipsoid& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
407 DecorativeEllipsoid& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
408 DecorativeEllipsoid& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
409 DecorativeEllipsoid& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
410 DecorativeEllipsoid& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
411 DecorativeEllipsoid& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
412 DecorativeEllipsoid& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
413 DecorativeEllipsoid& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
415 { DecorativeGeometry::setRepresentation(r); return *this; }
416
418private:
419 class DecorativeEllipsoidRep& updRep();
420 const DecorativeEllipsoidRep& getRep() const;
421};
422
427public:
428 explicit DecorativeBrick(const Vec3& halfLengths = Vec3(Real(0.5)));
429
431 const Vec3& getHalfLengths() const;
432
433 // Retain the derived type when setting generic geometry options.
434 DecorativeBrick& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
435 DecorativeBrick& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
436 DecorativeBrick& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
437 DecorativeBrick& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
438 DecorativeBrick& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
439 DecorativeBrick& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
440 DecorativeBrick& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
441 DecorativeBrick& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
442 DecorativeBrick& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
444 { DecorativeGeometry::setRepresentation(r); return *this; }
445
447private:
448 class DecorativeBrickRep& updRep();
449 const DecorativeBrickRep& getRep() const;
450};
451
456public:
457 explicit DecorativeCylinder(Real radius=0.5, Real halfHeight=0.5);
458
463
464 // Retain the derived type when setting generic geometry options.
465 DecorativeCylinder& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
466 DecorativeCylinder& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
467 DecorativeCylinder& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
468 DecorativeCylinder& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
469 DecorativeCylinder& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
470 DecorativeCylinder& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
471 DecorativeCylinder& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
472 DecorativeCylinder& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
473 DecorativeCylinder& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
475 { DecorativeGeometry::setRepresentation(r); return *this; }
476
478private:
479 class DecorativeCylinderRep& updRep();
480 const DecorativeCylinderRep& getRep() const;
481};
482
487public:
488 explicit DecorativeFrame(Real axisLength=1);
489
492
493 // Retain the derived type when setting generic geometry options.
494 DecorativeFrame& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
495 DecorativeFrame& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
496 DecorativeFrame& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
497 DecorativeFrame& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
498 DecorativeFrame& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
499 DecorativeFrame& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
500 DecorativeFrame& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
501 DecorativeFrame& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
502 DecorativeFrame& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
504 { DecorativeGeometry::setRepresentation(r); return *this; }
505
507private:
508 class DecorativeFrameRep& updRep();
509 const DecorativeFrameRep& getRep() const;
510};
511
515public:
516 explicit DecorativeText(const std::string& label="");
517
518 DecorativeText& setText(const std::string& label);
519 const std::string& getText() const;
520
524 bool getIsScreenText() const;
525
526 // Retain the derived type when setting generic geometry options.
527 DecorativeText& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
528 DecorativeText& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
529 DecorativeText& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
530 DecorativeText& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
531 DecorativeText& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
532 DecorativeText& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
533 DecorativeText& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
534 DecorativeText& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
535 DecorativeText& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
536 DecorativeText& setFaceCamera(int yn) {DecorativeGeometry::setFaceCamera(yn); return *this;}
538 { DecorativeGeometry::setRepresentation(r); return *this; }
539
541private:
542 class DecorativeTextRep& updRep();
543 const DecorativeTextRep& getRep() const;
544};
545
550public:
551 explicit DecorativeMesh(const PolygonalMesh& mesh);
552 const PolygonalMesh& getMesh() const;
553
554 // Retain the derived type when setting generic geometry options.
555 DecorativeMesh& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
556 DecorativeMesh& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
557 DecorativeMesh& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
558 DecorativeMesh& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
559 DecorativeMesh& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
560 DecorativeMesh& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
561 DecorativeMesh& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
562 DecorativeMesh& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
563 DecorativeMesh& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
565 { DecorativeGeometry::setRepresentation(r); return *this; }
566
568private:
569 class DecorativeMeshRep& updRep();
570 const DecorativeMeshRep& getRep() const;
571};
572
573
580public:
581 explicit DecorativeMeshFile(const std::string& meshFileName);
582 const std::string& getMeshFile() const;
585 const PolygonalMesh& getMesh() const;
586
587 // Retain the derived type when setting generic geometry options.
588 DecorativeMeshFile& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
589 DecorativeMeshFile& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
590 DecorativeMeshFile& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
591 DecorativeMeshFile& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
592 DecorativeMeshFile& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
593 DecorativeMeshFile& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
594 DecorativeMeshFile& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
595 DecorativeMeshFile& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
596 DecorativeMeshFile& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
598 { DecorativeGeometry::setRepresentation(r); return *this; }
599
601private:
602 class DecorativeMeshFileRep& updRep();
603 const DecorativeMeshFileRep& getRep() const;
604};
605
606
613public:
614 explicit DecorativeTorus(Real torusR=1, Real tubeR=0.1);
615
620
621 // Retain the derived type when setting generic geometry options.
622 DecorativeTorus& setBodyId(int b) { DecorativeGeometry::setBodyId(b); return *this; }
623 DecorativeTorus& setIndexOnBody(int x) { DecorativeGeometry::setIndexOnBody(x); return *this; }
624 DecorativeTorus& setUserRef(void* p) { DecorativeGeometry::setUserRef(p); return *this; }
625 DecorativeTorus& setTransform(const Transform& X_BD) { DecorativeGeometry::setTransform(X_BD); return *this; }
626 DecorativeTorus& setResolution(Real r) { DecorativeGeometry::setResolution(r); return *this; }
627 DecorativeTorus& setScaleFactors(const Vec3& s) { DecorativeGeometry::setScaleFactors(s); return *this; }
628 DecorativeTorus& setColor(const Vec3& rgb) { DecorativeGeometry::setColor(rgb); return *this; }
629 DecorativeTorus& setOpacity(Real o) { DecorativeGeometry::setOpacity(o); return *this; }
630 DecorativeTorus& setLineThickness(Real t) { DecorativeGeometry::setLineThickness(t); return *this; }
632 {
633 DecorativeGeometry::setRepresentation(r); return *this;
634 }
635
637private:
638 class DecorativeTorusRep& updRep();
639 const DecorativeTorusRep& getRep() const;
640};
641
642
655public:
656 explicit DecorativeArrow(const Vec3& startPoint = Vec3(0), const Vec3& endPoint = Vec3(1), Real tipLength = 0.35); // Arrow
657 const Vec3& getStartPoint() const;
658 const Vec3& getEndPoint() const;
659 const Real& getTipLength() const;
660
664
665 // Retain the derived type when setting generic geometry options.
666 DecorativeArrow& setBodyId(int b) { DecorativeGeometry::setBodyId(b); return *this; }
667 DecorativeArrow& setIndexOnBody(int x) { DecorativeGeometry::setIndexOnBody(x); return *this; }
668 DecorativeArrow& setUserRef(void* p) { DecorativeGeometry::setUserRef(p); return *this; }
669 DecorativeArrow& setTransform(const Transform& X_BD) { DecorativeGeometry::setTransform(X_BD); return *this; }
670 DecorativeArrow& setResolution(Real r) { DecorativeGeometry::setResolution(r); return *this; }
671 DecorativeArrow& setScaleFactors(const Vec3& s) { DecorativeGeometry::setScaleFactors(s); return *this; }
672 DecorativeArrow& setColor(const Vec3& rgb) { DecorativeGeometry::setColor(rgb); return *this; }
673 DecorativeArrow& setOpacity(Real o) { DecorativeGeometry::setOpacity(o); return *this; }
674 DecorativeArrow& setLineThickness(Real t) { DecorativeGeometry::setLineThickness(t); return *this; }
676 {
677 DecorativeGeometry::setRepresentation(r); return *this;
678 }
679
681private:
682 class DecorativeArrowRep& updRep();
683 const DecorativeArrowRep& getRep() const;
684};
685
686
697public:
698 explicit DecorativeCone(const Vec3& p1 = Vec3(0), const UnitVec3& dir = UnitVec3(1,1,1),
699 Real height = 1.0, Real baseRadius = 0.5); // Cone
700 const Vec3& getOrigin() const;
701 const UnitVec3& getDirection() const;
702 const Real& getHeight() const;
703 const Real& getBaseRadius() const;
704
709
710 // Retain the derived type when setting generic geometry options.
711 DecorativeCone& setBodyId(int b) { DecorativeGeometry::setBodyId(b); return *this; }
712 DecorativeCone& setIndexOnBody(int x) { DecorativeGeometry::setIndexOnBody(x); return *this; }
713 DecorativeCone& setUserRef(void* p) { DecorativeGeometry::setUserRef(p); return *this; }
714 DecorativeCone& setTransform(const Transform& X_BD) { DecorativeGeometry::setTransform(X_BD); return *this; }
715 DecorativeCone& setResolution(Real r) { DecorativeGeometry::setResolution(r); return *this; }
716 DecorativeCone& setScaleFactors(const Vec3& s) { DecorativeGeometry::setScaleFactors(s); return *this; }
717 DecorativeCone& setColor(const Vec3& rgb) { DecorativeGeometry::setColor(rgb); return *this; }
718 DecorativeCone& setOpacity(Real o) { DecorativeGeometry::setOpacity(o); return *this; }
719 DecorativeCone& setLineThickness(Real t) { DecorativeGeometry::setLineThickness(t); return *this; }
721 {
722 DecorativeGeometry::setRepresentation(r); return *this;
723 }
724
726private:
727 class DecorativeConeRep& updRep();
728 const DecorativeConeRep& getRep() const;
729};
730
741public:
746 explicit Decorations(const DecorativeGeometry& decoration);
752 const DecorativeGeometry& decoration);
755 int getNumDecorations() const;
759
760 // Retain the derived type when setting generic geometry options.
761 Decorations& setBodyId(int b) {DecorativeGeometry::setBodyId(b); return *this;}
762 Decorations& setIndexOnBody(int x) {DecorativeGeometry::setIndexOnBody(x); return *this;}
763 Decorations& setUserRef(void* p) {DecorativeGeometry::setUserRef(p); return *this;}
764 Decorations& setTransform(const Transform& X_BD) {DecorativeGeometry::setTransform(X_BD); return *this;}
765 Decorations& setResolution(Real r) {DecorativeGeometry::setResolution(r); return *this;}
766 Decorations& setScaleFactors(const Vec3& s) {DecorativeGeometry::setScaleFactors(s); return *this;}
767 Decorations& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
768 Decorations& setOpacity(Real o) {DecorativeGeometry::setOpacity(o); return *this;}
769 Decorations& setLineThickness(Real t) {DecorativeGeometry::setLineThickness(t); return *this;}
771 { DecorativeGeometry::setRepresentation(r); return *this; }
772
773
775private:
776 class DecorationsRep& updRep();
777 const DecorationsRep& getRep() const;
778};
779
800
801} // namespace SimTK
802
803#endif // SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
#define SimTK_SimTKCOMMON_EXPORT
Definition SimTKcommon/include/SimTKcommon/internal/common.h:224
This is the header which should be included in user programs that would like to make use of all the S...
This defines a single DecorativeGeometry object that is composed of a collection of other DecorativeG...
Definition DecorativeGeometry.h:740
Decorations & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:764
Decorations & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:767
Decorations & addDecoration(const Transform &placement, const DecorativeGeometry &decoration)
Add a DecorativeGeometry object to this collection and place it relative to the Decorations frame.
Decorations & setLineThickness(Real t)
Definition DecorativeGeometry.h:769
Decorations & setIndexOnBody(int x)
Definition DecorativeGeometry.h:762
Decorations & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:766
Decorations & setUserRef(void *p)
Definition DecorativeGeometry.h:763
int getNumDecorations() const
Determine how many DecorativeGeometry objects are in this collection.
Decorations & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:770
SimTK_PIMPL_DOWNCAST(Decorations, DecorativeGeometry)
Decorations & setOpacity(Real o)
Definition DecorativeGeometry.h:768
Decorations(const DecorativeGeometry &decoration)
Construct a Decorations container initially consting of just a single DecorativeGeometry object.
Decorations()
Construct an empty container for DecorativeGeometry objects.
const DecorativeGeometry & getDecoration(int i) const
Get access to one of the DecorativeGeometry objects in this collection.
Decorations & setBodyId(int b)
Definition DecorativeGeometry.h:761
Decorations & addDecoration(const DecorativeGeometry &decoration)
Add a DecorativeGeometry object to this collection.
Decorations & setResolution(Real r)
Definition DecorativeGeometry.h:765
An arrow with start point, end point and tip-length.
Definition DecorativeGeometry.h:654
DecorativeArrow & setUserRef(void *p)
Definition DecorativeGeometry.h:668
DecorativeArrow & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:672
const Real & getTipLength() const
DecorativeArrow & setEndPoint(const Vec3 &end)
DecorativeArrow & setTipLength(Real)
DecorativeArrow(const Vec3 &startPoint=Vec3(0), const Vec3 &endPoint=Vec3(1), Real tipLength=0.35)
DecorativeArrow & setStartPoint(const Vec3 &start)
DecorativeArrow & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:675
SimTK_PIMPL_DOWNCAST(DecorativeArrow, DecorativeGeometry)
const Vec3 & getEndPoint() const
const Vec3 & getStartPoint() const
DecorativeArrow & setBodyId(int b)
Definition DecorativeGeometry.h:666
DecorativeArrow & setLineThickness(Real t)
Definition DecorativeGeometry.h:674
DecorativeArrow & setResolution(Real r)
Definition DecorativeGeometry.h:670
DecorativeArrow & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:669
DecorativeArrow & setOpacity(Real o)
Definition DecorativeGeometry.h:673
DecorativeArrow & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:671
DecorativeArrow & setIndexOnBody(int x)
Definition DecorativeGeometry.h:667
This defines a rectangular solid centered at the origin and aligned with the local frame axes.
Definition DecorativeGeometry.h:426
DecorativeBrick & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:437
const Vec3 & getHalfLengths() const
DecorativeBrick & setLineThickness(Real t)
Definition DecorativeGeometry.h:442
DecorativeBrick(const Vec3 &halfLengths=Vec3(Real(0.5)))
DecorativeBrick & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:439
DecorativeBrick & setResolution(Real r)
Definition DecorativeGeometry.h:438
SimTK_PIMPL_DOWNCAST(DecorativeBrick, DecorativeGeometry)
DecorativeBrick & setIndexOnBody(int x)
Definition DecorativeGeometry.h:435
DecorativeBrick & setBodyId(int b)
Definition DecorativeGeometry.h:434
DecorativeBrick & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:440
DecorativeBrick & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:443
DecorativeBrick & setUserRef(void *p)
Definition DecorativeGeometry.h:436
DecorativeBrick & setHalfLengths(const Vec3 &)
DecorativeBrick & setOpacity(Real o)
Definition DecorativeGeometry.h:441
This defines a circle in the x-y plane, centered at the origin.
Definition DecorativeGeometry.h:339
DecorativeCircle & setIndexOnBody(int x)
Definition DecorativeGeometry.h:348
DecorativeCircle & setUserRef(void *p)
Definition DecorativeGeometry.h:349
DecorativeCircle & setLineThickness(Real t)
Definition DecorativeGeometry.h:355
DecorativeCircle & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:356
DecorativeCircle & setOpacity(Real o)
Definition DecorativeGeometry.h:354
DecorativeCircle(Real radius=0.5)
DecorativeCircle & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:352
DecorativeCircle & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:353
DecorativeCircle & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:350
DecorativeCircle & setBodyId(int b)
Definition DecorativeGeometry.h:347
DecorativeCircle & setRadius(Real)
SimTK_PIMPL_DOWNCAST(DecorativeCircle, DecorativeGeometry)
DecorativeCircle & setResolution(Real r)
Definition DecorativeGeometry.h:351
A cone with origin point, direction, height and base radius.
Definition DecorativeGeometry.h:696
DecorativeCone & setBodyId(int b)
Definition DecorativeGeometry.h:711
DecorativeCone & setBaseRadius(Real base)
DecorativeCone & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:716
DecorativeCone & setOpacity(Real o)
Definition DecorativeGeometry.h:718
const UnitVec3 & getDirection() const
const Real & getBaseRadius() const
const Vec3 & getOrigin() const
DecorativeCone & setDirection(const UnitVec3 &direction)
DecorativeCone & setUserRef(void *p)
Definition DecorativeGeometry.h:713
DecorativeCone & setHeight(Real length)
DecorativeCone & setResolution(Real r)
Definition DecorativeGeometry.h:715
DecorativeCone & setOrigin(const Vec3 &origin)
SimTK_PIMPL_DOWNCAST(DecorativeCone, DecorativeGeometry)
DecorativeCone & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:714
DecorativeCone & setLineThickness(Real t)
Definition DecorativeGeometry.h:719
DecorativeCone(const Vec3 &p1=Vec3(0), const UnitVec3 &dir=UnitVec3(1, 1, 1), Real height=1.0, Real baseRadius=0.5)
const Real & getHeight() const
DecorativeCone & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:717
DecorativeCone & setIndexOnBody(int x)
Definition DecorativeGeometry.h:712
DecorativeCone & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:720
This defines a cylinder centered on the origin and aligned in the y direction.
Definition DecorativeGeometry.h:455
DecorativeCylinder & setResolution(Real r)
Definition DecorativeGeometry.h:469
DecorativeCylinder & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:474
DecorativeCylinder & setLineThickness(Real t)
Definition DecorativeGeometry.h:473
DecorativeCylinder & setBodyId(int b)
Definition DecorativeGeometry.h:465
DecorativeCylinder & setHalfHeight(Real)
DecorativeCylinder & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:471
DecorativeCylinder & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:470
DecorativeCylinder & setIndexOnBody(int x)
Definition DecorativeGeometry.h:466
DecorativeCylinder & setRadius(Real)
DecorativeCylinder & setOpacity(Real o)
Definition DecorativeGeometry.h:472
DecorativeCylinder & setUserRef(void *p)
Definition DecorativeGeometry.h:467
DecorativeCylinder(Real radius=0.5, Real halfHeight=0.5)
SimTK_PIMPL_DOWNCAST(DecorativeCylinder, DecorativeGeometry)
DecorativeCylinder & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:468
This defines an ellipsoidal solid centered at the origin and aligned with the local frame axes.
Definition DecorativeGeometry.h:396
DecorativeEllipsoid & setLineThickness(Real t)
Definition DecorativeGeometry.h:413
DecorativeEllipsoid & setIndexOnBody(int x)
Definition DecorativeGeometry.h:406
DecorativeEllipsoid & setBodyId(int b)
Definition DecorativeGeometry.h:405
DecorativeEllipsoid & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:411
DecorativeEllipsoid & setOpacity(Real o)
Definition DecorativeGeometry.h:412
SimTK_PIMPL_DOWNCAST(DecorativeEllipsoid, DecorativeGeometry)
DecorativeEllipsoid & setResolution(Real r)
Definition DecorativeGeometry.h:409
DecorativeEllipsoid & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:410
const Vec3 & getRadii() const
DecorativeEllipsoid & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:408
DecorativeEllipsoid & setRadii(const Vec3 &)
DecorativeEllipsoid(const Vec3 &radii=Vec3(Real(0.5), Real(1/3.), Real(0.25)))
DecorativeEllipsoid & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:414
DecorativeEllipsoid & setUserRef(void *p)
Definition DecorativeGeometry.h:407
This defines geometry to represent a coordinate frame.
Definition DecorativeGeometry.h:486
Real getAxisLength() const
DecorativeFrame & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:499
DecorativeFrame & setIndexOnBody(int x)
Definition DecorativeGeometry.h:495
DecorativeFrame & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:503
SimTK_PIMPL_DOWNCAST(DecorativeFrame, DecorativeGeometry)
DecorativeFrame & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:500
DecorativeFrame & setUserRef(void *p)
Definition DecorativeGeometry.h:496
DecorativeFrame(Real axisLength=1)
DecorativeFrame & setOpacity(Real o)
Definition DecorativeGeometry.h:501
DecorativeFrame & setAxisLength(Real)
DecorativeFrame & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:497
DecorativeFrame & setResolution(Real r)
Definition DecorativeGeometry.h:498
DecorativeFrame & setBodyId(int b)
Definition DecorativeGeometry.h:494
DecorativeFrame & setLineThickness(Real t)
Definition DecorativeGeometry.h:502
Use this abstract class to connect your implementation of decorative geometry to the implementation-i...
Definition DecorativeGeometry.h:782
virtual void implementLineGeometry(const DecorativeLine &)=0
virtual void implementBrickGeometry(const DecorativeBrick &)=0
virtual void implementTextGeometry(const DecorativeText &)=0
virtual void implementMeshGeometry(const DecorativeMesh &)=0
virtual ~DecorativeGeometryImplementation()
Definition DecorativeGeometry.h:784
virtual void implementArrowGeometry(const DecorativeArrow &)=0
virtual void implementPointGeometry(const DecorativePoint &)=0
virtual void implementCircleGeometry(const DecorativeCircle &)=0
virtual void implementMeshFileGeometry(const DecorativeMeshFile &)=0
virtual void implementSphereGeometry(const DecorativeSphere &)=0
virtual void implementFrameGeometry(const DecorativeFrame &)=0
virtual void implementTorusGeometry(const DecorativeTorus &)=0
virtual void implementCylinderGeometry(const DecorativeCylinder &)=0
virtual void implementEllipsoidGeometry(const DecorativeEllipsoid &)=0
virtual void implementConeGeometry(const DecorativeCone &)=0
This is the client-side interface to an implementation-independent representation of "Decorations" su...
Definition DecorativeGeometry.h:86
const DecorativeGeometryRep & getRep() const
Definition DecorativeGeometry.h:258
void implementGeometry(DecorativeGeometryImplementation &) const
DecorativeGeometry()
Default constructor creates an empty handle.
Definition DecorativeGeometry.h:89
void * getUserRef() const
Return the pointer value that was supplied to the most recent setUserRef() call for this DecorativeGe...
DecorativeGeometryRep & updRep()
Definition DecorativeGeometry.h:259
Representation
Drawing modes.
Definition DecorativeGeometry.h:99
Real getLineThickness() const
Return the line thickness specified for this object, if any, otherwise return -1 to indicate that the...
DecorativeGeometry & setBodyId(int bodyId)
By default the geometry should be placed relative to the Ground frame.
DecorativeGeometry(const DecorativeGeometry &source)
Copy construction is deep; the source object will be cloned to create an independent copy.
DecorativeGeometry & setScaleFactors(const Vec3 &scale)
Each concrete DecorativeGeometry object is expected to have a default size around "1",...
DecorativeGeometry & setColor(const Vec3 &rgb)
Request a specific color for this DecorativeGeometry object.
DecorativeGeometry & setFaceCamera(int shouldFace)
Set whether the geometry acts as a billboard, always rotating to face the camera.
DecorativeGeometry & operator=(const DecorativeGeometry &source)
Copy assignment is deep; the handle will be cleared if necessary and then the source object will be c...
Real getResolution() const
Return the current setting of the "resolution" factor.
const Vec3 & getScaleFactors() const
Return the current setting of the "scale" factors.
int getBodyId() const
Return the bodyId that was supplied to the most recent setBodyId() call for this DecorativeGeometry o...
DecorativeGeometry & setRepresentation(const Representation &)
Request a particular rendering representation of this DecorativeGeometry object.
DecorativeGeometry & setResolution(Real)
Each concrete DecorativeGeometry object is expected to have a default resolution that gets the point ...
bool hasRep() const
Definition DecorativeGeometry.h:257
DecorativeGeometry & setOpacity(Real)
Request a level of transparency for this DecorativeGeometry.
DecorativeGeometry & setScale(Real scale)
Convenience method to set all three scale factors to the same value.
Definition DecorativeGeometry.h:171
DecorativeGeometryRep * rep
Definition DecorativeGeometry.h:261
const Vec3 & getColor() const
Return the color specified for this object, if any, otherwise Vec3(-1) indicating that the default co...
Representation getRepresentation() const
Returns drawing mode: -1 means "use default"; see above for others.
DecorativeGeometry & setUserRef(void *userRef)
Use this method to store an arbitrary reference pointer with this DecorativeGeometry object.
DecorativeGeometry & setTransform(const Transform &X_BG)
This transform shifts the generated polygons with respect to this object's local frame.
Real getOpacity() const
Return the opacity specified for this object.
DecorativeGeometry(class DecorativeGeometryRep *r)
Definition DecorativeGeometry.h:256
DecorativeGeometry & setLineThickness(Real)
Request an adjustment to the default rendering of lines and curves.
int getIndexOnBody() const
Return the index that was supplied to the most recent setIndexOnBody() call for this DecorativeGeomet...
const Transform & getTransform() const
Return the current value of the object's transform.
DecorativeGeometry & setIndexOnBody(int index)
For selection or other purposes, you may want to use this method to store an index that can identify ...
int getFaceCamera() const
Get whether the geometry acts as a billboard, always rotating to face the camera.
A line between two points.
Definition DecorativeGeometry.h:306
SimTK_PIMPL_DOWNCAST(DecorativeLine, DecorativeGeometry)
DecorativeLine(const Vec3 &p1=Vec3(0), const Vec3 &p2=Vec3(1))
DecorativeLine & setPoint2(const Vec3 &p2)
DecorativeLine & setBodyId(int b)
Definition DecorativeGeometry.h:316
DecorativeLine & setEndpoints(const Vec3 &p1, const Vec3 &p2)
DecorativeLine & setResolution(Real r)
Definition DecorativeGeometry.h:320
const Vec3 & getPoint2() const
DecorativeLine & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:321
DecorativeLine & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:319
DecorativeLine & setLineThickness(Real t)
Definition DecorativeGeometry.h:324
DecorativeLine & setOpacity(Real o)
Definition DecorativeGeometry.h:323
DecorativeLine & setPoint1(const Vec3 &p1)
const Vec3 & getPoint1() const
DecorativeLine & setUserRef(void *p)
Definition DecorativeGeometry.h:318
DecorativeLine & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:322
DecorativeLine & setIndexOnBody(int x)
Definition DecorativeGeometry.h:317
DecorativeLine & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:325
This defines a displayable mesh by referencing a file name containing the mesh.
Definition DecorativeGeometry.h:579
DecorativeMeshFile & setOpacity(Real o)
Definition DecorativeGeometry.h:595
const std::string & getMeshFile() const
DecorativeMeshFile(const std::string &meshFileName)
DecorativeMeshFile & setBodyId(int b)
Definition DecorativeGeometry.h:588
DecorativeMeshFile & setLineThickness(Real t)
Definition DecorativeGeometry.h:596
DecorativeMeshFile & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:593
DecorativeMeshFile & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:597
DecorativeMeshFile & setUserRef(void *p)
Definition DecorativeGeometry.h:590
DecorativeMeshFile & setIndexOnBody(int x)
Definition DecorativeGeometry.h:589
const PolygonalMesh & getMesh() const
Load the mesh from file and return a reference.
DecorativeMeshFile & setResolution(Real r)
Definition DecorativeGeometry.h:592
DecorativeMeshFile & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:594
SimTK_PIMPL_DOWNCAST(DecorativeMeshFile, DecorativeGeometry)
DecorativeMeshFile & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:591
This defines a displayable mesh by referencing an already-existing PolygonalMesh object.
Definition DecorativeGeometry.h:549
DecorativeMesh & setResolution(Real r)
Definition DecorativeGeometry.h:559
const PolygonalMesh & getMesh() const
DecorativeMesh & setIndexOnBody(int x)
Definition DecorativeGeometry.h:556
DecorativeMesh & setOpacity(Real o)
Definition DecorativeGeometry.h:562
SimTK_PIMPL_DOWNCAST(DecorativeMesh, DecorativeGeometry)
DecorativeMesh & setLineThickness(Real t)
Definition DecorativeGeometry.h:563
DecorativeMesh & setBodyId(int b)
Definition DecorativeGeometry.h:555
DecorativeMesh(const PolygonalMesh &mesh)
DecorativeMesh & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:560
DecorativeMesh & setUserRef(void *p)
Definition DecorativeGeometry.h:557
DecorativeMesh & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:564
DecorativeMesh & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:561
DecorativeMesh & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:558
A point of interest.
Definition DecorativeGeometry.h:269
DecorativePoint & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:285
DecorativePoint & setUserRef(void *p)
Definition DecorativeGeometry.h:281
DecorativePoint & setResolution(Real r)
Definition DecorativeGeometry.h:283
DecorativePoint & setBodyId(int b)
Definition DecorativeGeometry.h:279
DecorativePoint & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:284
DecorativePoint & setIndexOnBody(int x)
Definition DecorativeGeometry.h:280
DecorativePoint & setLineThickness(Real t)
Definition DecorativeGeometry.h:287
const Vec3 & getPoint() const
DecorativePoint & setPoint(const Vec3 &p)
DecorativePoint & setOpacity(Real o)
Definition DecorativeGeometry.h:286
DecorativePoint(const Vec3 &p=Vec3(0))
DecorativePoint & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:282
DecorativePoint & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:288
SimTK_PIMPL_DOWNCAST(DecorativePoint, DecorativeGeometry)
This defines a sphere centered at the origin.
Definition DecorativeGeometry.h:367
DecorativeSphere & setResolution(Real r)
Definition DecorativeGeometry.h:379
SimTK_PIMPL_DOWNCAST(DecorativeSphere, DecorativeGeometry)
DecorativeSphere & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:380
DecorativeSphere & setRadius(Real)
DecorativeSphere(Real radius=0.5)
DecorativeSphere & setIndexOnBody(int x)
Definition DecorativeGeometry.h:376
DecorativeSphere & setLineThickness(Real t)
Definition DecorativeGeometry.h:383
DecorativeSphere & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:378
DecorativeSphere & setUserRef(void *p)
Definition DecorativeGeometry.h:377
DecorativeSphere & setBodyId(int b)
Definition DecorativeGeometry.h:375
DecorativeSphere & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:381
DecorativeSphere & setOpacity(Real o)
Definition DecorativeGeometry.h:382
DecorativeSphere & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:384
This defines a text label with its base at the origin.
Definition DecorativeGeometry.h:514
DecorativeText & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:537
const std::string & getText() const
DecorativeText & setBodyId(int b)
Definition DecorativeGeometry.h:527
DecorativeText & setUserRef(void *p)
Definition DecorativeGeometry.h:529
bool getIsScreenText() const
DecorativeText & setLineThickness(Real t)
Definition DecorativeGeometry.h:535
DecorativeText(const std::string &label="")
DecorativeText & setResolution(Real r)
Definition DecorativeGeometry.h:531
DecorativeText & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:530
DecorativeText & setFaceCamera(int yn)
Definition DecorativeGeometry.h:536
DecorativeText & setOpacity(Real o)
Definition DecorativeGeometry.h:534
DecorativeText & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:533
DecorativeText & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:532
DecorativeText & setIndexOnBody(int x)
Definition DecorativeGeometry.h:528
SimTK_PIMPL_DOWNCAST(DecorativeText, DecorativeGeometry)
DecorativeText & setIsScreenText(bool isScreen)
By default the text is part of the scene; set this flag if you want it to just show up in a fixed spo...
DecorativeText & setText(const std::string &label)
This defines a displayable torus, the torus is centered at the origin with the axial direction aligne...
Definition DecorativeGeometry.h:612
DecorativeTorus & setTorusRadius(Real)
DecorativeTorus(Real torusR=1, Real tubeR=0.1)
DecorativeTorus & setBodyId(int b)
Definition DecorativeGeometry.h:622
DecorativeTorus & setOpacity(Real o)
Definition DecorativeGeometry.h:629
DecorativeTorus & setLineThickness(Real t)
Definition DecorativeGeometry.h:630
SimTK_PIMPL_DOWNCAST(DecorativeTorus, DecorativeGeometry)
DecorativeTorus & setIndexOnBody(int x)
Definition DecorativeGeometry.h:623
Real getTubeRadius() const
DecorativeTorus & setScaleFactors(const Vec3 &s)
Definition DecorativeGeometry.h:627
Real getTorusRadius() const
DecorativeTorus & setColor(const Vec3 &rgb)
Definition DecorativeGeometry.h:628
DecorativeTorus & setTransform(const Transform &X_BD)
Definition DecorativeGeometry.h:625
DecorativeTorus & setRepresentation(const Representation &r)
Definition DecorativeGeometry.h:631
DecorativeTorus & setResolution(Real r)
Definition DecorativeGeometry.h:626
DecorativeTorus & setTubeRadius(Real)
DecorativeTorus & setUserRef(void *p)
Definition DecorativeGeometry.h:624
This class provides a description of a mesh made of polygonal faces (not limited to triangles).
Definition PolygonalMesh.h:71
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
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition Assembler.h:37
const Vec3 Orange
RGB=( 1,.5, 0)
const Vec3 Blue
RGB=( 0, 0, 1)
const Vec3 Gray
RGB=(.5,.5,.5)
const Vec3 White
RGB=( 1, 1, 1)
const Vec3 Black
RGB=( 0, 0, 0)
const Vec3 Magenta
RGB=( 1, 0, 1)
const Vec3 Red
RGB=( 1, 0, 0)
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
const Vec3 Yellow
RGB=( 1, 1, 0)
const Vec3 Cyan
RGB=( 0, 1, 1)
const Vec3 Purple
RGB=(.5, 0,.5)
const Vec3 Green
RGB=( 0, 1, 0)