Table of Contents

Class MeshGeometry3D

Namespace
HelixToolkit.SharpDX
Assembly
HelixToolkit.SharpDX.dll
[Serializable]
[DataContract]
public class MeshGeometry3D : Geometry3D, INotifyPropertyChanged, IGUID
Inheritance
MeshGeometry3D
Implements
Derived
Inherited Members
Extension Methods

Fields

EnableSmallTriangleHitTestScaling

Used to enable small triangle hit test. It uses SmallTriangleEdgeLengthSquare to determine if triangle is too small. If it is too small, scale up the triangle before hit test.

public static bool EnableSmallTriangleHitTestScaling

Field Value

bool

SmallTriangleEdgeLengthSquare

Used to determine if the triangle is small. Small triangle is defined as any edge length square is smaller than SmallTriangleEdgeLengthSquare.

public static float SmallTriangleEdgeLengthSquare

Field Value

float

SmallTriangleHitTestScaling

Used to scale up small triangle during hit test.

public static float SmallTriangleHitTestScaling

Field Value

float

Properties

BiTangents

Does not raise property changed event

[DataMember]
public Vector3Collection? BiTangents { get; set; }

Property Value

Vector3Collection

Normals

Does not raise property changed event

[DataMember]
public Vector3Collection? Normals { get; set; }

Property Value

Vector3Collection

ReturnMultipleHitsOnHitTest

Callers should set this property to true before calling HitTest if the callers need multiple hits throughout the geometry. This is useful when the geometry is cut by a plane.

public bool ReturnMultipleHitsOnHitTest { get; set; }

Property Value

bool

Tangents

Does not raise property changed event

[DataMember]
public Vector3Collection? Tangents { get; set; }

Property Value

Vector3Collection

TextureCoordinates

Texture Coordinates

[DataMember]
public Vector2Collection? TextureCoordinates { get; set; }

Property Value

Vector2Collection

TriangleIndices

A proxy member for Indices

[IgnoreDataMember]
public IntCollection? TriangleIndices { get; set; }

Property Value

IntCollection

Triangles

public IEnumerable<Geometry3D.Triangle> Triangles { get; }

Property Value

IEnumerable<Geometry3D.Triangle>

Methods

CreateOctree(OctreeBuildParameter)

Override to create different octree in subclasses.

protected override IOctreeBasic? CreateOctree(OctreeBuildParameter parameter)

Parameters

parameter OctreeBuildParameter

Returns

IOctreeBasic

HitTest(HitTestContext?, Matrix4x4, ref List<HitTestResult>, object?)

public virtual bool HitTest(HitTestContext? context, Matrix4x4 modelMatrix, ref List<HitTestResult> hits, object? originalSource)

Parameters

context HitTestContext
modelMatrix Matrix4x4
hits List<HitTestResult>
originalSource object

Returns

bool

Merge(params MeshGeometry3D[])

Merge meshes into one

public static MeshGeometry3D Merge(params MeshGeometry3D[] meshes)

Parameters

meshes MeshGeometry3D[]

Returns

MeshGeometry3D

OnAssignTo(Geometry3D)

protected override void OnAssignTo(Geometry3D target)

Parameters

target Geometry3D

OnClearAllGeometryData()

protected override void OnClearAllGeometryData()

UpdateNormals()

public void UpdateNormals()

UpdateTextureCoordinates()

Call to manually update texture coordinate buffer.

public void UpdateTextureCoordinates()