diff options
Diffstat (limited to 'indra/newview/gltf')
-rw-r--r-- | indra/newview/gltf/accessor.h | 4 | ||||
-rw-r--r-- | indra/newview/gltf/animation.h | 4 | ||||
-rw-r--r-- | indra/newview/gltf/asset.cpp | 12 | ||||
-rw-r--r-- | indra/newview/gltf/buffer_util.h | 2 | ||||
-rw-r--r-- | indra/newview/gltf/primitive.cpp | 18 | ||||
-rw-r--r-- | indra/newview/gltf/primitive.h | 6 |
6 files changed, 23 insertions, 23 deletions
diff --git a/indra/newview/gltf/accessor.h b/indra/newview/gltf/accessor.h index 9b8265d8da..6e8871ef61 100644 --- a/indra/newview/gltf/accessor.h +++ b/indra/newview/gltf/accessor.h @@ -61,9 +61,9 @@ namespace LL std::string mName; const BufferView& operator=(const tinygltf::BufferView& src); - + }; - + class Accessor { public: diff --git a/indra/newview/gltf/animation.h b/indra/newview/gltf/animation.h index 869eae963a..66ccd14c5c 100644 --- a/indra/newview/gltf/animation.h +++ b/indra/newview/gltf/animation.h @@ -159,7 +159,7 @@ namespace LL // min/max time values for all samplers combined F32 mMinTime = 0.f; F32 mMaxTime = 0.f; - + // current time of the animation F32 mTime = 0.f; @@ -168,7 +168,7 @@ namespace LL std::vector<ScaleChannel> mScaleChannels; const Animation& operator=(const tinygltf::Animation& src); - + void allocateGLResources(Asset& asset); void update(Asset& asset, float dt); diff --git a/indra/newview/gltf/asset.cpp b/indra/newview/gltf/asset.cpp index fbc3648fd2..973a460b73 100644 --- a/indra/newview/gltf/asset.cpp +++ b/indra/newview/gltf/asset.cpp @@ -71,7 +71,7 @@ void Node::updateTransforms(Asset& asset, const LLMatrix4a& parentMatrix) makeMatrixValid(); matMul(mMatrix, parentMatrix, mAssetMatrix); mAssetMatrixInv = inverse(mAssetMatrix); - + S32 my_index = this - &asset.mNodes[0]; for (auto& childIndex : mChildren) @@ -133,7 +133,7 @@ S32 Asset::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, { if (node.mMesh != INVALID_INDEX) { - + bool newHit = false; // transform start and end to this node's local space @@ -162,7 +162,7 @@ S32 Asset::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, if (newHit) { // shorten line segment on hit - node.mAssetMatrix.affineTransform(p, asset_end); + node.mAssetMatrix.affineTransform(p, asset_end); // transform results back to asset space if (intersection) @@ -229,7 +229,7 @@ void Node::makeMatrixValid() sc.set_scale(mScale); glh::matrix4f t; - //t = sc * rot * trans; + //t = sc * rot * trans; //t = trans * rot * sc; // best so far, still wrong on negative scale //t = sc * trans * rot; t = trans * sc * rot; @@ -538,7 +538,7 @@ const Asset& Asset::operator=(const tinygltf::Model& src) { mSkins[i] = src.skins[i]; } - + return *this; } @@ -616,7 +616,7 @@ void Skin::uploadMatrixPalette(Asset& asset, Node& node) for (U32 i = 0; i < mJoints.size(); ++i) { Node& joint = asset.mNodes[mJoints[i]]; - + //t_mp[i].set_value(joint.mRenderMatrix.getF32ptr()); //t_mp[i] = t_mp[i] * mInverseBindMatricesData[i]; diff --git a/indra/newview/gltf/buffer_util.h b/indra/newview/gltf/buffer_util.h index 4e6f5901e7..a448f7a484 100644 --- a/indra/newview/gltf/buffer_util.h +++ b/indra/newview/gltf/buffer_util.h @@ -31,7 +31,7 @@ // whenever we add support for more types #ifdef _MSC_VER -#define LL_FUNCSIG __FUNCSIG__ +#define LL_FUNCSIG __FUNCSIG__ #else #define LL_FUNCSIG __PRETTY_FUNCTION__ #endif diff --git a/indra/newview/gltf/primitive.cpp b/indra/newview/gltf/primitive.cpp index d536f6a4cd..f1f0cf48f6 100644 --- a/indra/newview/gltf/primitive.cpp +++ b/indra/newview/gltf/primitive.cpp @@ -9,7 +9,7 @@ * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; - * version 2.1 of the License only. + * version 2.1 of the License only. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -86,7 +86,7 @@ void Primitive::allocateGLResources(Asset& asset) } U32 mask = ATTRIBUTE_MASK; - + if (!mWeights.empty()) { mask |= LLVertexBuffer::MAP_WEIGHT4; @@ -124,7 +124,7 @@ void Primitive::allocateGLResources(Asset& asset) { mColors.resize(mPositions.size(), LLColor4U::white); } - + // bake material basecolor into color array if (mMaterial != INVALID_INDEX) { @@ -142,7 +142,7 @@ void Primitive::allocateGLResources(Asset& asset) { mNormals.resize(mPositions.size(), LLVector4a(0, 0, 1, 0)); } - + mVertexBuffer->setNormalData(mNormals.data()); if (mTangents.empty()) @@ -169,9 +169,9 @@ void Primitive::allocateGLResources(Asset& asset) mVertexBuffer->setWeight4Data(weight_data.data()); } - + createOctree(); - + mVertexBuffer->unbind(); } @@ -235,9 +235,9 @@ void Primitive::createOctree() const LLVector4a& v0 = mPositions[i0]; const LLVector4a& v1 = mPositions[i1]; const LLVector4a& v2 = mPositions[i2]; - + initOctreeTriangle(tri, scaler, i0, i1, i2, v0, v1, v2); - + //insert mOctree->insert(tri); } @@ -297,7 +297,7 @@ void Primitive::createOctree() { // nothing to do, no volume... maybe add some collision geometry around these primitive types? } - + else { LL_ERRS() << "Unsupported Primitive mode" << LL_ENDL; diff --git a/indra/newview/gltf/primitive.h b/indra/newview/gltf/primitive.h index 07e8e7deb2..09ab3d9ead 100644 --- a/indra/newview/gltf/primitive.h +++ b/indra/newview/gltf/primitive.h @@ -64,7 +64,7 @@ namespace LL // raycast acceleration structure LLPointer<LLVolumeOctree> mOctree; std::vector<LLVolumeTriangle> mOctreeTriangles; - + S32 mMaterial = -1; U32 mMode = TINYGLTF_MODE_TRIANGLES; // default to triangles U32 mGLMode = LLRender::TRIANGLES; @@ -75,7 +75,7 @@ namespace LL // must be called before buffer is unmapped and after buffer is populated with good data void createOctree(); - //get the LLVolumeTriangle that intersects with the given line segment at the point + //get the LLVolumeTriangle that intersects with the given line segment at the point //closest to start. Moves end to the point of intersection. Returns nullptr if no intersection. //Line segment must be in the same coordinate frame as this Primitive const LLVolumeTriangle* lineSegmentIntersect(const LLVector4a& start, const LLVector4a& end, @@ -84,7 +84,7 @@ namespace LL LLVector4a* normal = NULL, // return the surface normal at the intersection point LLVector4a* tangent = NULL // return the surface tangent at the intersection point ); - + const Primitive& operator=(const tinygltf::Primitive& src); void allocateGLResources(Asset& asset); |