/** * Gets the bounding box for this geometry. If there is no current bounding * box it will be calculated. * * @return */ public BoundingBox getBoundingBox() { if (mBoundingBox == null) { mBoundingBox = new BoundingBox(this); } return mBoundingBox; }
public SkeletalAnimationFrame() { mBounds = new BoundingBox(); mSkeleton = new Skeleton(); }
@Test public void testBoundsInFrustum() { final BoundingBox bounds = new BoundingBox(); boolean result = frustum.boundsInFrustum(bounds); assertTrue(result); }
/** * Returns a {@link BoundingBox} for this Object3D and creates it if needed. * Utilizes children's bounding values to calculate its own {@link BoundingBox}. * * @return */ public BoundingBox getBoundingBox() { if (getNumChildren() > 0 && !mGeometry.hasBoundingBox()) { Vector3 min = new Vector3(Double.MAX_VALUE, Double.MAX_VALUE, Double.MAX_VALUE); Vector3 max = new Vector3(-Double.MAX_VALUE, -Double.MAX_VALUE, -Double.MAX_VALUE); for (int i = 0; i < getNumChildren(); i++) { Object3D child = getChildAt(i); updateMaxMinCoords(min, max, child); } if (mGeometry.getVertices() != null) { updateMaxMinCoords(min, max, this); } mGeometry.setBoundingBox(new BoundingBox(min, max)); } return mGeometry.getBoundingBox(); }
BoundingBox lightBox = new BoundingBox(mFrustumCorners); double distance = mFrustumCentroid.distanceTo(lightBox.getMin()); Vector3 lightDirection = light.getDirectionVector().clone(); mFrustumCorners[i].multiply(mLightViewMatrix); BoundingBox b = new BoundingBox(mFrustumCorners); mLightProjectionMatrix.setToOrthographic(b.getMin().x, b.getMax().x, b.getMin().y, b.getMax().y, -b.getMax().z, -b.getMin().z);
/** * Gets the bounding box for this geometry. If there is no current bounding * box it will be calculated. * * @return */ public BoundingBox getBoundingBox() { if (mBoundingBox == null) mBoundingBox = new BoundingBox(this); return mBoundingBox; }
public SkeletalAnimationFrame() { mBounds = new BoundingBox(); mSkeleton = new Skeleton(); }
BoundingBox lightBox = new BoundingBox(mFrustumCorners); double distance = mFrustumCentroid.distanceTo(lightBox.getMin()); Vector3 lightDirection = light.getDirectionVector().clone(); mFrustumCorners[i].multiply(mLightViewMatrix); BoundingBox b = new BoundingBox(mFrustumCorners); mLightProjectionMatrix.setToOrthographic(b.getMin().x, b.getMax().x, b.getMin().y, b.getMax().y, -b.getMax().z, -b.getMin().z);