From a196f1adcca05bb4ea1f3637f800a7042895562c Mon Sep 17 00:00:00 2001 From: Stephen Imhoff Date: Fri, 19 Feb 2021 19:35:15 +0000 Subject: [PATCH] gobj: Add missing TransformState.make_pos_quat (#1116) matches to TransformState.make_pos_hpr --- panda/src/pgraph/transformState.I | 9 +++++++++ panda/src/pgraph/transformState.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/panda/src/pgraph/transformState.I b/panda/src/pgraph/transformState.I index fe83edc991..437c625bc4 100644 --- a/panda/src/pgraph/transformState.I +++ b/panda/src/pgraph/transformState.I @@ -79,6 +79,15 @@ make_pos_hpr(const LVecBase3 &pos, const LVecBase3 &hpr) { LVecBase3(1.0, 1.0f, 1.0f)); } +/** + * Makes a new TransformState with the specified components. + */ +INLINE CPT(TransformState) TransformState:: +make_pos_quat(const LVecBase3 &pos, const LQuaternion &quat) { + return make_pos_quat_scale(pos, quat, + LVecBase3(1.0, 1.0f, 1.0f)); +} + /** * Makes a new TransformState with the specified components. */ diff --git a/panda/src/pgraph/transformState.h b/panda/src/pgraph/transformState.h index 29702d327a..3e835fcebf 100644 --- a/panda/src/pgraph/transformState.h +++ b/panda/src/pgraph/transformState.h @@ -76,6 +76,8 @@ PUBLISHED: INLINE static CPT(TransformState) make_quat(const LQuaternion &quat); INLINE static CPT(TransformState) make_pos_hpr(const LVecBase3 &pos, const LVecBase3 &hpr); + INLINE static CPT(TransformState) make_pos_quat(const LVecBase3 &pos, + const LQuaternion &quat); INLINE static CPT(TransformState) make_scale(PN_stdfloat scale); INLINE static CPT(TransformState) make_scale(const LVecBase3 &scale); INLINE static CPT(TransformState) make_shear(const LVecBase3 &shear);