EggTransform
from panda3d.egg import EggTransform
- class EggTransform
Bases:
DTOOL_SUPER_BASE
This represents the <Transform> entry of a group or texture node: a list of component transform operations, applied in order, that describe a net transform matrix.
This may be either a 3-d transform, and therefore described by a 4x4 matrix, or a 2-d transform, described by a 3x3 matrix.
Inheritance diagram
- CTInvalid = 0
- CTMatrix3 = 11
- CTMatrix4 = 12
- CTRotate2d = 3
- CTRotate3d = 7
- CTRotx = 4
- CTRoty = 5
- CTRotz = 6
- CTScale2d = 8
- CTScale3d = 9
- CTTranslate2d = 1
- CTTranslate3d = 2
- CTUniformScale = 10
- CT_invalid = 0
- CT_matrix3 = 11
- CT_matrix4 = 12
- CT_rotate2d = 3
- CT_rotate3d = 7
- CT_rotx = 4
- CT_roty = 5
- CT_rotz = 6
- CT_scale2d = 8
- CT_scale3d = 9
- CT_translate2d = 1
- CT_translate3d = 2
- CT_uniform_scale = 10
- __init__(*args, **kwargs)
- addMatrix3()
C++ Interface: add_matrix3(const EggTransform self, const LMatrix3d mat)
- /**
Appends an arbitrary 3x3 matrix to the current transform.
*/
- addMatrix4()
C++ Interface: add_matrix4(const EggTransform self, const LMatrix4d mat)
- /**
Appends an arbitrary 4x4 matrix to the current transform.
*/
- addRotate2d()
C++ Interface: add_rotate2d(const EggTransform self, double angle)
- /**
Appends a 2-d rotation to the current transform. The rotation angle is
specified in degrees counterclockwise about the origin.
*/
- addRotate3d()
C++ Interface: add_rotate3d(const EggTransform self, const LQuaterniond quat) add_rotate3d(const EggTransform self, double angle, const LVector3d axis)
- /**
Appends a 3-d rotation about an arbitrary axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
*/
- /**
Appends an arbitrary 3-d rotation to the current transform, expressed as a
quaternion. This is converted to axis-angle notation for the egg file.
*/
- addRotx()
C++ Interface: add_rotx(const EggTransform self, double angle)
- /**
Appends a rotation about the X axis to the current transform. The rotation
angle is specified in degrees counterclockwise about the axis.
*/
- addRoty()
C++ Interface: add_roty(const EggTransform self, double angle)
- /**
Appends a rotation about the Y axis to the current transform. The rotation
angle is specified in degrees counterclockwise about the axis.
*/
- addRotz()
C++ Interface: add_rotz(const EggTransform self, double angle)
- /**
Appends a rotation about the Z axis to the current transform. The rotation
angle is specified in degrees counterclockwise about the axis.
*/
- addScale2d()
C++ Interface: add_scale2d(const EggTransform self, const LVecBase2d scale)
- /**
Appends a possibly non-uniform scale to the current transform.
*/
- addScale3d()
C++ Interface: add_scale3d(const EggTransform self, const LVecBase3d scale)
- /**
Appends a possibly non-uniform scale to the current transform.
*/
- addTranslate2d()
C++ Interface: add_translate2d(const EggTransform self, const LVector2d translate)
- /**
Appends a 2-d translation operation to the current transform.
*/
- addTranslate3d()
C++ Interface: add_translate3d(const EggTransform self, const LVector3d translate)
- /**
Appends a 3-d translation operation to the current transform.
*/
- addUniformScale()
C++ Interface: add_uniform_scale(const EggTransform self, double scale)
- /**
Appends a uniform scale to the current transform.
*/
- add_matrix3()
C++ Interface: add_matrix3(const EggTransform self, const LMatrix3d mat)
- /**
Appends an arbitrary 3x3 matrix to the current transform.
*/
- add_matrix4()
C++ Interface: add_matrix4(const EggTransform self, const LMatrix4d mat)
- /**
Appends an arbitrary 4x4 matrix to the current transform.
*/
- add_rotate2d()
C++ Interface: add_rotate2d(const EggTransform self, double angle)
- /**
Appends a 2-d rotation to the current transform. The rotation angle is
specified in degrees counterclockwise about the origin.
*/
- add_rotate3d()
C++ Interface: add_rotate3d(const EggTransform self, const LQuaterniond quat) add_rotate3d(const EggTransform self, double angle, const LVector3d axis)
- /**
Appends a 3-d rotation about an arbitrary axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
*/
- /**
Appends an arbitrary 3-d rotation to the current transform, expressed as a
quaternion. This is converted to axis-angle notation for the egg file.
*/
- add_rotx()
C++ Interface: add_rotx(const EggTransform self, double angle)
- /**
Appends a rotation about the X axis to the current transform. The rotation
angle is specified in degrees counterclockwise about the axis.
*/
- add_roty()
C++ Interface: add_roty(const EggTransform self, double angle)
- /**
Appends a rotation about the Y axis to the current transform. The rotation
angle is specified in degrees counterclockwise about the axis.
*/
- add_rotz()
C++ Interface: add_rotz(const EggTransform self, double angle)
- /**
Appends a rotation about the Z axis to the current transform. The rotation
angle is specified in degrees counterclockwise about the axis.
*/
- add_scale2d()
C++ Interface: add_scale2d(const EggTransform self, const LVecBase2d scale)
- /**
Appends a possibly non-uniform scale to the current transform.
*/
- add_scale3d()
C++ Interface: add_scale3d(const EggTransform self, const LVecBase3d scale)
- /**
Appends a possibly non-uniform scale to the current transform.
*/
- add_translate2d()
C++ Interface: add_translate2d(const EggTransform self, const LVector2d translate)
- /**
Appends a 2-d translation operation to the current transform.
*/
- add_translate3d()
C++ Interface: add_translate3d(const EggTransform self, const LVector3d translate)
- /**
Appends a 3-d translation operation to the current transform.
*/
- add_uniform_scale()
C++ Interface: add_uniform_scale(const EggTransform self, double scale)
- /**
Appends a uniform scale to the current transform.
*/
- clearTransform()
C++ Interface: clear_transform(const EggTransform self)
- /**
Resets the transform to empty, identity.
*/
- clear_transform()
C++ Interface: clear_transform(const EggTransform self)
- /**
Resets the transform to empty, identity.
*/
- getComponentMat3()
C++ Interface: get_component_mat3(EggTransform self, int n)
- /**
Returns the 3x3 matrix associated with the nth component. It is an error
to call this if the component type is not CT_matrix3.
*/
- getComponentMat4()
C++ Interface: get_component_mat4(EggTransform self, int n)
- /**
Returns the 4x4 matrix associated with the nth component. It is an error
to call this if the component type is not CT_matrix4.
*/
- getComponentNumber()
C++ Interface: get_component_number(EggTransform self, int n)
- /**
Returns the solitary number associated with the nth component. In the case
of a rotation, this is the angle in degrees to rotate; in the case of
uniform scale, this is the amount of the scale. Other types do not use
this property.
*/
- getComponentType()
C++ Interface: get_component_type(EggTransform self, int n)
- /**
Returns the type of the nth component.
*/
- getComponentVec2()
C++ Interface: get_component_vec2(EggTransform self, int n)
- /**
Returns the 2-component vector associated with the nth component. This may
be the translate vector, rotate axis, or non-uniform scale. It is an error
to call this if the component type does not use a 2-d vector property.
*/
- getComponentVec3()
C++ Interface: get_component_vec3(EggTransform self, int n)
- /**
Returns the 3-component vector associated with the nth component. This may
be the translate vector, rotate axis, or non-uniform scale. It is an error
to call this if the component type does not use a 3-d vector property.
*/
- getNumComponents()
C++ Interface: get_num_components(EggTransform self)
- /**
Returns the number of components that make up the transform.
*/
- getTransform2d()
C++ Interface: get_transform2d(EggTransform self)
- /**
Returns the overall transform as a 3x3 matrix. It is an error to call this
if has_transform3d() is true.
*/
- getTransform3d()
C++ Interface: get_transform3d(EggTransform self)
- /**
Returns the overall transform as a 4x4 matrix. It is valid to call this
even if has_transform2d() is true; in this case, the 3x3 transform will be
expanded to a 4x4 matrix.
*/
- get_component_mat3()
C++ Interface: get_component_mat3(EggTransform self, int n)
- /**
Returns the 3x3 matrix associated with the nth component. It is an error
to call this if the component type is not CT_matrix3.
*/
- get_component_mat4()
C++ Interface: get_component_mat4(EggTransform self, int n)
- /**
Returns the 4x4 matrix associated with the nth component. It is an error
to call this if the component type is not CT_matrix4.
*/
- get_component_number()
C++ Interface: get_component_number(EggTransform self, int n)
- /**
Returns the solitary number associated with the nth component. In the case
of a rotation, this is the angle in degrees to rotate; in the case of
uniform scale, this is the amount of the scale. Other types do not use
this property.
*/
- get_component_type()
C++ Interface: get_component_type(EggTransform self, int n)
- /**
Returns the type of the nth component.
*/
- get_component_vec2()
C++ Interface: get_component_vec2(EggTransform self, int n)
- /**
Returns the 2-component vector associated with the nth component. This may
be the translate vector, rotate axis, or non-uniform scale. It is an error
to call this if the component type does not use a 2-d vector property.
*/
- get_component_vec3()
C++ Interface: get_component_vec3(EggTransform self, int n)
- /**
Returns the 3-component vector associated with the nth component. This may
be the translate vector, rotate axis, or non-uniform scale. It is an error
to call this if the component type does not use a 3-d vector property.
*/
- get_num_components()
C++ Interface: get_num_components(EggTransform self)
- /**
Returns the number of components that make up the transform.
*/
- get_transform2d()
C++ Interface: get_transform2d(EggTransform self)
- /**
Returns the overall transform as a 3x3 matrix. It is an error to call this
if has_transform3d() is true.
*/
- get_transform3d()
C++ Interface: get_transform3d(EggTransform self)
- /**
Returns the overall transform as a 4x4 matrix. It is valid to call this
even if has_transform2d() is true; in this case, the 3x3 transform will be
expanded to a 4x4 matrix.
*/
- hasTransform()
C++ Interface: has_transform(EggTransform self)
- /**
Returns true if the transform is nonempty, false if it is empty (no
transform components have been added). This is true for either a 2-d or a
3-d transform.
*/
- hasTransform2d()
C++ Interface: has_transform2d(EggTransform self)
- /**
Returns true if the transform is specified as a 2-d transform, e.g. with a
3x3 matrix, or false if it is specified as a 3-d transform (with a 4x4
matrix), or not specified at all.
Normally, EggTextures have a 2-d matrix (but occasionally they use a 3-d
matrix), and EggGroups always have a 3-d matrix.
*/
- hasTransform3d()
C++ Interface: has_transform3d(EggTransform self)
- /**
Returns true if the transform is specified as a 3-d transform, e.g. with a
4x4 matrix, or false if it is specified as a 2-d transform (with a 2x2
matrix), or not specified at all.
Normally, EggTextures have a 3-d matrix (but occasionally they use a 3-d
matrix), and EggGroups always have a 3-d matrix.
*/
- has_transform()
C++ Interface: has_transform(EggTransform self)
- /**
Returns true if the transform is nonempty, false if it is empty (no
transform components have been added). This is true for either a 2-d or a
3-d transform.
*/
- has_transform2d()
C++ Interface: has_transform2d(EggTransform self)
- /**
Returns true if the transform is specified as a 2-d transform, e.g. with a
3x3 matrix, or false if it is specified as a 3-d transform (with a 4x4
matrix), or not specified at all.
Normally, EggTextures have a 2-d matrix (but occasionally they use a 3-d
matrix), and EggGroups always have a 3-d matrix.
*/
- has_transform3d()
C++ Interface: has_transform3d(EggTransform self)
- /**
Returns true if the transform is specified as a 3-d transform, e.g. with a
4x4 matrix, or false if it is specified as a 2-d transform (with a 2x2
matrix), or not specified at all.
Normally, EggTextures have a 3-d matrix (but occasionally they use a 3-d
matrix), and EggGroups always have a 3-d matrix.
*/
- setTransform2d()
C++ Interface: set_transform2d(const EggTransform self, const LMatrix3d mat)
- /**
Sets the overall transform as a 3x3 matrix. This completely replaces
whatever componentwise transform may have been defined.
*/
- setTransform3d()
C++ Interface: set_transform3d(const EggTransform self, const LMatrix4d mat)
- /**
Sets the overall transform as a 4x4 matrix. This completely replaces
whatever componentwise transform may have been defined.
*/
- set_transform2d()
C++ Interface: set_transform2d(const EggTransform self, const LMatrix3d mat)
- /**
Sets the overall transform as a 3x3 matrix. This completely replaces
whatever componentwise transform may have been defined.
*/
- set_transform3d()
C++ Interface: set_transform3d(const EggTransform self, const LMatrix4d mat)
- /**
Sets the overall transform as a 4x4 matrix. This completely replaces
whatever componentwise transform may have been defined.
*/
- transformIsIdentity()
C++ Interface: transform_is_identity(EggTransform self)
- /**
Returns true if the described transform is identity, false otherwise.
*/