コード例 #1
0
ファイル: bodies.py プロジェクト: ondrocks/cosmonium
 def get_normals_under(self, position):
     if self.surface is not None:
         (x, y, distance) = self.spherical_to_longlat(self.cartesian_to_spherical(position))
         vectors = self.surface.get_normals_at(x, y)
     else:
         vectors = (LVector3d.up(), LVector3d.forward(), LVector3d.left())
     sync_frame = SynchroneReferenceFrame(self)
     return (sync_frame.get_orientation().xform(vectors[0]),
             sync_frame.get_orientation().xform(vectors[1]),
             sync_frame.get_orientation().xform(vectors[2]))
コード例 #2
0
ファイル: tiles.py プロジェクト: cosmonium/cosmonium
 def get_normals_at(self, coord):
     vectors = (LVector3d.up(), LVector3d.forward(), LVector3d.left())
     return vectors
コード例 #3
0
 def get_normals_under_xy(self, x, y):
     if self.surface is not None:
         vectors = self.surface.get_normals_at(x, y)
     else:
         vectors = (LVector3d.up(), LVector3d.forward(), LVector3d.left())
     return vectors