Example #1
0
int LuaPeak::getPos(lua_State *L)
{
	Peak* obj = RefBinding<Peak>::check( L, 1);
	Spectrum* spec = 0;
	if( lua_gettop( L ) > 1 )
	{
		spec = RefBinding<Spectrum>::cast( L, 2 );
	}
	const PeakPos& a = obj->getPos( spec );
	for( int i = 0; i < obj->getDimCount(); i++ )
		lua_pushnumber( L, a[ i ] );
	return obj->getDimCount();
}