Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
DVDTexture.inl
Go to the documentation of this file.
1/***********************************************************************
2 created: Sun Jan 11 2009
3 author: Paul D Turner
4*************************************************************************/
5/***************************************************************************
6 * Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
7 *
8 * Permission is hereby granted, free of charge, to any person obtaining
9 * a copy of this software and associated documentation files (the
10 * "Software"), to deal in the Software without restriction, including
11 * without limitation the rights to use, copy, modify, merge, publish,
12 * distribute, sublicense, and/or sell copies of the Software, and to
13 * permit persons to whom the Software is furnished to do so, subject to
14 * the following conditions:
15 *
16 * The above copyright notice and this permission notice shall be
17 * included in all copies or substantial portions of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22 * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25 * OTHER DEALINGS IN THE SOFTWARE.
26 ***************************************************************************/
27#pragma once
28#ifndef DVD_CEGUIDVDTexture_inl_
29#define DVD_CEGUIDVDTexture_inl_
30
31namespace CEGUI
32{
33
34inline const String& DVDTexture::getName() const
35{
36 return _name;
37}
38
39inline const Sizef& DVDTexture::getSize() const
40{
41 return _size;
42}
43
44inline const Sizef& DVDTexture::getOriginalDataSize() const
45{
46 return _dataSize;
47}
48
49inline const Vector2f& DVDTexture::getTexelScaling() const
50{
51 return _texelScaling;
52}
53
55{
56 _texelScaling.d_x = _size.d_width == 0.f ? 0.f : 1.f / _size.d_width;
57 _texelScaling.d_y = _size.d_height == 0.f ? 0.f : 1.f / _size.d_height;
58}
59
61{
62 return _texture;
63}
64
65}
66
67#endif //DVD_CEGUIDVDTexture_inl_
void updateCachedScaleValues()
updates cached scale value used to map pixels to texture co-ords.
Definition: DVDTexture.inl:54
Divide::Handle< Divide::Texture > _texture
The Divide texture used for storing this DVDTexture's data.
Definition: DVDTexture.h:142
const Sizef & getSize() const override
Definition: DVDTexture.inl:39
const String & getName() const override
Definition: DVDTexture.inl:34
const String _name
The name given for this texture.
Definition: DVDTexture.h:136
Vector2f _texelScaling
cached pixel to texel mapping scale values.
Definition: DVDTexture.h:132
Sizef _dataSize
original size of pixel data loaded into texture
Definition: DVDTexture.h:130
const Sizef & getOriginalDataSize() const override
Definition: DVDTexture.inl:44
Divide::Handle< Divide::Texture > getDVDTexture() const
Return the internal Divide::Texture pointer used by this Texture object.
Definition: DVDTexture.inl:60
const Vector2f & getTexelScaling() const override
Definition: DVDTexture.inl:49
Sizef _size
Size of the texture.
Definition: DVDTexture.h:128