UNPKG

gs-json

Version:

gs-JSON is a domain agnostic unifying 3D file format for geometric and semantic modelling (hence the 'gs').

32 lines 835 B
import { Obj } from "./entity_obj"; import { Point } from "./entity_point"; /** * Class Ray. * A ray is displayed as one wire and no faces. * The wire has two vertices. * A ray may be part of a group and may have attributes. */ export class Ray extends Obj { /** * Get the object type: "ray". * @return Ray object type. */ getObjType() { return 1 /* ray */; } /** * Get the origin of the ray. * @return Plane object type. */ getOrigin() { return new Point(this._kernel, this._kernel.objGetOnePoint(this._id)); } /** * Gets the direction vector for this ray. * @return Return the xyz. */ getVector() { return this._kernel.objGetParams(this._id)[1]; } } //# sourceMappingURL=entity_obj_ray.js.map