@Override public float getVolume() { final Point3d min = new Point3d(); final Point3d max = new Point3d(); getMin( min ); getMax( max ); max.sub( min ); return ( float ) ( max.x * max.y * max.z ); }
@Override public float getVolume() { final Point3d min = new Point3d(); final Point3d max = new Point3d(); getMin( min ); getMax( max ); max.sub( min ); return ( float ) ( max.x * max.y * max.z ); }
/** * Sets the center around which the View rotates. * The default is (0,0,0). * @param center The Point3d to set the center of rotation to */ public synchronized void setRotationCenter(Point3d center) { Point3d centerDelta = new Point3d(); centerDelta.sub(centerVector, center); Transform3D invRot = new Transform3D(rotateTransform); invRot.invert(); invRot.transform(centerDelta); xtrans += centerDelta.x; ytrans += centerDelta.y; ztrans += centerDelta.z; rotationCenter.x = center.x; rotationCenter.y = center.y; rotationCenter.z = center.z; centerVector.set(rotationCenter); }