Model |
public ModelRotatorVisual3DCreateCustomCircleModel3DDelegate CreateCustomCircleModelCallback { get; set; }
CreateCustomCircleModelCallback is a callback delegate that can be used to provide custom 3D model of the circle.
The follwing example shows how to create the same circle 3D models that is created by thed default code:
var modelRotator = new ModelRotatorVisual3D(); modelRotator.CreateCustomRotatableCircleModelCallback = delegate(Vector3D normalVector3D, double innerRadius, double outerRadius, Brush circleBrush) { int segmentsCount = 30; double circleHeight = outerRadius * 0.05; // Height is 20 times smaller than outer radius var tubeMesh3D = new Ab3d.Meshes.TubeMesh3D(new Point3D(0, 0, 0), normalVector3D, outerRadius, innerRadius, circleHeight, segmentsCount); var geometryModel3D = new GeometryModel3D(tubeMesh3D.Geometry, new DiffuseMaterial(circleBrush)); return geometryModel3D; };