1. Math library¶
1.1. Class Inheritance diagram¶

1.2. openalea.plantgl.math module¶
- class Matrix2¶
- IDENTITY = Matrix2( 1, 0 , 0, 1 )¶
- adjoint((Matrix2)arg1) Matrix2 :¶
- C++ signature :
PGL::Matrix2 adjoint(PGL::Matrix2)
- data((Matrix2)arg1) list :¶
- C++ signature :
boost::python::list data(PGL::Matrix2)
- det((Matrix2)arg1) float :¶
- C++ signature :
double det(PGL::Matrix2)
- getColumn((Matrix2)arg1, (object)arg2) Vector2 :¶
- C++ signature :
PGL::Vector2 getColumn(PGL::Matrix2 {lvalue},unsigned char)
- getDiagonal((Matrix2)arg1) Vector2 :¶
- C++ signature :
PGL::Vector2 getDiagonal(PGL::Matrix2 {lvalue})
- getRow((Matrix2)arg1, (object)arg2) Vector2 :¶
- C++ signature :
PGL::Vector2 getRow(PGL::Matrix2 {lvalue},unsigned char)
- inverse((Matrix2)arg1) Matrix2 :¶
- C++ signature :
PGL::Matrix2 inverse(PGL::Matrix2)
- isOrthogonal((Matrix2)arg1) bool :¶
- C++ signature :
bool isOrthogonal(PGL::Matrix2 {lvalue})
- isSingular((Matrix2)arg1) bool :¶
- C++ signature :
bool isSingular(PGL::Matrix2 {lvalue})
- isValid((Matrix2)arg1) bool :¶
- C++ signature :
bool isValid(PGL::Matrix2 {lvalue})
- static linearTransformation((Vector2)i1, (Vector2)j1, (Vector2)i2, (Vector2)j2) Matrix2 :¶
- C++ signature :
PGL::Matrix2 linearTransformation(PGL::Vector2,PGL::Vector2,PGL::Vector2,PGL::Vector2)
- static rotation((object)angle) Matrix2 :¶
- C++ signature :
PGL::Matrix2 rotation(double)
- svd((Matrix2)arg1) object :¶
Singular Value Decomposition of a Matrix2. Return rotation matrix and the two singular values.
- C++ signature :
boost::python::api::object svd(PGL::Matrix2)
- trace((Matrix2)arg1) float :¶
- C++ signature :
double trace(PGL::Matrix2)
- transpose((Matrix2)arg1) Matrix2 :¶
- C++ signature :
PGL::Matrix2 transpose(PGL::Matrix2)
- class Matrix3¶
- IDENTITY = Matrix3( 1, 0, 0 , 0, 1, 0 , 0, 0, 1 )¶
- adjoint((Matrix3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 adjoint(PGL::Matrix3)
- static axisRotation((Vector3)arg1, (object)arg2) Matrix3 :¶
- C++ signature :
PGL::Matrix3 axisRotation(PGL::Vector3,double)
- data((Matrix3)arg1) list :¶
- C++ signature :
boost::python::list data(PGL::Matrix3)
- det((Matrix3)arg1) float :¶
- C++ signature :
double det(PGL::Matrix3)
- eulerAnglesXYZ((Matrix3)arg1) Vector3 :¶
- C++ signature :
PGL::Vector3 eulerAnglesXYZ(PGL::Matrix3 {lvalue})
- eulerAnglesZYX((Matrix3)arg1) Vector3 :¶
- C++ signature :
PGL::Vector3 eulerAnglesZYX(PGL::Matrix3 {lvalue})
- static eulerRotationXYZ((Vector3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 eulerRotationXYZ(PGL::Vector3)
- static eulerRotationZYX((Vector3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 eulerRotationZYX(PGL::Vector3)
- getColumn((Matrix3)arg1, (object)arg2) Vector3 :¶
- C++ signature :
PGL::Vector3 getColumn(PGL::Matrix3 {lvalue},unsigned char)
- getDiagonal((Matrix3)arg1) Vector3 :¶
- C++ signature :
PGL::Vector3 getDiagonal(PGL::Matrix3 {lvalue})
- getRow((Matrix3)arg1, (object)arg2) Vector3 :¶
- C++ signature :
PGL::Vector3 getRow(PGL::Matrix3 {lvalue},unsigned char)
- inverse((Matrix3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 inverse(PGL::Matrix3)
- isOrthogonal((Matrix3)arg1) bool :¶
- C++ signature :
bool isOrthogonal(PGL::Matrix3 {lvalue})
- isSingular((Matrix3)arg1) bool :¶
- C++ signature :
bool isSingular(PGL::Matrix3 {lvalue})
- isValid((Matrix3)arg1) bool :¶
- C++ signature :
bool isValid(PGL::Matrix3 {lvalue})
- static scaling((Vector3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 scaling(PGL::Vector3)
scaling( (object)arg1) -> Matrix3 :
- C++ signature :
PGL::Matrix3 scaling(double)
- toAxisAngle((Matrix3)arg1) object :¶
- C++ signature :
boost::python::api::object toAxisAngle(PGL::Matrix3 const*)
- trace((Matrix3)arg1) float :¶
- C++ signature :
double trace(PGL::Matrix3)
- transpose((Matrix3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 transpose(PGL::Matrix3)
- class Matrix4¶
- IDENTITY = Matrix4( 1, 0, 0, 0 , 0, 1, 0, 0 , 0, 0, 1, 0 , 0, 0, 0, 1 )¶
- adjoint((Matrix4)arg1) Matrix4 :¶
- C++ signature :
PGL::Matrix4 adjoint(PGL::Matrix4)
- data((Matrix4)arg1) list :¶
- C++ signature :
boost::python::list data(PGL::Matrix4)
- det((Matrix4)arg1) float :¶
- C++ signature :
double det(PGL::Matrix4)
- getColumn((Matrix4)arg1, (object)arg2) Vector4 :¶
- C++ signature :
PGL::Vector4 getColumn(PGL::Matrix4 {lvalue},unsigned char)
- getDiagonal((Matrix4)arg1) Vector4 :¶
- C++ signature :
PGL::Vector4 getDiagonal(PGL::Matrix4 {lvalue})
- getRow((Matrix4)arg1, (object)arg2) Vector4 :¶
- C++ signature :
PGL::Vector4 getRow(PGL::Matrix4 {lvalue},unsigned char)
- getTransformation((Matrix4)arg1) tuple :¶
Return scaling, rotation and translation corresponding the decomposition of the matrix into R(rotate) * S(scale) + T(translate) where R( rotate=(az,ay,ax) ) is the product of 3 matrices Rz(az)Ry(ay)Rx(ax)
- C++ signature :
boost::python::tuple getTransformation(PGL::Matrix4*)
- getTransformation2((Matrix4)arg1) tuple :¶
Return scaling, rotation and translation corresponding the decomposition of the matrix into S(scale) * R(rotate) + T(translate) where R( rotate=(az,ay,ax) ) is the product of 3 matrices Rz(az)Ry(ay)Rx(ax)
- C++ signature :
boost::python::tuple getTransformation2(PGL::Matrix4*)
- getTransformationB((Matrix4)arg1) tuple :¶
Alternative method to getTransformation.
- C++ signature :
boost::python::tuple getTransformationB(PGL::Matrix4*)
- inverse((Matrix4)arg1) Matrix4 :¶
- C++ signature :
PGL::Matrix4 inverse(PGL::Matrix4)
- isOrthogonal((Matrix4)arg1) bool :¶
- C++ signature :
bool isOrthogonal(PGL::Matrix4 {lvalue})
- isSingular((Matrix4)arg1) bool :¶
- C++ signature :
bool isSingular(PGL::Matrix4 {lvalue})
- isValid((Matrix4)arg1) bool :¶
- C++ signature :
bool isValid(PGL::Matrix4 {lvalue})
- set((Matrix4)arg1, (tuple)arg2) None :¶
- C++ signature :
void set(PGL::Matrix4 {lvalue},boost::python::tuple)
- setTransformation((Matrix4)arg1, (Vector3)arg2, (Vector3)arg3, (Vector3)arg4) None :¶
- C++ signature :
void setTransformation(PGL::Matrix4 {lvalue},PGL::Vector3,PGL::Vector3,PGL::Vector3)
- setTransformation2((Matrix4)arg1, (Vector3)arg2, (Vector3)arg3, (Vector3)arg4) None :¶
- C++ signature :
void setTransformation2(PGL::Matrix4 {lvalue},PGL::Vector3,PGL::Vector3,PGL::Vector3)
- trace((Matrix4)arg1) float :¶
- C++ signature :
double trace(PGL::Matrix4)
- static translation((Vector3)arg1) Matrix4 :¶
- C++ signature :
PGL::Matrix4 translation(PGL::Vector3)
- transpose((Matrix4)arg1) Matrix4 :¶
- C++ signature :
PGL::Matrix4 transpose(PGL::Matrix4)
- class Vector2¶
- ORIGIN = Vector2(0,0)¶
- OX = Vector2(1,0)¶
- OY = Vector2(0,1)¶
- class Polar¶
- isValid((Polar)arg1) bool :¶
Returns whether self is valid.
- C++ signature :
bool isValid(PGL::Vector2::Polar {lvalue})
- property radius¶
- property theta¶
- cwiseProduct((Vector2)arg1, (Vector2)arg2) Vector2 :¶
component wise product.
- C++ signature :
PGL::Vector2 cwiseProduct(PGL::Vector2 {lvalue},PGL::Vector2)
- getMaxAbsCoord((Vector2)arg1) int :¶
Returns the index of the maximum absolute coordinate.
- C++ signature :
int getMaxAbsCoord(PGL::Vector2 {lvalue})
- getMinAbsCoord((Vector2)arg1) int :¶
Returns the index of the minimum absolute coordinate.
- C++ signature :
int getMinAbsCoord(PGL::Vector2 {lvalue})
- isNormalized((Vector2)arg1) bool :¶
Returns whether self is normalized.
- C++ signature :
bool isNormalized(PGL::Vector2 {lvalue})
- isOrthogonalTo((Vector2)arg1, (Vector2)v) bool :¶
Returns whether self is orthogonal to v.
- C++ signature :
bool isOrthogonalTo(PGL::Vector2 {lvalue},PGL::Vector2)
- isValid((Vector2)arg1) bool :¶
Returns whether self is valid.
- C++ signature :
bool isValid(PGL::Vector2 {lvalue})
- normalize((Vector2)arg1) float :¶
Normalizes self and returns the norm before.
- C++ signature :
double normalize(PGL::Vector2 {lvalue})
- normed((Vector2)arg1) Vector2 :¶
Return a normed version of self.
- C++ signature :
PGL::Vector2 normed(PGL::Vector2 {lvalue})
- property x¶
- property y¶
- class Vector3¶
- class Cylindrical¶
- isValid((Cylindrical)arg1) bool :¶
Returns whether self is valid.
- C++ signature :
bool isValid(PGL::Vector3::Cylindrical {lvalue})
- property radius¶
- property theta¶
- property z¶
- ORIGIN = Vector3(0,0,0)¶
- OX = Vector3(1,0,0)¶
- OY = Vector3(0,1,0)¶
- OZ = Vector3(0,0,1)¶
- class Spherical¶
- isValid((Spherical)arg1) bool :¶
Returns whether self is valid.
- C++ signature :
bool isValid(PGL::Vector3::Spherical {lvalue})
- property phi¶
- property radius¶
- spherical_distance((Spherical)arg1, (object)arg2, (object)arg3) float :¶
- C++ signature :
double spherical_distance(PGL::Vector3::Spherical {lvalue},double,double)
- property theta¶
- anOrthogonalVector((Vector3)arg1) Vector3 :¶
- C++ signature :
PGL::Vector3 anOrthogonalVector(PGL::Vector3 {lvalue})
- anisotropicNorm((Vector3)arg1, (Vector3)arg2) float :¶
- C++ signature :
double anisotropicNorm(PGL::Vector3,PGL::Vector3)
- cwiseProduct((Vector3)arg1, (Vector3)arg2) Vector3 :¶
component wise product.
- C++ signature :
PGL::Vector3 cwiseProduct(PGL::Vector3 {lvalue},PGL::Vector3)
- getMaxAbsCoord((Vector3)arg1) int :¶
Returns the index of the maximum absolute coordinate.
- C++ signature :
int getMaxAbsCoord(PGL::Vector3 {lvalue})
- getMinAbsCoord((Vector3)arg1) int :¶
Returns the index of the minimum absolute coordinate.
- C++ signature :
int getMinAbsCoord(PGL::Vector3 {lvalue})
- isNormalized((Vector3)arg1) bool :¶
Returns whether self is normalized.
- C++ signature :
bool isNormalized(PGL::Vector3 {lvalue})
- isOrthogonalTo((Vector3)arg1, (Vector3)v) bool :¶
Returns whether self is orthogonal to v.
- C++ signature :
bool isOrthogonalTo(PGL::Vector3 {lvalue},PGL::Vector3)
- isValid((Vector3)arg1) bool :¶
Returns whether self is valid.
- C++ signature :
bool isValid(PGL::Vector3 {lvalue})
- normalize((Vector3)arg1) float :¶
Normalizes self and returns the norm before.
- C++ signature :
double normalize(PGL::Vector3 {lvalue})
- normed((Vector3)arg1) Vector3 :¶
Return a normed version of self.
- C++ signature :
PGL::Vector3 normed(PGL::Vector3 {lvalue})
- project((Vector3)arg1) Vector2 :¶
- C++ signature :
PGL::Vector2 project(PGL::Vector3 {lvalue})
- radialAnisotropicNorm((Vector3)arg1, (Vector3)arg2, (object)arg3, (object)arg4) float :¶
- C++ signature :
double radialAnisotropicNorm(PGL::Vector3,PGL::Vector3,double,double)
- reflect((Vector3)arg1, (Vector3)arg2) Vector3 :¶
- C++ signature :
PGL::Vector3 reflect(PGL::Vector3 {lvalue},PGL::Vector3)
- refract((Vector3)arg1, (Vector3)arg2, (object)arg3) Vector3 :¶
- C++ signature :
PGL::Vector3 refract(PGL::Vector3 {lvalue},PGL::Vector3,double)
- property x¶
- property y¶
- property z¶
- class Vector4¶
- ORIGIN = Vector4(0,0,0,0)¶
- OW = Vector4(0,0,0,1)¶
- OX = Vector4(1,0,0,0)¶
- OY = Vector4(0,1,0,0)¶
- OZ = Vector4(0,0,1,0)¶
- cwiseProduct((Vector4)arg1, (Vector4)arg2) Vector4 :¶
component wise product.
- C++ signature :
PGL::Vector4 cwiseProduct(PGL::Vector4 {lvalue},PGL::Vector4)
- getMaxAbsCoord((Vector4)arg1) int :¶
Returns the index of the maximum absolute coordinate.
- C++ signature :
int getMaxAbsCoord(PGL::Vector4 {lvalue})
- getMinAbsCoord((Vector4)arg1) int :¶
Returns the index of the minimum absolute coordinate.
- C++ signature :
int getMinAbsCoord(PGL::Vector4 {lvalue})
- isNormalized((Vector4)arg1) bool :¶
Returns whether self is normalized.
- C++ signature :
bool isNormalized(PGL::Vector4 {lvalue})
- isOrthogonalTo((Vector4)arg1, (Vector4)v) bool :¶
Returns whether self is orthogonal to v.
- C++ signature :
bool isOrthogonalTo(PGL::Vector4 {lvalue},PGL::Vector4)
- isValid((Vector4)arg1) bool :¶
Returns whether self is valid.
- C++ signature :
bool isValid(PGL::Vector4 {lvalue})
- normalize((Vector4)arg1) float :¶
Normalizes self and returns the norm before.
- C++ signature :
double normalize(PGL::Vector4 {lvalue})
- normed((Vector4)arg1) Vector4 :¶
Return a normed version of self.
- C++ signature :
PGL::Vector4 normed(PGL::Vector4 {lvalue})
- project((Vector4)arg1) Vector3 :¶
- C++ signature :
PGL::Vector3 project(PGL::Vector4 {lvalue})
- property w¶
- wtoxyz((Vector4)arg1) Vector4 :¶
- C++ signature :
PGL::Vector4 wtoxyz(PGL::Vector4 {lvalue})
- property x¶
- property y¶
- property z¶
- angle((Vector2)v1, (Vector2)v2) float :¶
The angle between v1 and v2
- C++ signature :
double angle(PGL::Vector2,PGL::Vector2)
- angle( (Vector3)v1, (Vector3)v2) -> float :
The angle between v1 and v2
- C++ signature :
double angle(PGL::Vector3,PGL::Vector3)
- angle( (Vector3)v1, (Vector3)v2, (Vector3)axis) -> float :
The angle around axis between v1 and v2
- C++ signature :
double angle(PGL::Vector3,PGL::Vector3,PGL::Vector3)
- axisRotation((Vector3)arg1, (object)arg2) Matrix3 :¶
- C++ signature :
PGL::Matrix3 axisRotation(PGL::Vector3,double)
- cross((Vector2)v1, (Vector2)v2) float :¶
The cross product of v1 and v2
- C++ signature :
double cross(PGL::Vector2,PGL::Vector2)
- cross( (Vector3)v1, (Vector3)v2) -> Vector3 :
The cross product of v1 and v2
- C++ signature :
PGL::Vector3 cross(PGL::Vector3,PGL::Vector3)
- cross( (Vector3)v1, (Vector3)v2) -> Vector3 :
The cross product of v1 and v2
- C++ signature :
PGL::Vector3 cross(PGL::Vector3,PGL::Vector3)
- direction((object)v) object :¶
The direction of the vector. Resulting vector is normed. If v.__direction__() exists, call it.
- C++ signature :
boost::python::api::object direction(boost::python::api::object)
- dot((object)v1, (object)v2) float :¶
The dot product of v1 and v2
- C++ signature :
double dot(boost::python::api::object,boost::python::api::object)
- eulerRotationXYZ((Vector3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 eulerRotationXYZ(PGL::Vector3)
- eulerRotationZYX((Vector3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 eulerRotationZYX(PGL::Vector3)
- norm((object)v) object :¶
The norm of the vector. If v.__norm__() exists, call it.
- C++ signature :
boost::python::api::object norm(boost::python::api::object)
norm( (object)arg1, (object)arg2 [, (object)arg3 [, (object)arg4 [, (object)arg5 [, (object)arg6 [, (object)arg7 [, (object)arg8 [, (object)arg9 [, (object)arg10 [, (object)arg11 [, (object)arg12 [, (object)arg13 [, (object)arg14 [, (object)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
double norm(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
- normL1((object)v) object :¶
The L1 (Manhattan) norm of the vector. If v.__normL1__() exists, call it.
- C++ signature :
boost::python::api::object normL1(boost::python::api::object)
normL1( (object)arg1, (object)arg2 [, (object)arg3 [, (object)arg4 [, (object)arg5 [, (object)arg6 [, (object)arg7 [, (object)arg8 [, (object)arg9 [, (object)arg10 [, (object)arg11 [, (object)arg12 [, (object)arg13 [, (object)arg14 [, (object)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
double normL1(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
- normLinf((object)v) object :¶
The L-infinite norm of the vector. If v.__normLinf__() exists, call it.
- C++ signature :
boost::python::api::object normLinf(boost::python::api::object)
normLinf( (object)arg1, (object)arg2 [, (object)arg3 [, (object)arg4 [, (object)arg5 [, (object)arg6 [, (object)arg7 [, (object)arg8 [, (object)arg9 [, (object)arg10 [, (object)arg11 [, (object)arg12 [, (object)arg13 [, (object)arg14 [, (object)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
double normLinf(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
- normSquared((object)v) object :¶
The square of the norm of the vector. If v.__normSquared__() exists, call it.
- C++ signature :
boost::python::api::object normSquared(boost::python::api::object)
normSquared( (object)arg1, (object)arg2 [, (object)arg3 [, (object)arg4 [, (object)arg5 [, (object)arg6 [, (object)arg7 [, (object)arg8 [, (object)arg9 [, (object)arg10 [, (object)arg11 [, (object)arg12 [, (object)arg13 [, (object)arg14 [, (object)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
double normSquared(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
- scaling((Vector3)arg1) Matrix3 :¶
- C++ signature :
PGL::Matrix3 scaling(PGL::Vector3)
- spherical_distance((object)theta1, (object)phi1, (object)theta2, (object)phi2, (object)radius) float :¶
The distance on a unit sphere of the 2 directions given by v1 and v2
- C++ signature :
double spherical_distance(double,double,double,double,double)
- strain((Matrix2)transformation) Matrix2 :¶
Return the engineering strain associated to the transformation
- C++ signature :
PGL::Matrix2 strain(PGL::Matrix2)
strain( (Vector2)i1, (Vector2)j1, (Vector2)i2, (Vector2)j2) -> Matrix2 :
- C++ signature :
PGL::Matrix2 strain(PGL::Vector2,PGL::Vector2,PGL::Vector2,PGL::Vector2)
- stress((Matrix2)strain, (Matrix3)material) Matrix2 :¶
Return the stress associated to a given strain using Hook’s law
- C++ signature :
PGL::Matrix2 stress(PGL::Matrix2,PGL::Matrix3)