v_sim.GlMatrix¶
Fields¶
Name |
Type |
Access |
Description |
|---|---|---|---|
c |
[ |
r/w |
the coefficients. |
Methods¶
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class v_sim.GlMatrix¶
A 4x4 matrix to be used in OpenGL.
- classmethod modelize(camera)¶
- Parameters:
camera (
v_sim.GlCamera) – av_sim.GlCameraobject.- Returns:
a location to store a
v_sim.GlMatrix.- Return type:
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:
camera (
v_sim.GlCamera) – av_sim.GlCameraobject.width (
int) – a width.height (
int) – a height.
- Returns:
a location to store a
v_sim.GlMatrix.- Return type:
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:
v (
float) – a GL vector locationmatrix (
v_sim.GlMatrix) – a GL matrixu (
float) – a GL vector
4x4 matrix product with a vector.
New in version 3.9.
- inv(m)¶
- Parameters:
m (
v_sim.GlMatrix) – av_sim.GlMatrix
Compute the inverse of m in self.
New in version 3.9.
- matrixProd(m1, m2)¶
- Parameters:
m1 (
v_sim.GlMatrix) – av_sim.GlMatrixm2 (
v_sim.GlMatrix) – av_sim.GlMatrix
Compute the product of matrix m1 with matrix m2 and store the result in self
New in version 3.9.
- rotate(angle, dir)¶
- Parameters:
angle (
float) – an angle in degreesdir (
v_sim.XyzDir) – an axis.
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)¶
-
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.