ofDocsdocumentation 3d ofCylinderPrimitive

ofCylinderPrimitive

The ofCylinderPrimitive allows you to create an cylinder mesh.

Like all primitives it allows you to set the size, for the cylinder a radius and height, draw it, set positions, etc, as a simple example:


void setup()
{

	cylinder.set( cylinderRadius, cylinderHeight );
}

void draw()
{

	cylinder.setPosition(ofGetWidth()*.2, ofGetHeight()*.75, 0);
	cylinder.rotate(spinX, 1.0, 0.0, 0.0);
	cylinder.rotate(spinY, 0, 1.0, 0.0);

	// get all the faces from the icoSphere, handy when you want to copy
	// individual vertices or tweak them a little ;)
	vector<ofMeshFace

getBottomCapIndices( )

int getBottomCapIndices()

getBottomCapMesh( )

ofMesh getBottomCapMesh()

getCapped( )

bool getCapped()

getCylinderIndices( )

int getCylinderIndices()

getCylinderMesh( )

ofMesh getCylinderMesh()

getHeight( )

float getHeight()

getRadius( )

float getRadius()

getResolution( )

glm::vec3 getResolution()

getResolutionCap( )

int getResolutionCap()

getResolutionHeight( )

int getResolutionHeight()

getResolutionRadius( )

int getResolutionRadius()

getTopCapIndices( )

int getTopCapIndices()

getTopCapMesh( )

ofMesh getTopCapMesh()

ofCylinderPrimitive( )

ofCylinderPrimitive()

ofCylinderPrimitive( ... )

ofCylinderPrimitive(float radius, float height, int radiusSegments, int heightSegments, int capSegments=2, bool bCapped=true, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)

set( ... )

void set(float radius, float height, bool bCapped=true)

set( ... )

void set(float radius, float height, int radiusSegments, int heightSegments, int capSegments=2, bool bCapped=true, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)

setBottomCapColor( ... )

void setBottomCapColor(ofColor color)

setCapped( ... )

void setCapped(bool bCapped)

setCylinderColor( ... )

void setCylinderColor(ofColor color)

setHeight( ... )

void setHeight(float height)

setMode( ... )

void setMode(ofPrimitiveMode mode)

setRadius( ... )

void setRadius(float radius)

setResolution( ... )

void setResolution(int radiusSegments, int heightSegments, int capSegments=2)

setResolutionCap( ... )

void setResolutionCap(int capRes)

setResolutionHeight( ... )

void setResolutionHeight(int heightRes)

setResolutionRadius( ... )

void setResolutionRadius(int radiusRes)

setTopCapColor( ... )

void setTopCapColor(ofColor color)

~ofCylinderPrimitive( )

~ofCylinderPrimitive()