12345678910111213141516171819202122232425262728293031 |
- import VectorType from '../enum/VectorType.js'
- import Geometry from './Geometry.js'
- export default class Wall extends Geometry {
- constructor(pointId1, pointId2, vectorId, floor) {
- super()
- this.start = pointId1
- this.end = pointId2
- this.floor = floor?floor:0
- this.geoType = VectorType.Wall
- this.setId(vectorId)
- }
- getPointId(dir) {
- if (dir == 'start') {
- return this.start
- } else {
- return this.end
- }
- }
- getOtherPointId(pointId) {
- if (this.start == pointId) {
- return this.end
- } else if (this.end == pointId) {
- return this.start
- } else {
- return null
- }
- }
- }
|