LLVOWLSky Class Reference

#include <llvowlsky.h>

Inheritance diagram for LLVOWLSky:

Inheritance graph
[legend]
Collaboration diagram for LLVOWLSky:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 LLVOWLSky (const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
void initSunDirection (LLVector3 const &sun_direction, LLVector3 const &sun_angular_velocity)
BOOL idleUpdate (LLAgent &agent, LLWorld &world, const F64 &time)
BOOL isActive (void) const
LLDrawablecreateDrawable (LLPipeline *pipeline)
BOOL updateGeometry (LLDrawable *drawable)
void drawStars (void)
void drawDome (void)
void resetVertexBuffers (void)
void cleanupGL ()
void restoreGL ()

Private Member Functions

void initStars ()
void updateStarColors ()
BOOL updateStarGeometry (LLDrawable *drawable)

Static Private Member Functions

static U32 getNumStacks (void)
static U32 getNumSlices (void)
static U32 getFanNumVerts (void)
static U32 getFanNumIndices (void)
static U32 getStripsNumVerts (void)
static U32 getStripsNumIndices (void)
static U32 getStarsNumVerts (void)
static U32 getStarsNumIndices (void)
static F32 calcPhi (U32 i)
static void buildFanBuffer (LLStrider< LLVector3 > &vertices, LLStrider< LLVector2 > &texCoords, LLStrider< U16 > &indices)
static void buildStripsBuffer (U32 begin_stack, U32 end_stack, LLStrider< LLVector3 > &vertices, LLStrider< LLVector2 > &texCoords, LLStrider< U16 > &indices)

Private Attributes

LLPointer< LLVertexBuffermFanVerts
std::vector< LLPointer
< LLVertexBuffer > > 
mStripsVerts
LLPointer< LLVertexBuffermStarsVerts
std::vector< LLVector3mStarVertices
std::vector< LLColor4mStarColors
std::vector< F32mStarIntensities

Static Private Attributes

static const F32 DISTANCE_TO_STARS = (HORIZON_DIST - 10.f)*0.25f
static const U32 MIN_SKY_DETAIL = 3
static const U32 MAX_SKY_DETAIL = 180


Detailed Description

Definition at line 37 of file llvowlsky.h.


Constructor & Destructor Documentation

LLVOWLSky::LLVOWLSky ( const LLUUID id,
const LLPCode  pcode,
LLViewerRegion regionp 
)

Definition at line 89 of file llvowlsky.cpp.

References initStars().

Here is the call graph for this function:


Member Function Documentation

U32 LLVOWLSky::getNumStacks ( void   )  [inline, static, private]

Definition at line 49 of file llvowlsky.cpp.

References LLControlGroup::getU32(), and gSavedSettings.

Referenced by buildStripsBuffer(), calcPhi(), getStripsNumIndices(), getStripsNumVerts(), and updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

U32 LLVOWLSky::getNumSlices ( void   )  [inline, static, private]

Definition at line 54 of file llvowlsky.cpp.

References LLControlGroup::getU32(), and gSavedSettings.

Referenced by buildFanBuffer(), buildStripsBuffer(), getFanNumIndices(), getFanNumVerts(), getStripsNumIndices(), getStripsNumVerts(), and updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

U32 LLVOWLSky::getFanNumVerts ( void   )  [inline, static, private]

Definition at line 59 of file llvowlsky.cpp.

References getNumSlices().

Referenced by buildFanBuffer(), and updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

U32 LLVOWLSky::getFanNumIndices ( void   )  [inline, static, private]

Definition at line 64 of file llvowlsky.cpp.

References getNumSlices().

Referenced by buildFanBuffer(), and updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

U32 LLVOWLSky::getStripsNumVerts ( void   )  [inline, static, private]

Definition at line 69 of file llvowlsky.cpp.

References getNumSlices(), and getNumStacks().

Here is the call graph for this function:

U32 LLVOWLSky::getStripsNumIndices ( void   )  [inline, static, private]

Definition at line 74 of file llvowlsky.cpp.

References getNumSlices(), and getNumStacks().

Here is the call graph for this function:

U32 LLVOWLSky::getStarsNumVerts ( void   )  [inline, static, private]

Definition at line 79 of file llvowlsky.cpp.

Referenced by initStars(), updateStarColors(), and updateStarGeometry().

Here is the caller graph for this function:

U32 LLVOWLSky::getStarsNumIndices ( void   )  [inline, static, private]

Definition at line 84 of file llvowlsky.cpp.

Referenced by drawStars(), and updateStarGeometry().

Here is the caller graph for this function:

void LLVOWLSky::initSunDirection ( LLVector3 const &  sun_direction,
LLVector3 const &  sun_angular_velocity 
)

Definition at line 95 of file llvowlsky.cpp.

BOOL LLVOWLSky::idleUpdate ( LLAgent agent,
LLWorld world,
const F64 time 
) [virtual]

Reimplemented from LLViewerObject.

Definition at line 100 of file llvowlsky.cpp.

References TRUE.

BOOL LLVOWLSky::isActive ( void   )  const [virtual]

Reimplemented from LLViewerObject.

Definition at line 105 of file llvowlsky.cpp.

References FALSE.

LLDrawable * LLVOWLSky::createDrawable ( LLPipeline pipeline  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 110 of file llvowlsky.cpp.

References LLPipeline::allocDrawable(), LLPipeline::getPool(), gPipeline, LLViewerObject::mDrawable, LLDrawPool::POOL_WL_SKY, and LLPipeline::RENDER_TYPE_WL_SKY.

Here is the call graph for this function:

BOOL LLVOWLSky::updateGeometry ( LLDrawable drawable  )  [virtual]

void LLVOWLSky::drawStars ( void   ) 

Definition at line 485 of file llvowlsky.cpp.

References getStarsNumIndices(), mStarsVerts, LLPointer< Type >::notNull(), LLVertexBuffer::POINTS, and LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK.

Here is the call graph for this function:

void LLVOWLSky::drawDome ( void   ) 

void LLVOWLSky::resetVertexBuffers ( void   ) 

Definition at line 285 of file llvowlsky.cpp.

References gPipeline, LLPipeline::markRebuild(), LLViewerObject::mDrawable, mFanVerts, mStarsVerts, mStripsVerts, NULL, LLDrawable::REBUILD_ALL, and TRUE.

Here is the call graph for this function:

void LLVOWLSky::cleanupGL (  ) 

Definition at line 294 of file llvowlsky.cpp.

References LLDrawPoolWLSky::cleanupGL(), mFanVerts, mStarsVerts, mStripsVerts, and NULL.

Here is the call graph for this function:

void LLVOWLSky::restoreGL (  ) 

Definition at line 303 of file llvowlsky.cpp.

References gPipeline, LLPipeline::markRebuild(), LLViewerObject::mDrawable, LLDrawable::REBUILD_ALL, LLDrawPoolWLSky::restoreGL(), and TRUE.

Here is the call graph for this function:

F32 LLVOWLSky::calcPhi ( U32  i  )  [inline, static, private]

Definition at line 122 of file llvowlsky.cpp.

References F_PI, and getNumStacks().

Referenced by buildFanBuffer(), and buildStripsBuffer().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLVOWLSky::initStars (  )  [private]

Definition at line 534 of file llvowlsky.cpp.

References DISTANCE_TO_STARS, getStarsNumVerts(), i, ll_frand(), llmin(), mStarColors, mStarIntensities, mStarVertices, VALPHA, VBLUE, VGREEN, VRED, VX, VY, and VZ.

Referenced by LLVOWLSky().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLVOWLSky::buildFanBuffer ( LLStrider< LLVector3 > &  vertices,
LLStrider< LLVector2 > &  texCoords,
LLStrider< U16 > &  indices 
) [static, private]

Definition at line 569 of file llvowlsky.cpp.

References calcPhi(), F_PI, LLWLParamManager::getDomeRadius(), getFanNumIndices(), getFanNumVerts(), getNumSlices(), i, LLWLParamManager::instance(), llassert, and RADIUS.

Referenced by updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLVOWLSky::buildStripsBuffer ( U32  begin_stack,
U32  end_stack,
LLStrider< LLVector3 > &  vertices,
LLStrider< LLVector2 > &  texCoords,
LLStrider< U16 > &  indices 
) [static, private]

Definition at line 629 of file llvowlsky.cpp.

References calcPhi(), F_TWO_PI, LLWLParamManager::getDomeRadius(), getNumSlices(), getNumStacks(), i, LLWLParamManager::instance(), j, llassert, RADIUS, and S32.

Referenced by updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLVOWLSky::updateStarColors (  )  [private]

Definition at line 715 of file llvowlsky.cpp.

References getStarsNumVerts(), gSky, ll_frand(), llclamp(), mStarColors, mStarIntensities, mStarVertices, LLSky::mVOSkyp, LLVector3::normVec(), S32, and VALPHA.

Referenced by updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLVOWLSky::updateStarGeometry ( LLDrawable drawable  )  [private]

Definition at line 767 of file llvowlsky.cpp.

References getStarsNumIndices(), getStarsNumVerts(), LLPointer< Type >::isNull(), llendl, llerrs, mStarColors, mStarsVerts, mStarVertices, LLDrawPoolWLSky::STAR_VERTEX_DATA_MASK, and TRUE.

Referenced by updateGeometry().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

const F32 LLVOWLSky::DISTANCE_TO_STARS = (HORIZON_DIST - 10.f)*0.25f [static, private]

Definition at line 39 of file llvowlsky.h.

Referenced by initStars().

const U32 LLVOWLSky::MIN_SKY_DETAIL = 3 [static, private]

Definition at line 42 of file llvowlsky.h.

const U32 LLVOWLSky::MAX_SKY_DETAIL = 180 [static, private]

Definition at line 44 of file llvowlsky.h.

Definition at line 101 of file llvowlsky.h.

Referenced by cleanupGL(), resetVertexBuffers(), and updateGeometry().

Definition at line 102 of file llvowlsky.h.

Referenced by cleanupGL(), drawDome(), resetVertexBuffers(), and updateGeometry().

Definition at line 103 of file llvowlsky.h.

Referenced by cleanupGL(), drawStars(), resetVertexBuffers(), and updateStarGeometry().

std::vector<LLVector3> LLVOWLSky::mStarVertices [private]

Definition at line 105 of file llvowlsky.h.

Referenced by initStars(), updateStarColors(), and updateStarGeometry().

std::vector<LLColor4> LLVOWLSky::mStarColors [private]

Definition at line 106 of file llvowlsky.h.

Referenced by initStars(), updateStarColors(), and updateStarGeometry().

std::vector<F32> LLVOWLSky::mStarIntensities [private]

Definition at line 107 of file llvowlsky.h.

Referenced by initStars(), and updateStarColors().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:38:49 2008 for SecondLife by  doxygen 1.5.5