45 std::set<EdgeExtractor::Edge>::iterator it = edges.find(e);
46 if (it != edges.end())
78 vl::Log::error(
"EdgeExtractor::extractEdges(geom): 'geom' must have a vertex array of type ArrayFloat3.\n");
85 for(
int iprim=0; iprim<geom->
drawCalls().size(); ++iprim)
94 if (a == b || b == c || c == a)
109 for(std::set<Edge>::iterator it = edges.begin(); it != edges.end(); ++it)
121 float a1 =
acos(cos1) /
fPi * 180.0f;
140 for(
unsigned i=0; i<
edges().size(); ++i)
142 vert_array->
at(i*2+0) =
edges()[i].vertex1();
143 vert_array->
at(i*2+1) =
edges()[i].vertex2();
146 int start =
edges().size()*2;
147 for(
unsigned i=0; i<
edges().size(); ++i)
150 vert_array->
at(start+i*2+0) = v;
151 vert_array->
at(start+i*2+1) = v +
edges()[i].normal1()*0.25f;
153 start =
edges().size()*4;
154 for(
unsigned i=0; i<
edges().size(); ++i)
157 vert_array->
at(start+i*2+0) = v;
158 vert_array->
at(start+i*2+1) = v +
edges()[i].normal2()*0.25f;
175 for(
int i=0; i<actors->
size(); ++i)
The ArrayAbstract class defines an abstract interface to conveniently manipulate data stored in a Buf...
Associates a Renderable object to an Effect and Transform.
bool hasNext()
Returns false if the iterator has reached the end of the triangle list.
const Renderable * lod(int lod_index) const
Returns the Renderable object representing the LOD level specifed by lod_index.
float clamp(float x, float minval, float maxval)
const T * at(int i) const
const Vector3 & normalize(T_Scalar *len=NULL)
Vector3< float > fvec3
A 3 components vector with float precision.
const ArrayAbstract * vertexArray() const
Conventional vertex array.
static void error(const String &message)
Use this function to provide information about run-time errors: file not found, out of memory...
void setVertexArray(ArrayAbstract *data)
Conventional vertex array.
virtual void extractVisibleActors(ActorCollection &list, const Camera *camera)=0
Extracts all the enabled and visible Actors contained in the ActorTree hierarchy and appends them to ...
fvec3 cross(const fvec3 &v1, const fvec3 &v2)
virtual vec3 getAsVec3(size_t vector_index) const =0
Returns a vector from the buffer as a vec3 value.
size_t size() const
Returns the number of elements of an array.
The Geometry class is a Renderable that implements a polygonal mesh made of polygons, lines and points.
Visualization Library main namespace.
const float fPi
Greek Pi constant using float precision.
float dot(float a, float b)
virtual TriangleIterator triangleIterator() const =0
Returns a TriangleIterator used to iterate through the triangles of a DrawCall.
The SceneManager class is the base class for all the scene managers.
Iterator used to extract the indices of every single triangle of a DrawCall regardless of the primiti...
The Rendering class collects all the information to perform the rendering of a scene.
T_VectorType & at(size_t i)
Defined as a simple subclass of Collection<Actor>, see Collection for more information.
The base class of DrawArrays, DrawElements, MultiDrawElements and DrawRangeElements.
The ref<> class is used to reference-count an Object.
Wraps the OpenGL function glDrawArrays().
void setBufferObjectEnabled(bool enabled)
Enable/disable BufferObject (vertex buffer object) (enabled by default).
Collection< SceneManager > * sceneManagers()
Returns the list of SceneManager[s] containing the Actor[s] to be rendered.
Collection< DrawCall > & drawCalls()
Returns the list of DrawCall objects bound to a Geometry.