The class Dimension3d.
They are read write attributes. It means that they are accessible directly without any member function. For example:
Dimension2d d; d.w=12; d.h=20; std::cout << d.h << std::endl;
Dimension2d d1; // = Dimension2d d1(0,0) d1.w=12; d1.h=21; Dimension2d d2(10,24); // w=24; h=10. Dimension2d *d3=new Dimension2d(d2); // Same size measures than d2.
Dimension d1(12,13), *d2; d2 = new Dimension(10,10); if (d1==*d2) d1=(*d2)*5; d2*=2;
Dimension d;
d.SaveFile("foobar.pan");
To load a dimension from a file, just use:
Dimension d;
d.LoadFile("foobar.pan");
Generally, a dimension is not saved directly in a file but by the means of a collection. To save and load a dimension in a collection, use:
Collection cold; Dimension2d *d1=new Dimension2d(10,20),*d2; cold.SETPOBJECT("bar",Dimension2d,d1); d2=(Dimension2d*)cold.GETPOBJECT("bar",Dimension2d);
To save and load an array of dimensions in a collection, use:
Dimension2d **d3=new Dimension2d*[12], **d4; for (int i=0; i<12; i++) d3[i]=new Dimension2d(i,i); cold.SETPARRAY("foo",Dimension2d,p3,12); d4=(Dimension2d**)cols.GETPARRAY("foo",Dimension2d); std::cout << "Dimensions: " << d4[11]->w << "," << d4[11]->h << std::endl;