cBoundingBox


Index:
Articles
Classes
Hooks

Quick navigation:
BannerPattern
BossBarColor
BossBarDivisionType
cArrowEntity
cBeaconEntity
cBedEntity
cBlockArea
cBlockEntity
cBlockEntityWithItems
cBlockInfo
cBoat
cBoundingBox
cBrewingstandEntity
cChatColor
cChestEntity
cChunkDesc
cClientHandle
cColor
cCommandBlockEntity
cCompositeChat
cCraftingGrid
cCraftingRecipe
cCryptoHash
cCuboid
cDispenserEntity
cDropperEntity
cDropSpenserEntity
cEnchantments
cEnderCrystal
cEntity
cEntityEffect
cExpBottleEntity
cExpOrb
cFallingBlock
cFile
cFireChargeEntity
cFireworkEntity
cFloater
cFlowerPotEntity
cFurnaceEntity
cGhastFireballEntity
cHangingEntity
cHopperEntity
cIniFile
cInventory
cItem
cItemFrame
cItemGrid
cItems
cJson
cJukeboxEntity
cLeashKnot
cLineBlockTracer
cLuaWindow
cMap
cMapManager
cMobHeadEntity
cMobSpawnerEntity
cMojangAPI
cMonster
cNetwork
cNoteEntity
cObjective
cPainting
cPawn
cPickup
cPlayer
cPlugin
cPluginLua
cPluginManager
cProjectileEntity
cRankManager
cRoot
cScoreboard
cServer
cServerHandle
cSignEntity
cSplashPotionEntity
cStringCompression
cTCPLink
cTeam
cThrownEggEntity
cThrownEnderPearlEntity
cThrownSnowballEntity
cTNTEntity
cUDPEndpoint
cUrlClient
cUrlParser
CustomStatistic
cUUID
cWebAdmin
cWindow
cWitherSkullEntity
cWorld
EffectID
HTTPFormData
HTTPRequest
HTTPTemplateRequest
ItemCategory
lxp
SmokeDirection
sqlite3
StatisticsManager
TakeDamageInfo
tolua
Vector3d
Vector3f
Vector3i
Globals

Contents


cBoundingBox class

Represents two sets of coordinates, minimum and maximum for each direction; thus defining an axis-aligned cuboid with floating-point boundaries. It supports operations changing the size and position of the box, as well as querying whether a point or another BoundingBox is inside the box.

All the points within the coordinate limits (inclusive the edges) are considered "inside" the box. However, for intersection purposes, if the intersection is "sharp" in any coord (min1 == max2, i. e. zero volume), the boxes are considered non-intersecting.


Functions

NameParametersReturn valueNotes
() (constructor)
MinVector3d
MaxVector3d
cBoundingBox
Creates a new bounding box with the coords specified as two vectors
() (constructor)
MinXnumber
MaxXnumber
MinYnumber
MaxYnumber
MinZnumber
MaxZnumber
cBoundingBox
Creates a new bounding box with the specified edges
() (constructor)
PosVector3d
Radiusnumber
Heightnumber
cBoundingBox
Creates a new bounding box from the position given and radius (X/Z) and height. Radius is added from X/Z to calculate the maximum coords and subtracted from X/Z to get the minimum; minimum Y is set to Pos.y and maxumim Y to Pos.y plus Height. This corresponds with how entities are represented in Minecraft.
() (constructor)
OtherBoundingBoxcBoundingBox
cBoundingBox
Creates a new copy of the given bounding box. Same result can be achieved by using a simple assignment.
() (constructor)
PosVector3d
CubeSideLengthnumber
cBoundingBox
Creates a new bounding box as a cube with the specified side length centered around the specified point.
CalcLineIntersection
LineStartVector3d
LinePt2Vector3d
DoesIntersectboolean
LineCoeffnumber
FaceeBlockFace
Calculates the intersection of a ray (half-line), given by two of its points, with the bounding box. Returns false if the line doesn't intersect the bounding box, or true, together with coefficient of the intersection (how much of the difference between the two ray points is needed to reach the intersection), and the face of the box which is intersected.
CalcLineIntersection
BoxMinVector3d
BoxMaxVector3d
LineStartVector3d
LinePt2Vector3d
DoesIntersectboolean
LineCoeffnumber
FaceeBlockFace
(STATIC) Calculates the intersection of a ray (half-line), given by two of its points, with the bounding box specified as its minimum and maximum coords. Returns false if the line doesn't intersect the bounding box, or true, together with coefficient of the intersection (how much of the difference between the two ray points is needed to reach the intersection), and the face of the box which is intersected.
DoesIntersect
OtherBoundingBoxcBoundingBox
boolean
Returns true if the two bounding boxes have an intersection of nonzero volume.
Expand
ExpandXnumber
ExpandYnumber
ExpandZnumber
Expands this bounding box by the specified amount in each direction (so the box becomes larger by 2 * Expand in each axis).
GetMax
PointVector3d
Returns the boundary point with the maximum coords
GetMaxX
number
Returns the maximum X coord of the bounding box
GetMaxY
number
Returns the maximum Y coord of the bounding box
GetMaxZ
number
Returns the maximum Z coord of the bounding box
GetMin
PointVector3d
Returns the boundary point with the minimum coords
GetMinX
number
Returns the minimum X coord of the bounding box
GetMinY
number
Returns the minimum Y coord of the bounding box
GetMinZ
number
Returns the minimum Z coord of the bounding box
Intersect
OtherBboxcBoundingBox
boolean
IntersectioncBoundingBox
Checks if the intersection between this bounding box and another one is non-empty. Returns false if the intersection is empty, true and a new cBoundingBox representing the intersection of the two boxes.
IsInside
PointVector3d
boolean
Returns true if the specified point is inside (including on the edge) of the box.
IsInside
OtherBoxMinVector3d
OtherBoxMaxVector3d
boolean
Returns true if the other bounding box, specified by its 2 corners, is inside of this box.
IsInside
MinVector3d
MaxVector3d
PointVector3d
boolean
(STATIC) Returns true if the specified point is inside the bounding box specified by its min / max corners
IsInside
PointXnumber
PointYnumber
PointZnumber
boolean
Returns true if the specified point is inside (including on the edge) of the box.
IsInside
OtherBoundingBoxcBoundingBox
boolean
Returns true if OtherBoundingBox is inside of this box.
IsInside
MinVector3d
MaxVector3d
Xnumber
Ynumber
Znumber
boolean
(STATIC) Returns true if the specified point is inside the bounding box specified by its min / max corners
Move
OffsetXnumber
OffsetYnumber
OffsetZnumber
Moves the bounding box by the specified offset in each axis
Move
OffsetVector3d
Moves the bounding box by the specified offset in each axis
Union
OtherBoundingBoxcBoundingBox
cBoundingBox
Returns the smallest bounding box that contains both OtherBoundingBox and this bounding box. Note that unlike the strict geometrical meaning of "union", this operation actually returns a cBoundingBox.
Generated by APIDump on 2022-10-28 17:00:47, Build ID Unknown, Commit approx: 21ec3ebe26bff24b5fc6d96f86a441c9c9628247