LQuaternionf
from panda3d.core import LQuaternionf
- class LQuaternionf
- Bases: - LVecBase4f- This is the base quaternion class - Inheritance diagram - __init__(*args, **kwargs)
 - almostEqual()
- C++ Interface: almost_equal(LQuaternionf self, const LQuaternionf other) almost_equal(LQuaternionf self, const LQuaternionf other, float threshold) 
 - almostSameDirection()
- C++ Interface: almost_same_direction(LQuaternionf self, const LQuaternionf other, float threshold) - /**
- Returns true if two quaternions represent the same rotation within a 
- specified tolerance. 
 - */ 
 
 - almost_equal()
- C++ Interface: almost_equal(LQuaternionf self, const LQuaternionf other) almost_equal(LQuaternionf self, const LQuaternionf other, float threshold) 
 - almost_same_direction()
- C++ Interface: almost_same_direction(LQuaternionf self, const LQuaternionf other, float threshold) - /**
- Returns true if two quaternions represent the same rotation within a 
- specified tolerance. 
 - */ 
 
 - angleDeg()
- C++ Interface: angle_deg(LQuaternionf self, const LQuaternionf other) - /**
- Returns the angle between the orientation represented by this quaternion 
- and the other one, expressed in degrees. 
 - */ 
 
 - angleRad()
- C++ Interface: angle_rad(LQuaternionf self, const LQuaternionf other) - /**
- Returns the angle between the orientation represented by this quaternion 
- and the other one, expressed in radians. 
 - */ 
 
 - angle_deg()
- C++ Interface: angle_deg(LQuaternionf self, const LQuaternionf other) - /**
- Returns the angle between the orientation represented by this quaternion 
- and the other one, expressed in degrees. 
 - */ 
 
 - angle_rad()
- C++ Interface: angle_rad(LQuaternionf self, const LQuaternionf other) - /**
- Returns the angle between the orientation represented by this quaternion 
- and the other one, expressed in radians. 
 - */ 
 
 - conjugate()
- C++ Interface: conjugate(LQuaternionf self) - /**
- Returns the complex conjugate of this quat. 
 - */ 
 
 - conjugateFrom()
- C++ Interface: conjugate_from(const LQuaternionf self, const LQuaternionf 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 LQuaternionf 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 LQuaternionf self, const LQuaternionf 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 LQuaternionf 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(LQuaternionf self, LMatrix4f m) extract_to_matrix(LQuaternionf self, LMatrix3f m) 
 - extract_to_matrix()
- C++ Interface: extract_to_matrix(LQuaternionf self, LMatrix4f m) extract_to_matrix(LQuaternionf self, LMatrix3f m) 
 - getAngle()
- C++ Interface: get_angle(LQuaternionf 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(LQuaternionf 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(LQuaternionf 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(LQuaternionf 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(LQuaternionf self, int cs) - /**
- Returns the orientation represented by this quaternion, expressed as a 
- forward vector. 
 - */ 
 
 - getHpr()
- C++ Interface: get_hpr(LQuaternionf self, int cs) - /**
- Extracts the equivalent Euler angles from the unit quaternion. 
 - */ 
 
 - getRight()
- C++ Interface: get_right(LQuaternionf self, int cs) - /**
- Returns the orientation represented by this quaternion, expressed as a 
- right vector. 
 - */ 
 
 - getUp()
- C++ Interface: get_up(LQuaternionf self, int cs) - /**
- Returns the orientation represented by this quaternion, expressed as an up 
- vector. 
 - */ 
 
 - get_angle()
- C++ Interface: get_angle(LQuaternionf 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(LQuaternionf 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(LQuaternionf 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(LQuaternionf 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(LQuaternionf self, int cs) - /**
- Returns the orientation represented by this quaternion, expressed as a 
- forward vector. 
 - */ 
 
 - get_hpr()
- C++ Interface: get_hpr(LQuaternionf self, int cs) - /**
- Extracts the equivalent Euler angles from the unit quaternion. 
 - */ 
 
 - get_right()
- C++ Interface: get_right(LQuaternionf self, int cs) - /**
- Returns the orientation represented by this quaternion, expressed as a 
- right vector. 
 - */ 
 
 - get_up()
- C++ Interface: get_up(LQuaternionf self, int cs) - /**
- Returns the orientation represented by this quaternion, expressed as an up 
- vector. 
 - */ 
 
 - invertFrom()
- C++ Interface: invert_from(const LQuaternionf self, const LQuaternionf 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 LQuaternionf 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 LQuaternionf self, const LQuaternionf 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 LQuaternionf self) - /**
- Inverts the current quat. Returns true if the inverse is successful, false 
- if the quat was singular. 
 - */ 
 
 - isAlmostIdentity()
- C++ Interface: is_almost_identity(LQuaternionf self, float tolerance) - /**
- Returns true if this quaternion represents the identity transformation 
- within a given tolerance. 
 - */ 
 
 - isIdentity()
- C++ Interface: is_identity(LQuaternionf self) - /**
- Returns true if this quaternion represents the identity transformation: no 
- rotation. 
 - */ 
 
 - isSameDirection()
- C++ Interface: is_same_direction(LQuaternionf self, const LQuaternionf 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(LQuaternionf self, float tolerance) - /**
- Returns true if this quaternion represents the identity transformation 
- within a given tolerance. 
 - */ 
 
 - is_identity()
- C++ Interface: is_identity(LQuaternionf self) - /**
- Returns true if this quaternion represents the identity transformation: no 
- rotation. 
 - */ 
 
 - is_same_direction()
- C++ Interface: is_same_direction(LQuaternionf self, const LQuaternionf other) - /**
- Returns true if two quaternions represent the same rotation within a 
- default tolerance based on the numeric type. 
 - */ 
 
 - multiply()
- C++ Interface: multiply(LQuaternionf self, const LQuaternionf rhs) - /**
- actual multiply call (non virtual) 
 - */ 
 
 - setFromAxisAngle()
- C++ Interface: set_from_axis_angle(const LQuaternionf self, float angle_deg, const LVector3f axis) - /**
- angle_deg is the angle about the axis in degrees. axis must be normalized. 
 - */ 
 
 - setFromAxisAngleRad()
- C++ Interface: set_from_axis_angle_rad(const LQuaternionf self, float angle_rad, const LVector3f axis) - /**
- angle_rad is the angle about the axis in radians. axis must be normalized. 
 - */ 
 
 - setFromMatrix()
- C++ Interface: set_from_matrix(const LQuaternionf self, const LMatrix4f m) set_from_matrix(const LQuaternionf self, const LMatrix3f m) 
 - setHpr()
- C++ Interface: set_hpr(const LQuaternionf self, const LVecBase3f 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 LQuaternionf self, float angle_deg, const LVector3f 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 LQuaternionf self, float angle_rad, const LVector3f axis) - /**
- angle_rad is the angle about the axis in radians. axis must be normalized. 
 - */ 
 
 - set_from_matrix()
- C++ Interface: set_from_matrix(const LQuaternionf self, const LMatrix4f m) set_from_matrix(const LQuaternionf self, const LMatrix3f m) 
 
