Merge branch 'master' into NDK
Conflicts: src/Nazara/Physics/Geom.cpp Former-commit-id: 8fd71e34dbe105890042acc55e30b64e7c457ed4
This commit is contained in:
@@ -18,25 +18,8 @@
|
||||
class NAZARA_API NzGuillotineBinPack
|
||||
{
|
||||
public:
|
||||
enum FreeRectChoiceHeuristic
|
||||
{
|
||||
RectBestAreaFit,
|
||||
RectBestLongSideFit,
|
||||
RectBestShortSideFit,
|
||||
RectWorstAreaFit,
|
||||
RectWorstLongSideFit,
|
||||
RectWorstShortSideFit
|
||||
};
|
||||
|
||||
enum GuillotineSplitHeuristic
|
||||
{
|
||||
SplitLongerAxis,
|
||||
SplitLongerLeftoverAxis,
|
||||
SplitMaximizeArea,
|
||||
SplitMinimizeArea,
|
||||
SplitShorterAxis,
|
||||
SplitShorterLeftoverAxis
|
||||
};
|
||||
enum FreeRectChoiceHeuristic : int;
|
||||
enum GuillotineSplitHeuristic : int;
|
||||
|
||||
NzGuillotineBinPack();
|
||||
NzGuillotineBinPack(unsigned int width, unsigned int height);
|
||||
@@ -70,6 +53,26 @@ class NAZARA_API NzGuillotineBinPack
|
||||
NzGuillotineBinPack& operator=(const NzGuillotineBinPack&) = default;
|
||||
NzGuillotineBinPack& operator=(NzGuillotineBinPack&&) = default;
|
||||
|
||||
enum FreeRectChoiceHeuristic : int
|
||||
{
|
||||
RectBestAreaFit,
|
||||
RectBestLongSideFit,
|
||||
RectBestShortSideFit,
|
||||
RectWorstAreaFit,
|
||||
RectWorstLongSideFit,
|
||||
RectWorstShortSideFit
|
||||
};
|
||||
|
||||
enum GuillotineSplitHeuristic : int
|
||||
{
|
||||
SplitLongerAxis,
|
||||
SplitLongerLeftoverAxis,
|
||||
SplitMaximizeArea,
|
||||
SplitMinimizeArea,
|
||||
SplitShorterAxis,
|
||||
SplitShorterLeftoverAxis
|
||||
};
|
||||
|
||||
private:
|
||||
void SplitFreeRectAlongAxis(const NzRectui& freeRect, const NzRectui& placedRect, bool splitHorizontal);
|
||||
void SplitFreeRectByHeuristic(const NzRectui& freeRect, const NzRectui& placedRect, GuillotineSplitHeuristic method);
|
||||
|
||||
@@ -46,8 +46,8 @@ class NAZARA_API NzView : public NzAbstractViewer, public NzNode, NzRenderTarget
|
||||
float GetZFar() const;
|
||||
float GetZNear() const;
|
||||
|
||||
NzVector2i MapWorldToPixel(const NzVector2f& coords);
|
||||
NzVector2f MapPixelToWorld(const NzVector2i& pixel);
|
||||
NzVector2i MapWorldToPixel(const NzVector2f& coords);
|
||||
|
||||
void SetSize(const NzVector2f& size);
|
||||
void SetSize(float width, float height);
|
||||
|
||||
@@ -19,8 +19,15 @@ enum nzLuaComparison
|
||||
enum nzLuaOperation
|
||||
{
|
||||
nzLuaOperation_Addition,
|
||||
nzLuaOperation_BitwiseAnd,
|
||||
nzLuaOperation_BitwiseLeftShift,
|
||||
nzLuaOperation_BitwiseNot,
|
||||
nzLuaOperation_BitwiseOr,
|
||||
nzLuaOperation_BitwideRightShift,
|
||||
nzLuaOperation_BitwiseXOr,
|
||||
nzLuaOperation_Division,
|
||||
nzLuaOperation_Exponentiation,
|
||||
nzLuaOperation_FloorDivision,
|
||||
nzLuaOperation_Modulo,
|
||||
nzLuaOperation_Multiplication,
|
||||
nzLuaOperation_Negation,
|
||||
|
||||
@@ -35,6 +35,9 @@ class NAZARA_API NzLuaInstance : NzNonCopyable
|
||||
int ArgError(unsigned int argNum, const char* error);
|
||||
int ArgError(unsigned int argNum, const NzString& error);
|
||||
|
||||
bool Call(unsigned int argCount);
|
||||
bool Call(unsigned int argCount, unsigned int resultCount);
|
||||
|
||||
void CheckAny(int index) const;
|
||||
bool CheckBoolean(int index) const;
|
||||
bool CheckBoolean(int index, bool defValue) const;
|
||||
@@ -146,7 +149,7 @@ class NAZARA_API NzLuaInstance : NzNonCopyable
|
||||
static NzLuaInstance* GetInstance(lua_State* state);
|
||||
|
||||
private:
|
||||
bool Run();
|
||||
bool Run(int argCount, int resultCount);
|
||||
|
||||
static void* MemoryAllocator(void *ud, void *ptr, std::size_t osize, std::size_t nsize);
|
||||
static int ProxyFunc(lua_State* state);
|
||||
|
||||
@@ -748,7 +748,6 @@ NzMatrix4<T>& NzMatrix4<T>::Set(const T matrix[16])
|
||||
template<typename T>
|
||||
NzMatrix4<T>& NzMatrix4<T>::Set(const NzMatrix4& matrix)
|
||||
{
|
||||
// Le membre isIdentity est copié en même temps que les valeurs
|
||||
std::memcpy(this, &matrix, sizeof(NzMatrix4));
|
||||
|
||||
return *this;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Physics module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Physics module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
// On suppose que Debug.hpp a déjà été inclus, tout comme Config.hpp
|
||||
// On suppose que Debug.hpp a déjà été inclus, tout comme Config.hpp
|
||||
#if NAZARA_PHYSICS_MANAGE_MEMORY
|
||||
#undef delete
|
||||
#undef new
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Physics module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ class NAZARA_API NzRenderTexture : public NzRenderTarget, NzObjectListener, NzNo
|
||||
private:
|
||||
bool OnObjectDestroy(const NzRefCounted* object, int index) override;
|
||||
void UpdateDrawBuffers() const;
|
||||
void UpdateSize() const;
|
||||
void UpdateTargets() const;
|
||||
|
||||
NzRenderTextureImpl* m_impl = nullptr;
|
||||
|
||||
@@ -25,7 +25,12 @@ class NAZARA_API NzSimpleTextDrawer : public NzAbstractTextDrawer, NzObjectListe
|
||||
unsigned int GetCharacterSize() const;
|
||||
const NzColor& GetColor() const;
|
||||
NzFont* GetFont() const;
|
||||
NzFont* GetFont(unsigned int index) const override;
|
||||
unsigned int GetFontCount() const override;
|
||||
const Glyph& GetGlyph(unsigned int index) const override;
|
||||
unsigned int GetGlyphCount() const override;
|
||||
nzUInt32 GetStyle() const;
|
||||
const NzString& GetText() const;
|
||||
|
||||
void SetCharacterSize(unsigned int characterSize);
|
||||
void SetColor(const NzColor& color);
|
||||
@@ -37,11 +42,6 @@ class NAZARA_API NzSimpleTextDrawer : public NzAbstractTextDrawer, NzObjectListe
|
||||
static NzSimpleTextDrawer Draw(NzFont* font, const NzString& str, unsigned int characterSize, nzUInt32 style = nzTextStyle_Regular, const NzColor& color = NzColor::White);
|
||||
|
||||
private:
|
||||
NzFont* GetFont(unsigned int index) const override;
|
||||
unsigned int GetFontCount() const override;
|
||||
const Glyph& GetGlyph(unsigned int index) const override;
|
||||
unsigned int GetGlyphCount() const override;
|
||||
|
||||
bool OnObjectModified(const NzRefCounted* object, int index, unsigned int code) override;
|
||||
void OnObjectReleased(const NzRefCounted* object, int index) override;
|
||||
void UpdateGlyphs() const;
|
||||
|
||||
Reference in New Issue
Block a user