A Sphere, defined by its center point and radius.

Inheritance

Constructors

Sphere(Point3 center, num radius, [Shader shader])

Creates a new Sphere with the given center, radius and shader.…

Properties

center → Point3

The center of this sphere.

read / write
color → Vector4

The primary color of the primitive as vector4 (only used for GUI).

read-only, inherited
colorString → String

The primary color of the primitive as CSS rgba string (only used for GUI).

read-only, inherited
hashCode → int

Get a hash code for this object.…

read-only, inherited
id → int

Unique id of the primitive.

read-only, inherited
origin → Point3

read-only
radius → num

The radius of this sphere.

read / write
runtimeType → Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) → bool

The equality operator.…

inherited

Methods

getShader(Intersection intersect) → Shader

Returns the shader for a given intersection point.

intersect(Ray r, num prevBestDistance) → Intersection

Performs a ray - primitive intersection test. Returns an Intersection object with the associated information.…

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.…

inherited
toString() → String

Returns a string representation of this object.