s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Common Structs
BBox
chevron_left
Common Structs
struct
BBox
search
Constructors
functions
BBox
Fields
crop_din
Maxs
crop_din
Mins
Properties
data_object
Center
data_object
Corners
data_object
Extents
data_object
RandomPointInside
data_object
RandomPointOnEdge
data_object
Size
data_object
Volume
Methods
functions
AddBBox
functions
AddPoint
functions
ClosestPoint
functions
Contains
functions
GetEdgeDistance
remove_circle
GetVolume
functions
Grow
functions
Overlaps
functions
Rotate
functions
Snap
functions
Trace
functions
Transform
functions
Translate
Static Methods
functions
FromBoxes
functions
FromHeightAndRadius
functions
FromPoints
functions
FromPositionAndSize
BBox
An Axis Aligned Bounding Box.
struct
sealed
Sandbox.System
build
Constructors
1
BBox
(
mins
,
maxs
)
Initialize an AABB with given mins and maxs corners. See Vector3.Sort(Vector3@,Vector3@).
crop_din
Fields
2
Maxs
Vector3
The maximum corner extents of the AABB. Values on each axis should be mathematically larger than values on the same axis of BBox.Mins. See Vector3.Sort(Vector3@,Vector3@)
Mins
Vector3
The minimum corner extents of the AABB. Values on each axis should be mathematically smaller than values on the same axis of BBox.Maxs. See Vector3.Sort(Vector3@,Vector3@)
data_object
Properties
7
Center
Vector3
Calculated center of the AABB.
Corners
IEnumerable`1
An enumerable that contains all corners of this AABB.
Extents
Vector3
The extents of the bbox. This is half the size.
RandomPointInside
Vector3
Returns a random point within this AABB.
RandomPointOnEdge
Vector3
Returns a random point within this AABB.
Size
Vector3
Calculated size of the AABB on each axis.
Volume
float
Returns the physical volume of this AABB.
functions
Methods
13
AddBBox
(
point
)
BBox
Returns this bbox but stretched to include given bbox
AddPoint
(
point
)
BBox
Returns this bbox but stretched to include given point
ClosestPoint
(
point
)
Vector3
Returns the closest point on this AABB to another point
Contains
(
b
)
bool
Returns true if this AABB completely contains given AABB
GetEdgeDistance
(
localPos
)
float
Calculates the shortest distance from the specified local position to the nearest edge of the shape.
GetVolume
(
)
obsolete
float
Get the volume of this AABB
Grow
(
skin
)
BBox
Return a slightly bigger box
Overlaps
(
b
)
bool
Returns true if this AABB somewhat overlaps given AABB
Rotate
(
rotation
)
BBox
Rotate this box by this amount and return
Snap
(
distance
)
BBox
Snap this AABB to a grid
Trace
(
ray
,
distance
,
hitDistance
)
bool
Trace a ray against this box. If hit then return the distance.
Transform
(
transform
)
BBox
Transform this box by this amount and return
Translate
(
point
)
BBox
Move this box by this amount and return
functions
Static Methods
4
FromBoxes
(
boxes
)
BBox
FromHeightAndRadius
(
height
,
radius
)
BBox
Creates an AABB of
length and depth, and given
FromPoints
(
points
,
size
)
BBox
FromPositionAndSize
(
center
,
size
)
BBox
Creates an AABB at given position
and given
which acts as a
diameter
of a sphere contained within the AABB.
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.