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