Files
o3de/Code/Tools/SceneAPI/SceneBuilder/Importers/Utilities/AssImpMeshImporterUtilities.h
T
AMZN-stankowi 73522e90c9 FBX -> Scene, part 2. Code changes, file renames (#1704)
* First pass FBX -> Scene File conversion.
This is the simple pass, minimizing code changes and focused on comments.

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Step 1 of part 2 of the FBX -> Scene rename

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Renaming FbxSceneBuilder folder to SceneBuilder

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* Renamed files

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>

* More FBX -> Scene

Signed-off-by: stankowi <4838196+AMZN-stankowi@users.noreply.github.com>
2021-07-01 15:46:55 -07:00

50 lines
1.6 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <SceneAPI/SceneCore/Events/ProcessingResult.h>
struct aiNode;
struct aiScene;
namespace AZ
{
namespace SceneData
{
namespace GraphData
{
class MeshData;
class BlendShapeData;
}
}
namespace SceneAPI
{
namespace DataTypes
{
class IGraphObject;
}
struct AssImpSceneNodeAppendedContext;
class SceneSystem;
namespace SceneBuilder
{
bool BuildSceneMeshFromAssImpMesh(const aiNode* currentNode, const aiScene* scene, const SceneSystem& sceneSystem, AZStd::vector<AZStd::shared_ptr<DataTypes::IGraphObject>>& meshes,
const AZStd::function<AZStd::shared_ptr<SceneData::GraphData::MeshData>()>& makeMeshFunc);
typedef AZ::Outcome<const SceneData::GraphData::MeshData* const, Events::ProcessingResult> GetMeshDataFromParentResult;
GetMeshDataFromParentResult GetMeshDataFromParent(AssImpSceneNodeAppendedContext& context);
// If a node in the original scene file has a mesh with multiple materials on it, the associated AssImp
// node will have multiple meshes on it, broken apart per material. This returns the total number
// of vertices on all meshes on the given node.
uint64_t GetVertexCountForAllMeshesOnNode(const aiNode& node, const aiScene& scene);
}
}
}