Merge branch 'master' of https://github.com/DigitalPulseSoftware/NazaraEngine
Former-commit-id: bdbe1aab7fe7f0241069aa2d9ab444897ba471cd [formerly 5fd04e51e2a7441252ef56f136bd9d81df380f75] Former-commit-id: d326241827c4021980631a210603c4d5b77cf6f3
This commit is contained in:
commit
4ab05c2803
|
|
@ -112,6 +112,12 @@ namespace Ndk
|
||||||
// Uninitialize the SDK
|
// Uninitialize the SDK
|
||||||
s_referenceCounter = 0;
|
s_referenceCounter = 0;
|
||||||
|
|
||||||
|
// Components
|
||||||
|
BaseComponent::Uninitialize();
|
||||||
|
|
||||||
|
// Systems
|
||||||
|
BaseSystem::Uninitialize();
|
||||||
|
|
||||||
// Uninitialize the engine
|
// Uninitialize the engine
|
||||||
|
|
||||||
#ifndef NDK_SERVER
|
#ifndef NDK_SERVER
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,19 @@ function NazaraBuild:Execute()
|
||||||
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local platformData
|
||||||
|
if (os.is64bit()) then
|
||||||
|
platformData = {"x64", "x86"}
|
||||||
|
else
|
||||||
|
platformData = {"x86", "x64"}
|
||||||
|
end
|
||||||
|
|
||||||
if (self.Actions[_ACTION] == nil) then
|
if (self.Actions[_ACTION] == nil) then
|
||||||
local makeLibDir = os.is("windows") and "mingw" or "gmake"
|
local makeLibDir = os.is("windows") and "mingw" or "gmake"
|
||||||
|
|
||||||
if (#self.OrderedExtLibs > 0) then
|
if (#self.OrderedExtLibs > 0) then
|
||||||
workspace("NazaraExtlibs")
|
workspace("NazaraExtlibs")
|
||||||
platforms({"x32", "x64"})
|
platforms(platformData)
|
||||||
|
|
||||||
-- Configuration générale
|
-- Configuration générale
|
||||||
configurations({
|
configurations({
|
||||||
|
|
@ -23,13 +30,13 @@ function NazaraBuild:Execute()
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
kind("StaticLib")
|
kind("StaticLib")
|
||||||
|
|
||||||
configuration("x32")
|
configuration("x86")
|
||||||
libdirs("../extlibs/lib/common/x86")
|
libdirs("../extlibs/lib/common/x86")
|
||||||
|
|
||||||
configuration("x64")
|
configuration("x64")
|
||||||
libdirs("../extlibs/lib/common/x64")
|
libdirs("../extlibs/lib/common/x64")
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
configuration({"codeblocks or codelite or gmake", "x86"})
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
||||||
targetdir("../extlibs/lib/" .. makeLibDir .. "/x86")
|
targetdir("../extlibs/lib/" .. makeLibDir .. "/x86")
|
||||||
|
|
||||||
|
|
@ -40,7 +47,7 @@ function NazaraBuild:Execute()
|
||||||
configuration("vs*")
|
configuration("vs*")
|
||||||
buildoptions("/MP")
|
buildoptions("/MP")
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
configuration({"vs*", "x86"})
|
||||||
libdirs("../extlibs/lib/msvc/x86")
|
libdirs("../extlibs/lib/msvc/x86")
|
||||||
targetdir("../extlibs/lib/msvc/x86")
|
targetdir("../extlibs/lib/msvc/x86")
|
||||||
|
|
||||||
|
|
@ -48,7 +55,7 @@ function NazaraBuild:Execute()
|
||||||
libdirs("../extlibs/lib/msvc/x64")
|
libdirs("../extlibs/lib/msvc/x64")
|
||||||
targetdir("../extlibs/lib/msvc/x64")
|
targetdir("../extlibs/lib/msvc/x64")
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
configuration({"xcode3 or xcode4", "x86"})
|
||||||
libdirs("../extlibs/lib/xcode/x86")
|
libdirs("../extlibs/lib/xcode/x86")
|
||||||
targetdir("../extlibs/lib/xcode/x86")
|
targetdir("../extlibs/lib/xcode/x86")
|
||||||
|
|
||||||
|
|
@ -102,7 +109,7 @@ function NazaraBuild:Execute()
|
||||||
end
|
end
|
||||||
|
|
||||||
workspace("NazaraEngine")
|
workspace("NazaraEngine")
|
||||||
platforms({"x32", "x64"})
|
platforms(platformData)
|
||||||
|
|
||||||
-- Configuration générale
|
-- Configuration générale
|
||||||
configurations({
|
configurations({
|
||||||
|
|
@ -171,14 +178,14 @@ function NazaraBuild:Execute()
|
||||||
libdirs("../lib")
|
libdirs("../lib")
|
||||||
libdirs("../extlibs/lib/common")
|
libdirs("../extlibs/lib/common")
|
||||||
|
|
||||||
configuration("x32")
|
configuration("x86")
|
||||||
libdirs("../extlibs/lib/common/x86")
|
libdirs("../extlibs/lib/common/x86")
|
||||||
|
|
||||||
configuration("x64")
|
configuration("x64")
|
||||||
defines("NAZARA_PLATFORM_x64")
|
defines("NAZARA_PLATFORM_x64")
|
||||||
libdirs("../extlibs/lib/common/x64")
|
libdirs("../extlibs/lib/common/x64")
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
configuration({"codeblocks or codelite or gmake", "x86"})
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x86")
|
libdirs("../lib/" .. makeLibDir .. "/x86")
|
||||||
targetdir("../lib/" .. makeLibDir .. "/x86")
|
targetdir("../lib/" .. makeLibDir .. "/x86")
|
||||||
|
|
@ -193,7 +200,7 @@ function NazaraBuild:Execute()
|
||||||
self:MakeCopyAfterBuild(moduleTable)
|
self:MakeCopyAfterBuild(moduleTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
configuration({"vs*", "x86"})
|
||||||
libdirs("../extlibs/lib/msvc/x86")
|
libdirs("../extlibs/lib/msvc/x86")
|
||||||
libdirs("../lib/msvc/x86")
|
libdirs("../lib/msvc/x86")
|
||||||
targetdir("../lib/msvc/x86")
|
targetdir("../lib/msvc/x86")
|
||||||
|
|
@ -203,7 +210,7 @@ function NazaraBuild:Execute()
|
||||||
libdirs("../lib/msvc/x64")
|
libdirs("../lib/msvc/x64")
|
||||||
targetdir("../lib/msvc/x64")
|
targetdir("../lib/msvc/x64")
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
configuration({"xcode3 or xcode4", "x86"})
|
||||||
libdirs("../extlibs/lib/xcode/x86")
|
libdirs("../extlibs/lib/xcode/x86")
|
||||||
libdirs("../lib/xcode/x86")
|
libdirs("../lib/xcode/x86")
|
||||||
targetdir("../lib/xcode/x86")
|
targetdir("../lib/xcode/x86")
|
||||||
|
|
@ -278,20 +285,20 @@ function NazaraBuild:Execute()
|
||||||
libdirs("../lib")
|
libdirs("../lib")
|
||||||
libdirs("../extlibs/lib/common")
|
libdirs("../extlibs/lib/common")
|
||||||
|
|
||||||
configuration("x32")
|
configuration("x86")
|
||||||
libdirs("../extlibs/lib/common/x86")
|
libdirs("../extlibs/lib/common/x86")
|
||||||
|
|
||||||
configuration("x64")
|
configuration("x64")
|
||||||
defines("NAZARA_PLATFORM_x64")
|
defines("NAZARA_PLATFORM_x64")
|
||||||
libdirs("../extlibs/lib/common/x64")
|
libdirs("../extlibs/lib/common/x64")
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
configuration({"codeblocks or codelite or gmake", "x86"})
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x86")
|
libdirs("../lib/" .. makeLibDir .. "/x86")
|
||||||
if (toolTable.Kind == "library") then
|
if (toolTable.Kind == "library") then
|
||||||
targetdir("../lib/" .. makeLibDir .. "/x86")
|
targetdir("../lib/" .. makeLibDir .. "/x86")
|
||||||
elseif (toolTable.Kind == "plugin") then
|
elseif (toolTable.Kind == "plugin") then
|
||||||
targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x32")
|
targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x86")
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x64"})
|
configuration({"codeblocks or codelite or gmake", "x64"})
|
||||||
|
|
@ -308,7 +315,7 @@ function NazaraBuild:Execute()
|
||||||
self:MakeCopyAfterBuild(toolTable)
|
self:MakeCopyAfterBuild(toolTable)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
configuration({"vs*", "x86"})
|
||||||
libdirs("../extlibs/lib/msvc/x86")
|
libdirs("../extlibs/lib/msvc/x86")
|
||||||
libdirs("../lib/msvc/x86")
|
libdirs("../lib/msvc/x86")
|
||||||
if (toolTable.Kind == "library") then
|
if (toolTable.Kind == "library") then
|
||||||
|
|
@ -326,7 +333,7 @@ function NazaraBuild:Execute()
|
||||||
targetdir("../plugins/" .. toolTable.Name .. "/lib/msvc/x64")
|
targetdir("../plugins/" .. toolTable.Name .. "/lib/msvc/x64")
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
configuration({"xcode3 or xcode4", "x86"})
|
||||||
libdirs("../extlibs/lib/xcode/x86")
|
libdirs("../extlibs/lib/xcode/x86")
|
||||||
libdirs("../lib/xcode/x86")
|
libdirs("../lib/xcode/x86")
|
||||||
if (toolTable.Kind == "library") then
|
if (toolTable.Kind == "library") then
|
||||||
|
|
@ -406,26 +413,26 @@ function NazaraBuild:Execute()
|
||||||
includedirs(exampleTable.Includes)
|
includedirs(exampleTable.Includes)
|
||||||
links(exampleTable.Libraries)
|
links(exampleTable.Libraries)
|
||||||
|
|
||||||
configuration("x32")
|
configuration("x86")
|
||||||
libdirs("../extlibs/lib/common/x86")
|
libdirs("../extlibs/lib/common/x86")
|
||||||
|
|
||||||
configuration("x64")
|
configuration("x64")
|
||||||
defines("NAZARA_PLATFORM_x64")
|
defines("NAZARA_PLATFORM_x64")
|
||||||
libdirs("../extlibs/lib/common/x64")
|
libdirs("../extlibs/lib/common/x64")
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
configuration({"codeblocks or codelite or gmake", "x86"})
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x86")
|
libdirs("../lib/" .. makeLibDir .. "/x86")
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x64"})
|
configuration({"codeblocks or codelite or gmake", "x64"})
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x64")
|
libdirs("../lib/" .. makeLibDir .. "/x64")
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
configuration({"vs*", "x86"})
|
||||||
libdirs("../lib/msvc/x86")
|
libdirs("../lib/msvc/x86")
|
||||||
|
|
||||||
configuration({"vs*", "x64"})
|
configuration({"vs*", "x64"})
|
||||||
libdirs("../lib/msvc/x64")
|
libdirs("../lib/msvc/x64")
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
configuration({"xcode3 or xcode4", "x86"})
|
||||||
libdirs("../lib/xcode/x86")
|
libdirs("../lib/xcode/x86")
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x64"})
|
configuration({"xcode3 or xcode4", "x64"})
|
||||||
|
|
@ -801,6 +808,17 @@ function NazaraBuild:Process(infoTable)
|
||||||
for k,v in ipairs(toolTable.Includes) do
|
for k,v in ipairs(toolTable.Includes) do
|
||||||
table.insert(infoTable.Includes, v)
|
table.insert(infoTable.Includes, v)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- And libraries
|
||||||
|
for k, v in pairs(toolTable.Libraries) do
|
||||||
|
table.insert(infoTable.Libraries, v)
|
||||||
|
end
|
||||||
|
|
||||||
|
for config, libs in pairs(toolTable.ConfigurationLibraries) do
|
||||||
|
for k,v in pairs(libs) do
|
||||||
|
table.insert(infoTable.ConfigurationLibraries[config], v)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
||||||
|
|
@ -853,8 +871,8 @@ function NazaraBuild:MakeCopyAfterBuild(infoTable)
|
||||||
|
|
||||||
for k,v in pairs(table.join(infoTable.Libraries, infoTable.DynLib)) do
|
for k,v in pairs(table.join(infoTable.Libraries, infoTable.DynLib)) do
|
||||||
local paths = {}
|
local paths = {}
|
||||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/" .. v .. ".dll"})
|
table.insert(paths, {"x86", "../extlibs/lib/common/x86/" .. v .. ".dll"})
|
||||||
table.insert(paths, {"x32", "../extlibs/lib/common/x86/lib" .. v .. ".dll"})
|
table.insert(paths, {"x86", "../extlibs/lib/common/x86/lib" .. v .. ".dll"})
|
||||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/" .. v .. ".dll"})
|
table.insert(paths, {"x64", "../extlibs/lib/common/x64/" .. v .. ".dll"})
|
||||||
table.insert(paths, {"x64", "../extlibs/lib/common/x64/lib" .. v .. ".dll"})
|
table.insert(paths, {"x64", "../extlibs/lib/common/x64/lib" .. v .. ".dll"})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,19 +5,26 @@ MODULE.Defines = {
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE.Libraries = {
|
MODULE.Libraries = {
|
||||||
"NazaraCore",
|
"NazaraCore"
|
||||||
|
}
|
||||||
|
|
||||||
|
MODULE.OsLibraries.Windows = {
|
||||||
"sndfile-1"
|
"sndfile-1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MODULE.OsLibraries.Posix = {
|
||||||
|
"sndfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
MODULE.OsDynLib.Windows = {
|
||||||
|
"soft_oal"
|
||||||
|
}
|
||||||
|
|
||||||
MODULE.OsFiles.Windows = {
|
MODULE.OsFiles.Windows = {
|
||||||
"../src/Nazara/Audio/Win32/**.hpp",
|
"../src/Nazara/Audio/Win32/**.hpp",
|
||||||
"../src/Nazara/Audio/Win32/**.cpp"
|
"../src/Nazara/Audio/Win32/**.cpp"
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE.OsDynLib.Windows = {
|
|
||||||
"soft_oal"
|
|
||||||
}
|
|
||||||
|
|
||||||
MODULE.OsFiles.Posix = {
|
MODULE.OsFiles.Posix = {
|
||||||
"../src/Nazara/Audio/Posix/**.hpp",
|
"../src/Nazara/Audio/Posix/**.hpp",
|
||||||
"../src/Nazara/Audio/Posix/**.cpp"
|
"../src/Nazara/Audio/Posix/**.cpp"
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,5 @@ MODULE.Name = "Physics"
|
||||||
|
|
||||||
MODULE.Libraries = {
|
MODULE.Libraries = {
|
||||||
"NazaraCore",
|
"NazaraCore",
|
||||||
"newton"
|
"Newton"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
MODULE.Name = "Utility"
|
MODULE.Name = "Utility"
|
||||||
|
|
||||||
MODULE.Libraries = {
|
MODULE.Libraries = {
|
||||||
"freetype-s",
|
|
||||||
"NazaraCore",
|
"NazaraCore",
|
||||||
"stb_image"
|
"stb_image"
|
||||||
}
|
}
|
||||||
|
|
@ -17,10 +16,12 @@ MODULE.OsFiles.Posix = {
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE.OsLibraries.Windows = {
|
MODULE.OsLibraries.Windows = {
|
||||||
|
"freetype-s",
|
||||||
"gdi32"
|
"gdi32"
|
||||||
}
|
}
|
||||||
|
|
||||||
MODULE.OsLibraries.Posix = {
|
MODULE.OsLibraries.Posix = {
|
||||||
|
"freetype",
|
||||||
"X11",
|
"X11",
|
||||||
"xcb",
|
"xcb",
|
||||||
"xcb-cursor",
|
"xcb-cursor",
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,5 @@ EXAMPLE.Files = {
|
||||||
}
|
}
|
||||||
|
|
||||||
EXAMPLE.Libraries = {
|
EXAMPLE.Libraries = {
|
||||||
"NazaraCore",
|
|
||||||
"NazaraGraphics",
|
|
||||||
"NazaraRenderer",
|
|
||||||
"NazaraUtility",
|
|
||||||
"NazaraSDK"
|
"NazaraSDK"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
EXAMPLE.Name = "Tut00_EmptyProject"
|
||||||
|
|
||||||
|
EXAMPLE.Console = true
|
||||||
|
|
||||||
|
EXAMPLE.Files = {
|
||||||
|
"main.cpp"
|
||||||
|
}
|
||||||
|
|
||||||
|
EXAMPLE.Libraries = {
|
||||||
|
"NazaraAudio",
|
||||||
|
"NazaraCore",
|
||||||
|
"NazaraGraphics",
|
||||||
|
"NazaraLua",
|
||||||
|
"NazaraNetwork",
|
||||||
|
"NazaraNoise",
|
||||||
|
"NazaraPhysics",
|
||||||
|
"NazaraRenderer",
|
||||||
|
"NazaraUtility",
|
||||||
|
"NazaraSDK"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
#include <Nazara/Audio.hpp>
|
||||||
|
#include <Nazara/Core.hpp>
|
||||||
|
#include <Nazara/Graphics.hpp>
|
||||||
|
#include <Nazara/Lua.hpp>
|
||||||
|
#include <Nazara/Network.hpp>
|
||||||
|
#include <Nazara/Noise.hpp>
|
||||||
|
#include <Nazara/Physics.hpp>
|
||||||
|
#include <Nazara/Renderer.hpp>
|
||||||
|
#include <Nazara/Utility.hpp>
|
||||||
|
#include <NDK/Application.hpp>
|
||||||
|
#include <iostream>
|
||||||
|
#include <vector>
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
// This "example" has only one purpose: Giving an empty project for you to test whatever you want
|
||||||
|
// If you wish to have multiple test projects, you only have to copy/paste this directory and change the name in the build.lua
|
||||||
|
Ndk::Application app;
|
||||||
|
|
||||||
|
// Do what you want here
|
||||||
|
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
@ -7,9 +7,5 @@ EXAMPLE.Files = {
|
||||||
}
|
}
|
||||||
|
|
||||||
EXAMPLE.Libraries = {
|
EXAMPLE.Libraries = {
|
||||||
"NazaraCore",
|
|
||||||
"NazaraGraphics",
|
|
||||||
"NazaraRenderer",
|
|
||||||
"NazaraUtility",
|
|
||||||
"NazaraSDK"
|
"NazaraSDK"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,6 @@ namespace Nz
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include <Nazara/Graphics/dEPTHRenderTechnique.inl>
|
#include <Nazara/Graphics/DepthRenderTechnique.inl>
|
||||||
|
|
||||||
#endif // NAZARA_DEPTHRENDERTECHNIQUE_HPP
|
#endif // NAZARA_DEPTHRENDERTECHNIQUE_HPP
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
#include <Nazara/Physics/Enums.hpp>
|
#include <Nazara/Physics/Enums.hpp>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
struct NewtonCollision;
|
class NewtonCollision;
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
#include <Nazara/Physics/Config.hpp>
|
#include <Nazara/Physics/Config.hpp>
|
||||||
#include <Nazara/Physics/Geom.hpp>
|
#include <Nazara/Physics/Geom.hpp>
|
||||||
|
|
||||||
struct NewtonBody;
|
class NewtonBody;
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include <Nazara/Math/Vector3.hpp>
|
#include <Nazara/Math/Vector3.hpp>
|
||||||
#include <Nazara/Physics/Config.hpp>
|
#include <Nazara/Physics/Config.hpp>
|
||||||
|
|
||||||
struct NewtonWorld;
|
class NewtonWorld;
|
||||||
|
|
||||||
namespace Nz
|
namespace Nz
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ namespace Nz
|
||||||
PhysObject::~PhysObject()
|
PhysObject::~PhysObject()
|
||||||
{
|
{
|
||||||
if (m_body)
|
if (m_body)
|
||||||
NewtonDestroyBody(m_world->GetHandle(), m_body);
|
NewtonDestroyBody(m_body);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysObject::AddForce(const Vector3f& force, CoordSys coordSys)
|
void PhysObject::AddForce(const Vector3f& force, CoordSys coordSys)
|
||||||
|
|
@ -304,11 +304,13 @@ namespace Nz
|
||||||
Vector3f min, max;
|
Vector3f min, max;
|
||||||
NewtonBodyGetAABB(m_body, min, max);
|
NewtonBodyGetAABB(m_body, min, max);
|
||||||
|
|
||||||
NewtonWorldForEachBodyInAABBDo(m_world->GetHandle(), min, max, [](const NewtonBody* const body, void* const userData)
|
NewtonWorldForEachBodyInAABBDo(m_world->GetHandle(), min, max, [](const NewtonBody* const body, void* const userData) -> int
|
||||||
{
|
{
|
||||||
NazaraUnused(userData);
|
NazaraUnused(userData);
|
||||||
NewtonBodySetSleepState(body, 0);
|
NewtonBodySetSleepState(body, 0);
|
||||||
}, nullptr);
|
return 1;
|
||||||
|
},
|
||||||
|
nullptr);
|
||||||
}
|
}
|
||||||
/*for (std::set<PhysObjectListener*>::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
|
/*for (std::set<PhysObjectListener*>::iterator it = m_listeners.begin(); it != m_listeners.end(); ++it)
|
||||||
(*it)->PhysObjectOnUpdate(this);*/
|
(*it)->PhysObjectOnUpdate(this);*/
|
||||||
|
|
@ -317,7 +319,7 @@ namespace Nz
|
||||||
PhysObject& PhysObject::operator=(PhysObject&& object)
|
PhysObject& PhysObject::operator=(PhysObject&& object)
|
||||||
{
|
{
|
||||||
if (m_body)
|
if (m_body)
|
||||||
NewtonDestroyBody(m_world->GetHandle(), m_body);
|
NewtonDestroyBody(m_body);
|
||||||
|
|
||||||
m_body = object.m_body;
|
m_body = object.m_body;
|
||||||
m_forceAccumulator = std::move(object.m_forceAccumulator);
|
m_forceAccumulator = std::move(object.m_forceAccumulator);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue