返回介绍

手册

参考

示例

开发者参考

Face

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

Represents a section bounded by a specific amount of half-edges. The current implmentation assumes that a face always consist of three edges.

Constructor

Face()

Creates a new instance of Face.

Properties

.normal : Vector3

The normal vector of the face. Default is a Vector3 at (0, 0, 0).

.midpoint : Vector3

The midpoint or centroid of the face. Default is a Vector3 at (0, 0, 0).

.area : Float

The area of the face. Default is 0.

.constant : Float

Signed distance from face to the origin. Default is 0.

.outside : VertexNode

Reference to a vertex in a vertex list this face can see. Default is null.

.mark : Integer

Marks if a face is visible or deleted. Default is 'Visible'.

.edge : HalfEdge

Reference to the base edge of a face. To retrieve all edges, you can use the 'next' reference of the current edge. Default is null.

Methods

.create ( a : VertexNode, b : VertexNode, c : VertexNode ) : Face

a - First vertex of the face.
b - Second vertex of the face.
c - Third vertex of the face.

Creates a face.

.getEdge ( i : Integer ) : HalfEdge

i - The index of the edge.

Returns an edge by the given index.

.compute () : Face

Computes all properties of the face.

.distanceToPoint ( point : Vector3 ) : Float

point - Any point in 3D space.

Returns the signed distance from a given point to the plane representation of this face.

Source

examples/jsm/math/ConvexHull.js

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

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

发布评论

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