public BoundingBox GetChunkBoundingBox(ChunkCoordinate chunk) { return(chunk.GetBoundingBox(new Vector3(), radius * 2)); }
/// <summary> /// Returns all physicals that are partially or completely inside this chunk /// </summary> /// <param name="coord"></param> /// <returns></returns> public IEnumerable <T> GetWorldObjects(ChunkCoordinate coord) { var bb = coord.GetBoundingBox(new Vector3(), radius * 2); return(getObjects.Where(p => bb.xna().Contains(p.BoundingBox.xna()) != ContainmentType.Disjoint)); }
public Vector3 GetChunkCenter(ChunkCoordinate parent) { var bb = parent.GetBoundingBox(new Vector3(), radius * 2); return((bb.Maximum + bb.Minimum) * 0.5f); }
public Vector3 GetChunkCenter(ChunkCoordinate chunk) { var bb = chunk.GetBoundingBox(new Vector3(), size); return((bb.Minimum + bb.Maximum) * 0.5f); }