Class Position


  • public final class Position
    extends Object
    A Position data structure represents a geometric object in a distinct location in three-dimensional view space as part of a Scene.

    A Position object holds references to a Model object and a Matrix object. The Model represents the geometric object in the Scene. The Matrix determines the model's location and orientation in the Camera's view coordinate system. The Position's matrix helps us solve the problem of placing and moving a model in a scene.

    When the renderer renders this Position's Model into a FrameBuffer, the first stage of the rendering pipeline, Model2World, multiplies every Vertex in the Model's vertex list by this Position's Matrix, which converts the coordinates in each Vertex from the model's own local coordinate system to the world coordinate system (which is "shared" by all the other models in the scene). This matrix multiplication has the effect of "placing" the model in world space at an appropriate location (using the translation part of the matrix) and in the appropriate orientation (using the rotation part of the matrix).