5 // cube -size/2,-size/2,-size/2 -> size/2,size/2,size/2
6 MeshPtr
createCubeMesh(SceneManager
*sm
, const std::string
&name
, const std::string
&mat
, Real size
) {
7 ManualObject
*cube
= sm
->createManualObject(name
);
11 cube
->position(-size
/2,-size
/2,-size
/2);
12 cube
->position(size
/2,-size
/2,-size
/2);
13 cube
->position(size
/2,size
/2,-size
/2);
14 cube
->position(-size
/2,size
/2,-size
/2);
17 cube
->position(-size
/2,-size
/2,size
/2);
18 cube
->position(size
/2,-size
/2,size
/2);
19 cube
->position(size
/2,size
/2,size
/2);
20 cube
->position(-size
/2,size
/2,size
/2);
22 cube
->quad(3,2,1,0); // front
23 cube
->quad(4,5,6,7); // back
24 cube
->quad(4,7,3,0); // left
25 cube
->quad(6,5,1,2); // right
26 cube
->quad(7,6,2,3); // top
27 cube
->quad(0,1,5,4); // bottom
30 return cube
->convertToMesh(name
);
33 CEGUI::MouseButton
convertButton(OIS::MouseButtonID id
) {
35 case OIS::MB_Left
: return CEGUI::LeftButton
;
37 case OIS::MB_Right
: return CEGUI::RightButton
;
39 case OIS::MB_Middle
: return CEGUI::MiddleButton
;
41 default: return CEGUI::LeftButton
;