¡@

Home 

javascript Programming Glossary: vector3d

JavaScript Separating Axis Theorem

http://stackoverflow.com/questions/10394329/javascript-separating-axis-theorem

normal this code assumes p0 and p1 are instances of some Vector3D class var p0 edge 0 first point of edge var p1 edge 1 second.. 1 second point of edge var v p1.subtract p0 var normal new Vector3D 0 0 1 .crossProduct v normal.normalize The above code uses the.. bit of coding to do. Find some js library with Matrix and Vector3D classes or so and use that to implement the above. Represent..

Should I use prototype or not?

http://stackoverflow.com/questions/4691044/should-i-use-prototype-or-not

So which of these two methods is preferable function Vector3D x y z this.x x this.y y this.z z Vector3D.prototype.magnitude.. function Vector3D x y z this.x x this.y y this.z z Vector3D.prototype.magnitude function return Math.sqrt this.x this.x.. this.x this.x this.y this.y this.z this.z or function Vector3D x y z this.x x this.y y this.z z this.magnitude function return..