コード例 #1
0
 public BoundingBox GetChunkBoundingBox(ChunkCoordinate chunk)
 {
     return(chunk.GetBoundingBox(new Vector3(), radius * 2));
 }
コード例 #2
0
        /// <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));
        }
コード例 #3
0
        public Vector3 GetChunkCenter(ChunkCoordinate parent)
        {
            var bb = parent.GetBoundingBox(new Vector3(), radius * 2);

            return((bb.Maximum + bb.Minimum) * 0.5f);
        }
コード例 #4
0
        public Vector3 GetChunkCenter(ChunkCoordinate chunk)
        {
            var bb = chunk.GetBoundingBox(new Vector3(), size);

            return((bb.Minimum + bb.Maximum) * 0.5f);
        }