00001
00002
00003 #ifndef __SPHERE_MESH_H
00004 #define __SPHERE_MESH_H
00005
00006 #include <esg/Definitions.h>
00007 #include <esg/mesh/PolygonalMesh.h>
00008
00009 namespace esg {
00010
00011 class OGSCENE_EXPORT SphereMesh : public PolygonalMesh {
00012 protected:
00013 static const Vector3 INIT_VERTICES [6];
00014 static const unsigned FIRST_FACET_VERTICES [3];
00015 static const unsigned SECOND_FACET_VERTICES [3];
00016 static const unsigned THIRD_FACET_VERTICES [3];
00017 static const unsigned FOURTH_FACET_VERTICES [3];
00018 static const unsigned FIFTH_FACET_VERTICES [3];
00019 static const unsigned SIXTH_FACET_VERTICES [3];
00020 static const unsigned SEVENTH_FACET_VERTICES [3];
00021 static const unsigned EIGHTH_FACET_VERTICES [3];
00022 static const Vector3 FIRST_FACET_NORMALS [3];
00023 static const Vector3 SECOND_FACET_NORMALS [3];
00024 static const Vector3 THIRD_FACET_NORMALS [3];
00025 static const Vector3 FOURTH_FACET_NORMALS [3];
00026 static const Vector3 FIFTH_FACET_NORMALS [3];
00027 static const Vector3 SIXTH_FACET_NORMALS [3];
00028 static const Vector3 SEVENTH_FACET_NORMALS [3];
00029 static const Vector3 EIGHTH_FACET_NORMALS [3];
00030
00031 protected:
00032 void _mesh (unsigned actDepth, unsigned maxDepth);
00033
00034 public:
00035 SphereMesh (unsigned recursion = 1 );
00036 };
00037
00038 };
00039
00040 #endif // __SPHERE_MESH_H