About Store Forum Documentation Contact



Post Reply 
Rotation center
Author Message
Woshi Offline
Member

Post: #1
Rotation center
Hello!!

How can i move the rotation center of a Mesh???

i want rotate a mesh but it only rotate on the box center...


thank you and sorry (I dont know english)
05-02-2010 11:43 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Rotation center
Matrix m;

Vec rot_center=..;

m.setPos(-rot_center)
.rotate...
.move(rot_center);

something like that (wrote from memory)
05-03-2010 12:44 PM
Find all posts by this user Quote this message in a reply
Woshi Offline
Member

Post: #3
RE: Rotation center
thank you but for example:

in the Tutorial 1 - Geometry, Graphics, Gui, Misc, Net, Sound\Geometry\Matrix.cpp

the tube rotate around the center but i want that it rotate around the top(or bottom) of the tube.


How can i do?
05-03-2010 05:30 PM
Find all posts by this user Quote this message in a reply
Woshi Offline
Member

Post: #4
RE: Rotation center
How can i write in memory?

This is OK?

MyMesh.transform(
m.setPos(Vec(0,1,0))
.rotate(Vec(0,1,0),0.001));
06-14-2010 11:36 PM
Find all posts by this user Quote this message in a reply
Post Reply