reference

This documentation is automatically generated from the openFrameworks source code using doxygen and refers to the most recent release, version 0.12.0.

ofMesh_< V, N, C, T > Class Template Reference

Represents a set of vertices in 3D spaces with normals, colors, and texture coordinates at those points. More...

#include <ofMesh.h>

Public Types

using VertexType = V
 
using NormalType = N
 
using ColorType = C
 
using TexCoordType = T
 

Public Member Functions

Construction
 ofMesh_ ()
 This creates the mesh, using OF_PRIMITIVE_TRIANGLES without any initial vertices.
 
 ofMesh_ (ofPrimitiveMode mode, const std::vector< V > &verts)
 This allows to you to use one of the other ofPrimitiveModes: OF_PRIMITIVE_TRIANGLES, OF_PRIMITIVE_TRIANGLE_STRIP, OF_PRIMITIVE_TRIANGLE_FAN, OF_PRIMITIVE_LINES, OF_PRIMITIVE_LINE_STRIP, OF_PRIMITIVE_LINE_LOOP, OF_PRIMITIVE_POINTS. See ofGLUtils for more information on these types.
 
virtual ~ofMesh_ ()
 
void setFromTriangles (const std::vector< ofMeshFace_< V, N, C, T > > &tris, bool bUseFaceNormal=false)
 
Mesh Mode
void setMode (ofPrimitiveMode mode)
 Allows you to set the ofPrimitiveMode. The available modes are OF_PRIMITIVE_TRIANGLES, OF_PRIMITIVE_TRIANGLE_STRIP, OF_PRIMITIVE_TRIANGLE_FAN, OF_PRIMITIVE_LINES, OF_PRIMITIVE_LINE_STRIP, OF_PRIMITIVE_LINE_LOOP, OF_PRIMITIVE_POINTS.
 
ofPrimitiveMode getMode () const
 \returns the primitive mode that the mesh is using.
 
Vertices
void addVertex (const V &v)
 Add a new vertex at the end of the current list of vertices. It is important to remember that the order the vertices are added to the list determines how they link they form the polygons and strips (assuming you do not change their indeces). See the ofMesh class description for details.
 
void addVertices (const std::vector< V > &verts)
 Add a vector of vertices to a mesh, allowing you to push out many at once rather than adding one at a time. The vector of vertices is added after the end of the current vertices list.
 
void addVertices (const V *verts, std::size_t amt)
 Add an array of vertices to the mesh. Because you are using a pointer to the array you also have to define the length of the array as an int (amt). The vertices are added at the end of the current vertices list.
 
void removeVertex (ofIndexType index)
 Removes the vertex at the index in the vector.
 
void removeVertices (ofIndexType startIndex, ofIndexType endIndex)
 Removes the vertices at the startIndex in the vector and the endindex specified.
 
void setVertex (ofIndexType index, const V &v)
 
void clearVertices ()
 Removes all the vertices.
 
void clear ()
 Removes all the vertices, colors, and indices from the mesh.
 
std::size_t getNumVertices () const
 
V * getVerticesPointer ()
 
const V * getVerticesPointer () const
 
getVertex (ofIndexType i) const
 
std::vector< V > & getVertices ()
 
const std::vector< V > & getVertices () const
 
bool hasVertices () const
 
void append (const ofMesh_ &mesh)
 Add the vertices, normals, texture coordinates and indices of one mesh onto another mesh. Everything from the referenced mesh is simply added at the end of the current mesh's lists.
 
void mergeDuplicateVertices ()
 
getCentroid () const
 
Normals
getNormal (ofIndexType i) const
 \returns the normal at the index in the normals vector.
 
void addNormal (const N &n)
 Add a normal to the mesh as a 3D vector, typically perpendicular to the plane of the face. A normal is a vector that defines how a surface responds to lighting, i.e. how it is lit. The amount of light reflected by a surface is proportional to the angle between the light's direction and the normal. The smaller the angle the brighter the surface will look. See the normalsExample for advice on computing the normals. addNormal adds the 3D vector to the end of the list, so you need to make sure you add normals at the same index of the matching vertex.
 
void addNormals (const std::vector< N > &norms)
 Add a vector of normals to a mesh, allowing you to push out many normals at once rather than adding one at a time. The vector of normals is added after the end of the current normals list.
 
void addNormals (const N *norms, std::size_t amt)
 Add an array of normals to the mesh. Because you are using a pointer to the array you also have to define the length of the array as an std::size_t (amt). The normals are added at the end of the current normals list.
 
void removeNormal (ofIndexType index)
 Remove a normal.
 
void removeNormals (ofIndexType startIndex, ofIndexType endIndex)
 Remove normal's from index to end index from normals vector.
 
void setNormal (ofIndexType index, const N &n)
 
void clearNormals ()
 Remove all the normals.
 
std::size_t getNumNormals () const
 This will tell you how many normals are contained in the mesh.
 
N * getNormalsPointer ()
 
const N * getNormalsPointer () const
 
std::vector< N > & getNormals ()
 
const std::vector< N > & getNormals () const
 
bool hasNormals () const
 /returnsWhether the mesh has any normals.
 
virtual void enableNormals ()
 Enable mesh normals. Use disableNormals() to turn normals off. Normals are enabled by default when they are added to the mesh.
 
virtual void disableNormals ()
 Disable mesh normals. Use enableNormals() to turn normals back on.
 
virtual bool usingNormals () const
 
void smoothNormals (float angle)
 
void flatNormals ()
 Duplicates vertices and updates normals to get a low-poly look.
 
Faces
ofMeshFace_< V, N, C, T > getFace (ofIndexType faceId) const
 
std::vector< N > getFaceNormals (bool perVetex=false) const
 Get normals for each face As a default it only calculates the normal for the face as a whole but by setting (perVertex = true) it will return the same normal value for each of the three vertices making up a face.
 
const std::vector< ofMeshFace_< V, N, C, T > > & getUniqueFaces () const
 
Colors
getColor (ofIndexType i) const
 Get the color at the index in the colors vector.
 
void addColor (const C &c)
 This adds a color to the mesh, the color will be associated with the vertex in the same position.
 
void addColors (const std::vector< C > &cols)
 This adds colors using a reference to a vector of ofColors. For each color in the vector, this will put the colors at the corresponding vertex.
 
void addColors (const C *cols, std::size_t amt)
 This adds a pointer of colors to the ofMesh instance with the amount passed as the second parameter.
 
void removeColor (ofIndexType index)
 Remove a color at the index in the colors vector.
 
void removeColors (ofIndexType startIndex, ofIndexType endIndex)
 Remove colors at the index to the end index of the colors vector.
 
void setColor (ofIndexType index, const C &c)
 Set the color at the index in the colors vector.
 
void clearColors ()
 Clear all the colors.
 
std::size_t getNumColors () const
 
C * getColorsPointer ()
 
const C * getColorsPointer () const
 
std::vector< C > & getColors ()
 
const std::vector< C > & getColors () const
 
bool hasColors () const
 /returns Whether the mesh has any colors.
 
virtual void enableColors ()
 Enable mesh colors. Use disableColors() to turn colors off. Colors are enabled by default when they are added to the mesh.
 
virtual void disableColors ()
 Disable mesh colors. Use enableColors() to turn colors back on.
 
virtual bool usingColors () const
 
Texture Coordinates
getTexCoord (ofIndexType i) const
 
void addTexCoord (const T &t)
 Add a Vec2f representing the texture coordinate. Because OF uses ARB textures these are in pixels rather than 0-1 normalized coordinates.
 
void addTexCoords (const std::vector< T > &tCoords)
 Add a vector of texture coordinates to a mesh, allowing you to push out many at once rather than adding one at a time. The vector of texture coordinates is added after the end of the current texture coordinates list.
 
void addTexCoords (const T *tCoords, std::size_t amt)
 Add an array of texture coordinates to the mesh. Because you are using a pointer to the array you also have to define the length of the array as an std::size_t (amt). The texture coordinates are added at the end of the current texture coordinates list.
 
void removeTexCoord (ofIndexType index)
 Remove a Vec2f representing the texture coordinate.
 
void removeTexCoords (ofIndexType startIndex, ofIndexType endIndex)
 
void setTexCoord (ofIndexType index, const T &t)
 
void clearTexCoords ()
 Clear all the texture coordinates.
 
std::size_t getNumTexCoords () const
 This will tell you how many texture coordinates are contained in the mesh.
 
T * getTexCoordsPointer ()
 
const T * getTexCoordsPointer () const
 Get a pointer to the glm::vec2 texture coordinates that the mesh contains.
 
std::vector< T > & getTexCoords ()
 Get a vector representing the texture coordinates of the mesh Because OF uses ARB textures these are in pixels rather than 0-1 normalized coordinates. Use this if you plan to change the texture coordinates as part of this call as it will force a reset of the cache.
 
const std::vector< T > & getTexCoords () const
 
bool hasTexCoords () const
 /returns Whether the mesh has any textures assigned to it.
 
virtual void enableTextures ()
 Enable mesh textures. Use disableTextures() to turn textures off. Textures are enabled by default when they are added to the mesh.
 
virtual void disableTextures ()
 Disable mesh textures. Use enableTextures() to turn textures back on.
 
virtual bool usingTextures () const
 
Indices
void setupIndicesAuto ()
 Allow you to set up the indices automatically when you add a vertex.
 
std::vector< ofIndexType > & getIndices ()
 Use this if you plan to change the indices as part of this call as it will force a reset of the cache.
 
ofIndexType getIndex (ofIndexType i) const
 
void addIndex (ofIndexType i)
 
void addIndices (const std::vector< ofIndexType > &inds)
 This adds a vector of indices.
 
void addIndices (const ofIndexType *inds, std::size_t amt)
 This adds indices to the ofMesh by pointing to an array of indices. The "amt" defines the length of the array.
 
void removeIndex (ofIndexType index)
 Removes an index.
 
void removeIndices (ofIndexType startIndex, ofIndexType endIndex)
 
void setIndex (ofIndexType index, ofIndexType val)
 This sets the index at i.
 
void clearIndices ()
 Remove all the indices of the mesh. This means that your mesh will be a point cloud.
 
std::size_t getNumIndices () const
 This will tell you how many indices are contained in the mesh.
 
ofIndexTypegetIndexPointer ()
 
const ofIndexTypegetIndexPointer () const
 
const std::vector< ofIndexType > & getIndices () const
 
bool hasIndices () const
 /returns Whether the mesh has any indices assigned to it.
 
void addTriangle (ofIndexType index1, ofIndexType index2, ofIndexType index3)
 Adding a triangle means using three of the vertices that have already been added to create a triangle. This is an easy way to create triangles in the mesh. The indices refer to the index of the vertex in the vector of vertices.
 
virtual void enableIndices ()
 Enable mesh indices. Use disableIndices() to turn indices off. Indices are enabled by default when they are added to the mesh.
 
virtual void disableIndices ()
 Disable mesh indices. Use enableIndices() to turn indices back on.
 
virtual bool usingIndices () const
 
void setColorForIndices (ofIndexType startIndex, ofIndexType endIndex, C color)
 
ofMesh_< V, N, C, T > getMeshForIndices (ofIndexType startIndex, ofIndexType endIndex) const
 
ofMesh_< V, N, C, T > getMeshForIndices (ofIndexType startIndex, ofIndexType endIndex, ofIndexType startVertIndex, ofIndexType endVertIndex) const
 
Drawing
void drawVertices () const
 This allows you draw just the vertices, meaning that you'll have a point cloud.
 
void drawWireframe () const
 This draws the mesh as GL_LINES, meaning that you'll have a wireframe.
 
void drawFaces () const
 This draws the mesh as faces, meaning that you'll have a collection of faces.
 
void draw () const
 This draws the mesh using its primitive type, meaning that if you set them up to be triangles, this will draw the triangles.
 
virtual void draw (ofPolyRenderMode renderType) const
 This draws the mesh using a defined renderType, overriding the renderType defined with setMode().
 
Saving and loading
void load (const of::filesystem::path &path)
 Loads a mesh from a file located at the provided path into the mesh. This will replace any existing data within the mesh.
 
void save (const of::filesystem::path &path, bool useBinary=false) const
 Saves the mesh at the passed path in the PLY Format.
 

Static Public Member Functions

Primitive constructor helper methods
static ofMesh_ plane (float width, float height, int columns=2, int rows=2, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)
 
static ofMesh_ sphere (float radius, int res=12, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)
 
static ofMesh_ icosahedron (float radius)
 
static ofMesh_ icosphere (float radius, std::size_t iterations=2)
 
static ofMesh_ cylinder (float radius, float height, int radiusSegments=12, int heightSegments=6, int numCapSegments=2, bool bCapped=true, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)
 A helper method that returns a cylinder made of triangles. The resolution settings for the radius, height, and cap are optional (they are set at a default of 12 segments around the radius, 6 segments in the height, and 2 on the cap). You have the option to cap the cylinder or not. The only valid modes are the default OF_PRIMITIVE_TRIANGLE_STRIP and OF_PRIMITIVE_TRIANGLES.
 
static ofMesh_ cone (float radius, float height, int radiusSegments=12, int heightSegments=6, int capSegments=2, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)
 A helper method that returns a cone made of triangles. The resolution settings for the radius, height, and cap are optional (they are set at a default of 12 segments around the radius, 6 segments in the height, and 2 on the cap). The only valid modes are the default OF_PRIMITIVE_TRIANGLE_STRIP and OF_PRIMITIVE_TRIANGLES.
 
static ofMesh_ box (float width, float height, float depth, int resX=2, int resY=2, int resZ=2)
 A helper method that returns a box made of triangles. The resolution settings for the width and height are optional (they are both set at a default of 2 triangles per side).
 
static ofMesh_ axis (float size=1.0)
 Returns an ofMesh representing an XYZ coordinate system.
 

Protected Member Functions

bool haveVertsChanged ()
 
bool haveNormalsChanged ()
 
bool haveColorsChanged ()
 
bool haveTexCoordsChanged ()
 
bool haveIndicesChanged ()
 

Detailed Description

template<class V, class N, class C, class T>
class ofMesh_< V, N, C, T >

Represents a set of vertices in 3D spaces with normals, colors, and texture coordinates at those points.

Each of these different properties is stored in a vector. Vertices are passed to your graphics card and your graphics card fill in the spaces in between them in a processing usually called the rendering pipeline. The rendering pipeline goes more or less like this:

  1. Say how you're going to connect all the points.
  2. Make some points.
  3. Say that you're done making points.

You may be thinking: I'll just make eight vertices and voila: a cube. Not so quick. There's a hitch and that hitch is that the OpenGL renderer has different ways of connecting the vertices that you pass to it and none are as efficient as to only need eight vertices to create a cube.

You've probably seen a version of the following image somewhere before. PRIMATIVES Generally you have to create your points to fit the drawing mode that you've selected because of whats called winding. A vertex gets connected to another vertex in the order that the mode does its winding and this means that you might need multiple vertices in a given location to create the shape you want. The cube, for example, requires eighteen vertices, not the eight that you would expect. If you note the order of vertices in the GL chart above you'll see that all of them use their vertices slightly differently (in particular you should make note of the GL_TRIANGLE_STRIP example). Drawing a shape requires that you keep track of which drawing mode is being used and which order your vertices are declared in.

If you're thinking: it would be nice if there were an abstraction layer for this you're thinking right. Enter the mesh, which is really just an abstraction of the vertex and drawing mode that we started with but which has the added bonus of managing the draw order for you. That may seem insignificant at first, but it provides some real benefits when working with complex geometry.

A very typical usage is something like the following:

ofMesh mesh;
for (int y = 0; y < height; y++){
for (int x = 0; x<width; x++){
mesh.addVertex(glm::vec3(x,y,0)); // make a new vertex
mesh.addColor(ofFloatColor(0,0,0)); // add a color at that vertex
}
}
void addVertex(const V &v)
Add a new vertex at the end of the current list of vertices. It is important to remember that the ord...
Definition ofMesh.inl:184
void addColor(const C &c)
This adds a color to the mesh, the color will be associated with the vertex in the same position.
Definition ofMesh.inl:214
unsigned int height
Definition ofAppEGLWindow.cpp:125
unsigned int width
Definition ofAppEGLWindow.cpp:124
ofColor_< float > ofFloatColor
A typedef representing a floating (float) point RGBA color.
Definition ofLight.h:18

Now it's important to make sure that each vertex is correctly connected with the other vertices around it. This is done using indices, which you can set up like so:

for (int y = 0; y<height-1; y++){
for (int x=0; x<width-1; x++){
mesh.addIndex(x+y*width); // 0
mesh.addIndex((x+1)+y*width); // 1
mesh.addIndex(x+(y+1)*width); // 10
mesh.addIndex((x+1)+y*width); // 1
mesh.addIndex((x+1)+(y+1)*width); // 11
mesh.addIndex(x+(y+1)*width); // 10
}
}
void addIndex(ofIndexType i)
Definition ofMesh.inl:313

Member Typedef Documentation

◆ ColorType

template<class V , class N , class C , class T >
using ofMesh_< V, N, C, T >::ColorType = C

◆ NormalType

template<class V , class N , class C , class T >
using ofMesh_< V, N, C, T >::NormalType = N

◆ TexCoordType

template<class V , class N , class C , class T >
using ofMesh_< V, N, C, T >::TexCoordType = T

◆ VertexType

template<class V , class N , class C , class T >
using ofMesh_< V, N, C, T >::VertexType = V

Constructor & Destructor Documentation

◆ ofMesh_() [1/2]

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T >::ofMesh_ ( )

This creates the mesh, using OF_PRIMITIVE_TRIANGLES without any initial vertices.

◆ ofMesh_() [2/2]

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T >::ofMesh_ ( ofPrimitiveMode  mode,
const std::vector< V > &  verts 
)

This allows to you to use one of the other ofPrimitiveModes: OF_PRIMITIVE_TRIANGLES, OF_PRIMITIVE_TRIANGLE_STRIP, OF_PRIMITIVE_TRIANGLE_FAN, OF_PRIMITIVE_LINES, OF_PRIMITIVE_LINE_STRIP, OF_PRIMITIVE_LINE_LOOP, OF_PRIMITIVE_POINTS. See ofGLUtils for more information on these types.

◆ ~ofMesh_()

template<class V , class N , class C , class T >
virtual ofMesh_< V, N, C, T >::~ofMesh_ ( )
inlinevirtual

Member Function Documentation

◆ addColor()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addColor ( const C &  c)

This adds a color to the mesh, the color will be associated with the vertex in the same position.

◆ addColors() [1/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addColors ( const C *  cols,
std::size_t  amt 
)

This adds a pointer of colors to the ofMesh instance with the amount passed as the second parameter.

◆ addColors() [2/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addColors ( const std::vector< C > &  cols)

This adds colors using a reference to a vector of ofColors. For each color in the vector, this will put the colors at the corresponding vertex.

◆ addIndex()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addIndex ( ofIndexType  i)

Add an index to the index vector. Each index represents the order of connection for vertices. This determines the way that the vertices are connected according to the polygon type set in the primitiveMode. It important to note that a particular vertex might be used for several faces and so would be referenced several times in the index vector.

ofMesh mesh;
mesh.addVertex(glm::vec3(0,-200,0));
mesh.addVertex(glm::vec3(200, 0, 0 ));
mesh.addVertex(glm::vec3(-200, 0, 0 ));
mesh.addVertex(glm::vec3(0, 200, 0 ));
mesh.addIndex(0); //connect the first vertex we made, v0
mesh.addIndex(1); //to v1
mesh.addIndex(2); //to v2 to complete the face
mesh.addIndex(1); //now start a new face beginning with v1
mesh.addIndex(2); //that is connected to v2
mesh.addIndex(3); //and we complete the face with v3
void setMode(ofPrimitiveMode mode)
Allows you to set the ofPrimitiveMode. The available modes are OF_PRIMITIVE_TRIANGLES,...
Definition ofMesh.inl:803
@ OF_PRIMITIVE_TRIANGLES
Definition ofGraphicsConstants.h:21

Will give you this shape: image of basic use of indices

◆ addIndices() [1/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addIndices ( const ofIndexType inds,
std::size_t  amt 
)

This adds indices to the ofMesh by pointing to an array of indices. The "amt" defines the length of the array.

◆ addIndices() [2/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addIndices ( const std::vector< ofIndexType > &  inds)

This adds a vector of indices.

◆ addNormal()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addNormal ( const N &  n)

Add a normal to the mesh as a 3D vector, typically perpendicular to the plane of the face. A normal is a vector that defines how a surface responds to lighting, i.e. how it is lit. The amount of light reflected by a surface is proportional to the angle between the light's direction and the normal. The smaller the angle the brighter the surface will look. See the normalsExample for advice on computing the normals. addNormal adds the 3D vector to the end of the list, so you need to make sure you add normals at the same index of the matching vertex.

◆ addNormals() [1/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addNormals ( const N *  norms,
std::size_t  amt 
)

Add an array of normals to the mesh. Because you are using a pointer to the array you also have to define the length of the array as an std::size_t (amt). The normals are added at the end of the current normals list.

◆ addNormals() [2/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addNormals ( const std::vector< N > &  norms)

Add a vector of normals to a mesh, allowing you to push out many normals at once rather than adding one at a time. The vector of normals is added after the end of the current normals list.

◆ addTexCoord()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addTexCoord ( const T &  t)

Add a Vec2f representing the texture coordinate. Because OF uses ARB textures these are in pixels rather than 0-1 normalized coordinates.

◆ addTexCoords() [1/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addTexCoords ( const std::vector< T > &  tCoords)

Add a vector of texture coordinates to a mesh, allowing you to push out many at once rather than adding one at a time. The vector of texture coordinates is added after the end of the current texture coordinates list.

◆ addTexCoords() [2/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addTexCoords ( const T *  tCoords,
std::size_t  amt 
)

Add an array of texture coordinates to the mesh. Because you are using a pointer to the array you also have to define the length of the array as an std::size_t (amt). The texture coordinates are added at the end of the current texture coordinates list.

◆ addTriangle()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addTriangle ( ofIndexType  index1,
ofIndexType  index2,
ofIndexType  index3 
)

Adding a triangle means using three of the vertices that have already been added to create a triangle. This is an easy way to create triangles in the mesh. The indices refer to the index of the vertex in the vector of vertices.

◆ addVertex()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addVertex ( const V &  v)

Add a new vertex at the end of the current list of vertices. It is important to remember that the order the vertices are added to the list determines how they link they form the polygons and strips (assuming you do not change their indeces). See the ofMesh class description for details.

◆ addVertices() [1/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addVertices ( const std::vector< V > &  verts)

Add a vector of vertices to a mesh, allowing you to push out many at once rather than adding one at a time. The vector of vertices is added after the end of the current vertices list.

◆ addVertices() [2/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::addVertices ( const V *  verts,
std::size_t  amt 
)

Add an array of vertices to the mesh. Because you are using a pointer to the array you also have to define the length of the array as an int (amt). The vertices are added at the end of the current vertices list.

◆ append()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::append ( const ofMesh_< V, N, C, T > &  mesh)

Add the vertices, normals, texture coordinates and indices of one mesh onto another mesh. Everything from the referenced mesh is simply added at the end of the current mesh's lists.

◆ axis()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::axis ( float  size = 1.0)
static

Returns an ofMesh representing an XYZ coordinate system.

Returns
an ofMesh representing an XYZ coordinate system.

◆ box()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::box ( float  width,
float  height,
float  depth,
int  resX = 2,
int  resY = 2,
int  resZ = 2 
)
static

A helper method that returns a box made of triangles. The resolution settings for the width and height are optional (they are both set at a default of 2 triangles per side).

ofMesh mesh;
mesh = ofMesh::box(200.0, 200.0, 200.0);
static ofMesh_ box(float width, float height, float depth, int resX=2, int resY=2, int resZ=2)
A helper method that returns a box made of triangles. The resolution settings for the width and heigh...
Definition ofMesh.inl:2671

image of a simple box

◆ clear()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::clear ( )

Removes all the vertices, colors, and indices from the mesh.

◆ clearColors()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::clearColors ( )

Clear all the colors.

◆ clearIndices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::clearIndices ( )

Remove all the indices of the mesh. This means that your mesh will be a point cloud.

◆ clearNormals()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::clearNormals ( )

Remove all the normals.

◆ clearTexCoords()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::clearTexCoords ( )

Clear all the texture coordinates.

◆ clearVertices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::clearVertices ( )

Removes all the vertices.

◆ cone()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::cone ( float  radius,
float  height,
int  radiusSegments = 12,
int  heightSegments = 6,
int  capSegments = 2,
ofPrimitiveMode  mode = OF_PRIMITIVE_TRIANGLE_STRIP 
)
static

A helper method that returns a cone made of triangles. The resolution settings for the radius, height, and cap are optional (they are set at a default of 12 segments around the radius, 6 segments in the height, and 2 on the cap). The only valid modes are the default OF_PRIMITIVE_TRIANGLE_STRIP and OF_PRIMITIVE_TRIANGLES.

ofMesh mesh;
mesh = ofMesh::cone(100.0, 200.0);
static ofMesh_ cone(float radius, float height, int radiusSegments=12, int heightSegments=6, int capSegments=2, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)
A helper method that returns a cone made of triangles. The resolution settings for the radius,...
Definition ofMesh.inl:2521

image of a simple cone

◆ cylinder()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::cylinder ( float  radius,
float  height,
int  radiusSegments = 12,
int  heightSegments = 6,
int  numCapSegments = 2,
bool  bCapped = true,
ofPrimitiveMode  mode = OF_PRIMITIVE_TRIANGLE_STRIP 
)
static

A helper method that returns a cylinder made of triangles. The resolution settings for the radius, height, and cap are optional (they are set at a default of 12 segments around the radius, 6 segments in the height, and 2 on the cap). You have the option to cap the cylinder or not. The only valid modes are the default OF_PRIMITIVE_TRIANGLE_STRIP and OF_PRIMITIVE_TRIANGLES.

ofMesh mesh;
mesh = ofMesh::cylinder(100.0, 200.0);
static ofMesh_ cylinder(float radius, float height, int radiusSegments=12, int heightSegments=6, int numCapSegments=2, bool bCapped=true, ofPrimitiveMode mode=OF_PRIMITIVE_TRIANGLE_STRIP)
A helper method that returns a cylinder made of triangles. The resolution settings for the radius,...
Definition ofMesh.inl:2328

image of a simple cylinder

◆ disableColors()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::disableColors ( )
virtual

Disable mesh colors. Use enableColors() to turn colors back on.

Reimplemented in ofVboMesh.

◆ disableIndices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::disableIndices ( )
virtual

Disable mesh indices. Use enableIndices() to turn indices back on.

Reimplemented in ofVboMesh.

◆ disableNormals()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::disableNormals ( )
virtual

Disable mesh normals. Use enableNormals() to turn normals back on.

Reimplemented in ofVboMesh.

◆ disableTextures()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::disableTextures ( )
virtual

Disable mesh textures. Use enableTextures() to turn textures back on.

Reimplemented in ofVboMesh.

◆ draw() [1/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::draw ( ) const

This draws the mesh using its primitive type, meaning that if you set them up to be triangles, this will draw the triangles.

◆ draw() [2/2]

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::draw ( ofPolyRenderMode  renderType) const
virtual

This draws the mesh using a defined renderType, overriding the renderType defined with setMode().

Reimplemented in ofVboMesh.

◆ drawFaces()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::drawFaces ( ) const

This draws the mesh as faces, meaning that you'll have a collection of faces.

◆ drawVertices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::drawVertices ( ) const

This allows you draw just the vertices, meaning that you'll have a point cloud.

◆ drawWireframe()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::drawWireframe ( ) const

This draws the mesh as GL_LINES, meaning that you'll have a wireframe.

◆ enableColors()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::enableColors ( )
virtual

Enable mesh colors. Use disableColors() to turn colors off. Colors are enabled by default when they are added to the mesh.

Reimplemented in ofVboMesh.

◆ enableIndices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::enableIndices ( )
virtual

Enable mesh indices. Use disableIndices() to turn indices off. Indices are enabled by default when they are added to the mesh.

Reimplemented in ofVboMesh.

◆ enableNormals()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::enableNormals ( )
virtual

Enable mesh normals. Use disableNormals() to turn normals off. Normals are enabled by default when they are added to the mesh.

Reimplemented in ofVboMesh.

◆ enableTextures()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::enableTextures ( )
virtual

Enable mesh textures. Use disableTextures() to turn textures off. Textures are enabled by default when they are added to the mesh.

Reimplemented in ofVboMesh.

◆ flatNormals()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::flatNormals ( )

Duplicates vertices and updates normals to get a low-poly look.

◆ getCentroid()

template<class V , class N , class C , class T >
V ofMesh_< V, N, C, T >::getCentroid ( ) const
Returns
a glm::vec3 defining the centroid of all the vetices in the mesh.

◆ getColor()

template<class V , class N , class C , class T >
C ofMesh_< V, N, C, T >::getColor ( ofIndexType  i) const

Get the color at the index in the colors vector.

Returns
the color at the index in the colors vector.

◆ getColors() [1/2]

template<class V , class N , class C , class T >
std::vector< C > & ofMesh_< V, N, C, T >::getColors ( )

Use this if you plan to change the colors as part of this call as it will force a reset of the cache.

Returns
the vector that contains all of the colors of the mesh, if it has any.

◆ getColors() [2/2]

template<class V , class N , class C , class T >
const std::vector< C > & ofMesh_< V, N, C, T >::getColors ( ) const
Returns
the vector that contains all of the colors of the mesh, if it has any. (read only)

◆ getColorsPointer() [1/2]

template<class V , class N , class C , class T >
C * ofMesh_< V, N, C, T >::getColorsPointer ( )

Use this if you plan to change the colors as part of this call as it will force a reset of the cache.

Returns
a pointer that contains all of the colors of the mesh, if it has any.

◆ getColorsPointer() [2/2]

template<class V , class N , class C , class T >
const C * ofMesh_< V, N, C, T >::getColorsPointer ( ) const
Returns
a pointer that contains all of the colors of the mesh, if it has any. (read only)

◆ getFace()

template<class V , class N , class C , class T >
ofMeshFace_< V, N, C, T > ofMesh_< V, N, C, T >::getFace ( ofIndexType  faceId) const
Returns
the vector that contains all of the faces of the mesh. This isn't currently implemented.

◆ getFaceNormals()

template<class V , class N , class C , class T >
std::vector< N > ofMesh_< V, N, C, T >::getFaceNormals ( bool  perVetex = false) const

Get normals for each face As a default it only calculates the normal for the face as a whole but by setting (perVertex = true) it will return the same normal value for each of the three vertices making up a face.

Returns
a vector containing the calculated normals of each face in the mesh.

◆ getIndex()

template<class V , class N , class C , class T >
ofIndexType ofMesh_< V, N, C, T >::getIndex ( ofIndexType  i) const
Returns
the index from the index vector. Each index represents the index of the vertex in the vertices vector. This determines the way that the vertices are connected into the polgoynon type set in the primitiveMode.

◆ getIndexPointer() [1/2]

template<class V , class N , class C , class T >
ofIndexType * ofMesh_< V, N, C, T >::getIndexPointer ( )
Returns
a pointer to the indices that the mesh contains.

◆ getIndexPointer() [2/2]

template<class V , class N , class C , class T >
const ofIndexType * ofMesh_< V, N, C, T >::getIndexPointer ( ) const
Returns
a pointer to the indices that the mesh contains.

◆ getIndices() [1/2]

template<class V , class N , class C , class T >
std::vector< ofIndexType > & ofMesh_< V, N, C, T >::getIndices ( )

Use this if you plan to change the indices as part of this call as it will force a reset of the cache.

Returns
the vector that contains all of the indices of the mesh, if it has any.

◆ getIndices() [2/2]

template<class V , class N , class C , class T >
const std::vector< ofIndexType > & ofMesh_< V, N, C, T >::getIndices ( ) const
Returns
the vector that contains all of the indices of the mesh, if it has any. (read only)

◆ getMeshForIndices() [1/2]

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::getMeshForIndices ( ofIndexType  startIndex,
ofIndexType  endIndex 
) const

The new mesh includes the mesh mode, colors, textures, and normals of the original mesh (assuming any were added).

Returns
a mesh made up of a range of indices from startIndex to the endIndex.

◆ getMeshForIndices() [2/2]

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::getMeshForIndices ( ofIndexType  startIndex,
ofIndexType  endIndex,
ofIndexType  startVertIndex,
ofIndexType  endVertIndex 
) const

◆ getMode()

template<class V , class N , class C , class T >
ofPrimitiveMode ofMesh_< V, N, C, T >::getMode ( ) const

\returns the primitive mode that the mesh is using.

◆ getNormal()

template<class V , class N , class C , class T >
N ofMesh_< V, N, C, T >::getNormal ( ofIndexType  i) const

\returns the normal at the index in the normals vector.

◆ getNormals() [1/2]

template<class V , class N , class C , class T >
std::vector< N > & ofMesh_< V, N, C, T >::getNormals ( )

Use this if you plan to change the normals as part of this call as it will force a reset of the cache.

Returns
the vector that contains all of the normals of the mesh, if it has any.

◆ getNormals() [2/2]

template<class V , class N , class C , class T >
const std::vector< N > & ofMesh_< V, N, C, T >::getNormals ( ) const
Returns
the vector that contains all of the normals of the mesh, if it has any. (read only)

◆ getNormalsPointer() [1/2]

template<class V , class N , class C , class T >
N * ofMesh_< V, N, C, T >::getNormalsPointer ( )
Returns
a pointer to the normals that the mesh contains.

◆ getNormalsPointer() [2/2]

template<class V , class N , class C , class T >
const N * ofMesh_< V, N, C, T >::getNormalsPointer ( ) const
Returns
a pointer to the normals that the mesh contains.

◆ getNumColors()

template<class V , class N , class C , class T >
std::size_t ofMesh_< V, N, C, T >::getNumColors ( ) const
Returns
the size of the colors vector for the mesh. This will tell you how many colors are contained in the mesh.

◆ getNumIndices()

template<class V , class N , class C , class T >
std::size_t ofMesh_< V, N, C, T >::getNumIndices ( ) const

This will tell you how many indices are contained in the mesh.

Returns
the size of the indices vector for the mesh.

◆ getNumNormals()

template<class V , class N , class C , class T >
std::size_t ofMesh_< V, N, C, T >::getNumNormals ( ) const

This will tell you how many normals are contained in the mesh.

Returns
the size of the normals vector for the mesh.

◆ getNumTexCoords()

template<class V , class N , class C , class T >
std::size_t ofMesh_< V, N, C, T >::getNumTexCoords ( ) const

This will tell you how many texture coordinates are contained in the mesh.

Returns
the size of the texture coordinates vector for the mesh.

◆ getNumVertices()

template<class V , class N , class C , class T >
std::size_t ofMesh_< V, N, C, T >::getNumVertices ( ) const
Returns
the size of the vertices vector for the mesh. This will tell you how many vertices are contained in the mesh.

◆ getTexCoord()

template<class V , class N , class C , class T >
T ofMesh_< V, N, C, T >::getTexCoord ( ofIndexType  i) const
Returns
the Vec2f representing the texture coordinate. Because OF uses ARB textures these are in pixels rather than 0-1 normalized coordinates.

◆ getTexCoords() [1/2]

template<class V , class N , class C , class T >
std::vector< T > & ofMesh_< V, N, C, T >::getTexCoords ( )

Get a vector representing the texture coordinates of the mesh Because OF uses ARB textures these are in pixels rather than 0-1 normalized coordinates. Use this if you plan to change the texture coordinates as part of this call as it will force a reset of the cache.

Returns
a vector of Vec2f representing the texture coordinates for the whole mesh.

◆ getTexCoords() [2/2]

template<class V , class N , class C , class T >
const std::vector< T > & ofMesh_< V, N, C, T >::getTexCoords ( ) const

Because OF uses ARB textures these are in pixels rather than 0-1 normalized coordinates.

Returns
a vector of Vec2f representing the texture coordinates for the whole mesh. (read only)

◆ getTexCoordsPointer() [1/2]

template<class V , class N , class C , class T >
T * ofMesh_< V, N, C, T >::getTexCoordsPointer ( )
Returns
a pointer to the texture coords that the mesh contains.

◆ getTexCoordsPointer() [2/2]

template<class V , class N , class C , class T >
const T * ofMesh_< V, N, C, T >::getTexCoordsPointer ( ) const

Get a pointer to the glm::vec2 texture coordinates that the mesh contains.

◆ getUniqueFaces()

template<class V , class N , class C , class T >
const std::vector< ofMeshFace_< V, N, C, T > > & ofMesh_< V, N, C, T >::getUniqueFaces ( ) const
Returns
the mesh as a vector of unique ofMeshFace_s a list of triangles that do not share vertices or indices

◆ getVertex()

template<class V , class N , class C , class T >
V ofMesh_< V, N, C, T >::getVertex ( ofIndexType  i) const
Returns
the vertex at the index.

◆ getVertices() [1/2]

template<class V , class N , class C , class T >
std::vector< V > & ofMesh_< V, N, C, T >::getVertices ( )
Returns
the vector that contains all of the vertices of the mesh.

◆ getVertices() [2/2]

template<class V , class N , class C , class T >
const std::vector< V > & ofMesh_< V, N, C, T >::getVertices ( ) const
Returns
the vector that contains all of the vertices of the mesh.

◆ getVerticesPointer() [1/2]

template<class V , class N , class C , class T >
V * ofMesh_< V, N, C, T >::getVerticesPointer ( )
Returns
a pointer to the vertices that the mesh contains.

◆ getVerticesPointer() [2/2]

template<class V , class N , class C , class T >
const V * ofMesh_< V, N, C, T >::getVerticesPointer ( ) const
Returns
a pointer to the vertices that the mesh contains.

◆ hasColors()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::hasColors ( ) const

/returns Whether the mesh has any colors.

◆ hasIndices()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::hasIndices ( ) const

/returns Whether the mesh has any indices assigned to it.

◆ hasNormals()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::hasNormals ( ) const

/returnsWhether the mesh has any normals.

◆ hasTexCoords()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::hasTexCoords ( ) const

/returns Whether the mesh has any textures assigned to it.

◆ hasVertices()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::hasVertices ( ) const
Returns
Whether the mesh has any vertices.

◆ haveColorsChanged()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::haveColorsChanged ( )
protected
Returns
If the colors of the mesh have changed, been added or removed.

◆ haveIndicesChanged()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::haveIndicesChanged ( )
protected
Returns
If the indices of the mesh have changed, been added or removed.

◆ haveNormalsChanged()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::haveNormalsChanged ( )
protected
Returns
If the normals of the mesh have changed, been added or removed.

◆ haveTexCoordsChanged()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::haveTexCoordsChanged ( )
protected
Returns
If the texture coords of the mesh have changed, been added or removed.

◆ haveVertsChanged()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::haveVertsChanged ( )
protected
Returns
If the vertices of the mesh have changed, been added or removed.

◆ icosahedron()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::icosahedron ( float  radius)
static

◆ icosphere()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::icosphere ( float  radius,
std::size_t  iterations = 2 
)
static

Step 1 : Generate icosahedron

Step 2 : tessellate

Step 3 : generate texcoords

Step 4 : fix texcoords

◆ load()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::load ( const of::filesystem::path &  path)

Loads a mesh from a file located at the provided path into the mesh. This will replace any existing data within the mesh.

It expects that the file will be in the PLY Format. It will only load meshes saved in the PLY ASCII format; the binary format is not supported.

flag to distinguish between uchar (more common) and float (less common) color format in ply file

◆ mergeDuplicateVertices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::mergeDuplicateVertices ( )

◆ plane()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::plane ( float  width,
float  height,
int  columns = 2,
int  rows = 2,
ofPrimitiveMode  mode = OF_PRIMITIVE_TRIANGLE_STRIP 
)
static

◆ removeColor()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeColor ( ofIndexType  index)

Remove a color at the index in the colors vector.

◆ removeColors()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeColors ( ofIndexType  startIndex,
ofIndexType  endIndex 
)

Remove colors at the index to the end index of the colors vector.

◆ removeIndex()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeIndex ( ofIndexType  index)

Removes an index.

◆ removeIndices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeIndices ( ofIndexType  startIndex,
ofIndexType  endIndex 
)

◆ removeNormal()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeNormal ( ofIndexType  index)

Remove a normal.

◆ removeNormals()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeNormals ( ofIndexType  startIndex,
ofIndexType  endIndex 
)

Remove normal's from index to end index from normals vector.

◆ removeTexCoord()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeTexCoord ( ofIndexType  index)

Remove a Vec2f representing the texture coordinate.

◆ removeTexCoords()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeTexCoords ( ofIndexType  startIndex,
ofIndexType  endIndex 
)

◆ removeVertex()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeVertex ( ofIndexType  index)

Removes the vertex at the index in the vector.

◆ removeVertices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::removeVertices ( ofIndexType  startIndex,
ofIndexType  endIndex 
)

Removes the vertices at the startIndex in the vector and the endindex specified.

◆ save()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::save ( const of::filesystem::path &  path,
bool  useBinary = false 
) const

Saves the mesh at the passed path in the PLY Format.

There are two format options for PLY: a binary format and an ASCII format. By default, it will save using the ASCII format. Passing true into the useBinary parameter will save it in the binary format.

If you're planning on reloading the mesh into ofMesh, ofMesh currently only supports loading the ASCII format.

For more information, see the PLY format specification.

◆ setColor()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setColor ( ofIndexType  index,
const C &  c 
)

Set the color at the index in the colors vector.

◆ setColorForIndices()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setColorForIndices ( ofIndexType  startIndex,
ofIndexType  endIndex,
color 
)

◆ setFromTriangles()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setFromTriangles ( const std::vector< ofMeshFace_< V, N, C, T > > &  tris,
bool  bUseFaceNormal = false 
)

◆ setIndex()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setIndex ( ofIndexType  index,
ofIndexType  val 
)

This sets the index at i.

◆ setMode()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setMode ( ofPrimitiveMode  mode)

Allows you to set the ofPrimitiveMode. The available modes are OF_PRIMITIVE_TRIANGLES, OF_PRIMITIVE_TRIANGLE_STRIP, OF_PRIMITIVE_TRIANGLE_FAN, OF_PRIMITIVE_LINES, OF_PRIMITIVE_LINE_STRIP, OF_PRIMITIVE_LINE_LOOP, OF_PRIMITIVE_POINTS.

◆ setNormal()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setNormal ( ofIndexType  index,
const N &  n 
)
Todo:
Documentation.

◆ setTexCoord()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setTexCoord ( ofIndexType  index,
const T &  t 
)

◆ setupIndicesAuto()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setupIndicesAuto ( )

Allow you to set up the indices automatically when you add a vertex.

◆ setVertex()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::setVertex ( ofIndexType  index,
const V &  v 
)

◆ smoothNormals()

template<class V , class N , class C , class T >
void ofMesh_< V, N, C, T >::smoothNormals ( float  angle)

◆ sphere()

template<class V , class N , class C , class T >
ofMesh_< V, N, C, T > ofMesh_< V, N, C, T >::sphere ( float  radius,
int  res = 12,
ofPrimitiveMode  mode = OF_PRIMITIVE_TRIANGLE_STRIP 
)
static

◆ usingColors()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::usingColors ( ) const
virtual

Reimplemented in ofVboMesh.

◆ usingIndices()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::usingIndices ( ) const
virtual

Reimplemented in ofVboMesh.

◆ usingNormals()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::usingNormals ( ) const
virtual

Reimplemented in ofVboMesh.

◆ usingTextures()

template<class V , class N , class C , class T >
bool ofMesh_< V, N, C, T >::usingTextures ( ) const
virtual

Reimplemented in ofVboMesh.


The documentation for this class was generated from the following files:
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/3d/ofMesh.h
  • /Users/icq4ever/Desktop/oF0120/libs/openFrameworks/3d/ofMesh.inl