返回介绍

手册

参考

示例

开发者参考

VertexList

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

A doubly linked list of vertices.

Constructor

VertexList()

Creates a new instance of VertexList.

Properties

.head : VertexNode

Reference to the first vertex of the linked list. Default is null.

.tail : VertexNode

Reference to the last vertex of the linked list. Default is null.

Methods

.first () : VertexNode

Returns the head reference.

.last () : VertexNode

Returns the tail reference.

.clear () : VertexList

Clears the linked list.

.insertBefore ( target : Vertex, vertex : Vertex ) : VertexList

target - The target vertex. It's assumed that this vertex belongs to the linked list.
vertex - The vertex to insert.

Inserts a vertex before a target vertex.

.insertAfter ( target : Vertex, vertex : Vertex ) : VertexList

target - The target vertex. It's assumed that this vertex belongs to the linked list.
vertex - The vertex to insert.

Inserts a vertex after a target vertex.

.append ( vertex : Vertex ) : VertexList

vertex - The vertex to append.

Appends a vertex to the end of the linked list.

.appendChain ( vertex : Vertex ) : VertexList

vertex - The head vertex of a chain of vertices.

Appends a chain of vertices where the given vertex is the head.

.remove ( vertex : Vertex ) : VertexList

vertex - The vertex to remove.

Removes a vertex from the linked list.

.removeSubList ( a : Vertex, b : Vertex ) : VertexList

a - The head of the sublist.
b - The tail of the sublist.

Removes a sublist of vertices from the linked list.

.isEmpty () : Boolean

Returns true if the linked list is empty.

Source

examples/jsm/math/ConvexHull.js

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

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

发布评论

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