camera
OpenGL has no camera.
axis of the world
There is no world in OpenGL.
or object.
OpenGL has no objects.
Confused?
OpenGL is a drawing system that works with dots, lines, and triangles. OpenGL has no concept of a scene or a world. All that there are vertices, each of which has a set of attributes, is the OpenGL state, which determines how the vertices turn into pixels.
The very first stage of this process is getting the vertex positions in the viewport. In a pipeline with a fixed function (that is, without shaders) to get them, each vertex position, if you first multiply by the so-called "model" matrix, the intermediate result is used to calculate the lighting, and then multiply by the "projection" matrix. After that, cropping is applied, and then normalization in the viewing coordinates.
The two matrices that I talked about preserve two goals. The first version of "modelview" is used to apply some transformation to incoming vertices so that they fall to the right place relative to the origin. There is no difference in the first moving geometry to some place in the world, and then moving point of view in the world. Or keep the point of view at the beginning and move the whole world in the opposite direction. All this can be described by a matrix of the form.
The second “projection” works together with the normalization process to behave as a kind of “lens”, so to speak. With this, you set the field of view (and a few other parameters, such as shift, which you need for certain applications - don't worry about that).
An interesting thing about matrices is that they are non-commutative, i.e. for two given matrices N, M
M * N =/= N * M ; for most M, N
This ultimately means that you can compose a series of transformations A, B, C, D ... into one single transformation transform matrix T, multiplying the primitive transformations by each other in the correct order.
OpenGL matrix manipulation functions (they are deprecated by BTW) do just that. You have a matrix selected for manipulation (matrix mode), for example, for model M. Then glRotate effectively does this:
M *= R(angle,axis)
i.e. the active matrix is multiplied by a rotation matrix constructed by given parameters. Similarly for scale and translation.
If this happens, it seems to behave like a camera or placing an object completely depends on how and in what order these manipulations are combined.
But for OpenGL, there are only numbers / vectors (vertex attributes) that somehow translate into two-dimensional coordinates in the form of a view, which are drawn as points to fill in between them like a line or a triangle.