void CreateGeometry() { double r = Diameter / 2; double l = HeadLength * Diameter; // arrowhead var pc = new PointCollection(); pc.Add(new Point(-l, r)); pc.Add(new Point(-l, r * 2)); pc.Add(new Point(0, 0)); var headBuilder = new MeshBuilder(); headBuilder.AddRevolvedGeometry(pc, new Point3D(0, 0, 0), new Vector3D(0, 0, 1), ThetaDiv); _head = headBuilder.ToMesh(); _head.Freeze(); // body pc = new PointCollection(); pc.Add(new Point(0, 0)); pc.Add(new Point(0, r)); pc.Add(new Point(1, r)); var bodyBuilder = new MeshBuilder(); bodyBuilder.AddRevolvedGeometry(pc, new Point3D(0, 0, 0), new Vector3D(0, 0, 1), ThetaDiv); _body = bodyBuilder.ToMesh(); _body.Freeze(); }
void CreateGeometry() { double r = Diameter / 2; var pc = new PointCollection(); pc.Add(new Point(0, 0)); pc.Add(new Point(0, r)); pc.Add(new Point(1, r)); pc.Add(new Point(1, 0)); var builder = new MeshBuilder(); builder.AddRevolvedGeometry(pc, new Point3D(0, 0, 0), new Vector3D(0, 0, 1), ThetaDiv); _tube= builder.ToMesh(); _tube.Freeze(); }