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

Embedded3DPrimitive2D class. More...

#include <embedded3dprimitive2d.hxx>

Inheritance diagram for drawinglayer::primitive2d::Embedded3DPrimitive2D:
[legend]
Collaboration diagram for drawinglayer::primitive2d::Embedded3DPrimitive2D:
[legend]

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::Primitive3DContainergetChildren3D () const
 data read access More...
 
const basegfx::B2DHomMatrixgetObjectTransformation () const
 
const geometry::ViewInformation3DgetViewInformation3D () const
 
const basegfx::B3DVectorgetLightNormal () const
 
double getShadowSlant () const
 
const basegfx::B3DRangegetScene3DRange () 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 Primitive2DContainergetBuffered2DDecomposition () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Embedded3DPrimitive2D()

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().

Member Function Documentation

◆ create2DDecomposition()

void drawinglayer::primitive2d::Embedded3DPrimitive2D::create2DDecomposition ( Primitive2DContainer rContainer,
const geometry::ViewInformation2D rViewInformation 
) const
overrideprivatevirtual

◆ getB2DRange()

basegfx::B2DRange drawinglayer::primitive2d::Embedded3DPrimitive2D::getB2DRange ( const geometry::ViewInformation2D rViewInformation) const
overridevirtual

◆ getChildren3D()

const primitive3d::Primitive3DContainer & drawinglayer::primitive2d::Embedded3DPrimitive2D::getChildren3D ( ) const
inline

data read access

Definition at line 94 of file embedded3dprimitive2d.hxx.

Referenced by getB2DRange(), impGetShadow3D(), and operator==().

◆ getLightNormal()

const basegfx::B3DVector & drawinglayer::primitive2d::Embedded3DPrimitive2D::getLightNormal ( ) const
inline

Definition at line 97 of file embedded3dprimitive2d.hxx.

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

◆ getObjectTransformation()

const basegfx::B2DHomMatrix & drawinglayer::primitive2d::Embedded3DPrimitive2D::getObjectTransformation ( ) const
inline

Definition at line 95 of file embedded3dprimitive2d.hxx.

Referenced by getB2DRange(), impGetShadow3D(), and operator==().

◆ getPrimitive2DID()

sal_uInt32 drawinglayer::primitive2d::Embedded3DPrimitive2D::getPrimitive2DID ( ) const
overridevirtual

provide unique ID

Implements drawinglayer::primitive2d::BasePrimitive2D.

Definition at line 140 of file embedded3dprimitive2d.cxx.

References PRIMITIVE2D_ID_EMBEDDED3DPRIMITIVE2D.

◆ getScene3DRange()

const basegfx::B3DRange & drawinglayer::primitive2d::Embedded3DPrimitive2D::getScene3DRange ( ) const
inline

Definition at line 99 of file embedded3dprimitive2d.hxx.

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

◆ getShadowSlant()

double drawinglayer::primitive2d::Embedded3DPrimitive2D::getShadowSlant ( ) const
inline

Definition at line 98 of file embedded3dprimitive2d.hxx.

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

◆ getViewInformation3D()

const geometry::ViewInformation3D & drawinglayer::primitive2d::Embedded3DPrimitive2D::getViewInformation3D ( ) const
inline

Definition at line 96 of file embedded3dprimitive2d.hxx.

Referenced by getB2DRange(), impGetShadow3D(), and operator==().

◆ impGetShadow3D()

bool drawinglayer::primitive2d::Embedded3DPrimitive2D::impGetShadow3D ( ) const
private

◆ operator==()

bool drawinglayer::primitive2d::Embedded3DPrimitive2D::operator== ( const BasePrimitive2D rPrimitive) const
overridevirtual

Member Data Documentation

◆ maB2DRange

basegfx::B2DRange drawinglayer::primitive2d::Embedded3DPrimitive2D::maB2DRange
private

#i96669# add simple range buffering for this primitive

Definition at line 70 of file embedded3dprimitive2d.hxx.

Referenced by getB2DRange().

◆ maLightNormal

basegfx::B3DVector drawinglayer::primitive2d::Embedded3DPrimitive2D::maLightNormal
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().

◆ maObjectTransformation

basegfx::B2DHomMatrix drawinglayer::primitive2d::Embedded3DPrimitive2D::maObjectTransformation
private

the 2D scene object transformation

Definition at line 51 of file embedded3dprimitive2d.hxx.

◆ maScene3DRange

basegfx::B3DRange drawinglayer::primitive2d::Embedded3DPrimitive2D::maScene3DRange
private

Definition at line 64 of file embedded3dprimitive2d.hxx.

◆ maShadowPrimitives

Primitive2DContainer drawinglayer::primitive2d::Embedded3DPrimitive2D::maShadowPrimitives
private

the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)

Definition at line 67 of file embedded3dprimitive2d.hxx.

Referenced by getB2DRange(), and impGetShadow3D().

◆ maViewInformation3D

geometry::ViewInformation3D drawinglayer::primitive2d::Embedded3DPrimitive2D::maViewInformation3D
private

the 3D transformations

Definition at line 54 of file embedded3dprimitive2d.hxx.

◆ mbShadow3DChecked

bool drawinglayer::primitive2d::Embedded3DPrimitive2D::mbShadow3DChecked
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().

◆ mfShadowSlant

double drawinglayer::primitive2d::Embedded3DPrimitive2D::mfShadowSlant
private

Definition at line 63 of file embedded3dprimitive2d.hxx.

◆ mxChildren3D

primitive3d::Primitive3DContainer drawinglayer::primitive2d::Embedded3DPrimitive2D::mxChildren3D
private

the sequence of 3d primitives

Definition at line 48 of file embedded3dprimitive2d.hxx.


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