gggmork
If you can make any sense of this post, congratulations

Posts: 2380
Registered: 06-07 |
I'm trying to make a fake class in acs I guess. This is the main data for a point. "Instance variables" are spread to multiple arrays (I suspect doing so removes complex nesting, ie. not going points[2][2] but rather zs[2] to refer to the z of the 3rd point, and also "zs" is self describing (a list of z floats) whereas [2] is cryptic and requiring knowing it means "z").:
xs[3] = {5,9,7};
ys[3] = {8,4,2};
zs[3] = {2,8,1};
Index starts on 0, so the 3rd point is 7,2,1:
xs[2]
ys[2]
zs[2]
Anyway, if I want to delete/erase index 1:
{5,null,7};
{8,null,2};
{2,null,1};
I could set them to null or something (i noticed "no" is color coded red in acs so maybe that's it), then basically "if that spot is null, consider it erased/gone".
If I use 0s instead, 0/0/0 is still a valid point location. So if there aren't any nulls, I guess I could add another "instance variable"
alive[3] = {1,1,1}
then just set the alive bit off for an erased one:
{1,0,1}
I intend all the "instance variables" and functions to have the prefix "p_" to stand for point, just to organize everything and make it obvious which function are supposed to go with which "objects" (really just an index to all the "instance variable" arrays like xs/ys/zs), like p_xs, p_newIndex(), p_rotate(pointIndex, angle), bla bla
Last edited by gggmork on 03-08-13 at 14:16
|