LibreOffice Module drawinglayer (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
drawinglayer::primitive3d::SdrExtrudePrimitive3D Class Referencefinal

SdrExtrudePrimitive3D class. More...

#include <sdrextrudeprimitive3d.hxx>

Inheritance diagram for drawinglayer::primitive3d::SdrExtrudePrimitive3D:
[legend]
Collaboration diagram for drawinglayer::primitive3d::SdrExtrudePrimitive3D:
[legend]

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::B2DPolyPolygongetPolyPolygon () 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::B3DHomMatrixgetTransform () const
 data read access More...
 
const basegfx::B2DVectorgetTextureSize () const
 
const attribute::SdrLineFillShadowAttribute3DgetSdrLFSAttribute () const
 
const attribute::Sdr3DObjectAttributegetSdr3DObjectAttribute () 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 Slice3DVectorgetSlices () 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::ViewInformation3DmpLastRLGViewInformation
 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 Primitive3DContainergetBuffered3DDecomposition () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ SdrExtrudePrimitive3D()

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 
)

◆ ~SdrExtrudePrimitive3D()

drawinglayer::primitive3d::SdrExtrudePrimitive3D::~SdrExtrudePrimitive3D ( )
overridevirtual

Definition at line 441 of file sdrextrudeprimitive3d.cxx.

Member Function Documentation

◆ create3DDecomposition()

Primitive3DContainer drawinglayer::primitive3d::SdrExtrudePrimitive3D::create3DDecomposition ( const geometry::ViewInformation3D rViewInformation) const
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().

◆ get3DDecomposition()

Primitive3DContainer drawinglayer::primitive3d::SdrExtrudePrimitive3D::get3DDecomposition ( const geometry::ViewInformation3D rViewInformation) const
overridevirtual

◆ getB3DRange()

basegfx::B3DRange drawinglayer::primitive3d::SdrExtrudePrimitive3D::getB3DRange ( const geometry::ViewInformation3D rViewInformation) const
overridevirtual

◆ getBackScale()

double drawinglayer::primitive3d::SdrExtrudePrimitive3D::getBackScale ( ) const
inline

Definition at line 97 of file sdrextrudeprimitive3d.hxx.

Referenced by impCreateSlices(), and operator==().

◆ getCharacterMode()

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::getCharacterMode ( ) const
inline

Definition at line 100 of file sdrextrudeprimitive3d.hxx.

Referenced by impCreateSlices(), and operator==().

◆ getCloseBack()

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::getCloseBack ( ) const
inline

Definition at line 102 of file sdrextrudeprimitive3d.hxx.

Referenced by impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().

◆ getCloseFront()

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::getCloseFront ( ) const
inline

Definition at line 101 of file sdrextrudeprimitive3d.hxx.

Referenced by impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().

◆ getDepth()

double drawinglayer::primitive3d::SdrExtrudePrimitive3D::getDepth ( ) const
inline

◆ getDiagonal()

double drawinglayer::primitive3d::SdrExtrudePrimitive3D::getDiagonal ( ) const
inline

Definition at line 96 of file sdrextrudeprimitive3d.hxx.

Referenced by impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().

◆ getPolyPolygon()

const basegfx::B2DPolyPolygon & drawinglayer::primitive3d::SdrExtrudePrimitive3D::getPolyPolygon ( ) const
inline

data read access

Definition at line 94 of file sdrextrudeprimitive3d.hxx.

References maPolyPolygon.

Referenced by getSlices(), impCreateSlices(), operator==(), and SdrExtrudePrimitive3D().

◆ getSlices()

const Slice3DVector & drawinglayer::primitive3d::SdrExtrudePrimitive3D::getSlices ( ) const
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().

◆ getSmoothLids()

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::getSmoothLids ( ) const
inline

Definition at line 99 of file sdrextrudeprimitive3d.hxx.

Referenced by create3DDecomposition(), and operator==().

◆ getSmoothNormals()

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::getSmoothNormals ( ) const
inline

Definition at line 98 of file sdrextrudeprimitive3d.hxx.

Referenced by create3DDecomposition(), and operator==().

◆ impCreateSlices()

void drawinglayer::primitive3d::SdrExtrudePrimitive3D::impCreateSlices ( )
private

◆ operator==()

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::operator== ( const BasePrimitive3D rPrimitive) const
overridevirtual

Member Data Documentation

◆ maCorrectedPolyPolygon

basegfx::B2DPolyPolygon drawinglayer::primitive3d::SdrExtrudePrimitive3D::maCorrectedPolyPolygon
private

geometry helper for slices

Definition at line 48 of file sdrextrudeprimitive3d.hxx.

Referenced by create3DDecomposition(), and impCreateSlices().

◆ maPolyPolygon

basegfx::B2DPolyPolygon drawinglayer::primitive3d::SdrExtrudePrimitive3D::maPolyPolygon
private

primitive geometry data

Definition at line 52 of file sdrextrudeprimitive3d.hxx.

◆ maSlices

Slice3DVector drawinglayer::primitive3d::SdrExtrudePrimitive3D::maSlices
private

Definition at line 49 of file sdrextrudeprimitive3d.hxx.

Referenced by getSlices(), and impCreateSlices().

◆ mbCharacterMode

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::mbCharacterMode
private

Definition at line 62 of file sdrextrudeprimitive3d.hxx.

◆ mbCloseBack

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::mbCloseBack
private

Definition at line 64 of file sdrextrudeprimitive3d.hxx.

Referenced by SdrExtrudePrimitive3D().

◆ mbCloseFront

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::mbCloseFront
private

Definition at line 63 of file sdrextrudeprimitive3d.hxx.

Referenced by SdrExtrudePrimitive3D().

◆ mbSmoothLids

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::mbSmoothLids
private

Definition at line 61 of file sdrextrudeprimitive3d.hxx.

◆ mbSmoothNormals

bool drawinglayer::primitive3d::SdrExtrudePrimitive3D::mbSmoothNormals
private

Definition at line 60 of file sdrextrudeprimitive3d.hxx.

◆ mfBackScale

double drawinglayer::primitive3d::SdrExtrudePrimitive3D::mfBackScale
private

Definition at line 55 of file sdrextrudeprimitive3d.hxx.

◆ mfDepth

double drawinglayer::primitive3d::SdrExtrudePrimitive3D::mfDepth
private

Definition at line 53 of file sdrextrudeprimitive3d.hxx.

Referenced by SdrExtrudePrimitive3D().

◆ mfDiagonal

double drawinglayer::primitive3d::SdrExtrudePrimitive3D::mfDiagonal
private

Definition at line 54 of file sdrextrudeprimitive3d.hxx.

Referenced by SdrExtrudePrimitive3D().

◆ mpLastRLGViewInformation

std::optional<geometry::ViewInformation3D> drawinglayer::primitive3d::SdrExtrudePrimitive3D::mpLastRLGViewInformation
private

decomposition data when ReducedLineGeometry is used, see get3DDecomposition

Definition at line 58 of file sdrextrudeprimitive3d.hxx.

Referenced by get3DDecomposition().


The documentation for this class was generated from the following files: