LibreOffice Module drawinglayer (master) 1
sdrextrudelathetools3d.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#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDELATHETOOLS3D_HXX
21#define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDELATHETOOLS3D_HXX
22
24
27#include <vector>
28
29
30// predefines
31
32namespace drawinglayer::geometry {
33 class ViewInformation3D;
34}
35
36
38 {
41 {
42 SLICETYPE3D_REGULAR, // normal geometry Slice3D
44 SLICETYPE3D_BACKCAP // back cap
45 };
46
49 {
52
53 public:
55 const basegfx::B2DPolyPolygon& rPolyPolygon,
56 const basegfx::B3DHomMatrix& aTransform,
59 maSliceType(aSliceType)
60 {
61 maPolyPolygon.transform(aTransform);
62 }
63
64 // data access
66 SliceType3D getSliceType() const { return maSliceType; }
67 };
68
70 typedef ::std::vector< Slice3D > Slice3DVector;
71
74 Slice3DVector& rSliceVector,
75 const basegfx::B2DPolyPolygon& rSource,
76 double fBackScale,
77 double fDiagonal,
78 double fRotation,
79 sal_uInt32 nSteps,
80 bool bCharacterMode,
81 bool bCloseFront,
82 bool bCloseBack);
83
85 Slice3DVector& rSliceVector,
86 const basegfx::B2DPolyPolygon& rSource,
87 double fBackScale,
88 double fDiagonal,
89 double fDepth,
90 bool bCharacterMode,
91 bool bCloseFront,
92 bool bCloseBack);
93
97
99 ::std::vector< basegfx::B3DPolyPolygon >& rFill,
100 const Slice3DVector& rSliceVector,
101 bool bCreateNormals,
102 bool bSmoothNormals,
103 bool bSmoothLids,
104 bool bClosed,
105 double fSmoothNormalsMix,
106 double fSmoothLidsMix,
107 bool bCreateTextureCoordinates,
108 const basegfx::B2DHomMatrix& rTexTransform);
109
111 const geometry::ViewInformation3D& rViewInformation,
112 const basegfx::B3DHomMatrix& rObjectTransform,
113 const basegfx::B3DPolygon& rLoopA,
114 const basegfx::B3DPolygon& rLoopB,
115 basegfx::B3DPolyPolygon& rTarget);
116
117} // end of namespace drawinglayer::overlay
118
119
120#endif //_DRAWINGLAYER_PRIMITIVE3D_SDREXTRUDELATHETOOLS3D_HXX
121
122/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void transform(const basegfx::B2DHomMatrix &rMatrix)
Slice3D(const basegfx::B2DPolyPolygon &rPolyPolygon, const basegfx::B3DHomMatrix &aTransform, SliceType3D aSliceType=SLICETYPE3D_REGULAR)
const basegfx::B3DPolyPolygon & getB3DPolyPolygon() const
#define DRAWINGLAYER_DLLPUBLIC
B3DPolyPolygon createB3DPolyPolygonFromB2DPolyPolygon(const B2DPolyPolygon &rCandidate, double fZCoordinate)
SdrPrimitive3D class.
SliceType3D
SliceType3D definition.
void createLatheSlices(Slice3DVector &rSliceVector, const basegfx::B2DPolyPolygon &rSource, double fBackScale, double fDiagonal, double fRotation, sal_uInt32 nSteps, bool bCharacterMode, bool bCloseFront, bool bCloseBack)
helpers for creation
basegfx::B3DPolyPolygon extractHorizontalLinesFromSlice(const Slice3DVector &rSliceVector, bool bCloseHorLines)
helpers for geometry extraction
void extractPlanesFromSlice(std::vector< basegfx::B3DPolyPolygon > &rFill, const Slice3DVector &rSliceVector, bool bCreateNormals, bool bSmoothNormals, bool bSmoothLids, bool bClosed, double fSmoothNormalsMix, double fSmoothLidsMix, bool bCreateTextureCoordinates, const basegfx::B2DHomMatrix &rTexTransform)
void createExtrudeSlices(Slice3DVector &rSliceVector, const basegfx::B2DPolyPolygon &rSource, double fBackScale, double fDiagonal, double fDepth, bool bCharacterMode, bool bCloseFront, bool bCloseBack)
::std::vector< Slice3D > Slice3DVector
typedef for a group of Slice3Ds
void createReducedOutlines(const geometry::ViewInformation3D &rViewInformation, const basegfx::B3DHomMatrix &rObjectTransform, const basegfx::B3DPolygon &rLoopA, const basegfx::B3DPolygon &rLoopB, basegfx::B3DPolyPolygon &rTarget)
basegfx::B3DPolyPolygon extractVerticalLinesFromSlice(const Slice3DVector &rSliceVector)
basegfx::B2DPolyPolygon maPolyPolygon