typedef Vector<Triangle*> TriangleList;
typedef Vector<Vertex*> VertexList;
class Vertex
{
public:
void LoadVertices();
FullEdge& GetSharedEdge(const Vertex &OtherVertex) const;
double ComputeTriangleArea();
double GaussianCurvature() const;
Vec3f MeanCurvatureNormal();
Vec3f AreaWeightedNormal() const;
Vec3f EvaluateVField(const Vector<double> &OneForm) const;
Vec3f ComputeLoopSubdivisionPos();
bool LocallyManifold();
__forceinline Vec3f& Pos()
{
return _Pos;
}
__forceinline const Vec3f& Pos() const
{
return _Pos;
}
__forceinline Vec2f& TexCoords()
{
return _TexCoords;
}
__forceinline const Vec2f& TexCoords() const
{
return _TexCoords;
}
__forceinline TriangleList& Triangles()
{
return _Triangles;
}
__forceinline const TriangleList& Triangles() const
{
return _Triangles;
}
__forceinline VertexList& Vertices()
{
return _Vertices;
}
__forceinline const VertexList& Vertices() const
{
return _Vertices;
}
__forceinline bool Boundary() const
{
return _Boundary;
}
__forceinline bool& Boundary()
{
return _Boundary;
}
__forceinline UINT Index() const
{
return _Index;
}
static Vertex Invalid;
private:
Vec3f _Pos; Vec2f _TexCoords; TriangleList _Triangles; VertexList _Vertices; UINT _Index; bool _Boundary;
friend class ComplexMesh;
};
__forceinline bool operator == (const Vertex &A, const Vertex &B)
{
return ((&A) == (&B));
}
__forceinline bool operator != (const Vertex &A, const Vertex &B)
{
return ((&A) != (&B));
}