All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OsgTexture1d.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_GRAPHICS_OSGTEXTURE1D_H
17 #define SURGSIM_GRAPHICS_OSGTEXTURE1D_H
18 
21 
22 #include <osg/Texture1D>
23 
24 #if defined(_MSC_VER)
25 #pragma warning(push)
26 #pragma warning(disable:4250)
27 #endif
28 
29 namespace SurgSim
30 {
31 
32 namespace Graphics
33 {
34 
38 class OsgTexture1d : public OsgTexture, public Texture1d
39 {
40 public:
43  OsgTexture1d();
44 
48  virtual void setSize(int width);
49 
52  virtual void getSize(int* width) const;
53 
55  osg::ref_ptr<osg::Texture1D> getOsgTexture1d() const
56  {
57  return static_cast<osg::Texture1D*>(getOsgTexture().get());
58  }
59 };
60 
61 }; // namespace Graphics
62 
63 }; // namespace SurgSim
64 
65 #if defined(_MSC_VER)
66 #pragma warning(pop)
67 #endif
68 
69 #endif // SURGSIM_GRAPHICS_OSGTEXTURE1D_H
virtual void getSize(int *width) const
Gets the size of the texture.
Definition: OsgTexture1d.cpp:29
Base class defining the interface for a 1D Graphics Texture.
Definition: Texture1d.h:30
OsgTexture1d()
Constructor.
Definition: OsgTexture1d.cpp:20
osg::ref_ptr< osg::Texture > getOsgTexture() const
Returns the osg::Texture1D.
Definition: OsgTexture.h:44
Base class for OSG implementations of Graphics Textures.
Definition: OsgTexture.h:32
osg::ref_ptr< osg::Texture1D > getOsgTexture1d() const
Returns the osg::Texture1D.
Definition: OsgTexture1d.h:55
virtual void setSize(int width)
Sets the size of the texture.
Definition: OsgTexture1d.cpp:24
OSG implementation of a 1D Texture.
Definition: OsgTexture1d.h:38