My Project
Loader.h
1 #pragma once
2 #include "Terrain.h"
3 
4 
5 namespace ParaTerrain
6 {
8 
14  class Loader
15  {
16  public:
18  static Loader *GetInstance();
29  HRESULT LoadElevations( Terrain * pTerrain, const char * szFilename, float fTerrainSize, float elevationScale, bool swapVertical=TRUE );
30 
39  HRESULT LoadElevations( float **ppImageData, int* nSize, const char * szFilename, bool swapVertical=TRUE);
40 
44  HRESULT LoadHoleFile(Terrain * pTerrain, const char * szFilename, short nHoleScale);
45 
48  void LoadTerrainTexture(Terrain * pTerrain, const char * fileName);
50 
52  void LoadCommonTerrainTexture(Terrain * pTerrain, const char * fileName);
53 
54 
55  HRESULT LoadTerrainInfo(Terrain *pTerrain,const char* szFilename);
56  private:
57  Loader();
58  ~Loader();
59  void ApplyTexture(Terrain * pTerrain, const char *szFilename, bool isBaseTexture);
60  };
61 }
Definition: SceneObject.h:15
void LoadTerrainTexture(Terrain *pTerrain, const char *fileName)
The texture will automatically be chopped into TextureCell objects and a grid of textures will be arr...
Definition: Loader.cpp:252
The Loader is a Singleton object that provides access to ElevationLoaders and TextureLoaders.
Definition: Loader.h:14
static Loader * GetInstance()
Returns the Singleton instance of the Loader class.
Definition: Loader.cpp:25
void LoadCommonTerrainTexture(Terrain *pTerrain, const char *fileName)
Uses the specified TextureLoader library to apply a repeating common texture to the specified Terrain...
Definition: Loader.cpp:259
This class represents a single, contiguous chunk of terrain and is the primary public interface to De...
Definition: Terrain.h:386
HRESULT LoadHoleFile(Terrain *pTerrain, const char *szFilename, short nHoleScale)
[absoleted: holes are specified in terrain config file] Load the terrain hole file.
Definition: Loader.cpp:32
HRESULT LoadElevations(Terrain *pTerrain, const char *szFilename, float fTerrainSize, float elevationScale, bool swapVertical=TRUE)
Definition: Loader.cpp:197