1 /*---------------------------------------------------------------------------*
2   Project:  NintendoWare
3   File:     lyt_Bounding.cpp
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: 25594 $
14  *---------------------------------------------------------------------------*/
15 
16 #include "precompiled.h"
17 
18 #include <nw/lyt/lyt_Bounding.h>
19 #include <nw/lyt/lyt_Common.h>
20 #include <nw/lyt/lyt_DrawInfo.h>
21 #include <nw/lyt/lyt_GraphicsResource.h>
22 #include <nw/lyt/lyt_ResourceAccessor.h>
23 
24 namespace nw
25 {
26 namespace lyt
27 {
28 
29 using namespace math;
30 
31 NW_UT_RUNTIME_TYPEINFO_DEFINITION(Bounding, Bounding::Base);    // 実行時型情報の実体を定義
32 
Bounding(const res::Bounding * pBlock,const ResBlockSet & resBlockSet)33 Bounding::Bounding(
34     const res::Bounding* pBlock,
35     const ResBlockSet& resBlockSet
36 )
37 : Base(pBlock)
38 {
39     NW_UNUSED_VARIABLE(resBlockSet)
40 }
41 
~Bounding()42 Bounding::~Bounding()
43 {
44     // OSReport("Bounding::~Bounding()\n");
45 }
46 
47 #ifdef NW_LYT_DMPGL_ENABLED
48 void
DrawSelf(const DrawInfo & drawInfo)49 Bounding::DrawSelf(const DrawInfo& drawInfo)
50 {
51 #if defined(NW_RELEASE)
52 
53     NW_UNUSED_VARIABLE(drawInfo)
54 
55 #else   // #if ! defined(NW_RELEASE)
56 
57     if (drawInfo.IsDebugDrawMode())     // 枠の描画
58     {
59         // 行列
60         LoadMtx(drawInfo);
61 
62         internal::DrawLine(drawInfo, GetVtxPos(), GetSize(), ut::Color8::GREEN);
63 
64         drawInfo.GetGraphicsResource()->ResetGlState();
65     }
66 
67 #endif  // #if ! defined(NW_RELEASE)
68 }
69 #endif // NW_LYT_DMPGL_ENABLED
70 
71 } // namespace nw::lyt
72 } // namespace nw
73