1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 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
- this.children = [] //门/窗
- this.out = false //是否外墙
- this.important = false //是否承重墙
- //this.border = true //true表示房间墙,粗一点,false表示非房间墙,细一点
- //this.exterior = null //是否外墙
- this.geoType = VectorType.Wall
- this.setId(vectorId)
- }
- getOtherPointId(pointId) {
- if (this.start == pointId) {
- return this.end
- } else if (this.end == pointId) {
- return this.start
- } else {
- return null
- }
- }
- getPointId(dir) {
- if (dir == 'start') {
- return this.start
- } else {
- return this.end
- }
- }
- clearChildren() {
- this.children = []
- }
- setImportant(flag) {
- this.important = flag
- }
- setOut(flag) {
- this.out = flag
- }
- setChildren(children) {
- this.children = children
- }
- }
|