diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-11-11 08:18:06 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-11-11 09:49:49 +0100 |
commit | 1f7e854887c8715aa31beb55ba514c8b11c374eb (patch) | |
tree | 7378c25c50d49f9aa9001a503a0d48b39fedb1a8 | |
parent | 719bb5c7197fecf11b89f4c503aae6b3ef3b99fe (diff) |
svx: prefix members of E3dScene
See tdf#94879 for motivation.
Change-Id: Ia235f420f9ae00ad25be4ca2c06ee942ffc3e6e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176369
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | include/svx/scene3d.hxx | 16 | ||||
-rw-r--r-- | svx/source/engine3d/scene3d.cxx | 48 |
2 files changed, 32 insertions, 32 deletions
diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index 866edc612fc5..786674530792 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -60,13 +60,13 @@ class SVXCORE_DLLPUBLIC E3dScene final : public E3dObject, public SdrObjList virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact() override; // transformations - B3dCamera aCameraSet; - Camera3D aCamera; + B3dCamera m_aCameraSet; + Camera3D m_aCamera; mutable std::unique_ptr<Imp3DDepthRemapper> mp3DDepthRemapper; // Flag to determine if only selected objects should be drawn - bool bDrawOnlySelected : 1; + bool m_bDrawOnlySelected : 1; bool mbSkipSettingDirty : 1; @@ -110,8 +110,8 @@ public: { return GetObjectItemSet().Get(SDRATTR_3DSCENE_FOCAL_LENGTH).GetValue(); } // set flag to draw only selected - void SetDrawOnlySelected(bool bNew) { bDrawOnlySelected = bNew; } - bool GetDrawOnlySelected() const { return bDrawOnlySelected; } + void SetDrawOnlySelected(bool bNew) { m_bDrawOnlySelected = bNew; } + bool GetDrawOnlySelected() const { return m_bDrawOnlySelected; } virtual SdrObjKind GetObjIdentifier() const override; virtual void NbcSetSnapRect(const tools::Rectangle& rRect) override; @@ -122,7 +122,7 @@ public: virtual E3dScene* getRootE3dSceneFromE3dObject() const override; void SetCamera(const Camera3D& rNewCamera); - const Camera3D& GetCamera() const { return aCamera; } + const Camera3D& GetCamera() const { return m_aCamera; } void removeAllNonSelectedObjects(); virtual rtl::Reference<SdrObject> CloneSdrObject(SdrModel& rTargetModel) const override; @@ -142,8 +142,8 @@ public: virtual OUString TakeObjNamePlural() const override; // get transformations - B3dCamera& GetCameraSet() { return aCameraSet; } - const B3dCamera& GetCameraSet() const { return aCameraSet; } + B3dCamera& GetCameraSet() { return m_aCameraSet; } + const B3dCamera& GetCameraSet() const { return m_aCameraSet; } // break up virtual bool IsBreakObjPossible() override; diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index 9f84aad3395e..ee9cad6365a8 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -168,8 +168,8 @@ std::unique_ptr<sdr::contact::ViewContact> E3dScene::CreateObjectSpecificViewCon E3dScene::E3dScene(SdrModel& rSdrModel) : E3dObject(rSdrModel), - aCamera(basegfx::B3DPoint(0.0, 0.0, 4.0), basegfx::B3DPoint()), - bDrawOnlySelected(false), + m_aCamera(basegfx::B3DPoint(0.0, 0.0, 4.0), basegfx::B3DPoint()), + m_bDrawOnlySelected(false), mbSkipSettingDirty(false) { // Set defaults @@ -178,8 +178,8 @@ E3dScene::E3dScene(SdrModel& rSdrModel) E3dScene::E3dScene(SdrModel& rSdrModel, E3dScene const & rSource) : E3dObject(rSdrModel, rSource), - aCamera(basegfx::B3DPoint(0.0, 0.0, 4.0), basegfx::B3DPoint()), - bDrawOnlySelected(false), + m_aCamera(basegfx::B3DPoint(0.0, 0.0, 4.0), basegfx::B3DPoint()), + m_bDrawOnlySelected(false), mbSkipSettingDirty(false) { // Set defaults @@ -197,8 +197,8 @@ E3dScene::E3dScene(SdrModel& rSdrModel, E3dScene const & rSource) } // copy local data - aCamera = rSource.aCamera; - aCameraSet = rSource.aCameraSet; + m_aCamera = rSource.m_aCamera; + m_aCameraSet = rSource.m_aCameraSet; static_cast<sdr::properties::E3dSceneProperties&>(GetProperties()).SetSceneItemsFromCamera(); InvalidateBoundVolume(); RebuildLists(); @@ -214,24 +214,24 @@ void E3dScene::SetDefaultAttributes() #endif // Set defaults - aCamera.SetViewWindow(-2, -2, 4, 4); - aCameraSet.SetDeviceRectangle(-2, 2, -2, 2); - aCamera.SetDeviceWindow(tools::Rectangle(0, 0, 10, 10)); + m_aCamera.SetViewWindow(-2, -2, 4, 4); + m_aCameraSet.SetDeviceRectangle(-2, 2, -2, 2); + m_aCamera.SetDeviceWindow(tools::Rectangle(0, 0, 10, 10)); tools::Rectangle aRect(0, 0, 10, 10); - aCameraSet.SetViewportRectangle(aRect); + m_aCameraSet.SetViewportRectangle(aRect); // set defaults for Camera from ItemPool - aCamera.SetProjection(GetPerspective()); - basegfx::B3DPoint aActualPosition(aCamera.GetPosition()); + m_aCamera.SetProjection(GetPerspective()); + basegfx::B3DPoint aActualPosition(m_aCamera.GetPosition()); double fNew = GetDistance(); if(fabs(fNew - aActualPosition.getZ()) > 1.0) { - aCamera.SetPosition( basegfx::B3DPoint( aActualPosition.getX(), aActualPosition.getY(), fNew) ); + m_aCamera.SetPosition( basegfx::B3DPoint( aActualPosition.getX(), aActualPosition.getY(), fNew) ); } fNew = GetFocalLength() / 100.0; - aCamera.SetFocalLength(fNew); + m_aCamera.SetFocalLength(fNew); } E3dScene::~E3dScene() @@ -317,8 +317,8 @@ void E3dScene::NbcSetSnapRect(const tools::Rectangle& rRect) { SetBoundAndSnapRectsDirty(); E3dObject::NbcSetSnapRect(rRect); - aCamera.SetDeviceWindow(rRect); - aCameraSet.SetViewportRectangle(rRect); + m_aCamera.SetDeviceWindow(rRect); + m_aCameraSet.SetViewportRectangle(rRect); ImpCleanup3DDepthMapper(); } @@ -343,7 +343,7 @@ void E3dScene::NbcResize(const Point& rRef, const Fraction& rXFact, void E3dScene::SetCamera(const Camera3D& rNewCamera) { - aCamera = rNewCamera; + m_aCamera = rNewCamera; static_cast<sdr::properties::E3dSceneProperties&>(GetProperties()).SetSceneItemsFromCamera(); SetBoundAndSnapRectsDirty(); @@ -352,17 +352,17 @@ void E3dScene::SetCamera(const Camera3D& rNewCamera) GetCameraSet().SetRatio(0.0); // Set Imaging geometry - basegfx::B3DPoint aVRP(aCamera.GetViewPoint()); - basegfx::B3DVector aVPN(aVRP - aCamera.GetVRP()); - basegfx::B3DVector aVUV(aCamera.GetVUV()); + basegfx::B3DPoint aVRP(m_aCamera.GetViewPoint()); + basegfx::B3DVector aVPN(aVRP - m_aCamera.GetVRP()); + basegfx::B3DVector aVUV(m_aCamera.GetVUV()); // use SetViewportValues() to set VRP, VPN and VUV as vectors, too. // Else these values would not be exported/imported correctly. GetCameraSet().SetViewportValues(aVRP, aVPN, aVUV); // Set perspective - GetCameraSet().SetPerspective(aCamera.GetProjection() == ProjectionType::Perspective); - GetCameraSet().SetViewportRectangle(aCamera.GetDeviceWindow()); + GetCameraSet().SetPerspective(m_aCamera.GetProjection() == ProjectionType::Perspective); + GetCameraSet().SetViewportRectangle(m_aCamera.GetDeviceWindow()); ImpCleanup3DDepthMapper(); } @@ -504,7 +504,7 @@ void E3dScene::SaveGeoData(SdrObjGeoData& rGeo) const { E3dObject::SaveGeoData (rGeo); - static_cast<E3DSceneGeoData &>(rGeo).aCamera = aCamera; + static_cast<E3DSceneGeoData &>(rGeo).aCamera = m_aCamera; } void E3dScene::RestoreGeoData(const SdrObjGeoData& rGeo) @@ -638,7 +638,7 @@ void E3dScene::RecalcSnapRect() { // The Scene is used as a 2D-Object, take the SnapRect from the // 2D Display settings - maSnapRect = pScene->aCamera.GetDeviceWindow(); + maSnapRect = pScene->m_aCamera.GetDeviceWindow(); } else { |