summaryrefslogtreecommitdiff
path: root/indra/llmath
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-04 09:48:05 -0500
committerDave Parks <davep@lindenlab.com>2010-10-04 09:48:05 -0500
commit478e0927c87338e02e75d3791f51ad2b4e7b8c74 (patch)
treecc6294dc5c09be73a540f50af8981e625766a3c1 /indra/llmath
parentde5ae7ecebd4ef43c942a1dcb07045bf586f92d7 (diff)
Interface/state for rendering convex hull physics shapes. Still need to implement gMeshRepo.buildHull
Diffstat (limited to 'indra/llmath')
-rw-r--r--indra/llmath/llvolume.cpp9
-rw-r--r--indra/llmath/llvolume.h8
2 files changed, 16 insertions, 1 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index b3a6880011..3da9c9ca79 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -1828,6 +1828,10 @@ LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL ge
mSculptLevel = -2;
mIsTetrahedron = FALSE;
mLODScaleBias.setVec(1,1,1);
+ mHullPoints = NULL;
+ mHullIndices = NULL;
+ mNumHullPoints = 0;
+ mNumHullIndices = 0;
// set defaults
if (mParams.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE)
@@ -1879,6 +1883,11 @@ LLVolume::~LLVolume()
mPathp = NULL;
mProfilep = NULL;
mVolumeFaces.clear();
+
+ free(mHullPoints);
+ mHullPoints = NULL;
+ free(mHullIndices);
+ mHullIndices = NULL;
}
BOOL LLVolume::generate()
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index 857188ed28..6e080f4877 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -1068,10 +1068,16 @@ public:
LLPath *mPathp;
LLProfile *mProfilep;
std::vector<Point> mMesh;
-
+
BOOL mGenerateSingleFace;
typedef std::vector<LLVolumeFace> face_list_t;
face_list_t mVolumeFaces;
+
+public:
+ LLVector4a* mHullPoints;
+ U16* mHullIndices;
+ S32 mNumHullPoints;
+ S32 mNumHullIndices;
};
std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params);