OpenSceneGraph 3.6.5
ReflectionMapGenerator
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13#ifndef OSGUTIL_REFLECTIONMAPGENERATOR_
14#define OSGUTIL_REFLECTIONMAPGENERATOR_
15
17
18namespace osgUtil
19{
20
25 public:
26 inline ReflectionMapGenerator(int texture_size = 64);
28
29 protected:
32
33 inline virtual osg::Vec4 compute_color(const osg::Vec3 &R) const;
34 };
35
36 // INLINE METHODS
37
39 : CubeMapGenerator(texture_size)
40 {
41 }
42
44 : CubeMapGenerator(copy, copyop)
45 {
46 }
47
49 {
50 return vector_to_color(R / R.length());
51 }
52
53}
54
55#endif
Vec3f Vec3
Definition Vec3:21
Vec4f Vec4
Definition Vec4:21
The osgUtil library provides general purpose utility classes such as update, cull and draw traverses,...
Definition NodeVisitor:25
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
@ SHALLOW_COPY
Definition CopyOp:47
value_type length() const
Length of the vector = sqrt( vec .
Definition Vec3f:176
CubeMapGenerator(int texture_size=64)
static osg::Vec4 vector_to_color(const osg::Vec3 &vec)
Definition CubeMapGenerator:110
virtual osg::Vec4 compute_color(const osg::Vec3 &R) const
Override this method to define how colors are computed.
Definition ReflectionMapGenerator:48
ReflectionMapGenerator(int texture_size=64)
Definition ReflectionMapGenerator:38
virtual ~ReflectionMapGenerator()
Definition ReflectionMapGenerator:30
ReflectionMapGenerator & operator=(const ReflectionMapGenerator &)
Definition ReflectionMapGenerator:31

osg logo
Generated at Sun Jul 20 2025 00:00:00 for the OpenSceneGraph by doxygen 1.14.0.