v_sim.GlMatrix

Fields

Name

Type

Access

Description

c

[float]

r/w

the coefficients.

Methods

class

modelize (camera)

class

project (camera, width, height)

class

vectorProd (v, matrix, u)

inv (m)

matrixProd (m1, m2)

rotate (angle, dir)

scale (scale)

setIdentity ()

setOrtho (width, height)

translate (trans)

transpose ()

Details

class v_sim.GlMatrix

A 4x4 matrix to be used in OpenGL.

classmethod modelize(camera)
Parameters:

camera (v_sim.GlCamera) – a v_sim.GlCamera object.

Returns:

a location to store a v_sim.GlMatrix.

Return type:

M: v_sim.GlMatrix

Compute the modelview matrix associated to the given camera. The up axis and the eye position are updated by this call.

New in version 3.9.

classmethod project(camera, width, height)
Parameters:
Returns:

a location to store a v_sim.GlMatrix.

Return type:

P: v_sim.GlMatrix

Compute the projection matrix associated to the camera. width and height represents the size of the projection plane.

New in version 3.9.

classmethod vectorProd(v, matrix, u)
Parameters:

4x4 matrix product with a vector.

New in version 3.9.

inv(m)
Parameters:

m (v_sim.GlMatrix) – a v_sim.GlMatrix

Compute the inverse of m in self.

New in version 3.9.

matrixProd(m1, m2)
Parameters:

Compute the product of matrix m1 with matrix m2 and store the result in self

New in version 3.9.

rotate(angle, dir)
Parameters:

Modify self to include a rotation along dir of angle.

New in version 3.9.

scale(scale)
Parameters:

scale ([float]) – scaling vector.

Modify self to include a scaling in the three direction given by scale.

New in version 3.9.

setIdentity()

Set self to the identity matrix.

New in version 3.9.

setOrtho(width, height)
Parameters:
  • width (int) – a width

  • height (int) – a height

Construct a projection matrix corresponding to the 2D rectangle of width per height pixels.

New in version 3.9.

translate(trans)
Parameters:

trans ([float]) – translation in cartesian coordinates.

Add trans to self. So the result in multiplying self to a vector, will first apply trans to the vector and then apply self.

New in version 3.9.

transpose()

Transpose self in place.

New in version 3.9.