Adds a sphere to the specified MeshGeometry3D.

Namespace: Ico.Windows.Media.Media3D
Assembly: Ico3DControlsLibrary (in Ico3DControlsLibrary.dll) Version: 10.97.212.0 (10.97.212.00)

Syntax

C#
public static void AddSphere(
	MeshGeometry3D mesh,
	double radius,
	Point3D position,
	int sides,
	int heightSegments,
	double hemisphere1,
	double hemisphere2,
	bool capTop,
	bool capBottom,
	double sliceAngle
)
Visual Basic
Public Shared Sub AddSphere ( _
	mesh As MeshGeometry3D, _
	radius As Double, _
	position As Point3D, _
	sides As Integer, _
	heightSegments As Integer, _
	hemisphere1 As Double, _
	hemisphere2 As Double, _
	capTop As Boolean, _
	capBottom As Boolean, _
	sliceAngle As Double _
)
JScript
public static function AddSphere(
	mesh : MeshGeometry3D, 
	radius : double, 
	position : Point3D, 
	sides : int, 
	heightSegments : int, 
	hemisphere1 : double, 
	hemisphere2 : double, 
	capTop : boolean, 
	capBottom : boolean, 
	sliceAngle : double
)

Parameters

mesh
Type: System.Windows.Media.Media3D..::..MeshGeometry3D
The MeshGeometry3D which to add the sphere to.
radius
Type: System..::..Double
The radius of the sphere.
position
Type: System.Windows.Media.Media3D..::..Point3D
The Point3D specifying the center of the sphere.
sides
Type: System..::..Int32
The number of sides used to build the sphere. A greater number increases the smoothness of the sphere.
heightSegments
Type: System..::..Int32
The number of horizontal divisions used to build the sphere. A greater number increases the smoothness of the sphere.
hemisphere1
Type: System..::..Double
A value in the range 0.0-1.0 specifying the level of truncation for the sphere, starting from the bottom.
hemisphere2
Type: System..::..Double
A value in the range 0.0-1.0 specifying the level of truncation for the sphere, starting from the bottom.
capTop
Type: System..::..Boolean
Whether the sphere should have a cap on the top side (only if truncated on that side).
capBottom
Type: System..::..Boolean
Whether the sphere should have a cap on the top side (only if truncated on that side).
sliceAngle
Type: System..::..Double
An angle in degrees used to generate a sliced sphere.

Return Value

The MeshGeometry3D representing the resulting sphere.

See Also