I have a 3D object which is in its simplest form consisting of an origin in 3D space and a set of vertices that are all local to this origin.
I then transform this 3D origin into 2D camera coordinates using a perspective transform, but I need some way to also transform the local vertices of this object which has the effect of moving this 3D object from 3D world coordinates into 3D camera coordinates.
How can I determine the scale of an object based on it's distance from the viewer/camera?
I hope this makes sense, the title is probably the most concise explanation I can give. Any help would be much appreciated.