class OSGUTIL_EXPORT osgUtil::CubeMapGenerator

This is the base class for cube map generators.

Inheritance:


Public Methods

[more]explicit CubeMapGenerator(int texture_size = 64)
[more] CubeMapGenerator(const CubeMapGenerator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY)
[more]void generateMap(bool use_osg_system = true)
generate the six cube images.
[more]inline osg::Image* getImage(osg::TextureCubeMap::Face face)
[more]inline const osg::Image* getImage(osg::TextureCubeMap::Face face) const
[more]inline void set_pixel(int index, int c, int r, const osg::Vec4 &color)
[more]inline osg::Vec4 vector_to_color(const osg::Vec3 &vec)

Protected Methods

[more]virtual ~CubeMapGenerator()
[more]CubeMapGenerator& operator=(const CubeMapGenerator &)
[more]inline static osg::Vec4 vector_to_color(const osg::Vec3 &vec)
[more]virtual osg::Vec4 compute_color(const osg::Vec3 &R) const = 0
override this method to define how colors are computed.


Documentation

This is the base class for cube map generators. It exposes the necessary interface to access the six generated images; descendants should only override the compute_color() method.
oexplicit CubeMapGenerator(int texture_size = 64)

o CubeMapGenerator(const CubeMapGenerator &copy, const osg::CopyOp &copyop = osg::CopyOp::SHALLOW_COPY)

ovoid generateMap(bool use_osg_system = true)
generate the six cube images. If use_osg_system is true, then the OSG's coordinate system is used instead of the default OpenGL one.

ovirtual ~CubeMapGenerator()

oCubeMapGenerator& operator=(const CubeMapGenerator &)

oinline static osg::Vec4 vector_to_color(const osg::Vec3 &vec)

ovirtual osg::Vec4 compute_color(const osg::Vec3 &R) const = 0
override this method to define how colors are computed. The parameter R is the reflection vector, pointing from the center of the cube. The return value should be the RGBA color associated with that reflection ray.

oinline osg::Image* getImage(osg::TextureCubeMap::Face face)

oinline const osg::Image* getImage(osg::TextureCubeMap::Face face) const

oinline void set_pixel(int index, int c, int r, const osg::Vec4 &color)

oinline osg::Vec4 vector_to_color(const osg::Vec3 &vec)


Direct child classes:
ReflectionMapGenerator
HighlightMapGenerator
HalfWayMapGenerator

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.