SmallChange  1.0.0
A collection of extensions to Coin3D
Loading...
Searching...
No Matches
SmHQSphere Class Reference
Inheritance diagram for SmHQSphere:
SoShape

Public Member Functions

 SmHQSphere (void)
 
virtual void getPrimitiveCount (SoGetPrimitiveCountAction *action)
 
virtual void GLRender (SoGLRenderAction *action)
 
virtual void rayPick (SoRayPickAction *action)
 

Static Public Member Functions

static void initClass (void)
 

Public Attributes

SoSFInt32 level
 
SoSFFloat radius
 

Protected Member Functions

virtual ~SmHQSphere ()
 
virtual void computeBBox (SoAction *action, SbBox3f &box, SbVec3f &center)
 
virtual void generatePrimitives (SoAction *action)
 

Constructor & Destructor Documentation

◆ SmHQSphere()

SmHQSphere::SmHQSphere ( void )

Constructor.

◆ ~SmHQSphere()

SmHQSphere::~SmHQSphere ( )
protectedvirtual

Destructor.

Member Function Documentation

◆ initClass()

void SmHQSphere::initClass ( void )
static

Required Coin method.

Member Data Documentation

◆ level

SoSFInt32 SmHQSphere::level

Decides the number of times each triangle in the tessellation of the sphere is recursively subdivided into 4 new triangles. At level 1, the sphere will be made from only 8 triangles.

The total number of triangles making up the sphere will therefore be

numtriangles = 8 * (4 ^ (level - 1))

So be careful when increasing the level field value, as the number of triangles making up the sphere will increase exponentially.


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