Reply To: how to pass a whole array to a geometry functions?

Home Forums Problems and solutions in GDL 3D modelling how to pass a whole array to a geometry functions? Reply To: how to pass a whole array to a geometry functions?

#4356
Tim Haering
Participant

Ok i guess it was a pretty basic question that should have a description in the docs since it is very useful. In the end i found a solution using the put and get() methods. I dump the values to the buffer using put and then the tube command looks something like this using the get() method. Like this the user can basically extrude any shape with any amount of vertices he likes just by changinge the shape in the UI.

tube num_verts, 7, 16+32, 

	get(num_verts*3),
					
	0 +0.2,		0,		0,	0,
	0,		0,		0,	0,
	0,		2,		0,	0,
	1,		2,		0,	0,
	1,		0,		0,	0,
	0,		0,		0,	0,
	0,		0 + 0.2,	0,	0

Edit: Thanks Peter for pointing me to the documentation on this!