diff options
Diffstat (limited to 'indra/llmath/llvolume.h')
-rw-r--r-- | indra/llmath/llvolume.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index e812e5f0cc..bbb2a16b0b 100644 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -41,6 +41,7 @@ template <class T, typename T_PTR> class LLOctreeNode; class LLVolumeFace; class LLVolume; class LLVolumeTriangle; +class LLVolumeOctree; #include "lluuid.h" #include "v4color.h" @@ -189,11 +190,13 @@ constexpr U8 LL_SCULPT_TYPE_TORUS = 2; constexpr U8 LL_SCULPT_TYPE_PLANE = 3; constexpr U8 LL_SCULPT_TYPE_CYLINDER = 4; constexpr U8 LL_SCULPT_TYPE_MESH = 5; +constexpr U8 LL_SCULPT_TYPE_GLTF = 6; +constexpr U8 LL_SCULPT_TYPE_MAX = LL_SCULPT_TYPE_GLTF; + constexpr U8 LL_SCULPT_TYPE_MASK = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE | - LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH; + LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH | LL_SCULPT_TYPE_GLTF; // for value checks, assign new value after adding new types -constexpr U8 LL_SCULPT_TYPE_MAX = LL_SCULPT_TYPE_MESH; constexpr U8 LL_SCULPT_FLAG_INVERT = 64; constexpr U8 LL_SCULPT_FLAG_MIRROR = 128; @@ -913,7 +916,7 @@ public: void createOctree(F32 scaler = 0.25f, const LLVector4a& center = LLVector4a(0,0,0), const LLVector4a& size = LLVector4a(0.5f,0.5f,0.5f)); void destroyOctree(); // Get a reference to the octree, which may be null - const LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* getOctree() const; + const LLVolumeOctree* getOctree() const; enum { @@ -987,7 +990,7 @@ public: LLVector3 mNormalizedScale = LLVector3(1,1,1); private: - LLOctreeNode<LLVolumeTriangle, LLVolumeTriangle*>* mOctree; + LLVolumeOctree* mOctree; LLVolumeTriangle* mOctreeTriangles; bool createUnCutCubeCap(LLVolume* volume, bool partial_build = false); @@ -1140,6 +1143,8 @@ public: std::ostream& operator<<(std::ostream &s, const LLVolumeParams &volume_params); +void LLCalculateTangentArray(U32 vertexCount, const LLVector4a *vertex, const LLVector4a *normal, const LLVector2 *texcoord, U32 triangleCount, const U16* index_array, LLVector4a *tangent); + bool LLLineSegmentBoxIntersect(const F32* start, const F32* end, const F32* center, const F32* size); bool LLLineSegmentBoxIntersect(const LLVector3& start, const LLVector3& end, const LLVector3& center, const LLVector3& size); bool LLLineSegmentBoxIntersect(const LLVector4a& start, const LLVector4a& end, const LLVector4a& center, const LLVector4a& size); |