Optimize CPU particles sorting with Radix sort
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
|
||||
|
||||
#include "Scene.h"
|
||||
#include "SceneAsset.h"
|
||||
#include "Engine/Level/Level.h"
|
||||
#include "Engine/Content/AssetInfo.h"
|
||||
#include "Engine/Content/Content.h"
|
||||
@@ -24,6 +25,11 @@ SceneAsset::SceneAsset(const SpawnParams& params, const AssetInfo* info)
|
||||
{
|
||||
}
|
||||
|
||||
bool SceneAsset::IsInternalType() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
#define CSG_COLLIDER_NAME TEXT("CSG.Collider")
|
||||
#define CSG_MODEL_NAME TEXT("CSG.Model")
|
||||
|
||||
@@ -235,6 +241,18 @@ void Scene::OnCsgModelChanged()
|
||||
}
|
||||
}
|
||||
|
||||
#if COMPILE_WITH_CSG_BUILDER
|
||||
|
||||
void Scene::OnCSGBuildEnd()
|
||||
{
|
||||
if (CSGData.CollisionData && TryGetCsgCollider() == nullptr)
|
||||
CreateCsgCollider();
|
||||
if (CSGData.Model && TryGetCsgModel() == nullptr)
|
||||
CreateCsgModel();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void Scene::Serialize(SerializeStream& stream, const void* otherObj)
|
||||
{
|
||||
// Base
|
||||
|
||||
Reference in New Issue
Block a user