1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     gfx_ResParticleShapeBuilder.h
4 
5   Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain proprietary
8   information of Nintendo and/or its licensed developers and are protected by
9   national and international copyright laws. They may not be disclosed to third
10   parties or copied or duplicated in any form, in whole or in part, without the
11   prior written consent of Nintendo.
12 
13   The content herein is highly confidential and should be handled accordingly.
14 
15   $Revision: $
16  *---------------------------------------------------------------------------*/
17 
18 #ifndef NW_GFX_RESPARTICLESHAPEBUILDER_H_
19 #define NW_GFX_RESPARTICLESHAPEBUILDER_H_
20 
21 #include <nw/ut/ut_ResUtil.h>
22 #include <nw/ut/ut_ResDictionary.h>
23 #include <nw/gfx/res/gfx_ResSceneObject.h>
24 #include <nw/gfx/res/gfx_ResTypeInfo.h>
25 
26 namespace nw {
27 namespace gfx {
28 namespace res {
29 
30 //! @details :private
31 struct ResParticleShapeBuilderData
32 {
33     nw::ut::ResTypeInfo typeInfo;
34     nw::ut::ResBool m_IsAscendingOrder;
35     u8              padding_0[3];
36     nw::ut::ResVec3 m_DrawOffset;
37 };
38 
39 
40 //--------------------------------------------------------------------------
41 //! @brief  パーティクルシェイプのビルダーを表すバイナリリソースクラスです。
42 //--------------------------------------------------------------------------
43 class ResParticleShapeBuilder : public nw::ut::ResCommon< ResParticleShapeBuilderData >
44 {
45 public:
46     enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleShapeBuilder) };
47     enum { SIGNATURE = NW_RES_SIGNATURE32('BUIL') };
48 
49     NW_RES_CTOR( ResParticleShapeBuilder )
50 
51     NW_RES_FIELD_BOOL_PRIMITIVE_DECL( AscendingOrder )
52     NW_RES_FIELD_VECTOR3_DECL( nw::math::VEC3, DrawOffset )
53 
54     void    Setup();
55 
56     //---------------------------------------------------------------------------
57     //! @brief        インスタンスの型情報を取得します。
58     //!
59     //! @return       型情報です。
60     //---------------------------------------------------------------------------
GetTypeInfo()61     nw::ut::ResTypeInfo     GetTypeInfo() const { return ref().typeInfo; }
62 };
63 
64 //! @details :private
65 struct ResParticleBillboardShapeBuilderData : public ResParticleShapeBuilderData
66 {
67 };
68 
69 
70 //--------------------------------------------------------------------------
71 //! @brief  パーティクルスクリーン平行ビルボードシェイプのビルダーを表すバイナリリソースクラスです。
72 //--------------------------------------------------------------------------
73 class ResParticleBillboardShapeBuilder : public ResParticleShapeBuilder
74 {
75 public:
76     enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleBillboardShapeBuilder) };
77     enum { SIGNATURE = NW_RES_SIGNATURE32('BILL') };
78 
79     NW_RES_CTOR_INHERIT( ResParticleBillboardShapeBuilder, ResParticleShapeBuilder )
80 
81     void    Setup();
82 };
83 
84 //! @details :private
85 struct ResParticleWorldBillboardShapeBuilderData : public ResParticleShapeBuilderData
86 {
87 };
88 
89 
90 //--------------------------------------------------------------------------
91 //! @brief  パーティクルワールド指向ビルボードシェイプのビルダーを表すバイナリリソースクラスです。
92 //--------------------------------------------------------------------------
93 class ResParticleWorldBillboardShapeBuilder : public ResParticleShapeBuilder
94 {
95 public:
96     enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleWorldBillboardShapeBuilder) };
97     enum { SIGNATURE = NW_RES_SIGNATURE32('WBLL') };
98 
99     NW_RES_CTOR_INHERIT( ResParticleWorldBillboardShapeBuilder, ResParticleShapeBuilder )
100 
101     void    Setup();
102 };
103 
104 //! @details :private
105 struct ResParticleYBillboardShapeBuilderData : public ResParticleShapeBuilderData
106 {
107 };
108 
109 
110 //--------------------------------------------------------------------------
111 //! @brief  パーティクルY軸ビルボードシェイプのビルダーを表すバイナリリソースクラスです。
112 //--------------------------------------------------------------------------
113 class ResParticleYBillboardShapeBuilder : public ResParticleShapeBuilder
114 {
115 public:
116     enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleYBillboardShapeBuilder) };
117     enum { SIGNATURE = NW_RES_SIGNATURE32('YBIL') };
118 
119     NW_RES_CTOR_INHERIT( ResParticleYBillboardShapeBuilder, ResParticleShapeBuilder )
120 
121     void    Setup();
122 };
123 
124 //! @details :private
125 struct ResParticleXyPlaneShapeBuilderData : public ResParticleShapeBuilderData
126 {
127 };
128 
129 
130 //--------------------------------------------------------------------------
131 //! @brief  パーティクルXY軸平面シェイプのビルダーを表すバイナリリソースクラスです。
132 //--------------------------------------------------------------------------
133 class ResParticleXyPlaneShapeBuilder : public ResParticleShapeBuilder
134 {
135 public:
136     enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResParticleXyPlaneShapeBuilder) };
137     enum { SIGNATURE = NW_RES_SIGNATURE32('XYPL') };
138 
139     NW_RES_CTOR_INHERIT( ResParticleXyPlaneShapeBuilder, ResParticleShapeBuilder )
140 
141     void    Setup();
142 };
143 
144 } // namespace res
145 } // namespace gfx
146 } // namespace nw
147 
148 #endif // NW_GFX_RESPARTICLESHAPEBUILDER_H_
149