返回介绍

手册

参考

示例

开发者参考

HalfEdge

发布于 2021-07-10 14:14:20 字数 2294 浏览 1040 评论 0 收藏 0

The basis for a half-edge data structure, also known as doubly connected edge list (DCEL).

Constructor

HalfEdge( vertex : VertexNode, face : Face )

vertex - VertexNode A reference to its destination vertex.
face - Face A reference to its face.

Creates a new instance of HalfEdge.

Properties

.vertex : VertexNode

Reference to the destination vertex. The origin vertex can be obtained by querying the destination of its twin, or of the previous half-edge. Default is undefined.

.prev : HalfEdge

Reference to the previous half-edge of the same face. Default is null.

.next : HalfEdge

Reference to the next half-edge of the same face. Default is null.

.twin : HalfEdge

Reference to the twin half-edge to reach the opposite face. Default is null.

.face : Face

Each half-edge bounds a single face and thus has a reference to that face. Default is undefined.

Methods

.head () : VertexNode

Returns the destintation vertex.

.tail () : VertexNode

Returns the origin vertex.

.length () : Float

Returns the Euclidean length (straight-line length) of the edge.

.lengthSquared () : Float

Returns the square of the Euclidean length (straight-line length) of the edge.

.setTwin ( edge : HalfEdge ) : HalfEdge

edge - Any half-edge.

Sets the twin edge of this half-edge. It also ensures that the twin reference of the given half-edge is correctly set.

Source

examples/jsm/math/ConvexHull.js

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文