示例#1
0
文件: camera.py 项目: RGrant92/Klampt
 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))
示例#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))
示例#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))
示例#4
0
文件: camera.py 项目: RGrant92/Klampt
    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))
示例#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))
示例#6
0
文件: loader.py 项目: RGrant92/Klampt
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)