CHAI3D  3.0.0
CGenericObject.h
Go to the documentation of this file.
1 //==============================================================================
2 /*
3  Software License Agreement (BSD License)
4  Copyright (c) 2003-2015, CHAI3D.
5  (www.chai3d.org)
6 
7  All rights reserved.
8 
9  Redistribution and use in source and binary forms, with or without
10  modification, are permitted provided that the following conditions
11  are met:
12 
13  * Redistributions of source code must retain the above copyright
14  notice, this list of conditions and the following disclaimer.
15 
16  * Redistributions in binary form must reproduce the above
17  copyright notice, this list of conditions and the following
18  disclaimer in the documentation and/or other materials provided
19  with the distribution.
20 
21  * Neither the name of CHAI3D nor the names of its contributors may
22  be used to endorse or promote products derived from this software
23  without specific prior written permission.
24 
25  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
28  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
29  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
30  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
31  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
32  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
33  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
35  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  POSSIBILITY OF SUCH DAMAGE.
37 
38  \author <http://www.chai3d.org>
39  \author Francois Conti
40  \author Dan Morris
41  \version 3.0.0 $Rev: 1656 $
42 */
43 //==============================================================================
44 
45 //------------------------------------------------------------------------------
46 #ifndef CGenericObjectH
47 #define CGenericObjectH
48 //------------------------------------------------------------------------------
50 #include "effects/CGenericEffect.h"
52 #include "graphics/CDraw3D.h"
53 #include "graphics/CColor.h"
54 #include "graphics/CDisplayList.h"
56 #include "materials/CMaterial.h"
57 #include "materials/CNormalMap.h"
58 #include "math/CMaths.h"
59 #include "math/CTransform.h"
60 #include "system/CGenericType.h"
61 //------------------------------------------------------------------------------
62 #include <vector>
63 #include <list>
64 //------------------------------------------------------------------------------
65 
66 //------------------------------------------------------------------------------
67 namespace chai3d {
68 //------------------------------------------------------------------------------
69 
70 //------------------------------------------------------------------------------
71 class cGenericCollision;
72 class cGenericForceAlgorithm;
73 class cMultiMesh;
74 class cShaderProgram;
75 class cInteractionRecorder;
76 //------------------------------------------------------------------------------
77 typedef std::shared_ptr<cShaderProgram> cShaderProgramPtr;
78 //------------------------------------------------------------------------------
79 
80 //==============================================================================
87 //==============================================================================
88 
89 //==============================================================================
111 //==============================================================================
113 {
114  friend class cMultiMesh;
115 
116  //--------------------------------------------------------------------------
117  // CONSTRUCTOR & DESTRUCTOR:
118  //--------------------------------------------------------------------------
119 
120 public:
121 
123  cGenericObject();
124 
126  virtual ~cGenericObject();
127 
128 
129  //--------------------------------------------------------------------------
130  // PUBLIC METHODS - GENERAL
131  //--------------------------------------------------------------------------
132 
133 public:
134 
136  virtual void setEnabled(bool a_enabled, const bool a_affectChildren = false);
137 
139  bool getEnabled() const { return (m_enabled); }
140 
141 
142  //-----------------------------------------------------------------------
143  // PUBLIC METHODS - COPY:
144  //-----------------------------------------------------------------------
145 
146 public:
147 
149  virtual cGenericObject* copy(const bool a_duplicateMaterialData = false,
150  const bool a_duplicateTextureData = false,
151  const bool a_duplicateMeshData = false,
152  const bool a_buildCollisionDetector = true) { return (NULL); }
153 
154 
155  //-----------------------------------------------------------------------
156  // PUBLIC METHODS - TRANSLATION AND ORIENTATION:
157  //-----------------------------------------------------------------------
158 
159 public:
160 
162  virtual void setLocalPos(const cVector3d& a_localPos)
163  {
164  m_localPos = a_localPos;
165  }
166 
167 #ifdef C_USE_EIGEN
168  void setLocalPos(const Eigen::Vector3d& a_localPos)
170  {
171  setLocalPos(cVector3d(a_localPos[0], a_localPos[1], a_localPos[2]));
172  }
173 #endif
174 
176  void setLocalPos(const double a_x = 0.0,
177  const double a_y = 0.0,
178  const double a_z = 0.0)
179  {
180  setLocalPos(cVector3d(a_x, a_y, a_z));
181  }
182 
184  inline cVector3d getLocalPos() const { return (m_localPos); }
185 
187  inline cVector3d getGlobalPos() const { return (m_globalPos); }
188 
190  virtual void setLocalRot(const cMatrix3d& a_localRot)
191  {
192  m_localRot = a_localRot;
193  }
194 
195 #ifdef C_USE_EIGEN
196  inline void setLocalRot(const Eigen::Matrix3d a_localRot)
198  {
199  cMatrix3d localRot;
200  localRot.copyfrom(a_localRot);
201  setLocalRot(localRot);
202  }
203 #endif
204 
206  inline cMatrix3d getLocalRot() const { return (m_localRot); }
207 
209  inline cMatrix3d getGlobalRot() const { return (m_globalRot); }
210 
212  inline void setLocalTransform(const cTransform& a_transform)
213  {
214  setLocalPos(a_transform.getLocalPos());
215  setLocalRot(a_transform.getLocalRot());
216  }
217 
220 
223 
225  void translate(const cVector3d& a_translation);
226 
228  void translate(const double a_x,
229  const double a_y,
230  const double a_z = 0.0);
231 
233  void rotateAboutLocalAxisRad(const cVector3d& a_axis, const double a_angleRad);
234 
236  inline void rotateAboutLocalAxisDeg(const cVector3d& a_axis,
237  const double a_angleDeg)
238  {
239  rotateAboutLocalAxisRad(a_axis, cDegToRad(a_angleDeg));
240  }
241 
243  inline void rotateAboutLocalAxisRad(const double a_axisX,
244  const double a_axisY,
245  const double a_axisZ,
246  const double a_angleRad)
247  {
248  rotateAboutLocalAxisRad(cVector3d(a_axisX, a_axisY, a_axisZ), a_angleRad);
249  }
250 
252  inline void rotateAboutLocalAxisDeg(const double a_axisX,
253  const double a_axisY,
254  const double a_axisZ,
255  const double a_angleDeg)
256  {
257  rotateAboutLocalAxisRad(cVector3d(a_axisX, a_axisY, a_axisZ), cDegToRad(a_angleDeg));
258  }
259 
261  void rotateAboutGlobalAxisRad(const cVector3d& a_axis, const double a_angleRad);
262 
264  inline void rotateAboutGlobalAxisDeg(const cVector3d& a_axis, const double a_angleDeg)
265  {
266  rotateAboutGlobalAxisRad(a_axis, cDegToRad(a_angleDeg));
267  }
268 
270  inline void rotateAboutGlobalAxisRad(const double a_axisX,
271  const double a_axisY,
272  const double a_axisZ,
273  const double a_angleRad)
274  {
275  rotateAboutGlobalAxisRad(cVector3d(a_axisX, a_axisY, a_axisZ), a_angleRad);
276  }
277 
279  inline void rotateAboutGlobalAxisDeg(const double a_axisX,
280  const double a_axisY,
281  const double a_axisZ,
282  const double a_angleDeg)
283  {
284  rotateAboutGlobalAxisRad(cVector3d(a_axisX, a_axisY, a_axisZ), cDegToRad(a_angleDeg));
285  }
286 
288  void rotateExtrinsicEulerAnglesRad(const double& a_angleRad1,
289  const double& a_angleRad2,
290  const double& a_angleRad3,
291  const cEulerOrder a_eulerOrder);
292 
294  void rotateExtrinsicEulerAnglesDeg(const double& a_angleDeg1,
295  const double& a_angleDeg2,
296  const double& a_angleDeg3,
297  const cEulerOrder a_eulerOrder)
298  {
299  rotateExtrinsicEulerAnglesRad(cDegToRad(a_angleDeg1), cDegToRad(a_angleDeg2), cDegToRad(a_angleDeg3), a_eulerOrder);
300  }
301 
303  void rotateIntrinsicEulerAnglesRad(const double& a_angleRad1,
304  const double& a_angleRad2,
305  const double& a_angleRad3,
306  const cEulerOrder a_eulerOrder);
307 
309  void rotateIntrinsicEulerAnglesDeg(const double& a_angleDeg1,
310  const double& a_angleDeg2,
311  const double& a_angleDeg3,
312  const cEulerOrder a_eulerOrder)
313  {
314  rotateIntrinsicEulerAnglesRad(cDegToRad(a_angleDeg1), cDegToRad(a_angleDeg2), cDegToRad(a_angleDeg3), a_eulerOrder);
315  }
316 
317 
318  //-----------------------------------------------------------------------
319  // PUBLIC METHODS - COMPUTING GLOBAL POSITIONS:
320  //-----------------------------------------------------------------------
321 
322 public:
323 
325  virtual void computeGlobalPositions(const bool a_frameOnly = true,
326  const cVector3d& a_globalPos = cVector3d(0.0, 0.0, 0.0),
327  const cMatrix3d& a_globalRot = cIdentity3d());
328 
330  void computeGlobalPositionsFromRoot(const bool a_frameOnly = true);
331 
332 
333  //-----------------------------------------------------------------------
334  // PUBLIC METHODS - HAPTIC EFFECTS:
335  //-----------------------------------------------------------------------
336 
337 public:
338 
340  bool addEffect(cGenericEffect* a_effect);
341 
343  bool removeEffect(cGenericEffect* a_effect);
344 
346  void deleteAllEffects();
347 
349  bool createEffectMagnetic();
350 
352  bool deleteEffectMagnetic();
353 
355  bool createEffectStickSlip();
356 
358  bool deleteEffectStickSlip();
359 
361  bool createEffectSurface();
362 
364  bool deleteEffectSurface();
365 
367  bool createEffectVibration();
368 
370  bool deleteEffectVibration();
371 
373  bool createEffectViscosity();
374 
376  bool deleteEffectViscosity();
377 
378 
379  //-----------------------------------------------------------------------
380  // PUBLIC METHODS - HAPTIC PROPERTIES:
381  //-----------------------------------------------------------------------
382 
383 public:
384 
386  virtual void setHapticEnabled(const bool a_hapticEnabled, const bool a_affectChildren = true);
387 
389  inline bool getHapticEnabled() const { return (m_hapticEnabled); }
390 
392  virtual void setStiffness(const double a_stiffness, const bool a_affectChildren = true);
393 
395  virtual void setFriction(double a_staticFriction,
396  double a_dynamicFriction,
397  const bool a_affectChildren = true);
398 
399 
400  //-----------------------------------------------------------------------
401  // PUBLIC METHODS - GRAPHIC PROPERTIES:
402  //-----------------------------------------------------------------------
403 
404 public:
405 
407  virtual void setShowEnabled(const bool a_show, const bool a_affectChildren = true);
408 
410  inline bool getShowEnabled() const { return (m_showEnabled); }
411 
413  virtual void setWireMode(const bool a_showWireMode, const bool a_affectChildren = false);
414 
416  inline bool getWireMode() const { return (m_triangleMode == GL_LINE); }
417 
419  virtual void setUseCulling(const bool a_useCulling, const bool a_affectChildren = false);
420 
422  inline bool getUseCulling() const { return (m_cullingEnabled); }
423 
424 
425  //-----------------------------------------------------------------------
426  // PUBLIC METHODS - TRANSPARENCY:
427  //-----------------------------------------------------------------------
428 
430  virtual void setUseTransparency(const bool a_useTransparency, const bool a_affectChildren = false);
431 
433  inline bool getUseTransparency() const { return m_useTransparency; }
434 
436  virtual void setTransparencyLevel(const float a_level,
437  const bool a_applyToTextures = false,
438  const bool a_affectChildren = false);
439 
440 
441  //-----------------------------------------------------------------------
442  // PUBLIC METHODS - DISPLAY LISTS:
443  //-----------------------------------------------------------------------
444 
445 public:
446 
448  virtual void setUseDisplayList(const bool a_useDisplayList, const bool a_affectChildren = false);
449 
451  inline bool getUseDisplayList() const { return (m_useDisplayList); }
452 
454  virtual void markForUpdate(const bool a_affectChildren = false);
455 
456 
457  //-----------------------------------------------------------------------
458  // PUBLIC METHODS - VERTEX COLORS:
459  //-----------------------------------------------------------------------
460 
461 public:
462 
464  virtual void setUseVertexColors(const bool a_useColors, const bool a_affectChildren = false);
465 
467  inline bool getUseVertexColors() const { return (m_useVertexColors); }
468 
469 
470  //-----------------------------------------------------------------------
471  // PUBLIC METHODS - MATERIAL PROPERTIES:
472  //-----------------------------------------------------------------------
473 
474 public:
475 
477  virtual void setUseMaterial(const bool a_useMaterial, const bool a_affectChildren = false);
478 
480  inline bool getUseMaterial() const { return (m_useMaterialProperty); }
481 
483  virtual void setMaterial(cMaterialPtr a_material, const bool a_affectChildren = false);
484 
486  virtual void setMaterial(cMaterial& a_material, const bool a_affectChildren = false);
487 
489  virtual void backupMaterialColors(const bool a_affectChildren = false);
490 
492  virtual void restoreMaterialColors(const bool a_affectChildren = false);
493 
494 
495  //--------------------------------------------------------------------------
496  // PUBLIC METHODS - TEXTURE PROPERTIES:
497  //-----------------------------------------------------------------------
498 
499 public:
500 
502  virtual void setUseTexture(const bool a_useTexture, const bool a_affectChildren = false);
503 
505  inline bool getUseTexture() const { return (m_useTextureMapping); }
506 
508  virtual void setTexture(cTexture1dPtr a_texture, const bool a_affectChildren = false);
509 
510 
511  //-----------------------------------------------------------------------
512  // PUBLIC METHODS - SHADERS:
513  //-----------------------------------------------------------------------
514 
515 public:
516 
518  virtual void setShaderProgram(cShaderProgramPtr a_shaderProgram, const bool a_affectChildren = false);
519 
521  virtual cShaderProgramPtr getShaderProgram() { return (m_shaderProgram); }
522 
523 
524  //-----------------------------------------------------------------------
525  // PUBLIC MEMBERS - BOUNDARY BOX:
526  //-----------------------------------------------------------------------
527 
528 public:
529 
532 
533 
534  //-----------------------------------------------------------------------
535  // PUBLIC METHODS - BOUNDARY BOX:
536  //-----------------------------------------------------------------------
537 
538 public:
539 
541  virtual void setShowBoundaryBox(const bool a_showBoundaryBox, const bool a_affectChildren = false);
542 
544  inline bool getShowBoundaryBox() const { return (m_showBoundaryBox); }
545 
547  inline cVector3d getBoundaryMin() const { return (m_boundaryBoxMin); }
548 
550  inline cVector3d getBoundaryMax() const { return (m_boundaryBoxMax); }
551 
554 
556  inline bool getBoundaryBoxEmpty() { return (m_boundaryBoxEmpty); }
557 
559  virtual void computeBoundaryBox(const bool a_includeChildren = true);
560 
561 
562  //-----------------------------------------------------------------------
563  // PUBLIC METHODS - REFERENCE FRAME REPRESENTATION:
564  //-----------------------------------------------------------------------
565 
566 public:
567 
569  virtual void setShowFrame(const bool a_showFrame, const bool a_affectChildren = false);
570 
572  inline bool getShowFrame(void) const { return (m_showFrame); }
573 
575  virtual void setFrameSize(const double a_size = 1.0, const bool a_affectChildren = false);
576 
578  inline double getFrameSize() const { return (m_frameSize); }
579 
580 
581  //-----------------------------------------------------------------------
582  // PUBLIC METHODS - COLLISION DETECTION:
583  //-----------------------------------------------------------------------
584 
585 public:
586 
588  void setCollisionDetector(cGenericCollision* a_collisionDetector) { m_collisionDetector = a_collisionDetector; }
589 
592 
594  virtual void deleteCollisionDetector(const bool a_affectChildren = false);
595 
597  virtual bool computeCollisionDetection(const cVector3d& a_segmentPointA,
598  const cVector3d& a_segmentPointB,
599  cCollisionRecorder& a_recorder,
600  cCollisionSettings& a_settings);
601 
603  virtual void setShowCollisionDetector(const bool a_showCollisionDetector, const bool a_affectChildren = false);
604 
607 
609  virtual void setCollisionDetectorProperties(unsigned int a_displayDepth,
610  cColorf& a_color,
611  const bool a_affectChildren = false);
612 
613 
614  //-----------------------------------------------------------------------
615  // PUBLIC METHODS - SCENE GRAPH:
616  //-----------------------------------------------------------------------
617 
618 public:
619 
621  inline void setParent(cGenericObject* a_parent) { m_parent = a_parent; }
622 
624  inline cGenericObject* getParent() const { return (m_parent); }
625 
627  inline void setOwner(cGenericObject* a_owner) { m_owner = a_owner; }
628 
630  inline cGenericObject* getOwner() { return (m_owner); }
631 
633  inline cGenericObject* getChild(const unsigned int a_index) const { return (m_children[a_index]); }
634 
636  bool addChild(cGenericObject* a_object);
637 
639  bool removeChild(cGenericObject* a_object);
640 
642  bool removeFromGraph();
643 
645  bool deleteChild(cGenericObject *a_object);
646 
648  void clearAllChildren();
649 
651  void deleteAllChildren();
652 
654  inline unsigned int getNumChildren() { return ((unsigned int)m_children.size()); }
655 
657  inline unsigned int getNumDescendants(bool a_includeCurrentObject = false);
658 
659 
660  //-----------------------------------------------------------------------
661  // PUBLIC METHODS - GHOSTING:
662  //-----------------------------------------------------------------------
663 
664 public:
665 
667  void setGhostEnabled(bool a_ghostEnabled) { m_ghostEnabled = a_ghostEnabled; }
668 
670  bool getGhostEnabled() { return (m_ghostEnabled); }
671 
672 
673  //-----------------------------------------------------------------------
674  // PUBLIC METHODS - GEOMETRY:
675  //-----------------------------------------------------------------------
676 
677 public:
678 
680  virtual void scale(const double& a_scaleFactor, const bool a_affectChildren = true);
681 
682 
683  //-----------------------------------------------------------------------
684  // PUBLIC MEMBERS - PROPERTIES:
685  //-----------------------------------------------------------------------
686 
687 public:
688 
690  std::string m_name;
691 
694 
697 
700 
701 
702  //-----------------------------------------------------------------------
703  // PUBLIC MEMBERS - CUSTOM USER DATA:
704  //-----------------------------------------------------------------------
705 
706 public:
707 
710 
712  void* m_userData;
713 
715  std::string m_userName;
716 
719 
720 
721  //-----------------------------------------------------------------------
722  // PROTECTED MEMBERS - SCENEGRAPH:
723  //-----------------------------------------------------------------------
724 
725 protected:
726 
729 
736 
738  std::vector<cGenericObject*> m_children;
739 
740 
741  //-----------------------------------------------------------------------
742  // PROTECTED MEMBERS - POSITION & ORIENTATION:
743  //-----------------------------------------------------------------------
744 
745 protected:
746 
749 
752 
755 
758 
761 
764 
765 
766  //-----------------------------------------------------------------------
767  // PROTECTED MEMBERS - BOUNDARY BOX
768  //-----------------------------------------------------------------------
769 
770 protected:
771 
774 
777 
780 
781 
782  //-----------------------------------------------------------------------
783  // PROTECTED MEMBERS - FRAME REPRESENTATION [X,Y,Z]:
784  //-----------------------------------------------------------------------
785 
786 protected:
787 
789  double m_frameSize;
790 
793 
794 
795  //-----------------------------------------------------------------------
796  // PROTECTED MEMBERS - GENERAL OPTIONS:
797  //-----------------------------------------------------------------------
798 
799 protected:
800 
802  bool m_enabled;
803 
806 
809 
812 
815 
818 
821 
824 
827 
830 
833 
836 
839 
847 
859 
862 
864  cShaderProgramPtr m_shaderProgram;
865 
868 
869 
870  //-----------------------------------------------------------------------
871  // PROTECTED MEMBERS - COLLISION DETECTION:
872  //-----------------------------------------------------------------------
873 
874 protected:
875 
878 
879 
880  //-----------------------------------------------------------------------
881  // PROTECTED MEMBERS - HAPTIC EFFECTS AND INTERACTIONS:
882  //-----------------------------------------------------------------------
883 
884 protected:
885 
887  std::vector<cGenericEffect*> m_effects;
888 
889 
890  //-----------------------------------------------------------------------
891  // PROTECTED VIRTUAL METHODS:
892  //-----------------------------------------------------------------------
893 
894 protected:
895 
897  virtual void render(cRenderOptions& a_options);
898 
900  virtual void updateGlobalPositions(const bool a_frameOnly) {};
901 
903  virtual void updateBoundaryBox() {};
904 
906  virtual void scaleObject(const double& a_scaleFactor) { m_boundaryBoxMin.mul(a_scaleFactor); m_boundaryBoxMax.mul(a_scaleFactor);}
907 
909  virtual void computeLocalInteraction(const cVector3d& a_toolPos,
910  const cVector3d& a_toolVel,
911  const unsigned int a_IDN);
912 
914  virtual cVector3d computeOtherInteractions(const cVector3d& a_toolPos,
915  const cVector3d& a_toolVel,
916  const unsigned int a_IDN,
917  cInteractionRecorder& a_interactions) { return cVector3d(0,0,0); }
918 
920  virtual bool computeOtherCollisionDetection(cVector3d& a_segmentPointA,
921  cVector3d& a_segmentPointB,
922  cCollisionRecorder& a_recorder,
923  cCollisionSettings& a_settings) {return(false);}
924 
925 
926  //-----------------------------------------------------------------------
927  // PROTECTED METHODS:
928  //-----------------------------------------------------------------------
929 
930 protected:
931 
934  const bool a_duplicateMaterialData,
935  const bool a_duplicateTextureData,
936  const bool a_duplicateMeshData,
937  const bool a_buildCollisionDetector);
938 
939 
940  //-----------------------------------------------------------------------
941  // PUBLIC MEMBERS - INTERACTIONS:
942  //-----------------------------------------------------------------------
943 
944 public:
945 
948 
951 
954 
955 
956  //-----------------------------------------------------------------------
957  // PUBLIC MEMBERS - GENERAL
958  //-----------------------------------------------------------------------
959 
960 public:
961 
963  virtual void renderSceneGraph(cRenderOptions& a_options);
964 
966  virtual void adjustCollisionSegment(cVector3d& a_segmentPointA, cVector3d& a_segmentPointAadjusted);
967 
969  virtual cVector3d computeInteractions(const cVector3d& a_toolPos,
970  const cVector3d& a_toolVel,
971  const unsigned int a_IDN,
972  cInteractionRecorder& a_interactions);
973 };
974 
975 //------------------------------------------------------------------------------
976 } // namespace chai3d
977 //------------------------------------------------------------------------------
978 
979 //------------------------------------------------------------------------------
980 #endif
981 //------------------------------------------------------------------------------
982 
This class implements a 3D vector.
Definition: CVector3d.h:85
bool createEffectStickSlip()
This method creates a stick-and-slip haptic effect.
Definition: CGenericObject.cpp:553
This structures provide a containers for storing rendering options that are passed through the sceneg...
Definition: CRenderOptions.h:82
virtual void setUseVertexColors(const bool a_useColors, const bool a_affectChildren=false)
This method enables or disables the use of per-vertex colors, optionally propagating the operation to...
Definition: CGenericObject.cpp:1023
void clearAllChildren()
This method clears all objects from its list of children, without deleting them.
Definition: CGenericObject.cpp:1906
cVector3d getGlobalPos() const
This method returns the global position of this object.
Definition: CGenericObject.h:187
void deleteAllChildren()
This method clears and delete all objects from its list of children.
Definition: CGenericObject.cpp:1925
cTransform getLocalTransform()
This method returns the local position and rotation matrix in a transformation matrix.
Definition: CGenericObject.h:219
virtual void setShowCollisionDetector(const bool a_showCollisionDetector, const bool a_affectChildren=false)
This method enables or disables the display of the collision detector, optionally propagating the cha...
Definition: CGenericObject.cpp:1715
bool getHapticEnabled() const
This method returns the haptic status of object (true means it can be felt when visible).
Definition: CGenericObject.h:389
cVector3d m_interactionNormal
Surface normal at the current interaction point.
Definition: CGenericObject.h:950
Implements general math utility functions.
bool createEffectVibration()
This method creates a vibration haptic effect.
Definition: CGenericObject.cpp:659
cVector3d getBoundaryCenter() const
This method computes and returns the center of this object's boundary box.
Definition: CGenericObject.h:553
bool getShowEnabled() const
This method returns the display status of object (true means it's visible).
Definition: CGenericObject.h:410
void rotateIntrinsicEulerAnglesDeg(const double &a_angleDeg1, const double &a_angleDeg2, const double &a_angleDeg3, const cEulerOrder a_eulerOrder)
This method rotates this object using co-moving Euler representation. Angles are defined in radians...
Definition: CGenericObject.h:309
This class implements a 3D multi-mesh object.
Definition: CMultiMesh.h:80
cVector3d getBoundaryMin() const
This method returns the minimum point of this object's boundary box.
Definition: CGenericObject.h:547
virtual void setUseDisplayList(const bool a_useDisplayList, const bool a_affectChildren=false)
This method enabled or disables the use of a display list for rendering, optionally propagating the o...
Definition: CGenericObject.cpp:1108
bool removeChild(cGenericObject *a_object)
This method removes an object from the list of children, without deleting it.
Definition: CGenericObject.cpp:1824
virtual void setFriction(double a_staticFriction, double a_dynamicFriction, const bool a_affectChildren=true)
This method sets the static and dynamic friction properties (polygonal models only), optionally recursively affecting children.
Definition: CGenericObject.cpp:822
virtual cVector3d computeOtherInteractions(const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN, cInteractionRecorder &a_interactions)
This method computes any additional interactions between the object and the tools.
Definition: CGenericObject.h:914
bool deleteEffectMagnetic()
This method deletes any current magnetic haptic effect.
Definition: CGenericObject.cpp:529
This class provides support for OpenGL display lists.
Definition: CDisplayList.h:76
void setLocalPos(const double a_x=0.0, const double a_y=0.0, const double a_z=0.0)
This method sets the local position of this object.
Definition: CGenericObject.h:176
void rotateAboutLocalAxisRad(const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleRad)
This method rotates this object around a local axis. Angle magnitude is defined in radians...
Definition: CGenericObject.h:243
double getFrameSize() const
This method returns the size of the graphical reference frame.
Definition: CGenericObject.h:578
Implements a normal map.
void deleteAllEffects()
This method removes all haptic effects.
Definition: CGenericObject.cpp:482
virtual void setFrameSize(const double a_size=1.0, const bool a_affectChildren=false)
This method sets the size of the rendered reference frame, optionally propagating the change to its c...
Definition: CGenericObject.cpp:1523
bool m_enabled
If true, the object may be rendered graphically and haptically.
Definition: CGenericObject.h:802
cVector3d m_localPos
The position of this object in my parent's reference frame.
Definition: CGenericObject.h:748
virtual cVector3d computeInteractions(const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN, cInteractionRecorder &a_interactions)
This method computes all haptic interaction between a tool and this object using the haptic effects...
Definition: CGenericObject.cpp:2414
cMatrix3d m_localRot
The rotation matrix that rotates my reference frame into my parent's reference frame.
Definition: CGenericObject.h:754
virtual void computeLocalInteraction(const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN)
This method updates the geometric relationship between the tool and the current object.
Definition: CGenericObject.cpp:2050
cGenericCollision * getCollisionDetector() const
This method returns a pointer to this object's current collision detector.
Definition: CGenericObject.h:591
cGenericObject * getOwner()
This method returns the owner of this object.
Definition: CGenericObject.h:630
virtual void markForUpdate(const bool a_affectChildren=false)
This method invalidates any existing display lists, optionally propagating the operation to its child...
Definition: CGenericObject.cpp:1135
Implements basic structures for handling interaction events.
bool m_showBoundaryBox
If true, this object's boundary box is displayed as a set of lines.
Definition: CGenericObject.h:817
This class implements a base class for collision detection.
Definition: CGenericCollision.h:101
void setParent(cGenericObject *a_parent)
This method sets the parent of this object.
Definition: CGenericObject.h:621
bool m_useMaterialProperty
Should material properties be used?
Definition: CGenericObject.h:826
virtual void setUseCulling(const bool a_useCulling, const bool a_affectChildren=false)
This method enables or disables face-culling, optionally propagating the operation to my children...
Definition: CGenericObject.cpp:996
bool getWireMode() const
This method returns whether wireframe rendering is enabled.
Definition: CGenericObject.h:416
cVector3d getLocalPos() const
This method returns the translational component of this matrix.
Definition: CTransform.h:485
cGenericObject()
Constructor of cGenericObject.
Definition: CGenericObject.cpp:77
std::shared_ptr< cTexture1d > cTexture1dPtr
Definition: CTexture1d.h:67
bool deleteEffectVibration()
This method deletes any current vibration haptic effect.
Definition: CGenericObject.cpp:688
void setOwner(cGenericObject *a_owner)
This method sets a link to an object that owns this object. This could be a super parent for instance...
Definition: CGenericObject.h:627
virtual void setTexture(cTexture1dPtr a_texture, const bool a_affectChildren=false)
This method sets a texture to this object, optionally propagating the operation to its children...
Definition: CGenericObject.cpp:1289
bool m_cullingEnabled
Definition: CGenericObject.h:858
std::shared_ptr< cMaterial > cMaterialPtr
Definition: CMaterial.h:67
bool m_useVertexColors
Should per-vertex colors be used?
Definition: CGenericObject.h:829
double cDegToRad(const double &a_angleDeg)
This function converts an angle from degrees to radians.
Definition: CMaths.h:631
bool createEffectViscosity()
This method creates a viscous haptic effect.
Definition: CGenericObject.cpp:712
bool deleteChild(cGenericObject *a_object)
This method removes an object from its list of children and deletes it.
Definition: CGenericObject.cpp:1881
bool m_showEnabled
If true, this object is rendered.
Definition: CGenericObject.h:805
This class implements an abstract type.
Definition: CGenericType.h:73
bool m_showCollisionDetector
If true, the collision detector is displayed (if available) at this node.
Definition: CGenericObject.h:820
virtual void setWireMode(const bool a_showWireMode, const bool a_affectChildren=false)
This method enables or disables wireframe rendering, optionally propagating the operation to my child...
Definition: CGenericObject.cpp:961
bool removeFromGraph()
This method removes this object from its parent's list of children.
Definition: CGenericObject.cpp:1857
cMatrix3d m_globalRot
The rotation matrix that rotates my reference frame into the world's reference frame.
Definition: CGenericObject.h:757
virtual void setCollisionDetectorProperties(unsigned int a_displayDepth, cColorf &a_color, const bool a_affectChildren=false)
This method sets the collision detector graphic display properties.
Definition: CGenericObject.cpp:1746
void * m_userData
An arbitrary data pointer, not used by CHAI3D.
Definition: CGenericObject.h:712
Implementation of class that supports OpenGL display lists.
virtual void updateGlobalPositions(const bool a_frameOnly)
This method update the global position information about this object.
Definition: CGenericObject.h:900
void rotateAboutGlobalAxisRad(const cVector3d &a_axis, const double a_angleRad)
This method rotates this object around a global axis. Angle magnitude is defined in radians...
Definition: CGenericObject.cpp:283
This class implements a base class for all 2D or 3D objects in CHAI3D.
Definition: CGenericObject.h:112
cGenericObject * getParent() const
This method returns the parent of this object.
Definition: CGenericObject.h:624
virtual void deleteCollisionDetector(const bool a_affectChildren=false)
This method deletes any existing collision detector.
Definition: CGenericObject.cpp:1554
bool m_ghostEnabled
If true, object is enabled as ghost.
Definition: CGenericObject.h:811
cMatrix3d getGlobalRot() const
This method returns the global rotation matrix of this object.
Definition: CGenericObject.h:209
This class implements a base class for haptic effects.
Definition: CGenericEffect.h:117
This class implements a 3D matrix.
Definition: CMatrix3d.h:97
virtual void setLocalRot(const cMatrix3d &a_localRot)
This method sets the local rotation matrix for this object.
Definition: CGenericObject.h:190
cGenericObject * m_userExternalObject
A link to an external cGenericObject object, not used by CHAI3D.
Definition: CGenericObject.h:718
bool m_interactionInside
Was the last tool (haptic point) located inside the object?
Definition: CGenericObject.h:953
This class implements a collision detection recorder that stores all collision events that are report...
Definition: CCollisionBasics.h:185
This class implements a 4D transformation matrix encoded as column-major.
Definition: CTransform.h:75
cDisplayList m_displayList
Basic display list for current object.
Definition: CGenericObject.h:835
cMatrix3d getLocalRot() const
This method returns the local rotation matrix of this object.
Definition: CGenericObject.h:206
bool removeEffect(cGenericEffect *a_effect)
This method removes a haptic effect from this object.
Definition: CGenericObject.cpp:458
virtual void scale(const double &a_scaleFactor, const bool a_affectChildren=true)
This method scales the size of this object.
Definition: CGenericObject.cpp:1974
cVector3d getLocalPos() const
This method returns the local position of this object.
Definition: CGenericObject.h:184
virtual void scaleObject(const double &a_scaleFactor)
This method scales the size of this object with given scale factor.
Definition: CGenericObject.h:906
cShaderProgramPtr m_shaderProgram
Shader program.
Definition: CGenericObject.h:864
cVector3d m_boundaryBoxMax
Maximum position of boundary box.
Definition: CGenericObject.h:776
This structure stores the collision settings that are passed to a collision detector when querying fo...
Definition: CCollisionBasics.h:242
bool createEffectSurface()
This method creates a surface haptic effect.
Definition: CGenericObject.cpp:605
This class models material properties.
Definition: CMaterial.h:100
void rotateAboutLocalAxisDeg(const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleDeg)
This method rotates this object around a local axis. Angle magnitude is defined in degrees...
Definition: CGenericObject.h:252
std::string m_userName
Name of current object, not used by CHAI3D.
Definition: CGenericObject.h:715
void setGhostEnabled(bool a_ghostEnabled)
This method enables or disables this object to be a ghost node.
Definition: CGenericObject.h:667
Implements a structure to store rendering options.
Implements a base class for haptic effects.
cVector3d m_prevGlobalPos
Previous position since last haptic computation.
Definition: CGenericObject.h:760
void rotateAboutGlobalAxisRad(const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleRad)
This method rotate this object around a local axis. Angle magnitude is defined in radians...
Definition: CGenericObject.h:270
virtual void setShowBoundaryBox(const bool a_showBoundaryBox, const bool a_affectChildren=false)
This method enables or disabled the graphic display of the boundary box for this object, optionally propagating the change to its children.
Definition: CGenericObject.cpp:1346
cVector3d getBoundaryMax() const
This method returns the maximum point of this object's boundary box.
Definition: CGenericObject.h:550
bool m_useDisplayList
Should we use a display list to render this mesh?
Definition: CGenericObject.h:832
cVector3d m_boundaryBoxMin
Minimum position of boundary box.
Definition: CGenericObject.h:773
std::vector< cGenericObject * > m_children
List of children.
Definition: CGenericObject.h:738
virtual void setShowEnabled(const bool a_show, const bool a_affectChildren=true)
This method enables or disables the graphic display of this object, optionally propagating the change...
Definition: CGenericObject.cpp:850
virtual void setLocalPos(const cVector3d &a_localPos)
This method sets the local position of this object.
Definition: CGenericObject.h:162
bool addChild(cGenericObject *a_object)
This method add an object to the list of children.
Definition: CGenericObject.cpp:1781
cMaterialPtr m_material
Material property.
Definition: CGenericObject.h:693
Implements a transformation matrix.
cTransform getGlobalTransform()
This method returns the global position and rotation matrix in a transformation matrix.
Definition: CGenericObject.h:222
bool getUseMaterial() const
This method returns true is material properties are enabled, false otherwise.
Definition: CGenericObject.h:480
Implements OpenGL drawing macros.
virtual void setShaderProgram(cShaderProgramPtr a_shaderProgram, const bool a_affectChildren=false)
This method assigns a shader program to this object, optionally propagating the operation to its chil...
Definition: CGenericObject.cpp:1317
cMatrix3d cIdentity3d(void)
This function return a 3x3 identity matrix.
Definition: CMaths.h:1043
std::string m_name
Name of current object (filename).
Definition: CGenericObject.h:690
virtual cShaderProgramPtr getShaderProgram()
This method returns a pointer to the current shader program.
Definition: CGenericObject.h:521
bool getGhostEnabled()
This method returns truee if this object is a ghost node.
Definition: CGenericObject.h:670
bool getShowCollisionDetector()
This method returns true if the collision detector is being displayed graphically, false otherwise.
Definition: CGenericObject.h:606
int m_userTag
An arbitrary tag, not used by CHAI3D.
Definition: CGenericObject.h:709
virtual void computeBoundaryBox(const bool a_includeChildren=true)
This method computes this object's boundary box, optionally forcing it to bound child objects...
Definition: CGenericObject.cpp:1377
virtual void computeGlobalPositions(const bool a_frameOnly=true, const cVector3d &a_globalPos=cVector3d(0.0, 0.0, 0.0), const cMatrix3d &a_globalRot=cIdentity3d())
This method computes the global position and rotation of this object and its children.
Definition: CGenericObject.cpp:355
cEulerOrder
Definition: CMatrix3d.h:57
bool getShowBoundaryBox() const
This method returns true if the boundary box is being displayed, false otherwise. ...
Definition: CGenericObject.h:544
virtual void render(cRenderOptions &a_options)
This method renders this object graphically using OpenGL.
Definition: CGenericObject.cpp:2034
std::shared_ptr< cNormalMap > cNormalMapPtr
Definition: CNormalMap.h:65
Implements a general abstract type.
bool m_boundaryBoxEmpty
If true, then the boundary box does not include any object.
Definition: CGenericObject.h:779
bool m_useTextureMapping
Should texture mapping be used?
Definition: CGenericObject.h:823
void copyGenericObjectProperties(cGenericObject *a_objDest, const bool a_duplicateMaterialData, const bool a_duplicateTextureData, const bool a_duplicateMeshData, const bool a_buildCollisionDetector)
This method copies all properties of the current generic object to another.
Definition: CGenericObject.cpp:2083
void computeGlobalPositionsFromRoot(const bool a_frameOnly=true)
This method computes the global position and rotation of current object only.
Definition: CGenericObject.cpp:395
void setCollisionDetector(cGenericCollision *a_collisionDetector)
This method sets a collision detector to this current object.
Definition: CGenericObject.h:588
void rotateExtrinsicEulerAnglesRad(const double &a_angleRad1, const double &a_angleRad2, const double &a_angleRad3, const cEulerOrder a_eulerOrder)
This method rotates this object using fixed Euler representation. Angles are defined in radians...
Definition: CGenericObject.cpp:302
Implements basic data structures for storing collision events.
This class defines a color using a GLfloat representation for each component.
Definition: CColor.h:138
Implements color properties.
bool m_showFrame
If true, this object's reference frame is rendered as a set of arrows.
Definition: CGenericObject.h:814
cGenericCollision * m_collisionDetector
The collision detector used to test for contact with this object.
Definition: CGenericObject.h:877
virtual cGenericObject * copy(const bool a_duplicateMaterialData=false, const bool a_duplicateTextureData=false, const bool a_duplicateMeshData=false, const bool a_buildCollisionDetector=true)
This method creates a copy of itself.
Definition: CGenericObject.h:149
bool createEffectMagnetic()
This method creates a magnetic haptic effect.
Definition: CGenericObject.cpp:500
bool getUseTransparency() const
This method returns true if transparency is enabled, false otherwise.
Definition: CGenericObject.h:433
virtual void setMaterial(cMaterialPtr a_material, const bool a_affectChildren=false)
This method sets the material properties of this object, optionally propagating the operation to its ...
Definition: CGenericObject.cpp:1192
void translate(const cVector3d &a_translation)
This method translates this object by a specified offset.
Definition: CGenericObject.cpp:233
void rotateAboutGlobalAxisDeg(const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleDeg)
This method rotates this object around a local axis. Angle magnitude is defined in degrees...
Definition: CGenericObject.h:279
cNormalMapPtr m_normalMap
Normal map property.
Definition: CGenericObject.h:699
This class stores a list of interaction events.
Definition: CInteractionBasics.h:133
std::shared_ptr< cShaderProgram > cShaderProgramPtr
Definition: CShaderProgram.h:70
void rotateAboutGlobalAxisDeg(const cVector3d &a_axis, const double a_angleDeg)
This method rotates this object around a global axis. Angle magnitude is defined in degrees...
Definition: CGenericObject.h:264
void rotateExtrinsicEulerAnglesDeg(const double &a_angleDeg1, const double &a_angleDeg2, const double &a_angleDeg3, const cEulerOrder a_eulerOrder)
This method rotates this object using fixed Euler representation. Angles are defined in radians...
Definition: CGenericObject.h:294
bool deleteEffectViscosity()
This method deletes any current viscous haptic effect.
Definition: CGenericObject.cpp:741
cMatrix3d getLocalRot() const
This method returns the rotation component of this matrix.
Definition: CTransform.h:502
std::vector< cGenericEffect * > m_effects
List of haptic effects programmed for this object.
Definition: CGenericObject.h:887
virtual void setUseMaterial(const bool a_useMaterial, const bool a_affectChildren=false)
This method enables or disables the use of material properties, optionally propagating the operation ...
Definition: CGenericObject.cpp:1160
virtual bool computeCollisionDetection(const cVector3d &a_segmentPointA, const cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
This method computes any collision between a segment and this object.
Definition: CGenericObject.cpp:1594
bool deleteEffectStickSlip()
This method delete any current stick-and-slip haptic effect.
Definition: CGenericObject.cpp:581
Implements material properties.
virtual void setEnabled(bool a_enabled, const bool a_affectChildren=false)
This method enables or disable this object. When an object is disabled, both haptic and graphic rende...
Definition: CGenericObject.cpp:210
static cMaterialPtr s_defaultMaterial
Default material property.
Definition: CGenericObject.h:861
virtual void renderSceneGraph(cRenderOptions &a_options)
This method renders the entire scene graph, starting from this object.
Definition: CGenericObject.cpp:2139
virtual void backupMaterialColors(const bool a_affectChildren=false)
This method creates a backup of the material colors of this object, optionally propagating the operat...
Definition: CGenericObject.cpp:1048
unsigned int getNumChildren()
This method returns the number of children from its list of children.
Definition: CGenericObject.h:654
virtual ~cGenericObject()
Destructor of cGenericObject.
Definition: CGenericObject.cpp:182
virtual void setHapticEnabled(const bool a_hapticEnabled, const bool a_affectChildren=true)
This method enables or disables haptic perception of this object, optionally propagating the change t...
Definition: CGenericObject.cpp:769
cVector3d m_globalPos
The position of this object in the world's reference frame.
Definition: CGenericObject.h:751
void mul(const double &a_scalar)
This method computes the multiplication of this vector with a scalar.
Definition: CVector3d.h:674
Definition: CAudioBuffer.cpp:56
cGenericObject * m_parent
Parent object.
Definition: CGenericObject.h:728
cTransform m_frameGL
OpenGL matrix describing my position and orientation transformation.
Definition: CGenericObject.h:867
bool getEnabled() const
This method returns true if the object is enabled, false otherwise.
Definition: CGenericObject.h:139
void setLocalTransform(const cTransform &a_transform)
This method returns the local position and rotation matrix by passing a transformation matrix...
Definition: CGenericObject.h:212
void copyfrom(const cMatrix3d &a_source)
This method copies all elements from another matrix to this one.
Definition: CMatrix3d.h:675
virtual void updateBoundaryBox()
This method updates the boundary box of this object.
Definition: CGenericObject.h:903
virtual void restoreMaterialColors(const bool a_affectChildren=false)
This method restores the material color properties of this object from a previous backup...
Definition: CGenericObject.cpp:1076
void rotateAboutLocalAxisDeg(const cVector3d &a_axis, const double a_angleDeg)
This method rotates this object around a local axis. Angle magnitude is defined in degrees...
Definition: CGenericObject.h:236
cGenericObject * getChild(const unsigned int a_index) const
This method returns a selected child from the list of children.
Definition: CGenericObject.h:633
void rotateIntrinsicEulerAnglesRad(const double &a_angleRad1, const double &a_angleRad2, const double &a_angleRad3, const cEulerOrder a_eulerOrder)
This method rotates this object using co-moving Euler representation. Angles are defined in radians...
Definition: CGenericObject.cpp:327
bool m_useTransparency
Definition: CGenericObject.h:846
virtual bool computeOtherCollisionDetection(cVector3d &a_segmentPointA, cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings)
This method computes any additional collisions other than the ones computed by the default collision ...
Definition: CGenericObject.h:920
void rotateAboutLocalAxisRad(const cVector3d &a_axis, const double a_angleRad)
This method rotates this object around a local axis. Angle magnitude is defined in radians...
Definition: CGenericObject.cpp:266
virtual void adjustCollisionSegment(cVector3d &a_segmentPointA, cVector3d &a_segmentPointAadjusted)
This method adjusts the collision segment to handle objects in motion.
Definition: CGenericObject.cpp:2388
bool deleteEffectSurface()
This method deletes any current surface haptic effect.
Definition: CGenericObject.cpp:635
virtual void setShowFrame(const bool a_showFrame, const bool a_affectChildren=false)
This method enables or disables the graphic display of the reference frame arrows for this object...
Definition: CGenericObject.cpp:1493
bool getBoundaryBoxEmpty()
This method returns true, if the boundary box is empty, otherwise false.
Definition: CGenericObject.h:556
bool getUseDisplayList() const
This method returns true if a display list is activated, false otherwise.
Definition: CGenericObject.h:451
double m_frameThicknessScale
Pen thickness of graphical representation of frame (X-Y-Z).
Definition: CGenericObject.h:792
bool m_hapticEnabled
If true, this object can be felt.
Definition: CGenericObject.h:808
double m_frameSize
Size of graphical representation of frame (X-Y-Z).
Definition: CGenericObject.h:789
static cColorf s_boundaryBoxColor
Color of the boundary box.
Definition: CGenericObject.h:531
virtual void setStiffness(const double a_stiffness, const bool a_affectChildren=true)
This method sets the haptic stiffness of the object, optionally recursively affecting children...
Definition: CGenericObject.cpp:795
bool addEffect(cGenericEffect *a_effect)
This method adds a haptic effect to this object.
Definition: CGenericObject.cpp:433
cVector3d m_interactionPoint
Projection of the most recent haptic point (tool) onto the surface of the virtual object...
Definition: CGenericObject.h:947
bool getUseTexture() const
This method returns true if texture-mapping is enabled, false otherwise.
Definition: CGenericObject.h:505
virtual void setUseTexture(const bool a_useTexture, const bool a_affectChildren=false)
This method enables or disables the use of texture-mapping, optionally propagating the operation to i...
Definition: CGenericObject.cpp:1259
bool getUseVertexColors() const
This method returns true is per-vertex color properties are enabled, false otherwise.
Definition: CGenericObject.h:467
bool getUseCulling() const
This method returns true if face-culling is enabled, false otherwise.
Definition: CGenericObject.h:422
cMatrix3d m_prevGlobalRot
Previous rotation since last haptic computation.
Definition: CGenericObject.h:763
cGenericObject * m_owner
Definition: CGenericObject.h:735
virtual void setTransparencyLevel(const float a_level, const bool a_applyToTextures=false, const bool a_affectChildren=false)
This method sets the transparency level of the object.
Definition: CGenericObject.cpp:907
virtual void setUseTransparency(const bool a_useTransparency, const bool a_affectChildren=false)
This method enables or disables transparency.
Definition: CGenericObject.cpp:877
cTexture1dPtr m_texture
Texture property.
Definition: CGenericObject.h:696
bool getShowFrame(void) const
This method returns true if the display of the reference frame is enabled, false otherwise.
Definition: CGenericObject.h:572
int m_triangleMode
The polygon rendering mode (GL_FILL or GL_LINE).
Definition: CGenericObject.h:838
unsigned int getNumDescendants(bool a_includeCurrentObject=false)
This method returns the total number of descendants, optionally including this object.
Definition: CGenericObject.cpp:1951

CHAI3D 3.0.0 documentation
Please address any questions to support@chai3d.org
(C) 2003-2015 - CHAI3D
All Rights Reserved.