Sphere

open class Sphere : CollisionShape

Mathematical representation of a sphere. Used to perform intersection and collision tests against spheres.

Constructors

Link copied to clipboard
constructor()
Create a sphere with a center of (0,0,0) and a radius of 1.
constructor(radius: Float)
Create a sphere with a center of (0,0,0) and a specified radius.
constructor(radius: Float, center: Vector3)
Create a sphere with a specified center and radius.

Properties

Link copied to clipboard
Link copied to clipboard
open var radius: Float

Functions

Link copied to clipboard
open fun makeCopy(): Sphere
Link copied to clipboard
open fun rayIntersection(ray: Ray, result: RayHit): Boolean
Link copied to clipboard