32 #ifndef Geometry_INCLUDE_ONCE 33 #define Geometry_INCLUDE_ONCE 110 u32 vert_count = (
u32)(vertexArray() ? vertexArray()->size() : 0);
115 if ( ! color_array ) {
118 if ( color_array->size() != vert_count ) {
119 color_array->resize(vert_count);
121 for(
u32 i = 0; i < color_array->size(); ++i ) {
122 color_array->at( i ) = color;
124 color_array->setBufferObjectDirty();
125 setBufferObjectDirty();
127 setColorArray(color_array.
get());
131 virtual void clearArrays(
bool clear_draw_calls=
true);
139 virtual void deleteBufferObject();
157 void computeNormals(
bool verbose=
false);
165 void fixTriangleWinding();
180 void convertDrawCallToDrawArrays();
187 void mergeDrawCallsWithPrimitiveRestart(
EPrimitiveType primitive_type);
190 void mergeDrawCallsWithMultiDrawElements(
EPrimitiveType primitive_type);
198 void triangulateDrawCalls();
203 void shrinkDrawCalls();
207 void makeGLESFriendly();
217 void regenerateVertices(
const std::vector<u32>& map_new_to_old);
220 void colorizePrimitives();
233 static void computeTangentSpace(
282 void setVertexAttribArray(
int attrib_location,
const ArrayAbstract* info);
284 const ArrayAbstract* vertexAttribArray(
int attrib_location)
const;
289 virtual void computeBounds_Implementation();
The ArrayAbstract class defines an abstract interface to conveniently manipulate data stored in a Buf...
Associates a Renderable object to an Effect and Transform.
Abstract interface to manipulate OpenGL's vertex attribute arrays.
const ArrayAbstract * vertexArray() const
Conventional vertex array.
Represents an OpenGL context, possibly a widget or a pbuffer, which can also respond to keyboard...
ArrayAbstract * normalArray()
Conventional normal array.
ArrayAbstract * texCoordArray(int tex_unit)
Conventional texture coords arrays.
void setColorArray(const fvec4 &color)
Fills the color array with the given color.
#define VL_INSTRUMENT_CLASS(ClassName, BaseClass)
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
const ArrayAbstract * colorArray() const
Conventional color array.
Visualization Library main namespace.
unsigned int u32
32 bits unsigned integer
An abstract class that represents all the objects that can be rendered.
ArrayAbstract * fogCoordArray()
Conventional fog array.
Manages most of the OpenGL rendering states responsible of the final aspect of the rendered objects...
#define VLGRAPHICS_EXPORT
ArrayAbstract * colorArray()
Conventional color array.
The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements.
It's basically an std::vector for Objects that is itself an Object so it can be reference counted and...
ArrayAbstract * vertexArray()
Conventional vertex array.
const Collection< DrawCall > & drawCalls() const
Returns the list of DrawCall objects bound to a Geometry.
const ArrayAbstract * secondaryColorArray() const
Conventional secondary color array.
ArrayAbstract * secondaryColorArray()
Conventional secondary color array.
The ref<> class is used to reference-count an Object.
const ArrayAbstract * texCoordArray(int tex_unit) const
Conventional texture coords arrays.
Represents a virtual camera defining, among other things, the point of view from which scenes can be ...
const ArrayAbstract * fogCoordArray() const
Conventional fog array.
Visualization Library's enums in the 'vl' namespace.
Collection< DrawCall > mDrawCalls
const ArrayAbstract * normalArray() const
Conventional normal array.
Collection< DrawCall > & drawCalls()
Returns the list of DrawCall objects bound to a Geometry.