コード例 #1
0
Object3D::Object3D(const Object3D &f) : _orientation(f.orientation()), _position(f.position()), _scale(f.scale()) {
}
コード例 #2
0
void Object3D::compose(const Object3D &f) {
  _position=_position+_orientation*f.position();
  _orientation=_orientation*f.orientation();
  _scale=_scale*f.scale(); // !!!! no scale for this ! (difficult to find the orientation after scale)
}
コード例 #3
0
// linear interpolation this=(1-t)f1+tf2 (i.e. linear interpolation of the translation and the quaternion)
void Object3D::mix(const Object3D &f1,const Object3D &f2,double t) {
  _position.mix(t,f1.position(),f2.position());
  _orientation.mix(t,f1.orientation(),f2.orientation());
  _scale.mix(t,f1.scale(),f2.scale());
}