diff options
Diffstat (limited to 'tools/collada/collada.h')
-rw-r--r-- | tools/collada/collada.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tools/collada/collada.h b/tools/collada/collada.h index 360f54ec05..c5e5705105 100644 --- a/tools/collada/collada.h +++ b/tools/collada/collada.h @@ -302,6 +302,7 @@ public: Vector3 uv2; Plane tangent; Color color; + int uid; struct Weight { int bone_idx; float weight; @@ -331,21 +332,26 @@ public: bool operator<(const Vertex& p_vert) const { - if (vertex==p_vert.vertex) { - if(normal==p_vert.normal) { - if(uv==p_vert.uv) { - if(uv2==p_vert.uv2) { - return (color<p_vert.color); + if (uid==p_vert.uid) { + if (vertex==p_vert.vertex) { + if(normal==p_vert.normal) { + if(uv==p_vert.uv) { + if(uv2==p_vert.uv2) { + return (color<p_vert.color); + } else + return (uv2<p_vert.uv2); } else - return (uv2<p_vert.uv2); + return (uv<p_vert.uv); } else - return (uv<p_vert.uv); + return (normal<p_vert.normal); } else - return (normal<p_vert.normal); + return vertex<p_vert.vertex; } else - return vertex<p_vert.vertex; + return uid < p_vert.uid; } + + Vertex() { uid=0; idx=0; } }; struct Node { |