New in CVS: Mesh

Andreas Zehender zehender at kde.org
Wed Sep 24 23:14:10 CEST 2003


Hi Leon!

On Wednesday, 24. September 2003 00:47, Leon Pennington wrote:
> I've added the mesh object, with the inside vector so it also does the
> solid mesh stuff.
>
> I've been looking at mesh2, I think I'm just stuck on how to implement it.
> I'm not sure which path to take. Long lists of indices and faces in the
> propeirties view seems like a really bad idea. then how to incorparate the
> texture stuff as well. Hmmm. I'll think some more.
>
> I was going to implement the UV mapping options, unless theres something
> more urgent I should work on?

What I had in mind for the mesh object is the following:
- If you select a triangle, only control points for this triangle are shown.
- If you select the whole mesh, all control points of all triangles are shown.
- All points with the same coordinates should share one control point.
- There should be context menu entries like "join selected points"

That's just not possible with the current framework. A graphical change with 
control points can only change the selected object. There is no way to signal 
child changes at the moment.

See PMGLView::graphicalChange() pmglview.cpp:953-955

*me thinks*

Hmm, I added a new virtual method to PMObject:

virtual void controlPointsChangedList( PMControlPointList& list,
                                       PMObjectList& /*changedObjects*/ )
{
   controlPointsChanged( list );
}

By default this method calls the old controlPointsChanged method. However, if 
you reimplement this method, you can append all changed objects to the second 
parameter. A graphical change will then signal a graphical change for all 
objects in this list, not only for the selected object.

I am recompiling the program at the moment (which takes half an hour on my 
machine). I will commit this modification tomorrow, if everything is ok.

Better add better mesh editing before implementing new objects.

Greetings, Andreas

-- 
--------------------------------------------------
 Andreas Zehender
 Master of Computer Science, Dipl. Ing. (BA)
 http://www.azweb.de
 az at azweb.de | zehender at kde.org      
--------------------------------------------------



More information about the kpovmodeler-devel mailing list