ofConePrimitive
The ofConePrimitive allows you to create a 3D cone. Like all primitives it allows you to set the size, draw it, set positions, etc, as a simple example:
void setup()
{
cone.set( coneRadius, coneHeight, coneRadiusSegments, coneHeightSegments );
}
void draw()
{
cone.setPosition(ofGetWidth()*.2, ofGetHeight()*.75, 0);
cone.rotate(spinX, 1.0, 0.0, 0.0);
cone.rotate(spinY, 0, 1.0, 0.0);
// get all the faces from the cpme, handy when you want to copy
// individual vertices or tweak them a little ;)
vector<ofMeshFace
getCapIndices( )
int getCapIndices()\return a vector of the indices of vertices that make up the cap (as opposed to the cone indices).
This returns a vector of the indices of vertices that make up the cap (as opposed to the cone indices)
getCapMesh( )
ofMesh getCapMesh()\return an ofMesh made up of the cap (as opposed to the cone).
This returns an ofMesh made up of the cap (as opposed to the cone)
getConeIndices( )
int getConeIndices()\return a vector of the indices of vertices that make up the cone (as opposed to the cap indices).
This returns a vector of the indices of vertices that make up the cone (as opposed to the cap indices)
getConeMesh( )
ofMesh getConeMesh()\return This returns an ofMesh made up of the cone (as opposed to the cap).
This returns an ofMesh made up of the cone (as opposed to the cap)
getHeight( )
float getHeight()\return the height of the cone.
This returns the height of the cone.
getRadius( )
float getRadius()\return the radius of the cap.
This returns the radius of the cap
getResolution( )
glm::vec3 getResolution()\return the resolution of the cone (rather than the cap).
This returns the resolution of the cone (rather than the cap)
getResolutionCap( )
int getResolutionCap()\return the resolution of the cap (rather than the cone).
This returns the resolution of the cap (rather than the cone)
getResolutionHeight( )
int getResolutionHeight()getResolutionRadius( )
int getResolutionRadius()ofConePrimitive( )
ofConePrimitive()ofConePrimitive( ... )
ofConePrimitive(float radius, float height, int radiusSegments, int heightSegments, int capSegments=2, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)set( ... )
void set(float radius, float height)set( ... )
void set(float radius, float height, int radiusSegments, int heightSegments, int capSegments=2, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)setCapColor( ... )
void setCapColor(ofColor color)setHeight( ... )
void setHeight(float height)setMode( ... )
void setMode(ofPrimitiveMode mode)setRadius( ... )
void setRadius(float radius)setResolution( ... )
void setResolution(int radiusRes, int heightRes, int capRes)setResolutionCap( ... )
void setResolutionCap(int capRes)setResolutionHeight( ... )
void setResolutionHeight(int heightRes)setResolutionRadius( ... )
void setResolutionRadius(int radiusRes)setTopColor( ... )
void setTopColor(ofColor color)~ofConePrimitive( )
~ofConePrimitive()