Package renderer.pipeline
Class Model2Camera
- java.lang.Object
-
- renderer.pipeline.Model2Camera
-
public class Model2Camera extends Object
Transform eachVertex
of aModel
from the model's (private) local coordinate system to theCamera
's (shared) coordinate system.For each
Vertex
object in aModel
object, use aPosition
's translationVector
to translate the object'sVertex
coordinates from the model's coordinate system to the camera's coordinate system.Return a new
Model
object, which contains all the translated vertices from the original model, to the renderer. The original model object, which belongs to the client program, remains unchanged. So the renderer gets the mutated model and the client sees its model as being preserved.