Big skeletal animation update
Added MeshInfos demo Added MD5Mesh/MD5Anim loader support Added Node class Fixed ResourceParams not being exported Added support for skeletal animation (Animation/Mesh/Joint/SkeletalMesh/Skeleton) Meshes are now only stored with VertexStruct_XYZ_Normal_UV_Tangent type Moved Sequence declaration to Sequence.hpp -Animation: Renamed Create to Create[Keyframe|Skeletal] -AxisAlignedBox: Added Contains method Added GetCorner method Added GetCube method Added Transform method -Cube/Rect: Added GetPosition method Added GetSize method (Almost) Fixed ExtendTo method Fixed GetCenter method -File: Added GetDirectory static function Added GetPath method Renamed GetDirectoryPath method to GetDirectory -Math module: Fixed constructor/methods taking a non-const array GetNormal/Normalize methods now takes an optionnal integer pointer (returning length) Made all classes default constructor trivial Inverse, MakeIdentity, MakeZero, Normalize, Set methods now returns reference to object -Matrix4: Modified methods to avoid copies Removed COW (Too much overhead) Removed Concatenate[Affine] static function -Mesh: Renamed Create to Create[Keyframe|Skeletal|Static] Renamed Skin to Material -MeshParams: No longer takes declaration argument Renamed loadAnimations to animated Storage default to BufferStorage_Hardware if supported and BufferStorage_Software otherwise -OpenGL: Added glGetBooleanv function Added glIsEnabled function -Quaternion: Added ComputeW method Added Conjugate method -Renderer: Added IsEnabled static function Fixed GetLineWidth function not being static Removed SetVertexDeclaration -RenderWindow: Made CopyTo[Image|Texture] method constant -Resource Fixed RemoveResourceListener crash -ResourceLoader: Loaders are now used in a LIFO context -Stream: Renamed GetLine method to ReadLine -String: Fixed Simplified -Utility module Added configuration define for strict resource parsing -VertexBuffer Now takes a VertexDeclaration pointer -VertexDeclaration No longer throw an error when getting a non-existing element Former-commit-id: f7358c1231d6af48b799d2f24f077a001e16785b
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Nazara Engine - Core module
|
||||
|
||||
Copyright (C) 2012 Jérôme "Lynix" Leclercq (Lynix680@gmail.com)
|
||||
Copyright (C) 2012 Jérôme "Lynix" Leclercq (Lynix680@gmail.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -27,39 +27,36 @@
|
||||
#ifndef NAZARA_CONFIG_CORE_HPP
|
||||
#define NAZARA_CONFIG_CORE_HPP
|
||||
|
||||
/// Chaque modification d'un paramètre du module nécessite une recompilation de celui-ci
|
||||
/// Chaque modification d'un paramètre du module nécessite une recompilation de celui-ci
|
||||
|
||||
// Appelle exit dès qu'une assertion est invalide
|
||||
// Appelle exit dès qu'une assertion est invalide
|
||||
#define NAZARA_CORE_EXIT_ON_ASSERT_FAILURE 1
|
||||
|
||||
// Teste les assertions
|
||||
#define NAZARA_CORE_ENABLE_ASSERTS 0
|
||||
|
||||
// Taille du buffer lors d'une lecture complète d'un fichier (ex: Hash)
|
||||
// Taille du buffer lors d'une lecture complète d'un fichier (ex: Hash)
|
||||
#define NAZARA_CORE_FILE_BUFFERSIZE 4096
|
||||
|
||||
// Le moteur doit-il incorporer les Unicode Character Data (Nécessaires pour faire fonctionner le flag NzString::HandleUTF8)
|
||||
// Incorpore la table Unicode Character Data (Nécessaires pour faire fonctionner le flag NzString::HandleUTF8)
|
||||
#define NAZARA_CORE_INCLUDE_UNICODEDATA 0
|
||||
|
||||
// Utilise un tracker pour repérer les éventuels leaks (Ralentit l'exécution)
|
||||
// Utilise un tracker pour repérer les éventuels leaks (Ralentit l'exécution)
|
||||
#define NAZARA_CORE_MEMORYLEAKTRACKER 0
|
||||
|
||||
// Standardise les séparateurs des dossiers selon le système d'exploitation courant (Léger coût à l'exécution)
|
||||
#define NAZARA_CORE_NORMALIZE_DIRECTORY_SEPARATORS 1
|
||||
|
||||
// Précision des réels lors de la transformation en texte (Max. chiffres après la virgule)
|
||||
// Précision des réels lors de la transformation en texte (Max. chiffres après la virgule)
|
||||
#define NAZARA_CORE_REAL_PRECISION 6
|
||||
|
||||
// Duplique la sortie du log sur le flux de sortie standard (cout)
|
||||
#define NAZARA_CORE_DUPLICATE_TO_COUT 0
|
||||
|
||||
// Active les tests de sécurité basés sur le code (Conseillé pour le développement)
|
||||
// Active les tests de sécurité basés sur le code (Conseillé pour le développement)
|
||||
#define NAZARA_CORE_SAFE 1
|
||||
|
||||
// Protège les classes des accès concurrentiels
|
||||
// Protège les classes des accès concurrentiels
|
||||
#define NAZARA_CORE_THREADSAFE 1
|
||||
|
||||
// Les classes à protéger des accès concurrentiels
|
||||
// Les classes à protéger des accès concurrentiels
|
||||
#define NAZARA_THREADSAFETY_BYTEARRAY 1 // NzByteArray (COW)
|
||||
#define NAZARA_THREADSAFETY_CLOCK 0 // NzClock
|
||||
#define NAZARA_THREADSAFETY_DIRECTORY 1 // NzDirectory
|
||||
@@ -71,14 +68,14 @@
|
||||
#define NAZARA_THREADSAFETY_STRING 1 // NzString (COW)
|
||||
#define NAZARA_THREADSAFETY_STRINGSTREAM 0 // NzStringStream
|
||||
|
||||
// Le nombre de spinlocks à utiliser avec les critical sections de Windows (0 pour désactiver)
|
||||
// Le nombre de spinlocks à utiliser avec les critical sections de Windows (0 pour désactiver)
|
||||
#define NAZARA_CORE_WINDOWS_CS_SPINLOCKS 4096
|
||||
|
||||
// Optimise certaines parties du code avec certaines avancées venues de Windows Vista (Casse la compatibilité XP mais n'affecte pas les autres OS)
|
||||
// Optimise l'implémentation Windows avec certaines avancées de Windows vista (Casse la compatibilité XP)
|
||||
#define NAZARA_CORE_WINDOWS_VISTA 0
|
||||
|
||||
/*
|
||||
// Règle le temps entre le réveil du thread des timers et l'activation d'un timer (En millisecondes)
|
||||
// Règle le temps entre le réveil du thread des timers et l'activation d'un timer (En millisecondes)
|
||||
#define NAZARA_CORE_TIMER_WAKEUPTIME 10
|
||||
*/
|
||||
|
||||
|
||||
@@ -67,11 +67,11 @@ class NAZARA_API NzFile : public NzHashable, public NzInputStream, NzNonCopyable
|
||||
|
||||
time_t GetCreationTime() const;
|
||||
nzUInt64 GetCursorPos() const;
|
||||
NzString GetDirectoryPath() const;
|
||||
NzString GetFilePath() const;
|
||||
NzString GetDirectory() const;
|
||||
NzString GetFileName() const;
|
||||
time_t GetLastAccessTime() const;
|
||||
time_t GetLastWriteTime() const;
|
||||
NzString GetPath() const;
|
||||
nzUInt64 GetSize() const;
|
||||
|
||||
bool IsOpen() const;
|
||||
@@ -99,12 +99,13 @@ class NAZARA_API NzFile : public NzHashable, public NzInputStream, NzNonCopyable
|
||||
static bool Delete(const NzString& filePath);
|
||||
static bool Exists(const NzString& filePath);
|
||||
static time_t GetCreationTime(const NzString& filePath);
|
||||
static NzString GetDirectory(const NzString& filePath);
|
||||
static time_t GetLastAccessTime(const NzString& filePath);
|
||||
static time_t GetLastWriteTime(const NzString& filePath);
|
||||
static NzHashDigest GetHash(const NzString& filePath, nzHash hash);
|
||||
static NzHashDigest GetHash(const NzString& filePath, NzHashImpl* hash);
|
||||
static nzUInt64 GetSize(const NzString& filePath);
|
||||
static bool IsAbsolute(const NzString& path);
|
||||
static bool IsAbsolute(const NzString& filePath);
|
||||
static NzString NormalizePath(const NzString& filePath);
|
||||
static NzString NormalizeSeparators(const NzString& filePath);
|
||||
static bool Rename(const NzString& sourcePath, const NzString& targetPath);
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Stream.hpp>
|
||||
|
||||
class NzString;
|
||||
|
||||
class NAZARA_API NzInputStream : public NzStream
|
||||
{
|
||||
public:
|
||||
@@ -19,10 +17,10 @@ class NAZARA_API NzInputStream : public NzStream
|
||||
|
||||
virtual bool EndOfStream() const = 0;
|
||||
|
||||
virtual NzString GetLine(unsigned int lineSize = 0);
|
||||
virtual nzUInt64 GetSize() const = 0;
|
||||
|
||||
virtual std::size_t Read(void* buffer, std::size_t size) = 0;
|
||||
virtual NzString ReadLine(unsigned int lineSize = 0);
|
||||
};
|
||||
|
||||
#endif // NAZARA_INPUTSTREAM_HPP
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define NAZARA_RESOURCELOADER_HPP
|
||||
|
||||
#include <Nazara/Core/String.hpp>
|
||||
#include <list>
|
||||
#include <set>
|
||||
#include <tuple>
|
||||
|
||||
@@ -28,7 +29,7 @@ class NzResourceLoader
|
||||
static void UnregisterLoader(const NzString& fileExtensions, CheckFunction checkFunc, LoadFunction loadfunc);
|
||||
|
||||
using Loader = std::tuple<std::set<NzString>, CheckFunction, LoadFunction>;
|
||||
using LoaderList = std::set<Loader>;
|
||||
using LoaderList = std::list<Loader>;
|
||||
};
|
||||
|
||||
#include <Nazara/Core/ResourceLoader.inl>
|
||||
|
||||
@@ -124,7 +124,7 @@ void NzResourceLoader<Type, Parameters>::RegisterLoader(const NzString& fileExte
|
||||
std::set<NzString> extensions;
|
||||
std::copy(exts.begin(), exts.end(), std::inserter(extensions, extensions.begin()));
|
||||
|
||||
Type::s_loaders.insert(std::make_tuple(std::move(extensions), checkFunc, loadFunc));
|
||||
Type::s_loaders.push_front(std::make_tuple(std::move(extensions), checkFunc, loadFunc));
|
||||
}
|
||||
|
||||
template<typename Type, typename Parameters>
|
||||
@@ -136,7 +136,7 @@ void NzResourceLoader<Type, Parameters>::UnregisterLoader(const NzString& fileEx
|
||||
std::set<NzString> extensions;
|
||||
std::copy(exts.begin(), exts.end(), std::inserter(extensions, extensions.begin()));
|
||||
|
||||
Type::s_loaders.erase(std::make_tuple(std::move(extensions), checkFunc, loadFunc));
|
||||
Type::s_loaders.remove(std::make_tuple(std::move(extensions), checkFunc, loadFunc));
|
||||
}
|
||||
|
||||
#include <Nazara/Core/DebugOff.hpp>
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Core/Enums.hpp>
|
||||
#include <Nazara/Core/String.hpp>
|
||||
|
||||
class NAZARA_API NzStream
|
||||
{
|
||||
@@ -17,6 +18,8 @@ class NAZARA_API NzStream
|
||||
virtual ~NzStream();
|
||||
|
||||
virtual nzUInt64 GetCursorPos() const = 0;
|
||||
virtual NzString GetDirectory() const;
|
||||
virtual NzString GetPath() const;
|
||||
unsigned int GetStreamOptions() const;
|
||||
|
||||
virtual bool SetCursorPos(nzUInt64 offset) = 0;
|
||||
|
||||
Reference in New Issue
Block a user