Hello again,
I have been looking closely at the plane plugin and I think I understand how it works. However if someone could please write up another simple plugin that has a Y value as well, such as a cube, it would probably help me a lot. If not could someone Explain the following code:
#plugin("object", "mesh", "plane");
#parameter("side", float, 10.0, 0.001, 99999, scale);
#return($plane);
#button(17, 25, 2,
0x00000000, 0x00000000, 0x0fffffff, 0x00010001,
0x00010001, 0x00010001, 0x00010001, 0x00010001,
0x00010001, 0x00010001, 0x00010001, 0x00010001,
0x00010001, 0x00010001, 0x00010001, 0x00010001,
0x00010001, 0x00010001, 0x0fffffff, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000);
shape $plane;
int $side,$i;
point3 $p;
$side = parameter("side");
$plane.Open();
$plane.OpenFace(0,4);What does this line and the one before it do? Would it change if the shape was a cube instead of a plane?
$p.x = -$side;
$p.y = 0;
$p.z = -$side;
$plane.TexCoordN($plane.AddTexCoord((0,1)));What do the numbers mean and again would they change if the shape was a cube instead of a plane?
$plane.VertexN($plane.AddPoint($p));
$p.x = $side;
$p.y = 0;
$p.z = -$side;
$plane.TexCoordN($plane.AddTexCoord((1,1)));
$plane.VertexN($plane.AddPoint($p));
$p.x = $side;
$p.y = 0;
$p.z = $side;
$plane.TexCoordN($plane.AddTexCoord((1,0)));
$plane.VertexN($plane.AddPoint($p));
$p.x = -$side;
$p.y = 0;
$p.z = $side;
$plane.TexCoordN($plane.AddTexCoord((0,0)));
$plane.VertexN($plane.AddPoint($p));
$plane.CloseFace();
$plane.Close();
Thanks
Jdez