[Libreoffice-commits] core.git: 3 commits - chart2/Library_chartcore.mk chart2/source
Markus Mohrhard
markus.mohrhard at collabora.co.uk
Mon Apr 7 20:09:39 PDT 2014
chart2/Library_chartcore.mk | 19 +++++++++++++++++++
chart2/source/view/charttypes/3DBarChart.cxx | 2 ++
chart2/source/view/inc/3DChartObjects.hxx | 10 ++++++++++
chart2/source/view/main/3DChartObjects.cxx | 6 ++++++
4 files changed, 37 insertions(+)
New commits:
commit a52940655d6a012379d0c779050c5008235e3979
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Apr 8 05:06:52 2014 +0200
clear the container to be safe
Change-Id: Ifa90e2839898079da4dc09e55feba6626e6a8fa8
diff --git a/chart2/source/view/charttypes/3DBarChart.cxx b/chart2/source/view/charttypes/3DBarChart.cxx
index f294d3d..13e3faf 100644
--- a/chart2/source/view/charttypes/3DBarChart.cxx
+++ b/chart2/source/view/charttypes/3DBarChart.cxx
@@ -35,6 +35,7 @@ void Bar3DChart::create3DShapes()
const float nBarDistanceX = nBarSizeX / 2;
const float nBarDistanceY = nBarSizeY / 2;
+ maShapes.clear();
maShapes.push_back(new opengl3D::Camera());
sal_Int32 nSeriesIndex = 0;
for(std::vector<VDataSeries*>::const_iterator itr = maDataSeries.begin(),
commit 39c74649f61d21b8fcb3f8374b56d6bffdf0a020
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Apr 8 05:06:31 2014 +0200
add camera control
Change-Id: Ie641a916f62e80f390514f91de23873364df89a6
diff --git a/chart2/source/view/charttypes/3DBarChart.cxx b/chart2/source/view/charttypes/3DBarChart.cxx
index e8db5bf..f294d3d 100644
--- a/chart2/source/view/charttypes/3DBarChart.cxx
+++ b/chart2/source/view/charttypes/3DBarChart.cxx
@@ -35,6 +35,7 @@ void Bar3DChart::create3DShapes()
const float nBarDistanceX = nBarSizeX / 2;
const float nBarDistanceY = nBarSizeY / 2;
+ maShapes.push_back(new opengl3D::Camera());
sal_Int32 nSeriesIndex = 0;
for(std::vector<VDataSeries*>::const_iterator itr = maDataSeries.begin(),
itrEnd = maDataSeries.end(); itr != itrEnd; ++itr)
diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx
index 257653f..dc65252 100644
--- a/chart2/source/view/inc/3DChartObjects.hxx
+++ b/chart2/source/view/inc/3DChartObjects.hxx
@@ -66,6 +66,16 @@ private:
Color maLineColor; // RGBA line color
};
+class Camera : public Renderable3DObject
+{
+public:
+ Camera();
+private:
+
+ glm::vec3 maPos;
+ glm::vec3 maDirection;
+};
+
namespace temporary {
class TemporaryContext
diff --git a/chart2/source/view/main/3DChartObjects.cxx b/chart2/source/view/main/3DChartObjects.cxx
index c74b475..41dc086 100644
--- a/chart2/source/view/main/3DChartObjects.cxx
+++ b/chart2/source/view/main/3DChartObjects.cxx
@@ -18,6 +18,12 @@ Bar::Bar(const glm::mat4& rPosition):
{
}
+Camera::Camera():
+ maPos(10,10,-10),
+ maDirection(glm::vec3(0,0,0)-maPos)
+{
+}
+
namespace temporary {
TemporaryContext::TemporaryContext():
commit b5d0eb510a9ccde7a086ae0acfca910f4432df5c
Author: Markus Mohrhard <markus.mohrhard at collabora.co.uk>
Date: Tue Apr 8 05:06:03 2014 +0200
temporarily link agains OpenGL
Change-Id: I330c9e4f0f1a1ebf0e236de9cfabdf9dc65121cf
diff --git a/chart2/Library_chartcore.mk b/chart2/Library_chartcore.mk
index e027865..aa375b2 100644
--- a/chart2/Library_chartcore.mk
+++ b/chart2/Library_chartcore.mk
@@ -248,5 +248,24 @@ $(eval $(call gb_Library_add_exception_objects,chartcore,\
chart2/source/tools/WrappedPropertySet \
chart2/source/tools/XMLRangeHelper \
))
+
+ifeq ($(strip $(OS)),WNT)
+$(eval $(call gb_Library_use_system_win32_libs,chartopengl,\
+ opengl32 \
+ gdi32 \
+ glu32 \
+))
+else ifeq ($(OS),MACOSX)
+$(eval $(call gb_Library_use_system_darwin_frameworks,chartopengl,\
+ OpenGL \
+))
+else ifeq ($(OS),LINUX)
+$(eval $(call gb_Library_add_libs,chartopengl,\
+ -ldl \
+ -lGL \
+ -lGLU \
+ -lX11 \
+))
+endif
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list