Simulation.DrawRotationRestraint Method
Protected Overridable Sub DrawRotationRestraint( _
ByVal context As RenderContextBase _
)
This language is not supported or no code example is available.
Parameters
- context
- RenderContextBase
The render context
protected override void DrawRotationRestraint(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 DrawRotationRestraint(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.