Ejemplo n.º 1
0
        protected override MeshGeometry3D CreateMesh()
        {
            if (divisions < 3 || divisions > 999 || radius <= 0 || path == null || path.Count < 2)
            {
                return(null);
            }

            List <Point> section = new List <Point>(divisions + 1);

            for (int id = 0; id <= divisions; id++)
            {
                double phi = id * MathUtils.PIx2 / divisions;
                section.Add(new Point(radius * Math.Cos(phi), radius * Math.Sin(phi)));
            }

            return(MeshUtils.CreateTube(path, section, isPathClosed));
        }
Ejemplo n.º 2
0
 protected override MeshGeometry3D CreateMesh()
 {
     return(MeshUtils.CreateCube(divisions, isClosed));
 }
 protected override MeshGeometry3D CreateMesh()
 {
     return(MeshUtils.CreateCylinderSegment(divisions, isClosed, upperRadius, startDegrees, stopDegrees));
 }
 protected override MeshGeometry3D CreateMesh()
 {
     return(MeshUtils.CreateSphere(divisions));
 }
Ejemplo n.º 5
0
 protected override MeshGeometry3D CreateMesh()
 {
     return(MeshUtils.CreateDiskSegment(divisions, innerRadius / Radius, startDegrees, stopDegrees));
 }
Ejemplo n.º 6
0
 protected override MeshGeometry3D CreateMesh()
 {
     return(MeshUtils.CreateTriangle(p1, p2, p3, divisions));
 }