Table of Contents

Class CapsuleExtensions

public static class CapsuleExtensions
Inheritance
CapsuleExtensions

Methods

AutoResolution(ref Capsule)

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

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

Parameters

this Capsule

Returns

Capsule

Color(ref Capsule, Color?)

Set the color for this Capsule.

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

Parameters

this Capsule
color Color?

Returns

Capsule

Position(ref Capsule, float3, float3)

Set the position for this Capsule.

public static ref Capsule Position(this ref Capsule @this, float3 p1, float3 p2)

Parameters

this Capsule
p1 float3
p2 float3

Returns

Capsule

Radius(ref Capsule, float)

The radius of the capsule.

public static ref Capsule Radius(this ref Capsule @this, float radius)

Parameters

this Capsule
radius float

Returns

Capsule

Ref(Capsule)

Returns a reference to the previously created Capsule 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<Capsule> Ref(this Capsule @this)

Parameters

this Capsule

Returns

VisualRef<Capsule>

Resolution(ref Capsule, byte)

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

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

Parameters

this Capsule
resolution byte

Returns

Capsule

Rotation(ref Capsule, float)

Controls the orientation/rotation of the capsule around its axis.

public static ref Capsule Rotation(this ref Capsule @this, float rotation)

Parameters

this Capsule
rotation float

Returns

Capsule

SetDefault(ref Capsule)

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

Parameters

this Capsule

Returns

Capsule