Browse Subversion Repository
Contents of /trunk/Macro.h
Parent Directory
| Revision Log
Revision 9 -
( show annotations)
( download)
( as text)
Tue Aug 28 14:58:05 2012 UTC
(11 years, 8 months ago)
by okadu
File MIME type: text/x-chdr
File size: 752 byte(s)
[okadu] Version 2.14
ニュートラル画面分割
ダイヤ停車位置の数値設定
レイアウト読み込みバグ一部修正
| 1 |
#ifndef MACRO_H_INCLUDED |
| 2 |
#define MACRO_H_INCLUDED |
| 3 |
|
| 4 |
#define DELETE_V(p) do{ if(p){ delete p; p = NULL; } } while(false) // NULL 確認付き変数開放 |
| 5 |
#define DELETE_A(p) do{ if(p){ delete [] p; p = NULL; } } while(false) // NULL 確認付き配列開放 |
| 6 |
|
| 7 |
#define V2Norm D3DXVec2Normalize // ベクトル正規化 |
| 8 |
#define V2Len D3DXVec2Length // ベクトル絶対値 |
| 9 |
#define V2Dot D3DXVec2Dot // ベクトル内積 |
| 10 |
|
| 11 |
#define V3Norm D3DXVec3Normalize // ベクトル正規化 |
| 12 |
#define V3Len D3DXVec3Length // ベクトル絶対値 |
| 13 |
#define V3Dot D3DXVec3Dot // ベクトル内積 |
| 14 |
#define V3Cross D3DXVec3Cross // ベクトル外積 |
| 15 |
|
| 16 |
// 右辺値を左辺値に変換する (gcc対応) |
| 17 |
template< class TYPE > inline TYPE& R2L( const TYPE& _Value ) |
| 18 |
{ |
| 19 |
return const_cast< TYPE& >( _Value ); |
| 20 |
} |
| 21 |
|
| 22 |
#endif |
|