Thanks
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuhttp://www.jpct.net/forum2/index.php/board,3.0.html
Quote from: EgonOlsen on May 01, 2012, 09:14:01 PMI was wondering what libraries were used for the model loading and collision detection. And for the collision detection, if no libraries were used, what formulas/equations is used to calculate the collision detected.
I don't get the question. Formulas to load models? No libraries are being used. It's all build in...but as said: I don't get the actual question...
public SimpleVector deriveAngles(Matrix mat) {
SimpleVector s=new SimpleVector();
float[] m=mat.getDump();
s.x=(float) Math.atan(m[9]/m[10]);
s.y=(float) Math.asin(-m[2]);
s.z=(float) Math.atan(m[4]/m[0]);
return s;
}
Object3d obj1,obj2;
[make objects bla bla bla]
SimpleVector rot = deriveAngles(obj1.getRotationMatrix());
obj2.rotateY(rot.y);
obj2.rotateX(rot.x);
obj.rotateZ(rot.z);
Page created in 0.097 seconds with 12 queries.