gradoptics.transforms.base_transform
- class gradoptics.transforms.base_transform.BaseTransform
Bases:
abc.ABCBase class for transforms. Enables to switch between world-space and object-space.
- apply_transform(rays)
Transform the coordinates of
raysin world-space to coordinates in object-space- Parameters
rays – Rays in world-space (
Rays)- Returns
New rays in object-space (
Rays)
- apply_inverse_transform(rays)
Transform the coordinates of
raysin object-space to coordinates in world-space- Parameters
rays – Rays in object-space (
Rays)- Returns
New rays in world-space (
Rays)
- apply_transform_(points)
Transform the coordinates of
pointsin world-space to coordinates in object-space- Parameters
points – Vectors in world-space (
torch.tensor)- Returns
New vectors in object-space (
torch.tensor)
- apply_inverse_transform_(points)
Transform the coordinates of
pointsin object-space to coordinates in world-space- Parameters
points – Vectors in object-space (
torch.tensor)- Returns
New vectors in world-space (
torch.tensor)