ConvexDecomposition | slicing concave polygons into convex polygons | 3D Animation library
kandi X-RAY | ConvexDecomposition Summary
kandi X-RAY | ConvexDecomposition Summary
Header only C++ library for decomposing and slicing concave polygons into convex polygons
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ConvexDecomposition
ConvexDecomposition Key Features
ConvexDecomposition Examples and Code Snippets
Community Discussions
Trending Discussions on ConvexDecomposition
QUESTION
I'm using bulletsharp (C# wrapper of bullet physics) to do some collision detection. Everything went fine until i tried to change the collision shape of an existing rigid body from box to compound at runtime. I'm doing this to simulate the collision again with a higher accuracy. The problem is: collision of compound shapes is not detected.
Scenario:
DicreteDynamicsWorld
containing someRigidBody
withBoxShape
- Collision of two kinematic
RigidBody
withBoxShape
happens (and is detected) - Change the shapes of these two
RigidBody
toCompoundShape
using the HACD algorithm for convex decomposition - Remove
RigidBody
fromDicreteDynamicsWorld
RigidBody.CollisionShape
=CompoundShape
- Set Position using
RigidBody.MotionState.WorldTransform
- Add
RigidBody
toDicreteDynamicsWorld
- Undo the movement which caused the collision (one object doesn't contain the other)
- Repeat the movement
- Collision is not detected
Remarks:
- Changing the
CollisionShape
fromBoxShape
toCompoundShape
was successful (correctCollisionShape
and correct position) - For collision detection i'm using
DicreteDynamicsWorld.Dispatcher.NumManifolds > 0
after aDicreteDynamicsWorld.StepSimulation(...)
Some code snippets as requested:
If you need something particular, please tell me. My solution is too big and too complexe to post the complete code...
RigidBody creation:
...ANSWER
Answered 2018-Jan-08 at 16:45Assuming that all your change in shape is happening here
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ConvexDecomposition
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page