Tesla Graphics Engine Documentation (January 2012)
BoundingSphere Class
TeslaTesla.BoundingBoundingSphere
A sphere that is defined by a center and a radius. This is one of the simpler volumes and collision checks are fast, but may yield more false-positives than using volumes that more tightly enclose the geometry (such as OrientedBoundingBox). The algorithm for generating the sphere is an implemention of Welzl's minimum-volume sphere algorithm.
Declaration Syntax
C#
public sealed class BoundingSphere : BoundingVolume
Members
All Members Constructors Methods Properties



Icon Member Description
BoundingSphere()()()()
Constructs a new bounding sphere centered at the origin with zero radius.

BoundingSphere(Vector3, Single)
Constructs a new bounding sphere.

BoundingSphere(BoundingSphere)
Constructs a new bounding sphere cloned from the source sphere.

BoundingType
Gets the bounding type enumeration.
(Overrides BoundingVolume.BoundingType.)
Center
Gets or sets the center of the bounding volume.
(Inherited from BoundingVolume.)
Clone()()()()
Returns a new instance of BoundingSphere with the same center/radius.
(Overrides BoundingVolume.Clone()()()().)
ComputeFromPoints(array<Vector3>[]()[][])
Computes the bounding sphere from a collection of 3D points.
(Overrides BoundingVolume.ComputeFromPoints(array<Vector3>[]()[][]).)
ComputeFromPoints(DataBuffer<(Of <<'(Vector3>)>>))
Compute this bounding volume from a set of 3D points.
(Inherited from BoundingVolume.)
ComputeFromPrimitives(array<Vector3>[]()[][], array<Int32>[]()[][])
Computes the bounding sphere from a collection of indexed primitives.
(Overrides BoundingVolume.ComputeFromPrimitives(array<Vector3>[]()[][], array<Int32>[]()[][]).)
ComputeFromPrimitives(array<Vector3>[]()[][], array<Int16>[]()[][])
Computes the bounding sphere from a collection of indexed primitives.
(Overrides BoundingVolume.ComputeFromPrimitives(array<Vector3>[]()[][], array<Int16>[]()[][]).)
ComputeFromPrimitives(DataBuffer<(Of <<'(Vector3>)>>), DataBuffer<(Of <<'(Int32>)>>))
Compute this bounding volume from a set of primitives.
(Inherited from BoundingVolume.)
ComputeFromPrimitives(DataBuffer<(Of <<'(Vector3>)>>), DataBuffer<(Of <<'(Int16>)>>))
Compute this bounding volume from a set of primitives.
(Inherited from BoundingVolume.)
Contains(Vector3)
Tests if the specified point is inside this bounding sphere or not.
(Overrides BoundingVolume.Contains(Vector3).)
Contains(BoundingBox)
Determines if the AABB is contained within this bounding volume.
(Overrides BoundingVolume.Contains(BoundingBox).)
Contains(BoundingSphere)
Determines if the sphere is contained within this bounding volume.
(Overrides BoundingVolume.Contains(BoundingSphere).)
Contains(OrientedBoundingBox)
Determines if the oriented bounding box is contained within this bounding volume.
(Overrides BoundingVolume.Contains(OrientedBoundingBox).)
Contains(BoundingVolume)
Determines if the volume is contained within this bounding volume.
(Inherited from BoundingVolume.)
DistanceTo(Vector3)
Computes the distance from the center of this volume to the point.
(Inherited from BoundingVolume.)
DistanceToEdge(Vector3)
Computes the distance from the point to the nearest edge of the volume.
(Overrides BoundingVolume.DistanceToEdge(Vector3).)
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Intersects(BoundingBox)
Tests if the bounding box intersects with this bounding sphere.
(Overrides BoundingVolume.Intersects(BoundingBox).)
Intersects(BoundingSphere)
Tests if the bounding sphere intersects with this bounding sphere.
(Overrides BoundingVolume.Intersects(BoundingSphere).)
Intersects(OrientedBoundingBox)
Tests if the oriented bounding box intersects with this bounding sphere.
(Overrides BoundingVolume.Intersects(OrientedBoundingBox).)
Intersects(Ray)
Tests if the ray intersects with this sphere.
(Overrides BoundingVolume.Intersects(Ray).)
Intersects(Ray%, Boolean%)
Tests if the ray intersects with this sphere.
(Overrides BoundingVolume.Intersects(Ray%, Boolean%).)
Intersects(Plane)
Tests if the plane intersects with this bounding sphere, and if not which side the volume is on relative to the plane.
(Overrides BoundingVolume.Intersects(Plane).)
Intersects(Plane%, PlaneIntersectionType%)
Tests if the plane intersects with this bounding sphere, and if not which side the volume is on relative to the plane.
(Overrides BoundingVolume.Intersects(Plane%, PlaneIntersectionType%).)
Intersects(BoundingVolume)
Tests if the volume intersects with this bounding volume.
(Inherited from BoundingVolume.)
IntersectsWhere(Ray)
Tests where on the sphere the ray intersects, if it does.
(Overrides BoundingVolume.IntersectsWhere(Ray).)
IntersectsWhere(Ray%, BoundingIntersectionRecord%)
Tests where on the sphere the ray intersects, if it does.
(Overrides BoundingVolume.IntersectsWhere(Ray%, BoundingIntersectionRecord%).)
Merge(BoundingVolume)
Merges this bounding volume with a second one. The resulting bounding volume is returned as a new object and will contain the original volumes completely. The returned value will be of the same bounding type as the caller.
(Overrides BoundingVolume.Merge(BoundingVolume).)
MergeLocal(BoundingVolume)
Merges this bounding volume with a second one. The resulting bounding volume is stored locally and will contain the original volumes completely.
(Overrides BoundingVolume.MergeLocal(BoundingVolume).)
Radius
Gets or sets the radius of the sphere.

Read(ISavableReader)
Deserializes this BoundingSphere.
(Overrides BoundingVolume.Read(ISavableReader).)
Set(BoundingVolume)
Sets the bounding sphere to copy from the source volume or to contain it.
(Overrides BoundingVolume.Set(BoundingVolume).)
SetCenter(Single, Single, Single)
Sets the center of the volume from the specified coordinates.
(Inherited from BoundingVolume.)
ToString()()()()
Returns a String that represents the current Object.
(Inherited from Object.)
Transform(Transform)
Transforms this volume by the SRT transform and creates a new bounding volume that contains the result. The bounding volume will be of the same type as the caller.
(Overrides BoundingVolume.Transform(Transform).)
TransformLocal(Transform)
Transforms this volume by the SRT transform. The transformed volume is stored locally.
(Overrides BoundingVolume.TransformLocal(Transform).)
Volume
Gets the volume of the sphere.
(Overrides BoundingVolume.Volume.)
Write(ISavableWriter)
Serializes this BoundingSphere.
(Overrides BoundingVolume.Write(ISavableWriter).)
Inheritance Hierarchy
Object
BoundingVolume
  BoundingSphere

Assembly: Tesla (Module: Tesla) Version: 0.5.0.0 (0.5.0.0)