123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import VectorType from "../enum/VectorType.js";
- import VectorCategory from "../enum/VectorCategory.js";
- import Geometry from "./Geometry";
- import Settings from "../Settings";
- export default class Point extends Geometry {
- constructor(position, vectorId) {
- super();
- this.x = null;
- this.y = null;
- this.parent = {};
- this.linkedBasePointId = null; //关联基准点
- this.linkedTestPointId = null; //关联待测点
- this.locationMode = null; //如果该点是待测点,采用的定位法是哪种
- this.category = Settings.selectPointCategory;
- this.geoType = VectorType.Point;
- this.setId(vectorId);
- this.setPosition(position);
- }
- setPosition(position) {
- this.x = position.x;
- this.y = position.y;
- }
- getCategory() {
- return this.category;
- }
- getLinkedBasePointId() {
- return this.linkedBasePointId;
- }
- setLinkedBasePointId(pointId) {
- this.linkedBasePointId = pointId;
- }
- setLinkedTestPointId(pointId) {
- this.linkedTestPointId = pointId;
- }
- getLinkedTestPointId() {
- return this.linkedTestPointId;
- }
- //基准点:BasePoint
- setCategory(value) {
- if (!value) {
- this.category = Settings.selectPointCategory;
- } else {
- this.category = value;
- }
- }
- setLocationMode(value) {
- this.locationMode = value;
- }
- getLocationMode() {
- return this.locationMode;
- }
- }
|