OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
controlled.hpp
Go to the documentation of this file.
1 /*
2  OpenMW - The completely unofficial reimplementation of Morrowind
3  Copyright (C) 2008-2010 Nicolay Korslund
4  Email: < korslund@gmail.com >
5  WWW: http://openmw.sourceforge.net/
6 
7  This file (controlled.h) is part of the OpenMW package.
8 
9  OpenMW is distributed as free software: you can redistribute it
10  and/or modify it under the terms of the GNU General Public License
11  version 3, as published by the Free Software Foundation.
12 
13  This program is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  version 3 along with this program. If not, see
20  http://www.gnu.org/licenses/ .
21 
22  */
23 
24 #ifndef OPENMW_COMPONENTS_NIF_CONTROLLED_HPP
25 #define OPENMW_COMPONENTS_NIF_CONTROLLED_HPP
26 
27 #include "base.hpp"
28 
29 namespace Nif
30 {
31 
32 class NiSourceTexture : public Named
33 {
34 public:
35  // Is this an external (references a separate texture file) or
36  // internal (data is inside the nif itself) texture?
37  bool external;
38 
39  std::string filename; // In case of external textures
40  NiPixelDataPtr data; // In case of internal textures
41 
42  /* Pixel layout
43  0 - Palettised
44  1 - High color 16
45  2 - True color 32
46  3 - Compressed
47  4 - Bumpmap
48  5 - Default */
49  int pixel;
50 
51  /* Mipmap format
52  0 - no
53  1 - yes
54  2 - default */
55  int mipmap;
56 
57  /* Alpha
58  0 - none
59  1 - binary
60  2 - smooth
61  3 - default (use material alpha, or multiply material with texture if present)
62  */
63  int alpha;
64 
65  void read(NIFStream *nif);
66  void post(NIFFile *nif);
67 };
68 
70 {
71 public:
72  float growTime;
73  float fadeTime;
74 
75  void read(NIFStream *nif);
76 };
77 
79 {
80 public:
82 
83  void read(NIFStream *nif);
84  void post(NIFFile *nif);
85 };
86 
87 class NiGravity : public Controlled
88 {
89 public:
90  float mForce;
91  /* 0 - Wind (fixed direction)
92  * 1 - Point (fixed origin)
93  */
94  int mType;
95  float mDecay;
96  osg::Vec3f mPosition;
97  osg::Vec3f mDirection;
98 
99  void read(NIFStream *nif);
100 };
101 
102 // NiPinaColada
104 {
105 public:
106  void read(NIFStream *nif);
107 
109 
110  osg::Vec3f mPlaneNormal;
112 };
113 
115 {
116 public:
118  float mRadius;
119  osg::Vec3f mCenter;
120 
121  void read(NIFStream *nif);
122 };
123 
125 {
126 public:
127  void read(NIFStream *nif);
128 };
129 
130 
131 
132 } // Namespace
133 #endif
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:90
float fadeTime
Definition: controlled.hpp:73
Definition: niffile.hpp:17
float mPlaneDistance
Definition: controlled.hpp:111
float mBounceFactor
Definition: controlled.hpp:108
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:64
float mForce
Definition: controlled.hpp:90
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:41
Anything that has a controller.
Definition: base.hpp:40
int mType
Definition: controlled.hpp:94
osg::Vec3f mPosition
Definition: controlled.hpp:96
NiColorDataPtr data
Definition: controlled.hpp:81
float mDecay
Definition: controlled.hpp:95
Definition: controlled.hpp:103
int pixel
Definition: controlled.hpp:49
std::string filename
Definition: controlled.hpp:39
osg::Vec3f mDirection
Definition: controlled.hpp:97
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:34
float mBounceFactor
Definition: controlled.hpp:117
void post(NIFFile *nif)
Does post-processing, after the entire tree is loaded.
Definition: controlled.cpp:47
Definition: controlled.hpp:124
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:78
bool external
Definition: controlled.hpp:37
int mipmap
Definition: controlled.hpp:55
float mRadius
Definition: controlled.hpp:118
Has name, extra-data and controller.
Definition: base.hpp:59
int alpha
Definition: controlled.hpp:63
NiPixelDataPtr data
Definition: controlled.hpp:40
osg::Vec3f mPlaneNormal
Definition: controlled.hpp:110
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:8
Definition: nifstream.hpp:26
Definition: controlled.hpp:32
void post(NIFFile *nif)
Does post-processing, after the entire tree is loaded.
Definition: controlled.cpp:28
Definition: controlled.hpp:114
float growTime
Definition: controlled.hpp:72
Definition: controlled.hpp:69
void read(NIFStream *nif)
Parses the record from file.
Definition: controlled.cpp:53
Definition: controlled.hpp:87
Definition: controlled.hpp:78
osg::Vec3f mCenter
Definition: controlled.hpp:119