PixelLightAPI
.
|
Geometrically MipMapping surface. More...
#include <GMMSurface.h>
Classes | |
struct | Vertex |
GMM surface vertex. More... | |
Public Member Functions | |
PLS_API | GMMSurface (PLRenderer::Renderer &cRenderer) |
Constructor. | |
PLS_API | ~GMMSurface () |
Destructor. | |
PLS_API bool | Create (PLCore::uint32 nHeightMapSize, float fHeightMap[], PLCore::uint32 nPatchSize=16, int nGeoMipMaps=-1) |
Creates the GMM surface. | |
PLS_API void | Destroy () |
Kills the GMM surface. | |
PLS_API const PLMath::Vector3 & | GetViewerPos () const |
Returns the viewer position. | |
PLS_API void | SetViewerPos (const PLMath::Vector3 &vPos) |
Sets the viewer position. | |
PLS_API PLCore::uint32 | GetHeightMapSize () const |
Returns the size of the height map. | |
PLS_API const float * | GetHeightMap () const |
Returns a pointer to the height map. | |
PLS_API PLCore::uint32 | GetVertices () const |
Returns the number of surface vertices. | |
PLS_API Vertex * | GetVertex (PLCore::uint32 nID=0) const |
Returns a pointer to a surface vertex. | |
PLS_API float | GetHeight (PLCore::uint32 nX, PLCore::uint32 nY) const |
Returns the height of a height map coordinate. | |
PLS_API bool | SetHeight (PLCore::uint32 nX, PLCore::uint32 nY, float fHeight=0) |
Sets the height of a height map coordinate. | |
PLS_API PLCore::uint32 | GetPatchSize () const |
Returns the size of a patch. | |
PLS_API PLCore::uint32 | GetXYPatches () const |
Returns the number of patches per column/row. | |
PLS_API PLCore::uint32 | GetPatches () const |
Returns the total number of patches in the GMM surface. | |
PLS_API GMMSurfacePatch * | GetPatch (PLCore::uint32 nID) const |
Returns a pointer to the patch with the given ID. | |
PLS_API PLCore::uint32 | GetGeoMipMaps () const |
Returns the number of geometrically mip maps. | |
PLS_API void | SetNeighbours (GMMSurface *pLeft=nullptr, GMMSurface *pTop=nullptr, GMMSurface *pRight=nullptr, GMMSurface *pBottom=nullptr) |
Sets the neighbour GMM surfaces. | |
PLS_API PLRenderer::MaterialHandler & | GetMaterialHandler () |
Returns the surface material handler. | |
PLS_API PLMath::Quadtree & | GetQuadtree () |
Returns the GMM surface quadtree. | |
PLS_API void | Update () |
Updates the GMM surface. | |
PLS_API void | Draw () const |
Draws the GMM surface. |
Geometrically MipMapping surface.
PLS_API PLScene::GMMSurface::GMMSurface | ( | PLRenderer::Renderer & | cRenderer | ) |
Constructor.
[in] | cRenderer | Renderer to use |
PLS_API PLScene::GMMSurface::~GMMSurface | ( | ) |
Destructor.
PLS_API bool PLScene::GMMSurface::Create | ( | PLCore::uint32 | nHeightMapSize, |
float | fHeightMap[], | ||
PLCore::uint32 | nPatchSize = 16 , |
||
int | nGeoMipMaps = -1 |
||
) |
Creates the GMM surface.
[in] | nHeightMapSize | Height map size |
[in] | fHeightMap | Reference to the height map |
[in] | nPatchSize | Patch size |
[in] | nGeoMipMaps | Number of geometrically mip maps, -1 = automatic |
PLS_API void PLScene::GMMSurface::Destroy | ( | ) |
Kills the GMM surface.
PLS_API const PLMath::Vector3& PLScene::GMMSurface::GetViewerPos | ( | ) | const |
Returns the viewer position.
PLS_API void PLScene::GMMSurface::SetViewerPos | ( | const PLMath::Vector3 & | vPos | ) |
Sets the viewer position.
[in] | vPos | Viewer position |
PLS_API PLCore::uint32 PLScene::GMMSurface::GetHeightMapSize | ( | ) | const |
Returns the size of the height map.
PLS_API const float* PLScene::GMMSurface::GetHeightMap | ( | ) | const |
Returns a pointer to the height map.
PLS_API PLCore::uint32 PLScene::GMMSurface::GetVertices | ( | ) | const |
Returns the number of surface vertices.
PLS_API Vertex* PLScene::GMMSurface::GetVertex | ( | PLCore::uint32 | nID = 0 | ) | const |
Returns a pointer to a surface vertex.
[in] | nID | ID of the vertex |
PLS_API float PLScene::GMMSurface::GetHeight | ( | PLCore::uint32 | nX, |
PLCore::uint32 | nY | ||
) | const |
Returns the height of a height map coordinate.
[in] | nX | Height map x coordinate |
[in] | nY | Height map y coordinate |
PLS_API bool PLScene::GMMSurface::SetHeight | ( | PLCore::uint32 | nX, |
PLCore::uint32 | nY, | ||
float | fHeight = 0 |
||
) |
Sets the height of a height map coordinate.
[in] | nX | Height map x coordinate |
[in] | nY | Height map y coordinate |
[in] | fHeight | New height at the coordinate |
PLS_API PLCore::uint32 PLScene::GMMSurface::GetPatchSize | ( | ) | const |
Returns the size of a patch.
PLS_API PLCore::uint32 PLScene::GMMSurface::GetXYPatches | ( | ) | const |
Returns the number of patches per column/row.
PLS_API PLCore::uint32 PLScene::GMMSurface::GetPatches | ( | ) | const |
Returns the total number of patches in the GMM surface.
PLS_API GMMSurfacePatch* PLScene::GMMSurface::GetPatch | ( | PLCore::uint32 | nID | ) | const |
Returns a pointer to the patch with the given ID.
[in] | nID | ID of the patch which should be returned |
PLS_API PLCore::uint32 PLScene::GMMSurface::GetGeoMipMaps | ( | ) | const |
Returns the number of geometrically mip maps.
PLS_API void PLScene::GMMSurface::SetNeighbours | ( | GMMSurface * | pLeft = nullptr , |
GMMSurface * | pTop = nullptr , |
||
GMMSurface * | pRight = nullptr , |
||
GMMSurface * | pBottom = nullptr |
||
) |
Sets the neighbour GMM surfaces.
[in] | pLeft | The left neighbour GMM surface |
[in] | pTop | The top neighbour GMM surface |
[in] | pRight | The right neighbour GMM surface |
[in] | pBottom | The bottom neighbour GMM surface |
Returns the surface material handler.
PLS_API PLMath::Quadtree& PLScene::GMMSurface::GetQuadtree | ( | ) |
Returns the GMM surface quadtree.
PLS_API void PLScene::GMMSurface::Update | ( | ) |
Updates the GMM surface.
PLS_API void PLScene::GMMSurface::Draw | ( | ) | const |
Draws the GMM surface.
|