Stellarium  0.90.0
List of all members | Classes | Public Member Functions | Public Attributes
S3DScene::Material Struct Reference

Extension of StelOBJ::Material which provides Scenery3d specific stuff. More...

#include <S3DScene.hpp>

+ Inheritance diagram for S3DScene::Material:
+ Collaboration diagram for S3DScene::Material:

Classes

struct  Traits
 

Public Member Functions

 Material (const StelOBJ::Material &stelMat)
 
void loadTexturesAsync ()
 Starts loading the textures in this material asynchronously. More...
 
void fixup ()
 Re-calculates the material traits, and sets invalid material fields to valid values. More...
 
bool updateFadeInfo (double currentJD)
 Re-calculates time fade info, returns true if the object should be rendered. More...
 

Public Attributes

struct S3DScene::Material::Traits traits
 
StelTextureSP tex_Kd
 
StelTextureSP tex_Ke
 
StelTextureSP tex_bump
 
StelTextureSP tex_height
 
bool bAlphatest
 
bool bBackface
 
float fAlphaThreshold
 
Vec2d vis_fadeIn
 
Vec2d vis_fadeOut
 
float vis_fadeValue
 Updated by S3DRenderer when necessary, otherwise always 1.0. More...
 
- Public Attributes inherited from StelOBJ::Material
enum StelOBJ::Material::Illum illum
 
QString name
 Name of the material as defined in the .mtl, default empty. More...
 
QVector3D Ka
 Ambient coefficient. Contains all -1 if not set by .mtl. More...
 
QVector3D Kd
 Diffuse coefficient. Contains all -1 if not set by .mtl. More...
 
QVector3D Ks
 Specular coefficient. Contains all -1 if not set by .mtl. More...
 
QVector3D Ke
 Emissive coefficient. Contains all -1 if not set by .mtl. More...
 
float Ns
 Specular shininess (exponent), should be > 0. Default 8.0. More...
 
float d
 Alpha value (1 means opaque). More...
 
QString map_Ka
 The ambient texture map file path. More...
 
QString map_Kd
 The diffuse texture map file path. More...
 
QString map_Ks
 The specular texture map file path. More...
 
QString map_Ke
 The emissive texture map file path. More...
 
QString map_bump
 The bump/normal texture map file path. More...
 
QString map_height
 The height map texture file path. More...
 
ParamsMap additionalParams
 Contains all other material parameters that are not recognized by this class, but can still be accessed by class users this way. More...
 

Additional Inherited Members

- Public Types inherited from StelOBJ::Material
enum  Illum {
  I_NONE =-1, I_DIFFUSE =0, I_DIFFUSE_AND_AMBIENT =1, I_SPECULAR =2,
  I_TRANSLUCENT =9
}
 MTL Illumination models, see the developer doc for info. More...
 
typedef QMap< QString, QStringList > ParamsMap
 
- Static Public Member Functions inherited from StelOBJ::Material
static QVector< MaterialloadFromFile (const QString &filename)
 Loads all materials contained in an .mtl file. More...
 
- Static Protected Member Functions inherited from StelOBJ::Material
static bool parseBool (const QStringList &params, bool &out)
 Parses a bool from a parameter list (like included in the ::additionalParams) using the same logic StelOBJ uses internally. More...
 
static bool parseFloat (const QStringList &params, float &out)
 Parses a float from a parameter list (like included in the ::additionalParams) using the same logic StelOBJ uses internally. More...
 
static bool parseVec2d (const QStringList &params, Vec2d &out)
 Parses a Vec2d from a parameter list (like included in the ::additionalParams) using the same logic StelOBJ uses internally. More...
 

Detailed Description

Extension of StelOBJ::Material which provides Scenery3d specific stuff.

Definition at line 38 of file S3DScene.hpp.

Member Function Documentation

void S3DScene::Material::fixup ( )

Re-calculates the material traits, and sets invalid material fields to valid values.

This requires all textures to be fully loaded.

void S3DScene::Material::loadTexturesAsync ( )

Starts loading the textures in this material asynchronously.

bool S3DScene::Material::updateFadeInfo ( double  currentJD)

Re-calculates time fade info, returns true if the object should be rendered.

Member Data Documentation

float S3DScene::Material::vis_fadeValue

Updated by S3DRenderer when necessary, otherwise always 1.0.

Definition at line 96 of file S3DScene.hpp.


The documentation for this struct was generated from the following file: