Remember me

Lost Password?

Register now!
Main Menu
H3D.org Feeds

Browsing this Thread:   1 Anonymous Users

Collision detection
Just popping in
Just popping in

See User information

I am currently working on the implementation of the collision in the H3DViewer. I am trying to add support for more than one object inside a model.

The issue is that if more than one object is inside a model, the behavior is very weird. When you focus on an single object (click on it), instead of being able to change that object, it is always the same object which is in focus. This prevents translation, rotation and collision from working properly (on more objects). My first goal is for this to work with mouse and keyboard as input devices.

So, how can I split the objects so that they are considered separately (which would hopefully solve the above-mentioned issue)? Furthermore, how can they be marked as touchable?
Also, which classes are used to call the translation and collision detection between objects? In some methods, there are some TODOs, so would this be a problem for the thing I am trying to do.

Thank you!

Posted on: 2017/5/26 9:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top

Re: Collision detection

See User information
I don't quite get the problem.
The mouse/avatar interaction in H3D is implemented using simple lineIntersect/closestPoint and movingSphereIntersect virtual functions which will (as the name indicates) simply find the intersection with objects and a line, or the closest point on an object to a point in space or the first place along a line in which a sphere intersects the object (swept sphere, moving sphere).

There are a couple of navigation modes.
EXAMINE - (keyboard shortcut e) will let the user navigate around the centerOfRotation of the current viewpoint. There is no collision between the avatar and the objects when this is used.
LOOKAT - (keyboard shortcut l) Let the user select the centerOfRotation for the current viewpoint by clicking on an object (perhaps it is only temporary, can't remember). No collision between avatar and objects are considered.
WALK/FLY - (keyboard shortcut w/f) Collision between avatar and objects are considered. Arrow keys control direction of walking relative to current viewpoint. Mouse changes viewpoint. When fly is enabled one can use mouse to change direction up/down.

Each X3DGeometryNode is a separate object. X3DGeometryNodes are such things as Sphere and IndexedTriangleSet.

Posted on: 2017/5/29 8:04
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong Top

You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create pdf.
You cannot get print page.

[Advanced Search]

(C) 2012 SenseGraphics AB    ---    Powered by XOOPS