How to access following data using Luabind

Nicolas Goles <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello, 

I'm quite new to Luabind, I'm trying to access the following data 

polygons = {
				-- 3 "different" Trapezoidal polygons, 4 vertex (x,y) each.
			 	vertex = {
					{{1,0}, {1,10}, {21,30}, {25,35}},
					{{1,0}, {1,10}, {21,30}, {25,35}},
					{{1,0}, {1,10}, {21,30}, {25,35}},
				},
				-- 3 Colors ( R , G , B) one for each polygon
				color = {
					{1,0,0},
					{0,1,0},
					{0,0,1},
				}
}

it represents 3 "different" trapezoidal polygons, each one with a color.

In my Application, I have a C++ class "Trapezoid" that has a constructor that receives 8 floats (x1,y2 , x2, y2.... ) and a color.

Trapezoid::Trapezoid(x1, y1, x2, y2, x3, y3, x4, y4, Color3f color);

What would be the correct way to access this Lua script using luabind? I have been struggling all day.

Sorry if this is noobish, but haven't found any clear solutions for this ( most of the examples focus on executing functions, and more complex stuff )

What would you guys suggest  ?

Thanks!

_Nicolas

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.