Skip to content

Threepp.Triangle

Triangle class

Members

Constructors

Properties

Methods


Triangle

Constructor

Arguments

Arguments Default Description
a   Vertex A (Vector3).
b   Vertex B (Vector3).
c   Vertex C (Vector3).

Description

Constructor


a

Property \ Access: r/w

Description

Vertex A (read-only)


b

Property \ Access: r/w

Description

Vertex B (read-only)


c

Property \ Access: r/w

Description

Vertex C (read-only)


set

Method

Arguments

Arguments Default Description
a  
b  
c  

Description

Sets the values


clone

Method

Description

Clones the triangle


copy

Method

Arguments

Arguments Default Description
triangle  

Description

Copies another triangle


getArea

Method

Description

Area


getMidpoint

Method

Description

Centroid


getNormal

Method

Description

Normal


getPlane

Method

Description

Plane containing the triangle


getBarycoord

Method

Arguments

Arguments Default Description
point  

Description

Gets barycentric coordinates


containsPoint

Method

Arguments

Arguments Default Description
point  

Description

Whether the triangle contains a point


isFrontFacing

Method

Arguments

Arguments Default Description
direction  

Description

Whether the triangle is front-facing


closestPointToPoint

Method

Arguments

Arguments Default Description
point  

Description

Closest point


equals

Method

Arguments

Arguments Default Description
triangle  

Description

Equality test