LLVOCloth Class Reference

#include <llcape.h>

Inheritance diagram for LLVOCloth:

Inheritance graph
[legend]
Collaboration diagram for LLVOCloth:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLVOCloth (const LLUUID &id, const LLPCode type, LLViewerRegion *regionp)
void update ()
void render ()
void markAsDead ()
void setAttributes (LLClothAttributes)
void setNumStrands (int num)
void setNumSegments (int num)
void setLength (F32 length)
void setTension (F32 t)
void setGravity (F32 g)
void setCircleWrapAmount (F32 n)
void setAirFriction (F32 a)
void setWindSensitivity (F32 w)
void setPitch (F32 p)
void setWidth (F32 n)
void setVisualizingStrands (bool v)
void setVisualizingAvCollisionSphere (bool v)
void setAvatarCollisionSphereRadius (F32 r)
void setAvatarCollisionSphereRight (F32 r)
void setAvatarCollisionSphereUp (F32 u)
void setAvatarCollisionSphereForward (F32 f)
bool getVisualizingStrands () const
bool getVisualizingAvCollisionSphere () const
int getNumStrands ()
int getNumSegments ()
F32 getLength ()
F32 getWidth ()
F32 getCircleWrapAmount ()
F32 getPitch ()
F32 getTension ()
F32 getGravity ()
F32 getAirFriction ()
F32 getWindSensitivity ()
F32 getAvatarCollisionSphereRadius ()
F32 getAvatarCollisionSphereRight ()
F32 getAvatarCollisionSphereUp ()
F32 getAvatarCollisionSphereForward ()

Private Member Functions

void updateVirtualServer ()
void generateStrands ()

Private Attributes

LLClothAttributes mAttributes
LLVector3 mAvatarCollisionSpherePosition
LLViewerObjectmDummyVO [CLOTH_MAX_STRANDS]
LLVolumeImplFlexiblemStrand [CLOTH_MAX_STRANDS]

Detailed Description

Definition at line 162 of file llcape.h.


Constructor & Destructor Documentation

LLVOCloth::LLVOCloth ( const LLUUID id,
const LLPCode  type,
LLViewerRegion regionp 
)

Definition at line 56 of file llcape.cpp.

References CLOTH_DEFAULT_AIR_FRICTION, CLOTH_DEFAULT_AVATAR_COLLISION_SPHERE_FORWARD_OFFSET, CLOTH_DEFAULT_AVATAR_COLLISION_SPHERE_RADIUS, CLOTH_DEFAULT_AVATAR_COLLISION_SPHERE_RIGHT_OFFSET, CLOTH_DEFAULT_AVATAR_COLLISION_SPHERE_UP_OFFSET, CLOTH_DEFAULT_CIRCLE_WRAP_AMOUNT, CLOTH_DEFAULT_GRAVITY, CLOTH_DEFAULT_LENGTH, CLOTH_DEFAULT_NUM_SEGMENTS, CLOTH_DEFAULT_NUM_STRANDS, CLOTH_DEFAULT_PITCH, CLOTH_DEFAULT_TENSION, CLOTH_DEFAULT_TEXTURE_FILENAME, CLOTH_DEFAULT_TEXTURE_INDEX, CLOTH_DEFAULT_USING_AVATAR_COLLISION_SPHERE, CLOTH_DEFAULT_VISUALIZE_COLLISION_SPHERE, CLOTH_DEFAULT_VISUALIZE_STRANDS, CLOTH_DEFAULT_WIDTH, CLOTH_DEFAULT_WIND_SENSITIVITY, generateStrands(), LLClothAttributes::mAirFriction, mAttributes, LLClothAttributes::mAvatarCollisionSphereForwardOffset, LLClothAttributes::mAvatarCollisionSphereRadius, LLClothAttributes::mAvatarCollisionSphereRightOffset, LLClothAttributes::mAvatarCollisionSphereUpOffset, LLClothAttributes::mCircleWrapAmount, LLClothAttributes::mGravity, LLClothAttributes::mLength, LLClothAttributes::mNumSegments, LLClothAttributes::mNumStrands, LLClothAttributes::mPitch, LLClothAttributes::mTension, LLClothAttributes::mTextureFileName, LLClothAttributes::mTextureIndex, LLClothAttributes::mUsingAvatarCollisionSphere, LLClothAttributes::mVisualizeAvCollisionSphere, LLClothAttributes::mVisualizeStrands, LLClothAttributes::mWidth, and LLClothAttributes::mWindSensitivity.


Member Function Documentation

void LLVOCloth::generateStrands (  )  [private]

Definition at line 89 of file llcape.cpp.

References angle, F_PI, mAttributes, LLClothAttributes::mCircleWrapAmount, LLClothAttributes::mNumStrands, LLClothAttributes::mWidth, ONE_HALF, r, s, x, and y.

Referenced by LLVOCloth(), setAirFriction(), setAttributes(), setCircleWrapAmount(), setGravity(), setLength(), setNumSegments(), setNumStrands(), setPitch(), setTension(), setWidth(), and setWindSensitivity().

F32 LLVOCloth::getAirFriction (  ) 

Definition at line 587 of file llcape.cpp.

References LLClothAttributes::mAirFriction, and mAttributes.

F32 LLVOCloth::getAvatarCollisionSphereForward (  ) 

Definition at line 622 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereForwardOffset.

F32 LLVOCloth::getAvatarCollisionSphereRadius (  ) 

Definition at line 607 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereRadius.

F32 LLVOCloth::getAvatarCollisionSphereRight (  ) 

Definition at line 612 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereRightOffset.

F32 LLVOCloth::getAvatarCollisionSphereUp (  ) 

Definition at line 617 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereUpOffset.

F32 LLVOCloth::getCircleWrapAmount (  ) 

Definition at line 567 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mCircleWrapAmount.

F32 LLVOCloth::getGravity (  ) 

Definition at line 582 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mGravity.

F32 LLVOCloth::getLength (  ) 

Definition at line 557 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mLength.

int LLVOCloth::getNumSegments (  ) 

Definition at line 552 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mNumSegments.

int LLVOCloth::getNumStrands (  ) 

Definition at line 547 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mNumStrands.

F32 LLVOCloth::getPitch (  ) 

Definition at line 572 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mPitch.

F32 LLVOCloth::getTension (  ) 

Definition at line 577 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mTension.

bool LLVOCloth::getVisualizingAvCollisionSphere (  )  const

Definition at line 602 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mVisualizeAvCollisionSphere.

bool LLVOCloth::getVisualizingStrands (  )  const

Definition at line 597 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mVisualizeStrands.

F32 LLVOCloth::getWidth (  ) 

Definition at line 562 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mWidth.

F32 LLVOCloth::getWindSensitivity (  ) 

Definition at line 592 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mWindSensitivity.

void LLVOCloth::markAsDead (  ) 

Definition at line 630 of file llcape.cpp.

References LLViewerObject::mDead, and TRUE.

void LLVOCloth::render (  ) 

Definition at line 233 of file llcape.cpp.

References _X_, _Y_, _Z_, LLViewerImage::bindTexture(), f, LLVolumeImplFlexible::getAnchorPosition(), LLViewerImageList::getImage(), LLVolumeImplFlexible::getNodePosition(), LLControlGroup::getString(), gImageList, glBegin, glColor4fv, glEnd, glPopMatrix, glTranslatef, gSphere, gViewerArt, i, mAttributes, MIPMAP_FALSE, LLClothAttributes::mNumSegments, LLClothAttributes::mNumStrands, mStrand, LLClothAttributes::mTextureFileName, LLVector3::mV, LLClothAttributes::mVisualizeStrands, LLSphere::render(), s, STRAND_VISUALIZATION_ANCHOR_BALL_RADIUS, TRUE, and LLImageGL::unbindTexture().

void LLVOCloth::setAirFriction ( F32  a  ) 

Definition at line 484 of file llcape.cpp.

References generateStrands(), LLClothAttributes::mAirFriction, and mAttributes.

void LLVOCloth::setAttributes ( LLClothAttributes   ) 

Definition at line 376 of file llcape.cpp.

References a, CLOTH_MAX_AIR_FRICTION, CLOTH_MAX_AVATAR_COLLISION_SPHERE_FORWARD_OFFSET, CLOTH_MAX_AVATAR_COLLISION_SPHERE_RADIUS, CLOTH_MAX_AVATAR_COLLISION_SPHERE_RIGHT_OFFSET, CLOTH_MAX_AVATAR_COLLISION_SPHERE_UP_OFFSET, CLOTH_MAX_CIRCLE_WRAP_AMOUNT, CLOTH_MAX_GRAVITY, CLOTH_MAX_LENGTH, CLOTH_MAX_PITCH, CLOTH_MAX_SEGMENTS, CLOTH_MAX_STRANDS, CLOTH_MAX_TENSION, CLOTH_MAX_TEXTURE_INDEX, CLOTH_MAX_WIDTH, CLOTH_MAX_WIND_SENSITIVITY, CLOTH_MIN_AIR_FRICTION, CLOTH_MIN_AVATAR_COLLISION_SPHERE_FORWARD_OFFSET, CLOTH_MIN_AVATAR_COLLISION_SPHERE_RADIUS, CLOTH_MIN_AVATAR_COLLISION_SPHERE_RIGHT_OFFSET, CLOTH_MIN_AVATAR_COLLISION_SPHERE_UP_OFFSET, CLOTH_MIN_CIRCLE_WRAP_AMOUNT, CLOTH_MIN_GRAVITY, CLOTH_MIN_LENGTH, CLOTH_MIN_PITCH, CLOTH_MIN_SEGMENTS, CLOTH_MIN_STRANDS, CLOTH_MIN_TENSION, CLOTH_MIN_TEXTURE_INDEX, CLOTH_MIN_WIDTH, CLOTH_MIN_WIND_SENSITIVITY, generateStrands(), LLClothAttributes::mAirFriction, mAttributes, LLClothAttributes::mAvatarCollisionSphereForwardOffset, LLClothAttributes::mAvatarCollisionSphereRadius, LLClothAttributes::mAvatarCollisionSphereRightOffset, LLClothAttributes::mAvatarCollisionSphereUpOffset, LLClothAttributes::mCircleWrapAmount, LLClothAttributes::mGravity, LLClothAttributes::mLength, LLClothAttributes::mNumSegments, LLClothAttributes::mNumStrands, LLClothAttributes::mPitch, LLClothAttributes::mTension, LLClothAttributes::mTextureFileName, LLClothAttributes::mTextureIndex, LLClothAttributes::mUsingAvatarCollisionSphere, LLClothAttributes::mVisualizeAvCollisionSphere, LLClothAttributes::mVisualizeStrands, LLClothAttributes::mWidth, and LLClothAttributes::mWindSensitivity.

void LLVOCloth::setAvatarCollisionSphereForward ( F32  f  ) 

Definition at line 535 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereForwardOffset.

void LLVOCloth::setAvatarCollisionSphereRadius ( F32  r  ) 

Definition at line 517 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereRadius.

void LLVOCloth::setAvatarCollisionSphereRight ( F32  r  ) 

Definition at line 523 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereRightOffset.

void LLVOCloth::setAvatarCollisionSphereUp ( F32  u  ) 

Definition at line 529 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mAvatarCollisionSphereUpOffset.

void LLVOCloth::setCircleWrapAmount ( F32  n  ) 

Definition at line 466 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mCircleWrapAmount.

void LLVOCloth::setGravity ( F32  g  ) 

Definition at line 472 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mGravity.

void LLVOCloth::setLength ( F32  length  ) 

Definition at line 460 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mLength.

void LLVOCloth::setNumSegments ( int  num  ) 

Definition at line 454 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mNumSegments.

void LLVOCloth::setNumStrands ( int  num  ) 

Definition at line 448 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mNumStrands.

void LLVOCloth::setPitch ( F32  p  ) 

Definition at line 478 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mPitch.

void LLVOCloth::setTension ( F32  t  ) 

Definition at line 496 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mTension.

void LLVOCloth::setVisualizingAvCollisionSphere ( bool  v  ) 

Definition at line 512 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mVisualizeAvCollisionSphere.

void LLVOCloth::setVisualizingStrands ( bool  v  ) 

Definition at line 508 of file llcape.cpp.

References mAttributes, and LLClothAttributes::mVisualizeStrands.

void LLVOCloth::setWidth ( F32  n  ) 

Definition at line 502 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mWidth.

void LLVOCloth::setWindSensitivity ( F32  w  ) 

Definition at line 490 of file llcape.cpp.

References generateStrands(), mAttributes, and LLClothAttributes::mWindSensitivity.

void LLVOCloth::update (  ) 

Definition at line 190 of file llcape.cpp.

References gAgent, LLAgent::getAvatarObject(), LLViewerObject::getRenderPosition(), LLViewerObject::getRenderRotation(), mAttributes, LLClothAttributes::mAvatarCollisionSphereForwardOffset, mAvatarCollisionSpherePosition, LLClothAttributes::mAvatarCollisionSphereRadius, LLClothAttributes::mAvatarCollisionSphereRightOffset, LLClothAttributes::mAvatarCollisionSphereUpOffset, LLClothAttributes::mNumStrands, LLXform::mParent, mStrand, LLClothAttributes::mUsingAvatarCollisionSphere, s, and LLVector3::setVec().

void LLVOCloth::updateVirtualServer (  )  [private]


Member Data Documentation

LLClothAttributes LLVOCloth::mAttributes [private]

Definition at line 215 of file llcape.h.

Referenced by generateStrands(), getAirFriction(), getAvatarCollisionSphereForward(), getAvatarCollisionSphereRadius(), getAvatarCollisionSphereRight(), getAvatarCollisionSphereUp(), getCircleWrapAmount(), getGravity(), getLength(), getNumSegments(), getNumStrands(), getPitch(), getTension(), getVisualizingAvCollisionSphere(), getVisualizingStrands(), getWidth(), getWindSensitivity(), LLVOCloth(), render(), setAirFriction(), setAttributes(), setAvatarCollisionSphereForward(), setAvatarCollisionSphereRadius(), setAvatarCollisionSphereRight(), setAvatarCollisionSphereUp(), setCircleWrapAmount(), setGravity(), setLength(), setNumSegments(), setNumStrands(), setPitch(), setTension(), setVisualizingAvCollisionSphere(), setVisualizingStrands(), setWidth(), setWindSensitivity(), and update().

LLVector3 LLVOCloth::mAvatarCollisionSpherePosition [private]

Definition at line 216 of file llcape.h.

Referenced by update().

LLViewerObject* LLVOCloth::mDummyVO[CLOTH_MAX_STRANDS] [private]

Definition at line 218 of file llcape.h.

LLVolumeImplFlexible* LLVOCloth::mStrand[CLOTH_MAX_STRANDS] [private]

Definition at line 219 of file llcape.h.

Referenced by render(), and update().


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