diff options
author | Richard Nelson <richard@lindenlab.com> | 2011-10-03 13:23:50 -0700 |
---|---|---|
committer | Richard Nelson <richard@lindenlab.com> | 2011-10-03 13:23:50 -0700 |
commit | 0ecc5c0878adf93e96b99e3db4c65cdb757b99fb (patch) | |
tree | 25741079cb8edf161b07741decffb43ffa04b144 /indra/llprimitive/llmodel.h | |
parent | 6eb09ab2ae9c90b23c8af1929e7d0a2088a6e76e (diff) | |
parent | fa3b55e68a00359f8b37b1225337e615b3f6da4d (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience
Diffstat (limited to 'indra/llprimitive/llmodel.h')
-rw-r--r-- | indra/llprimitive/llmodel.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index 3f58eba07d..1cf528fd9f 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -148,6 +148,7 @@ public: static LLModel* loadModelFromDomMesh(domMesh* mesh); static std::string getElementLabel(daeElement* element); std::string getName() const; + std::string getMetric() const {return mMetric;} EModelStatus getStatus() const {return mStatus;} static std::string getStatusString(U32 status) ; @@ -175,8 +176,10 @@ public: //reorder face list based on mMaterialList in this and reference so //order matches that of reference (material ordering touchup) - void matchMaterialOrder(LLModel* reference); - + bool matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCnt ); + bool isMaterialListSubset( LLModel* ref ); + bool needToAddFaces( LLModel* ref, int& refFaceCnt, int& modelFaceCnt ); + std::vector<std::string> mMaterialList; //data used for skin weights @@ -217,6 +220,19 @@ public: } }; + + //Are the doubles the same w/in epsilon specified tolerance + bool areEqual( double a, double b ) + { + const float epsilon = 1e-5f; + return (fabs((a - b)) < epsilon) ? true : false ; + } + //Make sure that we return false for any values that are within the tolerance for equivalence + bool jointPositionalLookup( const LLVector3& a, const LLVector3& b ) + { + return ( areEqual( a[0],b[0]) && areEqual( a[1],b[1] ) && areEqual( a[2],b[2]) ) ? true : false; + } + //copy of position array for this model -- mPosition[idx].mV[X,Y,Z] std::vector<LLVector3> mPosition; @@ -234,6 +250,8 @@ public: std::string mRequestedLabel; // name requested in UI, if any. std::string mLabel; // name computed from dae. + std::string mMetric; // user-supplied metric data for upload + LLVector3 mNormalizedScale; LLVector3 mNormalizedTranslation; |