aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath/llvolume.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmath/llvolume.h')
-rw-r--r--linden/indra/llmath/llvolume.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/linden/indra/llmath/llvolume.h b/linden/indra/llmath/llvolume.h
index 7b384f2..5ec7997 100644
--- a/linden/indra/llmath/llvolume.h
+++ b/linden/indra/llmath/llvolume.h
@@ -762,7 +762,8 @@ class LLVolumeFace
762{ 762{
763public: 763public:
764 LLVolumeFace(); 764 LLVolumeFace();
765 BOOL create(); 765 BOOL create(BOOL partial_build = FALSE);
766 void createBinormals();
766 767
767 class VertexData 768 class VertexData
768 { 769 {
@@ -792,6 +793,7 @@ public:
792 S32 mID; 793 S32 mID;
793 U32 mTypeMask; 794 U32 mTypeMask;
794 LLVector3 mCenter; 795 LLVector3 mCenter;
796 BOOL mHasBinormals;
795 797
796 // Only used for INNER/OUTER faces 798 // Only used for INNER/OUTER faces
797 S32 mBeginS; 799 S32 mBeginS;
@@ -802,7 +804,7 @@ public:
802 LLVector3 mExtents[2]; //minimum and maximum point of face 804 LLVector3 mExtents[2]; //minimum and maximum point of face
803 805
804 std::vector<VertexData> mVertices; 806 std::vector<VertexData> mVertices;
805 std::vector<S32> mIndices; 807 std::vector<U16> mIndices;
806 std::vector<S32> mEdge; 808 std::vector<S32> mEdge;
807 LLVolume *mVolumep; // Deliberately NOT reference counted - djs 11/20/03 - otherwise would make an annoying circular reference 809 LLVolume *mVolumep; // Deliberately NOT reference counted - djs 11/20/03 - otherwise would make an annoying circular reference
808 810
@@ -811,9 +813,9 @@ public:
811 LLStrider<LLColor4U> &new_colors, const S32 num_new, const LLVolumeFace &new_face); 813 LLStrider<LLColor4U> &new_colors, const S32 num_new, const LLVolumeFace &new_face);
812 814
813protected: 815protected:
814 BOOL createUnCutCubeCap(); 816 BOOL createUnCutCubeCap(BOOL partial_build = FALSE);
815 BOOL createCap(); 817 BOOL createCap(BOOL partial_build = FALSE);
816 BOOL createSide(); 818 BOOL createSide(BOOL partial_build = FALSE);
817}; 819};
818 820
819class LLVolume : public LLRefCount 821class LLVolume : public LLRefCount
@@ -850,12 +852,14 @@ public:
850 LLVolumeParams getCopyOfParams() const { return mParams; } 852 LLVolumeParams getCopyOfParams() const { return mParams; }
851 const LLProfile& getProfile() const { return *mProfilep; } 853 const LLProfile& getProfile() const { return *mProfilep; }
852 LLPath& getPath() const { return *mPathp; } 854 LLPath& getPath() const { return *mPathp; }
855 void resizePath(S32 length);
853 const std::vector<Point>& getMesh() const { return mMesh; } 856 const std::vector<Point>& getMesh() const { return mMesh; }
854 const LLVector3& getMeshPt(const U32 i) const { return mMesh[i].mPos; } 857 const LLVector3& getMeshPt(const U32 i) const { return mMesh[i].mPos; }
855 858
856 void setDirty() { mPathp->setDirty(); mProfilep->setDirty(); } 859 void setDirty() { mPathp->setDirty(); mProfilep->setDirty(); }
857 860
858 void regen(); 861 void regen();
862 void genBinormals(S32 face);
859 863
860 BOOL isConvex() const; 864 BOOL isConvex() const;
861 BOOL isCap(S32 face); 865 BOOL isCap(S32 face);
@@ -899,6 +903,10 @@ public:
899 LLVector3 mLODScaleBias; // vector for biasing LOD based on scale 903 LLVector3 mLODScaleBias; // vector for biasing LOD based on scale
900 904
901 void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level); 905 void sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level);
906private:
907 F32 sculptGetSurfaceArea(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data);
908 void sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, U8 sculpt_type);
909 void sculptGeneratePlaceholder();
902 910
903protected: 911protected:
904 BOOL generate(); 912 BOOL generate();