Function fromMinMax

Synopsis

#include <Source/Falcor/Utils/Math/AABB.h>

static BoundingBox fromMinMax(const float3 &min, const float3 &max)

Description

Construct a bounding box from a minimum and maximum point.

Parameters:

[ in ] min - Minimum point

[ in ] max - Maximum point

Return
A bounding box

Source

Lines 107-113 in Source/Falcor/Utils/Math/AABB.h.

static BoundingBox fromMinMax(const float3& min, const float3& max)
{
    BoundingBox box;
    box.center = (max + min) * float3(0.5f);
    box.extent = (max - min) * float3(0.5f);
    return box;
}





Add Discussion as Guest

Log in to DocsForge