#include <Geodesic.h>
Inheritance diagram for Geodesic:
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. |
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.
|
Geodesic constructor. The constructor handles all calculation when an instance is called.
|
|
This function calculates the chord factors. The function cycles through each vertex, and determines the chord connections. |
|
This function calculates the face factors. This function cycles through each vertex and determines the face definitions essentially going CCW about the face. |
|
This function returns the distance between two points given their spherical coordinates. Radius is fixed at 1.
|
|
This function converts Spherical Coordinates to Cartesian Coordinates.
|