Cone


Purpose: This node is one of the shape Nodes. It provides you with a simple cone to use in your worlds. The central axis of this node is aligned along the y-axis. The default location for the cone is centered at (0,0,0). The cone has a size of -1 to +1 in all three directions. The cone has a radius of 1 at the bottom and a height of 2, with its apex at 1. There are two parts for the cone. These two parts are the sides and the bottom.
Syntax

PARTS
SIDES The conical part
BOTTOM The bottom circular face
ALL All parts

FILE FORMAT/DEFAULTS
Cone {
parts ALL #
SFBitMask
bottomRadius 1 #
SFFloat
height 2 #
SFFloat
}

Explanation

This node is transformed by the parent's current cumulative transformation. It is also drawn with the parent's current texture and material.

Unless the current material binding is PER_PART or PER_PART_INDEXED, the first current material is used for the entire cone. Under these circumstances, the first current material is used for the sides of the cone, and the second is used for the bottom.

If a texture is applied to a cone, the texture is applied differently to the sides and bottom. For the sides, the texture will wraps counterclockwise starting at the back of the cone. This counterclockwise direction is determined by looking at the cone from above. The texture will have a vertical seam along the back of the cone and will intersect the yz-plane. The base of the cone is covered by a circle that is cut out of the texture square and applied to the base. When the top of the cone is rotated toward the negative z axis, the texture will appear right side up.

Example Use

The following code fragment is from Cone.wrl.

Cone {	parts 		ALL
	bottomRadius 	1
	height 		3}
See Also

PER_PART, PER_PART_INDEXED