summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.h')
-rw-r--r--indra/newview/llvoavatar.h37
1 files changed, 31 insertions, 6 deletions
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 3659fb055f..295799fd24 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -123,10 +123,11 @@ public:
virtual BOOL idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time);
virtual BOOL updateLOD();
BOOL updateJointLODs();
+ void updateLODRiggedAttachments( void );
virtual BOOL isActive() const; // Whether this object needs to do an idleUpdate.
virtual void updateTextures();
virtual S32 setTETexture(const U8 te, const LLUUID& uuid); // If setting a baked texture, need to request it from a non-local sim.
- virtual void onShift(const LLVector3& shift_vector);
+ virtual void onShift(const LLVector4a& shift_vector);
virtual U32 getPartitionType() const;
virtual const LLVector3 getRenderPosition() const;
virtual void updateDrawable(BOOL force_damped);
@@ -134,8 +135,8 @@ public:
virtual BOOL updateGeometry(LLDrawable *drawable);
virtual void setPixelAreaAndAngle(LLAgent &agent);
virtual void updateRegion(LLViewerRegion *regionp);
- virtual void updateSpatialExtents(LLVector3& newMin, LLVector3 &newMax);
- virtual void getSpatialExtents(LLVector3& newMin, LLVector3& newMax);
+ virtual void updateSpatialExtents(LLVector4a& newMin, LLVector4a &newMax);
+ virtual void getSpatialExtents(LLVector4a& newMin, LLVector4a& newMax);
virtual BOOL lineSegmentIntersect(const LLVector3& start, const LLVector3& end,
S32 face = -1, // which face to check, -1 = ALL_SIDES
BOOL pick_transparent = FALSE,
@@ -167,7 +168,11 @@ public:
virtual LLJoint* getJoint(const std::string &name);
virtual LLJoint* getRootJoint() { return &mRoot; }
-
+
+ void resetJointPositions( void );
+ void resetJointPositionsToDefault( void );
+ void resetSpecificJointPosition( const std::string& name );
+
virtual const char* getAnimationPrefix() { return "avatar"; }
virtual const LLUUID& getID();
virtual LLVector3 getVolumePos(S32 joint_index, LLVector3& volume_offset);
@@ -196,6 +201,10 @@ public:
public:
virtual bool isSelf() const { return false; } // True if this avatar is for this viewer's agent
bool isBuilt() const { return mIsBuilt; }
+
+private: //aligned members
+ LLVector4a mImpostorExtents[2];
+
private:
BOOL mSupportsAlphaLayers; // For backwards compatibility, TRUE for 1.23+ clients
@@ -285,6 +294,16 @@ protected:
public:
void updateHeadOffset();
F32 getPelvisToFoot() const { return mPelvisToFoot; }
+ void setPelvisOffset( bool hasOffset, const LLVector3& translation, F32 offset ) ;
+ bool hasPelvisOffset( void ) { return mHasPelvisOffset; }
+ void postPelvisSetRecalc( void );
+ void setPelvisOffset( F32 pelvixFixupAmount );
+
+ bool mHasPelvisOffset;
+ LLVector3 mPelvisOffset;
+ F32 mLastPelvisToFoot;
+ F32 mPelvisFixup;
+ F32 mLastPelvisFixup;
LLVector3 mHeadOffset; // current head position
LLViewerJoint mRoot;
@@ -352,6 +371,8 @@ public:
U32 renderImpostor(LLColor4U color = LLColor4U(255,255,255,255), S32 diffuse_channel = 0);
U32 renderRigid();
U32 renderSkinned(EAvatarRenderPass pass);
+ F32 getLastSkinTime() { return mLastSkinTime; }
+ U32 renderSkinnedAttachments();
U32 renderTransparent(BOOL first_pass);
void renderCollisionVolumes();
static void deleteCachedImages(bool clearAll=true);
@@ -363,6 +384,8 @@ private:
bool shouldAlphaMask();
BOOL mNeedsSkin; // avatar has been animated and verts have not been updated
+ F32 mLastSkinTime; //value of gFrameTimeSeconds at last skin update
+
S32 mUpdatePeriod;
S32 mNumInitFaces; //number of faces generated when creating the avatar drawable, does not inculde splitted faces due to long vertex buffer.
@@ -402,7 +425,7 @@ public:
BOOL needsImpostorUpdate() const;
const LLVector3& getImpostorOffset() const;
const LLVector2& getImpostorDim() const;
- void getImpostorValues(LLVector3* extents, LLVector3& angle, F32& distance) const;
+ void getImpostorValues(LLVector4a* extents, LLVector3& angle, F32& distance) const;
void cacheImpostorValues();
void setImpostorDim(const LLVector2& dim);
static void resetImpostors();
@@ -413,7 +436,6 @@ private:
LLVector3 mImpostorOffset;
LLVector2 mImpostorDim;
BOOL mNeedsAnimUpdate;
- LLVector3 mImpostorExtents[2];
LLVector3 mImpostorAngle;
F32 mImpostorDistance;
F32 mImpostorPixelArea;
@@ -671,10 +693,12 @@ public:
void clampAttachmentPositions();
virtual const LLViewerJointAttachment* attachObject(LLViewerObject *viewer_object);
virtual BOOL detachObject(LLViewerObject *viewer_object);
+ void cleanupAttachedMesh( LLViewerObject* pVO );
static LLVOAvatar* findAvatarFromAttachment(LLViewerObject* obj);
protected:
LLViewerJointAttachment* getTargetAttachmentPoint(LLViewerObject* viewer_object);
void lazyAttach();
+ void rebuildRiggedAttachments( void );
//--------------------------------------------------------------------
// Map of attachment points, by ID
@@ -786,6 +810,7 @@ protected:
//--------------------------------------------------------------------
public:
void resolveHeightGlobal(const LLVector3d &inPos, LLVector3d &outPos, LLVector3 &outNorm);
+ bool distanceToGround( const LLVector3d &startPoint, LLVector3d &collisionPoint, F32 distToIntersectionAlongRay );
void resolveHeightAgent(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm);
void resolveRayCollisionAgent(const LLVector3d start_pt, const LLVector3d end_pt, LLVector3d &out_pos, LLVector3 &out_norm);
void slamPosition(); // Slam position to transmitted position (for teleport);