HI Maruti, Do you actually need to modify the geometry, could you get away with just modifying a texture (or more precisely the texture's osg::Image) ?
As for the osggeometry example not showing you how to modify geometry, well modifying geometry is a complicated topic, your own needs are very very specific. The OSG is primarily a real-time graphics API, its not a general purpose tool for scene construction so the API and examples are geared up for rendering rather than editing. Editing is possible - in fact there are modellers based on the OSG, but you'll need to learn about the internals of osg::Geometry and how to go about creating vertices, new primitives etc. There is no easy way to jump in a know all this stuff, I'm afraid you'll need to be patient and work you way up to it. Robert. On 8/23/07, maruti borker <[EMAIL PROTECTED]> wrote: > I tried out what u said , i got the node using Linesegement intersector , > then i will got drawable class , then by using TriangleFunctor class , i am > able to get all the triangles with their normals , now my i need to push > the point a bit inside so that it looks etched , so i will decrease it by > using its normal . That means divide the triangles and make 3 triangles , > but how shud i add these triangles to the drawable class and delete the old > trianlge, and see the effect in the window . My basic doubt is how shud i > edit the mesh , i didnt find any editing in osggeometry example . :( > > Thanx in advance > PS: I think just by pushing a point wont help so i need to push a a square > region :( > > On 8/11/07, Alberto Luaces < [EMAIL PROTECTED]> wrote: > > Could you post what you have coded so far in order to see what is wrong? > For > > now, just post the mesh modification code. Could it also be that you are > not > > calling osg::Drawable::dirtyDisplayList() so the drawable > never gets > > modified? > > > > Alberto > > > > El Sábado 11 Agosto 2007, maruti borker escribió: > > > I was not able to edit the mesh data.. can u give some more refernces ?? > > > > > > On 8/8/07, Alberto Luaces <[EMAIL PROTECTED]> wrote: > > > > El Martes 07 Agosto 2007, maruti borker escribió: > > > > > HI everyone > > > > > I am a n00b in OSG and i am using OSG 2.0 in > linux . > > > > > > > > I > > > > > > > > > wam developing a system which will needs an option where the user > can > > > > > change the loaded model by mouse clicks . The result of one mouse > click > > > > > shud engrave a point at that point . That is , if i drag on the > model > > > > > > > > and > > > > > > > > > draw a line then the line shud be engraved on the model . > > > > > > > > > > So what i did was used osgUtil::LIneSegementIntersecto > r::Intersection > > > > > > > > to > > > > > > > > > find the intersection and then get the points , and then move the > > > > > points > > > > > > > > in > > > > > > > > > a direction negative to the direction of the plane normal . But i > dont > > > > > > > > have > > > > > > > > > any idea to implement this any help ???? > > > > > > > > > > Thanx > > > > > - > > > > > Maruti Borker > > > > > > > > Hi, > > > > > > > > as you mentioned, you can use the LineSegementIntersector, and then > get > > > > the > > > > mesh data from the nodes you picked, transform it and modify the > > > > drawable's > > > > nodes. To get and modify the mesh data of a Geode, see the osggeometry > > > > example. It can also help using the osg::TriangleFunctor class. > > > > > > > > HTH, > > > > > > > > Alberto > > _______________________________________________ > > osg-users mailing list > > [email protected] > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

