View Full Version : Center Of Mass Rigid Body
glnoob_andre
02-09-2012, 04:22 AM
Does anyone know how to calculate the center of mass of a given rigid body. I need the center of mass for collision detection. I have a set of rigid bodies with the same vertices in body space but change in world space.
BionicBytes
02-09-2012, 09:09 AM
Most physics engine APIs have methods for this kind of thing. Which one are you using?
glnoob_andre
02-09-2012, 09:32 AM
Am trying to do it on my own, am not using any engine. Just a vector and matrix class with OpenGL
Alfonse Reinheart
02-09-2012, 11:21 AM
OpenGL isn't going to help you with this task. It's between you and your representation of a model.
Ludde
02-09-2012, 01:16 PM
http://www.multires.caltech.edu/teaching...rtich96fast.pdf (http://www.multires.caltech.edu/teaching/courses/cs101.3.spring02/cs101_files/resources/mirtich96fast.pdf)
BionicBytes
02-09-2012, 01:49 PM
I had a quick look through the reference paper given above. All I can say is "good luck with that".
If you can make head or tail from that lot figuring out how to make an OpenGl engine must be trivial ;-)
Ludde
02-10-2012, 01:13 AM
You could look at an implementation directly:
http://www.cs.berkeley.edu/~jfc/mirtich/massProps.html
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.