Geodesic Class Reference

Geodesic Shape (generic class). More...

#include <Geodesic.h>

Inheritance diagram for Geodesic:

Mesh_GeoEllipse Mesh_Geosphere List of all members.

Public Member Functions

 Geodesic (int frequency, bool class_2)
 Geodesic constructor.
 ~Geodesic ()
 Geodesic destructor.
void dumpData ()
 This function dumps in a log file, all topological data concerning the geodesic shape.
void createDXFwireframe (String filename)
 This function saves the chord data for symmetry triangle to a DXF file.
void createDXF (String filename)
 This function saves the Face data for symmetry triangle to DXF file.

Protected Member Functions

void createTopology ()
 This function calculates the number of vertices & triangles in a face.
void calculateSphericalCoord ()
 This function calculates the spherical coordinates for a geodesic sphere.
long getFaceNumber ()
 This function returns the number of basic faces per sphere.
double getChordLength (double sphi, double stheta, double ephi, double etheta)
 This function returns the distance between two points given their spherical coordinates.
void chord_factor ()
 This function calculates the chord factors.
void face_factor ()
 This function calculates the face factors.
double cleanFloat (double fp_number)
 This function clean floating point numbers (close to but not quite zero).
double rotate_phi (double, double, double, double)
 phi rotation function
double rotate_theta (double, double, double, double)
 theta rotation function
double axial_angle_A (long index)
 Determine Axial Angle A.
double axial_angle_B (long index, double angleA)
 Determine Axial Angle B.
double face_angle_A (long index)
 Determine Face Angle A.
double face_angle_B (long, double)
 Determine Face Angle B.
double face_angle_C (double, double)
 This function calculates the face angle C from face angles A & B.
Vector3 SphericalToCartesian (CPoints *PolarPoint)
 This function converts Spherical Coordinates to Cartesian Coordinates.

Protected Attributes

CPoints * mPoints
 All the points of a face.
CPoints * mSphericPoints
 All the points of a face.
CLabels * mPointLabels
 Dynamic array for point's labels.
CChords * mEdges
 Dynamic array for all the edges of a face.
CFaces * mTriangles
 Dynamic array for all triangles of a face.

Detailed Description

Geodesic Shape (generic class).

Geodesic shapes can be theorically based on an assembly of triangles, of pentagons (5 sides) or of hexagons (6 sides). Here, we will use only geodesic shapes based on triangles, as it is for 'trimesh' creation. The elementary shape (frequency=1) is the Icosahedron, an assembly of 20 triangles (with 12 points). Note that the function getFacePoints()has to be implemented in derived classes.


Constructor & Destructor Documentation

Geodesic::Geodesic int  frequency,
bool  class_2
 

Geodesic constructor.

The constructor handles all calculation when an instance is called.

Parameters:
frequency The frequency of subdivision (best values: 1 to 10)
class_2 The class (1 or 2) of the geodesic shape


Member Function Documentation

void Geodesic::chord_factor  )  [protected]
 

This function calculates the chord factors.

The function cycles through each vertex, and determines the chord connections.

void Geodesic::face_factor  )  [protected]
 

This function calculates the face factors.

This function cycles through each vertex and determines the face definitions essentially going CCW about the face.

double Geodesic::getChordLength double  sphi,
double  stheta,
double  ephi,
double  etheta
[protected]
 

This function returns the distance between two points given their spherical coordinates.

Radius is fixed at 1.

Parameters:
sphi Phi-coordinate of the first point (S).
stheta Theta-coordinate of the first point (S).
ephi Phi-coordinate of the second point (E).
etheta Theta-coordinate of the second point (E).
Returns:
The distance between S and E.

Vector3 Geodesic::SphericalToCartesian CPoints *  PolarPoint  )  [protected]
 

This function converts Spherical Coordinates to Cartesian Coordinates.

Parameters:
PolarPoint A point in polar coordinates
Returns:
The cartesian coordinates of the same point


The documentation for this class was generated from the following files:
Generated on Sun May 7 22:53:51 2006 for Geometrik by  doxygen 1.4.6-NO