SoCylinder Class Reference
[Shapes]

Cylinder shape node. More...

#include <Inventor/nodes/SoCylinder.h>

Inheritance diagram for SoCylinder:
SoShape SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  Part {
  SIDES = 0x01,
  TOP = 0x02,
  BOTTOM = 0x04,
  ALL = 0x07
}

Public Member Functions

virtual SoType getTypeId () const
 SoCylinder ()
void addPart (SoCylinder::Part part)
void removePart (SoCylinder::Part part)
SbBool hasPart (SoCylinder::Part part) const

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFBitMask parts
SoSFFloat radius
SoSFFloat height

Detailed Description

Cylinder shape node.

This node represents a simple capped cylinder centered around the y-axis. By default, the cylinder is centered at (0,0,0) and has a default size of -1 to +1 in all three dimensions. You can use the radius and height fields to create a cylinder with a different size.

The cylinder is transformed by the current cumulative transformation and is drawn with the current lighting model, drawing style, material, and geometric complexity.

If the current material binding is PER_PART or PER_PART_INDEXED, the first current material is used for the sides of the cylinder, the second is used for the top, and the third is used for the bottom. Otherwise, the first material is used for the entire cylinder.

When a texture is applied to a cylinder, it is applied differently to the sides, top, and bottom. On the sides, the texture wraps counterclockwise (from above) starting at the back of the cylinder. The texture has a vertical seam at the back, intersecting the yz-plane. For the top and bottom, a circle is cut out of the texture square and applied to the top or bottom circle. The top texture appears right side up when the top of the cylinder is tilted toward the camera, and the bottom texture appears right side up when the top of the cylinder is tilted away from the camera.

Picking: SoPickedPoint getDetail() returns an SoCylinderDetail.

OpenGL vertex arrays are used if they are available and if the environment variable IV_NO_VERTEX_ARRAY is not set.

Consider using the SoAlgebraicCylinder node instead of this one. Algebraic shapes are computed and rendered on the GPU and can be used with SoMultipleInstance.

FILE FORMAT/DEFAULT

ACTION BEHAVIOR

SEE ALSO

SoAlgebraicCylinder, SoCone, SoCube, SoCylinderDetail, SoFullSceneAntialiasing, SoSphere


Member Enumeration Documentation

Cylinder parts.

Enumerator:
SIDES 

The cylindrical part.

TOP 

The top circular face.

BOTTOM 

The bottom circular face.

ALL 

All parts.


Constructor & Destructor Documentation

SoCylinder::SoCylinder (  ) 

Creates a cylinder node with default settings.


Member Function Documentation

void SoCylinder::addPart ( SoCylinder::Part  part  ) 

Convenience function to turn on a part of the cylinder.

static SoType SoCylinder::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoShape.

virtual SoType SoCylinder::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoShape.

SbBool SoCylinder::hasPart ( SoCylinder::Part  part  )  const

Convenience function that returns whether a given part is on or off.

void SoCylinder::removePart ( SoCylinder::Part  part  ) 

Convenience function to turn off a part of the cylinder.


Member Data Documentation

Specifies the cylinder's height.

Value must be greater than 0.0. Default is 1.

Visible parts of cylinder.

Use enum Part. Default is ALL.

Specifies the cylinder's radius.

Value must be greater than 0.0. Default is 1.


The documentation for this class was generated from the following file:

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/