Scribus
Open source desktop publishing at your fingertips
pageitem_osgframe.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 /***************************************************************************
8  pageitem_osgframe.h - description
9  -------------------
10 copyright : Scribus Team
11 ***************************************************************************/
12 
13 /***************************************************************************
14 * *
15 * This program is free software; you can redistribute it and/or modify *
16 * it under the terms of the GNU General Public License as published by *
17 * the Free Software Foundation; either version 2 of the License, or *
18 * (at your option) any later version. *
19 * *
20 ***************************************************************************/
21 
22 #ifndef PAGEITEM_OSGFRAME_H
23 #define PAGEITEM_OSGFRAME_H
24 
25 #include <osg/Node>
26 #include <osg/Matrixd>
27 #include <osg/Vec3>
28 #include <QObject>
29 #include <QWidget>
30 #include <QString>
31 #include <QHash>
32 
33 #include "scribusapi.h"
34 #include "pageitem.h"
35 #include "pageitem_imageframe.h"
36 
37 
38 class SCRIBUS_API PageItem_OSGFrame : public PageItem_ImageFrame
39 {
40  Q_OBJECT
41 
42  public:
43  enum LightType
44  {
45  None = 0,
46  Headlamp = 1,
47  White = 2,
48  Day = 3,
49  Night = 4,
50  Hard = 5,
51  Primary = 6,
52  Blue = 7,
53  Red = 8,
54  Cube = 9,
55  CAD = 10,
56  Artwork = 11
57  };
58  enum RenderType
59  {
60  Solid = 0,
61  SolidWireframe = 1,
62  Transparent = 2,
63  TransparentWireframe = 3,
64  BoundingBox = 4,
65  TransparentBoundingBox = 5,
66  TransparentBoundingBoxOutline = 6,
67  Wireframe = 7,
68  ShadedWireframe = 8,
69  HiddenWireframe = 9,
70  Vertices = 10,
71  ShadedVertices = 11,
72  Illustration = 12,
73  SolidOutline = 13,
74  ShadedIllustration = 14
75  };
76  PageItem_OSGFrame(ScribusDoc *pa, double x, double y, double w, double h, double w2, QString fill, QString outline);
78 
79  virtual PageItem_OSGFrame * asOSGFrame() { return this; }
80  virtual bool isOSGFrame() const { return true; }
81 
82  virtual ItemType realItemType() const { return PageItem::OSGFrame; }
83  virtual void clearContents();
84  void setImage(QImage &image);
85  void setExternalModelFile(QString val);
86  void loadModel();
87  virtual void applicableActions(QStringList& actionList);
88  virtual QString infoDescription();
89  double getDistance(osg::Vec3d pos1, osg::Vec3d pos2);
90  QString getPDFMatrix(QString viewName);
91 
92  osg::ref_ptr<osg::Node> loadedModel;
94  {
95  osg::Matrixd trackerMatrix;
96  osg::Vec3d trackerCenter;
97  osg::Vec3d cameraPosition;
98  osg::Vec3d cameraUp;
99  double angleFOV;
100  double trackerDist;
101  double trackerSize;
102  LightType illumination;
103  RenderType rendermode;
104  double addedTransparency;
105  QColor colorAC;
106  QColor colorFC;
107  };
108  QHash<QString, viewDefinition> viewMap;
109  QString currentView;
110  double distanceToObj;
111  QString modelFile;
112 };
113 
114 #endif
Definition: pageitem_imageframe.h:34
the Document Class
Definition: scribusdoc.h:90
virtual bool isOSGFrame() const
Return true if OSG item, otherwise false.
Definition: pageitem_osgframe.h:80
virtual PageItem_OSGFrame * asOSGFrame()
Return self if OSG item, otherwise null.
Definition: pageitem_osgframe.h:79
Definition: pageitem_osgframe.h:93
virtual ItemType realItemType() const
Get the subclass item type.
Definition: pageitem_osgframe.h:82
ItemType
Item Type.
Definition: pageitem.h:174
virtual void clearContents()
Clear the contents of a frame. WARNING: Currently they do not check if the user wants this...
Definition: pageitem_imageframe.cpp:210
Definition: pageitem_osgframe.h:38