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

#include <GeomIo.h>

Inherits cinder::geom::Source.

Public Member Functions

 Icosphere ()
 
Icospherecolors (bool enable=true)
 
Icospheresubdivisions (int sub)
 
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
 
Icosphereclone () const override
 

Protected Member Functions

void calculate () const
 
void calculateImplUV () const
 
void subdivide () const
 
void copyIndicesNonIndexed (uint16_t *dest) const
 
void copyIndicesNonIndexed (uint32_t *dest) const
 
template<typename T >
void forceCopyIndicesTrianglesImpl (T *dest) const
 

Protected Attributes

int mSubdivision
 
bool mHasColors
 
bool mCalculationsCached
 
std::vector< vec3 > mPositions
 
std::vector< vec3 > mNormals
 
std::vector< vec3 > mColors
 
std::vector< vec2 > mTexCoords
 
std::vector< uint32_t > mIndices
 

Constructor & Destructor Documentation

cinder::geom::Icosphere::Icosphere ( )

Member Function Documentation

Icosphere& cinder::geom::Icosphere::colors ( bool  enable = true)
Icosphere& cinder::geom::Icosphere::subdivisions ( int  sub)
size_t cinder::geom::Icosphere::getNumVertices ( ) const
overridevirtual

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

void cinder::geom::Icosphere::calculate ( ) const
protected
void cinder::geom::Icosphere::calculateImplUV ( ) const
protected
void cinder::geom::Icosphere::subdivide ( ) 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

int cinder::geom::Icosphere::mSubdivision
protected
bool cinder::geom::Icosphere::mHasColors
protected
bool cinder::geom::Icosphere::mCalculationsCached
mutableprotected
std::vector<vec3> cinder::geom::Icosphere::mPositions
mutableprotected
std::vector<vec3> cinder::geom::Icosphere::mNormals
mutableprotected
std::vector<vec3> cinder::geom::Icosphere::mColors
mutableprotected
std::vector<vec2> cinder::geom::Icosphere::mTexCoords
mutableprotected
std::vector<uint32_t> cinder::geom::Icosphere::mIndices
mutableprotected

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