1. Math library¶
Contents
1.2. openalea.plantgl.math module¶
-
class
openalea.plantgl.math._pglmath.Matrix2¶ -
IDENTITY= Matrix2( 1, 0 , 0, 1 )¶
-
adjoint((Matrix2)arg1) → Matrix2 :¶ - C++ signature :
- TOOLS::Matrix2 adjoint(TOOLS::Matrix2)
-
data((Matrix2)arg1) → list :¶ - C++ signature :
- boost::python::list data(TOOLS::Matrix2)
-
det((Matrix2)arg1) → float :¶ - C++ signature :
- double det(TOOLS::Matrix2)
-
getColumn((Matrix2)arg1, (int)arg2) → Vector2 :¶ - C++ signature :
- TOOLS::Vector2 getColumn(TOOLS::Matrix2 {lvalue},unsigned char)
-
getDiagonal((Matrix2)arg1) → Vector2 :¶ - C++ signature :
- TOOLS::Vector2 getDiagonal(TOOLS::Matrix2 {lvalue})
-
getRow((Matrix2)arg1, (int)arg2) → Vector2 :¶ - C++ signature :
- TOOLS::Vector2 getRow(TOOLS::Matrix2 {lvalue},unsigned char)
-
inverse((Matrix2)arg1) → Matrix2 :¶ - C++ signature :
- TOOLS::Matrix2 inverse(TOOLS::Matrix2)
-
isOrthogonal((Matrix2)arg1) → bool :¶ - C++ signature :
- bool isOrthogonal(TOOLS::Matrix2 {lvalue})
-
isSingular((Matrix2)arg1) → bool :¶ - C++ signature :
- bool isSingular(TOOLS::Matrix2 {lvalue})
-
isValid((Matrix2)arg1) → bool :¶ - C++ signature :
- bool isValid(TOOLS::Matrix2 {lvalue})
-
static
linearTransformation((Vector2)i1, (Vector2)j1, (Vector2)i2, (Vector2)j2) → Matrix2 :¶ - C++ signature :
- TOOLS::Matrix2 linearTransformation(TOOLS::Vector2,TOOLS::Vector2,TOOLS::Vector2,TOOLS::Vector2)
-
static
rotation((float)angle) → Matrix2 :¶ - C++ signature :
- TOOLS::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(TOOLS::Matrix2)
-
trace((Matrix2)arg1) → float :¶ - C++ signature :
- double trace(TOOLS::Matrix2)
-
transpose((Matrix2)arg1) → Matrix2 :¶ - C++ signature :
- TOOLS::Matrix2 transpose(TOOLS::Matrix2)
-
-
class
openalea.plantgl.math._pglmath.Matrix3¶ -
IDENTITY= Matrix3( 1, 0, 0 , 0, 1, 0 , 0, 0, 1 )¶
-
adjoint((Matrix3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 adjoint(TOOLS::Matrix3)
-
static
axisRotation((Vector3)arg1, (float)arg2) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 axisRotation(TOOLS::Vector3,double)
-
data((Matrix3)arg1) → list :¶ - C++ signature :
- boost::python::list data(TOOLS::Matrix3)
-
det((Matrix3)arg1) → float :¶ - C++ signature :
- double det(TOOLS::Matrix3)
-
eulerAnglesXYZ((Matrix3)arg1) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 eulerAnglesXYZ(TOOLS::Matrix3 {lvalue})
-
eulerAnglesZYX((Matrix3)arg1) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 eulerAnglesZYX(TOOLS::Matrix3 {lvalue})
-
static
eulerRotationXYZ((Vector3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 eulerRotationXYZ(TOOLS::Vector3)
-
static
eulerRotationZYX((Vector3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 eulerRotationZYX(TOOLS::Vector3)
-
getColumn((Matrix3)arg1, (int)arg2) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 getColumn(TOOLS::Matrix3 {lvalue},unsigned char)
-
getDiagonal((Matrix3)arg1) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 getDiagonal(TOOLS::Matrix3 {lvalue})
-
getRow((Matrix3)arg1, (int)arg2) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 getRow(TOOLS::Matrix3 {lvalue},unsigned char)
-
inverse((Matrix3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 inverse(TOOLS::Matrix3)
-
isOrthogonal((Matrix3)arg1) → bool :¶ - C++ signature :
- bool isOrthogonal(TOOLS::Matrix3 {lvalue})
-
isSingular((Matrix3)arg1) → bool :¶ - C++ signature :
- bool isSingular(TOOLS::Matrix3 {lvalue})
-
isValid((Matrix3)arg1) → bool :¶ - C++ signature :
- bool isValid(TOOLS::Matrix3 {lvalue})
-
static
scaling((Vector3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 scaling(TOOLS::Vector3)
scaling( (float)arg1) -> Matrix3 :
- C++ signature :
- TOOLS::Matrix3 scaling(double)
-
toAxisAngle((Matrix3)arg1) → object :¶ - C++ signature :
- boost::python::api::object toAxisAngle(TOOLS::Matrix3 const*)
-
trace((Matrix3)arg1) → float :¶ - C++ signature :
- double trace(TOOLS::Matrix3)
-
transpose((Matrix3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 transpose(TOOLS::Matrix3)
-
-
class
openalea.plantgl.math._pglmath.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 :
- TOOLS::Matrix4 adjoint(TOOLS::Matrix4)
-
data((Matrix4)arg1) → list :¶ - C++ signature :
- boost::python::list data(TOOLS::Matrix4)
-
det((Matrix4)arg1) → float :¶ - C++ signature :
- double det(TOOLS::Matrix4)
-
getColumn((Matrix4)arg1, (int)arg2) → Vector4 :¶ - C++ signature :
- TOOLS::Vector4 getColumn(TOOLS::Matrix4 {lvalue},unsigned char)
-
getDiagonal((Matrix4)arg1) → Vector4 :¶ - C++ signature :
- TOOLS::Vector4 getDiagonal(TOOLS::Matrix4 {lvalue})
-
getRow((Matrix4)arg1, (int)arg2) → Vector4 :¶ - C++ signature :
- TOOLS::Vector4 getRow(TOOLS::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(TOOLS::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(TOOLS::Matrix4*)
-
getTransformationB((Matrix4)arg1) → tuple :¶ Alternative method to getTransformation.
- C++ signature :
- boost::python::tuple getTransformationB(TOOLS::Matrix4*)
-
inverse((Matrix4)arg1) → Matrix4 :¶ - C++ signature :
- TOOLS::Matrix4 inverse(TOOLS::Matrix4)
-
isOrthogonal((Matrix4)arg1) → bool :¶ - C++ signature :
- bool isOrthogonal(TOOLS::Matrix4 {lvalue})
-
isSingular((Matrix4)arg1) → bool :¶ - C++ signature :
- bool isSingular(TOOLS::Matrix4 {lvalue})
-
isValid((Matrix4)arg1) → bool :¶ - C++ signature :
- bool isValid(TOOLS::Matrix4 {lvalue})
-
set((Matrix4)arg1, (tuple)arg2) → None :¶ - C++ signature :
- void set(TOOLS::Matrix4 {lvalue},boost::python::tuple)
-
setTransformation((Matrix4)arg1, (Vector3)arg2, (Vector3)arg3, (Vector3)arg4) → None :¶ - C++ signature :
- void setTransformation(TOOLS::Matrix4 {lvalue},TOOLS::Vector3,TOOLS::Vector3,TOOLS::Vector3)
-
setTransformation2((Matrix4)arg1, (Vector3)arg2, (Vector3)arg3, (Vector3)arg4) → None :¶ - C++ signature :
- void setTransformation2(TOOLS::Matrix4 {lvalue},TOOLS::Vector3,TOOLS::Vector3,TOOLS::Vector3)
-
trace((Matrix4)arg1) → float :¶ - C++ signature :
- double trace(TOOLS::Matrix4)
-
static
translation((Vector3)arg1) → Matrix4 :¶ - C++ signature :
- TOOLS::Matrix4 translation(TOOLS::Vector3)
-
transpose((Matrix4)arg1) → Matrix4 :¶ - C++ signature :
- TOOLS::Matrix4 transpose(TOOLS::Matrix4)
-
-
class
openalea.plantgl.math._pglmath.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(TOOLS::Vector2::Polar {lvalue})
-
radius¶
-
theta¶
-
-
getMaxAbsCoord((Vector2)arg1) → int :¶ Returns the index of the maximum absolute coordinate.
- C++ signature :
- int getMaxAbsCoord(TOOLS::Vector2 {lvalue})
-
getMinAbsCoord((Vector2)arg1) → int :¶ Returns the index of the minimum absolute coordinate.
- C++ signature :
- int getMinAbsCoord(TOOLS::Vector2 {lvalue})
-
isNormalized((Vector2)arg1) → bool :¶ Returns whether self is normalized.
- C++ signature :
- bool isNormalized(TOOLS::Vector2 {lvalue})
-
isOrthogonalTo((Vector2)arg1, (Vector2)v) → bool :¶ Returns whether self is orthogonal to v.
- C++ signature :
- bool isOrthogonalTo(TOOLS::Vector2 {lvalue},TOOLS::Vector2)
-
isValid((Vector2)arg1) → bool :¶ Returns whether self is valid.
- C++ signature :
- bool isValid(TOOLS::Vector2 {lvalue})
-
normalize((Vector2)arg1) → float :¶ Normalizes self and returns the norm before.
- C++ signature :
- double normalize(TOOLS::Vector2 {lvalue})
-
normed((Vector2)arg1) → Vector2 :¶ Return a normed version of self.
- C++ signature :
- TOOLS::Vector2 normed(TOOLS::Vector2 {lvalue})
-
x¶
-
y¶
-
-
class
openalea.plantgl.math._pglmath.Vector3¶ -
class
Cylindrical¶ -
isValid((Cylindrical)arg1) → bool :¶ Returns whether self is valid.
- C++ signature :
- bool isValid(TOOLS::Vector3::Cylindrical {lvalue})
-
radius¶
-
theta¶
-
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(TOOLS::Vector3::Spherical {lvalue})
-
phi¶
-
radius¶
-
spherical_distance((Spherical)arg1, (float)arg2, (float)arg3) → float :¶ - C++ signature :
- double spherical_distance(TOOLS::Vector3::Spherical {lvalue},double,double)
-
theta¶
-
-
anOrthogonalVector((Vector3)arg1) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 anOrthogonalVector(TOOLS::Vector3 {lvalue})
-
anisotropicNorm((Vector3)arg1, (Vector3)arg2) → float :¶ - C++ signature :
- double anisotropicNorm(TOOLS::Vector3,TOOLS::Vector3)
-
getMaxAbsCoord((Vector3)arg1) → int :¶ Returns the index of the maximum absolute coordinate.
- C++ signature :
- int getMaxAbsCoord(TOOLS::Vector3 {lvalue})
-
getMinAbsCoord((Vector3)arg1) → int :¶ Returns the index of the minimum absolute coordinate.
- C++ signature :
- int getMinAbsCoord(TOOLS::Vector3 {lvalue})
-
isNormalized((Vector3)arg1) → bool :¶ Returns whether self is normalized.
- C++ signature :
- bool isNormalized(TOOLS::Vector3 {lvalue})
-
isOrthogonalTo((Vector3)arg1, (Vector3)v) → bool :¶ Returns whether self is orthogonal to v.
- C++ signature :
- bool isOrthogonalTo(TOOLS::Vector3 {lvalue},TOOLS::Vector3)
-
isValid((Vector3)arg1) → bool :¶ Returns whether self is valid.
- C++ signature :
- bool isValid(TOOLS::Vector3 {lvalue})
-
normalize((Vector3)arg1) → float :¶ Normalizes self and returns the norm before.
- C++ signature :
- double normalize(TOOLS::Vector3 {lvalue})
-
normed((Vector3)arg1) → Vector3 :¶ Return a normed version of self.
- C++ signature :
- TOOLS::Vector3 normed(TOOLS::Vector3 {lvalue})
-
project((Vector3)arg1) → Vector2 :¶ - C++ signature :
- TOOLS::Vector2 project(TOOLS::Vector3 {lvalue})
-
radialAnisotropicNorm((Vector3)arg1, (Vector3)arg2, (float)arg3, (float)arg4) → float :¶ - C++ signature :
- double radialAnisotropicNorm(TOOLS::Vector3,TOOLS::Vector3,double,double)
-
x¶
-
y¶
-
z¶
-
class
-
class
openalea.plantgl.math._pglmath.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)¶
-
getMaxAbsCoord((Vector4)arg1) → int :¶ Returns the index of the maximum absolute coordinate.
- C++ signature :
- int getMaxAbsCoord(TOOLS::Vector4 {lvalue})
-
getMinAbsCoord((Vector4)arg1) → int :¶ Returns the index of the minimum absolute coordinate.
- C++ signature :
- int getMinAbsCoord(TOOLS::Vector4 {lvalue})
-
isNormalized((Vector4)arg1) → bool :¶ Returns whether self is normalized.
- C++ signature :
- bool isNormalized(TOOLS::Vector4 {lvalue})
-
isOrthogonalTo((Vector4)arg1, (Vector4)v) → bool :¶ Returns whether self is orthogonal to v.
- C++ signature :
- bool isOrthogonalTo(TOOLS::Vector4 {lvalue},TOOLS::Vector4)
-
isValid((Vector4)arg1) → bool :¶ Returns whether self is valid.
- C++ signature :
- bool isValid(TOOLS::Vector4 {lvalue})
-
normalize((Vector4)arg1) → float :¶ Normalizes self and returns the norm before.
- C++ signature :
- double normalize(TOOLS::Vector4 {lvalue})
-
normed((Vector4)arg1) → Vector4 :¶ Return a normed version of self.
- C++ signature :
- TOOLS::Vector4 normed(TOOLS::Vector4 {lvalue})
-
project((Vector4)arg1) → Vector3 :¶ - C++ signature :
- TOOLS::Vector3 project(TOOLS::Vector4 {lvalue})
-
w¶
-
x¶
-
y¶
-
z¶
-
-
openalea.plantgl.math._pglmath.angle((Vector2)v1, (Vector2)v2) → float :¶ The angle between v1 and v2
- C++ signature :
- double angle(TOOLS::Vector2,TOOLS::Vector2)
- angle( (Vector3)v1, (Vector3)v2) -> float :
The angle between v1 and v2
- C++ signature :
- double angle(TOOLS::Vector3,TOOLS::Vector3)
- angle( (Vector3)v1, (Vector3)v2, (Vector3)axis) -> float :
The angle around axis between v1 and v2
- C++ signature :
- double angle(TOOLS::Vector3,TOOLS::Vector3,TOOLS::Vector3)
-
openalea.plantgl.math._pglmath.axisRotation((Vector3)arg1, (float)arg2) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 axisRotation(TOOLS::Vector3,double)
-
openalea.plantgl.math._pglmath.cross((Vector2)v1, (Vector2)v2) → float :¶ The cross product of v1 and v2
- C++ signature :
- double cross(TOOLS::Vector2,TOOLS::Vector2)
- cross( (Vector3)v1, (Vector3)v2) -> Vector3 :
The cross product of v1 and v2
- C++ signature :
- TOOLS::Vector3 cross(TOOLS::Vector3,TOOLS::Vector3)
- cross( (Vector3)v1, (Vector3)v2) -> Vector3 :
The cross product of v1 and v2
- C++ signature :
- TOOLS::Vector3 cross(TOOLS::Vector3,TOOLS::Vector3)
-
openalea.plantgl.math._pglmath.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)
-
openalea.plantgl.math._pglmath.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)
-
openalea.plantgl.math._pglmath.eulerRotationXYZ((Vector3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 eulerRotationXYZ(TOOLS::Vector3)
-
openalea.plantgl.math._pglmath.eulerRotationZYX((Vector3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 eulerRotationZYX(TOOLS::Vector3)
-
openalea.plantgl.math._pglmath.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( (float)arg1, (float)arg2 [, (float)arg3 [, (float)arg4 [, (float)arg5 [, (float)arg6 [, (float)arg7 [, (float)arg8 [, (float)arg9 [, (float)arg10 [, (float)arg11 [, (float)arg12 [, (float)arg13 [, (float)arg14 [, (float)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
- double norm(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
-
openalea.plantgl.math._pglmath.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( (float)arg1, (float)arg2 [, (float)arg3 [, (float)arg4 [, (float)arg5 [, (float)arg6 [, (float)arg7 [, (float)arg8 [, (float)arg9 [, (float)arg10 [, (float)arg11 [, (float)arg12 [, (float)arg13 [, (float)arg14 [, (float)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
- double normL1(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
-
openalea.plantgl.math._pglmath.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( (float)arg1, (float)arg2 [, (float)arg3 [, (float)arg4 [, (float)arg5 [, (float)arg6 [, (float)arg7 [, (float)arg8 [, (float)arg9 [, (float)arg10 [, (float)arg11 [, (float)arg12 [, (float)arg13 [, (float)arg14 [, (float)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
- double normLinf(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
-
openalea.plantgl.math._pglmath.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( (float)arg1, (float)arg2 [, (float)arg3 [, (float)arg4 [, (float)arg5 [, (float)arg6 [, (float)arg7 [, (float)arg8 [, (float)arg9 [, (float)arg10 [, (float)arg11 [, (float)arg12 [, (float)arg13 [, (float)arg14 [, (float)arg15]]]]]]]]]]]]]) -> float :
- C++ signature :
- double normSquared(double,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double [,double]]]]]]]]]]]]])
-
openalea.plantgl.math._pglmath.scaling((Vector3)arg1) → Matrix3 :¶ - C++ signature :
- TOOLS::Matrix3 scaling(TOOLS::Vector3)
-
openalea.plantgl.math._pglmath.spherical_distance((float)theta1, (float)phi1, (float)theta2, (float)phi2, (float)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)
-
openalea.plantgl.math._pglmath.strain((Matrix2)transformation) → Matrix2 :¶ Return the engineering strain associated to the transformation
- C++ signature :
- TOOLS::Matrix2 strain(TOOLS::Matrix2)
strain( (Vector2)i1, (Vector2)j1, (Vector2)i2, (Vector2)j2) -> Matrix2 :
- C++ signature :
- TOOLS::Matrix2 strain(TOOLS::Vector2,TOOLS::Vector2,TOOLS::Vector2,TOOLS::Vector2)
-
openalea.plantgl.math._pglmath.stress((Matrix2)strain, (Matrix3)material) → Matrix2 :¶ Return the stress associated to a given strain using Hook’s law
- C++ signature :
- TOOLS::Matrix2 stress(TOOLS::Matrix2,TOOLS::Matrix3)
