16 #ifndef __TY_ALTIMETRIE__
17 #define __TY_ALTIMETRIE__
21 #include <gtest/gtest_prod.h>
80 virtual bool deepCopy(
const TYElement* pOther,
bool copyId =
true,
bool pUseCopyTag =
false);
82 virtual std::string
toString()
const;
119 const std::deque<LPTYSol>& materials);
234 void exportMesh(std::deque<OPoint3D>& vertices, std::deque<OTriangle>& faces,
235 std::deque<LPTYSol>& materials);
269 void getFacesinIndices(
unsigned int& minX,
unsigned int& maxX,
unsigned int& minY,
unsigned int& maxY,
All base classes related to 3D manipulation.
TYGeometryNode TYAltimetrieGeoNode
Noeud geometrique de type TYAltimetrie.
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
std::vector< LPTYPolygon > TYTabLPPolygon
Collection de pointeurs de TYPolygon.
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
#define OPROTODECL(classname)
#define TY_EXTENSION_DECL_ONLY(classname)
Class to define a box (not necessary parallel to the axis as OBox)
Assigne une altitude a chaque point de l'espace.
void copyAcceleratingGrid(const TYAltimetrie &other)
Clear the grid and reinitialise it as a copy of other.
FRIEND_TEST(TYAltimetryTest, simple_terrain)
static const double invalid_altitude
LPTYPolygon getFace(int index)
double PremiereHauteurPositiveOuNulle(TYTabPoint &ptsIn)
void exportMesh(std::deque< OPoint3D > &vertices, std::deque< OTriangle > &faces, std::deque< LPTYSol > &materials)
bool operator!=(const TYAltimetrie &other) const
Operateur !=.
double HauteurMoyenne(TYTabPoint &pts)
std::deque< LPTYSol > _materials
bool operator==(const TYAltimetrie &other) const
Operateur ==.
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
TYTabLPPolygon ** _pSortedFaces
void clearAcceleratingGrid()
clean the accelerating structure
bool addFace(LPTYPolygon pFace)
void initNullGrid()
Initilise the grid related attributes for a null grid.
virtual DOM_Element toXML(DOM_Element &domElement)
void getFacesinIndices(unsigned int &minX, unsigned int &maxX, unsigned int &minY, unsigned int &maxY, TYTabLPPolygon &faces)
Select faces in the interval minX, maxX, minY, maxY.
TYAltimetrie & operator=(const TYAltimetrie &other)
Operateur =.
bool getGridIndices(const OPoint3D &pt, grid_index &indXY) const
Select indices of faces to test.
OBox _bbox
Bounding Box 2D de l'altimetrie.
unsigned int getPointsInBox(const OPoint3D &pt0, const OPoint3D &pt1, const OPoint3D &pt2, const OPoint3D &pt3, TYTabPoint &tabPolygon)
find a list of point included in a box defined by four points
OPoint3D projection(const OPoint3D &pt) const
Calcule les coordonnees de la projection au sol d'un point de l'espace.
LPTYPolygon getFaceUnder(OPoint3D pt)
Return the face under a point.
const TYPolygon * getFace(int index) const
unsigned int getFacesInBox(const OBox2 &box, TYTabLPPolygon &tabPolygon)
find a list of triangle partialy or totaly included in a box
double altitude(const OPoint3D &pt)
virtual int fromXML(DOM_Element domElement)
bool updateAltitude(OPoint3D &pt) const
Modifie l'altitude d'un point donn�. Si le point est hors de la zone dans laquelle l'altim�trie e...
bool remFace(const LPTYPolygon pFace)
bool IsInsideFace(const TYTabPoint &pts, OPoint3D &pt) const
void plugBackTriangulation(const std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const std::deque< LPTYSol > &materials)
plug back triangulation providfed by the TYTopographie
unsigned _gridSX
Size along each dimension of the accelerating grid.
double _gridDX
Step along each dimension of the accelerating grid.
std::deque< OTriangle > _faces
void initAcceleratingGrid(unsigned to_be_reserved=0)
initialise the accelerating structure given current _bbox and _gridS{XY}
FRIEND_TEST(TYAltimetryTest, dummy_grid)
TYTabLPPolygon _listFaces
Liste des polygones correspondant aux faces de cet altimetrie.
FRIEND_TEST(TYAltimetryTest, simple_grid)
const TYTabLPPolygon & getListFaces() const
void setListFaces(const TYTabLPPolygon &list)
TYTabLPPolygon & getListFaces()
std::deque< OPoint3D > _vertices
virtual std::string toString() const
Define some exception related utilities relying on DataManagerMetier classes.
Integer coordinates into the grid.