Skip to content

Transformation : translation and rotation

Hunter Laux edited this page Aug 6, 2018 · 1 revision

The meshes in the library are derived from THREE.Mesh in most cases. And the matrix transformations, for translation and rotation of objects applies.Read more about matrix transformations

cyl = new MRPTLIB.model.CCylinder();
m = new THREE.Matrix4();
m.setPosition(new THREE.Vector3(x,y,z));
m.setRotationFromQuaternion(quaternion);
cyl.applyMatrix(m);

Clone this wiki locally