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]))
def get_normals_at(self, coord): vectors = (LVector3d.up(), LVector3d.forward(), LVector3d.left()) return vectors
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