Class BillboardBase
- Namespace
- HelixToolkit.SharpDX
- Assembly
- HelixToolkit.SharpDX.dll
public abstract class BillboardBase : Geometry3D, INotifyPropertyChanged, IGUID, IBillboardText
- Inheritance
-
BillboardBase
- Implements
- Derived
- Inherited Members
Constructors
BillboardBase()
public BillboardBase()
Properties
BillboardVertices
Gets the billboard vertices.
public IList<BillboardVertex> BillboardVertices { get; }
Property Value
- IList<BillboardVertex>
The billboard vertices.
Height
Gets the height.
public float Height { get; protected set; }
Property Value
- float
The height.
IsInitialized
Gets a value indicating whether this billboard internal is initialized.
public bool IsInitialized { get; protected set; }
Property Value
- bool
trueif this instance is initialized; otherwise,false.
Texture
Gets the texture.
public TextureModel? Texture { get; protected set; }
Property Value
- TextureModel
The texture.
Type
Gets the type.
public abstract BillboardType Type { get; }
Property Value
- BillboardType
The type.
Width
Gets the width.
public float Width { get; protected set; }
Property Value
- float
The width.
Methods
AssignResultAdditional(BillboardHitResult, int)
protected virtual void AssignResultAdditional(BillboardHitResult result, int index)
Parameters
resultBillboardHitResultindexint
DrawTexture(IDeviceResources)
Draws the texture and fill the billboardverties. Called during initialize vertex buffer.
public void DrawTexture(IDeviceResources deviceResources)
Parameters
deviceResourcesIDeviceResourcesThe device resources.
GetQuadOffset(float, float, BillboardHorizontalAlignment, BillboardVerticalAlignment, out Vector2, out Vector2)
protected static void GetQuadOffset(float width, float height, BillboardHorizontalAlignment horizontalAlignment, BillboardVerticalAlignment verticalAlignment, out Vector2 topLeft, out Vector2 bottomRight)
Parameters
widthfloatheightfloathorizontalAlignmentBillboardHorizontalAlignmentverticalAlignmentBillboardVerticalAlignmenttopLeftVector2bottomRightVector2
HitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>, object?, bool)
Hits the test.
public abstract 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
HitTestFixedSize(HitTestContext?, ref Matrix4x4, ref List<HitTestResult>, object?, int)
Hits the size of the test fixed.
protected bool HitTestFixedSize(HitTestContext? context, ref Matrix4x4 modelMatrix, ref List<HitTestResult> hits, object? originalSource, int count)
Parameters
contextHitTestContextThe context.
modelMatrixMatrix4x4The model matrix.
hitsList<HitTestResult>The hits.
originalSourceobjectThe original source.
countintThe count of vertices in BillboardVertices.
Returns
HitTestNonFixedSize(HitTestContext?, ref Matrix4x4, ref List<HitTestResult>, object?, int)
Hits the size of the test non fixed.
protected bool HitTestNonFixedSize(HitTestContext? context, ref Matrix4x4 modelMatrix, ref List<HitTestResult> hits, object? originalSource, int count)
Parameters
contextHitTestContextThe context.
modelMatrixMatrix4x4The model matrix.
hitsList<HitTestResult>The hits.
originalSourceobjectThe original source.
countintThe count of vertices in BillboardVertices.
Returns
Invalidate()
public void Invalidate()
OnAssignTo(Geometry3D)
protected override void OnAssignTo(Geometry3D target)
Parameters
targetGeometry3D
OnClearAllGeometryData()
protected override void OnClearAllGeometryData()
OnUpdateTextureAndBillboardVertices(IDeviceResources)
protected abstract void OnUpdateTextureAndBillboardVertices(IDeviceResources deviceResources)
Parameters
deviceResourcesIDeviceResources