Archive 17/01/2023.

Manipulating vertices and faces with Urho

darkirk

I’ve seen the DynamicGeometry demo and i’m trying to build on top of it to create something like this:

Is there an additional example of DynamicGeometry that places a gizmo on the vertices and allow mouse input somehow?

hdunderscore

With something like this you will have a better time looking at it from a different perspective. If you try to work with Urho3D’s representation of geometry and try manipulating it like in the video, you’re going to have a hard time digging up the vertex data. On the other hand if you maintain your own simpler data representation of geometry, then only render the result in Urho (ie, using Geometry/DynamicGeometry) you’ll have an easier time.

Having your own handy data representation can be useful when you need to use third party libraries such as to assist with booleans or to speed up picking in a dense scene.

You can look at the editor code for example of manipulating a gizmo with the mouse.

darkirk

What do you mean by my own data representation? Like, having my own class of a Cube and sending the changes to its vectors to a custom geometry entity? What’s the benefit in that? Also, doesn’t that make the scene serialization even more difficult?