Produces an Inventor window with a 3-D projection of a GWS. More...
#include <gwsprojection.h>
Public Member Functions | |
void | deleteHull () |
GWS * | getGWS () const |
SoSeparator * | getGWSRoot () |
QWidget * | getProjWin () const |
GWSprojection (SoQtExaminerViewer *mainViewer, GWS *g, double *c, std::set< int > whichFixed) | |
void | update () |
~GWSprojection () | |
Private Member Functions | |
void | setWinTitle () |
Private Attributes | |
std::set< int > | fixedCoordIndex |
A set of 3 indices that are fixed (3 coordinates). | |
GWS * | gws |
A pointer to the GWS that this projection comes from. | |
SoCoordinate3 * | hullCoords |
3D hull vertices | |
SoIndexedFaceSet * | hullIFS |
Inventor geometry node for the hull. | |
SoSeparator * | hullSep |
Root of the convex hull geometry. | |
double | projCoords [6] |
Coordinate of the projection (only 3 values are used). | |
SoQtRenderArea * | projectionViewer |
A pointer to the viewer for this window. | |
QWidget * | projWin |
A pointer to the QT widget holding the projection window. | |
SoSeparator * | sg |
Inventor node for the projection. |
Produces an Inventor window with a 3-D projection of a GWS.
The projection window uses the same camera as the mainViewer. The GWS uses the 3 fixed coordinate values to project each of its 6D hyperplanes into 3D. These are then intersected with qhull, and the hull boundary is sent back to this class, where it is used to create an indexed face set. This geometry, along with axes is then viewable in the new window.
Definition at line 48 of file gwsprojection.h.
GWSprojection::GWSprojection | ( | SoQtExaminerViewer * | mainViewer, | |
GWS * | g, | |||
double * | c, | |||
std::set< int > | whichFixed | |||
) |
A GWS projection must be initialized with the a pointer to the mainWindow, a pointer to the GWS being projected, a 6x1 projection coordinates vector, c, and set specifiying which of these coordinates are fixed.
Definition at line 67 of file gwsprojection.cpp.
GWSprojection::~GWSprojection | ( | ) |
Removes 1 reference to a GWS (if refcount goes to 0 it will be deleted). If the window still exists, delete it. Delete the projection viewer.
Definition at line 161 of file gwsprojection.cpp.
void GWSprojection::deleteHull | ( | ) |
Replaces 3D hull geometry with an empty node.
Definition at line 237 of file gwsprojection.cpp.
GWS* GWSprojection::getGWS | ( | ) | const [inline] |
Returns a pointer to the gws.
Definition at line 88 of file gwsprojection.h.
SoSeparator* GWSprojection::getGWSRoot | ( | ) | [inline] |
Returns a pointer to the root of the GWS
Definition at line 91 of file gwsprojection.h.
QWidget* GWSprojection::getProjWin | ( | ) | const [inline] |
Returns a pointer to the main QT widget for the projection window.
Definition at line 85 of file gwsprojection.h.
void GWSprojection::setWinTitle | ( | ) | [private] |
Sets the window title of the projection window after the viewer is created. The title is specifies the type of GWS and the coordinate values of fixed coordinates. (i.e. "L1 GWS projection (0, 0, 0, *, *, *)" is a projection into torque- space)
Definition at line 179 of file gwsprojection.cpp.
void GWSprojection::update | ( | ) |
Updates the 3D hull by calling the projection routine of the associated GWS. The new hull geometry is then created.
Definition at line 206 of file gwsprojection.cpp.
std::set<int> GWSprojection::fixedCoordIndex [private] |
A set of 3 indices that are fixed (3 coordinates).
Definition at line 57 of file gwsprojection.h.
GWS* GWSprojection::gws [private] |
A pointer to the GWS that this projection comes from.
Definition at line 51 of file gwsprojection.h.
SoCoordinate3* GWSprojection::hullCoords [private] |
3D hull vertices
Definition at line 69 of file gwsprojection.h.
SoIndexedFaceSet* GWSprojection::hullIFS [private] |
Inventor geometry node for the hull.
Definition at line 72 of file gwsprojection.h.
SoSeparator* GWSprojection::hullSep [private] |
Root of the convex hull geometry.
Definition at line 66 of file gwsprojection.h.
double GWSprojection::projCoords[6] [private] |
Coordinate of the projection (only 3 values are used).
Definition at line 54 of file gwsprojection.h.
SoQtRenderArea* GWSprojection::projectionViewer [private] |
A pointer to the viewer for this window.
Definition at line 63 of file gwsprojection.h.
QWidget* GWSprojection::projWin [private] |
A pointer to the QT widget holding the projection window.
Definition at line 60 of file gwsprojection.h.
SoSeparator* GWSprojection::sg [private] |
Inventor node for the projection.
Definition at line 75 of file gwsprojection.h.