MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / MakeScaled

Method MakeScaled

Source/Engine/Core/Math/BoundingBox.cpp:105–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105BoundingBox BoundingBox::MakeScaled(const BoundingBox& box, Real scale)
106{
107 Vector3 size;
108 Vector3::Subtract(box.Maximum, box.Minimum, size);
109 Vector3 sizeHalf = size * 0.5f;
110 const Vector3 center = box.Minimum + sizeHalf;
111 sizeHalf = sizeHalf * scale;
112 return BoundingBox(center - sizeHalf, center + sizeHalf);
113}
114
115void BoundingBox::Transform(const BoundingBox& box, const Matrix& matrix, BoundingBox& result)
116{

Callers

nothing calls this directly

Calls 2

SubtractFunction · 0.85
BoundingBoxFunction · 0.70

Tested by

no test coverage detected