588589590591592593594595
if (this.hasBounds()){ return this.getBounds().getCenterPointLocal(); }else{ //TODO this fails if the polygon isnt in the X,Y,0 Plane! // return this.getCenterOfMas2DLocal(); return new OrientedBoundingBox(this).getCenterPointLocal(); } }
421422423424425426427
/** * Computes a default bounding box for the shape. * This gets called after setting creating a shape and its setGeometryInfo method is called. */ protected IBoundingShape computeDefaultBounds(){ return new OrientedBoundingBox(this); }
129412951296129712981299130013011302
*/ protected float getHeightXYRelativeToParent() { if (this.hasBounds()){ return this.getBounds().getHeightXY(TransformSpace.RELATIVE_TO_PARENT); }else{ OrientedBoundingBox tempBounds = new OrientedBoundingBox(this); return tempBounds.getHeightXY(TransformSpace.RELATIVE_TO_PARENT); } }
131213131314131513161317131813191320
*/ protected float getHeightXYGlobal() { if (this.hasBounds()){ return this.getBounds().getHeightXY(TransformSpace.GLOBAL); }else{ OrientedBoundingBox tempBounds = new OrientedBoundingBox(this); return tempBounds.getHeightXY(TransformSpace.GLOBAL); } }
133213331334133513361337133813391340
*/ public Vector3D getHeightXYVectLocal() { if (this.hasBounds()){ return this.getBounds().getHeightXYVectLocal(); }else{ OrientedBoundingBox tempBounds = new OrientedBoundingBox(this); return tempBounds.getHeightXYVectLocal(); } }
138713881389139013911392139313941395
*/ protected float getWidthXYRelativeToParent() { if (this.hasBounds()){ return this.getBounds().getWidthXY(TransformSpace.RELATIVE_TO_PARENT); }else{ OrientedBoundingBox tempBounds = new OrientedBoundingBox(this); return tempBounds.getWidthXY(TransformSpace.RELATIVE_TO_PARENT); } }
140414051406140714081409141014111412
*/ protected float getWidthXYGlobal() { if (this.hasBounds()){ return this.getBounds().getWidthXY(TransformSpace.GLOBAL); }else{ OrientedBoundingBox tempBounds = new OrientedBoundingBox(this); return tempBounds.getWidthXY(TransformSpace.GLOBAL); } }
142314241425142614271428142914301431
*/ public Vector3D getWidthXYVectLocal() { if (this.hasBounds()){ return this.getBounds().getWidthXYVectLocal(); }else{ OrientedBoundingBox tempBounds = new OrientedBoundingBox(this); return tempBounds.getWidthXYVectLocal(); } }
112113114115116117118
this.addGestureListener(RotateProcessor.class, new DefaultRotateAction()); } @Override protected IBoundingShape computeDefaultBounds() { return new OrientedBoundingBox(this); }