Table of Contents

Class Bind

Namespace
Hi.Disp
Assembly
HiDisp.dll

Runtime rendering data for each iteration in rendering loop. It manipulates geometry transformation, such as moving, rotatingand scaling. It also deal with color and picking. A bind_t object is generated by rendering in the every beginning of each rendering iteration.

public class Bind : IDisposable
Inheritance
Bind
Implements
Inherited Members
Extension Methods

Fields

bind

Internal use.

public bind_t* bind

Field Value

bind_t*

Properties

CanvasHeight

DispEngine height.

public int CanvasHeight { get; }

Property Value

int

CanvasWidth

DispEngine width.

public int CanvasWidth { get; }

Property Value

int

IsPickingMode

Is current display loop in pick mode.

public bool IsPickingMode { get; }

Property Value

bool

ModelMatStack

Stack-based Model matrix in MVP convention.

public MatStack ModelMatStack { get; }

Property Value

MatStack

PickID

ID of picking event.

public int PickID { get; set; }

Property Value

int

PixelProjMat

Pixel part of Projection matrix in MVP convention.

public mat4d_t PixelProjMat { get; }

Property Value

mat4d_t
See Also

PixelWidthOnModel

Pixel width on model layer.

public double PixelWidthOnModel { get; }

Property Value

double

ProjMat

Projection matrix in MVP convention. Projection matrix = ScaleProjMat * PixelProjMat.

public mat4d_t ProjMat { get; }

Property Value

mat4d_t

Reciprocal_vs_scale

Cached reciprocal value of the scale of ViewMat * ScaleProjMat.

public double Reciprocal_vs_scale { get; }

Property Value

double

Rgb

External RGB Color for the Drawing which the KeyStamp does not contains C.

public vec3d_t Rgb { get; set; }

Property Value

vec3d_t

ScaleProjMat

Scale part of Projection matrix in MVP convention.

public mat4d_t ScaleProjMat { get; }

Property Value

mat4d_t
See Also

SparkleRate

Gets or sets the sparkle rate for rendering effects.

public float SparkleRate { get; set; }

Property Value

float

ViewMat

View matrix in MVP convention.

public mat4d_t ViewMat { get; }

Property Value

mat4d_t

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

~Bind()

protected ~Bind()

GetMvpBoxRelation(vec3d_t, double)

get relation between mvpBox and a AABB (bounding with a sphere)

public MvpBoxRelation GetMvpBoxRelation(vec3d_t center, double r)

Parameters

center vec3d_t

center

r double

radius

Returns

MvpBoxRelation

0 if no overlap; 1 if partial overlap; 2 if B in A

PopColor()

Pop the color after using PushColor() and etc..

public void PopColor()
See Also

PopLineWidth()

Pop the line width from the stack. And then set the poped line width to current line width.

public void PopLineWidth()

PopPointSize()

Pop the stored point size from the stack. And then set the stored point size to current point size.

public void PopPointSize()
See Also

PushColor()

Push current color to stack. After PopColor(), the pushed color will be restored.

public void PushColor()

PushColorByHsl(vec3d_t)

Pushes a color onto the color stack using HSL values.

public void PushColorByHsl(vec3d_t hsl)

Parameters

hsl vec3d_t

The HSL color vector.

PushColorByHsl(double, double, double)

Pushes a color onto the color stack using HSL values.

public void PushColorByHsl(double hue, double saturation, double light)

Parameters

hue double

The hue component (0.0 to 1.0).

saturation double

The saturation component (0.0 to 1.0).

light double

The lightness component (0.0 to 1.0).

PushColorByHslOffset(vec3d_t)

Pushes a color onto the color stack by applying HSL offsets to the current color.

public void PushColorByHslOffset(vec3d_t hslOffset)

Parameters

hslOffset vec3d_t

The HSL offset vector to apply.

PushColorByHslOffset(double, double, double)

Pushes a color onto the color stack by applying HSL offsets to the current color.

public void PushColorByHslOffset(double hueOffset, double saturationOffset, double lightOffset)

Parameters

hueOffset double

The hue offset to apply.

saturationOffset double

The saturation offset to apply.

lightOffset double

The lightness offset to apply.

PushColorByRgb(double, double, double)

Pushes a color onto the color stack using RGB values.

public void PushColorByRgb(double r, double g, double b)

Parameters

r double

The red component value (0.0 to 1.0).

g double

The green component value (0.0 to 1.0).

b double

The blue component value (0.0 to 1.0).

PushColorByRgb(vec3d_t?)

Push current color to stack then set the color to given rgb. After PopColor(), the pushed color will be restored. If rgb is null, the current color is pushed unchanged.

public void PushColorByRgb(vec3d_t? rgb)

Parameters

rgb vec3d_t?

RGB color, or null to keep the current color

PushColorByRgbOffset(vec3d_t)

Pushes a color onto the color stack by applying an RGB offset to the current color. Ensures the resulting color stays within [0,1] by shifting or normalizing when needed.

public void PushColorByRgbOffset(vec3d_t rgbOffset)

Parameters

rgbOffset vec3d_t

The RGB offset to add to the current color.

PushColorByRgbOffset(double, double, double)

Pushes a color onto the color stack by applying per-channel RGB offsets to the current color.

public void PushColorByRgbOffset(double rOffset, double gOffset, double bOffset)

Parameters

rOffset double

Offset applied to the red channel.

gOffset double

Offset applied to the green channel.

bOffset double

Offset applied to the blue channel.

PushCoveringPixelMode()

Push covering-pixel-mode matrix to ModelMatStack to make the display in pixel scale. Call ModelMatStack.Pop() to end the mode.

public void PushCoveringPixelMode()

PushLineWidth()

Push current line width into stack.

public void PushLineWidth()
See Also

PushLineWidth(double)

Push current line width into stack. And then set lineWidth to the current line width.

public void PushLineWidth(double lineWidth)

Parameters

lineWidth double

line width

See Also

PushNoRotationPixelMode()

Push no-rotation-pixel-mode matrix to ModelMatStack to make the display in pixel scale. Call ModelMatStack.Pop() to end the mode.

public void PushNoRotationPixelMode()

PushPixelMode()

Push pixel mode matrix to ModelMatStack to make the display in pixel scale.

Call ModelMatStack.Pop() to end the mode.

public void PushPixelMode()

PushPointSize()

Push current point size to the stack.

public void PushPointSize()
See Also

PushPointSize(double)

Push current point size to the stack. And then set the pointSize to current point size.

public void PushPointSize(double pointSize)

Parameters

pointSize double

point size

See Also

PushPointSize(float)

Push current point size to the stack. And then set the pointSize to current point size.

public void PushPointSize(float pointSize)

Parameters

pointSize float

point size

See Also

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.