#include <hxcpp.h>

#ifndef INCLUDED_hxMath
#include <hxMath.h>
#endif
#ifndef INCLUDED_phoenix_Matrix
#include <phoenix/Matrix.h>
#endif
#ifndef INCLUDED_phoenix_Quaternion
#include <phoenix/Quaternion.h>
#endif
#ifndef INCLUDED_phoenix_Vector
#include <phoenix/Vector.h>
#endif
namespace phoenix{

Void Quaternion_obj::__construct(hx::Null< Float >  __o__x,hx::Null< Float >  __o__y,hx::Null< Float >  __o__z,hx::Null< Float >  __o__w)
{
HX_STACK_FRAME("phoenix.Quaternion","new",0x41d5772f,"phoenix.Quaternion.new","phoenix/Quaternion.hx",7,0x23671680)

HX_STACK_ARG(__o__x,"_x")

HX_STACK_ARG(__o__y,"_y")

HX_STACK_ARG(__o__z,"_z")

HX_STACK_ARG(__o__w,"_w")
Float _x = __o__x.Default(0);
Float _y = __o__y.Default(0);
Float _z = __o__z.Default(0);
Float _w = __o__w.Default(1);
{
	HX_STACK_LINE(437)
	this->ignore_euler = false;
	HX_STACK_LINE(23)
	this->_construct = false;
	HX_STACK_LINE(16)
	this->ignore_listeners = false;
	HX_STACK_LINE(12)
	this->w = 0.0;
	HX_STACK_LINE(11)
	this->z = 0.0;
	HX_STACK_LINE(10)
	this->y = 0.0;
	HX_STACK_LINE(9)
	this->x = 0.0;
	HX_STACK_LINE(27)
	this->_construct = true;
	HX_STACK_LINE(29)
	this->set_x(_x);
	HX_STACK_LINE(30)
	this->set_y(_y);
	HX_STACK_LINE(31)
	this->set_z(_z);
	HX_STACK_LINE(32)
	this->set_w(_w);
	HX_STACK_LINE(34)
	this->euler = ::phoenix::Vector_obj::__new(null(),null(),null(),null());
	HX_STACK_LINE(36)
	this->_construct = false;
}
;
	return null();
}

//Quaternion_obj::~Quaternion_obj() { }

Dynamic Quaternion_obj::__CreateEmpty() { return  new Quaternion_obj; }
hx::ObjectPtr< Quaternion_obj > Quaternion_obj::__new(hx::Null< Float >  __o__x,hx::Null< Float >  __o__y,hx::Null< Float >  __o__z,hx::Null< Float >  __o__w)
{  hx::ObjectPtr< Quaternion_obj > result = new Quaternion_obj();
	result->__construct(__o__x,__o__y,__o__z,__o__w);
	return result;}

Dynamic Quaternion_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< Quaternion_obj > result = new Quaternion_obj();
	result->__construct(inArgs[0],inArgs[1],inArgs[2],inArgs[3]);
	return result;}

::String Quaternion_obj::toString( ){
	HX_STACK_FRAME("phoenix.Quaternion","toString",0xe5131b7d,"phoenix.Quaternion.toString","phoenix/Quaternion.hx",42,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(42)
	return ((((((((HX_CSTRING("{ x:") + this->x) + HX_CSTRING(", y:")) + this->y) + HX_CSTRING(", z:")) + this->z) + HX_CSTRING(", w:")) + this->w) + HX_CSTRING(" }"));
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,toString,return )

::phoenix::Quaternion Quaternion_obj::set( Float _x,Float _y,Float _z,Float _w){
	HX_STACK_FRAME("phoenix.Quaternion","set",0x41d94271,"phoenix.Quaternion.set","phoenix/Quaternion.hx",46,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_x,"_x")
	HX_STACK_ARG(_y,"_y")
	HX_STACK_ARG(_z,"_z")
	HX_STACK_ARG(_w,"_w")
	HX_STACK_LINE(48)
	this->set_xyzw(_x,_y,_z,_w);
	HX_STACK_LINE(50)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC4(Quaternion_obj,set,return )

::phoenix::Quaternion Quaternion_obj::copy( ::phoenix::Quaternion _quaternion){
	HX_STACK_FRAME("phoenix.Quaternion","copy",0x51b50a06,"phoenix.Quaternion.copy","phoenix/Quaternion.hx",55,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_quaternion,"_quaternion")
	HX_STACK_LINE(57)
	this->set_xyzw(_quaternion->x,_quaternion->y,_quaternion->z,_quaternion->w);
	HX_STACK_LINE(62)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,copy,return )

Float Quaternion_obj::dot( ::phoenix::Quaternion _other){
	HX_STACK_FRAME("phoenix.Quaternion","dot",0x41cde958,"phoenix.Quaternion.dot","phoenix/Quaternion.hx",67,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_other,"_other")
	HX_STACK_LINE(67)
	return ((((this->x * _other->x) + (this->y * _other->y)) + (this->z * _other->z)) + (this->w * _other->w));
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,dot,return )

::phoenix::Quaternion Quaternion_obj::setFromEuler( ::phoenix::Vector _euler,::String __o__order){
::String _order = __o__order.Default(HX_CSTRING("XYZ"));
	HX_STACK_FRAME("phoenix.Quaternion","setFromEuler",0x1a4a0aee,"phoenix.Quaternion.setFromEuler","phoenix/Quaternion.hx",71,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_euler,"_euler")
	HX_STACK_ARG(_order,"_order")
{
		HX_STACK_LINE(77)
		Float _x = this->x;		HX_STACK_VAR(_x,"_x");
		HX_STACK_LINE(78)
		Float _y = this->y;		HX_STACK_VAR(_y,"_y");
		HX_STACK_LINE(79)
		Float _z = this->z;		HX_STACK_VAR(_z,"_z");
		HX_STACK_LINE(80)
		Float _w = this->w;		HX_STACK_VAR(_w,"_w");
		HX_STACK_LINE(82)
		Float c1 = ::Math_obj::cos((Float(_euler->x) / Float((int)2)));		HX_STACK_VAR(c1,"c1");
		HX_STACK_LINE(83)
		Float c2 = ::Math_obj::cos((Float(_euler->y) / Float((int)2)));		HX_STACK_VAR(c2,"c2");
		HX_STACK_LINE(84)
		Float c3 = ::Math_obj::cos((Float(_euler->z) / Float((int)2)));		HX_STACK_VAR(c3,"c3");
		HX_STACK_LINE(86)
		Float s1 = ::Math_obj::sin((Float(_euler->x) / Float((int)2)));		HX_STACK_VAR(s1,"s1");
		HX_STACK_LINE(87)
		Float s2 = ::Math_obj::sin((Float(_euler->y) / Float((int)2)));		HX_STACK_VAR(s2,"s2");
		HX_STACK_LINE(88)
		Float s3 = ::Math_obj::sin((Float(_euler->z) / Float((int)2)));		HX_STACK_VAR(s3,"s3");
		HX_STACK_LINE(90)
		if (((_order == HX_CSTRING("XYZ")))){
			HX_STACK_LINE(92)
			_x = (((s1 * c2) * c3) + ((c1 * s2) * s3));
			HX_STACK_LINE(93)
			_y = (((c1 * s2) * c3) - ((s1 * c2) * s3));
			HX_STACK_LINE(94)
			_z = (((c1 * c2) * s3) + ((s1 * s2) * c3));
			HX_STACK_LINE(95)
			_w = (((c1 * c2) * c3) - ((s1 * s2) * s3));
		}
		else{
			HX_STACK_LINE(97)
			if (((_order == HX_CSTRING("YXZ")))){
				HX_STACK_LINE(99)
				_x = (((s1 * c2) * c3) + ((c1 * s2) * s3));
				HX_STACK_LINE(100)
				_y = (((c1 * s2) * c3) - ((s1 * c2) * s3));
				HX_STACK_LINE(101)
				_z = (((c1 * c2) * s3) - ((s1 * s2) * c3));
				HX_STACK_LINE(102)
				_w = (((c1 * c2) * c3) + ((s1 * s2) * s3));
			}
			else{
				HX_STACK_LINE(104)
				if (((_order == HX_CSTRING("ZXY")))){
					HX_STACK_LINE(106)
					_x = (((s1 * c2) * c3) - ((c1 * s2) * s3));
					HX_STACK_LINE(107)
					_y = (((c1 * s2) * c3) + ((s1 * c2) * s3));
					HX_STACK_LINE(108)
					_z = (((c1 * c2) * s3) + ((s1 * s2) * c3));
					HX_STACK_LINE(109)
					_w = (((c1 * c2) * c3) - ((s1 * s2) * s3));
				}
				else{
					HX_STACK_LINE(111)
					if (((_order == HX_CSTRING("ZYX")))){
						HX_STACK_LINE(113)
						_x = (((s1 * c2) * c3) - ((c1 * s2) * s3));
						HX_STACK_LINE(114)
						_y = (((c1 * s2) * c3) + ((s1 * c2) * s3));
						HX_STACK_LINE(115)
						_z = (((c1 * c2) * s3) - ((s1 * s2) * c3));
						HX_STACK_LINE(116)
						_w = (((c1 * c2) * c3) + ((s1 * s2) * s3));
					}
					else{
						HX_STACK_LINE(118)
						if (((_order == HX_CSTRING("YZX")))){
							HX_STACK_LINE(120)
							_x = (((s1 * c2) * c3) + ((c1 * s2) * s3));
							HX_STACK_LINE(121)
							_y = (((c1 * s2) * c3) + ((s1 * c2) * s3));
							HX_STACK_LINE(122)
							_z = (((c1 * c2) * s3) - ((s1 * s2) * c3));
							HX_STACK_LINE(123)
							_w = (((c1 * c2) * c3) - ((s1 * s2) * s3));
						}
						else{
							HX_STACK_LINE(125)
							if (((_order == HX_CSTRING("XZY")))){
								HX_STACK_LINE(127)
								_x = (((s1 * c2) * c3) - ((c1 * s2) * s3));
								HX_STACK_LINE(128)
								_y = (((c1 * s2) * c3) - ((s1 * c2) * s3));
								HX_STACK_LINE(129)
								_z = (((c1 * c2) * s3) + ((s1 * s2) * c3));
								HX_STACK_LINE(130)
								_w = (((c1 * c2) * c3) + ((s1 * s2) * s3));
							}
						}
					}
				}
			}
		}
		HX_STACK_LINE(134)
		this->set_xyzw(_x,_y,_z,_w);
		HX_STACK_LINE(136)
		return hx::ObjectPtr<OBJ_>(this);
	}
}


HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,setFromEuler,return )

::phoenix::Quaternion Quaternion_obj::setFromAxisAngle( ::phoenix::Vector _axis,Float _angle){
	HX_STACK_FRAME("phoenix.Quaternion","setFromAxisAngle",0xa0e70777,"phoenix.Quaternion.setFromAxisAngle","phoenix/Quaternion.hx",141,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_axis,"_axis")
	HX_STACK_ARG(_angle,"_angle")
	HX_STACK_LINE(146)
	Float _halfAngle = (Float(_angle) / Float((int)2));		HX_STACK_VAR(_halfAngle,"_halfAngle");
	HX_STACK_LINE(147)
	Float _s = ::Math_obj::sin(_halfAngle);		HX_STACK_VAR(_s,"_s");
	HX_STACK_LINE(149)
	this->set_xyzw((_axis->x * _s),(_axis->y * _s),(_axis->z * _s),::Math_obj::cos(_halfAngle));
	HX_STACK_LINE(154)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,setFromAxisAngle,return )

::phoenix::Quaternion Quaternion_obj::setFromRotationMatrix( ::phoenix::Matrix _m){
	HX_STACK_FRAME("phoenix.Quaternion","setFromRotationMatrix",0xe63a5ffa,"phoenix.Quaternion.setFromRotationMatrix","phoenix/Quaternion.hx",159,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_m,"_m")
	HX_STACK_LINE(164)
	Array< Float > te = _m->elements;		HX_STACK_VAR(te,"te");
	HX_STACK_LINE(166)
	Float m11 = te->__get((int)0);		HX_STACK_VAR(m11,"m11");
	HX_STACK_LINE(166)
	Float m12 = te->__get((int)4);		HX_STACK_VAR(m12,"m12");
	HX_STACK_LINE(166)
	Float m13 = te->__get((int)8);		HX_STACK_VAR(m13,"m13");
	HX_STACK_LINE(167)
	Float m21 = te->__get((int)1);		HX_STACK_VAR(m21,"m21");
	HX_STACK_LINE(167)
	Float m22 = te->__get((int)5);		HX_STACK_VAR(m22,"m22");
	HX_STACK_LINE(167)
	Float m23 = te->__get((int)9);		HX_STACK_VAR(m23,"m23");
	HX_STACK_LINE(168)
	Float m31 = te->__get((int)2);		HX_STACK_VAR(m31,"m31");
	HX_STACK_LINE(168)
	Float m32 = te->__get((int)6);		HX_STACK_VAR(m32,"m32");
	HX_STACK_LINE(168)
	Float m33 = te->__get((int)10);		HX_STACK_VAR(m33,"m33");
	HX_STACK_LINE(170)
	Float _x = this->x;		HX_STACK_VAR(_x,"_x");
	HX_STACK_LINE(171)
	Float _y = this->y;		HX_STACK_VAR(_y,"_y");
	HX_STACK_LINE(172)
	Float _z = this->z;		HX_STACK_VAR(_z,"_z");
	HX_STACK_LINE(173)
	Float _w = this->w;		HX_STACK_VAR(_w,"_w");
	HX_STACK_LINE(175)
	Float tr = ((m11 + m22) + m33);		HX_STACK_VAR(tr,"tr");
	HX_STACK_LINE(177)
	Float s;		HX_STACK_VAR(s,"s");
	HX_STACK_LINE(179)
	if (((tr > (int)0))){
		HX_STACK_LINE(181)
		s = (Float(0.5) / Float(::Math_obj::sqrt((tr + 1.0))));
		HX_STACK_LINE(183)
		_w = (Float(0.25) / Float(s));
		HX_STACK_LINE(184)
		_x = (((m32 - m23)) * s);
		HX_STACK_LINE(185)
		_y = (((m13 - m31)) * s);
		HX_STACK_LINE(186)
		_z = (((m21 - m12)) * s);
	}
	else{
		HX_STACK_LINE(188)
		if (((bool((m11 > m22)) && bool((m11 > m33))))){
			HX_STACK_LINE(190)
			s = (2.0 * ::Math_obj::sqrt((((1.0 + m11) - m22) - m33)));
			HX_STACK_LINE(192)
			_w = (Float(((m32 - m23))) / Float(s));
			HX_STACK_LINE(193)
			_x = (0.25 * s);
			HX_STACK_LINE(194)
			_y = (Float(((m12 + m21))) / Float(s));
			HX_STACK_LINE(195)
			_z = (Float(((m13 + m31))) / Float(s));
		}
		else{
			HX_STACK_LINE(197)
			if (((m22 > m33))){
				HX_STACK_LINE(199)
				s = (2.0 * ::Math_obj::sqrt((((1.0 + m22) - m11) - m33)));
				HX_STACK_LINE(201)
				_w = (Float(((m13 - m31))) / Float(s));
				HX_STACK_LINE(202)
				_x = (Float(((m12 + m21))) / Float(s));
				HX_STACK_LINE(203)
				_y = (0.25 * s);
				HX_STACK_LINE(204)
				_z = (Float(((m23 + m32))) / Float(s));
			}
			else{
				HX_STACK_LINE(208)
				s = (2.0 * ::Math_obj::sqrt((((1.0 + m33) - m11) - m22)));
				HX_STACK_LINE(210)
				_w = (Float(((m21 - m12))) / Float(s));
				HX_STACK_LINE(211)
				_x = (Float(((m13 + m31))) / Float(s));
				HX_STACK_LINE(212)
				_y = (Float(((m23 + m32))) / Float(s));
				HX_STACK_LINE(213)
				_z = (0.25 * s);
			}
		}
	}
	HX_STACK_LINE(217)
	this->set_xyzw(_x,_y,_z,_w);
	HX_STACK_LINE(219)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,setFromRotationMatrix,return )

::phoenix::Quaternion Quaternion_obj::inverse( ){
	HX_STACK_FRAME("phoenix.Quaternion","inverse",0x883005ff,"phoenix.Quaternion.inverse","phoenix/Quaternion.hx",226,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(226)
	return this->conjugate()->normalize();
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,inverse,return )

::phoenix::Quaternion Quaternion_obj::conjugate( ){
	HX_STACK_FRAME("phoenix.Quaternion","conjugate",0xa5a66227,"phoenix.Quaternion.conjugate","phoenix/Quaternion.hx",231,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(233)
	this->set_xyzw((this->x * (int)-1),(this->y * (int)-1),(this->z * (int)-1),this->w);
	HX_STACK_LINE(235)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,conjugate,return )

Float Quaternion_obj::lengthSq( ){
	HX_STACK_FRAME("phoenix.Quaternion","lengthSq",0xcc67adf5,"phoenix.Quaternion.lengthSq","phoenix/Quaternion.hx",242,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(242)
	return ((((this->x * this->x) + (this->y * this->y)) + (this->z * this->z)) + (this->w * this->w));
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,lengthSq,return )

Float Quaternion_obj::length( ){
	HX_STACK_FRAME("phoenix.Quaternion","length",0xc664d977,"phoenix.Quaternion.length","phoenix/Quaternion.hx",249,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(249)
	return ::Math_obj::sqrt(((((this->x * this->x) + (this->y * this->y)) + (this->z * this->z)) + (this->w * this->w)));
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,length,return )

::phoenix::Quaternion Quaternion_obj::normalize( ){
	HX_STACK_FRAME("phoenix.Quaternion","normalize",0x0ebe639c,"phoenix.Quaternion.normalize","phoenix/Quaternion.hx",254,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(256)
	Float l = this->length();		HX_STACK_VAR(l,"l");
	HX_STACK_LINE(258)
	if (((l == (int)0))){
		HX_STACK_LINE(260)
		this->set_xyzw((int)0,(int)0,(int)0,(int)1);
	}
	else{
		HX_STACK_LINE(264)
		l = (Float((int)1) / Float(l));
		HX_STACK_LINE(266)
		this->set_xyzw((this->x * l),(this->y * l),(this->z * l),(this->w * l));
	}
	HX_STACK_LINE(270)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,normalize,return )

::phoenix::Quaternion Quaternion_obj::multiply( ::phoenix::Quaternion _quaternion){
	HX_STACK_FRAME("phoenix.Quaternion","multiply",0x47312cf5,"phoenix.Quaternion.multiply","phoenix/Quaternion.hx",277,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_quaternion,"_quaternion")
	HX_STACK_LINE(277)
	return this->multiplyQuaternions(hx::ObjectPtr<OBJ_>(this),_quaternion);
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,multiply,return )

::phoenix::Quaternion Quaternion_obj::add( ::phoenix::Quaternion _quaternion){
	HX_STACK_FRAME("phoenix.Quaternion","add",0x41cb98f0,"phoenix.Quaternion.add","phoenix/Quaternion.hx",283,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_quaternion,"_quaternion")
	HX_STACK_LINE(283)
	return this->addQuaternions(hx::ObjectPtr<OBJ_>(this),_quaternion);
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,add,return )

::phoenix::Quaternion Quaternion_obj::addQuaternions( ::phoenix::Quaternion _a,::phoenix::Quaternion _b){
	HX_STACK_FRAME("phoenix.Quaternion","addQuaternions",0xb1d63285,"phoenix.Quaternion.addQuaternions","phoenix/Quaternion.hx",287,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_a,"_a")
	HX_STACK_ARG(_b,"_b")
	HX_STACK_LINE(289)
	this->set_x((_a->x + _b->x));
	HX_STACK_LINE(290)
	this->set_y((_a->y + _b->y));
	HX_STACK_LINE(291)
	this->set_z((_a->z + _b->z));
	HX_STACK_LINE(292)
	this->set_w((_a->w + _b->w));
	HX_STACK_LINE(294)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,addQuaternions,return )

::phoenix::Quaternion Quaternion_obj::multiplyScalar( Float _scalar){
	HX_STACK_FRAME("phoenix.Quaternion","multiplyScalar",0x2f1f2e01,"phoenix.Quaternion.multiplyScalar","phoenix/Quaternion.hx",298,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_scalar,"_scalar")
	HX_STACK_LINE(300)
	{
		HX_STACK_LINE(300)
		::phoenix::Quaternion _g = hx::ObjectPtr<OBJ_>(this);		HX_STACK_VAR(_g,"_g");
		HX_STACK_LINE(300)
		_g->set_x((_g->x * _scalar));
	}
	HX_STACK_LINE(301)
	{
		HX_STACK_LINE(301)
		::phoenix::Quaternion _g = hx::ObjectPtr<OBJ_>(this);		HX_STACK_VAR(_g,"_g");
		HX_STACK_LINE(301)
		_g->set_y((_g->y * _scalar));
	}
	HX_STACK_LINE(302)
	{
		HX_STACK_LINE(302)
		::phoenix::Quaternion _g = hx::ObjectPtr<OBJ_>(this);		HX_STACK_VAR(_g,"_g");
		HX_STACK_LINE(302)
		_g->set_z((_g->z * _scalar));
	}
	HX_STACK_LINE(303)
	{
		HX_STACK_LINE(303)
		::phoenix::Quaternion _g = hx::ObjectPtr<OBJ_>(this);		HX_STACK_VAR(_g,"_g");
		HX_STACK_LINE(303)
		_g->set_w((_g->w * _scalar));
	}
	HX_STACK_LINE(305)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,multiplyScalar,return )

::phoenix::Quaternion Quaternion_obj::multiplyQuaternions( ::phoenix::Quaternion _a,::phoenix::Quaternion _b){
	HX_STACK_FRAME("phoenix.Quaternion","multiplyQuaternions",0x00ae42a0,"phoenix.Quaternion.multiplyQuaternions","phoenix/Quaternion.hx",309,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_a,"_a")
	HX_STACK_ARG(_b,"_b")
	HX_STACK_LINE(311)
	Float qax = _a->x;		HX_STACK_VAR(qax,"qax");
	HX_STACK_LINE(311)
	Float qay = _a->y;		HX_STACK_VAR(qay,"qay");
	HX_STACK_LINE(311)
	Float qaz = _a->z;		HX_STACK_VAR(qaz,"qaz");
	HX_STACK_LINE(311)
	Float qaw = _a->w;		HX_STACK_VAR(qaw,"qaw");
	HX_STACK_LINE(312)
	Float qbx = _b->x;		HX_STACK_VAR(qbx,"qbx");
	HX_STACK_LINE(312)
	Float qby = _b->y;		HX_STACK_VAR(qby,"qby");
	HX_STACK_LINE(312)
	Float qbz = _b->z;		HX_STACK_VAR(qbz,"qbz");
	HX_STACK_LINE(312)
	Float qbw = _b->w;		HX_STACK_VAR(qbw,"qbw");
	HX_STACK_LINE(314)
	this->set_xyzw(((((qax * qbw) + (qaw * qbx)) + (qay * qbz)) - (qaz * qby)),((((qay * qbw) + (qaw * qby)) + (qaz * qbx)) - (qax * qbz)),((((qaz * qbw) + (qaw * qbz)) + (qax * qby)) - (qay * qbx)),((((qaw * qbw) - (qax * qbx)) - (qay * qby)) - (qaz * qbz)));
	HX_STACK_LINE(319)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,multiplyQuaternions,return )

::phoenix::Quaternion Quaternion_obj::slerp( ::phoenix::Quaternion _qb,Float _t){
	HX_STACK_FRAME("phoenix.Quaternion","slerp",0x611900f9,"phoenix.Quaternion.slerp","phoenix/Quaternion.hx",324,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_qb,"_qb")
	HX_STACK_ARG(_t,"_t")
	HX_STACK_LINE(326)
	Float _x = this->x;		HX_STACK_VAR(_x,"_x");
	HX_STACK_LINE(327)
	Float _y = this->y;		HX_STACK_VAR(_y,"_y");
	HX_STACK_LINE(328)
	Float _z = this->z;		HX_STACK_VAR(_z,"_z");
	HX_STACK_LINE(329)
	Float _w = this->w;		HX_STACK_VAR(_w,"_w");
	HX_STACK_LINE(333)
	Float cosHalfTheta = ((((_w * _qb->w) + (_x * _qb->x)) + (_y * _qb->y)) + (_z * _qb->z));		HX_STACK_VAR(cosHalfTheta,"cosHalfTheta");
	HX_STACK_LINE(335)
	if (((cosHalfTheta < (int)0))){
		HX_STACK_LINE(337)
		this->set_w(-(_qb->w));
		HX_STACK_LINE(338)
		this->set_x(-(_qb->x));
		HX_STACK_LINE(339)
		this->set_y(-(_qb->y));
		HX_STACK_LINE(340)
		this->set_z(-(_qb->z));
		HX_STACK_LINE(342)
		cosHalfTheta = -(cosHalfTheta);
	}
	else{
		HX_STACK_LINE(346)
		this->copy(_qb);
	}
	HX_STACK_LINE(350)
	if (((cosHalfTheta >= 1.0))){
		HX_STACK_LINE(352)
		this->set_xyzw(_x,_y,_z,_w);
		HX_STACK_LINE(354)
		return hx::ObjectPtr<OBJ_>(this);
	}
	HX_STACK_LINE(358)
	Float halfTheta = ::Math_obj::acos(cosHalfTheta);		HX_STACK_VAR(halfTheta,"halfTheta");
	HX_STACK_LINE(359)
	Float sinHalfTheta = ::Math_obj::sqrt((1.0 - (cosHalfTheta * cosHalfTheta)));		HX_STACK_VAR(sinHalfTheta,"sinHalfTheta");
	HX_STACK_LINE(361)
	if (((::Math_obj::abs(sinHalfTheta) < 0.001))){
		HX_STACK_LINE(363)
		this->set_xyzw((0.5 * ((_w + this->w))),(0.5 * ((_x + this->x))),(0.5 * ((_y + this->y))),(0.5 * ((_z + this->z))));
		HX_STACK_LINE(368)
		return hx::ObjectPtr<OBJ_>(this);
	}
	HX_STACK_LINE(372)
	Float ratioA = (Float(::Math_obj::sin(((((int)1 - _t)) * halfTheta))) / Float(sinHalfTheta));		HX_STACK_VAR(ratioA,"ratioA");
	HX_STACK_LINE(373)
	Float ratioB = (Float(::Math_obj::sin((_t * halfTheta))) / Float(sinHalfTheta));		HX_STACK_VAR(ratioB,"ratioB");
	HX_STACK_LINE(375)
	this->set_xyzw(((_w * ratioA) + (this->w * ratioB)),((_x * ratioA) + (this->x * ratioB)),((_y * ratioA) + (this->y * ratioB)),((_z * ratioA) + (this->z * ratioB)));
	HX_STACK_LINE(380)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,slerp,return )

bool Quaternion_obj::equals( ::phoenix::Quaternion _q){
	HX_STACK_FRAME("phoenix.Quaternion","equals",0xe75032d0,"phoenix.Quaternion.equals","phoenix/Quaternion.hx",387,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_q,"_q")
	HX_STACK_LINE(387)
	return (bool((bool((bool((_q->x == this->x)) && bool((_q->y == this->y)))) && bool((_q->z == this->z)))) && bool((_q->w == this->w)));
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,equals,return )

::phoenix::Quaternion Quaternion_obj::fromArray( Array< Float > _a){
	HX_STACK_FRAME("phoenix.Quaternion","fromArray",0x3d3583de,"phoenix.Quaternion.fromArray","phoenix/Quaternion.hx",392,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_a,"_a")
	HX_STACK_LINE(394)
	this->set_xyzw(_a->__get((int)0),_a->__get((int)1),_a->__get((int)2),_a->__get((int)3));
	HX_STACK_LINE(396)
	return hx::ObjectPtr<OBJ_>(this);
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,fromArray,return )

Array< Float > Quaternion_obj::toArray( ){
	HX_STACK_FRAME("phoenix.Quaternion","toArray",0x3c52746d,"phoenix.Quaternion.toArray","phoenix/Quaternion.hx",403,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(403)
	return Array_obj< Float >::__new().Add(this->x).Add(this->y).Add(this->z).Add(this->w);
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,toArray,return )

::phoenix::Quaternion Quaternion_obj::clone( ){
	HX_STACK_FRAME("phoenix.Quaternion","clone",0x2ab74bec,"phoenix.Quaternion.clone","phoenix/Quaternion.hx",409,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(409)
	return ::phoenix::Quaternion_obj::__new(this->x,this->y,this->z,this->w);
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,clone,return )

::phoenix::Vector Quaternion_obj::toeuler( ){
	HX_STACK_FRAME("phoenix.Quaternion","toeuler",0xf8b6705d,"phoenix.Quaternion.toeuler","phoenix/Quaternion.hx",414,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_LINE(414)
	return ::phoenix::Vector_obj::__new(null(),null(),null(),null())->setEulerFromQuaternion(hx::ObjectPtr<OBJ_>(this),null())->degrees();
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,toeuler,return )

Void Quaternion_obj::update_euler( ){
{
		HX_STACK_FRAME("phoenix.Quaternion","update_euler",0x0887dac4,"phoenix.Quaternion.update_euler","phoenix/Quaternion.hx",427,0x23671680)
		HX_STACK_THIS(this)
		HX_STACK_LINE(429)
		if (((bool((bool((this->euler == null())) || bool(this->ignore_euler))) || bool(this->_construct)))){
			HX_STACK_LINE(430)
			return null();
		}
		HX_STACK_LINE(433)
		this->euler->setEulerFromQuaternion(hx::ObjectPtr<OBJ_>(this),null());
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(Quaternion_obj,update_euler,(void))

Void Quaternion_obj::set_xyzw( Float _x,Float _y,Float _z,Float _w){
{
		HX_STACK_FRAME("phoenix.Quaternion","set_xyzw",0x2a6a35cc,"phoenix.Quaternion.set_xyzw","phoenix/Quaternion.hx",439,0x23671680)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_x,"_x")
		HX_STACK_ARG(_y,"_y")
		HX_STACK_ARG(_z,"_z")
		HX_STACK_ARG(_w,"_w")
		HX_STACK_LINE(441)
		this->ignore_euler = true;
		HX_STACK_LINE(443)
		this->set_x(_x);
		HX_STACK_LINE(444)
		this->set_y(_y);
		HX_STACK_LINE(445)
		this->set_z(_z);
		HX_STACK_LINE(446)
		this->set_w(_w);
		HX_STACK_LINE(448)
		this->ignore_euler = false;
		HX_STACK_LINE(450)
		this->update_euler();
		HX_STACK_LINE(452)
		if (((bool((this->listen_x_dyn() != null())) && bool(!(this->ignore_listeners))))){
			HX_STACK_LINE(452)
			this->listen_x(this->x);
		}
		HX_STACK_LINE(453)
		if (((bool((this->listen_y_dyn() != null())) && bool(!(this->ignore_listeners))))){
			HX_STACK_LINE(453)
			this->listen_y(this->y);
		}
		HX_STACK_LINE(454)
		if (((bool((this->listen_z_dyn() != null())) && bool(!(this->ignore_listeners))))){
			HX_STACK_LINE(454)
			this->listen_z(this->z);
		}
		HX_STACK_LINE(455)
		if (((bool((this->listen_w_dyn() != null())) && bool(!(this->ignore_listeners))))){
			HX_STACK_LINE(455)
			this->listen_w(this->w);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC4(Quaternion_obj,set_xyzw,(void))

Float Quaternion_obj::set_x( Float _v){
	HX_STACK_FRAME("phoenix.Quaternion","set_x",0x5c83d3ea,"phoenix.Quaternion.set_x","phoenix/Quaternion.hx",459,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_v,"_v")
	HX_STACK_LINE(461)
	this->x = _v;
	HX_STACK_LINE(463)
	if ((this->_construct)){
		HX_STACK_LINE(463)
		return this->x;
	}
	HX_STACK_LINE(465)
	this->update_euler();
	HX_STACK_LINE(467)
	if (((bool((this->listen_x_dyn() != null())) && bool(!(this->ignore_listeners))))){
		HX_STACK_LINE(467)
		this->listen_x(this->x);
	}
	HX_STACK_LINE(469)
	return this->x;
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,set_x,return )

Float Quaternion_obj::set_y( Float _v){
	HX_STACK_FRAME("phoenix.Quaternion","set_y",0x5c83d3eb,"phoenix.Quaternion.set_y","phoenix/Quaternion.hx",473,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_v,"_v")
	HX_STACK_LINE(475)
	this->y = _v;
	HX_STACK_LINE(477)
	if ((this->_construct)){
		HX_STACK_LINE(477)
		return this->y;
	}
	HX_STACK_LINE(479)
	this->update_euler();
	HX_STACK_LINE(481)
	if (((bool((this->listen_y_dyn() != null())) && bool(!(this->ignore_listeners))))){
		HX_STACK_LINE(481)
		this->listen_y(this->y);
	}
	HX_STACK_LINE(483)
	return this->y;
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,set_y,return )

Float Quaternion_obj::set_z( Float _v){
	HX_STACK_FRAME("phoenix.Quaternion","set_z",0x5c83d3ec,"phoenix.Quaternion.set_z","phoenix/Quaternion.hx",487,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_v,"_v")
	HX_STACK_LINE(489)
	this->z = _v;
	HX_STACK_LINE(491)
	if ((this->_construct)){
		HX_STACK_LINE(491)
		return this->z;
	}
	HX_STACK_LINE(493)
	this->update_euler();
	HX_STACK_LINE(495)
	if (((bool((this->listen_z_dyn() != null())) && bool(!(this->ignore_listeners))))){
		HX_STACK_LINE(495)
		this->listen_z(this->z);
	}
	HX_STACK_LINE(497)
	return this->z;
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,set_z,return )

Float Quaternion_obj::set_w( Float _v){
	HX_STACK_FRAME("phoenix.Quaternion","set_w",0x5c83d3e9,"phoenix.Quaternion.set_w","phoenix/Quaternion.hx",501,0x23671680)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_v,"_v")
	HX_STACK_LINE(503)
	this->w = _v;
	HX_STACK_LINE(505)
	if ((this->_construct)){
		HX_STACK_LINE(505)
		return this->w;
	}
	HX_STACK_LINE(507)
	this->update_euler();
	HX_STACK_LINE(509)
	if (((bool((this->listen_w_dyn() != null())) && bool(!(this->ignore_listeners))))){
		HX_STACK_LINE(509)
		this->listen_w(this->w);
	}
	HX_STACK_LINE(511)
	return this->w;
}


HX_DEFINE_DYNAMIC_FUNC1(Quaternion_obj,set_w,return )

::phoenix::Quaternion Quaternion_obj::Slerp( ::phoenix::Quaternion _qa,::phoenix::Quaternion _qb,::phoenix::Quaternion _qm,Float _t){
	HX_STACK_FRAME("phoenix.Quaternion","Slerp",0xf44670d9,"phoenix.Quaternion.Slerp","phoenix/Quaternion.hx",419,0x23671680)
	HX_STACK_ARG(_qa,"_qa")
	HX_STACK_ARG(_qb,"_qb")
	HX_STACK_ARG(_qm,"_qm")
	HX_STACK_ARG(_t,"_t")
	HX_STACK_LINE(419)
	return _qm->copy(_qa)->slerp(_qb,_t);
}


STATIC_HX_DEFINE_DYNAMIC_FUNC4(Quaternion_obj,Slerp,return )

Float Quaternion_obj::Dot( ::phoenix::Quaternion _a,::phoenix::Quaternion _b){
	HX_STACK_FRAME("phoenix.Quaternion","Dot",0x41b5a138,"phoenix.Quaternion.Dot","phoenix/Quaternion.hx",424,0x23671680)
	HX_STACK_ARG(_a,"_a")
	HX_STACK_ARG(_b,"_b")
	HX_STACK_LINE(424)
	return ::phoenix::Quaternion_obj::__new(_a->x,_a->y,_a->z,_a->w)->dot(_b);
}


STATIC_HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,Dot,return )

Void Quaternion_obj::listen( ::phoenix::Quaternion _q,Dynamic listener){
{
		HX_STACK_FRAME("phoenix.Quaternion","listen",0x17570cd8,"phoenix.Quaternion.listen","phoenix/Quaternion.hx",515,0x23671680)
		HX_STACK_ARG(_q,"_q")
		HX_STACK_ARG(listener,"listener")
		HX_STACK_LINE(517)
		_q->listen_x = listener;
		HX_STACK_LINE(518)
		_q->listen_y = listener;
		HX_STACK_LINE(519)
		_q->listen_z = listener;
		HX_STACK_LINE(520)
		_q->listen_w = listener;
	}
return null();
}


STATIC_HX_DEFINE_DYNAMIC_FUNC2(Quaternion_obj,listen,(void))


Quaternion_obj::Quaternion_obj()
{
}

void Quaternion_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(Quaternion);
	HX_MARK_MEMBER_NAME(x,"x");
	HX_MARK_MEMBER_NAME(y,"y");
	HX_MARK_MEMBER_NAME(z,"z");
	HX_MARK_MEMBER_NAME(w,"w");
	HX_MARK_MEMBER_NAME(euler,"euler");
	HX_MARK_MEMBER_NAME(ignore_listeners,"ignore_listeners");
	HX_MARK_MEMBER_NAME(listen_x,"listen_x");
	HX_MARK_MEMBER_NAME(listen_y,"listen_y");
	HX_MARK_MEMBER_NAME(listen_z,"listen_z");
	HX_MARK_MEMBER_NAME(listen_w,"listen_w");
	HX_MARK_MEMBER_NAME(_construct,"_construct");
	HX_MARK_MEMBER_NAME(ignore_euler,"ignore_euler");
	HX_MARK_END_CLASS();
}

void Quaternion_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(x,"x");
	HX_VISIT_MEMBER_NAME(y,"y");
	HX_VISIT_MEMBER_NAME(z,"z");
	HX_VISIT_MEMBER_NAME(w,"w");
	HX_VISIT_MEMBER_NAME(euler,"euler");
	HX_VISIT_MEMBER_NAME(ignore_listeners,"ignore_listeners");
	HX_VISIT_MEMBER_NAME(listen_x,"listen_x");
	HX_VISIT_MEMBER_NAME(listen_y,"listen_y");
	HX_VISIT_MEMBER_NAME(listen_z,"listen_z");
	HX_VISIT_MEMBER_NAME(listen_w,"listen_w");
	HX_VISIT_MEMBER_NAME(_construct,"_construct");
	HX_VISIT_MEMBER_NAME(ignore_euler,"ignore_euler");
}

Dynamic Quaternion_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 1:
		if (HX_FIELD_EQ(inName,"x") ) { return x; }
		if (HX_FIELD_EQ(inName,"y") ) { return y; }
		if (HX_FIELD_EQ(inName,"z") ) { return z; }
		if (HX_FIELD_EQ(inName,"w") ) { return w; }
		break;
	case 3:
		if (HX_FIELD_EQ(inName,"Dot") ) { return Dot_dyn(); }
		if (HX_FIELD_EQ(inName,"set") ) { return set_dyn(); }
		if (HX_FIELD_EQ(inName,"dot") ) { return dot_dyn(); }
		if (HX_FIELD_EQ(inName,"add") ) { return add_dyn(); }
		break;
	case 4:
		if (HX_FIELD_EQ(inName,"copy") ) { return copy_dyn(); }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"Slerp") ) { return Slerp_dyn(); }
		if (HX_FIELD_EQ(inName,"euler") ) { return euler; }
		if (HX_FIELD_EQ(inName,"slerp") ) { return slerp_dyn(); }
		if (HX_FIELD_EQ(inName,"clone") ) { return clone_dyn(); }
		if (HX_FIELD_EQ(inName,"set_x") ) { return set_x_dyn(); }
		if (HX_FIELD_EQ(inName,"set_y") ) { return set_y_dyn(); }
		if (HX_FIELD_EQ(inName,"set_z") ) { return set_z_dyn(); }
		if (HX_FIELD_EQ(inName,"set_w") ) { return set_w_dyn(); }
		break;
	case 6:
		if (HX_FIELD_EQ(inName,"listen") ) { return listen_dyn(); }
		if (HX_FIELD_EQ(inName,"length") ) { return length_dyn(); }
		if (HX_FIELD_EQ(inName,"equals") ) { return equals_dyn(); }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"inverse") ) { return inverse_dyn(); }
		if (HX_FIELD_EQ(inName,"toArray") ) { return toArray_dyn(); }
		if (HX_FIELD_EQ(inName,"toeuler") ) { return toeuler_dyn(); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"listen_x") ) { return listen_x; }
		if (HX_FIELD_EQ(inName,"listen_y") ) { return listen_y; }
		if (HX_FIELD_EQ(inName,"listen_z") ) { return listen_z; }
		if (HX_FIELD_EQ(inName,"listen_w") ) { return listen_w; }
		if (HX_FIELD_EQ(inName,"toString") ) { return toString_dyn(); }
		if (HX_FIELD_EQ(inName,"lengthSq") ) { return lengthSq_dyn(); }
		if (HX_FIELD_EQ(inName,"multiply") ) { return multiply_dyn(); }
		if (HX_FIELD_EQ(inName,"set_xyzw") ) { return set_xyzw_dyn(); }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"conjugate") ) { return conjugate_dyn(); }
		if (HX_FIELD_EQ(inName,"normalize") ) { return normalize_dyn(); }
		if (HX_FIELD_EQ(inName,"fromArray") ) { return fromArray_dyn(); }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"_construct") ) { return _construct; }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"setFromEuler") ) { return setFromEuler_dyn(); }
		if (HX_FIELD_EQ(inName,"update_euler") ) { return update_euler_dyn(); }
		if (HX_FIELD_EQ(inName,"ignore_euler") ) { return ignore_euler; }
		break;
	case 14:
		if (HX_FIELD_EQ(inName,"addQuaternions") ) { return addQuaternions_dyn(); }
		if (HX_FIELD_EQ(inName,"multiplyScalar") ) { return multiplyScalar_dyn(); }
		break;
	case 16:
		if (HX_FIELD_EQ(inName,"ignore_listeners") ) { return ignore_listeners; }
		if (HX_FIELD_EQ(inName,"setFromAxisAngle") ) { return setFromAxisAngle_dyn(); }
		break;
	case 19:
		if (HX_FIELD_EQ(inName,"multiplyQuaternions") ) { return multiplyQuaternions_dyn(); }
		break;
	case 21:
		if (HX_FIELD_EQ(inName,"setFromRotationMatrix") ) { return setFromRotationMatrix_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic Quaternion_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 1:
		if (HX_FIELD_EQ(inName,"x") ) { if (inCallProp) return set_x(inValue);x=inValue.Cast< Float >(); return inValue; }
		if (HX_FIELD_EQ(inName,"y") ) { if (inCallProp) return set_y(inValue);y=inValue.Cast< Float >(); return inValue; }
		if (HX_FIELD_EQ(inName,"z") ) { if (inCallProp) return set_z(inValue);z=inValue.Cast< Float >(); return inValue; }
		if (HX_FIELD_EQ(inName,"w") ) { if (inCallProp) return set_w(inValue);w=inValue.Cast< Float >(); return inValue; }
		break;
	case 5:
		if (HX_FIELD_EQ(inName,"euler") ) { euler=inValue.Cast< ::phoenix::Vector >(); return inValue; }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"listen_x") ) { listen_x=inValue.Cast< Dynamic >(); return inValue; }
		if (HX_FIELD_EQ(inName,"listen_y") ) { listen_y=inValue.Cast< Dynamic >(); return inValue; }
		if (HX_FIELD_EQ(inName,"listen_z") ) { listen_z=inValue.Cast< Dynamic >(); return inValue; }
		if (HX_FIELD_EQ(inName,"listen_w") ) { listen_w=inValue.Cast< Dynamic >(); return inValue; }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"_construct") ) { _construct=inValue.Cast< bool >(); return inValue; }
		break;
	case 12:
		if (HX_FIELD_EQ(inName,"ignore_euler") ) { ignore_euler=inValue.Cast< bool >(); return inValue; }
		break;
	case 16:
		if (HX_FIELD_EQ(inName,"ignore_listeners") ) { ignore_listeners=inValue.Cast< bool >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void Quaternion_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("x"));
	outFields->push(HX_CSTRING("y"));
	outFields->push(HX_CSTRING("z"));
	outFields->push(HX_CSTRING("w"));
	outFields->push(HX_CSTRING("euler"));
	outFields->push(HX_CSTRING("ignore_listeners"));
	outFields->push(HX_CSTRING("_construct"));
	outFields->push(HX_CSTRING("ignore_euler"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	HX_CSTRING("Slerp"),
	HX_CSTRING("Dot"),
	HX_CSTRING("listen"),
	String(null()) };

#if HXCPP_SCRIPTABLE
static hx::StorageInfo sMemberStorageInfo[] = {
	{hx::fsFloat,(int)offsetof(Quaternion_obj,x),HX_CSTRING("x")},
	{hx::fsFloat,(int)offsetof(Quaternion_obj,y),HX_CSTRING("y")},
	{hx::fsFloat,(int)offsetof(Quaternion_obj,z),HX_CSTRING("z")},
	{hx::fsFloat,(int)offsetof(Quaternion_obj,w),HX_CSTRING("w")},
	{hx::fsObject /*::phoenix::Vector*/ ,(int)offsetof(Quaternion_obj,euler),HX_CSTRING("euler")},
	{hx::fsBool,(int)offsetof(Quaternion_obj,ignore_listeners),HX_CSTRING("ignore_listeners")},
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(Quaternion_obj,listen_x),HX_CSTRING("listen_x")},
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(Quaternion_obj,listen_y),HX_CSTRING("listen_y")},
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(Quaternion_obj,listen_z),HX_CSTRING("listen_z")},
	{hx::fsObject /*Dynamic*/ ,(int)offsetof(Quaternion_obj,listen_w),HX_CSTRING("listen_w")},
	{hx::fsBool,(int)offsetof(Quaternion_obj,_construct),HX_CSTRING("_construct")},
	{hx::fsBool,(int)offsetof(Quaternion_obj,ignore_euler),HX_CSTRING("ignore_euler")},
	{ hx::fsUnknown, 0, null()}
};
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("x"),
	HX_CSTRING("y"),
	HX_CSTRING("z"),
	HX_CSTRING("w"),
	HX_CSTRING("euler"),
	HX_CSTRING("ignore_listeners"),
	HX_CSTRING("listen_x"),
	HX_CSTRING("listen_y"),
	HX_CSTRING("listen_z"),
	HX_CSTRING("listen_w"),
	HX_CSTRING("_construct"),
	HX_CSTRING("toString"),
	HX_CSTRING("set"),
	HX_CSTRING("copy"),
	HX_CSTRING("dot"),
	HX_CSTRING("setFromEuler"),
	HX_CSTRING("setFromAxisAngle"),
	HX_CSTRING("setFromRotationMatrix"),
	HX_CSTRING("inverse"),
	HX_CSTRING("conjugate"),
	HX_CSTRING("lengthSq"),
	HX_CSTRING("length"),
	HX_CSTRING("normalize"),
	HX_CSTRING("multiply"),
	HX_CSTRING("add"),
	HX_CSTRING("addQuaternions"),
	HX_CSTRING("multiplyScalar"),
	HX_CSTRING("multiplyQuaternions"),
	HX_CSTRING("slerp"),
	HX_CSTRING("equals"),
	HX_CSTRING("fromArray"),
	HX_CSTRING("toArray"),
	HX_CSTRING("clone"),
	HX_CSTRING("toeuler"),
	HX_CSTRING("update_euler"),
	HX_CSTRING("ignore_euler"),
	HX_CSTRING("set_xyzw"),
	HX_CSTRING("set_x"),
	HX_CSTRING("set_y"),
	HX_CSTRING("set_z"),
	HX_CSTRING("set_w"),
	String(null()) };

static void sMarkStatics(HX_MARK_PARAMS) {
	HX_MARK_MEMBER_NAME(Quaternion_obj::__mClass,"__mClass");
};

#ifdef HXCPP_VISIT_ALLOCS
static void sVisitStatics(HX_VISIT_PARAMS) {
	HX_VISIT_MEMBER_NAME(Quaternion_obj::__mClass,"__mClass");
};

#endif

Class Quaternion_obj::__mClass;

void Quaternion_obj::__register()
{
	hx::Static(__mClass) = hx::RegisterClass(HX_CSTRING("phoenix.Quaternion"), hx::TCanCast< Quaternion_obj> ,sStaticFields,sMemberFields,
	&__CreateEmpty, &__Create,
	&super::__SGetClass(), 0, sMarkStatics
#ifdef HXCPP_VISIT_ALLOCS
    , sVisitStatics
#endif
#ifdef HXCPP_SCRIPTABLE
    , sMemberStorageInfo
#endif
);
}

void Quaternion_obj::__boot()
{
}

} // end namespace phoenix
