diff options
Diffstat (limited to 'indra/newview/llface.h')
-rw-r--r-- | indra/newview/llface.h | 52 |
1 files changed, 39 insertions, 13 deletions
diff --git a/indra/newview/llface.h b/indra/newview/llface.h index 0166e45bee..b2170c4cf3 100644 --- a/indra/newview/llface.h +++ b/indra/newview/llface.h @@ -59,6 +59,17 @@ class LLFace { public: + LLFace(const LLFace& rhs) + { + *this = rhs; + } + + const LLFace& operator=(const LLFace& rhs) + { + llerrs << "Illegal operation!" << llendl; + return *this; + } + enum EMasks { LIGHT = 0x0001, @@ -67,6 +78,7 @@ public: HUD_RENDER = 0x0008, USE_FACE_COLOR = 0x0010, TEXTURE_ANIM = 0x0020, + RIGGED = 0x0040, }; static void initClass(); @@ -119,14 +131,14 @@ public: LLDrawable* getDrawable() const { return mDrawablep; } LLViewerObject* getViewerObject() const { return mVObjp; } S32 getLOD() const { return mVObjp.notNull() ? mVObjp->getLOD() : 0; } - LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; } void setPoolType(U32 type) { mPoolType = type; } S32 getTEOffset() { return mTEOffset; } LLViewerTexture* getTexture() const; void setViewerObject(LLViewerObject* object); void setPool(LLFacePool *pool, LLViewerTexture *texturep); - + void setPool(LLFacePool* pool); + void setDrawable(LLDrawable *drawable); void setTEOffset(const S32 te_offset); @@ -142,7 +154,8 @@ public: BOOL getGeometryVolume(const LLVolume& volume, const S32 &f, const LLMatrix4& mat_vert, const LLMatrix3& mat_normal, - const U16 &index_offset); + const U16 &index_offset, + bool force_rebuild = false); // For avatar U16 getGeometryAvatar( @@ -161,7 +174,7 @@ public: S32 getColors(LLStrider<LLColor4U> &colors); S32 getIndices(LLStrider<U16> &indices); - void setSize(const S32 numVertices, const S32 num_indices = 0); + void setSize(S32 numVertices, S32 num_indices = 0, bool align = false); BOOL genVolumeBBoxes(const LLVolume &volume, S32 f, const LLMatrix4& mat, const LLMatrix3& inv_trans_mat, BOOL global_volume = FALSE); @@ -173,7 +186,6 @@ public: void updateCenterAgent(); // Update center when xform has changed. void renderSelectedUV(); - void renderForSelect(U32 data_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0); void renderSelected(LLViewerTexture *image, const LLColor4 &color); F32 getKey() const { return mDistance; } @@ -184,8 +196,8 @@ public: BOOL verify(const U32* indices_array = NULL) const; void printDebugInfo() const; - void setGeomIndex(U16 idx) { mGeomIndex = idx; } - void setIndicesIndex(S32 idx) { mIndicesIndex = idx; } + void setGeomIndex(U16 idx); + void setIndicesIndex(S32 idx); void setDrawInfo(LLDrawInfo* draw_info); F32 getTextureVirtualSize() ; @@ -206,6 +218,19 @@ public: void removeAtlas() ; BOOL switchTexture() ; + //vertex buffer tracking + void setVertexBuffer(LLVertexBuffer* buffer); + void clearVertexBuffer(); //sets mVertexBuffer and mLastVertexBuffer to NULL + LLVertexBuffer* getVertexBuffer() const { return mVertexBuffer; } + U32 getRiggedVertexBufferDataMask() const; + S32 getRiggedIndex(U32 type) const; + void setRiggedIndex(U32 type, S32 index); + + static U32 getRiggedDataMask(U32 type); + +public: //aligned members + LLVector4a mExtents[2]; + private: F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius ); BOOL calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ; @@ -217,20 +242,19 @@ public: LLVector3 mCenterLocal; LLVector3 mCenterAgent; - LLVector3 mExtents[2]; + LLVector2 mTexExtents[2]; F32 mDistance; - LLPointer<LLVertexBuffer> mVertexBuffer; - LLPointer<LLVertexBuffer> mLastVertexBuffer; F32 mLastUpdateTime; + F32 mLastSkinTime; F32 mLastMoveTime; LLMatrix4* mTextureMatrix; LLDrawInfo* mDrawInfo; private: - friend class LLGeometryManager; - friend class LLVolumeGeometryManager; - + LLPointer<LLVertexBuffer> mVertexBuffer; + LLPointer<LLVertexBuffer> mLastVertexBuffer; + U32 mState; LLFacePool* mDrawPoolp; U32 mPoolType; @@ -255,6 +279,8 @@ private: S32 mTEOffset; S32 mReferenceIndex; + std::vector<S32> mRiggedIndex; + F32 mVSize; F32 mPixelArea; |