/*---------------------------------------------------------------------------* Project: NintendoWare File: gfx_ResSceneEnvironmentSetting.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. 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. The content herein is highly confidential and should be handled accordingly. $Revision: $ *---------------------------------------------------------------------------*/ #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; }; //--------------------------------------------------------------------------- //! @brief シーンオブジェクトへの参照情報を保持するリソースクラスです。 //--------------------------------------------------------------------------- class ResReferenceSceneObject : public nw::ut::ResCommon { public: NW_RES_CTOR( ResReferenceSceneObject ) //--------------------------------------------------------------------------- //! @fn s32 GetIndex() const //! @brief シーンオブジェクトのインデックス番号を取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_PRIMITIVE_DECL( s32, Index ) // GetIndex() //--------------------------------------------------------------------------- //! @fn const char* GetPath() const //! @brief 参照先のパス名を取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_STRING_DECL( Path ) // GetPath() //--------------------------------------------------------------------------- //! @fn ResSceneObject GetTarget() const //! @brief 参照しているオブジェクトへのポインタクラスを取得します。 //--------------------------------------------------------------------------- NW_RES_FIELD_CLASS_DECL( ResSceneObject, Target ) // GetTarget() }; //--------------------------------------------------------------------------- //! @brief 複数ライトの参照をまとめるバイナリリソースクラスです。 //--------------------------------------------------------------------------- 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 シーンの環境設定を表すバイナリリソースクラスです。 //--------------------------------------------------------------------------- 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_