LibreOffice Module drawinglayer (master) 1
|
SdrExtrudePrimitive3D class. More...
#include <sdrextrudeprimitive3d.hxx>
Public Member Functions | |
SdrExtrudePrimitive3D (const basegfx::B3DHomMatrix &rTransform, const basegfx::B2DVector &rTextureSize, const attribute::SdrLineFillShadowAttribute3D &rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute &rSdr3DObjectAttribute, basegfx::B2DPolyPolygon aPolyPolygon, double fDepth, double fDiagonal, double fBackScale, bool bSmoothNormals, bool bSmoothLids, bool bCharacterMode, bool bCloseFront, bool bCloseBack) | |
constructor More... | |
virtual | ~SdrExtrudePrimitive3D () override |
const basegfx::B2DPolyPolygon & | getPolyPolygon () const |
data read access More... | |
double | getDepth () const |
double | getDiagonal () const |
double | getBackScale () const |
bool | getSmoothNormals () const |
bool | getSmoothLids () const |
bool | getCharacterMode () const |
bool | getCloseFront () const |
bool | getCloseBack () const |
virtual bool | operator== (const BasePrimitive3D &rPrimitive) const override |
compare operator More... | |
virtual basegfx::B3DRange | getB3DRange (const geometry::ViewInformation3D &rViewInformation) const override |
get range More... | |
virtual Primitive3DContainer | get3DDecomposition (const geometry::ViewInformation3D &rViewInformation) const override |
Overridden to allow for reduced line mode to decide if to buffer decomposition or not. More... | |
Public Member Functions inherited from drawinglayer::primitive3d::SdrPrimitive3D | |
SdrPrimitive3D (basegfx::B3DHomMatrix aTransform, const basegfx::B2DVector &rTextureSize, attribute::SdrLineFillShadowAttribute3D aSdrLFSAttribute, const attribute::Sdr3DObjectAttribute &rSdr3DObjectAttribute) | |
constructor More... | |
const basegfx::B3DHomMatrix & | getTransform () const |
data read access More... | |
const basegfx::B2DVector & | getTextureSize () const |
const attribute::SdrLineFillShadowAttribute3D & | getSdrLFSAttribute () const |
const attribute::Sdr3DObjectAttribute & | getSdr3DObjectAttribute () const |
virtual bool | operator== (const BasePrimitive3D &rPrimitive) const override |
compare operator More... | |
Public Member Functions inherited from drawinglayer::primitive3d::BufferedDecompositionPrimitive3D | |
BufferedDecompositionPrimitive3D () | |
virtual Primitive3DContainer | get3DDecomposition (const geometry::ViewInformation3D &rViewInformation) const override |
The getDecomposition default implementation will on demand use create3DDecomposition() if maBuffered3DDecomposition is empty. More... | |
Public Member Functions inherited from drawinglayer::primitive3d::BasePrimitive3D | |
BasePrimitive3D () | |
virtual | ~BasePrimitive3D () override |
virtual bool | operator== (const BasePrimitive3D &rPrimitive) const |
the ==operator is mainly needed to allow testing newly-created high level primitives against their last incarnation which buffers/holds the decompositions. More... | |
bool | operator!= (const BasePrimitive3D &rPrimitive) const |
virtual basegfx::B3DRange | getB3DRange (const geometry::ViewInformation3D &rViewInformation) const |
This method is for places where using the C++ implementation directly is possible. More... | |
virtual sal_uInt32 | getPrimitive3DID () const =0 |
provide unique ID for fast identifying of known primitive implementations in renderers. More... | |
virtual Primitive3DContainer | get3DDecomposition (const geometry::ViewInformation3D &rViewInformation) const |
The default implementation returns an empty sequence. More... | |
virtual css::uno::Sequence< ::css::uno::Reference< ::css::graphic::XPrimitive3D > > SAL_CALL | getDecomposition (const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters) override |
The getDecomposition implementation for UNO API will use getDecomposition from this implementation. More... | |
virtual css::geometry::RealRectangle3D SAL_CALL | getRange (const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters) override |
the getRange default implementation will use getDecomposition to create the range information from merging getRange results from the single local decomposition primitives. More... | |
Public Member Functions inherited from comphelper::WeakComponentImplHelper< typename... Ifc > | |
virtual void SAL_CALL | acquire () noexcept override |
virtual void SAL_CALL | release () noexcept override |
virtual void SAL_CALL | dispose () noexcept final override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) final override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
virtual css::uno::Sequence< sal_Int8 > SAL_CALL | getImplementationId () override |
Public Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
virtual | ~WeakComponentImplHelperBase () override |
virtual void SAL_CALL | dispose () override |
virtual void SAL_CALL | addEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual void SAL_CALL | removeEventListener (css::uno::Reference< css::lang::XEventListener > const &rxListener) override |
virtual css::uno::Any SAL_CALL | queryInterface (css::uno::Type const &rType) override |
virtual void | disposing (std::unique_lock< std::mutex > &) |
Public Member Functions inherited from comphelper::UnoImplBase | |
virtual | ~UnoImplBase () |
Private Member Functions | |
void | impCreateSlices () |
create slices More... | |
const Slice3DVector & | getSlices () const |
get (evtl. create) slices More... | |
virtual Primitive3DContainer | create3DDecomposition (const geometry::ViewInformation3D &rViewInformation) const override |
local decomposition. More... | |
Private Attributes | |
basegfx::B2DPolyPolygon | maCorrectedPolyPolygon |
geometry helper for slices More... | |
Slice3DVector | maSlices |
basegfx::B2DPolyPolygon | maPolyPolygon |
primitive geometry data More... | |
double | mfDepth |
double | mfDiagonal |
double | mfBackScale |
std::optional< geometry::ViewInformation3D > | mpLastRLGViewInformation |
decomposition data when ReducedLineGeometry is used, see get3DDecomposition More... | |
bool | mbSmoothNormals: 1 |
bool | mbSmoothLids: 1 |
bool | mbCharacterMode: 1 |
bool | mbCloseFront: 1 |
bool | mbCloseBack: 1 |
Additional Inherited Members | |
Protected Member Functions inherited from drawinglayer::primitive3d::SdrPrimitive3D | |
basegfx::B3DRange | getStandard3DRange () const |
Standard implementation for primitive3D which will use maTransform as range and expand by evtl. More... | |
basegfx::B3DRange | get3DRangeFromSlices (const Slice3DVector &rSlices) const |
implementation for primitive3D which will use given Slice3Ds and expand by evtl. More... | |
Protected Member Functions inherited from drawinglayer::primitive3d::BufferedDecompositionPrimitive3D | |
const Primitive3DContainer & | getBuffered3DDecomposition () const |
access methods to maBuffered3DDecomposition. More... | |
void | setBuffered3DDecomposition (const Primitive3DContainer &rNew) |
virtual Primitive3DContainer | create3DDecomposition (const geometry::ViewInformation3D &rViewInformation) const |
method which is to be used to implement the local decomposition of a 2D primitive. More... | |
Protected Member Functions inherited from comphelper::WeakComponentImplHelperBase | |
void | throwIfDisposed (std::unique_lock< std::mutex > &) |
Protected Attributes inherited from comphelper::WeakComponentImplHelperBase | |
comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > | maEventListeners |
Protected Attributes inherited from comphelper::UnoImplBase | |
std::mutex | m_aMutex |
bool | m_bDisposed |
SdrExtrudePrimitive3D class.
This 3D primitive expands the SdrPrimitive3D to a 3D extrude definition. The given 2D tools::PolyPolygon geometry is imagined as lying on the XY-plane in 3D and gets extruded in Z-Direction by Depth.
Various possibilities e.g. for creating diagonals (edge roudings in 3D) and similar are given.
The decomposition will create all necessary 3D planes for visualisation.
Definition at line 44 of file sdrextrudeprimitive3d.hxx.
drawinglayer::primitive3d::SdrExtrudePrimitive3D::SdrExtrudePrimitive3D | ( | const basegfx::B3DHomMatrix & | rTransform, |
const basegfx::B2DVector & | rTextureSize, | ||
const attribute::SdrLineFillShadowAttribute3D & | rSdrLFSAttribute, | ||
const attribute::Sdr3DObjectAttribute & | rSdr3DObjectAttribute, | ||
basegfx::B2DPolyPolygon | aPolyPolygon, | ||
double | fDepth, | ||
double | fDiagonal, | ||
double | fBackScale, | ||
bool | bSmoothNormals, | ||
bool | bSmoothLids, | ||
bool | bCharacterMode, | ||
bool | bCloseFront, | ||
bool | bCloseBack | ||
) |
constructor
Definition at line 387 of file sdrextrudeprimitive3d.cxx.
References count, getCloseBack(), getCloseFront(), getDepth(), getDiagonal(), getPolyPolygon(), basegfx::fTools::lessOrEqual(), maPolyPolygon, mbCloseBack, mbCloseFront, mfDepth, mfDiagonal, and basegfx::fTools::moreOrEqual().
|
overridevirtual |
Definition at line 441 of file sdrextrudeprimitive3d.cxx.
|
overrideprivatevirtual |
local decomposition.
Reimplemented from drawinglayer::primitive3d::BufferedDecompositionPrimitive3D.
Definition at line 41 of file sdrextrudeprimitive3d.cxx.
References a, basegfx::B2DVector::angle(), basegfx::B3DPolygon::append(), basegfx::B3DPolyPolygon::append(), drawinglayer::primitive3d::Primitive3DContainer::append(), drawinglayer::primitive3d::applyNormalsInvertTo3DGeometry(), drawinglayer::primitive3d::applyNormalsKindFlatTo3DGeometry(), drawinglayer::primitive3d::applyNormalsKindSphereTo3DGeometry(), drawinglayer::primitive3d::applyTextureTo3DGeometry(), basegfx::B2DPolygon::count(), basegfx::B2DPolyPolygon::count(), basegfx::B3DPolyPolygon::count(), drawinglayer::primitive3d::create3DPolyPolygonFillPrimitives(), drawinglayer::primitive3d::create3DPolyPolygonLinePrimitives(), drawinglayer::primitive3d::createHiddenGeometryPrimitives3D(), drawinglayer::primitive3d::createReducedOutlines(), drawinglayer::primitive3d::createShadowPrimitive3D(), d, basegfx::fTools::equalZero(), drawinglayer::primitive3d::extractHorizontalLinesFromSlice(), drawinglayer::primitive3d::extractPlanesFromSlice(), drawinglayer::primitive3d::extractVerticalLinesFromSlice(), basegfx::utils::getArea(), basegfx::B2DPolygon::getB2DPoint(), basegfx::B2DPolyPolygon::getB2DPolygon(), basegfx::B3DPolyPolygon::getB3DPolygon(), getDepth(), basegfx::utils::getLength(), drawinglayer::primitive3d::getRangeFrom3DGeometry(), drawinglayer::primitive3d::SdrPrimitive3D::getSdr3DObjectAttribute(), drawinglayer::primitive3d::SdrPrimitive3D::getSdrLFSAttribute(), getSlices(), getSmoothLids(), getSmoothNormals(), drawinglayer::primitive3d::SdrPrimitive3D::getTextureSize(), drawinglayer::primitive3d::SdrPrimitive3D::getTransform(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), maCorrectedPolyPolygon, nCount, basegfx::B2DHomMatrix::scale(), and basegfx::B2DHomMatrix::translate().
|
overridevirtual |
Overridden to allow for reduced line mode to decide if to buffer decomposition or not.
Reimplemented from drawinglayer::primitive3d::BufferedDecompositionPrimitive3D.
Definition at line 476 of file sdrextrudeprimitive3d.cxx.
References drawinglayer::primitive3d::BufferedDecompositionPrimitive3D::get3DDecomposition(), drawinglayer::primitive3d::BufferedDecompositionPrimitive3D::getBuffered3DDecomposition(), drawinglayer::primitive3d::SdrPrimitive3D::getSdr3DObjectAttribute(), comphelper::UnoImplBase::m_aMutex, mpLastRLGViewInformation, and drawinglayer::primitive3d::BufferedDecompositionPrimitive3D::setBuffered3DDecomposition().
|
overridevirtual |
get range
Reimplemented from drawinglayer::primitive3d::BasePrimitive3D.
Definition at line 465 of file sdrextrudeprimitive3d.cxx.
References drawinglayer::primitive3d::SdrPrimitive3D::get3DRangeFromSlices(), and getSlices().
|
inline |
Definition at line 97 of file sdrextrudeprimitive3d.hxx.
Referenced by impCreateSlices(), and operator==().
|
inline |
Definition at line 100 of file sdrextrudeprimitive3d.hxx.
Referenced by impCreateSlices(), and operator==().
|
inline |
Definition at line 102 of file sdrextrudeprimitive3d.hxx.
Referenced by impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().
|
inline |
Definition at line 101 of file sdrextrudeprimitive3d.hxx.
Referenced by impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().
|
inline |
Definition at line 95 of file sdrextrudeprimitive3d.hxx.
Referenced by create3DDecomposition(), impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().
|
inline |
Definition at line 96 of file sdrextrudeprimitive3d.hxx.
Referenced by impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().
|
inline |
data read access
Definition at line 94 of file sdrextrudeprimitive3d.hxx.
References maPolyPolygon.
Referenced by getSlices(), impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().
|
private |
get (evtl. create) slices
Definition at line 373 of file sdrextrudeprimitive3d.cxx.
References count, getPolyPolygon(), impCreateSlices(), comphelper::UnoImplBase::m_aMutex, and maSlices.
Referenced by create3DDecomposition(), and getB3DRange().
|
inline |
Definition at line 99 of file sdrextrudeprimitive3d.hxx.
Referenced by create3DDecomposition(), and operator==().
|
inline |
Definition at line 98 of file sdrextrudeprimitive3d.hxx.
Referenced by create3DDecomposition(), and operator==().
|
private |
create slices
Definition at line 359 of file sdrextrudeprimitive3d.cxx.
References basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::correctOrientations(), basegfx::utils::correctOutmostPolygon(), drawinglayer::primitive3d::createExtrudeSlices(), getBackScale(), getCharacterMode(), getCloseBack(), getCloseFront(), getDepth(), getDiagonal(), getPolyPolygon(), maCorrectedPolyPolygon, maSlices, and basegfx::B2DPolyPolygon::removeDoublePoints().
Referenced by getSlices().
|
overridevirtual |
compare operator
Reimplemented from drawinglayer::primitive3d::SdrPrimitive3D.
Definition at line 445 of file sdrextrudeprimitive3d.cxx.
References getBackScale(), getCharacterMode(), getCloseBack(), getCloseFront(), getDepth(), getDiagonal(), getPolyPolygon(), getSmoothLids(), and getSmoothNormals().
|
private |
geometry helper for slices
Definition at line 48 of file sdrextrudeprimitive3d.hxx.
Referenced by create3DDecomposition(), and impCreateSlices().
|
private |
primitive geometry data
Definition at line 52 of file sdrextrudeprimitive3d.hxx.
|
private |
Definition at line 49 of file sdrextrudeprimitive3d.hxx.
Referenced by getSlices(), and impCreateSlices().
|
private |
Definition at line 62 of file sdrextrudeprimitive3d.hxx.
|
private |
Definition at line 64 of file sdrextrudeprimitive3d.hxx.
Referenced by SdrExtrudePrimitive3D().
|
private |
Definition at line 63 of file sdrextrudeprimitive3d.hxx.
Referenced by SdrExtrudePrimitive3D().
|
private |
Definition at line 61 of file sdrextrudeprimitive3d.hxx.
|
private |
Definition at line 60 of file sdrextrudeprimitive3d.hxx.
|
private |
Definition at line 55 of file sdrextrudeprimitive3d.hxx.
|
private |
Definition at line 53 of file sdrextrudeprimitive3d.hxx.
Referenced by SdrExtrudePrimitive3D().
|
private |
Definition at line 54 of file sdrextrudeprimitive3d.hxx.
Referenced by SdrExtrudePrimitive3D().
|
private |
decomposition data when ReducedLineGeometry is used, see get3DDecomposition
Definition at line 58 of file sdrextrudeprimitive3d.hxx.
Referenced by get3DDecomposition().