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

#include <Viewer3D.h>

Public Member Functions

bool operator() (voxelD3D s1, voxelD3D s2)

Data Fields

qglviewer::Vec posCam

Detailed Description

Used to sort pixel from camera

Definition at line 299 of file Viewer3D.h.


Member Function Documentation

bool DGtal::Viewer3D::compFarthestVoxelFromCamera::operator() ( voxelD3D  s1,
voxelD3D  s2 
)
inline

Definition at line 302 of file Viewer3D.h.

References posCam, DGtal::Display3D::voxelD3D::x, DGtal::Display3D::voxelD3D::y, and DGtal::Display3D::voxelD3D::z.

{
double dist1= sqrt ( ( posCam.x-s1.x ) * ( posCam.x-s1.x ) + ( posCam.y-s1.y ) * ( posCam.y-s1.y ) + ( posCam.z-s1.z ) * ( posCam.z-s1.z ) );
double dist2= sqrt ( ( posCam.x-s2.x ) * ( posCam.x-s2.x ) + ( posCam.y-s2.y ) * ( posCam.y-s2.y ) + ( posCam.z-s2.z ) * ( posCam.z-s2.z ) );
return dist1>dist2;
}

Field Documentation

qglviewer::Vec DGtal::Viewer3D::compFarthestVoxelFromCamera::posCam

Definition at line 301 of file Viewer3D.h.

Referenced by operator()(), and DGtal::Viewer3D::sortSurfelFromCamera().


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