struct

PF3d::Tri

Inherits Struct < Value < Object

Constructors

new(p1 : PF2d::Vec3(Float64), p2 : PF2d::Vec3(Float64), p3 : PF2d::Vec3(Float64), shade : Float64 = 1.0, normal : PF2d::Vec3(Float64) | Nil = nil, clipped : Bool = false)
Source
new(p1 : PF2d::Vec3(Float64), p2 : PF2d::Vec3(Float64), p3 : PF2d::Vec3(Float64), t1 : PF2d::Vec3(Float64), t2 : PF2d::Vec3(Float64), t3 : PF2d::Vec3(Float64), shade : Float64 = 1.0, clipped : Bool = false)
Source

Instance methods

*(mat : PF2d::Mat4x4)

Multiply all points by a Matrix, returning a new Tri

Source
clip(plane : PF2d::Vec, plane_normal : PF2d::Vec)

Split the triangle based on which points are inside of a given plane Returns a tuple of 0-2 triangles

Source
clipped
Source
map_points
Source
normal

Return the normal assuming clockwise pointing winding

Source
normal=(normal : PF2d::Vec3(Float64) | Nil)
Source
p1=(p1 : PF2d::Vec3(Float64))
Source
p2=(p2 : PF2d::Vec3(Float64))
Source
p3=(p3 : PF2d::Vec3(Float64))
Source
shade
Source
shade=(shade : Float64)
Source
split(p1, p2, p3, t1, t2, t3)
Source
t1=(t1 : PF2d::Vec3(Float64))
Source
t2=(t2 : PF2d::Vec3(Float64))
Source
t3=(t3 : PF2d::Vec3(Float64))
Source
x

Get the average x value

Source
y

Get the average y value

Source
z

Get the average z value

Source
z=(value : Float64)
Source