Exemplo n.º 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))
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 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))
Exemplo n.º 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))
Exemplo n.º 5
0
    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))
Exemplo n.º 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)