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

Method GetBox

Source/Engine/Content/Assets/ModelBase.cpp:118–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118BoundingBox ModelLODBase::GetBox() const
119{
120 Vector3 min = Vector3::Maximum, max = Vector3::Minimum;
121 Vector3 corners[8];
122 const int32 meshCount = GetMeshesCount();
123 for (int32 meshIndex = 0; meshIndex < meshCount; meshIndex++)
124 {
125 GetMesh(meshIndex)->GetBox().GetCorners(corners);
126 for (int32 i = 0; i < 8; i++)
127 {
128 min = Vector3::Min(min, corners[i]);
129 max = Vector3::Max(max, corners[i]);
130 }
131 }
132 return BoundingBox(min, max);
133}
134
135BoundingBox ModelLODBase::GetBox(const Matrix& world) const
136{

Callers

nothing calls this directly

Calls 8

GetMeshFunction · 0.85
MinFunction · 0.50
MaxFunction · 0.50
BoundingBoxClass · 0.50
TransformClass · 0.50
GetCornersMethod · 0.45
GetBoundsMethod · 0.45
LocalToWorldMethod · 0.45

Tested by

no test coverage detected