gradoptics.transforms.base_transform
- class gradoptics.transforms.base_transform.BaseTransform
Bases:
abc.ABC
Base class for transforms. Enables to switch between world-space and object-space.
- apply_transform(rays)
Transform the coordinates of
rays
in 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
rays
in 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
points
in 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
points
in object-space to coordinates in world-space- Parameters
points – Vectors in object-space (
torch.tensor
)- Returns
New vectors in world-space (
torch.tensor
)