Refactored mathematics module
Added AABBs Added code examples Added experimental support for texture arrays (1D/2D) Added initialisers (new way of initialising modules) Added global headers (Plus a global header generator script) Added pattern support for directory Added support for spinlocks critical section on Windows Added NzRenderWindow::SetFramerateLimit Core project now includes Mathematics files Fixed color implementation using double Fixed declaration needing renderer include Fixed MLT not clearing nextFree(File/Line) after Free Fixed move operators not being noexcept Fixed thread-safety (Now working correctly - If I'm lucky) Moved Resource to core New interface for modules New interface for the renderer Put some global functions to anonymous namespace Removed empty modules Renamed ThreadCondition to ConditionVariable Replaced redirect to cerr log option by duplicate to cout Setting mouse position relative to a window will make this window ignore the event Shaders sending methods no longer takes the uniform variable name (it's using ID instead) Using new OpenGL 4.3 header
This commit is contained in:
50
include/Nazara/Utility/AxisAlignedBox.hpp
Normal file
50
include/Nazara/Utility/AxisAlignedBox.hpp
Normal file
@@ -0,0 +1,50 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
|
||||
#ifndef NAZARA_AXISALIGNEDBOX_HPP
|
||||
#define NAZARA_AXISALIGNEDBOX_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <Nazara/Math/Cube.hpp>
|
||||
#include <Nazara/Math/Vector3.hpp>
|
||||
#include <Nazara/Utility/Enums.hpp>
|
||||
|
||||
class NAZARA_API NzAxisAlignedBox
|
||||
{
|
||||
public:
|
||||
NzAxisAlignedBox();
|
||||
NzAxisAlignedBox(const NzVector3f& vec1, const NzVector3f& vec2);
|
||||
NzAxisAlignedBox(nzExtend extend);
|
||||
|
||||
bool Contains(const NzAxisAlignedBox& box);
|
||||
|
||||
void ExtendTo(const NzAxisAlignedBox& box);
|
||||
void ExtendTo(const NzVector3f& vector);
|
||||
|
||||
nzExtend GetExtend() const;
|
||||
NzVector3f GetMaximum() const;
|
||||
NzVector3f GetMinimum() const;
|
||||
|
||||
bool IsFinite() const;
|
||||
bool IsInfinite() const;
|
||||
bool IsNull() const;
|
||||
|
||||
void SetInfinite();
|
||||
void SetExtends(const NzVector3f& vec1, const NzVector3f& vec2);
|
||||
void SetNull();
|
||||
|
||||
NzString ToString() const;
|
||||
|
||||
static const NzAxisAlignedBox Infinite;
|
||||
static const NzAxisAlignedBox Null;
|
||||
|
||||
private:
|
||||
nzExtend m_extend;
|
||||
NzCubef m_cube;
|
||||
};
|
||||
|
||||
NAZARA_API std::ostream& operator<<(std::ostream& out, const NzAxisAlignedBox& aabb);
|
||||
|
||||
#endif // NAZARA_AXISALIGNEDBOX_HPP
|
||||
Reference in New Issue
Block a user