class neso_fame.offset.LazyOffset(Generic[T])

Wrap an object to represent it being offset in the x3 direction.

All attribute lookup and function calls will be forwarded to the wrapped object. If the result has an offset method, then it will be called to eagerly evaluate the offset. Otherwise, the results will also be wrapped by a LazyOffset.

Public members

obj : T
x3_offset : float

Constructors

LazyOffset(obj: T, x3_offset: float)

Wrap the object so that it is lazily offset.

Special methods

__getattr__(name: str) Any

Get an attribute of the wrapped object and offset it.

__call__(*args: Any, **kwargs: Any) Any

Try to call the wrapped object and offset the result.

__iter__() Iterator[Any]

Try to iterate the wrapped object and offset the iterator.

__len__() int

Try to get the length of the wrapped object.

__getitem__(index: Any) Any

Try to index the wrapped object and offset the result.

__next__() Any

Try to get the next item of a wrapped iterator and offset the result.

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

__hash__()

Return hash(self).

Methods

final get_underlying_object() Any

Return the object being offset.

Properties

property is_offset : bool

Indicate whether the object has been offset.


Last update: Sep 23, 2024