//---------------------------------------------------------------------------- // EgalTech 2013-2014 //---------------------------------------------------------------------------- // File : GraphObjs.h Data : 06.02.14 Versione : 1.5b4 // Contenuto : Oggetti grafici e loro raccolte. // // // // Modifiche : 06.02.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EGkPoint3d.h" #include #include //---------------------------------------------------------------------------- // Definizione di Vert3f class Vert3f { public : Vert3f( const Vector3d& vtV) : x( (float)vtV.x), y( (float)vtV.y), z( (float)vtV.z) {} Vert3f( const Point3d& ptP) : x( (float)ptP.x), y( (float)ptP.y), z( (float)ptP.z) {} Vert3f( double dX, double dY, double dZ) : x( (float)dX), y( (float)dY), z( (float)dZ) {} Vert3f( void) : x( 0), y( 0), z( 0) {} void Set( const Vector3d& vtV) { x = (float)vtV.x ; y = (float)vtV.y ; z = (float)vtV.z ; } void Set( const Point3d& ptP) { x = (float)ptP.x ; y = (float)ptP.y ; z = (float)ptP.z ; } void Set( double dX, double dY, double dZ) { x = (float)dX ; y = (float)dY ; z = (float)dZ ; } const Vert3f& operator =( const Vert3f& ptSrc) { if ( &ptSrc != this) { x = ptSrc.x , y = ptSrc.y , z = ptSrc.z ; } return *this ; } public : float x ; float y ; float z ; } ; const size_t SIZEV3F = sizeof( Vert3f) ; //---------------------------------------------------------------------------- // Raccolte di Vert3f typedef std::vector V3FVECTOR ; // vettore di vertici typedef std::list V3FLIST ; // lista di vertici