DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Data Fields
DGtal::TransformedKSSurfel Struct Reference

#include <DrawWithDisplay3DModifier.h>

Inheritance diagram for DGtal::TransformedKSSurfel:
Inheritance graph
[legend]
Collaboration diagram for DGtal::TransformedKSSurfel:
Collaboration graph
[legend]

Public Member Functions

 TransformedKSSurfel (const DGtal::Z3i::SCell &aSurfel, double aShift, double aSizeFactor=1.0)
 TransformedKSSurfel (const DGtal::Z3i::SCell &aSurfel, const DGtal::Z3i::SCell &aVoxel, double aShift=0.05, double aSizeFactor=0.75)
- Public Member Functions inherited from DGtal::DrawWithDisplay3DModifier
std::string className () const

Data Fields

DGtal::Z3i::SCell mySurfel
double myShift
double mySizeFactor

Detailed Description

class to modify the position and scale to construct better illustration mode.

Todo:
add a constructor to automatically define the shift and the scale according a given associated SCell.
Examples:
io/viewers/viewer3D-4bis-illustrationMode.cpp.

Definition at line 323 of file DrawWithDisplay3DModifier.h.


Constructor & Destructor Documentation

DGtal::TransformedKSSurfel::TransformedKSSurfel ( const DGtal::Z3i::SCell aSurfel,
double  aShift,
double  aSizeFactor = 1.0 
)
inline

Constructor.

Parameters:
aSurfela DGtal::Z3i::SCell ( KhalimskySpaceND< 2, Integer > SCell ) .
aShiftthe shift distance (positive or negative).
aSizeFactoruse to change the KSSurfel size (1.0 initial size).

Definition at line 332 of file DrawWithDisplay3DModifier.h.

References myShift, mySizeFactor, and mySurfel.

{
mySurfel= aSurfel;
myShift = aShift;
mySizeFactor=aSizeFactor;
}
DGtal::TransformedKSSurfel::TransformedKSSurfel ( const DGtal::Z3i::SCell aSurfel,
const DGtal::Z3i::SCell aVoxel,
double  aShift = 0.05,
double  aSizeFactor = 0.75 
)
inline

Constructor.

Parameters:
aSurfela DGtal::Z3i::SCell ( KhalimskySpaceND< 2, Integer > SCell ) .
aVoxela DGtal::Z3i::SCell represent the voxel for which the surfel is associated. It permits to determine automatically the shift parameter (the surfel is automatically shifted towards this voxel).
aShiftthe shift distance (positive or negative (default 0.05)).
aSizeFactoruse to change the KSSurfel size (default 0.75).

Definition at line 347 of file DrawWithDisplay3DModifier.h.

References DGtal::SignedKhalimskyCell< dim, TInteger >::myCoordinates, myShift, mySizeFactor, and mySurfel.

{
mySurfel= aSurfel;
myShift = aShift;
mySizeFactor = aSizeFactor;
bool xodd = (mySurfel.myCoordinates[ 0 ] & 1 );
bool yodd = (mySurfel.myCoordinates[ 1 ] & 1 );
bool zodd = (mySurfel.myCoordinates[ 2 ] & 1 );
if(!xodd ){
myShift*= ((aVoxel.myCoordinates[ 0 ]-mySurfel.myCoordinates[ 0 ] <0)? -1.0: 1.0);
}else if(!yodd ){
myShift*=((aVoxel.myCoordinates[ 1 ]-mySurfel.myCoordinates[ 1 ] <0)? -1.0: 1.0);
}else if(!zodd ){
myShift*=((aVoxel.myCoordinates[ 2 ]-mySurfel.myCoordinates[ 2 ] <0)? -1.0: 1.0);
}
}

Field Documentation

double DGtal::TransformedKSSurfel::myShift
double DGtal::TransformedKSSurfel::mySizeFactor
DGtal::Z3i::SCell DGtal::TransformedKSSurfel::mySurfel

The documentation for this struct was generated from the following file: