Tizen 2.1 base
[platform/upstream/libbullet.git] / Extras / PhysicsEffects / include / physics_effects / base_level / solver / pfx_constraint_pair.h
1 /*\r
2 Physics Effects Copyright(C) 2010 Sony Computer Entertainment Inc.\r
3 All rights reserved.\r
4 \r
5 Physics Effects is open software; you can redistribute it and/or\r
6 modify it under the terms of the BSD License.\r
7 \r
8 Physics Effects is distributed in the hope that it will be useful,\r
9 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
11 See the BSD License for more details.\r
12 \r
13 A copy of the BSD License is distributed with\r
14 Physics Effects under the filename: physics_effects_license.txt\r
15 */\r
16 \r
17 #ifndef _SCE_PFX_CONSTRAINT_PAIR_H\r
18 #define _SCE_PFX_CONSTRAINT_PAIR_H\r
19 \r
20 #include "../sort/pfx_sort_data.h"\r
21 #include "../broadphase/pfx_broadphase_pair.h"\r
22 \r
23 namespace sce {\r
24 namespace PhysicsEffects {\r
25 \r
26 typedef PfxSortData16 PfxConstraintPair;\r
27 \r
28 //J     PfxBroadphasePairと共通\r
29 //E Same as PfxBroadphasePair\r
30 \r
31 SCE_PFX_FORCE_INLINE void pfxSetConstraintId(PfxConstraintPair &pair,PfxUInt32 i)       {pair.set32(2,i);}\r
32 SCE_PFX_FORCE_INLINE void pfxSetNumConstraints(PfxConstraintPair &pair,PfxUInt8 n)      {pair.set8(7,n);}\r
33 \r
34 SCE_PFX_FORCE_INLINE PfxUInt32 pfxGetConstraintId(const PfxConstraintPair &pair)        {return pair.get32(2);}\r
35 SCE_PFX_FORCE_INLINE PfxUInt8  pfxGetNumConstraints(const PfxConstraintPair &pair)      {return pair.get8(7);}\r
36 \r
37 } //namespace PhysicsEffects\r
38 } //namespace sce\r
39 #endif // _SCE_PFX_CONSTRAINT_PAIR_H\r