Files
DarioS 597cc68124 EgtGraphics :
- sistemate minuscole/maiuscole in #include.
2022-02-26 17:48:15 +01:00

50 lines
1.9 KiB
C++

//----------------------------------------------------------------------------
// 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 <vector>
#include <list>
//----------------------------------------------------------------------------
// 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<Vert3f> V3FVECTOR ; // vettore di vertici
typedef std::list<Vert3f> V3FLIST ; // lista di vertici