LLVLComposition Class Reference

#include <llvlcomposition.h>

Inheritance diagram for LLVLComposition:

Inheritance graph
[legend]
Collaboration diagram for LLVLComposition:

Collaboration graph
[legend]
List of all members.

Public Types

 SOUTHWEST = 0
 SOUTHEAST = 1
 NORTHWEST = 2
 NORTHEAST = 3
 CORNER_COUNT = 4
enum  ECorner {
  SOUTHWEST = 0, SOUTHEAST = 1, NORTHWEST = 2, NORTHEAST = 3,
  CORNER_COUNT = 4
}

Public Member Functions

 LLVLComposition (LLSurface *surfacep, const U32 width, const F32 scale)
 ~LLVLComposition ()
void setSurface (LLSurface *surfacep)
BOOL generateHeights (const F32 x, const F32 y, const F32 width, const F32 height)
BOOL generateComposition ()
BOOL generateTexture (const F32 x, const F32 y, const F32 width, const F32 height)
LLUUID getDetailTextureID (S32 corner)
LLViewerImagegetDetailTexture (S32 corner)
F32 getStartHeight (S32 corner)
F32 getHeightRange (S32 corner)
void setDetailTextureID (S32 corner, const LLUUID &id)
void setStartHeight (S32 corner, F32 start_height)
void setHeightRange (S32 corner, F32 range)
void setParamsReady ()
BOOL getParamsReady () const

Protected Attributes

BOOL mParamsReady
LLSurfacemSurfacep
BOOL mTexturesLoaded
LLPointer< LLViewerImagemDetailTextures [CORNER_COUNT]
LLPointer< LLImageRawmRawImages [CORNER_COUNT]
F32 mStartHeight [CORNER_COUNT]
F32 mHeightRange [CORNER_COUNT]
F32 mTexScaleX
F32 mTexScaleY

Friends

class LLVOSurfacePatch
class LLDrawPoolTerrain

Detailed Description

Definition at line 40 of file llvlcomposition.h.


Member Enumeration Documentation

enum LLVLComposition::ECorner

Enumerator:
SOUTHWEST 
SOUTHEAST 
NORTHWEST 
NORTHEAST 
CORNER_COUNT 

Definition at line 55 of file llvlcomposition.h.


Constructor & Destructor Documentation

LLVLComposition::LLVLComposition ( LLSurface surfacep,
const U32  width,
const F32  scale 
)

Definition at line 65 of file llvlcomposition.cpp.

References CORNER_COUNT, FALSE, LLControlGroup::getF32(), LLControlGroup::getString(), gSavedSettings, gViewerArt, i, mHeightRange, mStartHeight, mSurfacep, mTexScaleX, mTexScaleY, mTexturesLoaded, S32, and setDetailTextureID().

LLVLComposition::~LLVLComposition (  ) 

Definition at line 101 of file llvlcomposition.cpp.


Member Function Documentation

BOOL LLVLComposition::generateComposition (  ) 

Definition at line 227 of file llvlcomposition.cpp.

References BASE_SIZE, LLViewerImage::BOOST_TERRAIN, FALSE, height, i, llmin(), MAX_DISCARD_LEVEL, mDetailTextures, mParamsReady, S32, TRUE, and width.

Referenced by LLSurfacePatch::updateTexture().

BOOL LLVLComposition::generateHeights ( const F32  x,
const F32  y,
const F32  width,
const F32  height 
)

Definition at line 122 of file llvlcomposition.cpp.

References bilinear(), f, FALSE, from_region_handle(), LLViewerRegion::getHandle(), LLSurface::getRegion(), i, j, llassert, llmax(), llmin(), llround(), LLViewerLayer::mDatap, LLVector3d::mdV, mHeightRange, mParamsReady, LLViewerLayer::mScale, LLViewerLayer::mScaleInv, mStartHeight, mSurfacep, LLVector3::mV, LLViewerLayer::mWidth, noise2(), NORTHEAST, NORTHWEST, LLSurface::resolveHeightRegion(), S32, SOUTHEAST, SOUTHWEST, TRUE, turbulence2(), VX, and VY.

Referenced by LLSurfacePatch::updateTexture().

BOOL LLVLComposition::generateTexture ( const F32  x,
const F32  y,
const F32  width,
const F32  height 
)

Definition at line 266 of file llvlcomposition.cpp.

References a, b, BASE_SIZE, LLViewerImage::BOOST_NONE, f, FALSE, LLImageGL::getComponents(), LLTimer::getElapsedTimeF32(), LLImageGL::getHeight(), LLSurface::getSTexture(), LLViewerLayer::getValueScaled(), LLImageGL::getWidth(), i, j, llassert, llclamp(), llendl, llfloor(), llmin(), llround(), lltrunc(), llwarns, MAX_DISCARD_LEVEL, mDetailTextures, mRawImages, LLViewerLayer::mScale, LLViewerLayer::mScaleInv, mSurfacep, mTexScaleX, mTexScaleY, LLViewerLayer::mWidth, NULL, S32, LLImageGL::setSubImage(), LLSurface::sTexelsUpdated, LLSurface::sTextureUpdateTime, and TRUE.

Referenced by LLSurfacePatch::updateTexture().

LLViewerImage * LLVLComposition::getDetailTexture ( S32  corner  ) 

Definition at line 478 of file llvlcomposition.cpp.

References mDetailTextures.

LLUUID LLVLComposition::getDetailTextureID ( S32  corner  ) 

Definition at line 473 of file llvlcomposition.cpp.

References mDetailTextures.

Referenced by LLPanelRegionTextureInfo::refreshFromRegion().

F32 LLVLComposition::getHeightRange ( S32  corner  ) 

Definition at line 493 of file llvlcomposition.cpp.

References mHeightRange.

Referenced by LLPanelRegionTextureInfo::refreshFromRegion().

BOOL LLVLComposition::getParamsReady (  )  const [inline]

Definition at line 75 of file llvlcomposition.h.

References mParamsReady.

Referenced by LLViewerRegion::unpackRegionHandshake().

F32 LLVLComposition::getStartHeight ( S32  corner  ) 

Definition at line 483 of file llvlcomposition.cpp.

References mStartHeight.

Referenced by LLPanelRegionTextureInfo::refreshFromRegion().

void LLVLComposition::setDetailTextureID ( S32  corner,
const LLUUID id 
)

Definition at line 112 of file llvlcomposition.cpp.

References LLViewerImageList::getImage(), gImageList, mDetailTextures, mRawImages, and NULL.

Referenced by LLVLComposition(), and LLViewerRegion::unpackRegionHandshake().

void LLVLComposition::setHeightRange ( S32  corner,
F32  range 
)

Definition at line 498 of file llvlcomposition.cpp.

References mHeightRange.

Referenced by LLViewerRegion::unpackRegionHandshake().

void LLVLComposition::setParamsReady (  )  [inline]

Definition at line 74 of file llvlcomposition.h.

References mParamsReady, and TRUE.

Referenced by LLViewerRegion::unpackRegionHandshake().

void LLVLComposition::setStartHeight ( S32  corner,
F32  start_height 
)

Definition at line 488 of file llvlcomposition.cpp.

References mStartHeight.

Referenced by LLViewerRegion::unpackRegionHandshake().

void LLVLComposition::setSurface ( LLSurface surfacep  ) 

Definition at line 106 of file llvlcomposition.cpp.

References mSurfacep.

Referenced by LLViewerRegion::LLViewerRegion().


Friends And Related Function Documentation

friend class LLDrawPoolTerrain [friend]

Definition at line 73 of file llvlcomposition.h.

friend class LLVOSurfacePatch [friend]

Definition at line 72 of file llvlcomposition.h.


Member Data Documentation

LLPointer<LLViewerImage> LLVLComposition::mDetailTextures[CORNER_COUNT] [protected]

Definition at line 81 of file llvlcomposition.h.

Referenced by generateComposition(), generateTexture(), getDetailTexture(), getDetailTextureID(), LLDrawPoolTerrain::render(), LLDrawPoolTerrain::renderFull2TU(), LLDrawPoolTerrain::renderFull4TU(), LLDrawPoolTerrain::renderFull4TUShader(), and setDetailTextureID().

F32 LLVLComposition::mHeightRange[CORNER_COUNT] [protected]

Definition at line 85 of file llvlcomposition.h.

Referenced by generateHeights(), getHeightRange(), LLVLComposition(), and setHeightRange().

BOOL LLVLComposition::mParamsReady [protected]

Definition at line 77 of file llvlcomposition.h.

Referenced by generateComposition(), generateHeights(), getParamsReady(), and setParamsReady().

LLPointer<LLImageRaw> LLVLComposition::mRawImages[CORNER_COUNT] [protected]

Definition at line 82 of file llvlcomposition.h.

Referenced by generateTexture(), and setDetailTextureID().

F32 LLVLComposition::mStartHeight[CORNER_COUNT] [protected]

Definition at line 84 of file llvlcomposition.h.

Referenced by generateHeights(), getStartHeight(), LLVLComposition(), and setStartHeight().

LLSurface* LLVLComposition::mSurfacep [protected]

Definition at line 78 of file llvlcomposition.h.

Referenced by generateHeights(), generateTexture(), LLVLComposition(), and setSurface().

F32 LLVLComposition::mTexScaleX [protected]

Definition at line 87 of file llvlcomposition.h.

Referenced by generateTexture(), and LLVLComposition().

F32 LLVLComposition::mTexScaleY [protected]

Definition at line 88 of file llvlcomposition.h.

Referenced by generateTexture(), and LLVLComposition().

BOOL LLVLComposition::mTexturesLoaded [protected]

Definition at line 79 of file llvlcomposition.h.

Referenced by LLVLComposition().


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:12:00 2010 for Second Life Viewer by  doxygen 1.4.7