From ed6ecca2a45e52d9be1d91107b9643b5ecdfb8bf Mon Sep 17 00:00:00 2001 From: Leviathan Linden Date: Thu, 16 Nov 2023 13:53:37 -0800 Subject: avatar_motion-->GameControl translation and flycam --- indra/newview/llflycam.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 indra/newview/llflycam.h (limited to 'indra/newview/llflycam.h') diff --git a/indra/newview/llflycam.h b/indra/newview/llflycam.h new file mode 100644 index 0000000000..1125767a19 --- /dev/null +++ b/indra/newview/llflycam.h @@ -0,0 +1,55 @@ +/** + * @file llflycam.h + * @brief LLFlycam class header file + * + * $LicenseInfo:firstyear=2024&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2024, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#pragma once + +#include "llcoordframe.h" +#include "v3math.h" +#include "llquaternion.h" + +class LLFlycam +{ +public: + + LLFlycam(); + + void setTransform(const LLVector3& position, const LLQuaternion& rotation); + void getTransform(LLVector3& position_out, LLQuaternion& rotation_out); + + void setLinearVelocity(const LLVector3& velocity); + void setPitchRate(F32 pitch_rate); + void setYawRate(F32 yaw_rate); + + void integrate(F32 delta_time); + + +protected: + LLVector3 mPosition; + LLVector3 mLinearVelocity; + LLQuaternion mRotation; + F32 mPitchRate { 0.0f }; + F32 mYawRate { 0.0f }; +}; -- cgit v1.2.3 From ec39ac89e8529da206dafd519d75ad5944888076 Mon Sep 17 00:00:00 2001 From: leviathan Date: Fri, 1 Mar 2024 14:04:54 -0800 Subject: more GameControl prefs UI --- indra/newview/llflycam.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'indra/newview/llflycam.h') diff --git a/indra/newview/llflycam.h b/indra/newview/llflycam.h index 1125767a19..c75b6e246e 100644 --- a/indra/newview/llflycam.h +++ b/indra/newview/llflycam.h @@ -26,9 +26,9 @@ #pragma once -#include "llcoordframe.h" -#include "v3math.h" +#include "llcamera.h" #include "llquaternion.h" +#include "v3math.h" class LLFlycam { @@ -39,17 +39,22 @@ public: void setTransform(const LLVector3& position, const LLQuaternion& rotation); void getTransform(LLVector3& position_out, LLQuaternion& rotation_out); + void setView(F32 view); + F32 getView() const { return mView; } + void setLinearVelocity(const LLVector3& velocity); void setPitchRate(F32 pitch_rate); void setYawRate(F32 yaw_rate); + void setZoomRate(F32 zoom_rate); void integrate(F32 delta_time); - protected: LLVector3 mPosition; LLVector3 mLinearVelocity; LLQuaternion mRotation; F32 mPitchRate { 0.0f }; F32 mYawRate { 0.0f }; + F32 mZoomRate { 0.0f }; + F32 mView { DEFAULT_FIELD_OF_VIEW }; }; -- cgit v1.2.3