Table of Contents

Class PinDrawing

Namespace
Hi.Disp
Assembly
HiDisp.dll

A named, scale-less anchor. Displaying it draws nothing; the engine reports where the anchor landed in each frame, its depth and whether scene geometry hides it, through FrameReady as a PinRecord of the same name. Use it to place external UI (an HTML element, say) over a 3D point of the canvas.

public sealed class PinDrawing : IDisplayee, IExpandToBox3d, IDisposable
Inheritance
PinDrawing
Implements
Inherited Members
Extension Methods

Remarks

The wrapper owns no GL object and has no thread affinity: it may be created, displayed and disposed from any thread. Names must be unique within a frame (prefix them by owner); they are UTF-8 and truncated to 63 bytes. Pins displayed while a picking id is set on the Bind carry that id in their record.

Constructors

PinDrawing(string)

Constructor.

public PinDrawing(string name)

Parameters

name string

pin name; unique within a frame

Properties

IsAlwaysOnTop

Display the anchor as never occluded by geometry: the record is on-canvas or not, no depth probe. Set it for a pin paired with an always-on-top StringDrawing at the same point, otherwise the label's own rectangle hides the pin.

public bool IsAlwaysOnTop { get; set; }

Property Value

bool

Name

The pin name as given to the constructor (the record carries at most 63 UTF-8 bytes of it).

public string Name { get; }

Property Value

string

ProbeBiasPx

Occlusion bias in pixel units of depth: geometry closer to the viewer than the anchor by less than this does not count as hiding it, so an anchor placed on a surface stays visible. The engine also applies a floor of a few depth-buffer LSB.

public double ProbeBiasPx { get; set; }

Property Value

double

Methods

Display(Bind)

Display function called in DispEngine rendering loop.

public void Display(Bind bind)

Parameters

bind Bind

Bind with DispEngine. See Bind.

Display(Bind, vec3d_t)

Display the anchor at p under the current model matrix.

public void Display(Bind bind, vec3d_t p)

Parameters

bind Bind

bind

p vec3d_t

anchor position

Dispose()

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

public void Dispose()

ExpandToBox3d(ref box3d_t)

Expands the destination box. This function is usually used to compute the bounding box of elements. box3d_t is a value type, so the destination is passed by reference (the C++ expand_to_box3d(box3&) shape); an implementation writes dst = dst.Expanded(...) or forwards ref dst to its parts.

public void ExpandToBox3d(ref box3d_t dst)

Parameters

dst box3d_t

Destination box, expanded in place

~PinDrawing()

protected ~PinDrawing()