THREE.jsにてモデル座標と、世界座標を扱いたいので調べると
Object3D
Base class for scene graph objects.
Constructor
Object3D()
The constructor takes no arguments.
Properties
.parent Object's parent in the scene graph. .children Array with object's children. .rotation Object's local rotation (Euler angles), in radians. .matrix Local transform. .matrixWorld The global transform of the object. If the Object3d has no parent, then it's identical to the local transform. .matrixAutoUpdate When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property. .matrixWorldNeedsUpdate When this is set, it calculates the matrixWorld in that frame and resets this property to false. .rotationAutoUpdate When this is set, then the rotationMatrix gets calculated every frame.
Methods
.localToWorld( vector ) vector - A local vector. Updates the vector from local space to world space. .worldToLocal( vector ) vector - A world vector. Updates the vector from world space to local space. .add( object ) object - An object. Adds object as child of this object. .remove( object ) object - An object. Removes object as child of this object. .updateMatrix() Updates local transform. .updateMatrixWorld( force ) Updates global transform of the object and its children.
どうやら親子関係を作れば良い見たい。。 iPhoneから取得した角速度から、デバイスの姿勢角度を求めて、子供の座標に入れてあげればいいのか。