Files
o3de/Code/Tools/SceneAPI/SDKWrapper/AssImpNodeWrapper.h
T
amzn-victor eb1593a19c Changes to SDK wrappers and functions to allow more flexible scene file processing (#3112)
These changes allow for usage of different asset import SDKs to process scene files.

    Move AssImp specific code out of node, scene & material wrapper parent classes and into child wrapper classes (AssImpNodeWrapper, etc.), allowing child classes to expose import SDK code. Allows for more convenient implementation of other import SDK's elsewhere (such as in a gem).
    Add a loadingComponentUuid parameter to LoadSceneFromVerifiedPath to allow for usage of different loading components. Changed tests and all calls to this function accordingly.


* Move AssImp specific code out of wrapper parent classes and into child classes for gem usage

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Add loadingComponentUuid parameter to LoadSceneFromVerifiedPath function

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Make wrapper members protected, change pointer cast

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Adding spaces to fix style

Signed-off-by: Victor Huang <huavicto@amazon.com>

* Fix for pointer cast causing test failures

Signed-off-by: Victor Huang <huavicto@amazon.com>
2021-08-17 06:52:20 -07:00

38 lines
1.2 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/SDKWrapper/NodeWrapper.h>
struct aiScene;
namespace AZ
{
namespace AssImpSDKWrapper
{
class AssImpNodeWrapper : public SDKNode::NodeWrapper
{
public:
AZ_RTTI(AssImpNodeWrapper, "{1043260B-9076-49B7-AD38-EF62E85F7C1D}", SDKNode::NodeWrapper);
AssImpNodeWrapper(aiNode* sourceNode);
~AssImpNodeWrapper() override = default;
aiNode* GetAssImpNode() const;
const char* GetName() const override;
AZ::u64 GetUniqueId() const override;
int GetChildCount() const override;
const std::shared_ptr<NodeWrapper> GetChild(int childIndex) const override;
const bool ContainsMesh();
bool ContainsBones(const aiScene& scene) const;
int GetMaterialCount() const override;
protected:
aiNode* m_assImpNode = nullptr;
};
} // namespace AssImpSDKWrapper
}// namespace AZ