OgreBorderPanelOverlayElement.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __BorderPanelOverlayElement_H__
30 #define __BorderPanelOverlayElement_H__
31 
33 
34 namespace Ogre {
42  class BorderRenderable;
43 
58  {
59  friend class BorderRenderable;
60  public:
64 
65  virtual void initialise(void);
66 
67  const String& getTypeName(void) const;
79  void setBorderSize(Real size);
80 
92  void setBorderSize(Real sides, Real topAndBottom);
93 
107  void setBorderSize(Real left, Real right, Real top, Real bottom);
108 
110  Real getLeftBorderSize(void) const;
114  Real getTopBorderSize(void) const;
117 
128  void setLeftBorderUV(Real u1, Real v1, Real u2, Real v2);
132  void setRightBorderUV(Real u1, Real v1, Real u2, Real v2);
136  void setTopBorderUV(Real u1, Real v1, Real u2, Real v2);
140  void setBottomBorderUV(Real u1, Real v1, Real u2, Real v2);
144  void setTopLeftBorderUV(Real u1, Real v1, Real u2, Real v2);
148  void setTopRightBorderUV(Real u1, Real v1, Real u2, Real v2);
152  void setBottomLeftBorderUV(Real u1, Real v1, Real u2, Real v2);
156  void setBottomRightBorderUV(Real u1, Real v1, Real u2, Real v2);
157 
166 
167 
168 
169 
171  void setBorderMaterialName(const String& name);
173  const String& getBorderMaterialName(void) const;
174 
179  bool debugRenderables = false);
180 
183 
185  void _update(void);
186 
187 
190  {
191  public:
192  String doGet(const void* target) const;
193  void doSet(void* target, const String& val);
194  };
197  {
198  public:
199  String doGet(const void* target) const;
200  void doSet(void* target, const String& val);
201  };
204  {
205  public:
206  String doGet(const void* target) const;
207  void doSet(void* target, const String& val);
208  };
211  {
212  public:
213  String doGet(const void* target) const;
214  void doSet(void* target, const String& val);
215  };
218  {
219  public:
220  String doGet(const void* target) const;
221  void doSet(void* target, const String& val);
222  };
225  {
226  public:
227  String doGet(const void* target) const;
228  void doSet(void* target, const String& val);
229  };
232  {
233  public:
234  String doGet(const void* target) const;
235  void doSet(void* target, const String& val);
236  };
239  {
240  public:
241  String doGet(const void* target) const;
242  void doSet(void* target, const String& val);
243  };
246  {
247  public:
248  String doGet(const void* target) const;
249  void doSet(void* target, const String& val);
250  };
253  {
254  public:
255  String doGet(const void* target) const;
256  void doSet(void* target, const String& val);
257  };
258  protected:
263  struct CellUV {
264  Real u1, v1, u2, v2;
265  };
266  CellUV mBorderUV[8];
267 
272 
275 
278 
280 
286  void addBaseParameters(void);
287 
289  BCELL_TOP_LEFT = 0,
290  BCELL_TOP = 1,
291  BCELL_TOP_RIGHT = 2,
292  BCELL_LEFT = 3,
293  BCELL_RIGHT = 4,
294  BCELL_BOTTOM_LEFT = 5,
295  BCELL_BOTTOM = 6,
296  BCELL_BOTTOM_RIGHT = 7
297  };
299 
300  // Command objects
311 
313  };
314 
321  {
322  protected:
324  public:
326  BorderRenderable(BorderPanelOverlayElement* parent) : mParent(parent)
327  {
328  mUseIdentityProjection = true;
329  mUseIdentityView = true;
330  }
331  const MaterialPtr& getMaterial(void) const { return mParent->mBorderMaterial; }
332  void getRenderOperation(RenderOperation& op) { op = mParent->mRenderOp2; }
333  void getWorldTransforms(Matrix4* xform) const { mParent->getWorldTransforms(xform); }
334  unsigned short getNumWorldTransforms(void) const { return 1; }
335  Real getSquaredViewDepth(const Camera* cam) const { return mParent->getSquaredViewDepth(cam); }
336  const LightList& getLights(void) const
337  {
338  // N/A, panels are not lit
339  static LightList ll;
340  return ll;
341  }
342  bool getPolygonModeOverrideable(void) const
343  {
344  return mParent->getPolygonModeOverrideable();
345  }
346  };
350 } // namespace Ogre
351 
352 #endif // __BorderPanelOverlayElement_H__
Ogre::BorderPanelOverlayElement::CmdBorderLeftUV::doGet
String doGet(const void *target) const
Ogre::HashedVector< Light * >
Ogre::BorderPanelOverlayElement::getBottomBorderSize
Real getBottomBorderSize(void) const
Gets the size of the bottom border.
Ogre::BorderPanelOverlayElement::CmdBorderTopUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:211
Ogre::BorderPanelOverlayElement::mBorderMaterialName
String mBorderMaterialName
Definition: OgreBorderPanelOverlayElement.h:273
Ogre::BorderPanelOverlayElement::CellUV
Definition: OgreBorderPanelOverlayElement.h:263
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:59
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::BorderPanelOverlayElement
A specialisation of the PanelOverlayElement to provide a panel with a border.
Definition: OgreBorderPanelOverlayElement.h:58
Ogre::PanelOverlayElement
OverlayElement representing a flat, single-material (or transparent) panel which can contain other el...
Definition: OgrePanelOverlayElement.h:59
Ogre::BorderPanelOverlayElement::getRightBorderSize
Real getRightBorderSize(void) const
Gets the size of the right border.
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::BorderRenderable::getRenderOperation
void getRenderOperation(RenderOperation &op)
Gets the render operation required to send this object to the frame buffer.
Definition: OgreBorderPanelOverlayElement.h:332
Ogre::BorderPanelOverlayElement::getTypeName
const String & getTypeName(void) const
See OverlayElement.
Ogre::BorderPanelOverlayElement::getCellUVString
String getCellUVString(BorderCellIndex idx) const
Ogre::BorderPanelOverlayElement::mPixelTopBorderSize
ushort mPixelTopBorderSize
Definition: OgreBorderPanelOverlayElement.h:270
Ogre::BorderPanelOverlayElement::updatePositionGeometry
void updatePositionGeometry(void)
internal method for setting up geometry, called by OverlayElement::update
Ogre::BorderPanelOverlayElement::CmdBorderTopRightUV::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::CmdBorderMaterial::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::setTopRightBorderUV
void setTopRightBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the top-right corner of the border.
Ogre::BorderRenderable
Class for rendering the border of a BorderPanelOverlayElement.
Definition: OgreBorderPanelOverlayElement.h:321
Ogre::BorderPanelOverlayElement::mPixelRightBorderSize
ushort mPixelRightBorderSize
Definition: OgreBorderPanelOverlayElement.h:269
Ogre::GuiMetricsMode
GuiMetricsMode
Enum describing how the position / size of an element is to be recorded.
Definition: OgreOverlayElement.h:59
Ogre::BorderPanelOverlayElement::CmdBorderSize::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::getLeftBorderUVString
String getLeftBorderUVString() const
Ogre::BorderPanelOverlayElement::BorderPanelOverlayElement
BorderPanelOverlayElement(const String &name)
Constructor.
Ogre::BorderPanelOverlayElement::CmdBorderTopLeftUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:232
Ogre::BorderRenderable::getPolygonModeOverrideable
bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
Definition: OgreBorderPanelOverlayElement.h:342
Ogre::BorderPanelOverlayElement::getTopLeftBorderUVString
String getTopLeftBorderUVString() const
Ogre::BorderPanelOverlayElement::setBorderSize
void setBorderSize(Real size)
Sets the size of the border.
Ogre::BorderPanelOverlayElement::setLeftBorderUV
void setLeftBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the left edge of the border.
Ogre::BorderPanelOverlayElement::CmdBorderTopRightUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:253
Ogre::BorderPanelOverlayElement::CmdBorderBottomUV::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::setTopBorderUV
void setTopBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the top edge of the border.
Ogre::BorderPanelOverlayElement::CmdBorderBottomLeftUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::msTypeName
static String msTypeName
Definition: OgreBorderPanelOverlayElement.h:279
Ogre::BorderPanelOverlayElement::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::BorderPanelOverlayElement::_update
void _update(void)
Internal method to update the element based on transforms applied.
Ogre::BorderPanelOverlayElement::mBottomBorderSize
Real mBottomBorderSize
Definition: OgreBorderPanelOverlayElement.h:262
Ogre::BorderPanelOverlayElement::setBottomBorderUV
void setBottomBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the bottom edge of the border.
Ogre::BorderPanelOverlayElement::setBorderMaterialName
void setBorderMaterialName(const String &name)
Sets the name of the material to use for the borders.
Ogre::BorderPanelOverlayElement::updateTextureGeometry
void updateTextureGeometry(void)
internal method for setting up geometry, called by OverlayElement::update
Ogre::BorderPanelOverlayElement::CmdBorderTopLeftUV::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::CmdBorderRightUV::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::CmdBorderTopRightUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::CmdBorderBottomUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:225
Ogre::BorderPanelOverlayElement::CmdBorderSize
Command object for specifying border sizes (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:190
Ogre::ParamCommand
Abstract class which is command object which gets/sets parameters.
Definition: OgreStringInterface.h:80
Ogre::BorderPanelOverlayElement::CmdBorderRightUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:218
Ogre::BorderRenderable::getMaterial
const MaterialPtr & getMaterial(void) const
Retrieves a weak reference to the material this renderable object uses.
Definition: OgreBorderPanelOverlayElement.h:331
Ogre::BorderRenderable::BorderRenderable
BorderRenderable(BorderPanelOverlayElement *parent)
Constructed with pointers to parent.
Definition: OgreBorderPanelOverlayElement.h:326
Ogre::BorderPanelOverlayElement::mLeftBorderSize
Real mLeftBorderSize
Definition: OgreBorderPanelOverlayElement.h:259
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::BorderPanelOverlayElement::CmdBorderLeftUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::CmdBorderTopUV::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::mRenderOp2
RenderOperation mRenderOp2
Render operation for the border area.
Definition: OgreBorderPanelOverlayElement.h:277
Ogre::BorderPanelOverlayElement::CmdBorderBottomRightUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:246
Ogre::BorderPanelOverlayElement::CmdBorderRightUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::setBorderSize
void setBorderSize(Real sides, Real topAndBottom)
Sets the size of the border, with different sizes for vertical and horizontal borders.
_OgreOverlayExport
#define _OgreOverlayExport
Definition: OgreOverlayPrerequisites.h:58
Ogre::BorderRenderable::getNumWorldTransforms
unsigned short getNumWorldTransforms(void) const
Returns the number of world transform matrices this renderable requires.
Definition: OgreBorderPanelOverlayElement.h:334
Ogre::BorderPanelOverlayElement::getTopBorderSize
Real getTopBorderSize(void) const
Gets the size of the top border.
Ogre::BorderPanelOverlayElement::mPixelBottomBorderSize
ushort mPixelBottomBorderSize
Definition: OgreBorderPanelOverlayElement.h:271
Ogre::BorderPanelOverlayElement::BorderCellIndex
BorderCellIndex
Definition: OgreBorderPanelOverlayElement.h:288
Ogre::BorderPanelOverlayElement::setBottomRightBorderUV
void setBottomRightBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the bottom-right corner of the border.
Ogre::BorderPanelOverlayElement::CmdBorderTopUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::getBottomRightBorderUVString
String getBottomRightBorderUVString() const
Ogre::BorderPanelOverlayElement::setTopLeftBorderUV
void setTopLeftBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the top-left corner of the border.
Ogre::BorderPanelOverlayElement::CmdBorderMaterial::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::getBorderMaterialName
const String & getBorderMaterialName(void) const
Gets the name of the material to use for the borders.
Ogre::OverlayElement::getWorldTransforms
void getWorldTransforms(Matrix4 *xform) const
See Renderable.
Ogre::BorderPanelOverlayElement::setBorderSize
void setBorderSize(Real left, Real right, Real top, Real bottom)
Sets the size of the border separately for all borders.
Ogre::BorderPanelOverlayElement::msCmdBorderMaterial
static CmdBorderMaterial msCmdBorderMaterial
Definition: OgreBorderPanelOverlayElement.h:302
Ogre::BorderPanelOverlayElement::setMetricsMode
void setMetricsMode(GuiMetricsMode gmm)
Tells this element how to interpret the position and dimension values it is given.
Ogre::BorderPanelOverlayElement::CmdBorderBottomLeftUV::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::mBorderMaterial
MaterialPtr mBorderMaterial
Definition: OgreBorderPanelOverlayElement.h:274
OgrePanelOverlayElement.h
Ogre::BorderRenderable::mParent
BorderPanelOverlayElement * mParent
Definition: OgreBorderPanelOverlayElement.h:323
Ogre::SharedPtr< Material >
Ogre::OverlayElement::getSquaredViewDepth
Real getSquaredViewDepth(const Camera *cam) const
Overridden from Renderable.
Definition: OgreOverlayElement.h:469
Ogre::BorderPanelOverlayElement::msCmdBorderTopRightUV
static CmdBorderTopRightUV msCmdBorderTopRightUV
Definition: OgreBorderPanelOverlayElement.h:309
Ogre::BorderPanelOverlayElement::CmdBorderMaterial
Command object for specifying the Material for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:197
Ogre::BorderPanelOverlayElement::msCmdBorderRightUV
static CmdBorderRightUV msCmdBorderRightUV
Definition: OgreBorderPanelOverlayElement.h:306
Ogre::BorderPanelOverlayElement::mRightBorderSize
Real mRightBorderSize
Definition: OgreBorderPanelOverlayElement.h:260
Ogre::Renderable::getPolygonModeOverrideable
virtual bool getPolygonModeOverrideable(void) const
Gets whether this renderable's chosen detail level can be overridden (downgraded) by the camera setti...
Definition: OgreRenderable.h:332
Ogre::BorderPanelOverlayElement::msCmdBorderLeftUV
static CmdBorderLeftUV msCmdBorderLeftUV
Definition: OgreBorderPanelOverlayElement.h:303
Ogre::BorderPanelOverlayElement::CmdBorderBottomUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::msCmdBorderTopUV
static CmdBorderTopUV msCmdBorderTopUV
Definition: OgreBorderPanelOverlayElement.h:304
Ogre::BorderPanelOverlayElement::getLeftBorderSize
Real getLeftBorderSize(void) const
Gets the size of the left border.
Ogre::BorderPanelOverlayElement::mPixelLeftBorderSize
ushort mPixelLeftBorderSize
Definition: OgreBorderPanelOverlayElement.h:268
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:378
_OgrePrivate
#define _OgrePrivate
Definition: OgrePlatform.h:258
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:64
Ogre::BorderPanelOverlayElement::_updateRenderQueue
void _updateRenderQueue(RenderQueue *queue)
Overridden from OverlayElement.
Ogre::BorderPanelOverlayElement::msCmdBorderBottomUV
static CmdBorderBottomUV msCmdBorderBottomUV
Definition: OgreBorderPanelOverlayElement.h:305
Ogre::BorderPanelOverlayElement::initialise
virtual void initialise(void)
Initialise.
Ogre::BorderRenderable::getLights
const LightList & getLights(void) const
Gets a list of lights, ordered relative to how close they are to this renderable.
Definition: OgreBorderPanelOverlayElement.h:336
Ogre::BorderPanelOverlayElement::msCmdBorderTopLeftUV
static CmdBorderTopLeftUV msCmdBorderTopLeftUV
Definition: OgreBorderPanelOverlayElement.h:307
Ogre::BorderPanelOverlayElement::getBottomBorderUVString
String getBottomBorderUVString() const
Ogre::BorderPanelOverlayElement::CmdBorderBottomRightUV::doGet
String doGet(const void *target) const
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::BorderPanelOverlayElement::getRightBorderUVString
String getRightBorderUVString() const
Ogre::BorderPanelOverlayElement::~BorderPanelOverlayElement
virtual ~BorderPanelOverlayElement()
Ogre::BorderPanelOverlayElement::CmdBorderTopLeftUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::CmdBorderBottomLeftUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:239
Ogre::BorderPanelOverlayElement::CmdBorderSize::doGet
String doGet(const void *target) const
Ogre::BorderPanelOverlayElement::CmdBorderLeftUV
Command object for specifying texture coordinates for the border (see ParamCommand).
Definition: OgreBorderPanelOverlayElement.h:204
Ogre::BorderPanelOverlayElement::setRightBorderUV
void setRightBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the right edge of the border.
Ogre::BorderPanelOverlayElement::mBorderRenderable
BorderRenderable * mBorderRenderable
Definition: OgreBorderPanelOverlayElement.h:312
Ogre::BorderPanelOverlayElement::setBottomLeftBorderUV
void setBottomLeftBorderUV(Real u1, Real v1, Real u2, Real v2)
Sets the texture coordinates for the bottom-left corner of the border.
Ogre::BorderRenderable::getSquaredViewDepth
Real getSquaredViewDepth(const Camera *cam) const
Returns the camera-relative squared depth of this renderable.
Definition: OgreBorderPanelOverlayElement.h:335
Ogre::BorderRenderable::getWorldTransforms
void getWorldTransforms(Matrix4 *xform) const
Gets the world transform matrix / matrices for this renderable object.
Definition: OgreBorderPanelOverlayElement.h:333
Ogre::BorderPanelOverlayElement::addBaseParameters
void addBaseParameters(void)
Internal method for setting up parameters.
Ogre::RenderOperation
'New' rendering operation using vertex buffers.
Definition: OgreRenderOperation.h:45
Ogre::BorderPanelOverlayElement::mTopBorderSize
Real mTopBorderSize
Definition: OgreBorderPanelOverlayElement.h:261
Ogre::BorderPanelOverlayElement::getTopBorderUVString
String getTopBorderUVString() const
Ogre::BorderPanelOverlayElement::getTopRightBorderUVString
String getTopRightBorderUVString() const
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:93
Ogre::BorderPanelOverlayElement::CmdBorderBottomRightUV::doSet
void doSet(void *target, const String &val)
Ogre::BorderPanelOverlayElement::msCmdBorderBottomLeftUV
static CmdBorderBottomLeftUV msCmdBorderBottomLeftUV
Definition: OgreBorderPanelOverlayElement.h:308
Ogre::BorderPanelOverlayElement::msCmdBorderSize
static CmdBorderSize msCmdBorderSize
Definition: OgreBorderPanelOverlayElement.h:301
Ogre::BorderPanelOverlayElement::CellUV::v2
Real v2
Definition: OgreBorderPanelOverlayElement.h:264
Ogre::BorderPanelOverlayElement::msCmdBorderBottomRightUV
static CmdBorderBottomRightUV msCmdBorderBottomRightUV
Definition: OgreBorderPanelOverlayElement.h:310
Ogre::BorderPanelOverlayElement::getBottomLeftBorderUVString
String getBottomLeftBorderUVString() const

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.