Table of Contents

Class RectangleExtensions

public static class RectangleExtensions
Inheritance
RectangleExtensions

Methods

Color(ref Rectangle, Color?)

Set the color for this Rectangle.

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

Parameters

this Rectangle
color Color?

Returns

Rectangle

FaceCamera(ref Rectangle)

Make the visual always face the camera.

public static ref Rectangle FaceCamera(this ref Rectangle @this)

Parameters

this Rectangle

Returns

Rectangle

Facing(ref Rectangle, Facing)

Defines the normal of the plane the rectangle will be drawn on.

public static ref Rectangle Facing(this ref Rectangle @this, Facing facing)

Parameters

this Rectangle
facing Facing

Returns

Rectangle

Position(ref Rectangle, float3)

Set the position for this Rectangle.

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

Parameters

this Rectangle
position float3

Returns

Rectangle

Ref(Rectangle)

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

Parameters

this Rectangle

Returns

VisualRef<Rectangle>

Rotation(ref Rectangle, float)

Sets the facing rotation an degrees.

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

Parameters

this Rectangle
rotation float

Returns

Rectangle

SetDefault(ref Rectangle)

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

Parameters

this Rectangle

Returns

Rectangle

Size(ref Rectangle, float2)

The size of the rectangle.

public static ref Rectangle Size(this ref Rectangle @this, float2 size)

Parameters

this Rectangle
size float2

Returns

Rectangle