예제 #1
0
 /// <summary>
 /// Builds a cylinder into the geometry with correct texture coordinates and normals.
 /// </summary>
 /// <param name="target">Target <see cref="GeometrySurface"/>.</param>
 /// <param name="radius">The radius of the cylinder.</param>
 /// <param name="height">The height of the cylinder.</param>
 /// <param name="countOfSegments">Total count of segments to generate.</param>
 public static BuiltVerticesRange BuildCylinderBottom(this GeometrySurface target, float radius, float height, int countOfSegments)
 {
     return(target.BuildCylinder(
                new Vector3(0f, -(height / 2f), 0f),
                radius, height, countOfSegments, false, true, false));
 }
예제 #2
0
 /// <summary>
 /// Builds a cylinder into the geometry with correct texture coordinates and normals.
 /// </summary>
 /// <param name="target">Target <see cref="GeometrySurface"/>.</param>
 /// <param name="bottomMiddle">Coordinate of bottom middle.</param>
 /// <param name="radius">The radius of the cylinder.</param>
 /// <param name="height">The height of the cylinder.</param>
 /// <param name="countOfSegments">Total count of segments to generate.</param>
 public static BuiltVerticesRange BuildCylinderSides(this GeometrySurface target, Vector3 bottomMiddle, float radius, float height, int countOfSegments)
 {
     return(target.BuildCylinder(bottomMiddle, radius, height, countOfSegments, true, false, false));
 }