ModelHandle/source/engine/model/line.js
2023-10-15 21:40:19 +02:00

29 lines
432 B
JavaScript

export class Line
{
constructor (v0, v1)
{
this.v0 = v0;
this.v1 = v1;
this.mat = null;
}
HasVertices ()
{
return this.v0 !== null && this.v1 !== null;
}
SetMaterial (mat)
{
this.mat = mat;
return this;
}
Clone ()
{
let cloned = new Line (this.v0, this.v1);
cloned.SetMaterial (this.mat);
return cloned;
}
}