mElite
1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
|
Static class which allows all the file access. More...
#include <FileAccess.h>
Static Public Member Functions | |
static TextureSlot | getPlanetSlot (unsigned int index) |
Gives the TextureSlot that is assigned to a given index. | |
static std::string | getTextureFile (TextureName texture) |
Returns the filename for a given texture. | |
static TextureAccess | getTextureInfo (TextureName texture) |
Returns the TextureInfo for a given texture. | |
static void | loadTexture (TextureSlot slot, TextureName texture) |
static std::string | getObjectFile (ObjectName object) |
static ObjectAccess | getObjectInfo (ObjectName object) |
static Vector3 | getObjectView (ObjectName object) |
static float | getObjectFactor (ObjectName object) |
static void | loadObject (ObjectName object) |
Loads a 3d object from a file. | |
Static class which allows all the file access.
Handling the file access means all accesses to textures and objects are handled. Included are methods to load files containt images and 3d game objects, retrieving information about loaded objects and modify them in a way that they can be used in the program.
Definition at line 58 of file FileAccess.h.
|
static |
Returns the scale factor of a given object.
object | the given object |
Definition at line 115 of file FileAccess.cpp.
|
static |
Returns the filename for an object given as ObjectName.
object | the given object |
Definition at line 90 of file FileAccess.cpp.
|
static |
Returns the information for a given object. Returned are the filename and the view direction of the object.
object | the given object |
Definition at line 99 of file FileAccess.cpp.
|
static |
Returns the view direction of a given object.
object | the given object |
Definition at line 107 of file FileAccess.cpp.
|
static |
Gives the TextureSlot that is assigned to a given index.
It is mainly a translation function to translate from an integer to a TextureSlot.
index | number of the planet slot whose nome is asked for |
Definition at line 22 of file FileAccess.cpp.
|
static |
Returns the filename for a given texture.
The filename is created from the information in the static textureInfos[] array. If a texture is available in different sizes, an suffix is added to the name.
texture | name of the texture |
Definition at line 36 of file FileAccess.cpp.
|
static |
Returns the TextureInfo for a given texture.
Returns are the name, the filetype and the information if the texture exists in multiple qualities.
texture | the texture name |
Definition at line 69 of file FileAccess.cpp.
|
static |
Loads a 3d object from a file.
In this procedure a file is loaded, the meshs are extracted and a display list is created.
object | the given object |
Definition at line 126 of file FileAccess.cpp.
|
static |
Loads a texture which is provided as a TextureName into a TextureSlot.
This is procedure is done because the number of simultaneous loaded textures should be limited.
slot | the slot in which the texture should be loaded |
texture | the texture |
Definition at line 81 of file FileAccess.cpp.