OsgTexture3d.h
Go to the documentation of this file.
// This file is a part of the OpenSurgSim project.
// Copyright 2013, SimQuest Solutions Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef SURGSIM_GRAPHICS_OSGTEXTURE3D_H
#define SURGSIM_GRAPHICS_OSGTEXTURE3D_H
#include "SurgSim/Graphics/OsgTexture.h"
#include "SurgSim/Graphics/Texture3d.h"
#include <osg/Texture3D>
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4250)
#endif
namespace SurgSim
{
namespace Graphics
{
class OsgTexture3d : public OsgTexture, public Texture3d
{
public:
OsgTexture3d();
virtual void setSize(int width, int height, int depth);
virtual void getSize(int* width, int* height, int* depth) const;
virtual bool loadImageSlices(const std::vector<std::string>& filePaths);
osg::ref_ptr<osg::Texture3D> getOsgTexture3d() const
{
return static_cast<osg::Texture3D*>(getOsgTexture().get());
}
};
}; // namespace Graphics
}; // namespace SurgSim
#if defined(_MSC_VER)
#pragma warning(pop)
#endif
#endif // SURGSIM_GRAPHICS_OSGTEXTURE3D_H
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
SurgSim::Graphics::OsgTexture3d::setSize
virtual void setSize(int width, int height, int depth)
Sets the size of the texture.
Definition: OsgTexture3d.cpp:28
SurgSim::Graphics::OsgTexture::getOsgTexture
osg::ref_ptr< osg::Texture > getOsgTexture() const
Returns the osg::Texture1D.
Definition: OsgTexture.h:44
SurgSim::Graphics::OsgTexture3d::getSize
virtual void getSize(int *width, int *height, int *depth) const
Gets the size of the texture.
Definition: OsgTexture3d.cpp:33
Texture3d.h
SurgSim::Graphics::OsgTexture3d::OsgTexture3d
OsgTexture3d()
Constructor.
Definition: OsgTexture3d.cpp:24
SurgSim::Graphics::OsgTexture3d::getOsgTexture3d
osg::ref_ptr< osg::Texture3D > getOsgTexture3d() const
Returns the osg::Texture3D.
Definition: OsgTexture3d.h:65
SurgSim::Graphics::OsgTexture
Base class for OSG implementations of Graphics Textures.
Definition: OsgTexture.h:32
SurgSim::Graphics::OsgTexture3d
OSG implementation of a 3D Texture.
Definition: OsgTexture3d.h:38
OsgTexture.h
SurgSim::Graphics::OsgTexture3d::loadImageSlices
virtual bool loadImageSlices(const std::vector< std::string > &filePaths)
Loads images slices from files into the 3D texture.
Definition: OsgTexture3d.cpp:52
SurgSim::Graphics::Texture3d
Base class defining the interface for a 3D Graphics Texture.
Definition: Texture3d.h:32