###########################################################################
# cgkit - Python Computer Graphics Kit
# Copyright (C) 2004 Matthias Baas (baas@ira.uka.de)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
# cgkit homepage: http://cgkit.sourceforge.net
###########################################################################
# $Id: icamera.py,v 1.1.1.1 2004/12/12 14:31:41 mbaas Exp $

from protocols import Interface
from iworldobject import IWorldObject

class ICamera(IWorldObject):
    """The camera protocol.

    """

    def projection(self, width, height, near, far):
        """Return the projection matrix for this camera.

        This method has to return the matrix that should be used to
        project the scene onto the screen. This matrix can either
        be an orthographic or perspective matrix.

        \param width (\c int) Viewport width
        \param height (\c int) Viewport height
        \param near (\c float) Near plane value
        \param far (\c float) Far plane value
        \return Projection matrix (\c mat4)
        """

    def viewTransformation(self):
        """Return the view transformation matrix of this camera.

        The view transformation transforms from World coordinates
        into Camera coordinates and is usually the inverse of the
        \c transform attribute. However, an implementation can
        choose to cache an inverted matrix.
        """
        
