Mesh_Geosphere Class Reference
This class is an instance of the Geodesic generic class, specific to create a geodesic sphere.
More...
#include <Mesh_Geosphere.h>
Inheritance diagram for Mesh_Geosphere:
List of all members.
|
Public Member Functions |
| Mesh_Geosphere (Real radius, int frequency=4, bool class_2=false) |
| Constructor.
|
virtual | ~Mesh_Geosphere () |
| Destruction.
|
void | fillMesh () |
| This function defines the Vertices list (with position, normal and UV mapping).
|
Protected Member Functions |
void | getFacePoints (long facenumber) |
| This function fills the mSphericPoints array with all the points of the face.
|
void | getFacePoints_I (long facenumber) |
| This function fills the mSphericPoints array with all the points of the face.
|
void | getFacePoints_II (long facenumber) |
| This function fills the mSphericPoints array with all the points of the face.
|
Detailed Description
This class is an instance of the Geodesic generic class, specific to create a geodesic sphere.
The geosphere is based on a icosahedron (20 triangle faces), which is a frequency 1 geosphere. When you increase the frequency, every face of the base-icosahedron is divided into more triangle, and the more the shape will be close to a sphere. Precisely, frequency 2 means that the edges of a face will be divided into 2 segments. So the face will contain 4 triangles.
- frequency 1 = 1 triangles/face - 3 points/face - 20 triangles/sphere - 60 vertex/sphere - 12 points/sphere
- frequency 2 = 4 triangles/face - 6 points/face - 80 triangles/sphere - 240 vertex/sphere - 48 points/sphere
- frequency 3 = 9 triangles/face - 10 points/face - 180 triangles/sphere - 540 vertex/sphere - ?? points/sphere ...
- frequency 10 = 100 triangles/face - ?? points/face - 2000 triangles/sphere - 6000 vertex/sphere - ?? points/sphere
- frequency N = Nē triangles/face - ?? points/face - 20*Nē triangles/sphere - 60*Nē vertex/sphere - ?? points/sphere Note that the number of vertex is much larger than the number of points. ie, for a freq1 geosphere, it has 12 points, but 60 vertices are generated. This can surely be optimized, but keep in mind that some points have to contain several vertices, because of UV mapping. (especially, the vertice near the border of the texture).
Constructor & Destructor Documentation
Mesh_Geosphere::Mesh_Geosphere |
( |
Real |
radius, |
|
|
int |
frequency = 4 , |
|
|
bool |
class_2 = false |
|
) |
|
|
|
Constructor.
- Parameters:
-
| radius | The radius of the sphere. |
| frequency | The frequency of subdivision. Best values: 1 to 10. |
| class_2 | The class of the geosphere(1 or 2) |
|
Member Function Documentation
void Mesh_Geosphere::getFacePoints |
( |
long |
facenumber |
) |
[protected, virtual] |
|
|
This function fills the mSphericPoints array with all the points of the face.
The points are repositionned, to be on a spheric surface. - Parameters:
-
| facenumber | The number of the face to analyze. |
Reimplemented from Geodesic. |
void Mesh_Geosphere::getFacePoints_I |
( |
long |
facenumber |
) |
[protected] |
|
|
This function fills the mSphericPoints array with all the points of the face.
Given the polyhedron face number, this function calculate the Icosa face points and store them in an array. For Class I geospheres. |
void Mesh_Geosphere::getFacePoints_II |
( |
long |
facenumber |
) |
[protected] |
|
|
This function fills the mSphericPoints array with all the points of the face.
Given the polyhedron face number, this function calculate the Icosa face points and store them in an array. For Class II geospheres. |
The documentation for this class was generated from the following files:
- E:/sphinx/archives/Geometrik/Mesh_Geosphere.h
- E:/sphinx/archives/Geometrik/Mesh_Geosphere.cpp
Generated on Sun May 7 22:53:51 2006 for Geometrik by
1.4.6-NO