#include <hxcpp.h>

#ifndef INCLUDED_IMap
#include <IMap.h>
#endif
#ifndef INCLUDED_Luxe
#include <Luxe.h>
#endif
#ifndef INCLUDED_haxe_Log
#include <haxe/Log.h>
#endif
#ifndef INCLUDED_haxe_ds_StringMap
#include <haxe/ds/StringMap.h>
#endif
#ifndef INCLUDED_luxe_resource_Resource
#include <luxe/resource/Resource.h>
#endif
#ifndef INCLUDED_luxe_utils_Utils
#include <luxe/utils/Utils.h>
#endif
#ifndef INCLUDED_phoenix_Color
#include <phoenix/Color.h>
#endif
#ifndef INCLUDED_phoenix_PrimitiveType
#include <phoenix/PrimitiveType.h>
#endif
#ifndef INCLUDED_phoenix_Rectangle
#include <phoenix/Rectangle.h>
#endif
#ifndef INCLUDED_phoenix_Texture
#include <phoenix/Texture.h>
#endif
#ifndef INCLUDED_phoenix_Vector
#include <phoenix/Vector.h>
#endif
#ifndef INCLUDED_phoenix_geometry_ComplexGeometry
#include <phoenix/geometry/ComplexGeometry.h>
#endif
#ifndef INCLUDED_phoenix_geometry_Geometry
#include <phoenix/geometry/Geometry.h>
#endif
#ifndef INCLUDED_phoenix_geometry_TextureCoord
#include <phoenix/geometry/TextureCoord.h>
#endif
#ifndef INCLUDED_phoenix_geometry_TextureCoordSet
#include <phoenix/geometry/TextureCoordSet.h>
#endif
#ifndef INCLUDED_phoenix_geometry_Vertex
#include <phoenix/geometry/Vertex.h>
#endif
namespace phoenix{
namespace geometry{

Void ComplexGeometry_obj::__construct(Dynamic _options)
{
HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","new",0xccaea157,"phoenix.geometry.ComplexGeometry.new","phoenix/geometry/ComplexGeometry.hx",33,0x2def05d9)

HX_STACK_ARG(_options,"_options")
{
	HX_STACK_LINE(35)
	super::__construct(_options);
	HX_STACK_LINE(36)
	this->set_primitive_type(::phoenix::PrimitiveType_obj::triangles);
	HX_STACK_LINE(38)
	this->quads = ::haxe::ds::StringMap_obj::__new();
}
;
	return null();
}

//ComplexGeometry_obj::~ComplexGeometry_obj() { }

Dynamic ComplexGeometry_obj::__CreateEmpty() { return  new ComplexGeometry_obj; }
hx::ObjectPtr< ComplexGeometry_obj > ComplexGeometry_obj::__new(Dynamic _options)
{  hx::ObjectPtr< ComplexGeometry_obj > result = new ComplexGeometry_obj();
	result->__construct(_options);
	return result;}

Dynamic ComplexGeometry_obj::__Create(hx::DynamicArray inArgs)
{  hx::ObjectPtr< ComplexGeometry_obj > result = new ComplexGeometry_obj();
	result->__construct(inArgs[0]);
	return result;}

Void ComplexGeometry_obj::clear( ){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","clear",0xfdc5ae44,"phoenix.geometry.ComplexGeometry.clear","phoenix/geometry/ComplexGeometry.hx",43,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_LINE(43)
		for(::cpp::FastIterator_obj< ::String > *__it = ::cpp::CreateFastIterator< ::String >(this->quads->keys());  __it->hasNext(); ){
			::String q = __it->next();
			this->quad_remove(q);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC0(ComplexGeometry_obj,clear,(void))

::String ComplexGeometry_obj::quad_add( Dynamic _options){
	HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_add",0x06f22f12,"phoenix.geometry.ComplexGeometry.quad_add","phoenix/geometry/ComplexGeometry.hx",48,0x2def05d9)
	HX_STACK_THIS(this)
	HX_STACK_ARG(_options,"_options")
	HX_STACK_LINE(50)
	::String _uuid = ::Luxe_obj::utils->uniqueid();		HX_STACK_VAR(_uuid,"_uuid");
	HX_STACK_LINE(53)
	::phoenix::geometry::Vertex vert0 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(_options->__Field(HX_CSTRING("x"),true),_options->__Field(HX_CSTRING("y"),true),null(),null()),null(),null());		HX_STACK_VAR(vert0,"vert0");
	HX_STACK_LINE(54)
	::phoenix::geometry::Vertex vert1 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((_options->__Field(HX_CSTRING("x"),true) + _options->__Field(HX_CSTRING("w"),true)),_options->__Field(HX_CSTRING("y"),true),null(),null()),null(),null());		HX_STACK_VAR(vert1,"vert1");
	HX_STACK_LINE(55)
	::phoenix::geometry::Vertex vert2 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((_options->__Field(HX_CSTRING("x"),true) + _options->__Field(HX_CSTRING("w"),true)),(_options->__Field(HX_CSTRING("y"),true) + _options->__Field(HX_CSTRING("h"),true)),null(),null()),null(),null());		HX_STACK_VAR(vert2,"vert2");
	HX_STACK_LINE(58)
	::phoenix::geometry::Vertex vert3 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(_options->__Field(HX_CSTRING("x"),true),(_options->__Field(HX_CSTRING("y"),true) + _options->__Field(HX_CSTRING("h"),true)),null(),null()),null(),null());		HX_STACK_VAR(vert3,"vert3");
	HX_STACK_LINE(59)
	::phoenix::geometry::Vertex vert4 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(_options->__Field(HX_CSTRING("x"),true),_options->__Field(HX_CSTRING("y"),true),null(),null()),null(),null());		HX_STACK_VAR(vert4,"vert4");
	HX_STACK_LINE(60)
	::phoenix::geometry::Vertex vert5 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((_options->__Field(HX_CSTRING("x"),true) + _options->__Field(HX_CSTRING("w"),true)),(_options->__Field(HX_CSTRING("y"),true) + _options->__Field(HX_CSTRING("h"),true)),null(),null()),null(),null());		HX_STACK_VAR(vert5,"vert5");
	HX_STACK_LINE(63)
	this->add(vert0);
	HX_STACK_LINE(65)
	this->add(vert1);
	HX_STACK_LINE(67)
	this->add(vert2);
	HX_STACK_LINE(69)
	this->add(vert3);
	HX_STACK_LINE(71)
	this->add(vert4);
	HX_STACK_LINE(73)
	this->add(vert5);
	HX_STACK_LINE(78)
	Array< ::Dynamic > _g = Array_obj< ::Dynamic >::__new();		HX_STACK_VAR(_g,"_g");
	struct _Function_1_1{
		inline static Dynamic Block( Array< ::Dynamic > &_g,::String &_uuid){
			HX_STACK_FRAME("*","closure",0x5bdab937,"*.closure","phoenix/geometry/ComplexGeometry.hx",76,0x2def05d9)
			{
				hx::Anon __result = hx::Anon_obj::Create();
				__result->Add(HX_CSTRING("uuid") , _uuid,false);
				__result->Add(HX_CSTRING("verts") , _g,false);
				__result->Add(HX_CSTRING("flipx") , false,false);
				__result->Add(HX_CSTRING("flipy") , false,false);
				__result->Add(HX_CSTRING("_uv_cache") , ::phoenix::Rectangle_obj::__new((int)0,(int)0,(int)1,(int)1),false);
				return __result;
			}
			return null();
		}
	};
	HX_STACK_LINE(76)
	Dynamic _complex_quad = _Function_1_1::Block(_g,_uuid);		HX_STACK_VAR(_complex_quad,"_complex_quad");
	HX_STACK_LINE(83)
	_complex_quad->__Field(HX_CSTRING("verts"),true)->__Field(HX_CSTRING("push"),true)(vert0);
	HX_STACK_LINE(84)
	_complex_quad->__Field(HX_CSTRING("verts"),true)->__Field(HX_CSTRING("push"),true)(vert1);
	HX_STACK_LINE(85)
	_complex_quad->__Field(HX_CSTRING("verts"),true)->__Field(HX_CSTRING("push"),true)(vert2);
	HX_STACK_LINE(86)
	_complex_quad->__Field(HX_CSTRING("verts"),true)->__Field(HX_CSTRING("push"),true)(vert3);
	HX_STACK_LINE(87)
	_complex_quad->__Field(HX_CSTRING("verts"),true)->__Field(HX_CSTRING("push"),true)(vert4);
	HX_STACK_LINE(88)
	_complex_quad->__Field(HX_CSTRING("verts"),true)->__Field(HX_CSTRING("push"),true)(vert5);
	HX_STACK_LINE(90)
	this->quads->set(_uuid,_complex_quad);
	HX_STACK_LINE(93)
	this->set_dirty(true);
	HX_STACK_LINE(95)
	return _uuid;
}


HX_DEFINE_DYNAMIC_FUNC1(ComplexGeometry_obj,quad_add,return )

Void ComplexGeometry_obj::quad_remove( ::String _quad_id){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_remove",0xdefa4bf3,"phoenix.geometry.ComplexGeometry.quad_remove","phoenix/geometry/ComplexGeometry.hx",99,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_LINE(101)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(103)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(105)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0));
			HX_STACK_LINE(106)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1));
			HX_STACK_LINE(107)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2));
			HX_STACK_LINE(108)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3));
			HX_STACK_LINE(109)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4));
			HX_STACK_LINE(110)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5));
			HX_STACK_LINE(112)
			this->quads->remove(_quad_id);
			HX_STACK_LINE(115)
			this->set_dirty(true);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(ComplexGeometry_obj,quad_remove,(void))

Void ComplexGeometry_obj::quad_hide( ::String _quad_id){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_hide",0x119b4ab1,"phoenix.geometry.ComplexGeometry.quad_hide","phoenix/geometry/ComplexGeometry.hx",121,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_LINE(123)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(125)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(127)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0));
			HX_STACK_LINE(128)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1));
			HX_STACK_LINE(129)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2));
			HX_STACK_LINE(130)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3));
			HX_STACK_LINE(131)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4));
			HX_STACK_LINE(132)
			this->remove(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5));
			HX_STACK_LINE(135)
			this->set_dirty(true);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(ComplexGeometry_obj,quad_hide,(void))

Void ComplexGeometry_obj::quad_show( ::String _quad_id){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_show",0x18dfeaec,"phoenix.geometry.ComplexGeometry.quad_show","phoenix/geometry/ComplexGeometry.hx",142,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_LINE(144)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(146)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(148)
			this->add(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0));
			HX_STACK_LINE(149)
			this->add(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1));
			HX_STACK_LINE(150)
			this->add(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2));
			HX_STACK_LINE(151)
			this->add(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3));
			HX_STACK_LINE(152)
			this->add(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4));
			HX_STACK_LINE(153)
			this->add(_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5));
			HX_STACK_LINE(156)
			this->set_dirty(true);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(ComplexGeometry_obj,quad_show,(void))

Void ComplexGeometry_obj::quad_resize( ::String _quad_id,::phoenix::Rectangle _quad){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_resize",0xe2ed09a3,"phoenix.geometry.ComplexGeometry.quad_resize","phoenix/geometry/ComplexGeometry.hx",162,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_quad,"_quad")
		HX_STACK_LINE(164)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(166)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(168)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__FieldRef(HX_CSTRING("pos")) = ::phoenix::Vector_obj::__new(_quad->x,_quad->y,null(),null());
			HX_STACK_LINE(169)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1)->__FieldRef(HX_CSTRING("pos")) = ::phoenix::Vector_obj::__new((_quad->x + _quad->w),_quad->y,null(),null());
			HX_STACK_LINE(170)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2)->__FieldRef(HX_CSTRING("pos")) = ::phoenix::Vector_obj::__new((_quad->x + _quad->w),(_quad->y + _quad->h),null(),null());
			HX_STACK_LINE(172)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3)->__FieldRef(HX_CSTRING("pos")) = ::phoenix::Vector_obj::__new(_quad->x,(_quad->y + _quad->h),null(),null());
			HX_STACK_LINE(173)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4)->__FieldRef(HX_CSTRING("pos")) = ::phoenix::Vector_obj::__new(_quad->x,_quad->y,null(),null());
			HX_STACK_LINE(174)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5)->__FieldRef(HX_CSTRING("pos")) = ::phoenix::Vector_obj::__new((_quad->x + _quad->w),(_quad->y + _quad->h),null(),null());
			HX_STACK_LINE(177)
			this->set_dirty(true);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_resize,(void))

Void ComplexGeometry_obj::quad_pos( ::String _quad_id,::phoenix::Vector _p){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_pos",0x06fd9a85,"phoenix.geometry.ComplexGeometry.quad_pos","phoenix/geometry/ComplexGeometry.hx",183,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_p,"_p")
		HX_STACK_LINE(185)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(187)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(189)
			Float _diffx = (_p->x - _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__Field(HX_CSTRING("pos"),true)->__Field(HX_CSTRING("x"),true));		HX_STACK_VAR(_diffx,"_diffx");
			HX_STACK_LINE(190)
			Float _diffy = (_p->y - _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__Field(HX_CSTRING("pos"),true)->__Field(HX_CSTRING("y"),true));		HX_STACK_VAR(_diffy,"_diffy");
			HX_STACK_LINE(192)
			{
				HX_STACK_LINE(192)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(192)
				_g->set_x((_g->x + _diffx));
			}
			HX_STACK_LINE(193)
			{
				HX_STACK_LINE(193)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(193)
				_g->set_y((_g->y + _diffy));
			}
			HX_STACK_LINE(195)
			{
				HX_STACK_LINE(195)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(195)
				_g->set_x((_g->x + _diffx));
			}
			HX_STACK_LINE(196)
			{
				HX_STACK_LINE(196)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(196)
				_g->set_y((_g->y + _diffy));
			}
			HX_STACK_LINE(198)
			{
				HX_STACK_LINE(198)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(198)
				_g->set_x((_g->x + _diffx));
			}
			HX_STACK_LINE(199)
			{
				HX_STACK_LINE(199)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(199)
				_g->set_y((_g->y + _diffy));
			}
			HX_STACK_LINE(201)
			{
				HX_STACK_LINE(201)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(201)
				_g->set_x((_g->x + _diffx));
			}
			HX_STACK_LINE(202)
			{
				HX_STACK_LINE(202)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(202)
				_g->set_y((_g->y + _diffy));
			}
			HX_STACK_LINE(204)
			{
				HX_STACK_LINE(204)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(204)
				_g->set_x((_g->x + _diffx));
			}
			HX_STACK_LINE(205)
			{
				HX_STACK_LINE(205)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(205)
				_g->set_y((_g->y + _diffy));
			}
			HX_STACK_LINE(207)
			{
				HX_STACK_LINE(207)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(207)
				_g->set_x((_g->x + _diffx));
			}
			HX_STACK_LINE(208)
			{
				HX_STACK_LINE(208)
				::phoenix::Vector _g = _complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5)->__Field(HX_CSTRING("pos"),true);		HX_STACK_VAR(_g,"_g");
				HX_STACK_LINE(208)
				_g->set_y((_g->y + _diffy));
			}
			HX_STACK_LINE(211)
			this->set_dirty(true);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_pos,(void))

Void ComplexGeometry_obj::quad_color( ::String _quad_id,::phoenix::Color _c){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_color",0x79428c94,"phoenix.geometry.ComplexGeometry.quad_color","phoenix/geometry/ComplexGeometry.hx",217,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_c,"_c")
		HX_STACK_LINE(219)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(221)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(222)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__FieldRef(HX_CSTRING("color")) = _c;
			HX_STACK_LINE(223)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1)->__FieldRef(HX_CSTRING("color")) = _c;
			HX_STACK_LINE(224)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2)->__FieldRef(HX_CSTRING("color")) = _c;
			HX_STACK_LINE(225)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3)->__FieldRef(HX_CSTRING("color")) = _c;
			HX_STACK_LINE(226)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4)->__FieldRef(HX_CSTRING("color")) = _c;
			HX_STACK_LINE(227)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5)->__FieldRef(HX_CSTRING("color")) = _c;
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_color,(void))

Void ComplexGeometry_obj::quad_alpha( ::String _quad_id,Float _a){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_alpha",0x507cc28f,"phoenix.geometry.ComplexGeometry.quad_alpha","phoenix/geometry/ComplexGeometry.hx",232,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_a,"_a")
		HX_STACK_LINE(234)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(236)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(237)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__Field(HX_CSTRING("color"),true)->__FieldRef(HX_CSTRING("a")) = _a;
			HX_STACK_LINE(238)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1)->__Field(HX_CSTRING("color"),true)->__FieldRef(HX_CSTRING("a")) = _a;
			HX_STACK_LINE(239)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2)->__Field(HX_CSTRING("color"),true)->__FieldRef(HX_CSTRING("a")) = _a;
			HX_STACK_LINE(240)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3)->__Field(HX_CSTRING("color"),true)->__FieldRef(HX_CSTRING("a")) = _a;
			HX_STACK_LINE(241)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4)->__Field(HX_CSTRING("color"),true)->__FieldRef(HX_CSTRING("a")) = _a;
			HX_STACK_LINE(242)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5)->__Field(HX_CSTRING("color"),true)->__FieldRef(HX_CSTRING("a")) = _a;
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_alpha,(void))

Void ComplexGeometry_obj::quad_uv_space( ::String _quad_id,::phoenix::Rectangle _uv){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_uv_space",0x6a40f297,"phoenix.geometry.ComplexGeometry.quad_uv_space","phoenix/geometry/ComplexGeometry.hx",247,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_uv,"_uv")
		HX_STACK_LINE(249)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(251)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(253)
			bool flipx = _complex_quad->__Field(HX_CSTRING("flipx"),true);		HX_STACK_VAR(flipx,"flipx");
			HX_STACK_LINE(254)
			bool flipy = _complex_quad->__Field(HX_CSTRING("flipy"),true);		HX_STACK_VAR(flipy,"flipy");
			HX_STACK_LINE(257)
			Float sz_x = _uv->w;		HX_STACK_VAR(sz_x,"sz_x");
			HX_STACK_LINE(258)
			Float sz_y = _uv->h;		HX_STACK_VAR(sz_y,"sz_y");
			HX_STACK_LINE(261)
			Float tl_x = _uv->x;		HX_STACK_VAR(tl_x,"tl_x");
			HX_STACK_LINE(262)
			Float tl_y = _uv->y;		HX_STACK_VAR(tl_y,"tl_y");
			HX_STACK_LINE(265)
			_complex_quad->__Field(HX_CSTRING("_uv_cache"),true)->__Field(HX_CSTRING("set"),true)(tl_x,tl_y,sz_x,sz_y);
			HX_STACK_LINE(268)
			Float tr_x = (tl_x + sz_x);		HX_STACK_VAR(tr_x,"tr_x");
			HX_STACK_LINE(269)
			Float tr_y = tl_y;		HX_STACK_VAR(tr_y,"tr_y");
			HX_STACK_LINE(271)
			Float br_x = (tl_x + sz_x);		HX_STACK_VAR(br_x,"br_x");
			HX_STACK_LINE(272)
			Float br_y = (tl_y + sz_y);		HX_STACK_VAR(br_y,"br_y");
			HX_STACK_LINE(274)
			Float bl_x = tl_x;		HX_STACK_VAR(bl_x,"bl_x");
			HX_STACK_LINE(275)
			Float bl_y = (tl_y + sz_y);		HX_STACK_VAR(bl_y,"bl_y");
			HX_STACK_LINE(277)
			Float tmp_x = 0.0;		HX_STACK_VAR(tmp_x,"tmp_x");
			HX_STACK_LINE(278)
			Float tmp_y = 0.0;		HX_STACK_VAR(tmp_y,"tmp_y");
			HX_STACK_LINE(281)
			if ((flipy)){
				HX_STACK_LINE(284)
				tmp_y = bl_y;
				HX_STACK_LINE(285)
				bl_y = tl_y;
				HX_STACK_LINE(286)
				tl_y = tmp_y;
				HX_STACK_LINE(289)
				tmp_y = br_y;
				HX_STACK_LINE(290)
				br_y = tr_y;
				HX_STACK_LINE(291)
				tr_y = tmp_y;
			}
			HX_STACK_LINE(296)
			if ((flipx)){
				HX_STACK_LINE(299)
				tmp_x = tr_x;
				HX_STACK_LINE(300)
				tr_x = tl_x;
				HX_STACK_LINE(301)
				tl_x = tmp_x;
				HX_STACK_LINE(304)
				tmp_x = br_x;
				HX_STACK_LINE(305)
				br_x = bl_x;
				HX_STACK_LINE(306)
				bl_x = tmp_x;
			}
			HX_STACK_LINE(310)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)0)->__Field(HX_CSTRING("uv"),true)->__Field(HX_CSTRING("uv0"),true)->__Field(HX_CSTRING("set"),true)(tl_x,tl_y,null(),null());
			HX_STACK_LINE(311)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)1)->__Field(HX_CSTRING("uv"),true)->__Field(HX_CSTRING("uv0"),true)->__Field(HX_CSTRING("set"),true)(tr_x,tr_y,null(),null());
			HX_STACK_LINE(312)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)2)->__Field(HX_CSTRING("uv"),true)->__Field(HX_CSTRING("uv0"),true)->__Field(HX_CSTRING("set"),true)(br_x,br_y,null(),null());
			HX_STACK_LINE(314)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)3)->__Field(HX_CSTRING("uv"),true)->__Field(HX_CSTRING("uv0"),true)->__Field(HX_CSTRING("set"),true)(bl_x,bl_y,null(),null());
			HX_STACK_LINE(315)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)4)->__Field(HX_CSTRING("uv"),true)->__Field(HX_CSTRING("uv0"),true)->__Field(HX_CSTRING("set"),true)(tl_x,tl_y,null(),null());
			HX_STACK_LINE(316)
			_complex_quad->__Field(HX_CSTRING("verts"),true)->__GetItem((int)5)->__Field(HX_CSTRING("uv"),true)->__Field(HX_CSTRING("uv0"),true)->__Field(HX_CSTRING("set"),true)(br_x,br_y,null(),null());
			HX_STACK_LINE(319)
			this->set_dirty(true);
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_uv_space,(void))

Void ComplexGeometry_obj::quad_uv( ::String _quad_id,::phoenix::Rectangle _uv){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_uv",0xd0f6d290,"phoenix.geometry.ComplexGeometry.quad_uv","phoenix/geometry/ComplexGeometry.hx",325,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_uv,"_uv")
		HX_STACK_LINE(327)
		if (((this->get_texture() == null()))){
			HX_STACK_LINE(328)
			::haxe::Log_obj::trace(HX_CSTRING("Warning : calling UV on a Complex Geometry with null texture."),hx::SourceInfo(HX_CSTRING("ComplexGeometry.hx"),328,HX_CSTRING("phoenix.geometry.ComplexGeometry"),HX_CSTRING("quad_uv")));
			HX_STACK_LINE(329)
			return null();
		}
		HX_STACK_LINE(332)
		Float tlx = (Float(_uv->x) / Float(this->get_texture()->width_actual));		HX_STACK_VAR(tlx,"tlx");
		HX_STACK_LINE(333)
		Float tly = (Float(_uv->y) / Float(this->get_texture()->height_actual));		HX_STACK_VAR(tly,"tly");
		HX_STACK_LINE(334)
		Float szx = (Float(_uv->w) / Float(this->get_texture()->width_actual));		HX_STACK_VAR(szx,"szx");
		HX_STACK_LINE(335)
		Float szy = (Float(_uv->h) / Float(this->get_texture()->height_actual));		HX_STACK_VAR(szy,"szy");
		HX_STACK_LINE(337)
		this->quad_uv_space(_quad_id,::phoenix::Rectangle_obj::__new(tlx,tly,szx,szy));
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_uv,(void))

Void ComplexGeometry_obj::quad_flipx( ::String _quad_id,bool _flip){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_flipx",0x3178605c,"phoenix.geometry.ComplexGeometry.quad_flipx","phoenix/geometry/ComplexGeometry.hx",341,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_flip,"_flip")
		HX_STACK_LINE(343)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(345)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(346)
			_complex_quad->__FieldRef(HX_CSTRING("flipx")) = _flip;
			HX_STACK_LINE(347)
			this->quad_uv_space(_quad_id,_complex_quad->__Field(HX_CSTRING("_uv_cache"),true));
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_flipx,(void))

Void ComplexGeometry_obj::quad_flipy( ::String _quad_id,bool _flip){
{
		HX_STACK_FRAME("phoenix.geometry.ComplexGeometry","quad_flipy",0x3178605d,"phoenix.geometry.ComplexGeometry.quad_flipy","phoenix/geometry/ComplexGeometry.hx",352,0x2def05d9)
		HX_STACK_THIS(this)
		HX_STACK_ARG(_quad_id,"_quad_id")
		HX_STACK_ARG(_flip,"_flip")
		HX_STACK_LINE(354)
		Dynamic _complex_quad = this->quads->get(_quad_id);		HX_STACK_VAR(_complex_quad,"_complex_quad");
		HX_STACK_LINE(356)
		if (((_complex_quad != null()))){
			HX_STACK_LINE(357)
			_complex_quad->__FieldRef(HX_CSTRING("flipy")) = _flip;
			HX_STACK_LINE(358)
			this->quad_uv_space(_quad_id,_complex_quad->__Field(HX_CSTRING("_uv_cache"),true));
		}
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC2(ComplexGeometry_obj,quad_flipy,(void))


ComplexGeometry_obj::ComplexGeometry_obj()
{
}

void ComplexGeometry_obj::__Mark(HX_MARK_PARAMS)
{
	HX_MARK_BEGIN_CLASS(ComplexGeometry);
	HX_MARK_MEMBER_NAME(quads,"quads");
	::phoenix::geometry::Geometry_obj::__Mark(HX_MARK_ARG);
	HX_MARK_END_CLASS();
}

void ComplexGeometry_obj::__Visit(HX_VISIT_PARAMS)
{
	HX_VISIT_MEMBER_NAME(quads,"quads");
	::phoenix::geometry::Geometry_obj::__Visit(HX_VISIT_ARG);
}

Dynamic ComplexGeometry_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 5:
		if (HX_FIELD_EQ(inName,"quads") ) { return quads; }
		if (HX_FIELD_EQ(inName,"clear") ) { return clear_dyn(); }
		break;
	case 7:
		if (HX_FIELD_EQ(inName,"quad_uv") ) { return quad_uv_dyn(); }
		break;
	case 8:
		if (HX_FIELD_EQ(inName,"quad_add") ) { return quad_add_dyn(); }
		if (HX_FIELD_EQ(inName,"quad_pos") ) { return quad_pos_dyn(); }
		break;
	case 9:
		if (HX_FIELD_EQ(inName,"quad_hide") ) { return quad_hide_dyn(); }
		if (HX_FIELD_EQ(inName,"quad_show") ) { return quad_show_dyn(); }
		break;
	case 10:
		if (HX_FIELD_EQ(inName,"quad_color") ) { return quad_color_dyn(); }
		if (HX_FIELD_EQ(inName,"quad_alpha") ) { return quad_alpha_dyn(); }
		if (HX_FIELD_EQ(inName,"quad_flipx") ) { return quad_flipx_dyn(); }
		if (HX_FIELD_EQ(inName,"quad_flipy") ) { return quad_flipy_dyn(); }
		break;
	case 11:
		if (HX_FIELD_EQ(inName,"quad_remove") ) { return quad_remove_dyn(); }
		if (HX_FIELD_EQ(inName,"quad_resize") ) { return quad_resize_dyn(); }
		break;
	case 13:
		if (HX_FIELD_EQ(inName,"quad_uv_space") ) { return quad_uv_space_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic ComplexGeometry_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	switch(inName.length) {
	case 5:
		if (HX_FIELD_EQ(inName,"quads") ) { quads=inValue.Cast< ::haxe::ds::StringMap >(); return inValue; }
	}
	return super::__SetField(inName,inValue,inCallProp);
}

void ComplexGeometry_obj::__GetFields(Array< ::String> &outFields)
{
	outFields->push(HX_CSTRING("quads"));
	super::__GetFields(outFields);
};

static ::String sStaticFields[] = {
	String(null()) };

#if HXCPP_SCRIPTABLE
static hx::StorageInfo sMemberStorageInfo[] = {
	{hx::fsObject /*::haxe::ds::StringMap*/ ,(int)offsetof(ComplexGeometry_obj,quads),HX_CSTRING("quads")},
	{ hx::fsUnknown, 0, null()}
};
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("quads"),
	HX_CSTRING("clear"),
	HX_CSTRING("quad_add"),
	HX_CSTRING("quad_remove"),
	HX_CSTRING("quad_hide"),
	HX_CSTRING("quad_show"),
	HX_CSTRING("quad_resize"),
	HX_CSTRING("quad_pos"),
	HX_CSTRING("quad_color"),
	HX_CSTRING("quad_alpha"),
	HX_CSTRING("quad_uv_space"),
	HX_CSTRING("quad_uv"),
	HX_CSTRING("quad_flipx"),
	HX_CSTRING("quad_flipy"),
	String(null()) };

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

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

#endif

Class ComplexGeometry_obj::__mClass;

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

void ComplexGeometry_obj::__boot()
{
}

} // end namespace phoenix
} // end namespace geometry
