Simbody  3.5
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-14 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 
30 #include "SimTKcommon/Simmatrix.h"
32 
33 #include <cassert>
34 
35 
36 namespace SimTK {
37 
38 // Some common RGB values;
39 extern SimTK_SimTKCOMMON_EXPORT const Vec3 Black;
40 extern SimTK_SimTKCOMMON_EXPORT const Vec3 Gray;
41 extern SimTK_SimTKCOMMON_EXPORT const Vec3 Red;
42 extern SimTK_SimTKCOMMON_EXPORT const Vec3 Green;
43 extern SimTK_SimTKCOMMON_EXPORT const Vec3 Blue;
48 extern SimTK_SimTKCOMMON_EXPORT const Vec3 Cyan;
49 extern SimTK_SimTKCOMMON_EXPORT const Vec3 White;
50 
51 // Drawing representations
52 
53 class DecorativeGeometryImplementation;
54 
87 public:
89 DecorativeGeometry() : rep(0) { }
96 DecorativeGeometry& operator=(const DecorativeGeometry& source);
97 
100  DrawPoints = 1,
101  DrawWireframe = 2,
102  DrawSurface = 3,
103 
104  DrawDefault = -1
105 };
106 
117 DecorativeGeometry& setBodyId(int bodyId);
118 
125 DecorativeGeometry& setIndexOnBody(int index);
126 
140 DecorativeGeometry& setUserRef(void* userRef);
141 
147 DecorativeGeometry& setTransform(const Transform& X_BG);
148 
157 DecorativeGeometry& setResolution(Real);
158 
166 DecorativeGeometry& setScaleFactors(const Vec3& scale);
167 
169 DecorativeGeometry& setScale(Real scale) {return setScaleFactors(Vec3(scale));}
170 
176 int getBodyId() const;
177 
182 int getIndexOnBody() const;
183 
188 void* getUserRef() const;
189 
192 Real getResolution() const;
193 
197 const Transform& getTransform() const;
198 
202 const Vec3& getScaleFactors() const;
203 
209 DecorativeGeometry& setColor(const Vec3& rgb); // 0-1 for each color
210 
214 DecorativeGeometry& setOpacity(Real); // 0-1; default is 1 (opaque)
215 
220 DecorativeGeometry& setLineThickness(Real);
221 
224 const Vec3& getColor() const;
226 Real getOpacity() const;
229 Real getLineThickness() const;
230 
235 DecorativeGeometry& setFaceCamera(int shouldFace);
238 int getFaceCamera() const;
239 
243 DecorativeGeometry& setRepresentation(const Representation&);
244 
246 Representation getRepresentation() const;
247 
248 void implementGeometry(DecorativeGeometryImplementation&) const;
249 
250 // Bookkeeping below here -- internal use only. Don't look below or you will
251 // turn into a pillar of salt.
252 bool isOwnerHandle() const;
253 bool isEmptyHandle() const;
254 explicit DecorativeGeometry(class DecorativeGeometryRep* r) : rep(r) { }
255 bool hasRep() const {return rep!=0;}
256 const DecorativeGeometryRep& getRep() const {assert(rep); return *rep;}
257 DecorativeGeometryRep& updRep() {assert(rep); return *rep;}
258 protected:
259 DecorativeGeometryRep* rep;
260 };
261 
262 
268 public:
269  explicit DecorativePoint(const Vec3& p=Vec3(0));
270 
271  // These are specific to DecorativePoint.
272 
273  DecorativePoint& setPoint(const Vec3& p);
274  const Vec3& getPoint() const;
275 
276  // Retain the derived type when setting generic geometry options.
283  DecorativePoint& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
287  { DecorativeGeometry::setRepresentation(r); return *this; }
288 
290 private:
291  class DecorativePointRep& updRep();
292  const DecorativePointRep& getRep() const;
293 };
294 
305 public:
306  explicit DecorativeLine(const Vec3& p1=Vec3(0), const Vec3& p2=Vec3(1)); // line between p1 and p2
307 
308  // These are specific to lines.
309  DecorativeLine& setPoint1(const Vec3& p1);
310  DecorativeLine& setPoint2(const Vec3& p2);
311  DecorativeLine& setEndpoints(const Vec3& p1, const Vec3& p2);
312 
313  // Retain the derived type when setting generic geometry options.
320  DecorativeLine& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
324  { DecorativeGeometry::setRepresentation(r); return *this; }
325 
326  const Vec3& getPoint1() const;
327  const Vec3& getPoint2() const;
328 
330 private:
331  class DecorativeLineRep& updRep();
332  const DecorativeLineRep& getRep() const;
333 };
334 
338 public:
339  explicit DecorativeCircle(Real radius=0.5);
340 
341  DecorativeCircle& setRadius(Real);
342  Real getRadius() const;
343 
344  // Retain the derived type when setting generic geometry options.
351  DecorativeCircle& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
355  { DecorativeGeometry::setRepresentation(r); return *this; }
356 
358 private:
359  class DecorativeCircleRep& updRep();
360  const DecorativeCircleRep& getRep() const;
361 };
362 
366 public:
367  explicit DecorativeSphere(Real radius=0.5);
368 
369  DecorativeSphere& setRadius(Real);
370  Real getRadius() const;
371 
372  // Retain the derived type when setting generic geometry options.
379  DecorativeSphere& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
383  { DecorativeGeometry::setRepresentation(r); return *this; }
384 
386 private:
387  class DecorativeSphereRep& updRep();
388  const DecorativeSphereRep& getRep() const;
389 };
390 
395 public:
396  explicit DecorativeEllipsoid(const Vec3& radii =
397  Vec3(Real(0.5),Real(1/3.),Real(0.25)));
398 
399  DecorativeEllipsoid& setRadii(const Vec3&);
400  const Vec3& getRadii() const;
401 
402  // Retain the derived type when setting generic geometry options.
413  { DecorativeGeometry::setRepresentation(r); return *this; }
414 
416 private:
417  class DecorativeEllipsoidRep& updRep();
418  const DecorativeEllipsoidRep& getRep() const;
419 };
420 
425 public:
426  explicit DecorativeBrick(const Vec3& halfLengths = Vec3(Real(0.5)));
427 
428  DecorativeBrick& setHalfLengths(const Vec3&);
429  const Vec3& getHalfLengths() const;
430 
431  // Retain the derived type when setting generic geometry options.
438  DecorativeBrick& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
442  { DecorativeGeometry::setRepresentation(r); return *this; }
443 
445 private:
446  class DecorativeBrickRep& updRep();
447  const DecorativeBrickRep& getRep() const;
448 };
449 
454 public:
455  explicit DecorativeCylinder(Real radius=0.5, Real halfHeight=0.5);
456 
457  DecorativeCylinder& setRadius(Real);
458  DecorativeCylinder& setHalfHeight(Real);
459  Real getRadius() const;
460  Real getHalfHeight() const;
461 
462  // Retain the derived type when setting generic geometry options.
473  { DecorativeGeometry::setRepresentation(r); return *this; }
474 
476 private:
477  class DecorativeCylinderRep& updRep();
478  const DecorativeCylinderRep& getRep() const;
479 };
480 
485 public:
486  explicit DecorativeFrame(Real axisLength=1);
487 
488  DecorativeFrame& setAxisLength(Real);
489  Real getAxisLength() const;
490 
491  // Retain the derived type when setting generic geometry options.
498  DecorativeFrame& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
502  { DecorativeGeometry::setRepresentation(r); return *this; }
503 
505 private:
506  class DecorativeFrameRep& updRep();
507  const DecorativeFrameRep& getRep() const;
508 };
509 
513 public:
514  explicit DecorativeText(const std::string& label="");
515 
516  DecorativeText& setText(const std::string& label);
517  const std::string& getText() const;
518 
521  DecorativeText& setIsScreenText(bool isScreen);
522  bool getIsScreenText() const;
523 
524  // Retain the derived type when setting generic geometry options.
531  DecorativeText& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
536  { DecorativeGeometry::setRepresentation(r); return *this; }
537 
539 private:
540  class DecorativeTextRep& updRep();
541  const DecorativeTextRep& getRep() const;
542 };
543 
547 public:
548  explicit DecorativeMesh(const PolygonalMesh& mesh);
549  const PolygonalMesh& getMesh() const;
550 
551  // Retain the derived type when setting generic geometry options.
558  DecorativeMesh& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
562  { DecorativeGeometry::setRepresentation(r); return *this; }
563 
565 private:
566  class DecorativeMeshRep& updRep();
567  const DecorativeMeshRep& getRep() const;
568 };
569 
570 
574 public:
575  explicit DecorativeMeshFile(const std::string& meshFileName);
576  const std::string& getMeshFile() const;
577 
578  // Retain the derived type when setting generic geometry options.
589  { DecorativeGeometry::setRepresentation(r); return *this; }
590 
592 private:
593  class DecorativeMeshFileRep& updRep();
594  const DecorativeMeshFileRep& getRep() const;
595 };
596 
597 
608 public:
610  Decorations();
613  explicit Decorations(const DecorativeGeometry& decoration);
615  Decorations& addDecoration(const DecorativeGeometry& decoration);
618  Decorations& addDecoration(const Transform& placement,
619  const DecorativeGeometry& decoration);
622  int getNumDecorations() const;
625  const DecorativeGeometry& getDecoration(int i) const;
626 
627  // Retain the derived type when setting generic geometry options.
634  Decorations& setColor(const Vec3& rgb) {DecorativeGeometry::setColor(rgb); return *this;}
638  { DecorativeGeometry::setRepresentation(r); return *this; }
639 
640 
642 private:
643  class DecorationsRep& updRep();
644  const DecorationsRep& getRep() const;
645 };
646 
650 public:
652  virtual void implementPointGeometry( const DecorativePoint&) = 0;
653  virtual void implementLineGeometry( const DecorativeLine&) = 0;
654  virtual void implementBrickGeometry( const DecorativeBrick&) = 0;
655  virtual void implementCylinderGeometry( const DecorativeCylinder&) = 0;
656  virtual void implementCircleGeometry( const DecorativeCircle&) = 0;
657  virtual void implementSphereGeometry( const DecorativeSphere&) = 0;
658  virtual void implementEllipsoidGeometry(const DecorativeEllipsoid&)= 0;
659  virtual void implementFrameGeometry( const DecorativeFrame&) = 0;
660  virtual void implementTextGeometry( const DecorativeText&) = 0;
661  virtual void implementMeshGeometry( const DecorativeMesh&) = 0;
662  virtual void implementMeshFileGeometry( const DecorativeMeshFile&) =0;
663 };
664 
665 } // namespace SimTK
666 
667 #endif // SimTK_SimTKCOMMON_DECORATIVE_GEOMETRY_H_
DecorativeMesh & setColor(const Vec3 &rgb)
Definition: DecorativeGeometry.h:558
DecorativeEllipsoid & setIndexOnBody(int x)
Definition: DecorativeGeometry.h:404
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:218
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:593
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&#39;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
#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:580
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)