Various code fixes and tweaks
This commit is contained in:
@@ -105,12 +105,12 @@ public:
|
||||
/// <param name="other">The other.</param>
|
||||
AssetReference(const AssetReference& other)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
OnSet(other._asset);
|
||||
}
|
||||
|
||||
AssetReference(AssetReference&& other)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
OnSet(other._asset);
|
||||
other.OnSet(nullptr);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
{
|
||||
if (&other != this)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
OnSet(other._asset);
|
||||
other.OnSet(nullptr);
|
||||
}
|
||||
return *this;
|
||||
@@ -134,19 +134,19 @@ public:
|
||||
public:
|
||||
FORCE_INLINE AssetReference& operator=(const AssetReference& other)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
OnSet(other._asset);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCE_INLINE AssetReference& operator=(T* other)
|
||||
{
|
||||
OnSet(other);
|
||||
OnSet((Asset*)other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCE_INLINE AssetReference& operator=(const Guid& id)
|
||||
{
|
||||
OnSet((T*)::LoadAsset(id, T::TypeInitializer));
|
||||
OnSet(::LoadAsset(id, T::TypeInitializer));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "ModelBase.h"
|
||||
#include "Engine/Core/Collections/Dictionary.h"
|
||||
#include "Engine/Graphics/Models/Config.h"
|
||||
#include "Engine/Graphics/Models/SkeletonData.h"
|
||||
#include "Engine/Graphics/Models/SkinnedModelLOD.h"
|
||||
@@ -298,7 +299,7 @@ public:
|
||||
// Skeleton asset id to use for remapping.
|
||||
API_FIELD() Guid SkeletonAsset;
|
||||
// Skeleton nodes remapping table (maps this skeleton node name to other skeleton node).
|
||||
API_FIELD() Dictionary<String, String, HeapAllocation> NodesMapping;
|
||||
API_FIELD() Dictionary<String, String> NodesMapping;
|
||||
};
|
||||
// Gets or sets the skeleton retarget entries (accessed in Editor only).
|
||||
API_PROPERTY() const Array<SkeletonRetarget>& GetSkeletonRetargets() const { return _skeletonRetargets; }
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
}
|
||||
FORCE_INLINE SoftAssetReference& operator=(T* other)
|
||||
{
|
||||
OnSet(other);
|
||||
OnSet((Asset*)other);
|
||||
return *this;
|
||||
}
|
||||
FORCE_INLINE SoftAssetReference& operator=(const Guid& id)
|
||||
|
||||
@@ -127,13 +127,13 @@ public:
|
||||
|
||||
FORCE_INLINE WeakAssetReference& operator=(T* other)
|
||||
{
|
||||
OnSet(other);
|
||||
OnSet((Asset*)other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
FORCE_INLINE WeakAssetReference& operator=(const Guid& id)
|
||||
{
|
||||
OnSet((T*)::LoadAsset(id, T::TypeInitializer));
|
||||
OnSet((Asset*)::LoadAsset(id, T::TypeInitializer));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "ModelData.h"
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/Math/BoundingBox.h"
|
||||
#include "Engine/Core/Math/BoundingSphere.h"
|
||||
#include "Engine/Animations/CurveSerialization.h"
|
||||
#include "Engine/Serialization/WriteStream.h"
|
||||
#include "Engine/Debug/Exceptions/ArgumentNullException.h"
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Core/Math/BoundingSphere.h"
|
||||
#include "Engine/Core/Math/BoundingBox.h"
|
||||
#include "Engine/Serialization/Stream.h"
|
||||
#include "Engine/Core/Types/Guid.h"
|
||||
#include "Engine/Graphics/Enums.h"
|
||||
#include "Types.h"
|
||||
#include "Config.h"
|
||||
@@ -12,6 +10,8 @@
|
||||
#include "BlendShape.h"
|
||||
#include "Engine/Animations/AnimationData.h"
|
||||
|
||||
class WriteStream;
|
||||
|
||||
/// <summary>
|
||||
/// Data container for the common model meshes data. Supports holding all types of data related to the models pipeline.
|
||||
/// </summary>
|
||||
|
||||
@@ -20,8 +20,7 @@ public:
|
||||
struct Node
|
||||
{
|
||||
/// <summary>
|
||||
/// The parent node index.
|
||||
/// The parent bone index. The root node uses value -1.
|
||||
/// The parent node index. The root node uses value -1.
|
||||
/// </summary>
|
||||
int32 ParentIndex;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Core/Common.h"
|
||||
#include "Engine/Core/Collections/Array.h"
|
||||
#include "Engine/Graphics/GPUBuffer.h"
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="other">The other property.</param>
|
||||
ScriptingObjectReference(const ScriptingObjectReference& other)
|
||||
: ScriptingObjectReferenceBase(other.Get())
|
||||
: ScriptingObjectReferenceBase(other._object)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -188,12 +188,12 @@ public:
|
||||
}
|
||||
ScriptingObjectReference& operator=(const ScriptingObjectReference& other)
|
||||
{
|
||||
OnSet(other.Get());
|
||||
OnSet(other._object);
|
||||
return *this;
|
||||
}
|
||||
FORCE_INLINE ScriptingObjectReference& operator=(const Guid& id)
|
||||
{
|
||||
OnSet(static_cast<T*>(FindObject(id, T::GetStaticClass())));
|
||||
OnSet(static_cast<ScriptingObject*>(FindObject(id, T::GetStaticClass())));
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Engine/Core/Log.h"
|
||||
#include "Engine/Core/DeleteMe.h"
|
||||
#include "Engine/Core/Math/Matrix.h"
|
||||
#include "Engine/Core/Collections/Dictionary.h"
|
||||
#include "Engine/Platform/FileSystem.h"
|
||||
#include "Engine/Tools/TextureTool/TextureTool.h"
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ PX_FORCE_INLINE bool isFiniteQuatV(const QuatV q)
|
||||
return isFiniteVec4V(q);
|
||||
}
|
||||
|
||||
#if PX_CLANG
|
||||
#if PX_CLANG && __clang_major__ >= 12
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical" // bitwise intentionally chosen for performance
|
||||
#endif
|
||||
@@ -319,7 +319,7 @@ PX_FORCE_INLINE bool isSaneQuatV(const QuatV q)
|
||||
return isFiniteVec4V(q) & (BAllEqTTTT(con) == 1);
|
||||
}
|
||||
|
||||
#if PX_CLANG
|
||||
#if PX_CLANG && __clang_major__ >= 12
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ class PxTransformV
|
||||
return PxTransformV(V3Add(QuatRotate(q, src.p), p), QuatMul(q, src.q));
|
||||
}
|
||||
|
||||
#if PX_CLANG
|
||||
#if PX_CLANG && __clang_major__ >= 12
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wbitwise-instead-of-logical" // bitwise intentionally chosen for performance
|
||||
#endif
|
||||
@@ -156,7 +156,7 @@ class PxTransformV
|
||||
return isFiniteVec3V(p) & isFiniteQuatV(q);
|
||||
}
|
||||
|
||||
#if PX_CLANG
|
||||
#if PX_CLANG && __clang_major__ >= 12
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ Return the index of the highest set bit. Undefined for zero arg.
|
||||
*/
|
||||
PX_INLINE uint32_t PxHighestSetBitUnsafe(uint32_t v)
|
||||
{
|
||||
|
||||
return uint32_t(31 - __builtin_clz(v));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user