Пример #1
0
        /// <summary>
        /// </summary>
        /// <param name="name">
        /// </param>
        /// <param name="height">
        /// </param>
        /// <param name="diameterTop">
        /// </param>
        /// <param name="diameterBottom">
        /// </param>
        /// <param name="tessellation">
        /// </param>
        /// <param name="subdivisions">
        /// </param>
        /// <param name="scene">
        /// </param>
        /// <param name="updatable">
        /// </param>
        /// <returns>
        /// </returns>
        public static Mesh CreateCylinder(
            string name, double height, double diameterTop, double diameterBottom, int tessellation, int subdivisions, Scene scene, bool updatable = false)
        {
            var cylinder   = new Mesh(name, scene);
            var vertexData = VertexData.CreateCylinder(height, diameterTop, diameterBottom, tessellation, subdivisions);

            vertexData.applyToMesh(cylinder, updatable);
            return(cylinder);
        }
Пример #2
0
 public Cylinder(int id, Scene scene, double height, double diameterTop, double diameterBottom, int tessellation, int subdivisions = 1, bool canBeRegenerated = false, Mesh mesh = null)
     : base(id, scene, VertexData.CreateCylinder(height, diameterTop, diameterBottom, tessellation, subdivisions), canBeRegenerated, mesh)
 {
     this.height         = height;
     this.diameterTop    = diameterTop;
     this.diameterBottom = diameterBottom;
     this.tessellation   = tessellation;
     this.subdivisions   = subdivisions;
 }
Пример #3
0
 public override VertexData _regenerateVertexData()
 {
     return(VertexData.CreateCylinder(this.height, this.diameterTop, this.diameterBottom, this.tessellation, this.subdivisions));
 }