Skip to content

Commit

Permalink
working on intersection
Browse files Browse the repository at this point in the history
  • Loading branch information
bgpoythress committed May 19, 2018
1 parent 03a532d commit 568ad32
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions Triangle.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
function Triangle(point1, point2, point3){


//basic triangular building block. takes in
//vector3 objects as the vertices
function Triangle(point1In, point2In, point3In){
this.point1 = point1In;
this.point2 = point2In;
this.point3 = point3In;

this.uVector = vector3Subtract(point2In, point1In);
this.vVector = vector3Subtract(point3In, point1In);

this.normalVector = vector3CrossProduct(uVector, vVector).normalize();

}

0 comments on commit 568ad32

Please sign in to comment.