root/cafu/trunk/CaLight/CaLightWorld.hpp

Revision 457, 2.8 KB (checked in by Carsten, 4 months ago)

Using UltraEdit's multi-line search-and-replace-in-files feature, replaced


^#ifndef _(CAFU|CF|CFS|CA)_(.*)_$
^#define _\1_\2_$

with

#ifndef CAFU_\2_INCLUDED
#define CAFU_\2_INCLUDED

and


^#ifndef _(.*)_HPP_$
^#define _\1_HPP_$

with

#ifndef CAFU_\1_HPP_INCLUDED
#define CAFU_\1_HPP_INCLUDED

Closes #91.

Line 
1/*
2=================================================================================
3This file is part of Cafu, the open-source game engine and graphics engine
4for multiplayer, cross-platform, real-time 3D action.
5Copyright (C) 2002-2012 Carsten Fuchs Software.
6
7Cafu is free software: you can redistribute it and/or modify it under the terms
8of the GNU General Public License as published by the Free Software Foundation,
9either version 3 of the License, or (at your option) any later version.
10
11Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Cafu. If not, see <http://www.gnu.org/licenses/>.
17
18For support and more information about Cafu, visit us at <http://www.cafu.de>.
19=================================================================================
20*/
21
22/******************************/
23/*** CaLight World (Header) ***/
24/******************************/
25
26#ifndef CAFU_CALIGHTWORLD_HPP_INCLUDED
27#define CAFU_CALIGHTWORLD_HPP_INCLUDED
28
29#include "../Common/World.hpp"
30
31
32class CaLightWorldT
33{
34    public:
35
36    CaLightWorldT(const char* FileName, ModelManagerT& ModelMan);
37
38    const cf::SceneGraph::BspTreeNodeT& GetBspTree() const { return *World.BspTree; }
39    const ArrayT<PointLightT>&          GetPointLights() const { return World.PointLights; }
40
41    double TraceRay(const Vector3dT& Start, const Vector3dT& Ray) const;
42
43    /// Creates (fake) lightmaps for (brush or bezier patch based) entities.
44    /// The generated lightmaps are only "fakes", i.e. they are not a result of the true Radiosity computations of CaLight.
45    /// Instead, they are obtained by sampling the environment (the world entity) and interpolating the obtained values.
46    /// This of course is only possible after the world has been lit by the true Radiosity process.
47    /// While the disadvantages are clear (objects that have not participated in the original Radiosity computations can
48    /// obviously not blend into the environment visually as smoothly as if they had been there right from the start),
49    /// the advantages are a reasonably quick completion of the computations and independency of the internal data of the
50    /// original Radiosity computations.
51    /// For example, this function can be implemented without reference to the "bins" of the tone-mapping operator of the
52    /// world, which in turn makes the implementation of the "-onlyEnts" command-line option primally possible.
53    void CreateLightMapsForEnts();
54
55    // Forwarded functions.
56    void SaveToDisk(const char* FileName) const;
57
58
59    private:
60
61    WorldT World;
62};
63
64#endif
Note: See TracBrowser for help on using the browser.