コード例 #1
0
 float Transform3D::norm(Transform3D T){
     float pos_norm = arma::norm(T.translation());
     UnitQuaternion q = UnitQuaternion(Rotation3D(T.submat(0,0,2,2)));
     float angle = q.getAngle();
     //TODO: how to weight these two?
     return pos_norm + Rotation3D::norm(T.rotation());
 }
コード例 #2
0
 Transform3D Transform3D::createRotationZ(double radians) {
     Transform3D transform;
     transform.submat(0,0,2,2) = Rotation3D::createRotationZ(radians);
     return transform;
 }