SoCone Class Reference
[Shapes]

Cone shape node. More...

#include <Inventor/nodes/SoCone.h>

Inheritance diagram for SoCone:
SoShape SoNode SoFieldContainer SoBase SoRefCounter SoTypedObject

List of all members.

Public Types

enum  Part {
  SIDES = 0x01,
  BOTTOM = 0x02,
  ALL = 0x03
}

Public Member Functions

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

Static Public Member Functions

static SoType getClassTypeId ()

Public Attributes

SoSFBitMask parts
SoSFFloat bottomRadius
SoSFFloat height

Detailed Description

Cone shape node.

This node represents a simple cone whose central axis is aligned with the y-axis. By default, the cone is centered at (0,0,0) and 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. The cone has two parts: the sides and the bottom.

The cone 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 cone, and the second is used for the bottom. Otherwise, the first material is used for the entire cone.

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

Picking: SoPickedPoint getDetail() returns an SoConeDetail.

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

Consider using the SoAlgebraicCone 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

SoAlgebraicCone, SoConeDetail, SoCube, SoCylinder, SoFullSceneAntialiasing, SoSphere

See related examples:

QtHelloCone


Member Enumeration Documentation

Cone parts.

Enumerator:
SIDES 

The conical part.

BOTTOM 

The bottom circular face.

ALL 

All parts.


Constructor & Destructor Documentation

SoCone::SoCone (  ) 

Creates a cone node with default settings.


Member Function Documentation

void SoCone::addPart ( SoCone::Part  part  ) 

Convenience function to turn on a part of the cone.

static SoType SoCone::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoShape.

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

Returns the type identifier for this specific instance.

Reimplemented from SoShape.

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

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

void SoCone::removePart ( SoCone::Part  part  ) 

Convenience function to turn off a part of the cone.


Member Data Documentation

Specifies the radius of the base circle.

Value must be greater than 0.0.

Specifies the cone's height.

Value must be greater than 0.0.

Visible parts of cone.


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

Open Inventor Toolkit reference manual, generated on 4 Sep 2023
Copyright © Thermo Fisher Scientific All rights reserved.
https://www.openinventor.com/