mt.geo3d.box
A 3D box.
Functions
cast_Hyperbox_to_Box()
: Casts a Hyperbox to a Box.cast_Box_to_Moments3d()
: Undocumented.approx_Moments3d_to_Box()
: Approximates a Moments3d instance with a box such that the mean aligns with the box’s center, and the covariance matrix of the instance is closest to the moment convariance matrix of the box.
- mt.geo3d.box.cast_Hyperbox_to_Box(x)
Casts a Hyperbox to a Box.
- mt.geo3d.box.cast_Box_to_Moments3d(obj)
- mt.geo3d.box.approx_Moments3d_to_Box(obj)
Approximates a Moments3d instance with a box such that the mean aligns with the box’s center, and the covariance matrix of the instance is closest to the moment convariance matrix of the box.
Classes
Box
: A 3D box.
- class mt.geo3d.box.Box(min_x, min_y, min_z, max_x, max_y, max_z, force_valid=False)
A 3D box.
Note we do not care if the box is open or partially closed or closed.
Inheritance
digraph inheritance19f5e9ca04 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "Box" [URL="#mt.geo3d.box.Box",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A 3D box."]; "ThreeD" -> "Box" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Hyperbox" -> "Box" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometricObject" [URL="../mt.geo/mt.geo.object.html#mt.geo.object.GeometricObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A geometric object which lives in a d-dimensional Euclidean space."]; "Hyperbox" [URL="../mt.geond/mt.geond.hyperbox.html#mt.geond.hyperbox.Hyperbox",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Axis-aligned n-dimensional hyperrectangle."]; "GeometricObject" -> "Hyperbox" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ThreeD" [URL="../mt.geo/mt.geo.object.html#mt.geo.object.ThreeD",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mixin to assert that the geometric object lives in 3D Euclidean space."]; }- __init__(min_x, min_y, min_z, max_x, max_y, max_z, force_valid=False)
- __repr__()
Return repr(self).
- property cx
Center x-coordinate.
- property cy
Center y-coordinate.
- property cz
Center z-coordinate.
- property lx
length in x-axis
- property ly
length in y-axis
- property lz
length in z-axis
- property max_x
highest x-coordinate.
- property max_y
highest y-coordinate.
- property max_z
highest z-coordinate.
- property min_x
lowest x-coordinate.
- property min_y
lowest y-coodinate.
- property min_z
lowest z-coodinate.
- property moment_x
Returns the integral of x over the box’s interior.
- property moment_xx
Returns the integral of x*x over the box’s interior.
- property moment_xy
Returns the integral of x*y over the box’s interior.
- property moment_y
Returns the integral of y over the box’s interior.
- property moment_yy
Returns the integral of y*y over the box’s interior.
- property moment_yz
Returns the integral of y*z over the box’s interior.
- property moment_z
Returns the integral of z over the box’s interior.
- property moment_zx
Returns the integral of z*x over the box’s interior.
- property moment_zz
Returns the integral of z*z over the box’s interior.
- move(offset)
Moves the Box by a given offset vector.
- property surface_area
Surface area.
- property x
left, same as min_x.
- property y
top, same as min_y.
- property z
top, same as min_z.