I have a 3d object which in its simplest form consists 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 very appreciated.