LibreOffice Module drawinglayer (master) 1
|
SdrLathePrimitive3D class. More...
#include <sdrlatheprimitive3d.hxx>
Public Member Functions | |
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 More... | |
virtual | ~SdrLathePrimitive3D () override |
const basegfx::B2DPolyPolygon & | getPolyPolygon () const |
data read access More... | |
sal_uInt32 | getHorizontalSegments () const |
sal_uInt32 | getVerticalSegments () const |
double | getDiagonal () const |
double | getBackScale () const |
double | getRotation () 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... | |
sal_uInt32 | mnHorizontalSegments |
sal_uInt32 | mnVerticalSegments |
double | mfDiagonal |
double | mfBackScale |
double | mfRotation |
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 |
SdrLathePrimitive3D class.
This 3D primitive expands the SdrPrimitive3D to a 3D rotation definition. The given 2D tools::PolyPolygon geometry is imagined as lying on the XY-plane in 3D and gets rotated around the Y-Axis.
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 sdrlatheprimitive3d.hxx.
drawinglayer::primitive3d::SdrLathePrimitive3D::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
Definition at line 239 of file sdrlatheprimitive3d.cxx.
References count, getCloseBack(), getCloseFront(), getDiagonal(), getPolyPolygon(), getRotation(), basegfx::fTools::lessOrEqual(), maPolyPolygon, mbCloseBack, mbCloseFront, mfDiagonal, mfRotation, and basegfx::fTools::moreOrEqual().
|
overridevirtual |
Definition at line 297 of file sdrlatheprimitive3d.cxx.
|
overrideprivatevirtual |
local decomposition.
Reimplemented from drawinglayer::primitive3d::BufferedDecompositionPrimitive3D.
Definition at line 37 of file sdrlatheprimitive3d.cxx.
References a, basegfx::B3DPolyPolygon::append(), drawinglayer::primitive3d::Primitive3DContainer::append(), drawinglayer::primitive3d::applyNormalsInvertTo3DGeometry(), drawinglayer::primitive3d::applyNormalsKindFlatTo3DGeometry(), drawinglayer::primitive3d::applyNormalsKindSphereTo3DGeometry(), drawinglayer::primitive3d::applyTextureTo3DGeometry(), basegfx::B3DPolygon::count(), basegfx::B3DPolyPolygon::count(), drawinglayer::primitive3d::create3DPolyPolygonFillPrimitives(), drawinglayer::primitive3d::create3DPolyPolygonLinePrimitives(), drawinglayer::primitive3d::createHiddenGeometryPrimitives3D(), drawinglayer::primitive3d::createReducedOutlines(), drawinglayer::primitive3d::createShadowPrimitive3D(), basegfx::fTools::equal(), drawinglayer::primitive3d::extractHorizontalLinesFromSlice(), drawinglayer::primitive3d::extractPlanesFromSlice(), drawinglayer::primitive3d::extractVerticalLinesFromSlice(), basegfx::B3DPolyPolygon::getB3DPolygon(), getBackScale(), getHorizontalSegments(), drawinglayer::primitive3d::getRangeFrom3DGeometry(), getRotation(), drawinglayer::primitive3d::SdrPrimitive3D::getSdr3DObjectAttribute(), drawinglayer::primitive3d::SdrPrimitive3D::getSdrLFSAttribute(), getSlices(), getSmoothLids(), getSmoothNormals(), drawinglayer::primitive3d::SdrPrimitive3D::getTextureSize(), drawinglayer::primitive3d::SdrPrimitive3D::getTransform(), nCount, basegfx::B3DPolygon::removeDoublePoints(), basegfx::B2DHomMatrix::scale(), basegfx::B2DHomMatrix::set(), 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 334 of file sdrlatheprimitive3d.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 323 of file sdrlatheprimitive3d.cxx.
References drawinglayer::primitive3d::SdrPrimitive3D::get3DRangeFromSlices(), and getSlices().
|
inline |
Definition at line 102 of file sdrlatheprimitive3d.hxx.
Referenced by create3DDecomposition(), impCreateSlices(), and operator==().
|
inline |
Definition at line 106 of file sdrlatheprimitive3d.hxx.
Referenced by impCreateSlices(), and operator==().
|
inline |
Definition at line 108 of file sdrlatheprimitive3d.hxx.
Referenced by impCreateSlices(), operator==(), and SdrLathePrimitive3D().
|
inline |
Definition at line 107 of file sdrlatheprimitive3d.hxx.
Referenced by impCreateSlices(), operator==(), and SdrLathePrimitive3D().
|
inline |
Definition at line 101 of file sdrlatheprimitive3d.hxx.
Referenced by impCreateSlices(), operator==(), and SdrLathePrimitive3D().
|
inline |
Definition at line 99 of file sdrlatheprimitive3d.hxx.
Referenced by create3DDecomposition(), impCreateSlices(), and operator==().
|
inline |
data read access
Definition at line 98 of file sdrlatheprimitive3d.hxx.
References maPolyPolygon.
Referenced by getSlices(), impCreateSlices(), operator==(), and SdrLathePrimitive3D().
|
inline |
Definition at line 103 of file sdrlatheprimitive3d.hxx.
Referenced by create3DDecomposition(), impCreateSlices(), operator==(), and SdrLathePrimitive3D().
|
private |
get (evtl. create) slices
Definition at line 225 of file sdrlatheprimitive3d.cxx.
References count, getPolyPolygon(), impCreateSlices(), comphelper::UnoImplBase::m_aMutex, and maSlices.
Referenced by create3DDecomposition(), and getB3DRange().
|
inline |
Definition at line 105 of file sdrlatheprimitive3d.hxx.
Referenced by create3DDecomposition(), and operator==().
|
inline |
Definition at line 104 of file sdrlatheprimitive3d.hxx.
Referenced by create3DDecomposition(), and operator==().
|
inline |
Definition at line 100 of file sdrlatheprimitive3d.hxx.
Referenced by impCreateSlices(), and operator==().
|
private |
create slices
Definition at line 200 of file sdrlatheprimitive3d.cxx.
References basegfx::utils::adaptiveSubdivideByAngle(), basegfx::utils::correctOrientations(), basegfx::utils::correctOutmostPolygon(), basegfx::B2DPolygon::count(), drawinglayer::primitive3d::createLatheSlices(), basegfx::B2DPolyPolygon::getB2DPolygon(), getBackScale(), getCharacterMode(), getCloseBack(), getCloseFront(), getDiagonal(), getHorizontalSegments(), getPolyPolygon(), getRotation(), getVerticalSegments(), basegfx::B2DPolygon::isClosed(), maCorrectedPolyPolygon, maSlices, basegfx::B2DPolyPolygon::removeDoublePoints(), and basegfx::utils::reSegmentPolyPolygon().
Referenced by getSlices().
|
overridevirtual |
compare operator
Reimplemented from drawinglayer::primitive3d::SdrPrimitive3D.
Definition at line 301 of file sdrlatheprimitive3d.cxx.
References getBackScale(), getCharacterMode(), getCloseBack(), getCloseFront(), getDiagonal(), getHorizontalSegments(), getPolyPolygon(), getRotation(), getSmoothLids(), getSmoothNormals(), and getVerticalSegments().
|
private |
geometry helper for slices
Definition at line 48 of file sdrlatheprimitive3d.hxx.
Referenced by impCreateSlices().
|
private |
primitive geometry data
Definition at line 52 of file sdrlatheprimitive3d.hxx.
|
private |
Definition at line 49 of file sdrlatheprimitive3d.hxx.
Referenced by getSlices(), and impCreateSlices().
|
private |
Definition at line 64 of file sdrlatheprimitive3d.hxx.
|
private |
Definition at line 66 of file sdrlatheprimitive3d.hxx.
Referenced by SdrLathePrimitive3D().
|
private |
Definition at line 65 of file sdrlatheprimitive3d.hxx.
Referenced by SdrLathePrimitive3D().
|
private |
Definition at line 63 of file sdrlatheprimitive3d.hxx.
|
private |
Definition at line 62 of file sdrlatheprimitive3d.hxx.
|
private |
Definition at line 56 of file sdrlatheprimitive3d.hxx.
|
private |
Definition at line 55 of file sdrlatheprimitive3d.hxx.
Referenced by SdrLathePrimitive3D().
|
private |
Definition at line 57 of file sdrlatheprimitive3d.hxx.
Referenced by SdrLathePrimitive3D().
|
private |
Definition at line 53 of file sdrlatheprimitive3d.hxx.
|
private |
Definition at line 54 of file sdrlatheprimitive3d.hxx.
|
private |
decomposition data when ReducedLineGeometry is used, see get3DDecomposition
Definition at line 60 of file sdrlatheprimitive3d.hxx.
Referenced by get3DDecomposition().