home *** CD-ROM | disk | FTP | other *** search
- class Splines3d.Line
- {
- var p0;
- var p1;
- var spanX;
- var spanY;
- var spanZ;
- function Line(p0, p1)
- {
- this.p0 = p0;
- this.p1 = p1;
- this.update();
- }
- function getPoint(index)
- {
- return new Vector(this.p0.x + this.spanX * index,this.p0.y + this.spanY * index,this.p0.z + this.spanZ * index);
- }
- function update()
- {
- this.spanX = this.p1.x - this.p0.x;
- this.spanY = this.p1.y - this.p0.y;
- this.spanZ = this.p1.z - this.p0.z;
- }
- function toString()
- {
- return "Line";
- }
- }
-