SHADE_Y3/SHADE_Managed/src/Assets/AnimationControllerAsset.hxx

91 lines
4.0 KiB
C++

/************************************************************************************//*!
\file AnimationControllerAsset.hxx
\author Tng Kah Wei, kahwei.tng, 390009620
\par email: kahwei.tng\@digipen.edu
\date Mar 8, 2023
\brief Contains the definition of the managed AnimationController class.
Note: This file is written in C++17/CLI.
Copyright (C) 2022 DigiPen Institute of Technology.
Reproduction or disclosure of this file or its contents without the prior written consent
of DigiPen Institute of Technology is prohibited.
*//*************************************************************************************/
#pragma once
// External Dependencies
#include "Resource/SHHandle.h"
#include "Animation/SHAnimationController.h"
// Project Includes
#include "NativeAsset.hxx"
#include "Engine/GenericHandle.hxx"
namespace SHADE
{
/// <summary>
/// Managed counterpart of the native AnimationController object containing the
/// state machine for controlling what AnimationClips that an Animator should play.
/// </summary>
public value struct AnimationControllerAsset
{
public:
/*-----------------------------------------------------------------------------*/
/* Operator Overloads */
/*-----------------------------------------------------------------------------*/
/// <summary>
/// Implicit conversion operator to enable checking if a AnimationController is valid.
/// </summary>
/// <param name="gameObj">Asset to check.</param>
/// <returns>True if the Asset is valid.</returns>
static operator bool(AnimationControllerAsset asset);
internal:
/*-----------------------------------------------------------------------------*/
/* Properties */
/*-----------------------------------------------------------------------------*/
/// <summary>
/// Copy of the Handle to the native object.
/// </summary>
property Handle<SHAnimationController> NativeObject
{
Handle<SHAnimationController> get();
}
/// <summary>
/// The raw asset ID of the asset.
/// </summary>
property AssetID NativeAssetID
{
AssetID get();
}
/*-----------------------------------------------------------------------------*/
/* Constructors/Destructor */
/*-----------------------------------------------------------------------------*/
/// <summary>
/// Constructor for the AnimationController.
/// </summary>
/// <param name="AnimationControllerId">AssetID to the AnimationController asset.</param>
AnimationControllerAsset(AssetID AnimationControllerId);
/*-----------------------------------------------------------------------------*/
/* Conversion Operators */
/*-----------------------------------------------------------------------------*/
/// <summary>
/// Conversion operator to enable casting from a AnimationController to an Asset.
/// </summary>
/// <param name="vec">Vector3 to convert from.</param>
static explicit operator Asset(AnimationControllerAsset nativeAsset);
/// <summary>
/// Conversion operator to enable casting from a Asset to a AnimationController.
/// </summary>
/// <param name="asset"></param>
static explicit operator AnimationControllerAsset(Asset asset);
protected:
/*-----------------------------------------------------------------------------*/
/* Data Members */
/*-----------------------------------------------------------------------------*/
Asset asset;
};
}