LibreOffice Module drawinglayer (master) 1
|
Embedded3DPrimitive2D class. More...
#include <embedded3dprimitive2d.hxx>
Public Member Functions | |
Embedded3DPrimitive2D (primitive3d::Primitive3DContainer xChildren3D, basegfx::B2DHomMatrix aObjectTransformation, geometry::ViewInformation3D aViewInformation3D, const basegfx::B3DVector &rLightNormal, double fShadowSlant, const basegfx::B3DRange &rScene3DRange) | |
constructor More... | |
const primitive3d::Primitive3DContainer & | getChildren3D () const |
data read access More... | |
const basegfx::B2DHomMatrix & | getObjectTransformation () const |
const geometry::ViewInformation3D & | getViewInformation3D () const |
const basegfx::B3DVector & | getLightNormal () const |
double | getShadowSlant () const |
const basegfx::B3DRange & | getScene3DRange () const |
virtual bool | operator== (const BasePrimitive2D &rPrimitive) const override |
compare operator More... | |
virtual basegfx::B2DRange | getB2DRange (const geometry::ViewInformation2D &rViewInformation) const override |
get range More... | |
virtual sal_uInt32 | getPrimitive2DID () const override |
provide unique ID More... | |
Public Member Functions inherited from drawinglayer::primitive2d::BufferedDecompositionPrimitive2D | |
BufferedDecompositionPrimitive2D () | |
virtual void | get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const override |
The getDecomposition default implementation will on demand use create2DDecomposition() if maBuffered2DDecomposition is empty. More... | |
void | setTransparenceForShadow (sal_uInt16 nTransparenceForShadow) |
sal_uInt16 | getTransparenceForShadow () const |
Public Member Functions inherited from drawinglayer::primitive2d::BasePrimitive2D | |
BasePrimitive2D () | |
virtual | ~BasePrimitive2D () override |
virtual bool | operator== (const BasePrimitive2D &rPrimitive) const |
the ==operator is mainly needed to allow testing newly-created primitives against their last incarnation which buffers/holds the made decompositions. More... | |
bool | operator!= (const BasePrimitive2D &rPrimitive) const |
virtual basegfx::B2DRange | getB2DRange (const geometry::ViewInformation2D &rViewInformation) const |
The default implementation will use getDecomposition results to create the range. More... | |
virtual sal_uInt32 | getPrimitive2DID () const =0 |
provide unique ID for fast identifying of known primitive implementations in renderers. More... | |
virtual void | get2DDecomposition (Primitive2DDecompositionVisitor &rVisitor, const geometry::ViewInformation2D &rViewInformation) const |
The default implementation will return an empty sequence. More... | |
Primitive2DContainer | getDecomposition (const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters) |
The getDecomposition implementation for UNO API will use getDecomposition from this implementation. More... | |
css::geometry::RealRectangle2D | getRange (const css::uno::Sequence< css::beans::PropertyValue > &rViewParameters) |
The getRange implementation for UNO API will use getRange from this implementation. More... | |
virtual sal_Int64 | estimateUsage () |
Public Member Functions inherited from salhelper::SimpleReferenceObject | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Private Member Functions | |
bool | impGetShadow3D () const |
private helpers More... | |
virtual void | create2DDecomposition (Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const override |
local decomposition. More... | |
Private Attributes | |
primitive3d::Primitive3DContainer | mxChildren3D |
the sequence of 3d primitives More... | |
basegfx::B2DHomMatrix | maObjectTransformation |
the 2D scene object transformation More... | |
geometry::ViewInformation3D | maViewInformation3D |
the 3D transformations More... | |
basegfx::B3DVector | maLightNormal |
if the embedded 3D primitives contain shadow, these parameters are needed to extract the shadow which is a sequence of 2D primitives and may expand the 2D range. More... | |
double | mfShadowSlant |
basegfx::B3DRange | maScene3DRange |
Primitive2DContainer | maShadowPrimitives |
the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked) More... | |
basegfx::B2DRange | maB2DRange |
#i96669# add simple range buffering for this primitive More... | |
bool | mbShadow3DChecked: 1 |
flag if given 3D geometry is already checked for shadow definitions and 2d shadows are created in maShadowPrimitives More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from salhelper::SimpleReferenceObject | |
static void * | operator new (std::size_t nSize) |
static void * | operator new (std::size_t nSize, std::nothrow_t const &rNothrow) |
static void | operator delete (void *pPtr) |
static void | operator delete (void *pPtr, std::nothrow_t const &rNothrow) |
Protected Member Functions inherited from drawinglayer::primitive2d::BufferedDecompositionPrimitive2D | |
const Primitive2DContainer & | getBuffered2DDecomposition () const |
access methods to maBuffered2DDecomposition. More... | |
void | setBuffered2DDecomposition (Primitive2DContainer &&rNew) |
virtual void | create2DDecomposition (Primitive2DContainer &rContainer, const geometry::ViewInformation2D &rViewInformation) const =0 |
method which is to be used to implement the local decomposition of a 2D primitive. More... | |
Protected Member Functions inherited from salhelper::SimpleReferenceObject | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
Embedded3DPrimitive2D class.
This is a helper primitive which allows embedding of single 3D primitives to the 2D primitive logic. It will get the scene it's involved and thus the 3D transformation. With this information it is able to provide 2D range data for a 3D primitive.
This primitive will not be visualized and decomposes to a yellow 2D rectangle to visualize that this should never be visualized
Definition at line 44 of file embedded3dprimitive2d.hxx.
drawinglayer::primitive2d::Embedded3DPrimitive2D::Embedded3DPrimitive2D | ( | primitive3d::Primitive3DContainer | xChildren3D, |
basegfx::B2DHomMatrix | aObjectTransformation, | ||
geometry::ViewInformation3D | aViewInformation3D, | ||
const basegfx::B3DVector & | rLightNormal, | ||
double | fShadowSlant, | ||
const basegfx::B3DRange & | rScene3DRange | ||
) |
constructor
Definition at line 71 of file embedded3dprimitive2d.cxx.
References maLightNormal, and basegfx::B3DVector::normalize().
|
overrideprivatevirtual |
local decomposition.
Implements drawinglayer::primitive2d::BufferedDecompositionPrimitive2D.
Definition at line 62 of file embedded3dprimitive2d.cxx.
References basegfx::utils::createPolygonFromRect(), and getB2DRange().
|
overridevirtual |
get range
Reimplemented from drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 106 of file embedded3dprimitive2d.cxx.
References basegfx::Range2D< typename TYPE, typename TRAITS >::expand(), drawinglayer::primitive2d::Primitive2DContainer::getB2DRange(), getChildren3D(), basegfx::B3DRange::getMaxX(), basegfx::B3DRange::getMaxY(), basegfx::B3DRange::getMinX(), basegfx::B3DRange::getMinY(), getObjectTransformation(), getViewInformation3D(), impGetShadow3D(), basegfx::Range2D< typename TYPE, typename TRAITS >::isEmpty(), maB2DRange, maShadowPrimitives, basegfx::B2DRange::transform(), and basegfx::B3DRange::transform().
Referenced by create2DDecomposition().
|
inline |
data read access
Definition at line 94 of file embedded3dprimitive2d.hxx.
Referenced by getB2DRange(), impGetShadow3D(), and operator==().
|
inline |
Definition at line 97 of file embedded3dprimitive2d.hxx.
Referenced by impGetShadow3D(), and operator==().
|
inline |
Definition at line 95 of file embedded3dprimitive2d.hxx.
Referenced by getB2DRange(), impGetShadow3D(), and operator==().
|
overridevirtual |
provide unique ID
Implements drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 140 of file embedded3dprimitive2d.cxx.
References PRIMITIVE2D_ID_EMBEDDED3DPRIMITIVE2D.
|
inline |
Definition at line 99 of file embedded3dprimitive2d.hxx.
Referenced by impGetShadow3D(), and operator==().
|
inline |
Definition at line 98 of file embedded3dprimitive2d.hxx.
Referenced by impGetShadow3D(), and operator==().
|
inline |
Definition at line 96 of file embedded3dprimitive2d.hxx.
Referenced by getB2DRange(), impGetShadow3D(), and operator==().
|
private |
private helpers
Definition at line 37 of file embedded3dprimitive2d.cxx.
References getChildren3D(), getLightNormal(), getObjectTransformation(), drawinglayer::processor3d::Shadow3DExtractingProcessor::getPrimitive2DSequence(), getScene3DRange(), getShadowSlant(), getViewInformation3D(), maShadowPrimitives, mbShadow3DChecked, and drawinglayer::processor3d::BaseProcessor3D::process().
Referenced by getB2DRange().
|
overridevirtual |
compare operator
Reimplemented from drawinglayer::primitive2d::BasePrimitive2D.
Definition at line 89 of file embedded3dprimitive2d.cxx.
References getChildren3D(), getLightNormal(), getObjectTransformation(), getScene3DRange(), getShadowSlant(), and getViewInformation3D().
|
private |
#i96669# add simple range buffering for this primitive
Definition at line 70 of file embedded3dprimitive2d.hxx.
Referenced by getB2DRange().
|
private |
if the embedded 3D primitives contain shadow, these parameters are needed to extract the shadow which is a sequence of 2D primitives and may expand the 2D range.
Since every single 3D object in a scene may individually have shadow or not, these values need to be provided and prepared. The shadow distance itself (a 2D transformation) is part of the 3D shadow definition
Definition at line 62 of file embedded3dprimitive2d.hxx.
Referenced by Embedded3DPrimitive2D().
|
private |
the 2D scene object transformation
Definition at line 51 of file embedded3dprimitive2d.hxx.
|
private |
Definition at line 64 of file embedded3dprimitive2d.hxx.
|
private |
the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
Definition at line 67 of file embedded3dprimitive2d.hxx.
Referenced by getB2DRange(), and impGetShadow3D().
|
private |
the 3D transformations
Definition at line 54 of file embedded3dprimitive2d.hxx.
|
private |
flag if given 3D geometry is already checked for shadow definitions and 2d shadows are created in maShadowPrimitives
Definition at line 75 of file embedded3dprimitive2d.hxx.
Referenced by impGetShadow3D().
|
private |
Definition at line 63 of file embedded3dprimitive2d.hxx.
|
private |
the sequence of 3d primitives
Definition at line 48 of file embedded3dprimitive2d.hxx.