46 if (
id[0] >= other.
id[0])
return true;
47 if (
id[0] == other.
id[0] &&
id[1] >= other.
id[1])
return true;
48 if (
id[0] == other.
id[0] &&
id[1] == other.
id[1] &&
id[2] >= other.
id[2])
return true;
54 if (
id[0] > other.
id[0])
return true;
55 if (
id[0] == other.
id[0] &&
id[1] > other.
id[1])
return true;
56 if (
id[0] == other.
id[0] &&
id[1] == other.
id[1] &&
id[2] > other.
id[2])
return true;
62 if (
id[0] <= other.
id[0])
return true;
63 if (
id[0] == other.
id[0] &&
id[1] <= other.
id[1])
return true;
64 if (
id[0] == other.
id[0] &&
id[1] == other.
id[1] &&
id[2] <= other.
id[2])
return true;
70 if (
id[0] < other.
id[0])
return true;
71 if (
id[0] == other.
id[0] &&
id[1] < other.
id[1])
return true;
72 if (
id[0] == other.
id[0] &&
id[1] == other.
id[1] &&
id[2] < other.
id[2])
return true;
78 return id[0] == other.
id[0] &&
id[1] == other.
id[1] &&
id[2] == other.
id[2];
82 return id[0] != other.
id[0] ||
id[1] != other.
id[1] ||
id[2] != other.
id[2];
89 v0 = v0 < v1 ? v0 : v1;
90 v1 = vt < v1 ? v1 : vt;
96 template<
typename TDataType>
100 typedef typename TDataType::Real
Real;
101 typedef typename TDataType::Coord
Coord;
135 std::shared_ptr<TriangleSet<TDataType>>
DYN_FUNC bool operator<(const TKey &other) const
DYN_FUNC bool operator==(const TKey &other) const
DYN_FUNC bool operator>=(const TKey &other) const
DYN_FUNC void swap(PointType &v0, PointType &v1)
DYN_FUNC bool operator!=(const TKey &other) const
DYN_FUNC TKey(PointType v0, PointType v1, PointType v2)
DYN_FUNC PointType operator[](unsigned int i)
DYN_FUNC bool operator<=(const TKey &other) const
DYN_FUNC bool operator>(const TKey &other) const
Vector< PointType, 3 > Triangle
virtual void updateTriangles()
void updateTopology() override
void setTriangles(std::vector< Triangle > &triangles)
void updateAngleWeightedVertexNormal(DArray< Coord > &vertexNormal)
bool loadObjFile(std::string filename)
void setNormals(DArray< Coord > &normals)
void rotate(const Quat< Real > q) override
void updateEdgeNormal(DArray< Coord > &edgeNormal)
DArray< Triangle > mTriangleIndex
std::shared_ptr< TriangleSet< TDataType > > merge(TriangleSet< TDataType > &ts)
DArray<::dyno::TopologyModule::Tri2Edg > mTri2Edg
void updateTriangle2Edge()
update the index from triangle id to edges ids
void setTriangles(DArray< Triangle > &triangles)
virtual void updateVertexNormal()
TopologyModule::Triangle Triangle
void setAutoUpdateNormals(bool b)
DArray< Coord > & getVertexNormals()
DArray<::dyno::TopologyModule::Edg2Tri > mEdg2Tri
DArrayList< int > & getVertex2Triangles()
DArray< Coord > mVertexNormal
void rotate(const Coord angle) override
DArray< TopologyModule::Tri2Edg > & getTriangle2Edge()
void copyFrom(TriangleSet< TDataType > &triangleSet)
DArray< TopologyModule::Edg2Tri > & getEdge2Triangle()
DArray< Triangle > & getTriangles()
return all triangle indices
void updateEdges() override
DArrayList< int > mVer2Tri
This is an implementation of AdditiveCCD based on peridyno.
Array< T, DeviceType::GPU > DArray
ArrayList< ElementType, DeviceType::GPU > DArrayList