2010-01-06 11:28:37 +00:00
|
|
|
/*
|
|
|
|
OpenMW - The completely unofficial reimplementation of Morrowind
|
|
|
|
Copyright (C) 2008-2010 Nicolay Korslund
|
|
|
|
Email: < korslund@gmail.com >
|
|
|
|
WWW: http://openmw.sourceforge.net/
|
|
|
|
|
|
|
|
This file (controlled.h) is part of the OpenMW package.
|
|
|
|
|
|
|
|
OpenMW is distributed as free software: you can redistribute it
|
|
|
|
and/or modify it under the terms of the GNU General Public License
|
|
|
|
version 3, as published by the Free Software Foundation.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but
|
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
version 3 along with this program. If not, see
|
|
|
|
http://www.gnu.org/licenses/ .
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2013-02-24 21:51:56 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_NIF_CONTROLLED_HPP
|
|
|
|
#define OPENMW_COMPONENTS_NIF_CONTROLLED_HPP
|
2010-01-06 11:28:37 +00:00
|
|
|
|
2014-10-19 06:26:44 +00:00
|
|
|
#include "base.hpp"
|
2010-01-06 11:28:37 +00:00
|
|
|
|
|
|
|
namespace Nif
|
|
|
|
{
|
|
|
|
|
2014-10-19 06:26:44 +00:00
|
|
|
class NiSourceTexture : public Named
|
2010-01-06 11:28:37 +00:00
|
|
|
{
|
2010-06-28 01:05:01 +00:00
|
|
|
public:
|
2014-10-19 06:26:44 +00:00
|
|
|
// Is this an external (references a separate texture file) or
|
|
|
|
// internal (data is inside the nif itself) texture?
|
|
|
|
bool external;
|
|
|
|
|
|
|
|
std::string filename; // In case of external textures
|
|
|
|
NiPixelDataPtr data; // In case of internal textures
|
|
|
|
|
|
|
|
/* Pixel layout
|
|
|
|
0 - Palettised
|
|
|
|
1 - High color 16
|
|
|
|
2 - True color 32
|
|
|
|
3 - Compressed
|
|
|
|
4 - Bumpmap
|
|
|
|
5 - Default */
|
|
|
|
int pixel;
|
|
|
|
|
|
|
|
/* Mipmap format
|
|
|
|
0 - no
|
|
|
|
1 - yes
|
|
|
|
2 - default */
|
|
|
|
int mipmap;
|
|
|
|
|
|
|
|
/* Alpha
|
|
|
|
0 - none
|
|
|
|
1 - binary
|
|
|
|
2 - smooth
|
|
|
|
3 - default (use material alpha, or multiply material with texture if present)
|
|
|
|
*/
|
|
|
|
int alpha;
|
2012-07-03 04:41:21 +00:00
|
|
|
|
2015-02-22 18:17:03 +00:00
|
|
|
void read(NIFStream *nif);
|
|
|
|
void post(NIFFile *nif);
|
2010-01-06 11:28:37 +00:00
|
|
|
};
|
2010-01-07 14:51:42 +00:00
|
|
|
|
2010-06-28 01:05:01 +00:00
|
|
|
class NiParticleGrowFade : public Controlled
|
2010-01-07 19:33:29 +00:00
|
|
|
{
|
2010-06-28 01:05:01 +00:00
|
|
|
public:
|
2013-04-04 08:26:57 +00:00
|
|
|
float growTime;
|
|
|
|
float fadeTime;
|
|
|
|
|
2015-02-22 18:17:03 +00:00
|
|
|
void read(NIFStream *nif);
|
2010-01-07 19:33:29 +00:00
|
|
|
};
|
|
|
|
|
2010-06-28 01:05:01 +00:00
|
|
|
class NiParticleColorModifier : public Controlled
|
2010-01-07 19:33:29 +00:00
|
|
|
{
|
2010-06-28 01:05:01 +00:00
|
|
|
public:
|
2012-07-03 04:41:21 +00:00
|
|
|
NiColorDataPtr data;
|
|
|
|
|
2015-02-22 18:17:03 +00:00
|
|
|
void read(NIFStream *nif);
|
|
|
|
void post(NIFFile *nif);
|
2010-01-07 19:33:29 +00:00
|
|
|
};
|
|
|
|
|
2010-06-28 01:05:01 +00:00
|
|
|
class NiGravity : public Controlled
|
2010-01-07 19:33:29 +00:00
|
|
|
{
|
2010-06-28 01:05:01 +00:00
|
|
|
public:
|
2013-04-08 01:15:23 +00:00
|
|
|
float mForce;
|
|
|
|
/* 0 - Wind (fixed direction)
|
|
|
|
* 1 - Point (fixed origin)
|
|
|
|
*/
|
|
|
|
int mType;
|
2015-04-19 22:37:17 +00:00
|
|
|
float mDecay;
|
2015-02-17 16:08:55 +00:00
|
|
|
osg::Vec3f mPosition;
|
|
|
|
osg::Vec3f mDirection;
|
2013-04-08 01:15:23 +00:00
|
|
|
|
2015-02-22 18:17:03 +00:00
|
|
|
void read(NIFStream *nif);
|
2010-01-07 19:33:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// NiPinaColada
|
2010-06-28 01:05:01 +00:00
|
|
|
class NiPlanarCollider : public Controlled
|
2010-01-07 19:33:29 +00:00
|
|
|
{
|
2010-06-28 01:05:01 +00:00
|
|
|
public:
|
2015-02-22 18:17:03 +00:00
|
|
|
void read(NIFStream *nif);
|
2015-03-25 03:57:01 +00:00
|
|
|
|
|
|
|
float mBounceFactor;
|
|
|
|
|
|
|
|
osg::Vec3f mPlaneNormal;
|
|
|
|
float mPlaneDistance;
|
2010-01-07 19:33:29 +00:00
|
|
|
};
|
|
|
|
|
2010-06-28 01:05:01 +00:00
|
|
|
class NiParticleRotation : public Controlled
|
2010-01-07 19:33:29 +00:00
|
|
|
{
|
2010-06-28 01:05:01 +00:00
|
|
|
public:
|
2015-02-22 18:17:03 +00:00
|
|
|
void read(NIFStream *nif);
|
2010-01-07 19:33:29 +00:00
|
|
|
};
|
|
|
|
|
2014-10-19 06:26:44 +00:00
|
|
|
|
|
|
|
|
2010-01-06 11:28:37 +00:00
|
|
|
} // Namespace
|
|
|
|
#endif
|