List of usage examples for com.badlogic.gdx.math.collision BoundingBox inf
public BoundingBox inf()
From source file:com.github.fauu.helix.graphics.ParticleEffect.java
License:Apache License
/** Returns the bounding box for all active particles. z axis will always be zero. */ public BoundingBox getBoundingBox() { if (bounds == null) bounds = new BoundingBox(); BoundingBox bounds = this.bounds; bounds.inf(); for (ParticleEmitter emitter : this.emitters) bounds.ext(emitter.getBoundingBox()); return bounds; }
From source file:com.github.fauu.helix.graphics.ParticleEmitter.java
License:Apache License
/** Returns the bounding box for all active particles. z axis will always be zero. */ public BoundingBox getBoundingBox() { if (bounds == null) bounds = new BoundingBox(); Particle[] particles = this.particles; boolean[] active = this.active; BoundingBox bounds = this.bounds; bounds.inf(); for (int i = 0, n = active.length; i < n; i++) if (active[i]) { Rectangle r = particles[i].getBoundingRectangle(); bounds.ext(r.x, r.y, 0);/*from ww w . j a va 2s . c o m*/ bounds.ext(r.x + r.width, r.y + r.height, 0); } return bounds; }
From source file:com.lyeeedar.Roguelike3D.Graphics.Models.StillModel.java
License:Open Source License
public void getBoundingBox(BoundingBox bbox) { bbox.inf(); for (int i = 0; i < subMeshes.length; i++) { subMeshes[i].mesh.calculateBoundingBox(tmpBox); bbox.ext(tmpBox);/*from ww w.jav a 2 s . co m*/ } }
From source file:de.longri.cachebox3.gui.map.layer.SharedModel.java
License:Open Source License
/** * Calculate the bounding box of this myLocationModel instance. * This is a potential slow operation, it is advised to cache the result. * * @param out the {@link BoundingBox} that will be set with the bounds. * @return the out parameter for chaining *///from ww w. j a v a 2 s . co m public BoundingBox calculateBoundingBox(final BoundingBox out) { out.inf(); return extendBoundingBox(out); }