Represents a sphere in 3D space.
struct
|
Sphere
|
The serialization helper object for values of Sphere.
public
static
readonly
field
|
Serializer
|
||
type
|
ITypeSerializer<Sphere>
|
An undefined sphere.
public
static
readonly
field
|
Undefined
|
||
type
|
Sphere
|
A sphere with radius zero, centered at the coordinate origin.
public
static
readonly
field
|
Zero
|
||
type
|
Sphere
|
The sphere center or Undefined if undefined.
public
readonly
field
|
Center
|
||
type
|
Vec3D
|
The sphere radius or NanD if undefined.
public
readonly
field
|
Radius
|
||
type
|
float64
|
Creates a new instance of Sphere.
public
constructor
|
Sphere
(float64 radius)
|
||
params
|
radius
|
The sphere radius. If less than zero, the sphere will be undefined. |
Creates a new instance of Sphere.
public
constructor
|
Sphere
(Vec3D center,
float64 radius)
|
||
params
|
center
|
The sphere center. | |
radius
|
[>=0]
|
The sphere radius. |
Returns the Z-range of this sphere along the given ray.
public
method
|
RangeZ
(Vec3D p,
Vec3D v)
|
||
type
|
RangeD
|
||
params
|
p
|
The ray origin. | |
v
|
The unit-length ray direction vector. | ||
returns
|
The Z-range. |
Transforms this sphere using the given matrix.
public
method
|
Transform
(Mat4D matrix)
|
||
type
|
Sphere
|
||
params
|
matrix
|
The transformation matrix. | |
returns
|
The transformed sphere. |
Remarks:
The given matrix is expected to have the following properties: