Back to class index
| Sphere::SphereSyntaxSphere::Sphere(); [1 line of code]The default constructor does not initialize any members of this class. This means that the values of the members pos and r are undefined after creating a new Sphere using this default constructor. Remember to assign to them before use. See AlsoSyntaxSphere::Sphere(const float4 ¢er, float radius); [4 lines of code]Constructs a sphere with a given position and radius. ParametersfloatradiusA value > 0 constructs a sphere with positive volume. A value of <= 0 is valid, and constructs a degenerate sphere. See AlsoSyntaxSphere::Sphere(const float4 &pointA, const float4 &pointB); [4 lines of code]Constructs a sphere that passes through the given two points. The constructed sphere will be the minimal sphere that encloses the given two points. The center point of this sphere will lie midway between pointA and pointB, and the radius will be half the distance between pointA and pointB. Both input points are assumed to be finite. SyntaxSphere::Sphere(const float4 &pointA, const float4 &pointB, const float4 &pointC); [4 lines of code]Constructs a sphere that passes through the given three points. Note The resulting sphere may not be the minimal enclosing sphere for the three points! SyntaxSphere::Sphere(const float4 &pointA, const float4 &pointB, const float4 &pointC, const float4 &pointD); [4 lines of code]Constructs a sphere that passes through the given four points. Note The resulting sphere may not be the minimal enclosing sphere for the four points! |