Class to build a set of axes on a parallelepiped relating to the view. More...
#include <MeshViz/graph/PoAutoCubeAxis.h>
Public Types | |
enum | AxisType { LINEAR, LOGARITHMIC, GENERALIZED } |
Public Member Functions | |
virtual SoType | getTypeId () const |
virtual const SoNodekitCatalog * | getNodekitCatalog () const |
PoAutoCubeAxis () | |
PoAutoCubeAxis (const SbVec3f &_start, const SbVec3f &_end, AxisType xAxisType, AxisType yAxisType, AxisType zAxisType, const char *xTtle=NULL, const char *yTtle=NULL, const char *zTtle=NULL) | |
virtual void | GLRender (SoGLRenderAction *action) |
virtual void | rebuild () |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static const SoNodekitCatalog * | getClassNodekitCatalog () |
Public Attributes | |
SoSFVec3f | start |
SoSFVec3f | end |
SoSFVec3f | gradStart |
SoSFVec3f | gradEnd |
SoSFString | xTitle |
SoSFString | yTitle |
SoSFString | zTitle |
SoSFBool | isGridLinesXVisible |
SoSFBool | isGridLinesYVisible |
SoSFBool | isGridLinesZVisible |
SoSFBool | isBackgroundFacesVisible |
SoSFBool | isIntersectingGradsVisible |
SoSFMatrix | modellingMatrix |
SoSFMatrix | viewingMatrix |
SoSFMatrix | projectionMatrix |
This class builds a set of 3D axes displayed on some of the 12 edges of a parallelepiped. The choice of the edges depends on the view defined by the current camera (see SoCamera class). The graduations and the title of the axes are always legible whatever the view definition. The two points (start and end fields) define the diagonal of the parallelepiped and only the edges which are intersecting a visible face and an invisible face will be graduated. The visible and invisible faces depend on the view definition. The visible faces of the parallelepiped are the back faces.
1-----------2 Y /| (2) /| | / | / | | / | (5) / | Vertices numerotation. | 6----------5 | ----- X | | | (1) | / |(3) 0----|------3 / | / | (4) / / | / | / Z |/ (0) | / 7----------4 Face 0 : 4 5 6 7 ==> edges : (4,5) (5,6) (6,7) (7,4) Face 1 : 2 3 4 5 ==> edges : (2,3) (3,4) (4,5) (5,2) Face 2 : 0 1 2 3 ==> edges : (0,1) (1,2) (2,3) (3,0) Face 3 : 0 1 6 7 ==> edges : (0,1) (1,6) (6,7) (7,0) Face 4 : 0 3 4 7 ==> edges : (0,3) (3,4) (4,7) (7,0) Face 5 : 1 2 5 6 ==> edges : (1,2) (2,5) (5,6) (6,1)
The graduations of these axes are defined by the fields gradStart and gradEnd. However if these fields are equal, the fields start and end are used to define the graduation values. Furthermore, the fields gradStart and gradEnd are always ignored for axis type GENERALIZED.
start | 0 0 0 |
end | 1 1 1 |
gradStart | 0 0 0 |
gradEnd | 0 0 0 |
xTitle | "" |
yTitle | "" |
zTitle | "" |
isGridLinesXVisible | FALSE |
isGridLinesYVisible | FALSE |
isGridLinesZVisible | FALSE |
isBackgroundFacesVisible | FALSE |
isIntersectingGradsVisible | FALSE |
modellingMatrix | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 |
viewingMatrix | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 |
projectionMatrix | 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 |
Separator mainGradGridSep (from PoAutoCubeAxis) {
Switch xAxisSwitch03 (from PoAutoCubeAxis) {
PoAutoCubeAxis::PoAutoCubeAxis | ( | ) |
Default constructor.
PoAutoCubeAxis::PoAutoCubeAxis | ( | const SbVec3f & | _start, | |
const SbVec3f & | _end, | |||
AxisType | xAxisType, | |||
AxisType | yAxisType, | |||
AxisType | zAxisType, | |||
const char * | xTtle = NULL , |
|||
const char * | yTtle = NULL , |
|||
const char * | zTtle = NULL | |||
) |
Constructor.
(By default the X, Y, and Z axes are linear).
static const SoNodekitCatalog* PoAutoCubeAxis::getClassNodekitCatalog | ( | ) | [static] |
Returns the SoNodekitCatalog for this class.
Reimplemented from PoBaseAxis.
static SoType PoAutoCubeAxis::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from PoBaseAxis.
virtual const SoNodekitCatalog* PoAutoCubeAxis::getNodekitCatalog | ( | ) | const [virtual] |
Returns the SoNodekitCatalog for this instance.
Reimplemented from PoBaseAxis.
virtual SoType PoAutoCubeAxis::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from PoBaseAxis.
virtual void PoAutoCubeAxis::GLRender | ( | SoGLRenderAction * | action | ) | [virtual] |
virtual void PoAutoCubeAxis::rebuild | ( | ) | [virtual] |
Forces the node kit to be rebuilt immediately.
The rebuild consists in updating all catalog parts (which contains shapes forming the visualization) of the node kit according to field values and other property values (domain, data mapping,...). Be careful, do not use the method rebuild() if you use MeshViz property nodes (PoDomain, PoMeshProperty,...), because a representation (axis, legend, 2D and 3D mesh representation,..) depends on the current inherited state. If you need to do an extra work after a representation has been built, do it in a post-rebuild callback (cf PoBase::addPostRebuildCallback).
Reimplemented from PoBase.
End point of the parallelepiped's diagonal.
(1,1,1) by default.
Defines the value of the graduation (tick label) corresponding to the end point of this group of axes.
See PoCartesianAxis::gradEnd for details.
Since Open Inventor 9.5.1Defines the value of the graduation (tick label) corresponding to the starting point of this group of axes.
See PoCartesianAxis::gradStart for details.
Since Open Inventor 9.5.1Sets the visibility of visible faces.
FALSE by default.
Sets the visibility of the grid lines of the X axes displayed on the visible faces.
(The attributes of grid lines of PoAxis cannot be used because the graduations of thes axes are not necessarily in the same plane than the visible faces). FALSE by default.
Sets the visibility of the grid lines of the Y axes displayed on the visible faces.
(The attributes of grid lines of PoAxis cannot be used because the graduations of thes axes are not necessarily in the same plane than the visible faces). FALSE by default.
Sets the visibility of the grid lines of the Z axes displayed on the visible faces.
(The attributes of grid lines of PoAxis cannot be used because the graduations of thes axes are not necessarily in the same plane than the visible faces). FALSE by default.
Given A1 and A2 2 consecutive axes with the first (the last) graduation of A1 intersects the first or the last graduation of A2.
This flag allows the application to suppress or not the first (the last) graduation of A1. The attribute tickFirstGrad (tickLastGrad) of PoAxis is used to suppress the first (the last) graduation. FALSE by default.
This modelling matrix is used to determine the visibility of each face (and thus the axes to draw).
Each time an SoGLRenderAction, an SoCallbackAction, an SoRayPickAction or an SoVectorizeAction traverse this node, this matrix is set to the current modelling matrix and the axes are rebuilt.
This modelling matrix is used to determine the visibility of each face (and thus the axes to draw).
Each time an SoGLRenderAction, an SoCallbackAction, an SoRayPickAction or an SoVectorizeAction traverse this node, this matrix is set to the current projection matrix and the axes are rebuilt. projectionMatrix depends on the current camera.
Start point of the parallelepiped's diagonal.
(0,0,0) by default.
This viewing matrix is used to determine the visibility of each face (and thus the axes to draw).
Each time an SoGLRenderAction, an SoCallbackAction, an SoRayPickAction or an SoVectorizeAction traverse this node, this matrix is set to the current viewing matrix and the axes are rebuilt. viewingMatrix depends on the current camera.
Title of the X axes.
Empty by default.
Title of the Y axes.
Empty by default.
Title of the Z axes.
Empty by default.