34 #ifndef AIMS_SURFACE_MESHRASTERIZATION_D_H 
   35 #define AIMS_SURFACE_MESHRASTERIZATION_D_H 
   45   template <
int D, 
typename T>
 
   51     const std::vector<Point3df> & vert = mesh.
vertex();
 
   52     const std::vector<AimsVector<uint, D> > & polygons = mesh.
polygon();
 
   53     std::vector<float> vs = volume->getVoxelSize();
 
   54     typename std::vector<AimsVector<uint, D> >::const_iterator
 
   55       ip, ep = polygons.end();
 
   56     Point3df v1, v2, v1v, v2v, direction;
 
   61     for( ip=polygons.begin(); ip!=ep; ++ip )
 
   67         v2 = vert[poly[(i+1) % D]];
 
   68         v1v = 
Point3df( v1[0] / vs[0], v1[1] / vs[1], v1[2] / vs[2]);
 
   69         v2v = 
Point3df( v2[0] / vs[0], v2[1] / vs[1], v2[2] / vs[2]);
 
   70         direction = v2v - v1v;
 
   71         lmax = direction.
norm();
 
The template class to manage a mesh with time if needed.
const std::vector< AimsVector< uint, D > > & polygon() const
Get a const reference to the vector of polygons of the 0 surface.
const std::vector< Point3df > & vertex() const
Get a const reference to the vector of verteces of the surface of index 0.
AimsVector< T, D > & normalize()
static void rasterizeLine(const Point3df &p0, const Point3df &direction, float lmax, T &volume, int value)
T should be carto::Volume<int16_t> or BucketMap<Void>::Bucket.
static void rasterizeMeshWireframe(const AimsTimeSurface< D, T > &mesh, carto::rc_ptr< carto::Volume< int16_t > > &volume, int value=1)
Rasterize polygons edges into a volume.
The class for EcatSino data write operation.