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

#include <GeomIo.h>

Inherits cinder::geom::Source.

Public Member Functions

 Icosahedron ()
 
Icosahedroncolors (bool enable=true)
 
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
 
Icosahedronclone () const override
 

Protected Member Functions

void calculate (std::vector< vec3 > *positions, std::vector< vec3 > *normals, std::vector< vec3 > *colors, std::vector< vec2 > *texcoords, std::vector< uint32_t > *indices) const
 
void copyIndicesNonIndexed (uint16_t *dest) const
 
void copyIndicesNonIndexed (uint32_t *dest) const
 
template<typename T >
void forceCopyIndicesTrianglesImpl (T *dest) const
 

Protected Attributes

bool mHasColors
 

Static Protected Attributes

static float sPositions [12 *3]
 
static float sTexCoords [60 *2]
 
static uint32_t sIndices [60]
 

Friends

class Icosphere
 
class WireIcosahedron
 

Constructor & Destructor Documentation

cinder::geom::Icosahedron::Icosahedron ( )

Member Function Documentation

Icosahedron& cinder::geom::Icosahedron::colors ( bool  enable = true)
size_t cinder::geom::Icosahedron::getNumVertices ( ) const
overridevirtual

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

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

Implements cinder::geom::Source.

void cinder::geom::Icosahedron::calculate ( std::vector< vec3 > *  positions,
std::vector< vec3 > *  normals,
std::vector< vec3 > *  colors,
std::vector< vec2 > *  texcoords,
std::vector< uint32_t > *  indices 
) 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

Friends And Related Function Documentation

friend class Icosphere
friend
friend class WireIcosahedron
friend

Member Data Documentation

bool cinder::geom::Icosahedron::mHasColors
protected
float cinder::geom::Icosahedron::sPositions
staticprotected
Initial value:
= {
-PHI, 1.0f, 0.0f, PHI, 1.0f, 0.0f, -PHI,-1.0f, 0.0f, PHI,-1.0f, 0.0f,
0.0f, -PHI, 1.0f, 0.0f, PHI, 1.0f, 0.0f, -PHI,-1.0f, 0.0f, PHI,-1.0f,
1.0f, 0.0f, -PHI, 1.0f, 0.0f, PHI, -1.0f, 0.0f, -PHI, -1.0f, 0.0f, PHI }
float cinder::geom::Icosahedron::sTexCoords
staticprotected
Initial value:
= {
0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
1.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f }
uint32_t cinder::geom::Icosahedron::sIndices
staticprotected
Initial value:
={
0,11, 5, 0, 5, 1, 0, 1, 7, 0, 7,10, 0,10,11,
5,11, 4, 1, 5, 9, 7, 1, 8,10, 7, 6,11,10, 2,
3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9,
4, 9, 5, 2, 4,11, 6, 2,10, 8, 6, 7, 9, 8, 1 }

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