Jump to content
  • Advertisement
Sign in to follow this  
Marika

OpenGL Splitting a cuboid body

This topic is 4239 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello Im working with the physic engine ODE and OpenGL, and I try to split 3D-Bodys (I use cuboids) into two smaller parts. Now I have the problem that I dont know how to compute the positions of the "smaller body parts". What I have is: -The rotation matrix of my cuboid -The center point of the cuboid -The side lenghs of the cuboid Here I have a sketch: So I need somehow to compute the Point P2 and P3, this will be the center points of the small body parts, so I can simulate the break of my body. I hope somebody can help me out, or maybe had the same problem and solve it another way, couse I really have a hard time with this :)

Share this post


Link to post
Share on other sites
Advertisement
This is more of a Math and Physics problem, but what you need to do is get the transformations of the prism's axes. This is simply a row (column?) of the rotation matrix, scaled by the distance from the center to the new center. Then you take that and add it to the original position vector.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!