Ok, I think I've got the object manipulation figured out. I needed to use SimpleVectors instead of Matricies :idea:
Ok on to some suggestions.
It would be helpful to have to some useful functions for the Camera
manipulation that are present in Object3D class. For example:
Camera.getXAxis(),Camera.getYAxis(), and Camera.getZAxis() would be helpful so that I can use the Camera.rotateAxis(SimpleVector axis,float angle) function on them. Or would it be better to do these operations on a Matrix and use the setBack() function (inherited from the BufferedMatrix class)?
Also, I'm trying to write a simple space shooter in which my ship is at an arbitrary rotation on the X,Y, and Z axies. I want to fire a projectile (which is an Object3D) from my ship and need to the projectile to be the same orientation as my ship before I fire it off. How do I go about this? Would be nice to have a function like such:
Object3D.copyOrientation(Object3D obj2) or Object3D.setOrientation(Object3d obj2). This kind of function to set the orientation of an object the same as another object would be very helpful. Another function that would be helpful is:
Object3D.setOrientation(Camera cam). This would set an Objects orientation the same as the Camera.
or:
Camera.setOrientation(Object3D obj). This would set the Cameras orientation the same as an Object3D's orientation.
SimpleVector functions
It would be nice to have a SimpleVector.scale(float scale) type of function
I'm using the following code to move an object forward
public void moveObject()
{
float forward[3];
SimpleVector xaxis=ship.getXAxis();
SimpleVector zaxis=ship.getZAxis();
/*would be nice to be able to scale my zaxis vector
right here instead of doing the following line*/
forward=zaxis.toArray();
sphere1.translate(forward[0]*.2f,forward[1]*0.2f,forward[2]*0.2f);
sphere1.rotateAxis(xaxis,xrot);
sphere1.rotateAxis(zaxis,zrot);
}
Well, hopefully I didn't confuse you on what I'm trying to do :? This is a becoming a great pure java 3D engine and hopefully with the addition of a few more object and camera manipulation functions for dummies like me :roll: it will become even better
I really Hope it gains popularity and keep up the good work!
p.s. Thanks for putting flat shading in, works great for my low poly objects.