32 #ifndef GeometryLoadCallback_INCLUDE_ONCE 33 #define GeometryLoadCallback_INCLUDE_ONCE 69 std::vector< vl::ref<vl::Geometry> > geom;
71 for(
unsigned int i=0; i<geom.size(); ++i)
74 geom[i]->setNormalArray(
NULL);
83 geom[i]->sortVertices();
89 geom[i]->convertDrawCallToDrawArrays();
98 geom[i]->makeGLESFriendly();
bool transformGeometry() const
Transforms the Geometries using transformMatrix().
void setUseDisplayLists(bool on)
Enable display lists usage (overrides BufferObjects)
Defines a set of actions to be executed to a Geometry as soon as it is loaded.
The TriangleStripGenerator class is used to substitute lists of triangles or quads with triangle stri...
Defines an operation to be exectued to a ResourceDatabase as soon as its loaded, see also LoadWriterM...
bool sortVertices() const
Sorts the mesh's vertices for better performances.
void setComputeNormals(bool cn)
Compute normals if not present.
void setConvertToDrawArrays(bool on)
Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true).
static void stripfy(Geometry *geom, int cache_size=22, bool merge_strips=true, bool remove_doubles=true, bool substitute_quads=true)
bool makeGLESFriendly() const
If true calls Geometry::makeGLESFriendly()
Removes from a Geometry the vertices with the same attributes.
void removeDoubles(Geometry *geom)
void setMakeGLESFriendly(bool on)
If true calls Geometry::makeGLESFriendly()
bool convertToDrawArrays() const
Converts the Geometry DrawCall into DrawArrays. Useful in conjuction with setStripfy(true).
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
bool mDiscardOriginalNormals
void setUseBufferObjects(bool on)
Enable BufferObject usage if display lists are disabled.
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
void operator()(ResourceDatabase *db)
Visualization Library main namespace.
void setTransformGeometry(bool on)
Transforms the Geometries using transformMatrix().
void setRemoveDoubles(bool rd)
Remove duplicated vertices.
bool useBufferObjects() const
Enable BufferObject usage if display lists are disabled.
const mat4 & transformMatrix() const
void get(std::vector< ref< T > > &resources, bool clear_vector=true)
Returns all the objects of the specified type in the given vector.
bool stripfy() const
Convert mesh into a set of triangle strips if possible.
void setSortVertices(bool on)
Sorts the mesh's vertices for better performances.
bool mConvertToDrawArrays
void setTransformMatrix(const mat4 &m)
void setDiscardOriginalNormals(bool on)
Discards the original normals.
void setStripfy(bool on)
Convert mesh into a set of triangle strips if possible.
bool discardOriginalNormals() const
Discards the original normals.
bool removeDoubles() const
Remove duplicated vertices.
bool useDisplayLists() const
Enable display lists usage (overrides BufferObjects)
The ResourceDatabase class contains and manipulates a set of resources.
bool computeNormals() const
Compute normals if not present.