Simulation.DrawMoment Method

Gives the chance to overriders to customize moment symbol drawing.
Protected Overridable Sub DrawMoment( _ 
ByVal context As RenderContextBase
)
This language is not supported or no code example is available.
protected virtual void DrawMoment( 
RenderContextBase context 
)
This language is not supported or no code example is available.

Parameters

context
RenderContextBase

The render context

Example
 
protected override void DrawMomentVector(RenderContextBase context)
 {
    // one normal per triangle mesh
    Mesh m = Mesh.CreateBox(1, 2, 3);
    m.UpdateNormals();
    context.DrawPlainTriangles(m.Triangles, m.Vertices, m.Normals);
  
    // or smooth normals mesh
    Mesh m = Mesh.CreateSphere(1, 16, 8);
    m.UpdateNormals();
    context.DrawTriangles(m.Vertices, m.Normals, m.Triangles, null); 
 }					
This language is not supported or no code example is available.
Protected Overrides Sub DrawMomentVector(ByVal context As RenderContextBase)
     ' one normal per triangle mesh   
     Dim m As Mesh = Mesh.CreateBox(1, 2, 3);   
     m.UpdateNormals()
     context.DrawPlainTriangles(m.Triangles, m.Vertices, m.Normals);
 
     ' or smooth normals mesh    
     Dim m As Mesh = Mesh.CreateSphere(2, 16, 8)
     m.UpdateNormals()
     context.DrawTriangles(m.Vertices, m.Normals, m.Triangles, Nothing)
 End Sub					
This language is not supported or no code example is available.

.NET Framework

Supported in: 4.8

In this article

Definition