DGtal
0.6.devel
|
#include <DGtalInventor.h>
Public Types | |
typedef TSpace | Space |
typedef TSpace::Point | Point |
typedef TSpace::Dimension | Dimension |
typedef TSpace::Integer | Integer |
typedef std::map< std::string, std::string > | ModeMapping |
typedef SbVec3f | Vec3f |
typedef Vec3f | Color |
typedef std::map< Point, bool > | CellSet |
typedef std::map< Point, Vec3f > | ColorMapping |
typedef std::map< Point, Color > | NormalMapping |
Public Member Functions | |
~DGtalInventor () | |
DGtalInventor () | |
void | setLattice (const Lattice< Space > &l) |
void | clear () |
std::string | getMode (const std::string &objectName) const |
void | setDiffuseColor (const float *color) |
void | setDiffuseColor (const Color &color) |
void | drawCell (const Point &c, bool orient, const float *n=0) |
void | drawPoint (const Point &c, const float *n=0) |
void | generate (SoGroup *result) const |
void | selfDisplay (std::ostream &out) const |
bool | isValid () const |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((CSpace< TSpace >)) | |
DGtalInventor (const DGtalInventor &other) | |
DGtalInventor & | operator= (const DGtalInventor &other) |
Private Attributes | |
Lattice< Space > | myLattice |
ModeMapping | myModes |
Color | myDiffuseColor |
CellSet | myCells [3] |
ColorMapping | myColors |
NormalMapping | myNormals |
Aim: A stream object based on Open Inventor for exporting or displaying DGtal objects.
Description of template class 'DGtalInventor'
Digital points, cells and objects may be outputed in that kind of object. The user may then ask to view the object or simply export its content.
TSpace | the type of digital space (should realize a CSpace). |
Definition at line 83 of file DGtalInventor.h.
typedef std::map< Point, bool > DGtal::DGtalInventor< TSpace >::CellSet |
Definition at line 103 of file DGtalInventor.h.
typedef Vec3f DGtal::DGtalInventor< TSpace >::Color |
Definition at line 102 of file DGtalInventor.h.
typedef std::map< Point, Vec3f > DGtal::DGtalInventor< TSpace >::ColorMapping |
Definition at line 104 of file DGtalInventor.h.
typedef TSpace::Dimension DGtal::DGtalInventor< TSpace >::Dimension |
Definition at line 92 of file DGtalInventor.h.
typedef TSpace::Integer DGtal::DGtalInventor< TSpace >::Integer |
Definition at line 93 of file DGtalInventor.h.
typedef std::map< std::string, std::string > DGtal::DGtalInventor< TSpace >::ModeMapping |
The associated map type for storing possible modes used for displaying for digital objects.
Definition at line 99 of file DGtalInventor.h.
typedef std::map< Point, Color > DGtal::DGtalInventor< TSpace >::NormalMapping |
Definition at line 105 of file DGtalInventor.h.
typedef TSpace::Point DGtal::DGtalInventor< TSpace >::Point |
Definition at line 91 of file DGtalInventor.h.
typedef TSpace DGtal::DGtalInventor< TSpace >::Space |
Definition at line 90 of file DGtalInventor.h.
typedef SbVec3f DGtal::DGtalInventor< TSpace >::Vec3f |
Definition at line 101 of file DGtalInventor.h.
|
inline |
|
inline |
Constructor. Creates a default lattice for display.
Constructor.
Definition at line 55 of file DGtalInventor.ih.
References DGtal::Lattice< TSpace >::init(), and DGtal::DGtalInventor< TSpace >::myLattice.
|
private |
Copy constructor.
other | the object to clone. Forbidden by default. |
|
private |
|
inline |
Clears everything. The object is ready for a new visualization and keeps its lattice.
Definition at line 98 of file DGtalInventor.ih.
References DGtal::DGtalInventor< TSpace >::clear().
Referenced by DGtal::DGtalInventor< TSpace >::clear().
|
inline |
Adds a cell for visualisation. Gives an optional normal. Nb : if a cell has dimension greater than 2, the boundary of the cell is taken and this method is recursively called.
c | the cell to visualize (in Khalimsky coordinates). |
n | the (optional) normal to the cell as a 3D vector. |
Definition at line 141 of file DGtalInventor.ih.
|
inline |
Adds a Zn-point for visualisation. Gives an optional normal.
p | the point to visualize. |
n | the (optional) normal to the cell as a 3D vector. |
Definition at line 177 of file DGtalInventor.ih.
void DGtal::DGtalInventor< TSpace >::generate | ( | SoGroup * | result | ) | const |
Generates the IV surface/lines/points with children rooted at the SoGroup [result].
result | (returns) an updated IV node. |
Definition at line 225 of file DGtalInventor.ih.
|
inline |
objectName | the name of the object (generally obtained with a 'object.className()'). |
Definition at line 68 of file DGtalInventor.ih.
|
inline |
Checks the validity/consistency of the object.
Definition at line 207 of file DGtalInventor.ih.
|
private |
Assignment.
other | the object to copy. |
|
inline |
Writes/Displays the object on an output stream.
out | the output stream where the object is written. |
Definition at line 195 of file DGtalInventor.ih.
|
inline |
color | the diffuse color. |
color | the (optional) diffuse color. |
Definition at line 113 of file DGtalInventor.ih.
|
inline |
color | the diffuse color. |
Definition at line 124 of file DGtalInventor.ih.
|
inline |
All further operations are immersed in Inventor 3D space with the lattice [l].
l | the lattice space which should be of dimension TSpace::dimension. |
Definition at line 84 of file DGtalInventor.ih.
References DGtal::Lattice< TSpace >::n().
|
private |
Definition at line 221 of file DGtalInventor.h.
|
private |
Definition at line 222 of file DGtalInventor.h.
|
private |
Definition at line 220 of file DGtalInventor.h.
|
private |
lattice for embedding of digital space.
Definition at line 208 of file DGtalInventor.h.
Referenced by DGtal::DGtalInventor< TSpace >::DGtalInventor().
|
private |
May associate a current mode for a given class. myModes[ "HyperRectDomain" ] = "Paving".
Next display of a HyperRectDomain object will used the mode "Paving". Modes may only be used in objects implementing the concept CDrawableWithBoard2D.
Definition at line 218 of file DGtalInventor.h.
|
private |
Definition at line 223 of file DGtalInventor.h.