

Innopeor wrote:Im interested in some examples contained in this wrapper, still in somewhere those examples written in c++ instead than bas?
extern "C" __declspec(dllexport) void Irrclose(void)
{
device->closeDevice();
return ;
}
extern "C" __declspec(dllexport) void Irrsetnoderotation123
(ISceneNode * testNode,f32 const o1,f32 const o2,f32 const o3)
{
quaternion rot1;
rot1.fromAngleAxis(o1*DEGTORAD,vector3df(0,1,0));
quaternion rot2;
rot2.fromAngleAxis(o2*DEGTORAD,vector3df(0,0,1));
quaternion rot3;
rot3.fromAngleAxis(o3*DEGTORAD,vector3df(1,0,0));
quaternion rot123=rot3*(rot2*rot1);
vector3df eulers;
rot123.toEuler(eulers); //... in radians
eulers *= RADTODEG; //... and now in degrees
testNode->setRotation(eulers);
return;
}
extern "C" __declspec(dllexport) void irrdraw2dline(s32 const x0,s32 const y0,s32 const x1,s32 const y1,
u32 const A,u32 const R,u32 const G,u32 const B )
{
position2d<s32> xy0=position2d<s32>(x0,y0);
position2d<s32> xy1=position2d<s32>(x1,y1);
driver->draw2DLine(xy0,xy1,SColor(A,R,G,B) );
return ;
}
extern "C" __declspec(dllexport) void irrdraw2dimagescale(
video::ITexture * texture,
int TX,int TY,int BX,int BY,
int TX2,int TY2,int BX2,int BY2,
bool usealpha )
{
driver->draw2DImage(
texture,
rect<s32>(TX2,TY2,BX2,BY2),
rect<s32>(TX,TY,BX,BY),
NULL,
NULL,usealpha);
return ;
}

Return to Project Announcements
Users browsing this forum: No registered users and 1 guest