FloatingLabel

Description

sealed class Tinman.Engine.Scenes.Entities.FloatingLabel

A scene entity that places a floating 2D label in the 3D scene.

The ISceneEntityView.QueryScreen method generates a ScreenLabelResult for the views of the floating label.

Public / Constructors

Floating​Label


public constructor FloatingLabel → (1)

entityViewMask opt : int64 = ~0

The value for IEntityViewMask.EntityViewMask.

Creates a new instance of FloatingLabel.

Public / Attributes

Anchor


public attribute Anchor → (get,set)

value : Vec2F

The anchor vector.

The anchor to use to align the screen label at the center.

The anchor depicts the pixel offset in the screen label that will coincide with the projected label center coordinates:

(0,0)     (1,0)
  +---------+    Pixel bounds of label on screen
  |         |
  |    .    |    Coordinates of anchor
  |         |
  +---------+
(0,1)     (1,1)

Defaults to (0.5, 1.0).

Content


public attribute Content → (get,set)

value : IScreenLabel

The label content or null for none.

The label content to display.

Defaults to null.

Content​As​Frame


public attribute ContentAsFrame → (get,set)

value : IScreenLabel

The label frame content or null if none.

A convenience property that accesses the label frame content as a IScreenLabel object.

Content​As​Icon


public attribute ContentAsIcon → (get,set)

value : IResourceHandle

The label icon content or null if none.

A convenience property that accesses the label icon content as a IResourceHandle object.

Content​As​String


public attribute ContentAsString → (get,set)

value : string

The label text content or null if none.

A convenience property that accesses the label text content as a string value.

Content​As​Text


public attribute ContentAsText → (get,set)

value : Text

The label text content or null if none.

A convenience property that accesses the label text content as a Text object.

Distance​Range


public attribute DistanceRange → (get,set)

value : RangeD

The visible distance range.

The range of distance values between the label content and the camera in which the label shall be visible.

Defaults to RangeD.Max.

Tick​Color


public attribute TickColor → (get,set)

value : int64

The line color (see Colors).

Color of the label tick line.

Defaults to Colors.White.

Tick​Direction


public attribute TickDirection → (get,set)

value : Vec3D

The line direction, in local-space.

The direction of the label tick line.

Defaults to (0,1,0).

Tick​Label


public attribute TickLabel → (get,set)

value : float64

The distance from the label center point in the tick direction to use for computing the position of the label content.

Relative position of the label content.

Defaults to 0.

Tick​Line


public attribute TickLine → (get,set)

value : RangeD

The distance range from the label center point in the tick direction to use for drawing the tick line.

Relative position of the label tick line.

Defaults to RangeD.Zero.

Tick​Occluded


public attribute TickOccluded → (get,set)

value : bool

The line color (see Colors).

Hide the tick line when the label is occluded?

Defaults to false.

Tick​Thickness


public attribute TickThickness → (get,set)

value : int32

[>=1]
The tick line thickness, in pixels.

Thickness of the label tick line.

Defaults to 1.

Tick​Unit


public attribute TickUnit → (get,set)

value : float64

The unit coefficient in the range [0..1]:
0 : length values are in local-space
1 : length values are in screen pixels

Specifies the unit to use for interpreting TickLabel and TickLine.

Defaults to 0.