BodyPropDlg Class Reference

Creates and controls the body properties dialog box. More...

#include <bodyPropDlg.h>

Inheritance diagram for BodyPropDlg:
Inheritance graph
[legend]

List of all members.

Public Slots

void revertAndClose ()
void setDynamic (int state)
void setMaterial (int choice)
void setShowAxes (int state)
void setShowDynContactForces (int state)
void setShowFC (int state)
void setTransparency (int val)
void showBvs ()

Public Member Functions

 BodyPropDlg (QWidget *parent=0)

Private Member Functions

void init ()

Private Attributes

std::vector< Body * > bodyVec
DynamicBodydynBod
int numBodies
bool origAxesShown
bool origDynContactForcesShown
bool origIsDynamic
double origMass
std::vector< int > origMaterials
std::vector< bool > origShowFC
std::vector< float > origTransparencies

Detailed Description

Creates and controls the body properties dialog box.

This class holds all the body properties dialog box interface components created in QT designer and the methods for dealing with user interaction.

The dialog box allows the user to change the body properties of the currently selected body or bodies. The physical material, the transparency, and whether or not friction cones should be shown, are all properties that can be changed for any set of bodies. If selected body is not dynamic (it is an obstacle), it can be made dynamic. Dynamic bodies have other options that can be changed such as its mass, whether axes at the center of gravity should be shown, and whether contact forces should be drawn during each step of the dynamics.

Definition at line 52 of file bodyPropDlg.h.


Constructor & Destructor Documentation

BodyPropDlg::BodyPropDlg ( QWidget *  parent = 0  )  [inline]

Definition at line 69 of file bodyPropDlg.h.


Member Function Documentation

void BodyPropDlg::init (  )  [private]

Initializes the interface elements in the dialog box. It first determines which bodies will be affected. If a robot is selected, it adds each of the robot links to the vector of affected bodies. If more than one body is selected then the dynamic properites are disabled. These must be changed one body at a time. If the dynamic properties are enabled a validator is set up for the mass values. The rest of the initialization sets the initial values of the interface elements. If there are multiple bodies selected that have differing values for certain properties, the elements each have a way of allowing no change to made to that property. It also saves the original values of the properties in case the user cancels their actions.

Definition at line 52 of file bodyPropDlg.cpp.

void BodyPropDlg::revertAndClose (  )  [slot]

If the user pushes cancel, then all the body properties will be restored to their original values and the dialog box is closed.

Definition at line 249 of file bodyPropDlg.cpp.

void BodyPropDlg::setDynamic ( int  state  )  [slot]

If a single body is selected, it can be set to be either a dynamic or static body. If it was a static body and has never been a dynamic body before, then, a new DynamicBody is created to replace the original body, and it copies the current static body properties. Other values are set to default settings. Otherwise the useDynamics flag of a DynamicBody can be toggled. The lower half of the dialog box relating to dynamic properties is enabled and disabled based on the setting of the dynamics check box.

Definition at line 186 of file bodyPropDlg.cpp.

void BodyPropDlg::setMaterial ( int  choice  )  [slot]

This sets the material of all selected bodies to the one chosen in the materials list. If the the last item in the materials list, "Keep original" is chosen, this will reset each body to the material it had when this dialog box was opened.

Definition at line 231 of file bodyPropDlg.cpp.

void BodyPropDlg::setShowAxes ( int  state  )  [slot]

When the showAxes box is toggled, this updates the axes display for the selected body immediately.

Definition at line 158 of file bodyPropDlg.cpp.

void BodyPropDlg::setShowDynContactForces ( int  state  )  [slot]

Toggles the DynamicBody 's show dynamic contact forces flag.

Definition at line 218 of file bodyPropDlg.cpp.

void BodyPropDlg::setShowFC ( int  state  )  [slot]

When the show friction cones box is toggled, this updates the cones display for the affected bodies immediately.

Definition at line 169 of file bodyPropDlg.cpp.

void BodyPropDlg::setTransparency ( int  val  )  [slot]

When the transparency slider is changed, the transparency of the affected bodies is immediately updated to show the change.

Definition at line 147 of file bodyPropDlg.cpp.

void BodyPropDlg::showBvs (  )  [slot]

Shows the bounding box hierarchy of the currently selected bodies from the collision detection system, up to the depth specified in the depth spin box. The bounding boxes are retrieved from the bodies themselves, where they are also colored. Then they are attached back to the geometry root of the bodies. This is generally for debugging the collision detection system.

Definition at line 274 of file bodyPropDlg.cpp.


Member Data Documentation

std::vector<Body *> BodyPropDlg::bodyVec [private]

Definition at line 57 of file bodyPropDlg.h.

Definition at line 56 of file bodyPropDlg.h.

int BodyPropDlg::numBodies [private]

Definition at line 58 of file bodyPropDlg.h.

Definition at line 60 of file bodyPropDlg.h.

Definition at line 61 of file bodyPropDlg.h.

Definition at line 62 of file bodyPropDlg.h.

double BodyPropDlg::origMass [private]

Definition at line 59 of file bodyPropDlg.h.

std::vector<int> BodyPropDlg::origMaterials [private]

Definition at line 63 of file bodyPropDlg.h.

std::vector<bool> BodyPropDlg::origShowFC [private]

Definition at line 64 of file bodyPropDlg.h.

std::vector<float> BodyPropDlg::origTransparencies [private]

Definition at line 65 of file bodyPropDlg.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


graspit
Author(s):
autogenerated on Wed Jan 25 11:00:19 2012