Class Handle

Inheritance Relationships

Derived Types

Class Documentation

class Handle

Handle基类. Vertex, Halfedge, Edge, Face都通过Handle来操作 zmesh中利用handle来访问各种数据. 可以把handle理解为顶点, 半边, 边, 面的下标

Subclassed by zmesh::core::EdgeHandle, zmesh::core::FaceHandle, zmesh::core::HalfedgeHandle, zmesh::core::VertexHandle

Public Functions

inline explicit Handle(Index idx = INDEX_MAX)
inline Index idx() const

返回Handle的下标

inline void reset()

将Handle的下标设置为最大值

inline bool is_valid() const

判断Handle是否有效. 当Handle的idx达到最大时, 无效.

inline bool operator==(const Handle &rhs) const

通过判断两个Handle的idx来判断是否相同

inline bool operator!=(const Handle &rhs) const

与operator==相反

inline bool operator<(const Handle &rhs) const

通过两个Handle的idx来比较大小

inline void __increment()

只会在Iterator中使用, 其他地方不会使用这个函数

inline void __decrement()

只会在Iterator中使用, 其他地方不会使用这个函数