#include <hxcpp.h>

#ifndef INCLUDED_luxe_ID
#include <luxe/ID.h>
#endif
#ifndef INCLUDED_phoenix_Color
#include <phoenix/Color.h>
#endif
#ifndef INCLUDED_phoenix_PrimitiveType
#include <phoenix/PrimitiveType.h>
#endif
#ifndef INCLUDED_phoenix_Transform
#include <phoenix/Transform.h>
#endif
#ifndef INCLUDED_phoenix_Vector
#include <phoenix/Vector.h>
#endif
#ifndef INCLUDED_phoenix_geometry_Geometry
#include <phoenix/geometry/Geometry.h>
#endif
#ifndef INCLUDED_phoenix_geometry_RectangleGeometry
#include <phoenix/geometry/RectangleGeometry.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 RectangleGeometry_obj::__construct(Dynamic options)
{
HX_STACK_FRAME("phoenix.geometry.RectangleGeometry","new",0x08963096,"phoenix.geometry.RectangleGeometry.new","phoenix/geometry/RectangleGeometry.hx",13,0x605d1b7a)

HX_STACK_ARG(options,"options")
{
	HX_STACK_LINE(15)
	super::__construct(options);
	HX_STACK_LINE(17)
	if (((options == null()))){
		HX_STACK_LINE(18)
		return null();
	}
	HX_STACK_LINE(21)
	this->set(options);
}
;
	return null();
}

//RectangleGeometry_obj::~RectangleGeometry_obj() { }

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

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

Void RectangleGeometry_obj::set( Dynamic options){
{
		HX_STACK_FRAME("phoenix.geometry.RectangleGeometry","set",0x0899fbd8,"phoenix.geometry.RectangleGeometry.set","phoenix/geometry/RectangleGeometry.hx",25,0x605d1b7a)
		HX_STACK_THIS(this)
		HX_STACK_ARG(options,"options")
		HX_STACK_LINE(27)
		this->vertices->splice((int)0,this->vertices->length);
		HX_STACK_LINE(30)
		::phoenix::geometry::Vertex vert0 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((int)0,(int)0,null(),null()),null(),null());		HX_STACK_VAR(vert0,"vert0");
		HX_STACK_LINE(31)
		vert0->uv->uv0->set((int)0,(int)0,null(),null());
		HX_STACK_LINE(33)
		::phoenix::geometry::Vertex vert1 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(options->__Field(HX_CSTRING("w"),true),(int)0,null(),null()),null(),null());		HX_STACK_VAR(vert1,"vert1");
		HX_STACK_LINE(34)
		vert1->uv->uv0->set((int)1,(int)0,null(),null());
		HX_STACK_LINE(37)
		::phoenix::geometry::Vertex vert2 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(options->__Field(HX_CSTRING("w"),true),(int)0,null(),null()),null(),null());		HX_STACK_VAR(vert2,"vert2");
		HX_STACK_LINE(38)
		vert2->uv->uv0->set((int)1,(int)0,null(),null());
		HX_STACK_LINE(40)
		::phoenix::geometry::Vertex vert3 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(options->__Field(HX_CSTRING("w"),true),options->__Field(HX_CSTRING("h"),true),null(),null()),null(),null());		HX_STACK_VAR(vert3,"vert3");
		HX_STACK_LINE(41)
		vert3->uv->uv0->set((int)1,(int)1,null(),null());
		HX_STACK_LINE(44)
		::phoenix::geometry::Vertex vert4 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new(options->__Field(HX_CSTRING("w"),true),options->__Field(HX_CSTRING("h"),true),null(),null()),null(),null());		HX_STACK_VAR(vert4,"vert4");
		HX_STACK_LINE(45)
		vert4->uv->uv0->set((int)1,(int)1,null(),null());
		HX_STACK_LINE(47)
		::phoenix::geometry::Vertex vert5 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((int)0,options->__Field(HX_CSTRING("h"),true),null(),null()),null(),null());		HX_STACK_VAR(vert5,"vert5");
		HX_STACK_LINE(48)
		vert5->uv->uv0->set((int)0,(int)1,null(),null());
		HX_STACK_LINE(51)
		::phoenix::geometry::Vertex vert6 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((int)0,options->__Field(HX_CSTRING("h"),true),null(),null()),null(),null());		HX_STACK_VAR(vert6,"vert6");
		HX_STACK_LINE(52)
		vert6->uv->uv0->set((int)0,(int)1,null(),null());
		HX_STACK_LINE(54)
		::phoenix::geometry::Vertex vert7 = ::phoenix::geometry::Vertex_obj::__new(::phoenix::Vector_obj::__new((int)0,(int)0,null(),null()),null(),null());		HX_STACK_VAR(vert7,"vert7");
		HX_STACK_LINE(55)
		vert7->uv->uv0->set((int)0,(int)0,null(),null());
		HX_STACK_LINE(57)
		this->add(vert0);
		HX_STACK_LINE(57)
		this->add(vert1);
		HX_STACK_LINE(57)
		this->add(vert2);
		HX_STACK_LINE(57)
		this->add(vert3);
		HX_STACK_LINE(58)
		this->add(vert4);
		HX_STACK_LINE(58)
		this->add(vert5);
		HX_STACK_LINE(58)
		this->add(vert6);
		HX_STACK_LINE(58)
		this->add(vert7);
		HX_STACK_LINE(60)
		this->set_primitive_type(::phoenix::PrimitiveType_obj::lines);
		HX_STACK_LINE(61)
		if (((options->__Field(HX_CSTRING("immediate"),true) == null()))){
			HX_STACK_LINE(61)
			this->immediate = false;
		}
		else{
			HX_STACK_LINE(61)
			this->immediate = options->__Field(HX_CSTRING("immediate"),true);
		}
		HX_STACK_LINE(62)
		this->set_visible((  (((options->__Field(HX_CSTRING("visible"),true) == null()))) ? bool(true) : bool(options->__Field(HX_CSTRING("visible"),true)) ));
		HX_STACK_LINE(63)
		this->set_color((  (((options->__Field(HX_CSTRING("color"),true) == null()))) ? ::phoenix::Color(::phoenix::Color_obj::__new(null(),null(),null(),null())) : ::phoenix::Color(options->__Field(HX_CSTRING("color"),true)) ));
		HX_STACK_LINE(66)
		this->transform->set_pos(::phoenix::Vector_obj::__new(options->__Field(HX_CSTRING("x"),true),options->__Field(HX_CSTRING("y"),true),null(),null()));
	}
return null();
}


HX_DEFINE_DYNAMIC_FUNC1(RectangleGeometry_obj,set,(void))


RectangleGeometry_obj::RectangleGeometry_obj()
{
}

Dynamic RectangleGeometry_obj::__Field(const ::String &inName,bool inCallProp)
{
	switch(inName.length) {
	case 3:
		if (HX_FIELD_EQ(inName,"set") ) { return set_dyn(); }
	}
	return super::__Field(inName,inCallProp);
}

Dynamic RectangleGeometry_obj::__SetField(const ::String &inName,const Dynamic &inValue,bool inCallProp)
{
	return super::__SetField(inName,inValue,inCallProp);
}

void RectangleGeometry_obj::__GetFields(Array< ::String> &outFields)
{
	super::__GetFields(outFields);
};

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

#if HXCPP_SCRIPTABLE
static hx::StorageInfo *sMemberStorageInfo = 0;
#endif

static ::String sMemberFields[] = {
	HX_CSTRING("set"),
	String(null()) };

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

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

#endif

Class RectangleGeometry_obj::__mClass;

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

void RectangleGeometry_obj::__boot()
{
}

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