GlobeEngine
at::Planet Class Reference

#include <Planet.h>

Inheritance diagram for at::Planet:
ge::Sphere ge::DrawableComponent ge::GlobeComponent

Public Member Functions

 Planet ()
 
 ~Planet ()
 
void setSunEnvironment (std::vector< at::Sun * > _sunVec)
 
void updateUniforms ()
 
void setRadius (float _radius, float _scaling)
 
float getRadius ()
 
void addAtmosphereShell (std::shared_ptr< at::AtmosphereShell > s)
 
bool addAtmosphereShell (int innerRadius, int outerRadius, double density)
 
void deleteAtmosphereShell (int position_)
 
void setAtmosphereEnvironment (std::vector< std::shared_ptr< at::AtmosphereShell > > _atVec)
 
std::vector< std::shared_ptr< at::AtmosphereShell > > getAtmosphereEnvironment ()
 
void activateNightMode (std::shared_ptr< ge::Shader > _shader, GLuint _texhandle)
 
void deactivateNightMode ()
 
void toggleNightMode (bool b_)
 
void toggleAtmosphereRenderingMode (int i_)
 
void toggleAutoscale ()
 
void scaleAtmosphere ()
 
void setPlanetSunDist (double dist_)
 
double getPlanetSunDist ()
 
void updateAtmosphere ()
 
void loadPresets (std::string name_, std::string projectPath_, float scaling_, std::vector< Sun * > sunEnv_, float _radius, float _sunDist, GLuint _handle)
 
void loadPresets (int order_, std::string projectPath_, float scaling_, std::vector< Sun * > sunEnv_)
 
void linkAtmosphareShader (std::shared_ptr< ge::Shader > shader_)
 
void loadPresetTextures (std::string projectPath_)
 
void calculatePlanetSurfaceLighting ()
 
void setSpectrum (int rl, int rh, int gl, int gh, int bl, int bh)
 
std::string getPlanetName ()
 
double interpolateEarthNumberDensity (double heightInKm_)
 
double getAverageEarthNumberDensity (int lowBound_, int highBound_, int iterations_)
 
std::shared_ptr< at::AtmosphereCompositionconstructChemicalCompounds (int earthAtmosphereLayer_)
 
void draw (std::shared_ptr< ge::Camera > _cam)
 
void setRotation (vmml::Vector3d r)
 
void setShader (std::shared_ptr< ge::Shader > _shader)
 
void setPosition (vmml::Vector3f _pos)
 
- Public Member Functions inherited from ge::Sphere
 Sphere ()
 
 ~Sphere ()
 
void clear () override
 
void create () override
 
void create (int _vertCircles, int _pointsPerCircle)
 
void update () override
 
void draw (std::shared_ptr< ge::Camera > _cam) override
 
void setAlpha (GLfloat _alpha)
 
void setAmbient (vmml::Vector4f _ambient)
 
void setDiffuse (vmml::Vector4f _diffuse)
 
void setSpectrumColor (vmml::Vector4f _spectrumColor)
 
void setLightPosition (vmml::Vector3d _position)
 
- Public Member Functions inherited from ge::DrawableComponent
 DrawableComponent ()
 
 ~DrawableComponent ()
 
 DrawableComponent (const DrawableComponent &_in)=delete
 
DrawableComponentoperator= (const DrawableComponent &_in)=delete
 
virtual void setPosition (vmml::Vector3d _position)
 
vmml::Vector3d getPosition () const
 
virtual void setScale (vmml::Vector3d _scale)
 
vmml::Vector3d getScale () const
 
vmml::Vector3d getRotation () const
 
void setBoundingSphere (BoundingSphere _boundingSphere)
 
void setBoundingBox (BoundingBox3d _boundingBox)
 
const BoundingSpheregetBoundingSphere () const
 
const BoundingBox3dgetBoundingBox () const
 
bool isVisible () const
 
virtual void isVisible (bool _input)
 
bool isGeometryReady () const
 
virtual void isGeometryReady (bool _input)
 
virtual void setColor (vmml::Vector3f _color)
 
const vmml::Vector3f getColor () const
 
virtual void setColorPerVertex (unsigned int _in)
 
unsigned int getColorPerVertex () const
 
void setTextured (bool _in)
 
bool isTextured ()
 
void setTextureHandle (GLuint _handle)
 
GLuint getTextureHandle () const
 
void setNormalTextureHandle (GLuint _handle)
 
GLuint getNormalTextureHandle () const
 
void setNormalMapped (bool _in)
 
bool isNormalMapped ()
 
virtual void setShader (std::shared_ptr< ge::Shader > _shader)
 
void setStandardUniforms ()
 
const std::shared_ptr< ge::ShadergetShader () const
 
void recompileShader ()
 
void setNormalMatrix ()
 
void setModelMatrices ()
 
vmml::Matrix4d getModelMatrix () const
 
vmml::Matrix4d getInverseModelMatrix () const
 
void setViewProjMatrices (const std::shared_ptr< ge::Camera > _cam)
 
void setMVPMatrix (const std::shared_ptr< ge::Camera > _cam)
 
virtual void enableOcclusionQueries (bool _in)
 
void beginOcclusionQuery (RENDERSTATE _state)
 
void endOcclusionQuery (RENDERSTATE _state)
 
GLuint getQueryResult ()
 
void enablePointSprites ()
 
void disablePointSprites ()
 
void fillIndexBufferWithLinearValues ()
 
void enableVertexAttributes (int vaaSize=2)
 
void disableVertexAttributes (int vaaSize=2)
 
void setNumberOfVertexAttributes (unsigned int _in)
 
void generateVertexHandlesFromShader (int _bufferCount=0)
 
void setVertexAttributePointer (GLuint _bufferID, GLuint _index, GLint _size, GLenum _type)
 
void setVertexAttributePointerNormalized (GLuint _bufferID, GLuint _index, GLint _size, GLenum _type)
 
void setVertexLongAttributePointer (GLuint _bufferID, GLuint _index, GLint _size, GLenum _type)
 
void unbindVertexBuffers ()
 
void setAttributeBuffer1i (int _bufferID, int _input)
 
void setAttributeBuffer1i (int _bufferID, std::vector< int > _input)
 
void setAttributeBuffer1f (int _bufferID, float _value)
 
void setAttributeBuffer1f (int _bufferID, std::vector< float > _input)
 
void addVertex3fAttribute (unsigned int _bufferPos, unsigned int _size, const vmml::Vector3d _value)
 
void addVertex3fAttribute (unsigned int _bufferPos, unsigned int _size, const vmml::Vector3d *_values)
 
void addCustomVertexAttributef (unsigned int _bufferPos, unsigned int _attributeCount, unsigned int _sizePerAttribute, float **_values)
 
void setDepthMatrix (vmml::Matrix4d _mat)
 
void setDepthMatrixUniform ()
 
void setDepthTextureHandle (GLuint _handle)
 
void setDepthUniforms ()
 
GLuint getDepthTextureHandle () const
 
void setPickingInformation ()
 
void createMultiDrawPointerList (GLuint _numberOfDrawObjects, GLsizei *_stripLenghts)
 
void createMultiDrawPointerList (GLuint _numberOfDrawObjects, GLsizei _stripLenghts)
 
void drawMultiElements (GLenum _mode, const GLsizei *_count, GLsizei _drawcount)
 
void drawArrays (GLenum _mode, GLint _first, GLsizei _count)
 
void drawElements (GLenum _mode, GLsizei _count, const GLvoid *_indices)
 
void drawMultiArrays (GLenum _mode, const GLsizei *_count, GLsizei _drawcount)
 
void enablePrimitiveRestart ()
 
void disablePrimitiveRestart ()
 
void setPrimitiveRestartIndex (GLuint _in)
 
unsigned int getVertexCount () const
 
void setVertexAttributePointerForBuffer (unsigned int _bufferID, unsigned int _size, GLenum _type)
 
- Public Member Functions inherited from ge::GlobeComponent
 GlobeComponent ()
 
virtual ~GlobeComponent ()=0
 
GLuint getUID () const
 
virtual void setUID (GLuint _input)
 
GLuint getGroupID () const
 
virtual void setGroupID (GLuint _input)
 
const std::string getName () const
 
void setName (std::string _name)
 

Protected Member Functions

void drawAtmosphere (std::shared_ptr< ge::Camera > _cam)
 

Protected Attributes

float EARTH_RADIUS
 
double distanceFromSun
 
int renderingMode
 
float scalingFactor
 
float planetRadius
 
float atmosphereRadius
 
at::PlanetNightnightSphere
 
bool autoscaleAtmosphere
 
bool preloaded
 
bool nightMode
 
std::vector< at::Sun * > sunEnvironment
 
std::vector< std::shared_ptr< at::AtmosphereShell > > atmosphereEnvironment
 
std::string planetName
 
std::string projectPath
 
std::shared_ptr< ge::ShaderatmosphereShader
 
GLfloat * sunPositions
 
GLint uniformSunCount
 
GLint uniformSunLocation
 
GLint uniformPlanetLocation
 
GLint uniformNightmodeLocation
 
GLint uniformLowRed
 
GLint uniformHighRed
 
GLint uniformLowGreen
 
GLint uniformHighGreen
 
GLint uniformLowBlue
 
GLint uniformHighBlue
 
GLint uniformCenterColor
 
GLint uniformBorderColor
 
GLint uniformPlanetRadius
 
GLint uniformAtmosphereRadius
 
vmml::Vector4f centerColor
 
vmml::Vector4f borderColor
 
int lowRed
 
int highRed
 
int lowGreen
 
int highGreen
 
int lowBlue
 
int highBlue
 
std::shared_ptr< ge::Texture2Drgbawhitetex
 
std::shared_ptr< ge::Texture2DrgbamercuryTexture
 
std::shared_ptr< ge::Texture2DrgbavenusTexture
 
std::shared_ptr< ge::Texture2DrgbaearthTexture
 
std::shared_ptr< ge::Texture2DrgbaearthNightTexture
 
std::shared_ptr< ge::Texture2DrgbamarsTexture
 
std::shared_ptr< ge::Texture2DrgbajupiterTexture
 
std::shared_ptr< ge::Texture2DrgbasaturnTexture
 
std::shared_ptr< ge::Texture2DrgbauranusTexture
 
std::shared_ptr< ge::Texture2DrgbaneptuneTexture
 
std::shared_ptr< ge::Texture2DrgbaplutoTexture
 
- Protected Attributes inherited from ge::Sphere
GLfloat alpha
 
vmml::Vector4f ambient
 
vmml::Vector4f diffuse
 
vmml::Vector3d lightPosition
 
vmml::Vector4f spectrumColor
 
int vertCircles
 
int pointsPerCircle
 
- Protected Attributes inherited from ge::DrawableComponent
std::shared_ptr< ge::Shadershader
 
vmml::Vector3d position
 
vmml::Vector3d scale
 
vmml::Vector3d rotations
 
vmml::Vector3f color
 
unsigned int colorPerVertex
 
bool textured
 
GLuint colorTexHandle
 
bool normalMapped
 
GLuint normalTexHandle
 
BoundingSphereboundingSphere
 
BoundingBox3dboundingBox
 
vmml::Matrix4d modelMatrix
 
vmml::Matrix4d mvpMatrix
 
vmml::Matrix3d normalMatrix
 
vmml::Matrix4d depthTextureMatrix
 
GLuint depthTextureHandle
 
ge::VertexArrayObject vao
 
ge::VertexBufferArray attributes
 
GLuint vertexCount
 
GLuint indexCount
 
ge::IndexBuffer indexBuffer
 
GLuint multiDrawPointerListSize
 
const GLvoid ** multiDrawPointerList
 
GLint * multiDrawArraysList
 
GLuint occlusionQueryState
 
GLuint occlusionQueryID
 
GLuint queryResultPixelCount
 
GLint uniformViewMatrixLocation
 
GLint uniformProjectionMatrixLocation
 
GLint uniformModelMatrixLocation
 
GLint uniformMVPMatrixLocation
 
GLint uniformObjectColorLocation
 
GLint uniformColorPerVertexLocation
 
GLint uniformObjectIDLocation
 
GLint uniformObjectGroupIDLocation
 
- Protected Attributes inherited from ge::GlobeComponent
int uid
 
int group_uid
 
std::string name
 

Additional Inherited Members

- Public Types inherited from ge::DrawableComponent
enum  RENDERSTATE {
  STENCILPASS, DEPTHPASS, RENDER, OCCLUSIONTEST,
  OCCLUSIONGROUNDTEST, OCCLUSIONRESULT, EMPTY, DECALPASS
}
 
- Static Public Member Functions inherited from ge::Sphere
static vmml::Vector3d convertPolarToEuclidean (double _theta, double _phi)
 
static vmml::Vector2d convertEucledianToPolar (vmml::Vector3d _in, double _radius)
 

Constructor & Destructor Documentation

at::Planet::Planet ( )
at::Planet::~Planet ( )

Member Function Documentation

void at::Planet::activateNightMode ( std::shared_ptr< ge::Shader _shader,
GLuint  _texhandle 
)
void at::Planet::addAtmosphereShell ( std::shared_ptr< at::AtmosphereShell s)
bool at::Planet::addAtmosphereShell ( int  innerRadius,
int  outerRadius,
double  density 
)
void at::Planet::calculatePlanetSurfaceLighting ( )
std::shared_ptr< at::AtmosphereComposition > at::Planet::constructChemicalCompounds ( int  earthAtmosphereLayer_)
void at::Planet::deactivateNightMode ( )
void at::Planet::deleteAtmosphereShell ( int  position_)
void at::Planet::draw ( std::shared_ptr< ge::Camera _cam)
void at::Planet::drawAtmosphere ( std::shared_ptr< ge::Camera _cam)
protected
std::vector< std::shared_ptr< at::AtmosphereShell > > at::Planet::getAtmosphereEnvironment ( )
double at::Planet::getAverageEarthNumberDensity ( int  lowBound_,
int  highBound_,
int  iterations_ 
)
std::string at::Planet::getPlanetName ( )
double at::Planet::getPlanetSunDist ( )
float at::Planet::getRadius ( )
double at::Planet::interpolateEarthNumberDensity ( double  heightInKm_)
void at::Planet::linkAtmosphareShader ( std::shared_ptr< ge::Shader shader_)
void at::Planet::loadPresets ( std::string  name_,
std::string  projectPath_,
float  scaling_,
std::vector< Sun * >  sunEnv_,
float  _radius,
float  _sunDist,
GLuint  _handle 
)
void at::Planet::loadPresets ( int  order_,
std::string  projectPath_,
float  scaling_,
std::vector< Sun * >  sunEnv_ 
)
void at::Planet::loadPresetTextures ( std::string  projectPath_)
void at::Planet::scaleAtmosphere ( )
void at::Planet::setAtmosphereEnvironment ( std::vector< std::shared_ptr< at::AtmosphereShell > >  _atVec)
void at::Planet::setPlanetSunDist ( double  dist_)
void at::Planet::setPosition ( vmml::Vector3f  _pos)
void at::Planet::setRadius ( float  _radius,
float  _scaling 
)
void at::Planet::setRotation ( vmml::Vector3d  r)
virtual

Reimplemented from ge::Sphere.

void at::Planet::setShader ( std::shared_ptr< ge::Shader _shader)

custom

void at::Planet::setSpectrum ( int  rl,
int  rh,
int  gl,
int  gh,
int  bl,
int  bh 
)
void at::Planet::setSunEnvironment ( std::vector< at::Sun * >  _sunVec)
void at::Planet::toggleAtmosphereRenderingMode ( int  i_)
void at::Planet::toggleAutoscale ( )
void at::Planet::toggleNightMode ( bool  b_)
void at::Planet::updateAtmosphere ( )
void at::Planet::updateUniforms ( )

Member Data Documentation

std::vector<std::shared_ptr<at::AtmosphereShell> > at::Planet::atmosphereEnvironment
protected
float at::Planet::atmosphereRadius
protected
std::shared_ptr<ge::Shader> at::Planet::atmosphereShader
protected
bool at::Planet::autoscaleAtmosphere
protected
vmml::Vector4f at::Planet::borderColor
protected
vmml::Vector4f at::Planet::centerColor
protected
double at::Planet::distanceFromSun
protected
float at::Planet::EARTH_RADIUS
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::earthNightTexture
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::earthTexture
protected
int at::Planet::highBlue
protected
int at::Planet::highGreen
protected
int at::Planet::highRed
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::jupiterTexture
protected
int at::Planet::lowBlue
protected
int at::Planet::lowGreen
protected
int at::Planet::lowRed
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::marsTexture
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::mercuryTexture
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::neptuneTexture
protected
bool at::Planet::nightMode
protected
at::PlanetNight* at::Planet::nightSphere
protected
std::string at::Planet::planetName
protected
float at::Planet::planetRadius
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::plutoTexture
protected
bool at::Planet::preloaded
protected
std::string at::Planet::projectPath
protected
int at::Planet::renderingMode
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::saturnTexture
protected
float at::Planet::scalingFactor
protected
std::vector<at::Sun*> at::Planet::sunEnvironment
protected
GLfloat* at::Planet::sunPositions
protected
GLint at::Planet::uniformAtmosphereRadius
protected
GLint at::Planet::uniformBorderColor
protected
GLint at::Planet::uniformCenterColor
protected
GLint at::Planet::uniformHighBlue
protected
GLint at::Planet::uniformHighGreen
protected
GLint at::Planet::uniformHighRed
protected
GLint at::Planet::uniformLowBlue
protected
GLint at::Planet::uniformLowGreen
protected
GLint at::Planet::uniformLowRed
protected
GLint at::Planet::uniformNightmodeLocation
protected
GLint at::Planet::uniformPlanetLocation
protected
GLint at::Planet::uniformPlanetRadius
protected
GLint at::Planet::uniformSunCount
protected
GLint at::Planet::uniformSunLocation
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::uranusTexture
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::venusTexture
protected
std::shared_ptr<ge::Texture2Drgba> at::Planet::whitetex
protected

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