Sphere

class Sphere(pointer: <Error class: unknown class><<Error class: unknown class>>)

A sphere, represented by its center and radius.

Skipped during bindings generation

  • parameter points: Point3D

  • parameter vectors: Vec3

  • field center: Record field center is private

  • field radius: Record field radius is private

Since

1.2

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val grapheneSpherePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard

Checks whether the given @point is contained in the volume of a #graphene_sphere_t.

Link copied to clipboard
fun distance(point: Point3D): Float

Computes the distance of the given @point from the surface of a #graphene_sphere_t.

Link copied to clipboard

Checks whether two #graphene_sphere_t are equal.

Link copied to clipboard
fun free()

Frees the resources allocated by graphene_sphere_alloc().

Link copied to clipboard

Computes the bounding box capable of containing the given #graphene_sphere_t.

Link copied to clipboard
fun getCenter(center: Point3D)

Retrieves the coordinates of the center of a #graphene_sphere_t.

Link copied to clipboard

Retrieves the radius of a #graphene_sphere_t.

Link copied to clipboard
fun init(center: Point3D? = null, radius: Float): Sphere

Initializes the given #graphene_sphere_t with the given @center and @radius.

Link copied to clipboard

Checks whether the sphere has a zero radius.

Link copied to clipboard
fun translate(point: Point3D, res: Sphere)

Translates the center of the given #graphene_sphere_t using the @point coordinates as the delta of the translation.