summaryrefslogtreecommitdiff
path: root/indra/newview/llface.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llface.h')
-rw-r--r--indra/newview/llface.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 2b134c8c31..68eee061b8 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -188,6 +188,9 @@ public:
void setIndicesIndex(S32 idx) { mIndicesIndex = idx; }
void setDrawInfo(LLDrawInfo* draw_info);
+ F32 getTextureVirtualSize() ;
+ F32 getImportanceToCamera()const {return mImportanceToCamera ;}
+
//for atlas
LLTextureAtlasSlot* getAtlasInfo() ;
void setAtlasInUse(BOOL flag);
@@ -200,6 +203,12 @@ public:
void removeAtlas() ;
BOOL switchTexture() ;
+private:
+ F32 adjustPartialOverlapPixelArea(F32 cos_angle_to_view_dir, F32 radius );
+ F32 calcPixelArea(F32& cos_angle_to_view_dir, F32& radius) ;
+public:
+ static F32 calcImportanceToCamera(F32 to_view_dir, F32 dist);
+
public:
LLVector3 mCenterLocal;
@@ -214,7 +223,7 @@ public:
LLMatrix4* mTextureMatrix;
LLDrawInfo* mDrawInfo;
-protected:
+private:
friend class LLGeometryManager;
friend class LLVolumeGeometryManager;
@@ -244,6 +253,13 @@ protected:
F32 mVSize;
F32 mPixelArea;
+ //importance factor, in the range [0, 1.0].
+ //1.0: the most important.
+ //based on the distance from the face to the view point and the angle from the face center to the view direction.
+ F32 mImportanceToCamera ;
+ F32 mBoundingSphereRadius ;
+
+
//atlas
LLPointer<LLTextureAtlasSlot> mAtlasInfop ;
BOOL mUsingAtlas ;