1 /*---------------------------------------------------------------------------* 2 Project: NintendoWare 3 File: gfx_ResVertex.h 4 5 Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Revision: 19618 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NW_GFX_RESVERTEX_H_ 17 #define NW_GFX_RESVERTEX_H_ 18 19 #include <nw/ut/ut_ResUtil.h> 20 #include <nw/ut/ut_ResDictionary.h> 21 #include <nw/ut/ut_ResDeclMacros.h> 22 #include <nw/ut/ut_ResArrayTypes.h> 23 #include <nw/gfx/res/gfx_ResTypeInfo.h> 24 #include <nw/ut/ut_ResPrimitive.h> 25 26 namespace nw { 27 namespace gfx { 28 namespace res { 29 30 //! @details :private 31 struct ResVertexAttributeData 32 { 33 // TODO: こちらの定義は削除予定。 34 enum VertexType 35 { 36 FLAG_VERTEX_PARAM = 0x1, 37 FLAG_INTERLEAVE = 0x2 38 }; 39 40 nw::ut::ResTypeInfo typeInfo; 41 nw::ut::ResS32 m_Usage; 42 nw::ut::ResU32 m_Flags; 43 }; 44 45 class ResVertexStream; 46 class ResVertexParamAttribute; 47 48 //-------------------------------------------------------------------------- 49 //! @brief 頂点属性を表すバイナリリソースの基底クラスです。 50 //--------------------------------------------------------------------------- 51 class ResVertexAttribute : public nw::ut::ResCommon< ResVertexAttributeData > 52 { 53 public: 54 enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResVertexAttribute) }; 55 enum { SIGNATURE = NW_RES_SIGNATURE32('VATR') }; 56 57 enum VertexType 58 { 59 FLAG_VERTEX_PARAM = 0x1, 60 FLAG_INTERLEAVE = 0x2 61 }; 62 63 enum VertexAttributeUsage 64 { 65 USAGE_POSITION, 66 USAGE_NORMAL, 67 USAGE_TANGENT, 68 USAGE_COLOR, 69 USAGE_TEXTURECOODINATE0, 70 USAGE_TEXTURECOODINATE1, 71 USAGE_TEXTURECOODINATE2, 72 USAGE_BONEINDEX, 73 USAGE_BONEWEIGHT, 74 USAGE_USERATTRIBUTE0, 75 USAGE_USERATTRIBUTE1, 76 USAGE_USERATTRIBUTE2, 77 USAGE_USERATTRIBUTE3, 78 USAGE_USERATTRIBUTE4, 79 USAGE_USERATTRIBUTE5, 80 USAGE_USERATTRIBUTE6, 81 USAGE_USERATTRIBUTE7, 82 USAGE_USERATTRIBUTE8, 83 USAGE_USERATTRIBUTE9, 84 USAGE_USERATTRIBUTE10, 85 USAGE_USERATTRIBUTE11, 86 USAGE_INTERLEAVE, 87 USAGE_QUANTITY, 88 USAGE_NONE 89 }; 90 91 NW_RES_CTOR( ResVertexAttribute ) 92 93 94 //--------------------------------------------------------------------------- 95 //! @fn void SetUsage(s32 value) 96 //! @brief 頂点属性の用途を設定します。 97 //--------------------------------------------------------------------------- 98 //--------------------------------------------------------------------------- 99 //! @fn void SetFlags(u32 value) 100 //! @brief フラグの値を設定します。 101 //! 設定されなかったフラグは無効になります。 102 //--------------------------------------------------------------------------- 103 //--------------------------------------------------------------------------- 104 //! @fn void EnaleFlags(u32 value) 105 //! @brief 指定された Flag の値を有効にします。 106 //! 設定されなかったフラグは変更されません。 107 //--------------------------------------------------------------------------- 108 //--------------------------------------------------------------------------- 109 //! @fn void DisableFlags(u32 value) 110 //! @brief 指定された Flag の値を無効にします。 111 //! 設定されなかったフラグは変更されません。 112 //--------------------------------------------------------------------------- 113 //--------------------------------------------------------------------------- 114 //! @fn s32 GetUsage() const 115 //! @brief 頂点属性の用途を取得します。 116 //--------------------------------------------------------------------------- 117 //--------------------------------------------------------------------------- 118 //! @fn u32 GetFlags() const 119 //! @brief フラグの値を取得します。 120 //--------------------------------------------------------------------------- 121 NW_RES_FIELD_PRIMITIVE_DECL( s32, Usage ) // GetUsage(), SetUsage() 122 NW_RES_FIELD_FLAGS_DECL( u32, Flags ) // GetFlags(), SetFlags(), EnableFlags(), DisableFlags() 123 124 //! @brief 頂点属性の初期化処理をおこないます。 125 void Setup(); 126 127 //! @brief 頂点属性の後始末をおこないます。 128 void Cleanup(); 129 130 //--------------------------------------------------------------------------- 131 //! @brief インスタンスの型情報を取得します。 132 //! 133 //! @return 型情報です。 134 //--------------------------------------------------------------------------- GetTypeInfo()135 nw::ut::ResTypeInfo GetTypeInfo() const { return ref().typeInfo; } 136 }; 137 typedef nw::ut::ResArrayClass<ResVertexAttribute>::type ResVertexAttributeArray; 138 139 140 //! @details :private 141 struct ResVertexParamAttributeData : public ResVertexAttributeData 142 { 143 nw::ut::ResU32 m_FormatType; 144 nw::ut::ResU8 m_Dimension; 145 u8 _padding_0[3]; 146 nw::ut::ResF32 m_Scale; 147 nw::ut::Offset m_AttributeTableCount; 148 nw::ut::Offset toAttributeTable; 149 }; 150 151 //-------------------------------------------------------------------------- 152 //! @brief パラメータによる頂点属性を表すバイナリリソースクラスです。 153 //--------------------------------------------------------------------------- 154 class ResVertexParamAttribute : public ResVertexAttribute 155 { 156 public: 157 enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResVertexParamAttribute) }; 158 enum { SIGNATURE = NW_RES_SIGNATURE32('VAPM') }; 159 160 NW_RES_CTOR_INHERIT( ResVertexParamAttribute, ResVertexAttribute ) 161 162 //--------------------------------------------------------------------------- 163 //! @fn void SetScale(f32 value) 164 //! @brief スケール値を設定します。 165 //--------------------------------------------------------------------------- 166 //--------------------------------------------------------------------------- 167 //! @fn void SetFormatType(u32 value) 168 //! @brief フォーマットの種類を設定します。 169 //--------------------------------------------------------------------------- 170 //--------------------------------------------------------------------------- 171 //! @fn void SetDimension(u8 value) 172 //! @brief 次元数を設定します。 173 //--------------------------------------------------------------------------- 174 //--------------------------------------------------------------------------- 175 //! @fn void SetAttribute(int idx, f32 value) 176 //! @brief 属性のリストに要素を設定します。 177 //--------------------------------------------------------------------------- 178 //--------------------------------------------------------------------------- 179 //! @fn f32 GetScale() const 180 //! @brief スケール値を取得します。 181 //--------------------------------------------------------------------------- 182 //--------------------------------------------------------------------------- 183 //! @fn u32 GetFormatType() const 184 //! @brief フォーマットの種類を取得します。 185 //--------------------------------------------------------------------------- 186 //--------------------------------------------------------------------------- 187 //! @fn u8 GetDimension() const 188 //! @brief 次元数を取得します。 189 //--------------------------------------------------------------------------- 190 //--------------------------------------------------------------------------- 191 //! @fn s32 GetAttributeCount() const 192 //! @brief 属性の要素数を取得します。 193 //--------------------------------------------------------------------------- 194 //--------------------------------------------------------------------------- 195 //! @fn f32 GetAttribute(int idx) const 196 //! @brief 属性を取得します。 197 //--------------------------------------------------------------------------- 198 NW_RES_FIELD_PRIMITIVE_DECL( u32, FormatType ) // GetFormatType(), SetFormatType() 199 NW_RES_FIELD_PRIMITIVE_DECL( u8, Dimension ) // GetDimension(), SetDimension() 200 NW_RES_FIELD_PRIMITIVE_DECL( f32, Scale ) // GetScale(), SetScale() 201 NW_RES_FIELD_PRIMITIVE_LIST_DECL( f32, Attribute ) // GetAttribute(), GetAttribute(int idx), GetAttributeCount() 202 203 //! @brief 頂点属性の初期化処理をおこないます。 204 void Setup(); 205 206 //! @brief 頂点属性の後始末をおこないます。 207 void Cleanup(); 208 }; 209 typedef nw::ut::ResArrayClass<ResVertexParamAttribute>::type ResVertexParamAttributeArray; 210 211 212 struct ResVertexStreamBaseData : public ResVertexAttributeData 213 { 214 enum 215 { 216 AREA_NO_MALLOC = 0, 217 AREA_FCRAM = NN_GX_MEM_FCRAM, 218 AREA_VRAMA = NN_GX_MEM_VRAMA, 219 AREA_VRAMB = NN_GX_MEM_VRAMB 220 }; 221 222 nw::ut::ResU32 m_BufferObject; 223 nw::ut::ResU32 m_LocationFlag; 224 nw::ut::ResS32 m_StreamTableCount; 225 nw::ut::Offset toStreamTable; 226 u32 m_LocationAddress; 227 u32 m_MemoryArea; 228 }; 229 230 //! @details :private 231 struct ResVertexStreamData : public ResVertexStreamBaseData 232 { 233 nw::ut::ResU32 m_FormatType; 234 nw::ut::ResU8 m_Dimension; 235 u8 _padding_0[3]; 236 nw::ut::ResF32 m_Scale; 237 nw::ut::ResU32 m_Offset; 238 }; 239 240 struct ResInterleavedVertexStreamData : public ResVertexStreamBaseData 241 { 242 nw::ut::ResU32 m_Stride; 243 nw::ut::ResS32 m_VertexStreamsTableCount; 244 nw::ut::Offset toVertexStreamsTable; 245 }; 246 247 248 //-------------------------------------------------------------------------- 249 //! @brief 頂点ストリームによる頂点属性を表すバイナリのベースクラスです。 250 //--------------------------------------------------------------------------- 251 class ResVertexStreamBase : public ResVertexAttribute 252 { 253 public: 254 enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResVertexStreamBase) }; 255 enum { SIGNATURE = NW_RES_SIGNATURE32('VSTB') }; 256 NW_RES_CTOR_INHERIT(ResVertexStreamBase,ResVertexAttribute)257 NW_RES_CTOR_INHERIT( ResVertexStreamBase, ResVertexAttribute ) 258 259 //--------------------------------------------------------------------------- 260 //! @fn void SetBufferObject(u32 value) 261 //! @brief バッファオブジェクトを設定します。 262 //--------------------------------------------------------------------------- 263 //--------------------------------------------------------------------------- 264 //! @fn u32 GetBufferObject() const 265 //! @brief バッファオブジェクトを取得します。 266 //--------------------------------------------------------------------------- 267 NW_RES_FIELD_PRIMITIVE_DECL( u32, BufferObject ) // GetBufferObject(), SetBufferObject() 268 269 //--------------------------------------------------------------------------- 270 //! @fn u32 GetLocationFlag() const 271 //! @brief ロケーションフラグを取得します。 272 //--------------------------------------------------------------------------- 273 //--------------------------------------------------------------------------- 274 //! @fn void SetLocationFlag(u32 value) 275 //! @brief ロケーションフラグを設定します。 276 //--------------------------------------------------------------------------- 277 NW_RES_FIELD_PRIMITIVE_DECL( u32, LocationFlag ) // GetLocationFlag(), SetLocationFlag() 278 279 //--------------------------------------------------------------------------- 280 //! @fn s32 GetStreamCount() const 281 //! @brief ストリームのバイト数を取得します。 282 //--------------------------------------------------------------------------- 283 //--------------------------------------------------------------------------- 284 //! @fn const u8* GetStream() const 285 //! @brief ストリームを取得します。 286 //--------------------------------------------------------------------------- 287 NW_RES_FIELD_PRIMITIVE_LIST_DECL( u8, Stream ) // GetStream(), GetStream(int idx), GetStreamCount() 288 289 //--------------------------------------------------------------------------- 290 //! @brief コピーされた頂点バッファのアドレスを取得します。 291 //! 292 //! @return コピーされた頂点バッファの論理アドレスです。 293 //--------------------------------------------------------------------------- 294 u32 GetLocationAddress() const { return ref().m_LocationAddress; } 295 296 //--------------------------------------------------------------------------- 297 //! @brief コピーされた頂点バッファのアドレスを設定します。 298 //! 299 //! @param[in] address コピーされた頂点バッファの論理アドレスです。 300 //--------------------------------------------------------------------------- SetLocationAddress(u32 address)301 void SetLocationAddress(u32 address) { ref().m_LocationAddress = address; } SetLocationAddress(const void * address)302 void SetLocationAddress(const void* address) { ref().m_LocationAddress = reinterpret_cast<u32>(address); } 303 304 //--------------------------------------------------------------------------- 305 //! @brief GPU から参照されるイメージのアドレスを取得します。 306 //! 307 //! @details LocationAddess が設定されている場合はそのアドレスを使用し、 308 //! LocationAddess が NULL の場合には、Stream のアドレスを直接 GPU から参照します。 309 //! 310 //! @return GPU から参照されるイメージのアドレスです。 311 //--------------------------------------------------------------------------- GetImageAddress()312 u32 GetImageAddress() const 313 { 314 u32 locationAddress = this->GetLocationAddress(); 315 316 if ( locationAddress ) 317 { 318 return locationAddress; 319 } 320 else 321 { 322 return reinterpret_cast<u32>( this->GetStream() ); 323 } 324 } 325 }; 326 327 328 //-------------------------------------------------------------------------- 329 //! @brief 頂点ストリームによる頂点属性を表すバイナリリソースクラスです。 330 //--------------------------------------------------------------------------- 331 class ResVertexStream : public ResVertexStreamBase 332 { 333 public: 334 enum { TYPE_INFO = NW_GFX_RES_TYPE_INFO(ResVertexStream) }; 335 enum { SIGNATURE = NW_RES_SIGNATURE32('VSTM') }; 336 337 NW_RES_CTOR_INHERIT( ResVertexStream, ResVertexStreamBase ) 338 339 //--------------------------------------------------------------------------- 340 //! @fn void SetFormatType(u32 value) 341 //! @brief フォーマットの種類を設定します。 342 //--------------------------------------------------------------------------- 343 //--------------------------------------------------------------------------- 344 //! @fn u32 GetFormatType() const 345 //! @brief フォーマットの種類を取得します。 346 //--------------------------------------------------------------------------- 347 NW_RES_FIELD_PRIMITIVE_DECL( u32, FormatType ) // GetFormatType(), SetFormatType() 348 349 //--------------------------------------------------------------------------- 350 //! @fn u8 GetDimension() const 351 //! @brief 次元数を取得します。 352 //--------------------------------------------------------------------------- 353 //--------------------------------------------------------------------------- 354 //! @fn void SetDimension(u8 value) 355 //! @brief 次元数を設定します。 356 //--------------------------------------------------------------------------- 357 NW_RES_FIELD_PRIMITIVE_DECL( u8, Dimension ) // GetDimension(), SetDimension() 358 359 //--------------------------------------------------------------------------- 360 //! @fn void SetScale(f32 value) 361 //! @brief スケール値を設定します。 362 //--------------------------------------------------------------------------- 363 //--------------------------------------------------------------------------- 364 //! @fn f32 GetScale() const 365 //! @brief スケール値を取得します。 366 //--------------------------------------------------------------------------- 367 NW_RES_FIELD_PRIMITIVE_DECL( f32, Scale ) // GetScale(), SetScale() 368 369 //--------------------------------------------------------------------------- 370 //! @fn void SetOffset(u32 value) 371 //! @brief インターリーブ形式の場合のオフセット情報を設定します。 372 //--------------------------------------------------------------------------- 373 //--------------------------------------------------------------------------- 374 //! @fn u32 GetOffset() const 375 //! @brief インターリーブ形式の場合のオフセット情報を取得します。 376 //--------------------------------------------------------------------------- 377 NW_RES_FIELD_PRIMITIVE_DECL( u32, Offset ) 378 379 //! @brief 頂点ストリームの初期化処理をおこないます。 380 void Setup(); 381 382 //! @brief 頂点属性の後始末をおこないます。 383 void Cleanup(); 384 }; 385 typedef nw::ut::ResArrayClass<ResVertexStream>::type ResVertexStreamArray; 386 387 //-------------------------------------------------------------------------- 388 //! @brief インターリーブ形式の頂点ストリームを表すバイナリリソースクラスです。 389 //--------------------------------------------------------------------------- 390 class ResInterleavedVertexStream : public ResVertexStreamBase 391 { 392 public: 393 NW_RES_CTOR_INHERIT( ResInterleavedVertexStream, ResVertexStreamBase ) 394 395 //--------------------------------------------------------------------------- 396 //! @fn u32 GetStride() const 397 //! @brief インターリーブ形式の1頂点あたりの頂点サイズを取得します。 398 //--------------------------------------------------------------------------- 399 //--------------------------------------------------------------------------- 400 //! @fn void SetStride(u32 value) 401 //! @brief インターリーブ形式の1頂点あたりの頂点サイズを設定します。 402 //--------------------------------------------------------------------------- 403 NW_RES_FIELD_PRIMITIVE_DECL( u32, Stride ) 404 405 //--------------------------------------------------------------------------- 406 //! @fn s32 GetVertexStreamsCount() const 407 //! @brief インターリーブを構成する頂点属性の集合の要素数を取得します。 408 //--------------------------------------------------------------------------- 409 //--------------------------------------------------------------------------- 410 //! @fn ResVertexStream GetVertexStreams(int idx) 411 //! @brief インターリーブを構成する頂点属性の集合を取得します。 412 //--------------------------------------------------------------------------- 413 NW_RES_FIELD_CLASS_LIST_DECL( ResVertexStream, VertexStreams ) 414 415 //! @brief 頂点ストリームの初期化処理をおこないます。 416 void Setup(); 417 418 //! @brief 頂点属性の後始末をおこないます。 419 void Cleanup(); 420 }; 421 422 423 //! @details :private 424 struct ResIndexStreamData 425 { 426 enum 427 { 428 AREA_NO_MALLOC = 0, 429 AREA_FCRAM = NN_GX_MEM_FCRAM, 430 AREA_VRAMA = NN_GX_MEM_VRAMA, 431 AREA_VRAMB = NN_GX_MEM_VRAMB 432 }; 433 434 nw::ut::ResU32 m_FormatType; 435 nw::ut::ResU8 m_PrimitiveMode; 436 bool m_IsVisible; 437 u8 _padding_0[2]; 438 nw::ut::ResS32 m_StreamTableCount; 439 nw::ut::Offset toStreamTable; 440 nw::ut::ResU32 m_BufferObject; 441 nw::ut::ResU32 m_LocationFlag; 442 443 void* m_CommandCache; 444 s32 m_CommandCacheSize; 445 u32 m_LocationAddress; 446 u32 m_MemoryArea; 447 448 nw::ut::Offset toBoundingVolume; 449 }; 450 451 //-------------------------------------------------------------------------- 452 //! @brief 頂点インデックスストリームを表すバイナリリソースクラスです。 453 //--------------------------------------------------------------------------- 454 class ResIndexStream : public nw::ut::ResCommon< ResIndexStreamData > 455 { 456 public: NW_RES_CTOR(ResIndexStream)457 NW_RES_CTOR( ResIndexStream ) 458 459 //--------------------------------------------------------------------------- 460 //! @fn u32 GetFormatType() const 461 //! @brief フォーマットの種類を取得します。 462 //--------------------------------------------------------------------------- 463 //--------------------------------------------------------------------------- 464 //! @fn void SetFormatType(u32 value) 465 //! @brief フォーマットの種類を設定します。 466 //--------------------------------------------------------------------------- 467 NW_RES_FIELD_PRIMITIVE_DECL( u32, FormatType ) // GetFormatType(), SetFormatType() 468 469 //--------------------------------------------------------------------------- 470 //! @fn u8 GetPrimitiveMode() const 471 //! @brief プリミティブのモードを取得します。 472 //--------------------------------------------------------------------------- 473 //--------------------------------------------------------------------------- 474 //! @fn void SetPrimitiveMode(u8 value) 475 //! @brief プリミティブのモードを設定します。 476 //--------------------------------------------------------------------------- 477 NW_RES_FIELD_PRIMITIVE_DECL( u8, PrimitiveMode ) // GetPrimitiveMode(), SetPrimitiveMode() 478 479 //--------------------------------------------------------------------------- 480 //! @fn s32 GetStreamCount() const 481 //! @brief ストリームの要素数を取得します。 482 //--------------------------------------------------------------------------- 483 //--------------------------------------------------------------------------- 484 //! @fn u8 GetStream(int idx) const 485 //! @brief ストリームを取得します。 486 //--------------------------------------------------------------------------- 487 //--------------------------------------------------------------------------- 488 //! @fn void SetStream(int idx, u8 value) 489 //! @brief ストリームのリストに要素を設定します。 490 //--------------------------------------------------------------------------- 491 NW_RES_FIELD_PRIMITIVE_LIST_DECL( u8, Stream ) // GetStream(), GetStream(int idx), GetStreamCount() 492 493 //--------------------------------------------------------------------------- 494 //! @fn u32 GetBufferObject() const 495 //! @brief バッファオブジェクトを取得します。 496 //--------------------------------------------------------------------------- 497 //--------------------------------------------------------------------------- 498 //! @fn void SetBufferObject(u32 value) 499 //! @brief バッファオブジェクトを設定します。 500 //--------------------------------------------------------------------------- 501 NW_RES_FIELD_PRIMITIVE_DECL( u32, BufferObject ) // GetBufferObject(), SetBufferObject() 502 503 //--------------------------------------------------------------------------- 504 //! @fn u32 GetLocationFlag() const 505 //! @brief ロケーションフラグを取得します。 506 //--------------------------------------------------------------------------- 507 //--------------------------------------------------------------------------- 508 //! @fn void SetLocationFlag(u32 value) 509 //! @brief ロケーションフラグを設定します。 510 //--------------------------------------------------------------------------- 511 NW_RES_FIELD_PRIMITIVE_DECL( u32, LocationFlag ) // GetLocationFlag(), SetLocationFlag() 512 513 //--------------------------------------------------------------------------- 514 //! @fn nw::ut::ResBoundingVolume GetBoundingVolume() 515 //! @brief この機能は現状では実験仕様となります。将来的に仕様が変更になる可能性があります。 516 //! 境界情報を取得します。 517 //--------------------------------------------------------------------------- 518 NW_RES_FIELD_CLASS_DECL( nw::ut::ResBoundingVolume, BoundingVolume ) // GetBoundingVolume() 519 520 //--------------------------------------------------------------------------- 521 //! @brief コピーされた頂点バッファのアドレスを取得します。 522 //! 523 //! @return コピーされた頂点バッファの論理アドレスです。 524 //--------------------------------------------------------------------------- 525 u32 GetLocationAddress() const { return ref().m_LocationAddress; } 526 527 //--------------------------------------------------------------------------- 528 //! @brief コピーされた頂点バッファのアドレスを設定します。 529 //! 530 //! @param[in] address コピーされた頂点バッファの論理アドレスです。 531 //--------------------------------------------------------------------------- SetLocationAddress(u32 address)532 void SetLocationAddress(u32 address) { ref().m_LocationAddress = address; } SetLocationAddress(const void * address)533 void SetLocationAddress(const void* address) { ref().m_LocationAddress = reinterpret_cast<u32>(address); } 534 535 //--------------------------------------------------------------------------- 536 //! @brief GPU から参照されるイメージのアドレスを取得します。 537 //! 538 //! @details LocationAddess が設定されている場合はそのアドレスを使用し、 539 //! LocationAddess が NULL の場合には、Stream のアドレスを直接 GPU から参照します。 540 //! 541 //! @return GPU から参照されるイメージのアドレスです。 542 //--------------------------------------------------------------------------- GetImageAddress()543 u32 GetImageAddress() const 544 { 545 u32 locationAddress = this->GetLocationAddress(); 546 547 if ( locationAddress ) 548 { 549 return locationAddress; 550 } 551 else 552 { 553 return reinterpret_cast<u32>( this->GetStream() ); 554 } 555 } 556 557 //--------------------------------------------------------------------------- 558 //! @fn void SetVisible(bool value) 559 //! @brief この機能は現状では実験仕様となります。将来的に仕様が変更になる可能性があります。 560 //! 表示するかどうかのフラグを設定します。 561 //--------------------------------------------------------------------------- 562 //--------------------------------------------------------------------------- 563 //! @fn bool IsVisible() const 564 //! @brief この機能は現状では実験仕様となります。将来的に仕様が変更になる可能性があります。 565 //! 表示するかどうかのフラグを取得します。 566 //--------------------------------------------------------------------------- 567 NW_RES_FIELD_BOOL_PRIMITIVE_DECL( Visible ) // IsVisible(), SetVisible() 568 }; 569 typedef nw::ut::ResArrayClass<ResIndexStream>::type ResIndexStreamArray; 570 571 } // namespace res 572 } // namespace gfx 573 } // namespace nw 574 575 #endif // NW_GFX_RESVERTEX_H_ 576