46 #ifndef CGenericObjectH 47 #define CGenericObjectH 71 class cGenericCollision;
72 class cGenericForceAlgorithm;
75 class cInteractionRecorder;
136 virtual void setEnabled(
bool a_enabled,
const bool a_affectChildren =
false);
150 const bool a_duplicateTextureData =
false,
151 const bool a_duplicateMeshData =
false,
152 const bool a_buildCollisionDetector =
true) {
return (NULL); }
168 void setLocalPos(
const Eigen::Vector3d& a_localPos)
177 const double a_y = 0.0,
178 const double a_z = 0.0)
196 inline void setLocalRot(
const Eigen::Matrix3d a_localRot)
230 const double a_z = 0.0);
237 const double a_angleDeg)
244 const double a_axisY,
245 const double a_axisZ,
246 const double a_angleRad)
253 const double a_axisY,
254 const double a_axisZ,
255 const double a_angleDeg)
271 const double a_axisY,
272 const double a_axisZ,
273 const double a_angleRad)
280 const double a_axisY,
281 const double a_axisZ,
282 const double a_angleDeg)
289 const double& a_angleRad2,
290 const double& a_angleRad3,
295 const double& a_angleDeg2,
296 const double& a_angleDeg3,
304 const double& a_angleRad2,
305 const double& a_angleRad3,
310 const double& a_angleDeg2,
311 const double& a_angleDeg3,
386 virtual void setHapticEnabled(
const bool a_hapticEnabled,
const bool a_affectChildren =
true);
392 virtual void setStiffness(
const double a_stiffness,
const bool a_affectChildren =
true);
396 double a_dynamicFriction,
397 const bool a_affectChildren =
true);
407 virtual void setShowEnabled(
const bool a_show,
const bool a_affectChildren =
true);
413 virtual void setWireMode(
const bool a_showWireMode,
const bool a_affectChildren =
false);
419 virtual void setUseCulling(
const bool a_useCulling,
const bool a_affectChildren =
false);
430 virtual void setUseTransparency(
const bool a_useTransparency,
const bool a_affectChildren =
false);
437 const bool a_applyToVertices =
false,
438 const bool a_applyToTextures =
false,
439 const bool a_affectChildren =
false);
449 virtual void setUseDisplayList(
const bool a_useDisplayList,
const bool a_affectChildren =
false);
455 virtual void markForUpdate(
const bool a_affectChildren =
false);
465 virtual void setUseVertexColors(
const bool a_useColors,
const bool a_affectChildren =
false);
478 virtual void setUseMaterial(
const bool a_useMaterial,
const bool a_affectChildren =
false);
503 virtual void setUseTexture(
const bool a_useTexture,
const bool a_affectChildren =
false);
519 virtual void setShaderProgram(cShaderProgramPtr a_shaderProgram,
const bool a_affectChildren =
false);
542 virtual void setShowBoundaryBox(
const bool a_showBoundaryBox,
const bool a_affectChildren =
false);
570 virtual void setShowFrame(
const bool a_showFrame,
const bool a_affectChildren =
false);
576 virtual void setFrameSize(
const double a_size = 1.0,
const bool a_affectChildren =
false);
612 const bool a_affectChildren =
false);
681 virtual void scale(
const double& a_scaleFactor,
const bool a_affectChildren =
true);
907 virtual void scaleObject(
const double& a_scaleFactor) { m_boundaryBoxMin.
mul(a_scaleFactor); m_boundaryBoxMax.
mul(a_scaleFactor);}
912 const unsigned int a_IDN);
917 const unsigned int a_IDN,
935 const bool a_duplicateMaterialData,
936 const bool a_duplicateTextureData,
937 const bool a_duplicateMeshData,
938 const bool a_buildCollisionDetector);
972 const unsigned int a_IDN,
This class implements a 3D vector.
Definition: CVector3d.h:88
bool createEffectStickSlip()
This method creates a stick-and-slip haptic effect.
Definition: CGenericObject.cpp:556
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:1029
void clearAllChildren()
This method clears all objects from its list of children, without deleting them.
Definition: CGenericObject.cpp:1912
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:1931
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:1721
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:951
Implements general math utility functions.
bool createEffectVibration()
This method creates a vibration haptic effect.
Definition: CGenericObject.cpp:662
cVector3d getBoundaryCenter() const
This method computes and returns the center of this object's boundary box.
Definition: CGenericObject.h:554
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:548
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:1114
bool removeChild(cGenericObject *a_object)
This method removes an object from the list of children, without deleting it.
Definition: CGenericObject.cpp:1830
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:825
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:915
bool deleteEffectMagnetic()
This method deletes any current magnetic haptic effect.
Definition: CGenericObject.cpp:532
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:579
void deleteAllEffects()
This method removes all haptic effects.
Definition: CGenericObject.cpp:485
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:1529
bool m_enabled
If true, the object may be rendered graphically and haptically.
Definition: CGenericObject.h:803
cVector3d m_localPos
The position of this object in my parent's reference frame.
Definition: CGenericObject.h:749
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:2430
cMatrix3d m_localRot
The rotation matrix that rotates my reference frame into my parent's reference frame.
Definition: CGenericObject.h:755
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:2056
cGenericCollision * getCollisionDetector() const
This method returns a pointer to this object's current collision detector.
Definition: CGenericObject.h:592
cGenericObject * getOwner()
This method returns the owner of this object.
Definition: CGenericObject.h:631
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:1141
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:818
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:622
bool m_useMaterialProperty
Should material properties be used?
Definition: CGenericObject.h:827
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:1002
bool getWireMode() const
This method returns whether wireframe rendering is enabled.
Definition: CGenericObject.h:416
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:691
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:628
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:1295
bool m_cullingEnabled
Definition: CGenericObject.h:859
std::shared_ptr< cMaterial > cMaterialPtr
Definition: CMaterial.h:67
bool m_useVertexColors
Should per-vertex colors be used?
Definition: CGenericObject.h:830
double cDegToRad(const double &a_angleDeg)
This function converts an angle from degrees to radians.
Definition: CMaths.h:633
bool createEffectViscosity()
This method creates a viscous haptic effect.
Definition: CGenericObject.cpp:715
bool deleteChild(cGenericObject *a_object)
This method removes an object from its list of children and deletes it.
Definition: CGenericObject.cpp:1887
bool m_showEnabled
If true, this object is rendered.
Definition: CGenericObject.h:806
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:821
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:967
bool removeFromGraph()
This method removes this object from its parent's list of children.
Definition: CGenericObject.cpp:1863
cMatrix3d m_globalRot
The rotation matrix that rotates my reference frame into the world's reference frame.
Definition: CGenericObject.h:758
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:1752
void * m_userData
An arbitrary data pointer, not used by CHAI3D.
Definition: CGenericObject.h:713
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:901
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:286
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:625
virtual void deleteCollisionDetector(const bool a_affectChildren=false)
This method deletes any existing collision detector.
Definition: CGenericObject.cpp:1560
bool m_ghostEnabled
If true, object is enabled as ghost.
Definition: CGenericObject.h:812
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:719
bool m_interactionInside
Was the last tool (haptic point) located inside the object?
Definition: CGenericObject.h:954
This class implements a collision detection recorder that stores all collision events that are report...
Definition: CCollisionBasics.h:185
cDisplayList m_displayList
Basic display list for current object.
Definition: CGenericObject.h:836
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:461
virtual void scale(const double &a_scaleFactor, const bool a_affectChildren=true)
This method scales the size of this object.
Definition: CGenericObject.cpp:1980
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:907
cShaderProgramPtr m_shaderProgram
Shader program.
Definition: CGenericObject.h:865
cVector3d m_boundaryBoxMax
Maximum position of boundary box.
Definition: CGenericObject.h:777
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:608
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:716
void setGhostEnabled(bool a_ghostEnabled)
This method enables or disables this object to be a ghost node.
Definition: CGenericObject.h:668
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:761
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:1352
cVector3d getBoundaryMax() const
This method returns the maximum point of this object's boundary box.
Definition: CGenericObject.h:551
bool m_useDisplayList
Should we use a display list to render this mesh?
Definition: CGenericObject.h:833
cVector3d m_boundaryBoxMin
Minimum position of boundary box.
Definition: CGenericObject.h:774
std::vector< cGenericObject * > m_children
List of children.
Definition: CGenericObject.h:739
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:853
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:1787
cMaterialPtr m_material
Material property.
Definition: CGenericObject.h:694
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:481
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:1323
cMatrix3d cIdentity3d(void)
This function return a 3x3 identity matrix.
Definition: CMaths.h:1047
std::string m_name
Name of current object (filename).
Definition: CGenericObject.h:691
virtual cShaderProgramPtr getShaderProgram()
This method returns a pointer to the current shader program.
Definition: CGenericObject.h:522
bool getGhostEnabled()
This method returns truee if this object is a ghost node.
Definition: CGenericObject.h:671
bool getShowCollisionDetector()
This method returns true if the collision detector is being displayed graphically, false otherwise.
Definition: CGenericObject.h:607
int m_userTag
An arbitrary tag, not used by CHAI3D.
Definition: CGenericObject.h:710
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:1383
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:358
cEulerOrder
Definition: CMatrix3d.h:57
bool getShowBoundaryBox() const
This method returns true if the boundary box is being displayed, false otherwise. ...
Definition: CGenericObject.h:545
virtual void render(cRenderOptions &a_options)
This method renders this object graphically using OpenGL.
Definition: CGenericObject.cpp:2040
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:780
bool m_useTextureMapping
Should texture mapping be used?
Definition: CGenericObject.h:824
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:2089
void computeGlobalPositionsFromRoot(const bool a_frameOnly=true)
This method computes the global position and rotation of current object only.
Definition: CGenericObject.cpp:398
void setCollisionDetector(cGenericCollision *a_collisionDetector)
This method sets a collision detector to this current object.
Definition: CGenericObject.h:589
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:305
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:815
cGenericCollision * m_collisionDetector
The collision detector used to test for contact with this object.
Definition: CGenericObject.h:878
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:503
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:1198
void translate(const cVector3d &a_translation)
This method translates this object by a specified offset.
Definition: CGenericObject.cpp:236
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:700
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:744
std::vector< cGenericEffect * > m_effects
List of haptic effects programmed for this object.
Definition: CGenericObject.h:888
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:1166
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:1600
bool deleteEffectStickSlip()
This method delete any current stick-and-slip haptic effect.
Definition: CGenericObject.cpp:584
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:213
static cMaterialPtr s_defaultMaterial
Default material property.
Definition: CGenericObject.h:862
virtual void renderSceneGraph(cRenderOptions &a_options)
This method renders the entire scene graph, starting from this object.
Definition: CGenericObject.cpp:2145
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:1054
unsigned int getNumChildren()
This method returns the number of children from its list of children.
Definition: CGenericObject.h:655
virtual ~cGenericObject()
Destructor of cGenericObject.
Definition: CGenericObject.cpp:185
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:772
cVector3d m_globalPos
The position of this object in the world's reference frame.
Definition: CGenericObject.h:752
void mul(const double &a_scalar)
This method computes the multiplication of this vector with a scalar.
Definition: CVector3d.h:680
Definition: CAudioBuffer.cpp:56
cGenericObject * m_parent
Parent object.
Definition: CGenericObject.h:729
cTransform m_frameGL
OpenGL matrix describing my position and orientation transformation.
Definition: CGenericObject.h:868
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:904
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:1082
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:634
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:330
bool m_useTransparency
Definition: CGenericObject.h:847
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:921
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:269
virtual void adjustCollisionSegment(cVector3d &a_segmentPointA, cVector3d &a_segmentPointAadjusted)
This method adjusts the collision segment to handle objects in motion.
Definition: CGenericObject.cpp:2404
bool deleteEffectSurface()
This method deletes any current surface haptic effect.
Definition: CGenericObject.cpp:638
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:1499
bool getBoundaryBoxEmpty()
This method returns true, if the boundary box is empty, otherwise false.
Definition: CGenericObject.h:557
bool getUseDisplayList() const
This method returns true if a display list is activated, false otherwise.
Definition: CGenericObject.h:452
double m_frameThicknessScale
Pen thickness of graphical representation of frame (X-Y-Z).
Definition: CGenericObject.h:793
bool m_hapticEnabled
If true, this object can be felt.
Definition: CGenericObject.h:809
double m_frameSize
Size of graphical representation of frame (X-Y-Z).
Definition: CGenericObject.h:790
static cColorf s_boundaryBoxColor
Color of the boundary box.
Definition: CGenericObject.h:532
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:798
bool addEffect(cGenericEffect *a_effect)
This method adds a haptic effect to this object.
Definition: CGenericObject.cpp:436
cVector3d m_interactionPoint
Projection of the most recent haptic point (tool) onto the surface of the virtual object...
Definition: CGenericObject.h:948
bool getUseTexture() const
This method returns true if texture-mapping is enabled, false otherwise.
Definition: CGenericObject.h:506
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:1265
bool getUseVertexColors() const
This method returns true is per-vertex color properties are enabled, false otherwise.
Definition: CGenericObject.h:468
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:764
virtual void setTransparencyLevel(const float a_level, const bool a_applyToVertices=false, const bool a_applyToTextures=false, const bool a_affectChildren=false)
This method sets the transparency level of the object.
Definition: CGenericObject.cpp:911
cGenericObject * m_owner
Definition: CGenericObject.h:736
virtual void setUseTransparency(const bool a_useTransparency, const bool a_affectChildren=false)
This method enables or disables transparency.
Definition: CGenericObject.cpp:880
cTexture1dPtr m_texture
Texture property.
Definition: CGenericObject.h:697
bool getShowFrame(void) const
This method returns true if the display of the reference frame is enabled, false otherwise.
Definition: CGenericObject.h:573
int m_triangleMode
The polygon rendering mode (GL_FILL or GL_LINE).
Definition: CGenericObject.h:839
unsigned int getNumDescendants(bool a_includeCurrentObject=false)
This method returns the total number of descendants, optionally including this object.
Definition: CGenericObject.cpp:1957