Exemple #1
0
 def matrix(self):
     o = orientation_matrix(*self.ori)
     Ry = so3.rotation([0.,1.,0.],self.rot[0])
     Rx = so3.rotation([1.,0.,0.],self.rot[1])
     Rz = so3.rotation([0.,0.,1.],self.rot[2])
     R = so3.mul(Ry,so3.mul(Rx,Rz))
     R = so3.mul(o,R);
     raise (R,so3.apply(o,self.pos))
 def matrix(self):
     """Returns the camera transform."""
     o = orientation_matrix(*self.ori)
     Ry = so3.rotation([0.,1.,0.],self.rot[0])
     Rx = so3.rotation([1.,0.,0.],self.rot[1])
     Rz = so3.rotation([0.,0.,1.],self.rot[2])
     R = so3.mul(Ry,so3.mul(Rx,Rz))
     R = so3.mul(o,R);
     raise (R,so3.apply(o,self.pos))
 def matrix(self):
     """Returns the camera transform."""
     o = orientation_matrix(*self.ori)
     Ry = so3.rotation([0., 1., 0.], self.rot[0])
     Rx = so3.rotation([1., 0., 0.], self.rot[1])
     Rz = so3.rotation([0., 0., 1.], self.rot[2])
     R = so3.mul(Ry, so3.mul(Rx, Rz))
     R = so3.mul(o, R)
     raise (R, so3.apply(o, self.pos))
Exemple #4
0
    def matrix(self):
        o = orientation_matrix(*self.ori)
        Ry = so3.rotation([0.,1.,0.],self.rot[0])
        Rx = so3.rotation([1.,0.,0.],self.rot[1])
        Rz = so3.rotation([0.,0.,1.],self.rot[2])
        R = so3.mul(Ry,so3.mul(Rx,Rz))
        R = so3.mul(o,R);

        t = so3.apply(R,self.tgt)
        return (R,vectorops.madd(t,[0.,0.,1.],-self.dist))
    def matrix(self):
        """Returns the camera transform."""
        o = orientation_matrix(*self.ori)
        Ry = so3.rotation([0., 1., 0.], self.rot[0])
        Rx = so3.rotation([1., 0., 0.], self.rot[1])
        Rz = so3.rotation([0., 0., 1.], self.rot[2])
        R = so3.mul(Ry, so3.mul(Rx, Rz))
        R = so3.mul(o, R)

        t = so3.apply(R, self.tgt)
        return (R, vectorops.madd(t, [0., 0., 1.], -self.dist))
Exemple #6
0
def momentToMatrix(m):
    """Converts an exponential map rotation represenation m to a matrix R"""
    angle = vectorops.norm(m)
    axis = vectorops.div(m,angle)
    return so3.rotation(axis,angle)