/
BirdLeon
/
ROBLOX2016
Обзор
Документация
Войти
/
BirdLeon
/
ROBLOX2016
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
App/util/Region3.cpp
45 строк
715 B
PatoFlamejanteTV
full source code
19 дек 2024, 19:11
19 дек 2024, 19:11
05db15d
Код
Авторство
О чём код?
#include "stdafx.h" #include "Util/Region3.h" #include "Util/Extents.h" #include "Reflection/Type.h" namespace RBX { namespace Reflection { template<> const Type& Type::getSingleton<Region3>() { static TType<Region3> type("Region3"); return type; } } Region3::Region3() {} Region3::Region3(const Vector3& min, const Vector3& max) { init(Extents(min, max)); } Region3::Region3(const Extents &extents) { init(extents); } void Region3::init(const Extents &extents) { cframe = CoordinateFrame(extents.center()); size = extents.size(); } Vector3 Region3::minPos() const { return cframe.translation - (size * 0.5f); } Vector3 Region3::maxPos() const { return cframe.translation + (size * 0.5f); } }