MCPcopy Create free account
hub / github.com/NazaraEngine/NazaraEngine / ComputeAABB

Function ComputeAABB

src/Nazara/Utility/AlgorithmUtility.cpp:637–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

635 /**********************************Compute**********************************/
636
637 Boxf ComputeAABB(SparsePtr<const Vector3f> positionPtr, unsigned int vertexCount)
638 {
639 Boxf aabb;
640 if (vertexCount > 0)
641 {
642 aabb.Set(positionPtr->x, positionPtr->y, positionPtr->z, 0.f, 0.f, 0.f);
643 ++positionPtr;
644
645 for (unsigned int i = 1; i < vertexCount; ++i)
646 aabb.ExtendTo(*positionPtr++);
647 }
648 else
649 aabb.MakeZero();
650
651 return aabb;
652 }
653
654 void ComputeBoxIndexVertexCount(const Vector3ui& subdivision, unsigned int* indexCount, unsigned int* vertexCount)
655 {

Callers 2

ComputeAABBMethod · 0.85
GenerateAABBMethod · 0.85

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected