LLVOGrass Class Reference

#include <llvograss.h>

Inheritance diagram for LLVOGrass:

Inheritance graph
[legend]
Collaboration diagram for LLVOGrass:

Collaboration graph
[legend]
List of all members.

Public Types

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

Public Member Functions

 LLVOGrass (const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
virtual U32 getPartitionType () const
U32 processUpdateMessage (LLMessageSystem *mesgsys, void **user_data, U32 block_num, const EObjectUpdateType update_type, LLDataPacker *dp)
void exportFile (FILE *file, const LLVector3 &position)
void updateDrawable (BOOL force_damped)
LLDrawablecreateDrawable (LLPipeline *pipeline)
BOOL updateGeometry (LLDrawable *drawable)
void getGeometry (S32 idx, LLStrider< LLVector3 > &verticesp, LLStrider< LLVector3 > &normalsp, LLStrider< LLVector2 > &texcoordsp, LLStrider< LLColor4U > &colorsp, LLStrider< U32 > &indicesp)
void updateFaceSize (S32 idx)
void updateTextures (LLAgent &agent)
BOOL updateLOD ()
void setPixelAreaAndAngle (LLAgent &agent)
void plantBlades ()
BOOL isActive () const
BOOL idleUpdate (LLAgent &agent, LLWorld &world, const F64 &time)

Static Public Member Functions

static void initClass ()
static void cleanupClass ()
static void import (FILE *file, LLMessageSystem *mesgsys, const LLVector3 &pos)

Public Attributes

U8 mSpecies
F32 mBladeSizeX
F32 mBladeSizeY
LLSurfacePatchmPatch
U64 mLastPatchUpdateTime
LLVector3 mGrassBend
LLVector3 mGrassVel
LLVector3 mWind
F32 mBladeWindAngle
F32 mBWAOverlap

Static Public Attributes

static S32 sMaxGrassSpecies = 0

Protected Member Functions

 ~LLVOGrass ()

Private Member Functions

void updateSpecies ()

Private Attributes

F32 mLastHeight
S32 mNumBlades

Static Private Attributes

static SpeciesMap sSpeciesTable

Classes

struct  GrassSpeciesData

Detailed Description

Definition at line 43 of file llvograss.h.


Member Typedef Documentation

typedef std::map<U32, GrassSpeciesData*> LLVOGrass::SpeciesMap

Definition at line 93 of file llvograss.h.


Constructor & Destructor Documentation

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

Definition at line 74 of file llvograss.cpp.

References LLVector3::clearVec(), f, GRASS_MAX_BLADES, LLViewerObject::mbCanSelect, mBladeWindAngle, mBWAOverlap, mGrassBend, mGrassVel, mLastPatchUpdateTime, mNumBlades, mPatch, NULL, LLViewerObject::setNumTEs(), LLViewerObject::setTEColor(), and TRUE.

LLVOGrass::~LLVOGrass (  )  [protected]

Definition at line 92 of file llvograss.cpp.


Member Function Documentation

void LLVOGrass::cleanupClass (  )  [static]

Definition at line 260 of file llvograss.cpp.

References sSpeciesTable.

Referenced by LLViewerObject::cleanupVOClasses().

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

Reimplemented from LLViewerObject.

Definition at line 392 of file llvograss.cpp.

References LLPipeline::allocDrawable(), LLViewerObject::mDrawable, and LLPipeline::RENDER_TYPE_GRASS.

void LLVOGrass::exportFile ( FILE *  file,
const LLVector3 position 
)

void LLVOGrass::getGeometry ( S32  idx,
LLStrider< LLVector3 > &  verticesp,
LLStrider< LLVector3 > &  normalsp,
LLStrider< LLVector2 > &  texcoordsp,
LLStrider< LLColor4U > &  colorsp,
LLStrider< U32 > &  indicesp 
) [virtual]

Implements LLAlphaObject.

Definition at line 437 of file llvograss.cpp.

References dz_x, dz_y, exp_x, exp_y, f, face, LLViewerRegion::getLand(), LLSurfacePatch::getLastUpdateTime(), LLViewerRegion::getOriginAgent(), LLViewerObject::getPositionRegion(), GRASS_BLADE_BASE, GRASS_BLADE_HEIGHT, height, i, LLViewerObject::mDrawable, mLastPatchUpdateTime, mNumBlades, mPatch, LLXform::mPosition, LLViewerObject::mRegionp, LLXform::mScale, mSpecies, LLVector3::mV, LLVector3::normVec(), LLSurface::resolveHeightRegion(), LLSurface::resolvePatchRegion(), rot_x, rot_y, S32, LLPipeline::sCompiles, sSpeciesTable, v1, v2, VX, VY, VZ, w_mod, width, x, and y.

U32 LLVOGrass::getPartitionType (  )  const [virtual]

Reimplemented from LLViewerObject.

Definition at line 553 of file llvograss.cpp.

References LLPipeline::PARTITION_GRASS.

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

Reimplemented from LLViewerObject.

Definition at line 299 of file llvograss.cpp.

References LLSurfacePatch::getLastUpdateTime(), gPipeline, LLPipeline::hasRenderType(), LLPipeline::markRebuild(), LLViewerObject::mDead, LLViewerObject::mDrawable, mLastPatchUpdateTime, mPatch, LLDrawable::REBUILD_VOLUME, LLPipeline::RENDER_TYPE_GRASS, and TRUE.

static void LLVOGrass::import ( FILE *  file,
LLMessageSystem mesgsys,
const LLVector3 pos 
) [static]

void LLVOGrass::initClass (  )  [static]

Definition at line 117 of file llvograss.cpp.

References LLXmlTree::addAttributeString(), alert_done(), LLViewerWindow::alertXml(), dz_x, dz_y, exp_x, exp_y, f, F_PI, FALSE, gDirUtilp, LLDir::getExpandedFilename(), LLXmlTreeNode::getFirstChild(), LLXmlTreeNode::getNextChild(), LLXmlTree::getRoot(), LLControlGroup::getString(), GRASS_BLADE_BASE, GRASS_DISTRIBUTION_SD, GRASS_MAX_BLADES, gViewerArt, gViewerWindow, i, LLUUID::isNull(), ll_frand(), LL_PATH_APP_SETTINGS, llendl, llerrs, llinfos, llwarns, LLVOGrass::GrassSpeciesData::mBladeSizeX, LLVOGrass::GrassSpeciesData::mBladeSizeY, LLVOGrass::GrassSpeciesData::mTextureID, LLXmlTree::parseFile(), rot_x, rot_y, S32, LLUUID::set(), sMaxGrassSpecies, sSpeciesTable, TRUE, u, v, w_mod, x, and y.

Referenced by LLViewerObject::initVOClasses().

BOOL LLVOGrass::isActive (  )  const [virtual]

Reimplemented from LLViewerObject.

Definition at line 294 of file llvograss.cpp.

References TRUE.

void LLVOGrass::plantBlades (  ) 

Definition at line 407 of file llvograss.cpp.

References face, gCamera, LLCoordFrame::getAtAxis(), LLCoordFrame::getOrigin(), LLViewerRegion::getOriginAgent(), LLViewerObject::getTEImage(), LLFace::GLOBAL, llendl, llinfos, LLAlphaObject::mDepth, LLViewerObject::mDrawable, mNumBlades, LLXform::mPosition, LLViewerObject::mRegionp, mSpecies, NULL, LLPipeline::sCompiles, and sSpeciesTable.

Referenced by updateGeometry().

U32 LLVOGrass::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 llvograss.cpp.

References f, LLPrimitive::getAcceleration(), LLPrimitive::getAngularVelocity(), LLPrimitive::getVelocity(), gPipeline, llendl, llinfos, LLPipeline::markRebuild(), LLViewerObject::mDrawable, LLViewerObject::processUpdateMessage(), LLDrawable::REBUILD_VOLUME, LLPrimitive::setAcceleration(), LLPrimitive::setAngularVelocity(), LLPrimitive::setVelocity(), TRUE, updateSpecies(), and LLVector3::zero.

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

Reimplemented from LLViewerObject.

Definition at line 321 of file llvograss.cpp.

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

void LLVOGrass::updateDrawable ( BOOL  force_damped  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 570 of file llvograss.cpp.

References LLXform::clearChanged(), gPipeline, LLPipeline::markRebuild(), LLViewerObject::mDrawable, LLPointer< Type >::notNull(), LLDrawable::REBUILD_ALL, LLXform::SHIFTED, and TRUE.

void LLVOGrass::updateFaceSize ( S32  idx  )  [inline, virtual]

Reimplemented from LLViewerObject.

Definition at line 73 of file llvograss.h.

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

Reimplemented from LLViewerObject.

Definition at line 400 of file llvograss.cpp.

References LLFastTimer::FTM_UPDATE_GRASS, plantBlades(), and TRUE.

BOOL LLVOGrass::updateLOD (  )  [virtual]

Reimplemented from LLViewerObject.

Definition at line 352 of file llvograss.cpp.

References face, FALSE, gPipeline, GRASS_MAX_BLADES, llmax(), llmin(), lltrunc(), LLPipeline::markRebuild(), LLViewerObject::mDrawable, mNumBlades, LLXform::mScale, LLVector3::mV, LLDrawable::REBUILD_ALL, S32, and TRUE.

void LLVOGrass::updateSpecies (  )  [private]

Definition at line 97 of file llvograss.cpp.

References LLViewerImageList::getImage(), gImageList, llendl, llinfos, mSpecies, LLViewerObject::mState, LLViewerObject::setTEImage(), and sSpeciesTable.

Referenced by processUpdateMessage().

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

Reimplemented from LLViewerObject.

Definition at line 340 of file llvograss.cpp.

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


Member Data Documentation

F32 LLVOGrass::mBladeSizeX

Definition at line 96 of file llvograss.h.

F32 LLVOGrass::mBladeSizeY

Definition at line 97 of file llvograss.h.

F32 LLVOGrass::mBladeWindAngle

Definition at line 106 of file llvograss.h.

Referenced by LLVOGrass().

F32 LLVOGrass::mBWAOverlap

Definition at line 107 of file llvograss.h.

Referenced by LLVOGrass().

LLVector3 LLVOGrass::mGrassBend

Definition at line 103 of file llvograss.h.

Referenced by LLVOGrass().

LLVector3 LLVOGrass::mGrassVel

Definition at line 104 of file llvograss.h.

Referenced by LLVOGrass().

F32 LLVOGrass::mLastHeight [private]

Definition at line 114 of file llvograss.h.

U64 LLVOGrass::mLastPatchUpdateTime

Definition at line 101 of file llvograss.h.

Referenced by getGeometry(), idleUpdate(), and LLVOGrass().

S32 LLVOGrass::mNumBlades [private]

Definition at line 115 of file llvograss.h.

Referenced by getGeometry(), LLVOGrass(), plantBlades(), and updateLOD().

LLSurfacePatch* LLVOGrass::mPatch

Definition at line 99 of file llvograss.h.

Referenced by getGeometry(), idleUpdate(), and LLVOGrass().

U8 LLVOGrass::mSpecies

Definition at line 95 of file llvograss.h.

Referenced by getGeometry(), plantBlades(), and updateSpecies().

LLVector3 LLVOGrass::mWind

Definition at line 105 of file llvograss.h.

S32 LLVOGrass::sMaxGrassSpecies = 0 [static]

Definition at line 83 of file llvograss.h.

Referenced by add_object(), and initClass().

LLVOGrass::SpeciesMap LLVOGrass::sSpeciesTable [static, private]

Definition at line 117 of file llvograss.h.

Referenced by cleanupClass(), getGeometry(), initClass(), plantBlades(), and updateSpecies().


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