Subversion Repositories gelsvn

Rev

Rev 595 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 595 Rev 624
Line 47... Line 47...
47
  Mat4x4f translation_Mat4x4f(const Vec3f&);
47
  Mat4x4f translation_Mat4x4f(const Vec3f&);
48
 
48
 
49
  /// Create a scaling matrix.
49
  /// Create a scaling matrix.
50
  Mat4x4f scaling_Mat4x4f(const Vec3f&);
50
  Mat4x4f scaling_Mat4x4f(const Vec3f&);
51
 
51
    
-
 
52
    /// Creates a perspective projection similar to gluPerspective
-
 
53
    /// Description from gluPerspective: perspective_Mat4x4f specifies a viewing frustum into
-
 
54
    /// the world coordinate system. In general, the aspect ratio in perspective_Mat4x4f
-
 
55
    /// should match the aspect ratio of the associated viewport. For example, aspect = 2.0
-
 
56
    /// means the viewer's angle of view is twice as wide in x as it is in y. If the viewport
-
 
57
    /// is twice as wide as it is tall, it displays the image without distortion.
-
 
58
    Mat4x4f perspective_Mat4x4f(float fovy, float aspect, float zNear, float zFar);
-
 
59
    
-
 
60
    /// Creates a perspective matrix similar to glFrustum
-
 
61
    Mat4x4f frustum_Mat4x4f(float  	left,
-
 
62
                            float  	right,
-
 
63
                            float  	bottom,
-
 
64
                            float  	top,
-
 
65
                            float  	nearVal,
-
 
66
                            float  	farVal);
-
 
67
    
-
 
68
    /// Creates an orthographic projection matrix (similar to glOrtho)
-
 
69
    Mat4x4f ortho_Mat4x4f(float left,
-
 
70
                          float right,
-
 
71
                          float bottom,
-
 
72
                          float top,
-
 
73
                          float nearVal,
-
 
74
                          float farVal);
-
 
75
    
-
 
76
    /// Creates a 2D orthographic projection matrix (similar to gluOrtho2D)
-
 
77
    Mat4x4f ortho2D_Mat4x4f(float left, float right, float bottom, float top);
-
 
78
    
-
 
79
    /// Creates a view matrix similar to gluLookAt
-
 
80
    Mat4x4f lookAt_Mat4x4f(const Vec3f& eye, const Vec3f& at, const Vec3f& up);
-
 
81
 
52
  /// Create an identity matrix.
82
  /// Create an identity matrix.
53
  inline Mat4x4f identity_Mat4x4f()
83
  inline Mat4x4f identity_Mat4x4f()
54
    {
84
    {
55
      return Mat4x4f(Vec4f(1.0f,0.0f,0.0f,0.0f), 
85
      return Mat4x4f(Vec4f(1.0f,0.0f,0.0f,0.0f), 
56
		     Vec4f(0.0f,1.0f,0.0f,0.0f), 
86
		     Vec4f(0.0f,1.0f,0.0f,0.0f),