/*---------------------------------------------------------------------------* Project: NintendoWare File : gfx_ResSceneEnvironmentSetting.h Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Revision: 18422 $ *---------------------------------------------------------------------------*/ #ifndef NW_GFX_RESSCENEENVIRONMENTSETTING_H_ #define NW_GFX_RESSCENEENVIRONMENTSETTING_H_ #include #include #include #include namespace nw { namespace gfx { namespace res { class ResCamera; class ResLight; //! @details :private struct ResReferenceSceneObjectData { nw::ut::ResS32 m_Index; nw::ut::BinString toPath; nw::ut::Offset toTarget; }; //! @details :private struct ResLightSetData { nw::ut::ResS32 m_Index; nw::ut::ResS32 m_LightsTableCount; nw::ut::Offset toLightsTable; }; //! @details :private struct ResSceneEnvironmentSettingData : public ResSceneObjectData { nw::ut::ResS32 m_CamerasTableCount; nw::ut::Offset toCamerasTable; nw::ut::ResS32 m_LightSetsTableCount; nw::ut::Offset toLightSetsTable; nw::ut::ResS32 m_FogsTableCount; nw::ut::Offset toFogsTable; }; //! @details :private class ResReferenceSceneObject : public nw::ut::ResCommon { public: NW_RES_CTOR( ResReferenceSceneObject ) NW_RES_FIELD_PRIMITIVE_DECL( s32, Index ) // GetIndex() NW_RES_FIELD_STRING_DECL( Path ) // GetPath() NW_RES_FIELD_CLASS_DECL( ResSceneObject, Target ) // GetTarget() }; //--------------------------------------------------------------------------- //! @brief 複数ライトの参照をまとめるバイナリリソースクラスです。 //--------------------------------------------------------------------------- //! @details :private class ResLightSet : public nw::ut::ResCommon { public: NW_RES_CTOR(ResLightSet); //--------------------------------------------------------------------------- //! @fn s32 GetIndex() const //! @brief ライトセットのインデックス番号を取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( s32, Index ) // GetIndex() //--------------------------------------------------------------------------- //! @fn s32 GetLightsCount() const //! @brief 所属するライトの要素数を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn ResReferenceSceneObject GetLights(int idx) //! @brief 所属するライトを取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_CLASS_LIST_DECL(ResReferenceSceneObject, Lights) // GetLights(), GetLights(int idx), GetLightsCount() }; //--------------------------------------------------------------------------- //! @brief シーンの環境設定を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- //! @details :private class ResSceneEnvironmentSetting : public ResSceneObject { public: enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResSceneEnvironmentSetting) }; enum { SIGNATURE = NW_RES_SIGNATURE32('CENV') }; enum { BINARY_REVISION = REVISION_RES_RENDER_ENV_SETTING }; NW_RES_CTOR_INHERIT( ResSceneEnvironmentSetting, ResSceneObject ) //--------------------------------------------------------------------------- //! @brief リビジョンを取得します。 //! //! @return リソースのリビジョン情報です。 //--------------------------------------------------------------------------- u32 GetRevision() const { return this->GetHeader().revision; } //--------------------------------------------------------------------------- //! @fn s32 GetCamerasCount() const //! @brief カメラの要素数を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn ResReferenceSceneObject GetCameras(int idx) //! @brief カメラを取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_CLASS_LIST_DECL( ResReferenceSceneObject, Cameras ) // GetCameras(int idx), GetCamerasCount() //--------------------------------------------------------------------------- //! @fn s32 GetLightSetsCount() const //! @brief ライトセットの要素数を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn ResLightSet GetLightSets(int idx) //! @brief ライトセットを取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_CLASS_LIST_DECL( ResLightSet, LightSets ) // GetLightSets(int idx), GetLightSetsCount() //--------------------------------------------------------------------------- //! @fn s32 GetFogsCount() const //! @brief フォグの要素数を取得します。 //--------------------------------------------------------------------------- //--------------------------------------------------------------------------- //! @fn ResReferenceSceneObject GetFogs(int idx) //! @brief フォグを取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_CLASS_LIST_DECL( ResReferenceSceneObject, Fogs ) // GetFogs(int idx), GetFogsCount() }; typedef nw::ut::ResArrayPatricia::type ResSceneEnvironmentSettingArray; typedef nw::ut::ResArrayClass::type ResReferenceSceneObjectArray; typedef nw::ut::ResArrayClass::type ResLightSetArray; } // namespace res } // namespace gfx } // namespace nw #endif // NW_GFX_RESSCENEENVIRONMENTSETTING_H_