/// <summary> /// 一个球体的模型。 /// </summary> /// <param name="radius"></param> /// <param name="latitudeParts">用纬线把地球切割为几块。</param> /// <param name="longitudeParts">用经线把地球切割为几块。</param> public Sphere(float radius = 1.0f, int latitudeParts = 10, int longitudeParts = 40) { this.model = new SphereModel(radius, latitudeParts, longitudeParts); this.Size = new vec3(radius * 2, radius * 2, radius * 2); }
/// <summary> /// 一个球体的模型。 /// </summary> /// <param name="radius"></param> /// <param name="latitudeParts">用纬线把地球切割为几块。</param> /// <param name="longitudeParts">用经线把地球切割为几块。</param> /// <param name="colorGenerator"></param> public Sphere(float radius = 1.0f, int latitudeParts = 10, int longitudeParts = 40, Func <int, int, vec3> colorGenerator = null) { this.model = new SphereModel(radius, latitudeParts, longitudeParts, colorGenerator); }
/// <summary> /// 一个球体的模型。 /// </summary> /// <param name="radius"></param> /// <param name="latitudeParts">用纬线把地球切割为几块。</param> /// <param name="longitudeParts">用经线把地球切割为几块。</param> /// <param name="colorGenerator"></param> public Sphere(float radius = 1.0f, int latitudeParts = 10, int longitudeParts = 40) { this.model = new SphereModel(radius, latitudeParts, longitudeParts); }
/// <summary> /// 一个球体的模型。 /// </summary> /// <param name="radius"></param> /// <param name="latitudeParts">用纬线把地球切割为几块。</param> /// <param name="longitudeParts">用经线把地球切割为几块。</param> public Sphere(float radius = 1.0f, int latitudeParts = 10, int longitudeParts = 40) { this.model = new SphereModel(radius, latitudeParts, longitudeParts); this.Lengths = new vec3(radius * 2, radius * 2, radius * 2); }