44 if(!rSliceVector.empty())
52 const bool bCreateNormals(css::drawing::NormalsKind_SPECIFIC == eNormalsKind);
53 const bool bCreateTextureCoordinatesX(css::drawing::TextureProjectionMode_OBJECTSPECIFIC ==
getSdr3DObjectAttribute().getTextureProjectionX());
54 const bool bCreateTextureCoordinatesY(css::drawing::TextureProjectionMode_OBJECTSPECIFIC ==
getSdr3DObjectAttribute().getTextureProjectionY());
58 && (bCreateTextureCoordinatesX || bCreateTextureCoordinatesY))
60 aTexTransform.
set(0, 0, 0.0);
61 aTexTransform.
set(0, 1, 1.0);
62 aTexTransform.
set(1, 0, 1.0);
63 aTexTransform.
set(1, 1, 0.0);
66 aTexTransform.
scale(1.0, -1.0);
71 std::vector< basegfx::B3DPolyPolygon > aFill;
74 0.85, 0.6, bCreateTextureCoordinatesX || bCreateTextureCoordinatesY, aTexTransform);
82 if(css::drawing::NormalsKind_SPHERE == eNormalsKind)
86 else if(css::drawing::NormalsKind_FLAT == eNormalsKind)
156 if(aCandidate.
count())
158 aNewLineGeometry.
append(aCandidate);
162 if(aNewLineGeometry.
count())
178 aRetval.
append(aHorLines);
183 aRetval.
append(aVerLines);
214 const sal_uInt32 nSubEdgeCount(aSubCandidate.
isClosed() ? aSubCandidate.
count() : (aSubCandidate.
count() ? aSubCandidate.
count() - 1 : 0));
231 std::unique_lock aGuard(
m_aMutex );
245 sal_uInt32 nHorizontalSegments,
246 sal_uInt32 nVerticalSegments,
255 :
SdrPrimitive3D(rTransform, rTextureSize, rSdrLFSAttribute, rSdr3DObjectAttribute),
257 mnHorizontalSegments(nHorizontalSegments),
258 mnVerticalSegments(nVerticalSegments),
259 mfDiagonal(fDiagonal),
260 mfBackScale(fBackScale),
261 mfRotation(fRotation),
262 mbSmoothNormals(bSmoothNormals),
263 mbSmoothLids(bSmoothLids),
264 mbCharacterMode(bCharacterMode),
265 mbCloseFront(bCloseFront),
266 mbCloseBack(bCloseBack)
303 if(SdrPrimitive3D::operator==(rPrimitive))
342 std::unique_lock aGuard(
m_aMutex );
void set(sal_uInt16 nRow, sal_uInt16 nColumn, double fValue)
void translate(double fX, double fY)
void scale(double fX, double fY)
B2DPolygon const & getB2DPolygon(sal_uInt32 nIndex) const
void removeDoublePoints()
void append(const B3DPolygon &rPolygon, sal_uInt32 nCount=1)
B3DPolygon const & getB3DPolygon(sal_uInt32 nIndex) const
void removeDoublePoints()
void setBuffered3DDecomposition(const Primitive3DContainer &rNew)
const Primitive3DContainer & getBuffered3DDecomposition() const
access methods to maBuffered3DDecomposition.
virtual Primitive3DContainer get3DDecomposition(const geometry::ViewInformation3D &rViewInformation) const override
The getDecomposition default implementation will on demand use create3DDecomposition() if maBuffered3...
void append(const Primitive3DContainer &rSource)
SdrLathePrimitive3D class.
sal_uInt32 getHorizontalSegments() const
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D &rViewInformation) const override
get range
bool getCloseFront() const
SdrLathePrimitive3D(const basegfx::B3DHomMatrix &rTransform, const basegfx::B2DVector &rTextureSize, const attribute::SdrLineFillShadowAttribute3D &rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute &rSdr3DObjectAttribute, basegfx::B2DPolyPolygon aPolyPolygon, sal_uInt32 nHorizontalSegments, sal_uInt32 nVerticalSegments, double fDiagonal, double fBackScale, double fRotation, bool bSmoothNormals, bool bSmoothLids, bool bCharacterMode, bool bCloseFront, bool bCloseBack)
constructor
double getDiagonal() const
const basegfx::B2DPolyPolygon & getPolyPolygon() const
data read access
virtual Primitive3DContainer create3DDecomposition(const geometry::ViewInformation3D &rViewInformation) const override
local decomposition.
bool getCloseBack() const
bool getSmoothLids() const
bool getCharacterMode() const
virtual Primitive3DContainer get3DDecomposition(const geometry::ViewInformation3D &rViewInformation) const override
Overridden to allow for reduced line mode to decide if to buffer decomposition or not.
const Slice3DVector & getSlices() const
get (evtl. create) slices
virtual bool operator==(const BasePrimitive3D &rPrimitive) const override
compare operator
basegfx::B2DPolyPolygon maCorrectedPolyPolygon
geometry helper for slices
bool getSmoothNormals() const
std::optional< geometry::ViewInformation3D > mpLastRLGViewInformation
decomposition data when ReducedLineGeometry is used, see get3DDecomposition
virtual ~SdrLathePrimitive3D() override
void impCreateSlices()
create slices
double getBackScale() const
double getRotation() const
sal_uInt32 getVerticalSegments() const
const basegfx::B3DHomMatrix & getTransform() const
data read access
basegfx::B3DRange get3DRangeFromSlices(const Slice3DVector &rSlices) const
implementation for primitive3D which will use given Slice3Ds and expand by evtl.
const basegfx::B2DVector & getTextureSize() const
const attribute::Sdr3DObjectAttribute & getSdr3DObjectAttribute() const
const attribute::SdrLineFillShadowAttribute3D & getSdrLFSAttribute() const
#define PRIMITIVE3D_ID_SDRLATHEPRIMITIVE3D
B2DPolyPolygon reSegmentPolyPolygon(const B2DPolyPolygon &rCandidate, sal_uInt32 nSegments)
B2DPolyPolygon correctOutmostPolygon(const B2DPolyPolygon &rCandidate)
B2DPolygon adaptiveSubdivideByAngle(const B2DPolygon &rCandidate, double fAngleBound)
B2DPolyPolygon correctOrientations(const B2DPolyPolygon &rCandidate)
void applyNormalsInvertTo3DGeometry(std::vector< basegfx::B3DPolyPolygon > &rFill)
ImplPrimitive3DIDBlock(PolygonHairlinePrimitive3D, PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D) Primitive3DContainer PolygonStrokePrimitive3D
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
Primitive3DContainer create3DPolyPolygonFillPrimitives(const std::vector< basegfx::B3DPolyPolygon > &r3DPolyPolygonVector, const basegfx::B3DHomMatrix &rObjectTransform, const basegfx::B2DVector &rTextureSize, const attribute::Sdr3DObjectAttribute &aSdr3DObjectAttribute, const attribute::SdrFillAttribute &rFill, const attribute::FillGradientAttribute &rFillGradient)
basegfx::B3DPolyPolygon extractHorizontalLinesFromSlice(const Slice3DVector &rSliceVector, bool bCloseHorLines)
helpers for geometry extraction
Primitive3DContainer createHiddenGeometryPrimitives3D(const std::vector< basegfx::B3DPolyPolygon > &r3DPolyPolygonVector, const basegfx::B3DHomMatrix &rObjectTransform, const basegfx::B2DVector &rTextureSize, const attribute::Sdr3DObjectAttribute &aSdr3DObjectAttribute)
void applyNormalsKindSphereTo3DGeometry(std::vector< basegfx::B3DPolyPolygon > &rFill, const basegfx::B3DRange &rRange)
basegfx::B3DRange getRangeFrom3DGeometry(std::vector< basegfx::B3DPolyPolygon > &rFill)
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 applyTextureTo3DGeometry(css::drawing::TextureProjectionMode eModeX, css::drawing::TextureProjectionMode eModeY, std::vector< basegfx::B3DPolyPolygon > &rFill, const basegfx::B3DRange &rRange, const basegfx::B2DVector &rTextureSize)
void applyNormalsKindFlatTo3DGeometry(std::vector< basegfx::B3DPolyPolygon > &rFill)
::std::vector< Slice3D > Slice3DVector
typedef for a group of Slice3Ds
Primitive3DContainer createShadowPrimitive3D(const Primitive3DContainer &rSource, const attribute::SdrShadowAttribute &rShadow, bool bShadow3D)
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)
Primitive3DContainer create3DPolyPolygonLinePrimitives(const basegfx::B3DPolyPolygon &rUnitPolyPolygon, const basegfx::B3DHomMatrix &rObjectTransform, const attribute::SdrLineAttribute &rLine)