LQuaterniond
from panda3d.core import LQuaterniond
- class LQuaterniond
Bases:
LVecBase4d
This is the base quaternion class
Inheritance diagram
- __init__(*args, **kwargs)
- almostEqual()
C++ Interface: almost_equal(LQuaterniond self, const LQuaterniond other) almost_equal(LQuaterniond self, const LQuaterniond other, double threshold)
- almostSameDirection()
C++ Interface: almost_same_direction(LQuaterniond self, const LQuaterniond other, double threshold)
- /**
Returns true if two quaternions represent the same rotation within a
specified tolerance.
*/
- almost_equal()
C++ Interface: almost_equal(LQuaterniond self, const LQuaterniond other) almost_equal(LQuaterniond self, const LQuaterniond other, double threshold)
- almost_same_direction()
C++ Interface: almost_same_direction(LQuaterniond self, const LQuaterniond other, double threshold)
- /**
Returns true if two quaternions represent the same rotation within a
specified tolerance.
*/
- angleDeg()
C++ Interface: angle_deg(LQuaterniond self, const LQuaterniond other)
- /**
Returns the angle between the orientation represented by this quaternion
and the other one, expressed in degrees.
*/
- angleRad()
C++ Interface: angle_rad(LQuaterniond self, const LQuaterniond other)
- /**
Returns the angle between the orientation represented by this quaternion
and the other one, expressed in radians.
*/
- angle_deg()
C++ Interface: angle_deg(LQuaterniond self, const LQuaterniond other)
- /**
Returns the angle between the orientation represented by this quaternion
and the other one, expressed in degrees.
*/
- angle_rad()
C++ Interface: angle_rad(LQuaterniond self, const LQuaterniond other)
- /**
Returns the angle between the orientation represented by this quaternion
and the other one, expressed in radians.
*/
- conjugate()
C++ Interface: conjugate(LQuaterniond self)
- /**
Returns the complex conjugate of this quat.
*/
- conjugateFrom()
C++ Interface: conjugate_from(const LQuaterniond self, const LQuaterniond other)
- /**
Computes the conjugate of the other quat, and stores the result in this
quat. This is a fully general operation and makes no assumptions about the
type of transform represented by the quat.
The other quat must be a different object than this quat. However, if you
need to get a conjugate of a quat in place, see conjugate_in_place.
The return value is true if the quat was successfully inverted, false if
there was a singularity.
*/
- conjugateInPlace()
C++ Interface: conjugate_in_place(const LQuaterniond self)
- /**
Sets this to be the conjugate of the current quat. Returns true if the
successful, false if the quat was singular.
*/
- conjugate_from()
C++ Interface: conjugate_from(const LQuaterniond self, const LQuaterniond other)
- /**
Computes the conjugate of the other quat, and stores the result in this
quat. This is a fully general operation and makes no assumptions about the
type of transform represented by the quat.
The other quat must be a different object than this quat. However, if you
need to get a conjugate of a quat in place, see conjugate_in_place.
The return value is true if the quat was successfully inverted, false if
there was a singularity.
*/
- conjugate_in_place()
C++ Interface: conjugate_in_place(const LQuaterniond self)
- /**
Sets this to be the conjugate of the current quat. Returns true if the
successful, false if the quat was singular.
*/
- extractToMatrix()
C++ Interface: extract_to_matrix(LQuaterniond self, LMatrix4d m) extract_to_matrix(LQuaterniond self, LMatrix3d m)
- extract_to_matrix()
C++ Interface: extract_to_matrix(LQuaterniond self, LMatrix4d m) extract_to_matrix(LQuaterniond self, LMatrix3d m)
- getAngle()
C++ Interface: get_angle(LQuaterniond self)
- /**
This, along with get_axis(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the angle, in
degrees counterclockwise about the axis.
It is necessary to ensure the quaternion has been normalized (for instance,
with a call to normalize()) before calling this method.
*/
- getAngleRad()
C++ Interface: get_angle_rad(LQuaterniond self)
- /**
This, along with get_axis(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the angle, in
radians counterclockwise about the axis.
It is necessary to ensure the quaternion has been normalized (for instance,
with a call to normalize()) before calling this method.
*/
- getAxis()
C++ Interface: get_axis(LQuaterniond self)
- /**
This, along with get_angle(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the axis; it
is not normalized.
*/
- getAxisNormalized()
C++ Interface: get_axis_normalized(LQuaterniond self)
- /**
This, along with get_angle(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the
normalized axis.
*/
- getClassType()
C++ Interface: get_class_type()
- getForward()
C++ Interface: get_forward(LQuaterniond self, int cs)
- /**
Returns the orientation represented by this quaternion, expressed as a
forward vector.
*/
- getHpr()
C++ Interface: get_hpr(LQuaterniond self, int cs)
- /**
Extracts the equivalent Euler angles from the unit quaternion.
*/
- getRight()
C++ Interface: get_right(LQuaterniond self, int cs)
- /**
Returns the orientation represented by this quaternion, expressed as a
right vector.
*/
- getUp()
C++ Interface: get_up(LQuaterniond self, int cs)
- /**
Returns the orientation represented by this quaternion, expressed as an up
vector.
*/
- get_angle()
C++ Interface: get_angle(LQuaterniond self)
- /**
This, along with get_axis(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the angle, in
degrees counterclockwise about the axis.
It is necessary to ensure the quaternion has been normalized (for instance,
with a call to normalize()) before calling this method.
*/
- get_angle_rad()
C++ Interface: get_angle_rad(LQuaterniond self)
- /**
This, along with get_axis(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the angle, in
radians counterclockwise about the axis.
It is necessary to ensure the quaternion has been normalized (for instance,
with a call to normalize()) before calling this method.
*/
- get_axis()
C++ Interface: get_axis(LQuaterniond self)
- /**
This, along with get_angle(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the axis; it
is not normalized.
*/
- get_axis_normalized()
C++ Interface: get_axis_normalized(LQuaterniond self)
- /**
This, along with get_angle(), returns the rotation represented by the
quaternion as an angle about an arbitrary axis. This returns the
normalized axis.
*/
- get_class_type()
C++ Interface: get_class_type()
- get_forward()
C++ Interface: get_forward(LQuaterniond self, int cs)
- /**
Returns the orientation represented by this quaternion, expressed as a
forward vector.
*/
- get_hpr()
C++ Interface: get_hpr(LQuaterniond self, int cs)
- /**
Extracts the equivalent Euler angles from the unit quaternion.
*/
- get_right()
C++ Interface: get_right(LQuaterniond self, int cs)
- /**
Returns the orientation represented by this quaternion, expressed as a
right vector.
*/
- get_up()
C++ Interface: get_up(LQuaterniond self, int cs)
- /**
Returns the orientation represented by this quaternion, expressed as an up
vector.
*/
- invertFrom()
C++ Interface: invert_from(const LQuaterniond self, const LQuaterniond other)
- /**
Computes the inverse of the other quat, and stores the result in this quat.
This is a fully general operation and makes no assumptions about the type
of transform represented by the quat.
The other quat must be a different object than this quat. However, if you
need to invert a quat in place, see invert_in_place.
The return value is true if the quat was successfully inverted, false if
there was a singularity.
*/
- invertInPlace()
C++ Interface: invert_in_place(const LQuaterniond self)
- /**
Inverts the current quat. Returns true if the inverse is successful, false
if the quat was singular.
*/
- invert_from()
C++ Interface: invert_from(const LQuaterniond self, const LQuaterniond other)
- /**
Computes the inverse of the other quat, and stores the result in this quat.
This is a fully general operation and makes no assumptions about the type
of transform represented by the quat.
The other quat must be a different object than this quat. However, if you
need to invert a quat in place, see invert_in_place.
The return value is true if the quat was successfully inverted, false if
there was a singularity.
*/
- invert_in_place()
C++ Interface: invert_in_place(const LQuaterniond self)
- /**
Inverts the current quat. Returns true if the inverse is successful, false
if the quat was singular.
*/
- isAlmostIdentity()
C++ Interface: is_almost_identity(LQuaterniond self, double tolerance)
- /**
Returns true if this quaternion represents the identity transformation
within a given tolerance.
*/
- isIdentity()
C++ Interface: is_identity(LQuaterniond self)
- /**
Returns true if this quaternion represents the identity transformation: no
rotation.
*/
- isSameDirection()
C++ Interface: is_same_direction(LQuaterniond self, const LQuaterniond other)
- /**
Returns true if two quaternions represent the same rotation within a
default tolerance based on the numeric type.
*/
- is_almost_identity()
C++ Interface: is_almost_identity(LQuaterniond self, double tolerance)
- /**
Returns true if this quaternion represents the identity transformation
within a given tolerance.
*/
- is_identity()
C++ Interface: is_identity(LQuaterniond self)
- /**
Returns true if this quaternion represents the identity transformation: no
rotation.
*/
- is_same_direction()
C++ Interface: is_same_direction(LQuaterniond self, const LQuaterniond other)
- /**
Returns true if two quaternions represent the same rotation within a
default tolerance based on the numeric type.
*/
- multiply()
C++ Interface: multiply(LQuaterniond self, const LQuaterniond rhs)
- /**
actual multiply call (non virtual)
*/
- setFromAxisAngle()
C++ Interface: set_from_axis_angle(const LQuaterniond self, double angle_deg, const LVector3d axis)
- /**
angle_deg is the angle about the axis in degrees. axis must be normalized.
*/
- setFromAxisAngleRad()
C++ Interface: set_from_axis_angle_rad(const LQuaterniond self, double angle_rad, const LVector3d axis)
- /**
angle_rad is the angle about the axis in radians. axis must be normalized.
*/
- setFromMatrix()
C++ Interface: set_from_matrix(const LQuaterniond self, const LMatrix4d m) set_from_matrix(const LQuaterniond self, const LMatrix3d m)
- setHpr()
C++ Interface: set_hpr(const LQuaterniond self, const LVecBase3d hpr, int cs)
- /**
Sets the quaternion as the unit quaternion that is equivalent to these
Euler angles. (from Real-time Rendering, p.49)
*/
- set_from_axis_angle()
C++ Interface: set_from_axis_angle(const LQuaterniond self, double angle_deg, const LVector3d axis)
- /**
angle_deg is the angle about the axis in degrees. axis must be normalized.
*/
- set_from_axis_angle_rad()
C++ Interface: set_from_axis_angle_rad(const LQuaterniond self, double angle_rad, const LVector3d axis)
- /**
angle_rad is the angle about the axis in radians. axis must be normalized.
*/
- set_from_matrix()
C++ Interface: set_from_matrix(const LQuaterniond self, const LMatrix4d m) set_from_matrix(const LQuaterniond self, const LMatrix3d m)