Class BillboardSingleImage3D
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
public class BillboardSingleImage3D : BillboardBase, INotifyPropertyChanged, IGUID, IBillboardText
- Inheritance
-
BillboardSingleImage3D
- Implements
- Inherited Members
Constructors
BillboardSingleImage3D(TextureModel?, float, float)
Initializes a new instance of the BillboardSingleImage3D class.
public BillboardSingleImage3D(TextureModel? texture, float width, float height)
Parameters
textureTextureModelThe image texture.
widthfloatThe width.
heightfloatThe height.
BillboardSingleImage3D(Stream)
Initializes a new instance of the BillboardSingleImage3D class.
public BillboardSingleImage3D(Stream imageStream)
Parameters
imageStreamStreamThe image stream.
Properties
Angle
Gets or sets the rotation angle in radians.
public float Angle { get; set; }
Property Value
- float
The angle in radians.
Center
Billboard center location
public Vector3 Center { get; set; }
Property Value
HorizontalAlignment
Sets or gets the horizontal alignment. Default = Center
For example, when sets horizontal and vertical alignment to top/left, billboard's bottom/right point will be anchored at the billboard origin.
public BillboardHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
- BillboardHorizontalAlignment
The horizontal alignment.
MaskColor
If color in image is equal to the mask color, the color will set to transparent in image. Default color is Transparent, which did not mask any color.
public Color4 MaskColor { get; set; }
Property Value
Offset
Additional offset for billboard display location. Behavior depends on whether billboard is fixed sized or not. When billboard is fixed sized, the offset is screen spaced.
public Vector2 Offset { get; set; }
Property Value
Type
Billboard type, BillboardType
public override BillboardType Type { get; }
Property Value
VerticalAlignment
Sets or gets the vertical alignment. Default = Center
For example, when sets horizontal and vertical alignment to top/left, billboard's bottom/right point will be anchored at the billboard origin.
public BillboardVerticalAlignment VerticalAlignment { get; set; }
Property Value
- BillboardVerticalAlignment
The vertical alignment.
Methods
HitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>, object?, bool)
Hits the test.
public override bool HitTest(HitTestContext? context, Matrix4x4 modelMatrix, ref List<HitTestResult> hits, object? originalSource, bool fixedSize)
Parameters
contextHitTestContextThe context.
modelMatrixMatrix4x4The model matrix.
hitsList<HitTestResult>The hits.
originalSourceobjectThe original source.
fixedSizeboolif set to
true[fixed size].
Returns
OnAssignTo(Geometry3D)
protected override void OnAssignTo(Geometry3D target)
Parameters
targetGeometry3D
OnUpdateTextureAndBillboardVertices(IDeviceResources)
Called when [draw texture].
protected override void OnUpdateTextureAndBillboardVertices(IDeviceResources deviceResources)
Parameters
deviceResourcesIDeviceResourcesThe device resources.
UpdateBounds()
Updates the bounds.
public override void UpdateBounds()