Class Cylinder

Cylinder class

Parameterized Cylinder. It can also be used to represent the cone when one of radiusTop/radiusBottom is zero.

public class Cylinder : Primitive

Constructors

NameDescription
Cylinder()Initializes a new instance of the Cylinder class.
Cylinder(double, double)Initializes a new instance of the Cylinder class.
Cylinder(double, double, double)Initializes a new instance of the Cylinder class.
Cylinder(double, double, double, int, int, bool)Initializes a new instance of the Cylinder class.
Cylinder(string, double, double, double, int, int, bool, double, double)Initializes a new instance of the Cylinder class.

Properties

NameDescription
CastShadows { get; set; }Gets or sets whether this geometry can cast shadow
Excluded { get; set; }Gets or sets whether to exclude this entity during exporting.
GenerateFanCylinder { get; set; }Gets or sets whether to generate the fan-style cylinder when the ThetaLength is less than 2*PI, otherwise the model will not be cut.
Height { get; set; }Gets or sets the height of the cylinder.
HeightSegments { get; set; }Gets or sets the height segments.
virtual Name { get; set; }Gets or sets the name.
OffsetBottom { get; set; }Gets or sets the vertices transformation offset of the bottom side.
OffsetTop { get; set; }Gets or sets the vertices transformation offset of the top side.
OpenEnded { get; set; }Gets or sets a value indicating whether this Cylinder open ended. The default value is false.
ParentNode { get; set; }Gets or sets the first parent node, if set the first parent node, this entity will be detached from other parent nodes.
ParentNodes { get; }Gets all parent nodes, an entity can be attached to multiple parent nodes for geometry instancing
Properties { get; }Gets the collection of all properties.
RadialSegments { get; set; }Gets or sets the radial segments.
RadiusBottom { get; set; }Gets or sets the radius of cylinder’s bottom cap.
RadiusTop { get; set; }Gets or sets the radius of cylinder’s top cap.
ReceiveShadows { get; set; }Gets or sets whether this geometry can receive shadow.
Scene { get; }Gets the scene that this object belongs to
ShearBottom { get; set; }Gets or sets of the shear transform of the bottom side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
ShearTop { get; set; }Gets or sets of the shear transform of the top side, vector stores the (x-axis, z-axis) shear value that measured in radian, default value is (0, 0)
ThetaLength { get; set; }Gets or sets the length of the theta. The default value is 2π.
ThetaStart { get; set; }Gets or sets the theta start. The default value is 0.

Methods

NameDescription
FindProperty(string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)
GetBoundingBox()Gets the bounding box of current entity in its object space coordinate system.
virtual GetEntityRendererKey()Gets the key of the entity renderer registered in the renderer
GetProperty(string)Get the value of specified property
RemoveProperty(Property)Removes a dynamic property.
RemoveProperty(string)Remove the specified property identified by name
SetProperty(string, object)Sets the value of specified property
override ToMesh()Convert current object to mesh

See Also