Welcome to Python-flavored Magnum! Please note that, while already being rather stable, this functionality is still considered experimental and some APIs might get changed without preserving full backwards compatibility.

magnum.Range3Dd class

Three-dimensional double range

Static methods

def from_center(arg0: Vector3d, arg1: Vector3d, /) -> Range3Dd
Create a range from center and half size
def from_size(arg0: Vector3d, arg1: Vector3d, /) -> Range3Dd
Create a range from minimal coordinates and size
def zero_init() -> Range3Dd
Construct a zero range

Methods

def center(self, /) -> Vector3d
Range center
def center_x(self, /) -> float
Range center on X axis
def center_y(self, /) -> float
Range center on Y axis
def center_z(self, /) -> float
Range center on Z axis
def contains(self, arg0: Vector3d, /) -> bool
Whether given point is contained inside the range
def contains(self, arg0: Range3Dd, /) -> bool
Whether another range is fully contained inside this range
def padded(self, arg0: Vector3d, /) -> Range3Dd
Padded ange
def scaled(self, arg0: Vector3d, /) -> Range3Dd
Scaled range
def scaled(self, arg0: float, /) -> Range3Dd
Scaled range
def scaled_from_center(self, arg0: Vector3d, /) -> Range3Dd
Range scaled from the center
def scaled_from_center(self, arg0: float, /) -> Range3Dd
Range scaled from the center
def size(self, /) -> Vector3d
Range size
def size_x(self, /) -> float
Range width
def size_y(self, /) -> float
Range height
def size_z(self, /) -> float
Range depth
def translated(self, arg0: Vector3d, /) -> Range3Dd
Translated range
def x(self, /) -> Range1Dd
Range in the X axis
def xy(self, /) -> Range2Dd
Range in the XY plane
def y(self, /) -> Range1Dd
Range in the Y axis
def z(self, /) -> Range1Dd
Range in the Z axis

Special methods

def __eq__(self, arg0: Range3Dd, /) -> bool
Equality comparison
def __getstate__(self, /) -> bytes
Dumps the in-memory representation of range min/max components
def __init__(self, arg0: Range3Di, /) -> None
Construct from different underlying type
def __init__(self, arg0: Range3D, /) -> None
Construct from different underlying type
def __init__(self, /) -> None
Default constructor
def __init__(self, arg0: Vector3d, arg1: Vector3d, /) -> None
Construct a range from minimal and maximal coordinates
def __init__(self, arg0: typing.Tuple[Vector3d, Vector3d], /) -> None
Construct a range from minimal and maximal coordinates
def __init__(self, arg0: typing.Tuple[typing.Tuple[float, float, float], typing.Tuple[float, float, float]], /) -> None
Construct a range from a pair of minimal and maximal coordinates
def __ne__(self, arg0: Range3Dd, /) -> bool
Non-equality comparison
def __repr__(self, /) -> str
Object representation
def __setstate__(self, arg0: bytes, /) -> None
Treats the data as the in-memory representation of range min/max components

Properties

back: float get set
Back edge
back_bottom_left: Vector3d get set
Back bottom left corner
back_bottom_right: Vector3d get set
Back bottom right corner
back_top_left: Vector3d get set
Back top left corner
back_top_right: Vector3d get set
Back top right corner
bottom: float get set
Bottom edge
front: float get set
Front edge
front_bottom_left: Vector3d get set
Front bottom left corner
front_bottom_right: Vector3d get set
Front bottom right corner
front_top_left: Vector3d get set
Front top left corner
front_top_right: Vector3d get set
Front top right corner
left: float get set
Left edge
max: Vector3d get set
Maximal coordinates (exclusive)
min: Vector3d get set
Minimal coordinates (inclusive)
Right edge
top: float get set
Top edge

Method documentation

def magnum.Range3Dd.__setstate__(self, arg0: bytes, /) -> None

Treats the data as the in-memory representation of range min/max components

Exceptions
ValueError If the data size doesn’t match type size