text: // Generated by Haxe 4.0.0-preview.5
  #include <hxcpp.h>
  
  #ifndef INCLUDED_nape_dynamics_Contact
  #include <hxinc/nape/dynamics/Contact.h>
  #endif
  #ifndef INCLUDED_nape_dynamics_ContactIterator
  #include <hxinc/nape/dynamics/ContactIterator.h>
  #endif
  #ifndef INCLUDED_nape_dynamics_ContactList
  #include <hxinc/nape/dynamics/ContactList.h>
  #endif
  #ifndef INCLUDED_zpp_nape_dynamics_ZPP_Arbiter
  #include <hxinc/zpp_nape/dynamics/ZPP_Arbiter.h>
  #endif
  #ifndef INCLUDED_zpp_nape_dynamics_ZPP_Contact
  #include <hxinc/zpp_nape/dynamics/ZPP_Contact.h>
  #endif
  #ifndef INCLUDED_zpp_nape_util_ZPP_ContactList
  #include <hxinc/zpp_nape/util/ZPP_ContactList.h>
  #endif
  
  HX_DEFINE_STACK_FRAME(_hx_pos_2011eb8df9683541_234_new,"nape.dynamics.ContactList","new",0x4bb1d6dc,"nape.dynamics.ContactList.new","nape/dynamics/ContactList.hx",234,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_244_get_length,"nape.dynamics.ContactList","get_length",0x6f0d05b3,"nape.dynamics.ContactList.get_length","nape/dynamics/ContactList.hx",244,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_346_has,"nape.dynamics.ContactList","has",0x4bad45d6,"nape.dynamics.ContactList.has","nape/dynamics/ContactList.hx",346,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_363_at,"nape.dynamics.ContactList","at",0x9593b1f7,"nape.dynamics.ContactList.at","nape/dynamics/ContactList.hx",363,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_416_push,"nape.dynamics.ContactList","push",0xf148b7de,"nape.dynamics.ContactList.push","nape/dynamics/ContactList.hx",416,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_447_unshift,"nape.dynamics.ContactList","unshift",0x983cd805,"nape.dynamics.ContactList.unshift","nape/dynamics/ContactList.hx",447,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_478_pop,"nape.dynamics.ContactList","pop",0x4bb3640d,"nape.dynamics.ContactList.pop","nape/dynamics/ContactList.hx",478,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_519_shift,"nape.dynamics.ContactList","shift",0xdfec89fe,"nape.dynamics.ContactList.shift","nape/dynamics/ContactList.hx",519,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_564_add,"nape.dynamics.ContactList","add",0x4ba7f89d,"nape.dynamics.ContactList.add","nape/dynamics/ContactList.hx",564,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_576_remove,"nape.dynamics.ContactList","remove",0xf128cb48,"nape.dynamics.ContactList.remove","nape/dynamics/ContactList.hx",576,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_614_clear,"nape.dynamics.ContactList","clear",0xac250f09,"nape.dynamics.ContactList.clear","nape/dynamics/ContactList.hx",614,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_632_empty,"nape.dynamics.ContactList","empty",0xd3a3d809,"nape.dynamics.ContactList.empty","nape/dynamics/ContactList.hx",632,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_647_iterator,"nape.dynamics.ContactList","iterator",0x0be741f2,"nape.dynamics.ContactList.iterator","nape/dynamics/ContactList.hx",647,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_662_copy,"nape.dynamics.ContactList","copy",0xe8ac61b9,"nape.dynamics.ContactList.copy","nape/dynamics/ContactList.hx",662,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_684_merge,"nape.dynamics.ContactList","merge",0x69904034,"nape.dynamics.ContactList.merge","nape/dynamics/ContactList.hx",684,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_702_toString,"nape.dynamics.ContactList","toString",0xb0bbc8b0,"nape.dynamics.ContactList.toString","nape/dynamics/ContactList.hx",702,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_732_foreach,"nape.dynamics.ContactList","foreach",0xf96df206,"nape.dynamics.ContactList.foreach","nape/dynamics/ContactList.hx",732,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_779_filter,"nape.dynamics.ContactList","filter",0x71d54ebc,"nape.dynamics.ContactList.filter","nape/dynamics/ContactList.hx",779,0xd6cc37f4)
  HX_LOCAL_STACK_FRAME(_hx_pos_2011eb8df9683541_304_fromArray,"nape.dynamics.ContactList","fromArray",0xa524634b,"nape.dynamics.ContactList.fromArray","nape/dynamics/ContactList.hx",304,0xd6cc37f4)
  namespace nape{
  namespace dynamics{
  
  void ContactList_obj::__construct(){
              	HX_GC_STACKFRAME(&_hx_pos_2011eb8df9683541_234_new)
  HXLINE( 238)		this->zpp_inner = null();
  HXLINE( 696)		this->zpp_inner =  ::zpp_nape::util::ZPP_ContactList_obj::__alloc( HX_CTX );
  HXLINE( 697)		this->zpp_inner->outer = hx::ObjectPtr<OBJ_>(this);
              	}
  
  Dynamic ContactList_obj::__CreateEmpty() { return new ContactList_obj; }
  
  void *ContactList_obj::_hx_vtable = 0;
  
  Dynamic ContactList_obj::__Create(hx::DynamicArray inArgs)
  {
  	hx::ObjectPtr< ContactList_obj > _hx_result = new ContactList_obj();
  	_hx_result->__construct();
  	return _hx_result;
  }
  
  bool ContactList_obj::_hx_isInstanceOf(int inClassId) {
  	return inClassId==(int)0x00000001 || inClassId==(int)0x4ea78102;
  }
  
  int ContactList_obj::get_length(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_244_get_length)
  HXLINE( 245)		this->zpp_inner->valmod();
  HXLINE( 246)		if (this->zpp_inner->zip_length) {
  HXLINE( 247)			this->zpp_inner->zip_length = false;
  HXLINE( 248)			{
  HXLINE( 249)				this->zpp_inner->user_length = 0;
  HXLINE( 250)				{
  HXLINE( 251)					 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXLINE( 252)					while(hx::IsNotNull( cx_ite )){
  HXLINE( 253)						 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXLINE( 254)						bool _hx_tmp;
  HXDLIN( 254)						if (i->active) {
  HXLINE( 254)							_hx_tmp = i->arbiter->active;
              						}
              						else {
  HXLINE( 254)							_hx_tmp = false;
              						}
  HXDLIN( 254)						if (_hx_tmp) {
  HXLINE( 254)							this->zpp_inner->user_length++;
              						}
  HXLINE( 255)						cx_ite = cx_ite->next;
              					}
              				}
              			}
              		}
  HXLINE( 261)		return this->zpp_inner->user_length;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,get_length,return )
  
  bool ContactList_obj::has( ::nape::dynamics::Contact obj){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_346_has)
  HXLINE( 347)		this->zpp_inner->valmod();
  HXLINE( 350)		return this->zpp_inner->inner->has(obj->zpp_inner);
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,has,return )
  
   ::nape::dynamics::Contact ContactList_obj::at(int index){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_363_at)
  HXLINE( 364)		this->zpp_inner->valmod();
  HXLINE( 368)		bool _hx_tmp;
  HXDLIN( 368)		if ((index >= 0)) {
  HXLINE( 368)			this->zpp_inner->valmod();
  HXDLIN( 368)			if (this->zpp_inner->zip_length) {
  HXLINE( 368)				this->zpp_inner->zip_length = false;
  HXDLIN( 368)				{
  HXLINE( 368)					this->zpp_inner->user_length = 0;
  HXDLIN( 368)					{
  HXLINE( 368)						 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 368)						while(hx::IsNotNull( cx_ite )){
  HXLINE( 368)							 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 368)							bool _hx_tmp1;
  HXDLIN( 368)							if (i->active) {
  HXLINE( 368)								_hx_tmp1 = i->arbiter->active;
              							}
              							else {
  HXLINE( 368)								_hx_tmp1 = false;
              							}
  HXDLIN( 368)							if (_hx_tmp1) {
  HXLINE( 368)								this->zpp_inner->user_length++;
              							}
  HXDLIN( 368)							cx_ite = cx_ite->next;
              						}
              					}
              				}
              			}
  HXDLIN( 368)			_hx_tmp = (index >= this->zpp_inner->user_length);
              		}
              		else {
  HXLINE( 368)			_hx_tmp = true;
              		}
  HXDLIN( 368)		if (_hx_tmp) {
  HXLINE( 368)			HX_STACK_DO_THROW(HX_("Error: Index out of bounds",10,f3,5b,3f));
              		}
  HXLINE( 370)		if (this->zpp_inner->reverse_flag) {
  HXLINE( 370)			this->zpp_inner->valmod();
  HXDLIN( 370)			if (this->zpp_inner->zip_length) {
  HXLINE( 370)				this->zpp_inner->zip_length = false;
  HXDLIN( 370)				{
  HXLINE( 370)					this->zpp_inner->user_length = 0;
  HXDLIN( 370)					{
  HXLINE( 370)						 ::zpp_nape::dynamics::ZPP_Contact cx_ite1 = this->zpp_inner->inner->next;
  HXDLIN( 370)						while(hx::IsNotNull( cx_ite1 )){
  HXLINE( 370)							 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite1;
  HXDLIN( 370)							bool index1;
  HXDLIN( 370)							if (i1->active) {
  HXLINE( 370)								index1 = i1->arbiter->active;
              							}
              							else {
  HXLINE( 370)								index1 = false;
              							}
  HXDLIN( 370)							if (index1) {
  HXLINE( 370)								this->zpp_inner->user_length++;
              							}
  HXDLIN( 370)							cx_ite1 = cx_ite1->next;
              						}
              					}
              				}
              			}
  HXDLIN( 370)			index = ((this->zpp_inner->user_length - 1) - index);
              		}
  HXLINE( 383)		{
  HXLINE( 384)			bool _hx_tmp2;
  HXDLIN( 384)			if ((index >= this->zpp_inner->at_index)) {
  HXLINE( 384)				_hx_tmp2 = hx::IsNull( this->zpp_inner->at_ite );
              			}
              			else {
  HXLINE( 384)				_hx_tmp2 = true;
              			}
  HXDLIN( 384)			if (_hx_tmp2) {
  HXLINE( 385)				this->zpp_inner->at_index = 0;
  HXLINE( 386)				this->zpp_inner->at_ite = this->zpp_inner->inner->next;
  HXLINE( 387)				while(true){
  HXLINE( 388)					 ::zpp_nape::dynamics::ZPP_Contact x = this->zpp_inner->at_ite;
  HXLINE( 389)					bool _hx_tmp3;
  HXDLIN( 389)					if (x->active) {
  HXLINE( 389)						_hx_tmp3 = x->arbiter->active;
              					}
              					else {
  HXLINE( 389)						_hx_tmp3 = false;
              					}
  HXDLIN( 389)					if (_hx_tmp3) {
  HXLINE( 389)						goto _hx_goto_6;
              					}
  HXLINE( 390)					this->zpp_inner->at_ite = this->zpp_inner->at_ite->next;
              				}
              				_hx_goto_6:;
              			}
  HXLINE( 393)			while((this->zpp_inner->at_index != index)){
  HXLINE( 394)				this->zpp_inner->at_index++;
  HXLINE( 395)				this->zpp_inner->at_ite = this->zpp_inner->at_ite->next;
  HXLINE( 396)				while(true){
  HXLINE( 397)					 ::zpp_nape::dynamics::ZPP_Contact x1 = this->zpp_inner->at_ite;
  HXLINE( 398)					bool _hx_tmp4;
  HXDLIN( 398)					if (x1->active) {
  HXLINE( 398)						_hx_tmp4 = x1->arbiter->active;
              					}
              					else {
  HXLINE( 398)						_hx_tmp4 = false;
              					}
  HXDLIN( 398)					if (_hx_tmp4) {
  HXLINE( 398)						goto _hx_goto_8;
              					}
  HXLINE( 399)					this->zpp_inner->at_ite = this->zpp_inner->at_ite->next;
              				}
              				_hx_goto_8:;
              			}
              		}
  HXLINE( 403)		return this->zpp_inner->at_ite->wrapper();
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,at,return )
  
  bool ContactList_obj::push( ::nape::dynamics::Contact obj){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_416_push)
  HXLINE( 418)		if (this->zpp_inner->immutable) {
  HXLINE( 418)			HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_("List is immutable",6e,b9,49,ba)));
              		}
  HXLINE( 420)		this->zpp_inner->modify_test();
  HXLINE( 421)		this->zpp_inner->valmod();
  HXLINE( 424)		bool cont;
  HXDLIN( 424)		if (hx::IsNotNull( this->zpp_inner->adder )) {
  HXLINE( 424)			cont = ( (bool)(this->zpp_inner->adder(obj)) );
              		}
              		else {
  HXLINE( 424)			cont = true;
              		}
  HXLINE( 425)		if (cont) {
  HXLINE( 426)			if (this->zpp_inner->reverse_flag) {
  HXLINE( 426)				this->zpp_inner->inner->add(obj->zpp_inner);
              			}
              			else {
  HXLINE( 428)				if (hx::IsNull( this->zpp_inner->push_ite )) {
  HXLINE( 428)					 ::zpp_nape::dynamics::ZPP_Contact _hx_tmp;
  HXDLIN( 428)					this->zpp_inner->valmod();
  HXDLIN( 428)					if (this->zpp_inner->zip_length) {
  HXLINE( 428)						this->zpp_inner->zip_length = false;
  HXDLIN( 428)						{
  HXLINE( 428)							this->zpp_inner->user_length = 0;
  HXDLIN( 428)							{
  HXLINE( 428)								 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 428)								while(hx::IsNotNull( cx_ite )){
  HXLINE( 428)									 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 428)									bool _hx_tmp1;
  HXDLIN( 428)									if (i->active) {
  HXLINE( 428)										_hx_tmp1 = i->arbiter->active;
              									}
              									else {
  HXLINE( 428)										_hx_tmp1 = false;
              									}
  HXDLIN( 428)									if (_hx_tmp1) {
  HXLINE( 428)										this->zpp_inner->user_length++;
              									}
  HXDLIN( 428)									cx_ite = cx_ite->next;
              								}
              							}
              						}
              					}
  HXDLIN( 428)					if ((this->zpp_inner->user_length == 0)) {
  HXLINE( 428)						_hx_tmp = null();
              					}
              					else {
  HXLINE( 428)						 ::zpp_nape::dynamics::ZPP_Contact _hx_tmp2 = this->zpp_inner->inner;
  HXDLIN( 428)						this->zpp_inner->valmod();
  HXDLIN( 428)						if (this->zpp_inner->zip_length) {
  HXLINE( 428)							this->zpp_inner->zip_length = false;
  HXDLIN( 428)							{
  HXLINE( 428)								this->zpp_inner->user_length = 0;
  HXDLIN( 428)								{
  HXLINE( 428)									 ::zpp_nape::dynamics::ZPP_Contact cx_ite1 = this->zpp_inner->inner->next;
  HXDLIN( 428)									while(hx::IsNotNull( cx_ite1 )){
  HXLINE( 428)										 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite1;
  HXDLIN( 428)										bool _hx_tmp3;
  HXDLIN( 428)										if (i1->active) {
  HXLINE( 428)											_hx_tmp3 = i1->arbiter->active;
              										}
              										else {
  HXLINE( 428)											_hx_tmp3 = false;
              										}
  HXDLIN( 428)										if (_hx_tmp3) {
  HXLINE( 428)											this->zpp_inner->user_length++;
              										}
  HXDLIN( 428)										cx_ite1 = cx_ite1->next;
              									}
              								}
              							}
              						}
  HXDLIN( 428)						_hx_tmp = _hx_tmp2->iterator_at((this->zpp_inner->user_length - 1));
              					}
  HXDLIN( 428)					this->zpp_inner->push_ite = _hx_tmp;
              				}
  HXLINE( 429)				this->zpp_inner->push_ite = this->zpp_inner->inner->insert(this->zpp_inner->push_ite,obj->zpp_inner);
              			}
  HXLINE( 431)			this->zpp_inner->invalidate();
  HXLINE( 432)			if (hx::IsNotNull( this->zpp_inner->post_adder )) {
  HXLINE( 432)				this->zpp_inner->post_adder(obj);
              			}
              		}
  HXLINE( 434)		return cont;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,push,return )
  
  bool ContactList_obj::unshift( ::nape::dynamics::Contact obj){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_447_unshift)
  HXLINE( 449)		if (this->zpp_inner->immutable) {
  HXLINE( 449)			HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_("List is immutable",6e,b9,49,ba)));
              		}
  HXLINE( 451)		this->zpp_inner->modify_test();
  HXLINE( 452)		this->zpp_inner->valmod();
  HXLINE( 455)		bool cont;
  HXDLIN( 455)		if (hx::IsNotNull( this->zpp_inner->adder )) {
  HXLINE( 455)			cont = ( (bool)(this->zpp_inner->adder(obj)) );
              		}
              		else {
  HXLINE( 455)			cont = true;
              		}
  HXLINE( 456)		if (cont) {
  HXLINE( 457)			if (this->zpp_inner->reverse_flag) {
  HXLINE( 458)				if (hx::IsNull( this->zpp_inner->push_ite )) {
  HXLINE( 458)					 ::zpp_nape::dynamics::ZPP_Contact _hx_tmp;
  HXDLIN( 458)					this->zpp_inner->valmod();
  HXDLIN( 458)					if (this->zpp_inner->zip_length) {
  HXLINE( 458)						this->zpp_inner->zip_length = false;
  HXDLIN( 458)						{
  HXLINE( 458)							this->zpp_inner->user_length = 0;
  HXDLIN( 458)							{
  HXLINE( 458)								 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 458)								while(hx::IsNotNull( cx_ite )){
  HXLINE( 458)									 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 458)									bool _hx_tmp1;
  HXDLIN( 458)									if (i->active) {
  HXLINE( 458)										_hx_tmp1 = i->arbiter->active;
              									}
              									else {
  HXLINE( 458)										_hx_tmp1 = false;
              									}
  HXDLIN( 458)									if (_hx_tmp1) {
  HXLINE( 458)										this->zpp_inner->user_length++;
              									}
  HXDLIN( 458)									cx_ite = cx_ite->next;
              								}
              							}
              						}
              					}
  HXDLIN( 458)					if ((this->zpp_inner->user_length == 0)) {
  HXLINE( 458)						_hx_tmp = null();
              					}
              					else {
  HXLINE( 458)						 ::zpp_nape::dynamics::ZPP_Contact _hx_tmp2 = this->zpp_inner->inner;
  HXDLIN( 458)						this->zpp_inner->valmod();
  HXDLIN( 458)						if (this->zpp_inner->zip_length) {
  HXLINE( 458)							this->zpp_inner->zip_length = false;
  HXDLIN( 458)							{
  HXLINE( 458)								this->zpp_inner->user_length = 0;
  HXDLIN( 458)								{
  HXLINE( 458)									 ::zpp_nape::dynamics::ZPP_Contact cx_ite1 = this->zpp_inner->inner->next;
  HXDLIN( 458)									while(hx::IsNotNull( cx_ite1 )){
  HXLINE( 458)										 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite1;
  HXDLIN( 458)										bool _hx_tmp3;
  HXDLIN( 458)										if (i1->active) {
  HXLINE( 458)											_hx_tmp3 = i1->arbiter->active;
              										}
              										else {
  HXLINE( 458)											_hx_tmp3 = false;
              										}
  HXDLIN( 458)										if (_hx_tmp3) {
  HXLINE( 458)											this->zpp_inner->user_length++;
              										}
  HXDLIN( 458)										cx_ite1 = cx_ite1->next;
              									}
              								}
              							}
              						}
  HXDLIN( 458)						_hx_tmp = _hx_tmp2->iterator_at((this->zpp_inner->user_length - 1));
              					}
  HXDLIN( 458)					this->zpp_inner->push_ite = _hx_tmp;
              				}
  HXLINE( 459)				this->zpp_inner->push_ite = this->zpp_inner->inner->insert(this->zpp_inner->push_ite,obj->zpp_inner);
              			}
              			else {
  HXLINE( 461)				this->zpp_inner->inner->add(obj->zpp_inner);
              			}
  HXLINE( 462)			this->zpp_inner->invalidate();
  HXLINE( 463)			if (hx::IsNotNull( this->zpp_inner->post_adder )) {
  HXLINE( 463)				this->zpp_inner->post_adder(obj);
              			}
              		}
  HXLINE( 465)		return cont;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,unshift,return )
  
   ::nape::dynamics::Contact ContactList_obj::pop(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_478_pop)
  HXLINE( 480)		if (this->zpp_inner->immutable) {
  HXLINE( 480)			HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_("List is immutable",6e,b9,49,ba)));
              		}
  HXLINE( 482)		this->zpp_inner->modify_test();
  HXLINE( 484)		this->zpp_inner->valmod();
  HXDLIN( 484)		if (this->zpp_inner->zip_length) {
  HXLINE( 484)			this->zpp_inner->zip_length = false;
  HXDLIN( 484)			{
  HXLINE( 484)				this->zpp_inner->user_length = 0;
  HXDLIN( 484)				{
  HXLINE( 484)					 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 484)					while(hx::IsNotNull( cx_ite )){
  HXLINE( 484)						 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 484)						bool _hx_tmp;
  HXDLIN( 484)						if (i->active) {
  HXLINE( 484)							_hx_tmp = i->arbiter->active;
              						}
              						else {
  HXLINE( 484)							_hx_tmp = false;
              						}
  HXDLIN( 484)						if (_hx_tmp) {
  HXLINE( 484)							this->zpp_inner->user_length++;
              						}
  HXDLIN( 484)						cx_ite = cx_ite->next;
              					}
              				}
              			}
              		}
  HXDLIN( 484)		if ((this->zpp_inner->user_length == 0)) {
  HXLINE( 484)			HX_STACK_DO_THROW(HX_("Error: Cannot remove from empty list",3a,7e,61,8d));
              		}
  HXLINE( 486)		this->zpp_inner->valmod();
  HXLINE( 489)		 ::zpp_nape::dynamics::ZPP_Contact ret = null();
  HXLINE( 490)		if (this->zpp_inner->reverse_flag) {
  HXLINE( 491)			ret = this->zpp_inner->inner->next;
  HXLINE( 492)			 ::nape::dynamics::Contact retx = ret->wrapper();
  HXLINE( 493)			if (hx::IsNotNull( this->zpp_inner->subber )) {
  HXLINE( 493)				this->zpp_inner->subber(retx);
              			}
  HXLINE( 494)			if (!(this->zpp_inner->dontremove)) {
  HXLINE( 494)				this->zpp_inner->inner->pop();
              			}
              		}
              		else {
  HXLINE( 497)			bool _hx_tmp1;
  HXDLIN( 497)			if (hx::IsNotNull( this->zpp_inner->at_ite )) {
  HXLINE( 497)				_hx_tmp1 = hx::IsNull( this->zpp_inner->at_ite->next );
              			}
              			else {
  HXLINE( 497)				_hx_tmp1 = false;
              			}
  HXDLIN( 497)			if (_hx_tmp1) {
  HXLINE( 497)				this->zpp_inner->at_ite = null();
              			}
  HXLINE( 498)			 ::zpp_nape::dynamics::ZPP_Contact ite;
  HXDLIN( 498)			this->zpp_inner->valmod();
  HXDLIN( 498)			if (this->zpp_inner->zip_length) {
  HXLINE( 498)				this->zpp_inner->zip_length = false;
  HXDLIN( 498)				{
  HXLINE( 498)					this->zpp_inner->user_length = 0;
  HXDLIN( 498)					{
  HXLINE( 498)						 ::zpp_nape::dynamics::ZPP_Contact cx_ite1 = this->zpp_inner->inner->next;
  HXDLIN( 498)						while(hx::IsNotNull( cx_ite1 )){
  HXLINE( 498)							 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite1;
  HXDLIN( 498)							bool ite1;
  HXDLIN( 498)							if (i1->active) {
  HXLINE( 498)								ite1 = i1->arbiter->active;
              							}
              							else {
  HXLINE( 498)								ite1 = false;
              							}
  HXDLIN( 498)							if (ite1) {
  HXLINE( 498)								this->zpp_inner->user_length++;
              							}
  HXDLIN( 498)							cx_ite1 = cx_ite1->next;
              						}
              					}
              				}
              			}
  HXDLIN( 498)			if ((this->zpp_inner->user_length == 1)) {
  HXLINE( 498)				ite = null();
              			}
              			else {
  HXLINE( 498)				 ::zpp_nape::dynamics::ZPP_Contact ite2 = this->zpp_inner->inner;
  HXDLIN( 498)				this->zpp_inner->valmod();
  HXDLIN( 498)				if (this->zpp_inner->zip_length) {
  HXLINE( 498)					this->zpp_inner->zip_length = false;
  HXDLIN( 498)					{
  HXLINE( 498)						this->zpp_inner->user_length = 0;
  HXDLIN( 498)						{
  HXLINE( 498)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite2 = this->zpp_inner->inner->next;
  HXDLIN( 498)							while(hx::IsNotNull( cx_ite2 )){
  HXLINE( 498)								 ::zpp_nape::dynamics::ZPP_Contact i2 = cx_ite2;
  HXDLIN( 498)								bool ite3;
  HXDLIN( 498)								if (i2->active) {
  HXLINE( 498)									ite3 = i2->arbiter->active;
              								}
              								else {
  HXLINE( 498)									ite3 = false;
              								}
  HXDLIN( 498)								if (ite3) {
  HXLINE( 498)									this->zpp_inner->user_length++;
              								}
  HXDLIN( 498)								cx_ite2 = cx_ite2->next;
              							}
              						}
              					}
              				}
  HXDLIN( 498)				ite = ite2->iterator_at((this->zpp_inner->user_length - 2));
              			}
  HXLINE( 499)			if (hx::IsNull( ite )) {
  HXLINE( 499)				ret = this->zpp_inner->inner->next;
              			}
              			else {
  HXLINE( 499)				ret = ite->next;
              			}
  HXLINE( 500)			 ::nape::dynamics::Contact retx1 = ret->wrapper();
  HXLINE( 501)			if (hx::IsNotNull( this->zpp_inner->subber )) {
  HXLINE( 501)				this->zpp_inner->subber(retx1);
              			}
  HXLINE( 502)			if (!(this->zpp_inner->dontremove)) {
  HXLINE( 502)				this->zpp_inner->inner->erase(ite);
              			}
              		}
  HXLINE( 504)		this->zpp_inner->invalidate();
  HXLINE( 505)		 ::nape::dynamics::Contact retx2 = ret->wrapper();
  HXLINE( 506)		return retx2;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,pop,return )
  
   ::nape::dynamics::Contact ContactList_obj::shift(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_519_shift)
  HXLINE( 521)		if (this->zpp_inner->immutable) {
  HXLINE( 521)			HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_("List is immutable",6e,b9,49,ba)));
              		}
  HXLINE( 523)		this->zpp_inner->modify_test();
  HXLINE( 525)		this->zpp_inner->valmod();
  HXDLIN( 525)		if (this->zpp_inner->zip_length) {
  HXLINE( 525)			this->zpp_inner->zip_length = false;
  HXDLIN( 525)			{
  HXLINE( 525)				this->zpp_inner->user_length = 0;
  HXDLIN( 525)				{
  HXLINE( 525)					 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 525)					while(hx::IsNotNull( cx_ite )){
  HXLINE( 525)						 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 525)						bool _hx_tmp;
  HXDLIN( 525)						if (i->active) {
  HXLINE( 525)							_hx_tmp = i->arbiter->active;
              						}
              						else {
  HXLINE( 525)							_hx_tmp = false;
              						}
  HXDLIN( 525)						if (_hx_tmp) {
  HXLINE( 525)							this->zpp_inner->user_length++;
              						}
  HXDLIN( 525)						cx_ite = cx_ite->next;
              					}
              				}
              			}
              		}
  HXDLIN( 525)		if ((this->zpp_inner->user_length == 0)) {
  HXLINE( 525)			HX_STACK_DO_THROW(HX_("Error: Cannot remove from empty list",3a,7e,61,8d));
              		}
  HXLINE( 527)		this->zpp_inner->valmod();
  HXLINE( 530)		 ::zpp_nape::dynamics::ZPP_Contact ret = null();
  HXLINE( 531)		if (this->zpp_inner->reverse_flag) {
  HXLINE( 532)			bool _hx_tmp1;
  HXDLIN( 532)			if (hx::IsNotNull( this->zpp_inner->at_ite )) {
  HXLINE( 532)				_hx_tmp1 = hx::IsNull( this->zpp_inner->at_ite->next );
              			}
              			else {
  HXLINE( 532)				_hx_tmp1 = false;
              			}
  HXDLIN( 532)			if (_hx_tmp1) {
  HXLINE( 532)				this->zpp_inner->at_ite = null();
              			}
  HXLINE( 533)			 ::zpp_nape::dynamics::ZPP_Contact ite;
  HXDLIN( 533)			this->zpp_inner->valmod();
  HXDLIN( 533)			if (this->zpp_inner->zip_length) {
  HXLINE( 533)				this->zpp_inner->zip_length = false;
  HXDLIN( 533)				{
  HXLINE( 533)					this->zpp_inner->user_length = 0;
  HXDLIN( 533)					{
  HXLINE( 533)						 ::zpp_nape::dynamics::ZPP_Contact cx_ite1 = this->zpp_inner->inner->next;
  HXDLIN( 533)						while(hx::IsNotNull( cx_ite1 )){
  HXLINE( 533)							 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite1;
  HXDLIN( 533)							bool ite1;
  HXDLIN( 533)							if (i1->active) {
  HXLINE( 533)								ite1 = i1->arbiter->active;
              							}
              							else {
  HXLINE( 533)								ite1 = false;
              							}
  HXDLIN( 533)							if (ite1) {
  HXLINE( 533)								this->zpp_inner->user_length++;
              							}
  HXDLIN( 533)							cx_ite1 = cx_ite1->next;
              						}
              					}
              				}
              			}
  HXDLIN( 533)			if ((this->zpp_inner->user_length == 1)) {
  HXLINE( 533)				ite = null();
              			}
              			else {
  HXLINE( 533)				 ::zpp_nape::dynamics::ZPP_Contact ite2 = this->zpp_inner->inner;
  HXDLIN( 533)				this->zpp_inner->valmod();
  HXDLIN( 533)				if (this->zpp_inner->zip_length) {
  HXLINE( 533)					this->zpp_inner->zip_length = false;
  HXDLIN( 533)					{
  HXLINE( 533)						this->zpp_inner->user_length = 0;
  HXDLIN( 533)						{
  HXLINE( 533)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite2 = this->zpp_inner->inner->next;
  HXDLIN( 533)							while(hx::IsNotNull( cx_ite2 )){
  HXLINE( 533)								 ::zpp_nape::dynamics::ZPP_Contact i2 = cx_ite2;
  HXDLIN( 533)								bool ite3;
  HXDLIN( 533)								if (i2->active) {
  HXLINE( 533)									ite3 = i2->arbiter->active;
              								}
              								else {
  HXLINE( 533)									ite3 = false;
              								}
  HXDLIN( 533)								if (ite3) {
  HXLINE( 533)									this->zpp_inner->user_length++;
              								}
  HXDLIN( 533)								cx_ite2 = cx_ite2->next;
              							}
              						}
              					}
              				}
  HXDLIN( 533)				ite = ite2->iterator_at((this->zpp_inner->user_length - 2));
              			}
  HXLINE( 534)			if (hx::IsNull( ite )) {
  HXLINE( 534)				ret = this->zpp_inner->inner->next;
              			}
              			else {
  HXLINE( 534)				ret = ite->next;
              			}
  HXLINE( 535)			 ::nape::dynamics::Contact retx = ret->wrapper();
  HXLINE( 536)			if (hx::IsNotNull( this->zpp_inner->subber )) {
  HXLINE( 536)				this->zpp_inner->subber(retx);
              			}
  HXLINE( 537)			if (!(this->zpp_inner->dontremove)) {
  HXLINE( 537)				this->zpp_inner->inner->erase(ite);
              			}
              		}
              		else {
  HXLINE( 540)			ret = this->zpp_inner->inner->next;
  HXLINE( 541)			 ::nape::dynamics::Contact retx1 = ret->wrapper();
  HXLINE( 542)			if (hx::IsNotNull( this->zpp_inner->subber )) {
  HXLINE( 542)				this->zpp_inner->subber(retx1);
              			}
  HXLINE( 543)			if (!(this->zpp_inner->dontremove)) {
  HXLINE( 543)				this->zpp_inner->inner->pop();
              			}
              		}
  HXLINE( 545)		this->zpp_inner->invalidate();
  HXLINE( 546)		 ::nape::dynamics::Contact retx2 = ret->wrapper();
  HXLINE( 547)		return retx2;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,shift,return )
  
  bool ContactList_obj::add( ::nape::dynamics::Contact obj){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_564_add)
  HXDLIN( 564)		if (this->zpp_inner->reverse_flag) {
  HXDLIN( 564)			return this->push(obj);
              		}
              		else {
  HXDLIN( 564)			return this->unshift(obj);
              		}
  HXDLIN( 564)		return false;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,add,return )
  
  bool ContactList_obj::remove( ::nape::dynamics::Contact obj){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_576_remove)
  HXLINE( 578)		if (this->zpp_inner->immutable) {
  HXLINE( 578)			HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_("List is immutable",6e,b9,49,ba)));
              		}
  HXLINE( 580)		this->zpp_inner->modify_test();
  HXLINE( 581)		this->zpp_inner->valmod();
  HXLINE( 584)		bool ret;
  HXLINE( 585)		{
  HXLINE( 586)			ret = false;
  HXLINE( 587)			{
  HXLINE( 588)				 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXLINE( 589)				while(hx::IsNotNull( cx_ite )){
  HXLINE( 590)					 ::zpp_nape::dynamics::ZPP_Contact x = cx_ite;
  HXLINE( 592)					if (hx::IsEq( x,obj->zpp_inner )) {
  HXLINE( 593)						ret = true;
  HXLINE( 594)						goto _hx_goto_25;
              					}
  HXLINE( 597)					cx_ite = cx_ite->next;
              				}
              				_hx_goto_25:;
              			}
              		}
  HXLINE( 601)		if (ret) {
  HXLINE( 602)			if (hx::IsNotNull( this->zpp_inner->subber )) {
  HXLINE( 602)				this->zpp_inner->subber(obj);
              			}
  HXLINE( 603)			if (!(this->zpp_inner->dontremove)) {
  HXLINE( 603)				this->zpp_inner->inner->remove(obj->zpp_inner);
              			}
  HXLINE( 604)			this->zpp_inner->invalidate();
              		}
  HXLINE( 606)		return ret;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,remove,return )
  
  void ContactList_obj::clear(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_614_clear)
  HXLINE( 616)		if (this->zpp_inner->immutable) {
  HXLINE( 616)			HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_("List is immutable",6e,b9,49,ba)));
              		}
  HXLINE( 618)		if (this->zpp_inner->reverse_flag) {
  HXLINE( 619)			while(true){
  HXLINE( 619)				this->zpp_inner->valmod();
  HXDLIN( 619)				if (this->zpp_inner->zip_length) {
  HXLINE( 619)					this->zpp_inner->zip_length = false;
  HXDLIN( 619)					{
  HXLINE( 619)						this->zpp_inner->user_length = 0;
  HXDLIN( 619)						{
  HXLINE( 619)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 619)							while(hx::IsNotNull( cx_ite )){
  HXLINE( 619)								 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 619)								bool _hx_tmp;
  HXDLIN( 619)								if (i->active) {
  HXLINE( 619)									_hx_tmp = i->arbiter->active;
              								}
              								else {
  HXLINE( 619)									_hx_tmp = false;
              								}
  HXDLIN( 619)								if (_hx_tmp) {
  HXLINE( 619)									this->zpp_inner->user_length++;
              								}
  HXDLIN( 619)								cx_ite = cx_ite->next;
              							}
              						}
              					}
              				}
  HXDLIN( 619)				if (!((this->zpp_inner->user_length != 0))) {
  HXLINE( 619)					goto _hx_goto_27;
              				}
  HXDLIN( 619)				this->pop();
              			}
              			_hx_goto_27:;
              		}
              		else {
  HXLINE( 622)			while(true){
  HXLINE( 622)				this->zpp_inner->valmod();
  HXDLIN( 622)				if (this->zpp_inner->zip_length) {
  HXLINE( 622)					this->zpp_inner->zip_length = false;
  HXDLIN( 622)					{
  HXLINE( 622)						this->zpp_inner->user_length = 0;
  HXDLIN( 622)						{
  HXLINE( 622)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite1 = this->zpp_inner->inner->next;
  HXDLIN( 622)							while(hx::IsNotNull( cx_ite1 )){
  HXLINE( 622)								 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite1;
  HXDLIN( 622)								bool _hx_tmp1;
  HXDLIN( 622)								if (i1->active) {
  HXLINE( 622)									_hx_tmp1 = i1->arbiter->active;
              								}
              								else {
  HXLINE( 622)									_hx_tmp1 = false;
              								}
  HXDLIN( 622)								if (_hx_tmp1) {
  HXLINE( 622)									this->zpp_inner->user_length++;
              								}
  HXDLIN( 622)								cx_ite1 = cx_ite1->next;
              							}
              						}
              					}
              				}
  HXDLIN( 622)				if (!((this->zpp_inner->user_length != 0))) {
  HXLINE( 622)					goto _hx_goto_29;
              				}
  HXDLIN( 622)				this->shift();
              			}
              			_hx_goto_29:;
              		}
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,clear,(void))
  
  bool ContactList_obj::empty(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_632_empty)
  HXDLIN( 632)		this->zpp_inner->valmod();
  HXDLIN( 632)		if (this->zpp_inner->zip_length) {
  HXDLIN( 632)			this->zpp_inner->zip_length = false;
  HXDLIN( 632)			{
  HXDLIN( 632)				this->zpp_inner->user_length = 0;
  HXDLIN( 632)				{
  HXDLIN( 632)					 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 632)					while(hx::IsNotNull( cx_ite )){
  HXDLIN( 632)						 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 632)						bool _hx_tmp;
  HXDLIN( 632)						if (i->active) {
  HXDLIN( 632)							_hx_tmp = i->arbiter->active;
              						}
              						else {
  HXDLIN( 632)							_hx_tmp = false;
              						}
  HXDLIN( 632)						if (_hx_tmp) {
  HXDLIN( 632)							this->zpp_inner->user_length++;
              						}
  HXDLIN( 632)						cx_ite = cx_ite->next;
              					}
              				}
              			}
              		}
  HXDLIN( 632)		return (this->zpp_inner->user_length == 0);
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,empty,return )
  
   ::nape::dynamics::ContactIterator ContactList_obj::iterator(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_647_iterator)
  HXLINE( 648)		this->zpp_inner->valmod();
  HXLINE( 651)		return ::nape::dynamics::ContactIterator_obj::get(hx::ObjectPtr<OBJ_>(this));
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,iterator,return )
  
   ::nape::dynamics::ContactList ContactList_obj::copy(hx::Null< bool >  __o_deep){
              		bool deep = __o_deep.Default(false);
              	HX_GC_STACKFRAME(&_hx_pos_2011eb8df9683541_662_copy)
  HXLINE( 663)		 ::nape::dynamics::ContactList ret =  ::nape::dynamics::ContactList_obj::__alloc( HX_CTX );
  HXLINE( 664)		{
  HXLINE( 664)			this->zpp_inner->valmod();
  HXDLIN( 664)			 ::nape::dynamics::ContactIterator _g = ::nape::dynamics::ContactIterator_obj::get(hx::ObjectPtr<OBJ_>(this));
  HXDLIN( 664)			while(true){
  HXLINE( 664)				_g->zpp_inner->zpp_inner->valmod();
  HXDLIN( 664)				 ::nape::dynamics::ContactList _this = _g->zpp_inner;
  HXDLIN( 664)				_this->zpp_inner->valmod();
  HXDLIN( 664)				if (_this->zpp_inner->zip_length) {
  HXLINE( 664)					_this->zpp_inner->zip_length = false;
  HXDLIN( 664)					{
  HXLINE( 664)						_this->zpp_inner->user_length = 0;
  HXDLIN( 664)						{
  HXLINE( 664)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite = _this->zpp_inner->inner->next;
  HXDLIN( 664)							while(hx::IsNotNull( cx_ite )){
  HXLINE( 664)								 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 664)								bool _hx_tmp;
  HXDLIN( 664)								if (i->active) {
  HXLINE( 664)									_hx_tmp = i->arbiter->active;
              								}
              								else {
  HXLINE( 664)									_hx_tmp = false;
              								}
  HXDLIN( 664)								if (_hx_tmp) {
  HXLINE( 664)									_this->zpp_inner->user_length++;
              								}
  HXDLIN( 664)								cx_ite = cx_ite->next;
              							}
              						}
              					}
              				}
  HXDLIN( 664)				int length = _this->zpp_inner->user_length;
  HXDLIN( 664)				_g->zpp_critical = true;
  HXDLIN( 664)				bool _hx_tmp1;
  HXDLIN( 664)				if ((_g->zpp_i < length)) {
  HXLINE( 664)					_hx_tmp1 = true;
              				}
              				else {
  HXLINE( 664)					{
  HXLINE( 664)						_g->zpp_next = ::nape::dynamics::ContactIterator_obj::zpp_pool;
  HXDLIN( 664)						::nape::dynamics::ContactIterator_obj::zpp_pool = _g;
  HXDLIN( 664)						_g->zpp_inner = null();
              					}
  HXDLIN( 664)					_hx_tmp1 = false;
              				}
  HXDLIN( 664)				if (!(_hx_tmp1)) {
  HXLINE( 664)					goto _hx_goto_35;
              				}
  HXDLIN( 664)				_g->zpp_critical = false;
  HXDLIN( 664)				 ::nape::dynamics::Contact i1 = _g->zpp_inner->at(_g->zpp_i++);
  HXDLIN( 664)				 ::nape::dynamics::Contact _hx_tmp2;
  HXDLIN( 664)				if (deep) {
  HXLINE( 666)					HX_STACK_DO_THROW(((HX_("Error: ",4e,a8,5b,b7) + HX_("Contact",80,a2,c5,e6)) + HX_(" is not a copyable type",89,ec,2e,8b)));
              				}
              				else {
  HXLINE( 664)					_hx_tmp2 = i1;
              				}
  HXDLIN( 664)				ret->push(_hx_tmp2);
              			}
              			_hx_goto_35:;
              		}
  HXLINE( 671)		return ret;
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,copy,return )
  
  void ContactList_obj::merge( ::nape::dynamics::ContactList xs){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_684_merge)
  HXLINE( 686)		if (hx::IsNull( xs )) {
  HXLINE( 686)			HX_STACK_DO_THROW(HX_("Error: Cannot merge with null list",f4,38,16,fb));
              		}
  HXLINE( 688)		{
  HXLINE( 688)			xs->zpp_inner->valmod();
  HXDLIN( 688)			 ::nape::dynamics::ContactIterator _g = ::nape::dynamics::ContactIterator_obj::get(xs);
  HXDLIN( 688)			while(true){
  HXLINE( 688)				_g->zpp_inner->zpp_inner->valmod();
  HXDLIN( 688)				 ::nape::dynamics::ContactList _this = _g->zpp_inner;
  HXDLIN( 688)				_this->zpp_inner->valmod();
  HXDLIN( 688)				if (_this->zpp_inner->zip_length) {
  HXLINE( 688)					_this->zpp_inner->zip_length = false;
  HXDLIN( 688)					{
  HXLINE( 688)						_this->zpp_inner->user_length = 0;
  HXDLIN( 688)						{
  HXLINE( 688)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite = _this->zpp_inner->inner->next;
  HXDLIN( 688)							while(hx::IsNotNull( cx_ite )){
  HXLINE( 688)								 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 688)								bool _hx_tmp;
  HXDLIN( 688)								if (i->active) {
  HXLINE( 688)									_hx_tmp = i->arbiter->active;
              								}
              								else {
  HXLINE( 688)									_hx_tmp = false;
              								}
  HXDLIN( 688)								if (_hx_tmp) {
  HXLINE( 688)									_this->zpp_inner->user_length++;
              								}
  HXDLIN( 688)								cx_ite = cx_ite->next;
              							}
              						}
              					}
              				}
  HXDLIN( 688)				int length = _this->zpp_inner->user_length;
  HXDLIN( 688)				_g->zpp_critical = true;
  HXDLIN( 688)				bool _hx_tmp1;
  HXDLIN( 688)				if ((_g->zpp_i < length)) {
  HXLINE( 688)					_hx_tmp1 = true;
              				}
              				else {
  HXLINE( 688)					{
  HXLINE( 688)						_g->zpp_next = ::nape::dynamics::ContactIterator_obj::zpp_pool;
  HXDLIN( 688)						::nape::dynamics::ContactIterator_obj::zpp_pool = _g;
  HXDLIN( 688)						_g->zpp_inner = null();
              					}
  HXDLIN( 688)					_hx_tmp1 = false;
              				}
  HXDLIN( 688)				if (!(_hx_tmp1)) {
  HXLINE( 688)					goto _hx_goto_38;
              				}
  HXDLIN( 688)				_g->zpp_critical = false;
  HXDLIN( 688)				 ::nape::dynamics::Contact x = _g->zpp_inner->at(_g->zpp_i++);
  HXLINE( 689)				if (!(this->has(x))) {
  HXLINE( 689)					if (this->zpp_inner->reverse_flag) {
  HXLINE( 689)						this->push(x);
              					}
              					else {
  HXLINE( 689)						this->unshift(x);
              					}
              				}
              			}
              			_hx_goto_38:;
              		}
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,merge,(void))
  
  ::String ContactList_obj::toString(){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_702_toString)
  HXLINE( 703)		::String ret = HX_("[",5b,00,00,00);
  HXLINE( 704)		bool fst = true;
  HXLINE( 705)		{
  HXLINE( 705)			this->zpp_inner->valmod();
  HXDLIN( 705)			 ::nape::dynamics::ContactIterator _g = ::nape::dynamics::ContactIterator_obj::get(hx::ObjectPtr<OBJ_>(this));
  HXDLIN( 705)			while(true){
  HXLINE( 705)				_g->zpp_inner->zpp_inner->valmod();
  HXDLIN( 705)				 ::nape::dynamics::ContactList _this = _g->zpp_inner;
  HXDLIN( 705)				_this->zpp_inner->valmod();
  HXDLIN( 705)				if (_this->zpp_inner->zip_length) {
  HXLINE( 705)					_this->zpp_inner->zip_length = false;
  HXDLIN( 705)					{
  HXLINE( 705)						_this->zpp_inner->user_length = 0;
  HXDLIN( 705)						{
  HXLINE( 705)							 ::zpp_nape::dynamics::ZPP_Contact cx_ite = _this->zpp_inner->inner->next;
  HXDLIN( 705)							while(hx::IsNotNull( cx_ite )){
  HXLINE( 705)								 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 705)								bool _hx_tmp;
  HXDLIN( 705)								if (i->active) {
  HXLINE( 705)									_hx_tmp = i->arbiter->active;
              								}
              								else {
  HXLINE( 705)									_hx_tmp = false;
              								}
  HXDLIN( 705)								if (_hx_tmp) {
  HXLINE( 705)									_this->zpp_inner->user_length++;
              								}
  HXDLIN( 705)								cx_ite = cx_ite->next;
              							}
              						}
              					}
              				}
  HXDLIN( 705)				int length = _this->zpp_inner->user_length;
  HXDLIN( 705)				_g->zpp_critical = true;
  HXDLIN( 705)				bool _hx_tmp1;
  HXDLIN( 705)				if ((_g->zpp_i < length)) {
  HXLINE( 705)					_hx_tmp1 = true;
              				}
              				else {
  HXLINE( 705)					{
  HXLINE( 705)						_g->zpp_next = ::nape::dynamics::ContactIterator_obj::zpp_pool;
  HXDLIN( 705)						::nape::dynamics::ContactIterator_obj::zpp_pool = _g;
  HXDLIN( 705)						_g->zpp_inner = null();
              					}
  HXDLIN( 705)					_hx_tmp1 = false;
              				}
  HXDLIN( 705)				if (!(_hx_tmp1)) {
  HXLINE( 705)					goto _hx_goto_41;
              				}
  HXDLIN( 705)				_g->zpp_critical = false;
  HXDLIN( 705)				 ::nape::dynamics::Contact i1 = _g->zpp_inner->at(_g->zpp_i++);
  HXLINE( 706)				if (!(fst)) {
  HXLINE( 706)					ret = (ret + HX_(",",2c,00,00,00));
              				}
  HXLINE( 707)				::String ret1;
  HXDLIN( 707)				if (hx::IsNull( i1 )) {
  HXLINE( 707)					ret1 = HX_("NULL",87,66,cf,33);
              				}
              				else {
  HXLINE( 707)					ret1 = i1->toString();
              				}
  HXDLIN( 707)				ret = (ret + ret1);
  HXLINE( 708)				fst = false;
              			}
              			_hx_goto_41:;
              		}
  HXLINE( 710)		return (ret + HX_("]",5d,00,00,00));
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC0(ContactList_obj,toString,return )
  
   ::nape::dynamics::ContactList ContactList_obj::foreach( ::Dynamic lambda){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_732_foreach)
  HXLINE( 734)		if (hx::IsNull( lambda )) {
  HXLINE( 734)			HX_STACK_DO_THROW(HX_("Error: Cannot execute null on list elements",97,fe,61,00));
              		}
  HXLINE( 736)		this->zpp_inner->valmod();
  HXDLIN( 736)		 ::nape::dynamics::ContactIterator it = ::nape::dynamics::ContactIterator_obj::get(hx::ObjectPtr<OBJ_>(this));
  HXLINE( 737)		while(true){
  HXLINE( 737)			it->zpp_inner->zpp_inner->valmod();
  HXDLIN( 737)			 ::nape::dynamics::ContactList _this = it->zpp_inner;
  HXDLIN( 737)			_this->zpp_inner->valmod();
  HXDLIN( 737)			if (_this->zpp_inner->zip_length) {
  HXLINE( 737)				_this->zpp_inner->zip_length = false;
  HXDLIN( 737)				{
  HXLINE( 737)					_this->zpp_inner->user_length = 0;
  HXDLIN( 737)					{
  HXLINE( 737)						 ::zpp_nape::dynamics::ZPP_Contact cx_ite = _this->zpp_inner->inner->next;
  HXDLIN( 737)						while(hx::IsNotNull( cx_ite )){
  HXLINE( 737)							 ::zpp_nape::dynamics::ZPP_Contact i = cx_ite;
  HXDLIN( 737)							bool _hx_tmp;
  HXDLIN( 737)							if (i->active) {
  HXLINE( 737)								_hx_tmp = i->arbiter->active;
              							}
              							else {
  HXLINE( 737)								_hx_tmp = false;
              							}
  HXDLIN( 737)							if (_hx_tmp) {
  HXLINE( 737)								_this->zpp_inner->user_length++;
              							}
  HXDLIN( 737)							cx_ite = cx_ite->next;
              						}
              					}
              				}
              			}
  HXDLIN( 737)			int length = _this->zpp_inner->user_length;
  HXDLIN( 737)			it->zpp_critical = true;
  HXDLIN( 737)			bool _hx_tmp1;
  HXDLIN( 737)			if ((it->zpp_i < length)) {
  HXLINE( 737)				_hx_tmp1 = true;
              			}
              			else {
  HXLINE( 737)				{
  HXLINE( 737)					it->zpp_next = ::nape::dynamics::ContactIterator_obj::zpp_pool;
  HXDLIN( 737)					::nape::dynamics::ContactIterator_obj::zpp_pool = it;
  HXDLIN( 737)					it->zpp_inner = null();
              				}
  HXDLIN( 737)				_hx_tmp1 = false;
              			}
  HXDLIN( 737)			if (!(_hx_tmp1)) {
  HXLINE( 737)				goto _hx_goto_44;
              			}
  HXLINE( 738)			try {
              				HX_STACK_CATCHABLE( ::Dynamic, 0);
  HXLINE( 739)				it->zpp_critical = false;
  HXDLIN( 739)				lambda(it->zpp_inner->at(it->zpp_i++));
              			}
              			catch( ::Dynamic _hx_e){
              				if (_hx_e.IsClass<  ::Dynamic >() ){
              					HX_STACK_BEGIN_CATCH
              					 ::Dynamic e = _hx_e;
  HXLINE( 742)					{
  HXLINE( 743)						it->zpp_next = ::nape::dynamics::ContactIterator_obj::zpp_pool;
  HXLINE( 744)						::nape::dynamics::ContactIterator_obj::zpp_pool = it;
  HXLINE( 745)						it->zpp_inner = null();
              					}
  HXLINE( 747)					goto _hx_goto_44;
              				}
              				else {
              					HX_STACK_DO_THROW(_hx_e);
              				}
              			}
              		}
              		_hx_goto_44:;
  HXLINE( 750)		return hx::ObjectPtr<OBJ_>(this);
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,foreach,return )
  
   ::nape::dynamics::ContactList ContactList_obj::filter( ::Dynamic lambda){
              	HX_STACKFRAME(&_hx_pos_2011eb8df9683541_779_filter)
  HXLINE( 781)		if (hx::IsNull( lambda )) {
  HXLINE( 781)			HX_STACK_DO_THROW(HX_("Error: Cannot select elements of list with null",14,a8,f1,3b));
              		}
  HXLINE( 783)		int i = 0;
  HXLINE( 784)		while(true){
  HXLINE( 784)			this->zpp_inner->valmod();
  HXDLIN( 784)			if (this->zpp_inner->zip_length) {
  HXLINE( 784)				this->zpp_inner->zip_length = false;
  HXDLIN( 784)				{
  HXLINE( 784)					this->zpp_inner->user_length = 0;
  HXDLIN( 784)					{
  HXLINE( 784)						 ::zpp_nape::dynamics::ZPP_Contact cx_ite = this->zpp_inner->inner->next;
  HXDLIN( 784)						while(hx::IsNotNull( cx_ite )){
  HXLINE( 784)							 ::zpp_nape::dynamics::ZPP_Contact i1 = cx_ite;
  HXDLIN( 784)							bool _hx_tmp;
  HXDLIN( 784)							if (i1->active) {
  HXLINE( 784)								_hx_tmp = i1->arbiter->active;
              							}
              							else {
  HXLINE( 784)								_hx_tmp = false;
              							}
  HXDLIN( 784)							if (_hx_tmp) {
  HXLINE( 784)								this->zpp_inner->user_length++;
              							}
  HXDLIN( 784)							cx_ite = cx_ite->next;
              						}
              					}
              				}
              			}
  HXDLIN( 784)			if (!((i < this->zpp_inner->user_length))) {
  HXLINE( 784)				goto _hx_goto_47;
              			}
  HXLINE( 785)			 ::nape::dynamics::Contact x = this->at(i);
  HXLINE( 786)			try {
              				HX_STACK_CATCHABLE( ::Dynamic, 0);
  HXLINE( 787)				if (( (bool)(lambda(x)) )) {
  HXLINE( 787)					i = (i + 1);
              				}
              				else {
  HXLINE( 788)					this->remove(x);
              				}
              			}
              			catch( ::Dynamic _hx_e){
              				if (_hx_e.IsClass<  ::Dynamic >() ){
              					HX_STACK_BEGIN_CATCH
              					 ::Dynamic e = _hx_e;
  HXLINE( 791)					goto _hx_goto_47;
              				}
              				else {
              					HX_STACK_DO_THROW(_hx_e);
              				}
              			}
              		}
              		_hx_goto_47:;
  HXLINE( 794)		return hx::ObjectPtr<OBJ_>(this);
              	}
  
  
  HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,filter,return )
  
   ::nape::dynamics::ContactList ContactList_obj::fromArray(::Array< ::Dynamic> array){
              	HX_GC_STACKFRAME(&_hx_pos_2011eb8df9683541_304_fromArray)
  HXLINE( 306)		if (hx::IsNull( array )) {
  HXLINE( 307)			HX_STACK_DO_THROW(HX_("Error: Cannot convert null Array to Nape list",35,f1,7a,22));
              		}
  HXLINE( 310)		 ::nape::dynamics::ContactList ret =  ::nape::dynamics::ContactList_obj::__alloc( HX_CTX );
  HXLINE( 311)		{
  HXLINE( 311)			int _g = 0;
  HXDLIN( 311)			while((_g < array->length)){
  HXLINE( 311)				 ::nape::dynamics::Contact i = array->__get(_g).StaticCast<  ::nape::dynamics::Contact >();
  HXDLIN( 311)				_g = (_g + 1);
  HXLINE( 316)				ret->push(i);
              			}
              		}
  HXLINE( 318)		return ret;
              	}
  
  
  STATIC_HX_DEFINE_DYNAMIC_FUNC1(ContactList_obj,fromArray,return )
  
  
  hx::ObjectPtr< ContactList_obj > ContactList_obj::__new() {
  	hx::ObjectPtr< ContactList_obj > __this = new ContactList_obj();
  	__this->__construct();
  	return __this;
  }
  
  hx::ObjectPtr< ContactList_obj > ContactList_obj::__alloc(hx::Ctx *_hx_ctx) {
  	ContactList_obj *__this = (ContactList_obj*)(hx::Ctx::alloc(_hx_ctx, sizeof(ContactList_obj), true, "nape.dynamics.ContactList"));
  	*(void **)__this = ContactList_obj::_hx_vtable;
  	__this->__construct();
  	return __this;
  }
  
  ContactList_obj::ContactList_obj()
  {
  }
  
  void ContactList_obj::__Mark(HX_MARK_PARAMS)
  {
  	HX_MARK_BEGIN_CLASS(ContactList);
  	HX_MARK_MEMBER_NAME(zpp_inner,"zpp_inner");
  	HX_MARK_END_CLASS();
  }
  
  void ContactList_obj::__Visit(HX_VISIT_PARAMS)
  {
  	HX_VISIT_MEMBER_NAME(zpp_inner,"zpp_inner");
  }
  
  hx::Val ContactList_obj::__Field(const ::String &inName,hx::PropertyAccess inCallProp)
  {
  	switch(inName.length) {
  	case 2:
  		if (HX_FIELD_EQ(inName,"at") ) { return hx::Val( at_dyn() ); }
  		break;
  	case 3:
  		if (HX_FIELD_EQ(inName,"has") ) { return hx::Val( has_dyn() ); }
  		if (HX_FIELD_EQ(inName,"pop") ) { return hx::Val( pop_dyn() ); }
  		if (HX_FIELD_EQ(inName,"add") ) { return hx::Val( add_dyn() ); }
  		break;
  	case 4:
  		if (HX_FIELD_EQ(inName,"push") ) { return hx::Val( push_dyn() ); }
  		if (HX_FIELD_EQ(inName,"copy") ) { return hx::Val( copy_dyn() ); }
  		break;
  	case 5:
  		if (HX_FIELD_EQ(inName,"shift") ) { return hx::Val( shift_dyn() ); }
  		if (HX_FIELD_EQ(inName,"clear") ) { return hx::Val( clear_dyn() ); }
  		if (HX_FIELD_EQ(inName,"empty") ) { return hx::Val( empty_dyn() ); }
  		if (HX_FIELD_EQ(inName,"merge") ) { return hx::Val( merge_dyn() ); }
  		break;
  	case 6:
  		if (HX_FIELD_EQ(inName,"length") ) { if (inCallProp == hx::paccAlways) return hx::Val( get_length() ); }
  		if (HX_FIELD_EQ(inName,"remove") ) { return hx::Val( remove_dyn() ); }
  		if (HX_FIELD_EQ(inName,"filter") ) { return hx::Val( filter_dyn() ); }
  		break;
  	case 7:
  		if (HX_FIELD_EQ(inName,"unshift") ) { return hx::Val( unshift_dyn() ); }
  		if (HX_FIELD_EQ(inName,"foreach") ) { return hx::Val( foreach_dyn() ); }
  		break;
  	case 8:
  		if (HX_FIELD_EQ(inName,"iterator") ) { return hx::Val( iterator_dyn() ); }
  		if (HX_FIELD_EQ(inName,"toString") ) { return hx::Val( toString_dyn() ); }
  		break;
  	case 9:
  		if (HX_FIELD_EQ(inName,"zpp_inner") ) { return hx::Val( zpp_inner ); }
  		break;
  	case 10:
  		if (HX_FIELD_EQ(inName,"get_length") ) { return hx::Val( get_length_dyn() ); }
  	}
  	return super::__Field(inName,inCallProp);
  }
  
  bool ContactList_obj::__GetStatic(const ::String &inName, Dynamic &outValue, hx::PropertyAccess inCallProp)
  {
  	switch(inName.length) {
  	case 9:
  		if (HX_FIELD_EQ(inName,"fromArray") ) { outValue = fromArray_dyn(); return true; }
  	}
  	return false;
  }
  
  hx::Val ContactList_obj::__SetField(const ::String &inName,const hx::Val &inValue,hx::PropertyAccess inCallProp)
  {
  	switch(inName.length) {
  	case 9:
  		if (HX_FIELD_EQ(inName,"zpp_inner") ) { zpp_inner=inValue.Cast<  ::zpp_nape::util::ZPP_ContactList >(); return inValue; }
  	}
  	return super::__SetField(inName,inValue,inCallProp);
  }
  
  void ContactList_obj::__GetFields(Array< ::String> &outFields)
  {
  	outFields->push(HX_("zpp_inner",51,65,85,78));
  	outFields->push(HX_("length",e6,94,07,9f));
  	super::__GetFields(outFields);
  };
  
  #ifdef HXCPP_SCRIPTABLE
  static hx::StorageInfo ContactList_obj_sMemberStorageInfo[] = {
  	{hx::fsObject /*  ::zpp_nape::util::ZPP_ContactList */ ,(int)offsetof(ContactList_obj,zpp_inner),HX_("zpp_inner",51,65,85,78)},
  	{ hx::fsUnknown, 0, null()}
  };
  static hx::StaticInfo *ContactList_obj_sStaticStorageInfo = 0;
  #endif
  
  static ::String ContactList_obj_sMemberFields[] = {
  	HX_("zpp_inner",51,65,85,78),
  	HX_("get_length",af,04,8f,8f),
  	HX_("has",5a,3f,4f,00),
  	HX_("at",f3,54,00,00),
  	HX_("push",da,11,61,4a),
  	HX_("unshift",89,e3,b3,78),
  	HX_("pop",91,5d,55,00),
  	HX_("shift",82,ec,22,7c),
  	HX_("add",21,f2,49,00),
  	HX_("remove",44,9c,88,04),
  	HX_("clear",8d,71,5b,48),
  	HX_("empty",8d,3a,da,6f),
  	HX_("iterator",ee,49,9a,93),
  	HX_("copy",b5,bb,c4,41),
  	HX_("merge",b8,a2,c6,05),
  	HX_("toString",ac,d0,6e,38),
  	HX_("foreach",8a,fd,e4,d9),
  	HX_("filter",b8,1f,35,85),
  	::String(null()) };
  
  hx::Class ContactList_obj::__mClass;
  
  static ::String ContactList_obj_sStaticFields[] = {
  	HX_("fromArray",cf,57,18,da),
  	::String(null())
  };
  
  void ContactList_obj::__register()
  {
  	ContactList_obj _hx_dummy;
  	ContactList_obj::_hx_vtable = *(void **)&_hx_dummy;
  	hx::Static(__mClass) = new hx::Class_obj();
  	__mClass->mName = HX_("nape.dynamics.ContactList",ea,78,96,58);
  	__mClass->mSuper = &super::__SGetClass();
  	__mClass->mConstructEmpty = &__CreateEmpty;
  	__mClass->mConstructArgs = &__Create;
  	__mClass->mGetStaticField = &ContactList_obj::__GetStatic;
  	__mClass->mSetStaticField = &hx::Class_obj::SetNoStaticField;
  	__mClass->mStatics = hx::Class_obj::dupFunctions(ContactList_obj_sStaticFields);
  	__mClass->mMembers = hx::Class_obj::dupFunctions(ContactList_obj_sMemberFields);
  	__mClass->mCanCast = hx::TCanCast< ContactList_obj >;
  #ifdef HXCPP_SCRIPTABLE
  	__mClass->mMemberStorageInfo = ContactList_obj_sMemberStorageInfo;
  #endif
  #ifdef HXCPP_SCRIPTABLE
  	__mClass->mStaticStorageInfo = ContactList_obj_sStaticStorageInfo;
  #endif
  	hx::_hx_RegisterClass(__mClass->mName, __mClass);
  }
  
  } // end namespace nape
  } // end namespace dynamics
  