/opt/ros/diamondback/stacks/graspit_simulator/graspit/graspit_source/src/body.cpp File Reference
Implements the body class hierarchy.
More...
#include <cmath>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
#include <QFile>
#include <QString>
#include <QTextStream>
#include "body.h"
#include "collisionInterface.h"
#include "collisionStructures.h"
#include <QMutex>
#include <QThreadStorage>
#include "bBox.h"
#include "matvec3D.h"
#include "mytools.h"
#include "world.h"
#include "robot.h"
#include "joint.h"
#include <map>
#include "ivmgr.h"
#include "contact.h"
#include "graspitGUI.h"
#include "tinyxml.h"
#include <Inventor/SoDB.h>
#include <Inventor/SoInput.h>
#include <Inventor/actions/SoGetBoundingBoxAction.h>
#include <Inventor/actions/SoSearchAction.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoCylinder.h>
#include <Inventor/nodes/SoCube.h>
#include <Inventor/nodes/SoIndexedFaceSet.h>
#include <Inventor/nodes/SoMaterial.h>
#include <Inventor/VRMLnodes/SoVRMLMaterial.h>
#include <Inventor/VRMLnodes/SoVRMLAppearance.h>
#include <Inventor/VRMLnodes/SoVRMLShape.h>
#include <Inventor/nodes/SoPickStyle.h>
#include <Inventor/nodes/SoSwitch.h>
#include <Inventor/nodes/SoTransform.h>
#include <Inventor/nodes/SoTranslation.h>
#include <Inventor/draggers/SoRotateDiscDragger.h>
#include <Inventor/nodekits/SoWrapperKit.h>
#include <Inventor/SoPrimitiveVertex.h>
#include <Inventor/actions/SoCallbackAction.h>
#include <Inventor/VRMLnodes/SoVRMLGroup.h>
#include <Inventor/actions/SoWriteAction.h>
#include "debug.h"
Go to the source code of this file.
Classes |
struct | GetCoord |
| Integrable functor for computing triangle area. More...
|
struct | GetCovar |
| Integrable functor for computing the covariance matrix. More...
|
Defines |
#define | AXES_SCALE 100.0 |
#define | CUBE(x) ((x)*(x)*(x)) |
#define | SQR(x) ((x)*(x)) |
Functions |
void | addTriangleCallBack (void *info, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3) |
void | addVertexCallBack (void *info, SoCallbackAction *action, const SoPrimitiveVertex *v1) |
void | addVerticesFromTriangleCallBack (void *info, SoCallbackAction *action, const SoPrimitiveVertex *v1, const SoPrimitiveVertex *v2, const SoPrimitiveVertex *v3) |
int | computeDefaultCoG (std::vector< Triangle > &triangles, position &defaultCoG) |
template<class IntegrableFunction > |
float | Gaussian7Integrate (const Triangle &triangle, IntegrableFunction integrable_function) |
bool | GetOffLine (ifstream *file, istringstream *line) |
| Helper for loadGeometryOff.
|
int | OFFReadFailure () |
| Helper for loadGeometryOFF.
|
QTextStream & | operator<< (QTextStream &os, const GraspableBody &gb) |
QTextStream & | operator<< (QTextStream &os, const Body &b) |
Detailed Description
Implements the body class hierarchy.
Definition in file body.cpp.
Define Documentation
#define CUBE |
( |
x |
|
) |
((x)*(x)*(x)) |
#define SQR |
( |
x |
|
) |
((x)*(x)) |
Function Documentation
void addTriangleCallBack |
( |
void * |
info, |
|
|
SoCallbackAction * |
action, |
|
|
const SoPrimitiveVertex * |
v1, |
|
|
const SoPrimitiveVertex * |
v2, |
|
|
const SoPrimitiveVertex * |
v3 | |
|
) |
| | |
Helper callback for generating list of body triangles
Definition at line 1130 of file body.cpp.
void addVertexCallBack |
( |
void * |
info, |
|
|
SoCallbackAction * |
action, |
|
|
const SoPrimitiveVertex * |
v1 | |
|
) |
| | |
Helper callback for generating list of body vertices
Definition at line 1156 of file body.cpp.
void addVerticesFromTriangleCallBack |
( |
void * |
info, |
|
|
SoCallbackAction * |
action, |
|
|
const SoPrimitiveVertex * |
v1, |
|
|
const SoPrimitiveVertex * |
v2, |
|
|
const SoPrimitiveVertex * |
v3 | |
|
) |
| | |
Helper callback for generating list of body vertices
Definition at line 1168 of file body.cpp.
int computeDefaultCoG |
( |
std::vector< Triangle > & |
triangles, |
|
|
position & |
defaultCoG | |
|
) |
| | |
A different version for computing the cog of an object based on the surface triangles. Used as a fallback when the other version fails. Courtesy of Corey Goldfeder.
Definition at line 1774 of file body.cpp.
template<class IntegrableFunction >
float Gaussian7Integrate |
( |
const Triangle & |
triangle, |
|
|
IntegrableFunction |
integrable_function | |
|
) |
| | [inline] |
Helper function for computing cog and inertia matrix. Integrates a pointwise function over the surface of a triangle using 7-point Gaussian integration.
Definition at line 1710 of file body.cpp.
bool GetOffLine |
( |
ifstream * |
file, |
|
|
istringstream * |
line | |
|
) |
| | |
Helper for loadGeometryOff.
Strips off leading whitespace and comments
Definition at line 442 of file body.cpp.
Helper for loadGeometryOFF.
Definition at line 459 of file body.cpp.
QTextStream& operator<< |
( |
QTextStream & |
os, |
|
|
const GraspableBody & |
gb | |
|
) |
| | |
Output method for writing body data to a text world configuration file
Definition at line 2279 of file body.cpp.
QTextStream& operator<< |
( |
QTextStream & |
os, |
|
|
const Body & |
b | |
|
) |
| | |
Output method for writing body data to a text world configuration file.
Definition at line 1121 of file body.cpp.