LLVOTree Class Reference

#include <llvotree.h>

Inheritance diagram for LLVOTree:

Inheritance graph
[legend]
Collaboration diagram for LLVOTree:

Collaboration graph
[legend]
List of all members.

Public Types

 VERTEX_DATA_MASK
enum  { VERTEX_DATA_MASK }

Public Member Functions

 LLVOTree (const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
U32 processUpdateMessage (LLMessageSystem *mesgsys, void **user_data, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp)
BOOL idleUpdate (LLAgent &agent, LLWorld &world, const F64 &time)
void render (LLAgent &agent)
void setPixelAreaAndAngle (LLAgent &agent)
void updateTextures (LLAgent &agent)
LLDrawablecreateDrawable (LLPipeline *pipeline)
BOOL updateGeometry (LLDrawable *drawable)
void updateSpatialExtents (LLVector3 &min, LLVector3 &max)
virtual U32 getPartitionType () const
void updateRadius ()
U32 drawBranchPipeline (U32 *indicesp, S32 trunk_LOD, S32 stop_level, U16 depth, U16 trunk_depth, F32 scale, F32 twist, F32 droop, F32 branches, F32 alpha)
void drawBranch (S32 stop_level, U16 depth, U16 trunk_depth, F32 scale, F32 twist, F32 droop, F32 branches, F32 alpha, BOOL draw_leaves)

Static Public Member Functions

static void initClass ()
static void cleanupClass ()

Static Public Attributes

static S32 sMaxTreeSpecies = 0
static F32 sTreeFactor = 1.f

Protected Types

typedef std::map< U32, TreeSpeciesData * > SpeciesMap

Protected Member Functions

 ~LLVOTree ()

Protected Attributes

LLVector3 mTrunkBend
LLVector3 mTrunkVel
LLVector3 mWind
LLPointer< LLViewerImagemTreeImagep
U8 mSpecies
F32 mBranchLength
F32 mTrunkLength
F32 mDroop
F32 mTwist
F32 mBranches
U8 mDepth
F32 mScaleStep
U8 mTrunkDepth
F32 mLeafScale
F32 mBillboardScale
F32 mBillboardRatio
F32 mTrunkAspect
F32 mBranchAspect
F32 mRandomLeafRotate
U32 mFrameCount

Static Protected Attributes

static SpeciesMap sSpeciesTable
static S32 sLODIndexOffset [4]
static S32 sLODIndexCount [4]
static S32 sLODVertexOffset [4]
static S32 sLODVertexCount [4]
static S32 sLODSlices [4] = {10, 5, 4, 3}
static F32 sLODAngles [4] = {30.f, 20.f, 15.f, 0.f}

Friends

class LLDrawPoolTree

Classes

struct  TreeSpeciesData

Detailed Description

Definition at line 43 of file llvotree.h.


Member Typedef Documentation

typedef std::map<U32, TreeSpeciesData*> LLVOTree::SpeciesMap [protected]

Definition at line 142 of file llvotree.h.


Member Enumeration Documentation

anonymous enum

Enumerator:
VERTEX_DATA_MASK 

Definition at line 49 of file llvotree.h.


Constructor & Destructor Documentation

LLVOTree::~LLVOTree (  )  [protected]

Definition at line 86 of file llvotree.cpp.

References LLViewerObject::mData, and NULL.

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

Definition at line 77 of file llvotree.cpp.

References LLViewerObject::getPositionRegion(), LLWind::getVelocity(), mFrameCount, LLViewerObject::mRegionp, mSpecies, LLViewerRegion::mWind, and mWind.


Member Function Documentation

void LLVOTree::cleanupClass (  )  [static]

Definition at line 260 of file llvotree.cpp.

References sSpeciesTable.

Referenced by LLViewerObject::cleanupVOClasses().

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

Reimplemented from LLViewerObject.

Definition at line 424 of file llvotree.cpp.

References LLPipeline::allocDrawable(), FALSE, LLPipeline::getPool(), gPipeline, LLViewerObject::mDrawable, mTreeImagep, LLDrawPool::POOL_TREE, LLPipeline::RENDER_TYPE_TREE, LLFace::setSize(), and updateRadius().

void LLVOTree::drawBranch ( S32  stop_level,
U16  depth,
U16  trunk_depth,
F32  scale,
F32  twist,
F32  droop,
F32  branches,
F32  alpha,
BOOL  draw_leaves 
)

U32 LLVOTree::drawBranchPipeline ( U32 indicesp,
S32  trunk_LOD,
S32  stop_level,
U16  depth,
U16  trunk_depth,
F32  scale,
F32  twist,
F32  droop,
F32  branches,
F32  alpha 
)

Definition at line 795 of file llvotree.cpp.

References f, glDrawElements, glPopMatrix, glRotatef, glTranslatef, i, LEAF_INDICES, llassert, mBillboardRatio, mBillboardScale, mBranchAspect, mBranchLength, mLeafScale, mScaleStep, mTrunkAspect, mTrunkLength, S32, sLODIndexCount, sLODIndexOffset, stop_glerror, and width.

Referenced by LLDrawPoolTree::renderTree().

U32 LLVOTree::getPartitionType (  )  const [virtual]

Reimplemented from LLViewerObject.

Definition at line 935 of file llvotree.cpp.

References LLPipeline::PARTITION_TREE.

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

Reimplemented from LLViewerObject.

Definition at line 332 of file llvotree.cpp.

References LLViewerObject::getPositionRegion(), LLWind::getVelocity(), gPipeline, LLPipeline::hasRenderType(), LLVector3::magVec(), mBranches, LLViewerObject::mDead, mDepth, mFrameCount, LLViewerObject::mRegionp, mTrunkBend, mTrunkVel, LLViewerRegion::mWind, mWind, LLVector3::normVec(), LLPipeline::RENDER_TYPE_TREE, and TRUE.

void LLVOTree::initClass (  )  [static]

Definition at line 96 of file llvotree.cpp.

References LLXmlTree::addAttributeString(), LLViewerWindow::alertXml(), FALSE, gDirUtilp, LLDir::getExpandedFilename(), LLXmlTreeNode::getFirstChild(), LLXmlTreeNode::getNextChild(), LLXmlTree::getRoot(), gViewerWindow, i, LL_PATH_APP_SETTINGS, llendl, llerrs, llwarns, LLVOTree::TreeSpeciesData::mBillboardRatio, LLVOTree::TreeSpeciesData::mBillboardScale, LLVOTree::TreeSpeciesData::mBranchAspect, LLVOTree::TreeSpeciesData::mBranches, LLVOTree::TreeSpeciesData::mBranchLength, LLVOTree::TreeSpeciesData::mDepth, LLVOTree::TreeSpeciesData::mDroop, LLVOTree::TreeSpeciesData::mLeafScale, LLVOTree::TreeSpeciesData::mNoiseMag, LLVOTree::TreeSpeciesData::mNoiseScale, LLVOTree::TreeSpeciesData::mRandomLeafRotate, LLVOTree::TreeSpeciesData::mRepeatTrunkZ, LLVOTree::TreeSpeciesData::mScaleStep, LLVOTree::TreeSpeciesData::mTaper, LLVOTree::TreeSpeciesData::mTextureID, LLVOTree::TreeSpeciesData::mTrunkAspect, LLVOTree::TreeSpeciesData::mTrunkDepth, LLVOTree::TreeSpeciesData::mTrunkLength, LLVOTree::TreeSpeciesData::mTwist, LLXmlTree::parseFile(), S32, sMaxTreeSpecies, sSpeciesTable, and TRUE.

Referenced by LLViewerObject::initVOClasses().

U32 LLVOTree::processUpdateMessage ( LLMessageSystem mesgsys,
void **  user_data,
U32  block_num,
const EObjectUpdateType  update_type,
LLDataPacker dp 
) [virtual]

Reimplemented from LLViewerObject.

Definition at line 265 of file llvotree.cpp.

References f, LLPrimitive::getAcceleration(), LLPrimitive::getAngularVelocity(), LLViewerImageList::getImage(), LLPrimitive::getVelocity(), gImageList, llendl, llinfos, mBillboardRatio, mBillboardScale, mBranchAspect, mBranches, mBranchLength, LLViewerObject::mData, mDepth, mDroop, mLeafScale, mScaleStep, mSpecies, mTreeImagep, mTrunkAspect, mTrunkDepth, mTrunkLength, mTwist, OUT_TERSE_IMPROVED, LLViewerObject::processUpdateMessage(), LLPrimitive::setAcceleration(), LLPrimitive::setAngularVelocity(), LLPrimitive::setVelocity(), sSpeciesTable, TRUE, and LLVector3::zero.

void LLVOTree::render ( LLAgent agent  ) 

Definition at line 378 of file llvotree.cpp.

void LLVOTree::setPixelAreaAndAngle ( LLAgent agent  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 383 of file llvotree.cpp.

References gCamera, LLAgent::getCameraPositionAgent(), LLViewerObject::getMaxScale(), LLViewerObject::getPositionAgent(), LLCamera::getView(), LLCamera::getViewHeightInPixels(), LLVector3::magVec(), LLViewerObject::mAppAngle, mBillboardRatio, mBillboardScale, LLViewerObject::mPixelArea, RAD_TO_DEG, range, and LLViewerObject::setPixelAreaAndAngle().

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

Reimplemented from LLViewerObject.

Definition at line 447 of file llvotree.cpp.

References angle, DEG_TO_RAD, f, face, LLFastTimer::FTM_UPDATE_TREE, LLDrawable::getFace(), LLViewerObject::getPositionAgent(), height, i, j, LEAF_INDICES, LEAF_VERTICES, llassert, mSpecies, LLVector3::mV, S32, LLVector3::setVec(), sLODIndexCount, sLODIndexOffset, sLODSlices, sLODVertexCount, sLODVertexOffset, sSpeciesTable, tut::tc(), TRUE, turbulence3(), LLDrawPoolTree::VERTEX_DATA_MASK, and z.

void LLVOTree::updateRadius (  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 914 of file llvotree.cpp.

References f, LLPointer< Type >::isNull(), and LLViewerObject::mDrawable.

Referenced by createDrawable().

void LLVOTree::updateSpatialExtents ( LLVector3 min,
LLVector3 max 
) [virtual]

Reimplemented from LLViewerObject.

Definition at line 924 of file llvotree.cpp.

References f, LLViewerObject::getRenderPosition(), LLXform::getScale(), LLViewerObject::mDrawable, LLVector3::mV, LLVector3::setVec(), and size.

void LLVOTree::updateTextures ( LLAgent agent  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 410 of file llvotree.cpp.

References fsqrtf, gPipeline, LLPipeline::hasRenderDebugMask(), llformat(), LLViewerObject::mPixelArea, mTreeImagep, LLPipeline::RENDER_DEBUG_TEXTURE_AREA, and LLViewerObject::setDebugText().


Friends And Related Function Documentation

friend class LLDrawPoolTree [friend]

Definition at line 114 of file llvotree.h.


Member Data Documentation

F32 LLVOTree::mBillboardRatio [protected]

Definition at line 135 of file llvotree.h.

Referenced by drawBranchPipeline(), processUpdateMessage(), and setPixelAreaAndAngle().

F32 LLVOTree::mBillboardScale [protected]

Definition at line 134 of file llvotree.h.

Referenced by drawBranchPipeline(), processUpdateMessage(), and setPixelAreaAndAngle().

F32 LLVOTree::mBranchAspect [protected]

Definition at line 137 of file llvotree.h.

Referenced by drawBranchPipeline(), and processUpdateMessage().

F32 LLVOTree::mBranches [protected]

Definition at line 127 of file llvotree.h.

Referenced by idleUpdate(), processUpdateMessage(), and LLDrawPoolTree::renderTree().

F32 LLVOTree::mBranchLength [protected]

Definition at line 123 of file llvotree.h.

Referenced by drawBranchPipeline(), and processUpdateMessage().

U8 LLVOTree::mDepth [protected]

Definition at line 128 of file llvotree.h.

Referenced by idleUpdate(), processUpdateMessage(), and LLDrawPoolTree::renderTree().

F32 LLVOTree::mDroop [protected]

Definition at line 125 of file llvotree.h.

Referenced by processUpdateMessage(), and LLDrawPoolTree::renderTree().

U32 LLVOTree::mFrameCount [protected]

Definition at line 140 of file llvotree.h.

Referenced by idleUpdate(), and LLVOTree().

F32 LLVOTree::mLeafScale [protected]

Definition at line 132 of file llvotree.h.

Referenced by drawBranchPipeline(), and processUpdateMessage().

F32 LLVOTree::mRandomLeafRotate [protected]

Definition at line 138 of file llvotree.h.

F32 LLVOTree::mScaleStep [protected]

Definition at line 129 of file llvotree.h.

Referenced by drawBranchPipeline(), and processUpdateMessage().

U8 LLVOTree::mSpecies [protected]

Definition at line 122 of file llvotree.h.

Referenced by LLVOTree(), processUpdateMessage(), and updateGeometry().

LLPointer<LLViewerImage> LLVOTree::mTreeImagep [protected]

Definition at line 120 of file llvotree.h.

Referenced by createDrawable(), processUpdateMessage(), and updateTextures().

F32 LLVOTree::mTrunkAspect [protected]

Definition at line 136 of file llvotree.h.

Referenced by drawBranchPipeline(), and processUpdateMessage().

LLVector3 LLVOTree::mTrunkBend [protected]

Definition at line 116 of file llvotree.h.

Referenced by idleUpdate(), and LLDrawPoolTree::renderTree().

U8 LLVOTree::mTrunkDepth [protected]

Definition at line 130 of file llvotree.h.

Referenced by processUpdateMessage(), and LLDrawPoolTree::renderTree().

F32 LLVOTree::mTrunkLength [protected]

Definition at line 124 of file llvotree.h.

Referenced by drawBranchPipeline(), and processUpdateMessage().

LLVector3 LLVOTree::mTrunkVel [protected]

Definition at line 117 of file llvotree.h.

Referenced by idleUpdate().

F32 LLVOTree::mTwist [protected]

Definition at line 126 of file llvotree.h.

Referenced by processUpdateMessage(), and LLDrawPoolTree::renderTree().

LLVector3 LLVOTree::mWind [protected]

Definition at line 118 of file llvotree.h.

Referenced by idleUpdate(), and LLVOTree().

F32 LLVOTree::sLODAngles = {30.f, 20.f, 15.f, 0.f} [static, protected]

Definition at line 150 of file llvotree.h.

Referenced by LLDrawPoolTree::renderTree().

S32 LLVOTree::sLODIndexCount [static, protected]

Definition at line 146 of file llvotree.h.

Referenced by drawBranchPipeline(), and updateGeometry().

S32 LLVOTree::sLODIndexOffset [static, protected]

Definition at line 145 of file llvotree.h.

Referenced by drawBranchPipeline(), and updateGeometry().

S32 LLVOTree::sLODSlices = {10, 5, 4, 3} [static, protected]

Definition at line 149 of file llvotree.h.

Referenced by updateGeometry().

S32 LLVOTree::sLODVertexCount [static, protected]

Definition at line 148 of file llvotree.h.

Referenced by updateGeometry().

S32 LLVOTree::sLODVertexOffset [static, protected]

Definition at line 147 of file llvotree.h.

Referenced by updateGeometry().

S32 LLVOTree::sMaxTreeSpecies = 0 [static]

Definition at line 85 of file llvotree.h.

Referenced by add_object(), and initClass().

LLVOTree::SpeciesMap LLVOTree::sSpeciesTable [static, protected]

Definition at line 143 of file llvotree.h.

Referenced by cleanupClass(), initClass(), processUpdateMessage(), and updateGeometry().

F32 LLVOTree::sTreeFactor = 1.f [static]

Definition at line 112 of file llvotree.h.

Referenced by LLTreeLODListener::handleEvent(), LLDrawPoolTree::renderTree(), and saved_settings_to_globals().


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