Cinder  0.9.1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cinder::geom::Sphere Class Reference

#include <GeomIo.h>

Inherits cinder::geom::Source.

Public Member Functions

 Sphere ()
 
 Sphere (const ci::Sphere &sphere)
 
Spherecolors (bool enable=true)
 
Spherecenter (const vec3 &center)
 
Sphereradius (float radius)
 
Spheresubdivisions (int subdiv)
 
size_t getNumVertices () const override
 
size_t getNumIndices () const override
 
Primitive getPrimitive () const override
 
uint8_t getAttribDims (Attrib attr) const override
 
AttribSet getAvailableAttribs () const override
 
void loadInto (Target *target, const AttribSet &requestedAttribs) const override
 
Sphereclone () const override
 

Protected Member Functions

void numRingsAndSegments (int *numRings, int *numSegments) const
 
void copyIndicesNonIndexed (uint16_t *dest) const
 
void copyIndicesNonIndexed (uint32_t *dest) const
 
template<typename T >
void forceCopyIndicesTrianglesImpl (T *dest) const
 

Protected Attributes

vec3 mCenter
 
float mRadius
 
int mSubdivisions
 
bool mHasColors
 

Constructor & Destructor Documentation

cinder::geom::Sphere::Sphere ( )
cinder::geom::Sphere::Sphere ( const ci::Sphere sphere)

Member Function Documentation

Sphere& cinder::geom::Sphere::colors ( bool  enable = true)
Sphere& cinder::geom::Sphere::center ( const vec3 &  center)
Sphere& cinder::geom::Sphere::radius ( float  radius)
Sphere& cinder::geom::Sphere::subdivisions ( int  subdiv)

Specifies the number of segments, which determines the roundness of the sphere.

size_t cinder::geom::Sphere::getNumVertices ( ) const
overridevirtual

Implements cinder::geom::Source.

size_t cinder::geom::Sphere::getNumIndices ( ) const
overridevirtual

Implements cinder::geom::Source.

Primitive cinder::geom::Sphere::getPrimitive ( ) const
overridevirtual

Implements cinder::geom::Source.

uint8_t cinder::geom::Sphere::getAttribDims ( Attrib  attr) const
overridevirtual

Implements cinder::geom::Source.

AttribSet cinder::geom::Sphere::getAvailableAttribs ( ) const
overridevirtual

Implements cinder::geom::Source.

void cinder::geom::Sphere::loadInto ( Target target,
const AttribSet requestedAttribs 
) const
overridevirtual

Implements cinder::geom::Source.

Sphere* cinder::geom::Sphere::clone ( ) const
overridevirtual

Implements cinder::geom::Source.

void cinder::geom::Sphere::numRingsAndSegments ( int *  numRings,
int *  numSegments 
) const
protected
void cinder::geom::Source::copyIndicesNonIndexed ( uint16_t *  dest) const
protectedinherited

Builds a sequential list of vertices to simulate an indexed geometry when Source is non-indexed. Assumes dest contains storage for getNumVertices() entries.

void cinder::geom::Source::copyIndicesNonIndexed ( uint32_t *  dest) const
protectedinherited

Builds a sequential list of vertices to simulate an indexed geometry when Source is non-indexed. Assumes dest contains storage for getNumVertices() entries.

template<typename T >
void cinder::geom::Source::forceCopyIndicesTrianglesImpl ( T *  dest) const
protectedinherited

Member Data Documentation

vec3 cinder::geom::Sphere::mCenter
protected
float cinder::geom::Sphere::mRadius
protected
int cinder::geom::Sphere::mSubdivisions
protected
bool cinder::geom::Sphere::mHasColors
protected

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