Skip to content

Commit cfcac19

Browse files
committed
Avoid deprecationwarning in OpenGLRenderer.render_ground()
1 parent d267c0a commit cfcac19

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

warp/render/render_opengl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2790,8 +2790,9 @@ def render_ground(self, size: float = 1000.0, plane=None):
27902790
q = (0.0, 0.0, 0.0, 1.0)
27912791
else:
27922792
c = np.cross(normal, (0.0, 1.0, 0.0))
2793-
angle = np.arcsin(np.linalg.norm(c))
2794-
axis = np.abs(c) / np.linalg.norm(c)
2793+
angle = wp.float32(np.arcsin(np.linalg.norm(c)))
2794+
axis = wp.vec3(np.abs(c))
2795+
axis = wp.normalize(axis)
27952796
q = wp.quat_from_axis_angle(axis, angle)
27962797
return self.render_plane(
27972798
"ground",

0 commit comments

Comments
 (0)