class OpenGL::Triangle

Defined in:

opengl/math/triangle.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(a = OpenGL::Vector3.new, b = OpenGL::Vector3.new, c = OpenGL::Vector3.new) #

[View source]

Class Method Detail

def self.barycoord_from_point(point, a, b, c, target = OpenGL::Vector3.new) #

static/instance method to calculate barycoordinates based on: http://www.blackpawn.com/texts/pointinpoly/default.html


[View source]
def self.contains_point?(point, a, b, c) #

[View source]
def self.normal(a, b, c, target = OpenGL::Vector3.new) #

[View source]

Instance Method Detail

def a : OpenGL::Vector3 #

[View source]
def a=(a : OpenGL::Vector3) #

[View source]
def area #

[View source]
def b : OpenGL::Vector3 #

[View source]
def b=(b : OpenGL::Vector3) #

[View source]
def barycoord_from_point(point, target = OpenGL::Vector3.new) #

[View source]
def c : OpenGL::Vector3 #

[View source]
def c=(c : OpenGL::Vector3) #

[View source]
def clone #

[View source]
def contains_point?(point) #

[View source]
def copy(triangle) #

[View source]
def equals(triangle) #

[View source]
def midpoint(target = OpenGL::Vector3.new) #

[View source]
def normal(target = OpenGL::Vector3.new) #

[View source]
def plane(target = OpenGL::Plane.new) #

[View source]
def set(a, b, c) #

[View source]
def set_from_points_and_indices(points, i0, i1, i2) #

[View source]