%%PageItemTitle%%

VectorDraw Web Library

JsPropertiesExtractor Send comments on this topic.
AddSphere Method
See Also  Example
vdWebLibrary Namespace > vdrawObj Class : AddSphere Method
centerPoint
The center point of sphere as an array of [x,y,z]
radius
The radius of sphere
longitudinalsegs
Number of segments that faces will be divide in longitude direction
latitudinalsegs
Number of segments that faces willbe divide in latitude direction
drawit
Defines if the vdPolyline object will be drawn.
entities
The entities collection where the polyline will be added. This can be the entities of layout or a block.
Creats a sphere as a vdPolyface object type and returns the created object.

Syntax

JScript 
public function AddSphere( 
   centerPoint : Object,
   radius : double,
   longitudinalsegs : int,
   latitudinalsegs : int,
   drawit : boolean,
   entities : Object
) : Object;

Parameters

centerPoint
The center point of sphere as an array of [x,y,z]
radius
The radius of sphere
longitudinalsegs
Number of segments that faces will be divide in longitude direction
latitudinalsegs
Number of segments that faces willbe divide in latitude direction
drawit
Defines if the vdPolyline object will be drawn.
entities
The entities collection where the polyline will be added. This can be the entities of layout or a block.

Return Value

A vdPolyface object

Example

C#Copy Code
vdcanvas.AddSphere([0, 0, 0], 2, 20, 10, true);

See Also