#include <SoFrictionCone.h>
Public Member Functions | |
void | addToGraph (SoSeparator *root) |
virtual SoBaseKit * | copy (SbBool copyConnections) const |
virtual SbBool | setUpConnections (SbBool onOff, SbBool doItAlways) |
SoFrictionCone () | |
Static Public Member Functions | |
static void | initClass () |
static void | RemoveAllFrictionConesFromGraph (SoSeparator *root) |
Public Attributes | |
SoSFVec3f | color |
SoSFVec3f | contactNormal |
SoSFVec3f | contactPoint |
SoSFFloat | height |
SoSFFloat | radius |
SoSFFloat | scaling |
SoSFFloat | transparency |
Static Public Attributes | |
static std::string | FrictionConeSeparatorName = std::string("FrictionCones") |
Protected Attributes | |
SoFieldSensor | updateParametersSensor |
SoSFTrigger | updateParametersTrigger |
Private Member Functions | |
SO_KIT_CATALOG_ENTRY_HEADER (visualisation) | |
SO_KIT_CATALOG_ENTRY_HEADER (material) | |
SO_KIT_CATALOG_ENTRY_HEADER (transform) | |
SO_KIT_CATALOG_ENTRY_HEADER (offsetTransform) | |
SO_KIT_CATALOG_ENTRY_HEADER (resetTransform) | |
SO_KIT_HEADER (SoFrictionCone) | |
Static Private Member Functions | |
static SoSeparator * | GetFrictionConeSeparatorFromGraph (SoSeparator *root) |
static void | UpdateParametersCB (void *data, SoSensor *) |
Defines a class which represents friction cones by contactPoint, contactNormal, radius and height.
Set SoPhysics::measureContactForces to TRUE (in the code or in the .iv file) to enable the visualisation of friction cones for a body.
Definition at line 40 of file SoFrictionCone.h.
SoFrictionCone::SoFrictionCone | ( | ) |
The constructor of SoFrictionCone.
Definition at line 120 of file SoFrictionCone.cpp.
References color, contactNormal, contactPoint, height, radius, scaling, setUpConnections(), transparency, UpdateParametersCB(), updateParametersSensor, and updateParametersTrigger.
void SoFrictionCone::addToGraph | ( | SoSeparator * | root | ) |
Adds itself to the FrictionCone separator of the scenegraph supplied by root
.
root | Inventor scenegraph to add the friction cone visualisations to |
Definition at line 204 of file SoFrictionCone.cpp.
References GetFrictionConeSeparatorFromGraph().
SoBaseKit * SoFrictionCone::copy | ( | SbBool | copyConnections | ) | const [virtual] |
The overwritten copy() method
copyConnections | copy connections if true |
Definition at line 158 of file SoFrictionCone.cpp.
SoSeparator * SoFrictionCone::GetFrictionConeSeparatorFromGraph | ( | SoSeparator * | root | ) | [static, private] |
Returns the separator with the name SoFrictionCone::FrictionConeSeparatorName
which is situated below the separator specified by root
. If it is not existent it is created.
root | Inventor scenegraph in which the friction cone separator should be stored in |
Definition at line 233 of file SoFrictionCone.cpp.
References FrictionConeSeparatorName.
Referenced by addToGraph(), and RemoveAllFrictionConesFromGraph().
void SoFrictionCone::initClass | ( | ) | [static] |
Initialises the class and it's type id variables.
Definition at line 112 of file SoFrictionCone.cpp.
void SoFrictionCone::RemoveAllFrictionConesFromGraph | ( | SoSeparator * | root | ) | [static] |
Removes all friction cones from the root
scenegraph.
root | Inventor scenegraph to remove the friction cone visualisations from |
Definition at line 217 of file SoFrictionCone.cpp.
References GetFrictionConeSeparatorFromGraph().
Referenced by SoWorldPhysics::resetWorld(), and SoWorldPhysics::UpdateSingleWorldCB().
SbBool SoFrictionCone::setUpConnections | ( | SbBool | onOff, | |
SbBool | doItAlways | |||
) | [virtual] |
This method attaches/detaches SoFrictionCone::updateParametersTrigger to the SoFrictionCone::updateParametersSensor.
onOff | attach sensors if TRUE, detach sensors if FALSE | |
doItAlways | always perform attach/detach of sensors if this parameter is TRUE |
Definition at line 175 of file SoFrictionCone.cpp.
References UpdateParametersCB(), updateParametersSensor, and updateParametersTrigger.
Referenced by SoFrictionCone().
SoFrictionCone::SO_KIT_CATALOG_ENTRY_HEADER | ( | visualisation | ) | [private] |
SoFrictionCone::SO_KIT_CATALOG_ENTRY_HEADER | ( | material | ) | [private] |
SoFrictionCone::SO_KIT_CATALOG_ENTRY_HEADER | ( | transform | ) | [private] |
SoFrictionCone::SO_KIT_CATALOG_ENTRY_HEADER | ( | offsetTransform | ) | [private] |
SoFrictionCone::SO_KIT_CATALOG_ENTRY_HEADER | ( | resetTransform | ) | [private] |
SoFrictionCone::SO_KIT_HEADER | ( | SoFrictionCone | ) | [private] |
void SoFrictionCone::UpdateParametersCB | ( | void * | data, | |
SoSensor * | ||||
) | [static, private] |
The fieldsensor updated callback. It updates the parameters of the visualisation cone, the material properties like color and transparency as well as the transformations and the scaling. If the transparency is set smaller than 0 or greater than 1 it is reset to the appropriate upper or lower bound.
data | pointer to the current friction cone |
Definition at line 257 of file SoFrictionCone.cpp.
References color, contactNormal, contactPoint, height, radius, scaling, and transparency.
Referenced by setUpConnections(), and SoFrictionCone().
The visualisation color of the friction cone (default = {1.0f, 0.5f, 0.5f}).
Definition at line 67 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
The normal along which to aling the friction cone (default = {1.0f, 0.0f, 0.0f}).
Definition at line 69 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
The contact point at which the friction cone should start (default = {0.0f, 0.0f, 0.0f}).
Definition at line 68 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
std::string SoFrictionCone::FrictionConeSeparatorName = std::string("FrictionCones") [static] |
Name of the SoSeparator which is inserted into the inventor graph.
Definition at line 61 of file SoFrictionCone.h.
Referenced by GetFrictionConeSeparatorFromGraph().
The height of the friction cone (default = 1.0f).
Definition at line 63 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
The radius of the friction cone (default = 1.0f).
Definition at line 64 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
The amount the friction cone should be scaled up or down (default = 1.0f).
Definition at line 65 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
The amount of transparency used to display the friction cones (default = 0.0f). 0.0f is no transparancy.
Definition at line 66 of file SoFrictionCone.h.
Referenced by SoFrictionCone(), and UpdateParametersCB().
SoFrictionCone::updateParametersSensor [protected] |
This sensor monitors the SoFrictionCone::updateParametersTrigger member and calls SoFrictionCone::UpdateParametersCB() if it changes.
Definition at line 73 of file SoFrictionCone.h.
Referenced by setUpConnections(), and SoFrictionCone().
SoFrictionCone::updateParametersTrigger [protected] |
This field is connected to SoFrictionCone::updateParametersSensor and triggers a change when any of the appended fields change their value.
Definition at line 72 of file SoFrictionCone.h.
Referenced by setUpConnections(), and SoFrictionCone().
Generated on Sat Mar 10 20:00:20 2012 for IPSA by 1.5.8 |