March 9, 2016 at 9:29 am #737370
The document which described the force (HapticShapeConstraint) calculated is a spring force.
Thus, I want to know the difference between this force effect and the HapticSpring effect. After all, the HapticShapeConstraint can be used to simulate the contact force effect.
Many thanksMarch 9, 2016 at 2:17 pm #737371
The difference is that HapticSpring effect is a force effect which will only calculate a spring force towards a point.
Whereas the HapticShapeConstraint will calculate a spring effect towards the closest point (to the haptic device position) on any HAPI::Collision::CollisionObject (for example a bunch of triangles). If the haptic shape that is given is just a point then this force effect will behave the same as a HapticSpring.
Just to be clear, these are the ones I am referring to:
[url=http://www.h3dapi.org/uploads/api/H3DAPI_2.3/doc/HAPI/html/classHAPI_1_1HapticShapeConstraint.html]HapticShapeConstraint[/url]March 9, 2016 at 4:22 pm #737372
Hi, thank you for your answer.
I am sorry I confused with HapticShapeConstraint and HapticPrimitive. Actually, I want to know the difference between HapticPrimitive and HapticSpring.
How do you achieve the HapticPrimitive effect? Is it still a spring effect or different one?
I cannot find relevant information from [url=http://www.h3dapi.org/uploads/api/H3DAPI_2.3/doc/HAPI/html/classHAPI_1_1HapticPrimitive.html]HapticPrimitive[/url]
BTW, the download link for H3DAPI 2.3.0 Windows Installer has expired, can you fixed it please?
Thank you.March 10, 2016 at 6:42 am #737373
I assume you are working with HAPI directly and not H3DAPI at all? If you are using H3DAPI then simply add a SmoothSurface to your appearance.
If you work with HAPI directly then look at the example in examples/HAPI/SurfaceExample to see how a HapticPrimitive is used. It is not inheriting from the HAPIHapticsEffect and is therefore not considered a spring effect. The device is required to have a haptics renderer set, for example RuspiniRenderer. Exactly how that algorithm work you can find out by going to the paper referred to in the RuspiniRenderer.h.
Internally the forces are calculated using a stiffness constant, and the final force is calculated in a similar way to a spring force yes, by multiplying a vector with a scalar.
[EDIT] btw, the link is now fixed. Thanks for the report.March 10, 2016 at 11:59 am #737374
Thank you for your help, I understand now.March 10, 2016 at 11:59 am #727864
You must be logged in to reply to this topic.