If we are going to upgrade our system to include the support of solid surfaces (which is necesseary to move on to gourand shading and texure mapping) we'll have to concider the effects.
The main difference from line objects, is that the parts of each object will have to be drawn in a different order depending on the direction that they are viewn from.
This means that the surfaces closest to the camera will have to be drawn last and the ones most far away will have to be drawn first.
The second problem is really a optimisation, if we define a box, the surfaces facing into the box won't have to be drawn. This problem really is about defining a front-side of the surface and detect when it is facing the viewers eye.
The next thing I've choosen to include is shading, this is really very closely connected to the detection of in what direction a surface is facing. If we can define the angle between the viewer and the surface's direction, we can also find the angle to a light source. This shading method does not support shadows though.
The last thing we need to know is really how to draw a solid-coloured surface and the definition of a surface.
What is a Surface?
So, what is a surface? I've choosen to define it as a triangle. This triangle will be assigned with a direction and a colour, this direction will be caluculated, but can also be applied manualy. The triangle's three corners are based around three "marks", i.e. a 3D point. The direction it is facing will be defined as a 3D vector (this expression will be explained later) pointing towards the point it's facing.
To see how to implement these issues, please read on. The next BOXn.CPP will support the things listed above.