Table of Contents

Class PolyBoard

Namespace
RichHudFramework.UI.Rendering
Assembly
RichHudClient.dll

Renders a regular 2D polygon (e.g., triangle, hexagon, circle approximation) using billboards. The shape is constructed as a triangle fan from the center.

public class PolyBoard
Inheritance
PolyBoard
Derived

Constructors

PolyBoard()

public PolyBoard()

Properties

Color

The color tint applied to the polygon material.

public virtual Color Color { get; set; }

Property Value

Color

MatAlignment

Determines how the texture is scaled to fit the polygon's bounding box.

public MaterialAlignment MatAlignment { get; set; }

Property Value

MaterialAlignment

Material

The texture applied to the polygon.

public virtual Material Material { get; set; }

Property Value

Material

Sides

The number of sides (vertices) on the polygon perimeter. Higher values approximate a circle.

public virtual int Sides { get; set; }

Property Value

int

Methods

Draw(Vector2, Vector2, MatrixD[])

Renders the full polygon defined by Sides with the specified dimensions and position.

public virtual void Draw(Vector2 size, Vector2 origin, MatrixD[] matrixRef)

Parameters

size Vector2
origin Vector2
matrixRef MatrixD[]

Draw(Vector2, Vector2, Vector2I, MatrixD[])

Renders a specific range of faces (pie slice) of the polygon.

public virtual void Draw(Vector2 size, Vector2 origin, Vector2I faceRange, MatrixD[] matrixRef)

Parameters

size Vector2
origin Vector2
faceRange Vector2I

The start and end index of the triangles to draw.

matrixRef MatrixD[]

GetSliceOffset(Vector2, Vector2I)

Calculates the center offset of a specific slice of the polygon relative to the billboard center. Useful for radial menus or separated pie charts.

public virtual Vector2 GetSliceOffset(Vector2 bbSize, Vector2I range)

Parameters

bbSize Vector2
range Vector2I

Returns

Vector2