kaolin.ops.coords¶
API¶
- kaolin.ops.coords.cartesian2spherical(x, y, z)¶
Convert cartersian coordinates to spherical in radians.
Assuming X toward camera, Z-up and Y-right.
- Parameters
x (torch.Tensor) – X components of the coordinates.
y (torch.Tensor) – Y components of the coordinates.
z (torch.Tensor) – Z components of the coordinates.
- Returns
azimuth, elevation, distance, of same shape and dtype than inputs.
- Return type
- kaolin.ops.coords.spherical2cartesian(azimuth, elevation, distance=None)¶
Convert spherical coordinates to cartesian.
Assuming X toward camera, Z-up and Y-right.
- Parameters
azimuth (torch.Tensor) – azimuth in radianss.
elevation (torch.Tensor) – elevation in radians.
distance (torch.Tensor or float, optional) – distance. Default: 1.
- Returns
x, y, z, of same shape and dtype than inputs.
- Return type