Dear Jan,

Thank you for the reply.

When I set the color format as "PolyMesh::Color(0.0, 1.0, 0.0, 1.0)", the following error occurs:
    --> Assertion failed!, Program:..., File: ...\VectorT_inc.hh, Line: 97, Expression: DIM==4.

Here are some details about my application;
    1) I am working on quad mesh (not triangular mesh).
    2) The Openflipper version that I am using is "OpenFlipper v1.0RC7".
    3) Vertex coloring works well, here is the code;
          m_mesh->request_vertex_colors();
          m_mesh->set_color(m_mesh->vertex_handle(0), PolyMesh::Color(0, 255, 0));
          PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::POINTS_COLORED);
          emit updatedObject(m_targetObject->id(), UPDATE_COLOR);
    4) Vertex coloring using the color format as "PolyMesh::Color(0.0, 1.0, 0.0, 1.0)" ends with the same error (Assertion failed!).
    5) Edge coloring using the below code does not generate any error, but there is nothing seen in the Openflipper view. It seems that it is successfully set to the "POINTS_COLORED" drawmode, there is no model. When I set any other drawmode, model appears.
          m_mesh->request_edge_colors();
          m_mesh->set_color(m_mesh->edge_handle(0), PolyMesh::Color(0, 255, 0));
          PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
          emit updatedObject(m_targetObject->id(), UPDATE_COLOR);

Best.

Erkan

On Mon, Sep 3, 2012 at 4:49 PM, Jan Möbius <moebius@cs.rwth-aachen.de> wrote:
On 24.08.2012 12:14, Erkan Gunpinar wrote:
> Dear Möbius,
>
> I would like to ask about giving colors to the edges and visualizing
> them on the Openflipper visualization framework.
> Here is my code, but I cannot see the colored edges;
>
> m_mesh->request_edge_colors();
> m_mesh->set_color(m_mesh->edge_handle(0), PolyMesh::Color(0, 255, 0));
> PluginFunctions::setDrawMode(ACG::SceneGraph::DrawModes::EDGES_COLORED);
> emit updatedObject(m_targetObject->id(), UPDATE_COLOR);
Hi,

can you try to set the color as:
m_mesh->set_color(m_mesh->edge_handle(0), PolyMesh::Color(0.0, 1.0, 0.0,
1.0));

as the color format used in OpenFlipper is Vec4f. Did you check in the
viewer, that the draw mode has actually changed to the one you set here?

Best,
Jan



--
Dipl.Inform. Jan Möbius
Department of Computer Science VIII
Aachen University of Technology (RWTH)
Ahornstrasse 55, 52074 Aachen, Germany

Phone   ++49 (0)241 80-21817
Fax     ++49 (0)241 80-22899
mailto:moebius@cs.rwth-aachen.de
http://www.rwth-graphics.de
_______________________________________________
Openflipper mailing list
Openflipper@lists.rwth-aachen.de
http://mailman.rwth-aachen.de/mailman/listinfo/openflipper