#include <LandVisibilityPatch.h>
Definition at line 28 of file LandVisibilityPatch.h.
| LandVisibilityPatch::LandVisibilityPatch | ( | ) |
Definition at line 34 of file LandVisibilityPatch.cpp.
| LandVisibilityPatch::~LandVisibilityPatch | ( | ) |
Definition at line 43 of file LandVisibilityPatch.cpp.
| void LandVisibilityPatch::setLocation | ( | int | x, | |
| int | y, | |||
| LandVisibilityPatch * | leftPatch, | |||
| LandVisibilityPatch * | rightPatch, | |||
| LandVisibilityPatch * | topPatch, | |||
| LandVisibilityPatch * | bottomPatch | |||
| ) |
Definition at line 91 of file LandVisibilityPatch.cpp.
References bottomPatch_, calculateErrors(), dataOffSet_, dataSize_, DIALOG_ASSERT, ScorchedContext::getLandscapeMaps(), ScorchedClient::instance(), leftPatch_, rightPatch_, topPatch_, x_, and y_.
Referenced by VisibilityPatchGrid::generate().
| bool LandVisibilityPatch::setVisible | ( | float | distance | ) |
Definition at line 165 of file LandVisibilityPatch.cpp.
References calculateErrors(), OptionsDisplay::getLandDetailLevelRamp(), OptionsDisplay::getNoLandLOD(), indexErrors_, OptionsDisplay::instance(), recalculateErrors_, visibilityIndex_, and visible_.
Referenced by VisibilityPatchQuad::setVisible().
| void LandVisibilityPatch::setNotVisible | ( | ) |
Definition at line 194 of file LandVisibilityPatch.cpp.
References visible_.
Referenced by VisibilityPatchQuad::setNotVisible().
| void LandVisibilityPatch::setRecalculateErrors | ( | ) | [inline] |
Definition at line 41 of file LandVisibilityPatch.h.
References recalculateErrors_.
Referenced by VisibilityPatchGrid::recalculateErrors().
| int LandVisibilityPatch::getVisibilityIndex | ( | ) | [inline] |
Definition at line 43 of file LandVisibilityPatch.h.
References visibilityIndex_, and visible_.
Referenced by VisibilityPatchGrid::drawLand(), and VisibilityPatchGrid::drawLandLODLevels().
| Vector& LandVisibilityPatch::getPosition | ( | ) | [inline] |
Definition at line 44 of file LandVisibilityPatch.h.
References position_.
Referenced by VisibilityPatchQuad::calculateVisibility(), and VisibilityPatchQuad::setVisible().
| float LandVisibilityPatch::getBoundingSize | ( | ) | [inline] |
Definition at line 45 of file LandVisibilityPatch.h.
References boundingSize_.
Referenced by VisibilityPatchQuad::calculateVisibility().
| LandVisibilityPatch* LandVisibilityPatch::getLeftPatch | ( | ) | [inline] |
Definition at line 47 of file LandVisibilityPatch.h.
References leftPatch_.
Referenced by VisibilityPatchGrid::drawLand(), and VisibilityPatchGrid::drawLandLODLevels().
| LandVisibilityPatch* LandVisibilityPatch::getRightPatch | ( | ) | [inline] |
Definition at line 48 of file LandVisibilityPatch.h.
References rightPatch_.
Referenced by VisibilityPatchGrid::drawLand(), and VisibilityPatchGrid::drawLandLODLevels().
| LandVisibilityPatch* LandVisibilityPatch::getTopPatch | ( | ) | [inline] |
Definition at line 49 of file LandVisibilityPatch.h.
References topPatch_.
Referenced by VisibilityPatchGrid::drawLand(), and VisibilityPatchGrid::drawLandLODLevels().
| LandVisibilityPatch* LandVisibilityPatch::getBottomPatch | ( | ) | [inline] |
Definition at line 50 of file LandVisibilityPatch.h.
References bottomPatch_.
Referenced by VisibilityPatchGrid::drawLand(), and VisibilityPatchGrid::drawLandLODLevels().
| void LandVisibilityPatch::draw | ( | MipMapPatchIndex & | index, | |
| bool | simple | |||
| ) |
Definition at line 199 of file LandVisibilityPatch.cpp.
References GLInfo::addNoTriangles(), dataOffSet_, DIALOG_ASSERT, GraphicalLandscapeMap::getBufferObject(), MipMapPatchIndex::getBufferOffSet(), GraphicalLandscapeMap::getHeightData(), MipMapPatchIndex::getIndices(), ScorchedContext::getLandscapeMaps(), GLStateExtension::getMaxElementIndices(), GLStateExtension::getMaxElementVertices(), MipMapPatchIndex::getMaxIndex(), MipMapPatchIndex::getMinIndex(), OptionsDisplay::getNoGLDrawElements(), MipMapPatchIndex::getSize(), GLStateExtension::getTextureUnits(), GL_FLOAT, GL_TEXTURE0_ARB, GL_TEXTURE1_ARB, GL_TEXTURE2_ARB, GL_TRIANGLE_STRIP, GL_UNSIGNED_SHORT, glBegin(), glClientActiveTextureARB, glDrawRangeElements, glEnd(), glMultiTexCoord2fvARB, glNormal3fv(), glNormalPointer(), glTexCoord2fv(), glTexCoordPointer(), glVertex3fv(), glVertexPointer(), GLStateExtension::hasDrawRangeElements(), GLStateExtension::hasMultiTex(), OptionsDisplay::instance(), ScorchedClient::instance(), and NULL.
Referenced by VisibilityPatchGrid::drawLand().
| void LandVisibilityPatch::drawLODLevel | ( | MipMapPatchIndex & | index | ) |
Definition at line 296 of file LandVisibilityPatch.cpp.
References dataOffSet_, GLFont2d::drawBilboard(), S3D::formatStringBuffer(), GLWFont::getGameFont(), GraphicalLandscapeMap::getHeightData(), MipMapPatchIndex::getIndices(), ScorchedContext::getLandscapeMaps(), MipMapPatchIndex::getSize(), GL_FILL, GL_FRONT, GL_LINE, glPolygonMode(), MainCamera::instance(), GLWFont::instance(), ScorchedClient::instance(), OptionsDisplay::instance(), position_, and visibilityIndex_.
Referenced by VisibilityPatchGrid::drawLandLODLevels().
| void LandVisibilityPatch::calculateErrors | ( | ) | [protected] |
Definition at line 124 of file LandVisibilityPatch.cpp.
References boundingSize_, calculateError(), error(), getHeight(), indexErrors_, MAX, maxHeight_, minHeight_, position_, x_, and y_.
Referenced by setLocation(), and setVisible().
int LandVisibilityPatch::x_ [protected] |
Definition at line 56 of file LandVisibilityPatch.h.
Referenced by calculateErrors(), and setLocation().
int LandVisibilityPatch::y_ [protected] |
Definition at line 56 of file LandVisibilityPatch.h.
Referenced by calculateErrors(), and setLocation().
int LandVisibilityPatch::dataOffSet_ [protected] |
Definition at line 57 of file LandVisibilityPatch.h.
Referenced by draw(), drawLODLevel(), and setLocation().
float LandVisibilityPatch::maxHeight_ [protected] |
float LandVisibilityPatch::minHeight_ [protected] |
float LandVisibilityPatch::boundingSize_ [protected] |
Definition at line 58 of file LandVisibilityPatch.h.
Referenced by calculateErrors(), and getBoundingSize().
int LandVisibilityPatch::dataSize_ [protected] |
int LandVisibilityPatch::visibilityIndex_ [protected] |
Definition at line 60 of file LandVisibilityPatch.h.
Referenced by drawLODLevel(), getVisibilityIndex(), and setVisible().
bool LandVisibilityPatch::visible_ [protected] |
Definition at line 61 of file LandVisibilityPatch.h.
Referenced by getVisibilityIndex(), setNotVisible(), and setVisible().
bool LandVisibilityPatch::recalculateErrors_ [protected] |
Definition at line 61 of file LandVisibilityPatch.h.
Referenced by setRecalculateErrors(), and setVisible().
float LandVisibilityPatch::indexErrors_[6] [protected] |
Definition at line 62 of file LandVisibilityPatch.h.
Referenced by calculateErrors(), and setVisible().
Vector LandVisibilityPatch::position_ [protected] |
Definition at line 63 of file LandVisibilityPatch.h.
Referenced by calculateErrors(), drawLODLevel(), and getPosition().
LandVisibilityPatch* LandVisibilityPatch::leftPatch_ [protected] |
Definition at line 64 of file LandVisibilityPatch.h.
Referenced by getLeftPatch(), and setLocation().
LandVisibilityPatch* LandVisibilityPatch::rightPatch_ [protected] |
Definition at line 65 of file LandVisibilityPatch.h.
Referenced by getRightPatch(), and setLocation().
LandVisibilityPatch* LandVisibilityPatch::topPatch_ [protected] |
Definition at line 66 of file LandVisibilityPatch.h.
Referenced by getTopPatch(), and setLocation().
LandVisibilityPatch* LandVisibilityPatch::bottomPatch_ [protected] |
Definition at line 67 of file LandVisibilityPatch.h.
Referenced by getBottomPatch(), and setLocation().
1.5.3