LibreOffice Module chart2 (master) 1
ThreeDHelper.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <com/sun/star/drawing/CameraGeometry.hpp>
23#include <rtl/ref.hxx>
24#include "charttoolsdllapi.hxx"
25
26namespace com::sun::star::beans { class XPropertySet; }
27namespace com::sun::star::chart2 { class XDiagram; }
28
29namespace chart
30{
31class Diagram;
32
34{
38};
39
41{
48};
49
51{
52public:
53
60 static css::drawing::CameraGeometry getDefaultCameraGeometry( bool bPie=false );
61
62 static void adaptRadAnglesForRightAngledAxes( double& rfXAngleRad, double& rfYAngleRad );
63 static double getXDegreeAngleLimitForRightAngledAxes() { return 90.0; }
64 static double getYDegreeAngleLimitForRightAngledAxes() { return 45.0; }
65
66 static double getValueClippedToRange( double fValue, const double& fPositivLimit );
67
68 static void convertElevationRotationDegToXYZAngleRad(
69 sal_Int32 nElevationDeg, sal_Int32 nRotationDeg
70 , double& rfXAngleRad, double& rfYAngleRad, double& rfZAngleRad );
71
72 SAL_DLLPRIVATE static void convertXYZAngleRadToElevationRotationDeg(
73 sal_Int32& rnElevationDeg, sal_Int32& rnRotationDeg
74 , double fXRad, double fYRad, double fZRad );
75
76 SAL_DLLPRIVATE static void ensureCameraDistanceRange( double& rfCameraDistance );
77 SAL_DLLPRIVATE static void getCameraDistanceRange( double& rfMinimumDistance, double& rfMaximumDistance );
78
79 static double CameraDistanceToPerspective( double fCameraDistance );
80 static double PerspectiveToCameraDistance( double fPerspective );
81
82 static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardLeftWall( const rtl::Reference<
83 ::chart::Diagram >& xDiagram );
84 static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBackWall(const rtl::Reference<
85 ::chart::Diagram >& xDiagram );
86 static CuboidPlanePosition getAutomaticCuboidPlanePositionForStandardBottom(const rtl::Reference<
87 ::chart::Diagram >& xDiagram );
88
89 //sal_Int32 nRoundedEdges: <0 or >100 -> mixed state
90 //sal_Int32 nObjectLines: 0->no lines; 1->all lines on; other->mixed state
91
92 static void getRoundedEdgesAndObjectLines( const rtl::Reference< ::chart::Diagram >& xDiagram
93 , sal_Int32& rnRoundedEdges, sal_Int32& rnObjectLines );
94 static void setRoundedEdgesAndObjectLines( const rtl::Reference< ::chart::Diagram >& xDiagram
95 , sal_Int32 nRoundedEdges, sal_Int32 nObjectLines );
96};
97
98} //namespace chart
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define OOO_DLLPUBLIC_CHARTTOOLS
static double getYDegreeAngleLimitForRightAngledAxes()
static double getXDegreeAngleLimitForRightAngledAxes()
ThreeDLookScheme
CuboidPlanePosition
@ CuboidPlanePosition_Left
@ CuboidPlanePosition_Back
@ CuboidPlanePosition_Right
@ CuboidPlanePosition_Front
@ CuboidPlanePosition_Top
@ CuboidPlanePosition_Bottom
class SAL_NO_VTABLE XPropertySet