TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

struct Sphere in Tinman.Core.Math

Represents a sphere in 3D space.

struct Sphere  

Serialization

Serializer

The serialization helper object for values of Sphere.

public static readonly field Serializer
type ITypeSerializer<Sphere>

Public / Constants

Undefined

An undefined sphere.

public static readonly field Undefined
type Sphere

Zero

A sphere with radius zero, centered at the coordinate origin.

public static readonly field Zero
type Sphere

Public / Attributes

Center

The sphere center or Undefined if undefined.

public readonly field Center
type Vec3D

Radius

The sphere radius or NanD if undefined.

public readonly field Radius
type float64

Public / Constructors

Sphere

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.

Public / Methods

RangeZ

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.

Transform

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: