Table of Contents

Class SphereExtensions

public static class SphereExtensions
Inheritance
SphereExtensions

Methods

AutoResolution(ref Sphere)

Sets resolution to 0 allowing it to be chosen automatically for best results based on the distance to the camera.

public static ref Sphere AutoResolution(this ref Sphere @this)

Parameters

this Sphere

Returns

Sphere

Color(ref Sphere, Color?)

Set the color for this Sphere.

public static ref Sphere Color(this ref Sphere @this, Color? color)

Parameters

this Sphere
color Color?

Returns

Sphere

Outline(ref Sphere, bool)

If true, another circle will be drawn facing the camera, making the sphere's shape more clear regardless of the angle.
This only applies if the circle's radius is uniform.

public static ref Sphere Outline(this ref Sphere @this, bool outline)

Parameters

this Sphere
outline bool

Returns

Sphere

Position(ref Sphere, float3)

Set the position for this Sphere.

public static ref Sphere Position(this ref Sphere @this, float3 position)

Parameters

this Sphere
position float3

Returns

Sphere

Radius(ref Sphere, float3)

The sphere's radius.
Accepts either a single float for a uniform radius, or a float3 or Vector3.

public static ref Sphere Radius(this ref Sphere @this, float3 radius)

Parameters

this Sphere
radius float3

Returns

Sphere

Ref(Sphere)

Returns a reference to the previously created Sphere visual.
If you need to keep a reference to a long-lived visual, this will allow you to modify or delete the visual at some point in the future.

Important: only use this directly after creating a visual, as it may not be valid beyond that.

public static VisualRef<Sphere> Ref(this Sphere @this)

Parameters

this Sphere

Returns

VisualRef<Sphere>

Resolution(ref Sphere, byte)

The resolution of the circles that make up this sphere. Set to 0 for an automatic resolution based on the distance to the camera.

public static ref Sphere Resolution(this ref Sphere @this, byte resolution)

Parameters

this Sphere
resolution byte

Returns

Sphere

Rotation(ref Sphere, quaternion)

The orientation of the sphere.

public static ref Sphere Rotation(this ref Sphere @this, quaternion rotation)

Parameters

this Sphere
rotation quaternion

Returns

Sphere

SetDefault(ref Sphere)

public static ref Sphere SetDefault(this ref Sphere @this)

Parameters

this Sphere

Returns

Sphere