mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
accept quats
This commit is contained in:
parent
c5f477c043
commit
5bfe55d22f
@ -135,9 +135,22 @@ add_rotz(double angle) {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void EggTransform3d::
|
||||
add_rotate(double angle, const LVector3d &axis) {
|
||||
LVector3d normaxis = normalize(axis);
|
||||
_components.push_back(Component(CT_rotate, angle));
|
||||
_components.back()._vector = new LVector3d(axis);
|
||||
_transform *= LMatrix4d::rotate_mat(angle, axis);
|
||||
_components.back()._vector = new LVector3d(normaxis);
|
||||
_transform *= LMatrix4d::rotate_mat(angle, normaxis);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: EggTransform3d::add_rotate
|
||||
// Access: Public
|
||||
// Description: Appends an arbitrary rotation to the current
|
||||
// transform, expressed as a quaternion. This is
|
||||
// converted to axis-angle notation for the egg file.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void EggTransform3d::
|
||||
add_rotate(const LQuaterniond &quat) {
|
||||
add_rotate(quat.get_angle(), quat.get_axis());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
void add_roty(double angle);
|
||||
void add_rotz(double angle);
|
||||
void add_rotate(double angle, const LVector3d &axis);
|
||||
void add_rotate(const LQuaterniond &quat);
|
||||
void add_scale(const LVecBase3d &scale);
|
||||
void add_uniform_scale(double scale);
|
||||
void add_matrix(const LMatrix4d &mat);
|
||||
|
Loading…
x
Reference in New Issue
Block a user