Пример #1
0
        /// <summary>
        /// </summary>
        /// <param name="name">
        /// </param>
        /// <param name="segments">
        /// </param>
        /// <param name="diameter">
        /// </param>
        /// <param name="scene">
        /// </param>
        /// <param name="updatable">
        /// </param>
        /// <returns>
        /// </returns>
        public static Mesh CreateSphere(string name, int segments, double diameter, Scene scene, bool updatable = false)
        {
            var sphere     = new Mesh(name, scene);
            var vertexData = VertexData.CreateSphere(segments, diameter);

            vertexData.applyToMesh(sphere, updatable);
            return(sphere);
        }
Пример #2
0
 public override VertexData _regenerateVertexData()
 {
     return(VertexData.CreateSphere(this.segments, this.diameter));
 }
Пример #3
0
 public Sphere(int id, Scene scene, int segments, double diameter, bool canBeRegenerated = false, Mesh mesh = null)
     : base(id, scene, VertexData.CreateSphere(segments, diameter), canBeRegenerated, mesh)
 {
     this.segments = segments;
     this.diameter = diameter;
 }