Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtIcoGlobe Class Reference

#include <Globe.h>

Inheritance diagram for vtIcoGlobe:
DymaxIcosa vtTimeTarget

Classes

struct  IcoVert
 
struct  MFace
 

Public Types

enum  Style { GEODESIC, INDEPENDENT_GEODESIC, RIGHT_TRIANGLE, DYMAX_UNFOLD }
 

Public Member Functions

void Create (int iTriangleCount, const vtString &strImagePrefix, Style style=GEODESIC)
 
void Create (int iTriangleCount, vtImage **images, Style style)
 
vtTransformGetTop ()
 
vtGroupGetSurface ()
 
void SetInflation (float f)
 
void SetUnfolding (float f)
 
void SetCulling (bool bCull)
 
void SetLighting (bool bLight)
 
void SetTime (const vtTime &time)
 
void ShowAxis (bool bShow)
 
void SetSeasonalTilt (bool bTilt)
 
bool GetSeasonalTilt ()
 
FQuat GetRotation ()
 
GlobeLayerArrayGetGlobeLayers ()
 
int AddGlobeFeatures (const char *fname, float fSize)
 
void RemoveLayer (GlobeLayer *glay)
 
void AddTerrainRectangles (vtTerrainScene *pTerrainScene)
 
double AddSurfaceLineToMesh (vtGeomFactory *pMF, const DPoint2 &g1, const DPoint2 &g2)
 
double AddSurfaceLineToMesh (vtGeomFactory *pMF, const DLine2 &line)
 
void SetEarthMaterials (vtMaterialArray *mats)
 
vtMaterialArrayGetEarthMaterials ()
 
- Public Member Functions inherited from DymaxIcosa
void InitIcosa ()
 
void FindFaceUV (const DPoint2 &p, int &face, int &subface, DPoint3 &uvw)
 
void FindFace (const DPoint3 &p, int &face, int &subface)
 
void FindUV (const DPoint3 &p_in, int face, DPoint3 &uvw)
 
void GeoToFacePoint (const DPoint2 &p, int &face, int &subface, DPoint3 &p_out)
 
void FaceUVToGeo (int face, DPoint3 &uvw, double &lon, double &lat)
 
bool GeoToDymax (const DPoint2 &geo, DPoint2 &dymax)
 
double DihedralAngle ()
 
void GetDymaxEdges (DLine2Array &polys)
 

Protected Member Functions

void CreateMeshMat (int iTriangleCount)
 
vtMaterialArrayCreateMaterialsFromFiles (const vtString &strImagePrefix)
 
vtMaterialArrayCreateMaterialsFromImages (vtImage **images)
 
void CreateCoreMaterials ()
 
void CreateNodes ()
 
int GetMFace (int face, int subface)
 
void BuildSphericalFeatures (GlobeLayer *glay, float fSize)
 
void BuildSphericalPoints (GlobeLayer *glay, float fSize)
 
void BuildSphericalLines (GlobeLayer *glay, float fSize)
 
void BuildSphericalPolygons (GlobeLayer *glay, float fSize)
 
void BuildFlatFeatures (GlobeLayer *glay, float fSize)
 
void BuildFlatPoint (GlobeLayer *glay, int i, float fSize)
 
void FindLocalOrigin (int mface)
 
void SetMeshConnect (int mface)
 
void EstimateTesselation (int iTriangleCount)
 
void CreateUnfoldableDymax ()
 
void CreateNormalSphere ()
 
void CreateIndependentGeodesicSphere ()
 
void add_face1 (vtMesh *mesh, int face, bool second)
 
void set_face_verts1 (vtMesh *geom, int face, float f)
 
void add_face2 (vtMesh *mesh, int face, int mface, int subfaces, bool second)
 
void set_face_verts2 (vtMesh *geom, int face, float f)
 
void add_subface (vtMesh *mesh, int face, int v0, int v1, int v2, bool flip, int depth)
 
void refresh_face_positions (vtMesh *mesh, int mface, float f)
 
void create_independent_face (int face, bool second)
 
void add_face_independent_meshes (int pair, int face, bool second)
 
- Protected Member Functions inherited from DymaxIcosa
void AddFlatTri (DLine2Array &polys, int a, int b, int c, int d=-1)
 

Protected Attributes

vtIcoGlobe::Style m_style
 
vtTransformm_top
 
vtGroupm_SurfaceGroup
 
vtGeodem_pAxisGeom
 
vtMaterialArraym_coremats
 
vtMaterialArraym_earthmats
 
std::vector< int > m_globe_mat
 
int m_red
 
int m_yellow
 
int m_white
 
std::vector< vtMesh * > m_mesh
 
int m_meshes
 
bool m_bUnfolded
 
bool m_bTilt
 
FQuat m_Rotation
 
vtMeshm_cylinder
 
vtGeodem_pRectangles
 
vtGeodem_GlobeGeom
 
int m_freq
 
int m_subfreq
 
int m_vert
 
vtArray< IcoVertm_rtv [22]
 
int m_depth
 
MFace m_mface [22]
 
FQuat m_diff
 
GlobeLayerArray m_GlobeLayers
 
- Protected Attributes inherited from DymaxIcosa
DPoint3 m_verts [12]
 
icoface m_face [20]
 
DPoint2 m_flatverts [27]
 
double m_edge_length
 

Detailed Description

vtIcoGlobe is an icosahedral globe. To use it:

The globe has unit radius.

Member Function Documentation

void vtIcoGlobe::Create ( int  iTriangleCount,
const vtString strImagePrefix,
Style  style = GEODESIC 
)

Create the globe's geometry and nodes.

Parameters
iTriangleCountThe desired triangle count of the entire globe. The class will attempt to match this value as closely as possible with the indicated tessellation.
strImagePrefixThe base of the filename for the set of icosahedral surface textures. For example, if your textures have the name "geosphere_*.jpg", pass "geosphere_"
styleTessellation style, can be one of:
  • GEODESIC A classic geodesic tiling based on subdividing the edges of the icosahedron and gnomonically projecting them to the sphere.
  • RIGHT_TRIANGLE An alternative approach where each face is divided into right triangles recursively.
  • DYMAX_UNFOLD Same as RIGHT_TRIANGLE but the faces are also placed on seperate geometries so that the globe can be unfolded in the Dymaxion style.
void vtIcoGlobe::SetInflation ( float  f)

Set the amount of inflation of the globe.

Parameters
fRanges from 0 (icosahedron) to 1 (sphere)
void vtIcoGlobe::SetUnfolding ( float  f)

Set the amount of unfolding of the globe.

Parameters
fRanges from 0 (sphere/icosahedron) to 1 (entirely unfolded flat)

The documentation for this class was generated from the following files: