2013-02-24 21:51:56 +00:00
|
|
|
#ifndef OPENMW_COMPONENTS_NIF_DATA_HPP
|
|
|
|
#define OPENMW_COMPONENTS_NIF_DATA_HPP
|
2010-01-06 15:22:34 +00:00
|
|
|
|
2022-07-21 11:51:34 +00:00
|
|
|
#include "nifkey.hpp"
|
2023-09-09 22:38:17 +00:00
|
|
|
#include "niftypes.hpp" // NiTransform
|
|
|
|
#include "node.hpp"
|
2022-08-15 21:04:54 +00:00
|
|
|
#include "recordptr.hpp"
|
2015-02-20 16:56:49 +00:00
|
|
|
|
2010-01-06 15:22:34 +00:00
|
|
|
namespace Nif
|
|
|
|
{
|
|
|
|
|
2010-01-06 19:42:32 +00:00
|
|
|
// Common ancestor for several data classes
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiGeometryData : public Record
|
2010-01-06 19:42:32 +00:00
|
|
|
{
|
2023-09-04 21:56:20 +00:00
|
|
|
// Interpretation of Flags field differs depending on the version
|
|
|
|
enum DataFlags
|
|
|
|
{
|
|
|
|
DataFlag_HasUV = 0x0001,
|
|
|
|
DataFlag_NumUVsMask = 0x003F,
|
|
|
|
DataFlag_HasTangents = 0x1000,
|
|
|
|
};
|
|
|
|
|
|
|
|
int32_t mGroupId{ 0 };
|
|
|
|
uint16_t mNumVertices;
|
|
|
|
uint8_t mKeepFlags{ 0 };
|
|
|
|
uint8_t mCompressFlags{ 0 };
|
|
|
|
std::vector<osg::Vec3f> mVertices;
|
|
|
|
uint16_t mDataFlags{ 0 };
|
|
|
|
uint32_t mMaterialHash;
|
|
|
|
std::vector<osg::Vec3f> mNormals, mTangents, mBitangents;
|
2023-09-05 20:30:37 +00:00
|
|
|
osg::BoundingSpheref mBoundingSphere;
|
2023-09-04 21:56:20 +00:00
|
|
|
std::vector<osg::Vec4f> mColors;
|
|
|
|
std::vector<std::vector<osg::Vec2f>> mUVList;
|
|
|
|
uint16_t mConsistencyType;
|
2010-01-06 19:42:32 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2010-01-06 19:42:32 +00:00
|
|
|
};
|
|
|
|
|
2023-02-10 20:06:56 +00:00
|
|
|
// Abstract
|
|
|
|
struct NiTriBasedGeomData : public NiGeometryData
|
|
|
|
{
|
2023-09-03 13:52:10 +00:00
|
|
|
uint16_t mNumTriangles;
|
2023-02-10 20:06:56 +00:00
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct NiTriShapeData : public NiTriBasedGeomData
|
2010-01-06 19:42:32 +00:00
|
|
|
{
|
2012-07-03 04:41:21 +00:00
|
|
|
// Triangles, three vertex indices per triangle
|
2023-09-04 21:08:28 +00:00
|
|
|
std::vector<unsigned short> mTriangles;
|
|
|
|
std::vector<std::vector<unsigned short>> mMatchGroups;
|
2012-07-03 04:41:21 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2010-01-06 19:42:32 +00:00
|
|
|
};
|
|
|
|
|
2023-02-10 20:06:56 +00:00
|
|
|
struct NiTriStripsData : public NiTriBasedGeomData
|
2019-08-08 10:11:24 +00:00
|
|
|
{
|
|
|
|
// Triangle strips, series of vertex indices.
|
2023-09-03 14:41:52 +00:00
|
|
|
std::vector<std::vector<unsigned short>> mStrips;
|
2019-08-08 10:11:24 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2019-08-08 10:11:24 +00:00
|
|
|
};
|
|
|
|
|
2020-05-30 14:59:36 +00:00
|
|
|
struct NiLinesData : public NiGeometryData
|
|
|
|
{
|
|
|
|
// Lines, series of indices that correspond to connected vertices.
|
2023-09-03 13:52:10 +00:00
|
|
|
// NB: assumes <=65536 number of vertices
|
|
|
|
std::vector<uint16_t> mLines;
|
2020-05-30 14:59:36 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2020-05-30 14:59:36 +00:00
|
|
|
};
|
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiPosData : public Record
|
2010-01-07 14:51:42 +00:00
|
|
|
{
|
2015-03-22 22:47:49 +00:00
|
|
|
Vector3KeyMapPtr mKeyList;
|
2012-07-12 15:00:26 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2010-01-07 18:11:03 +00:00
|
|
|
};
|
2010-01-07 14:51:42 +00:00
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiUVData : public Record
|
2010-01-07 14:51:42 +00:00
|
|
|
{
|
2023-09-03 13:52:10 +00:00
|
|
|
std::array<FloatKeyMapPtr, 4> mKeyList;
|
2012-07-12 15:00:26 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2010-01-07 14:51:42 +00:00
|
|
|
};
|
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiFloatData : public Record
|
2010-01-07 14:51:42 +00:00
|
|
|
{
|
2015-03-22 22:47:49 +00:00
|
|
|
FloatKeyMapPtr mKeyList;
|
2012-07-12 15:00:26 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2010-01-07 14:51:42 +00:00
|
|
|
};
|
|
|
|
|
2023-09-03 17:49:09 +00:00
|
|
|
struct NiPixelFormat
|
2016-02-15 15:49:58 +00:00
|
|
|
{
|
2023-09-03 17:49:09 +00:00
|
|
|
enum class Format : uint32_t
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-03 17:49:09 +00:00
|
|
|
RGB = 0,
|
|
|
|
RGBA = 1,
|
|
|
|
Palette = 2,
|
|
|
|
PaletteAlpha = 3,
|
|
|
|
BGR = 4,
|
|
|
|
BGRA = 5,
|
|
|
|
DXT1 = 6,
|
|
|
|
DXT3 = 7,
|
|
|
|
DXT5 = 8,
|
2022-09-22 18:26:05 +00:00
|
|
|
};
|
|
|
|
|
2023-09-03 17:49:09 +00:00
|
|
|
struct ChannelData
|
|
|
|
{
|
|
|
|
enum class Type : uint32_t
|
|
|
|
{
|
|
|
|
Red = 0,
|
|
|
|
Green = 1,
|
|
|
|
Blue = 2,
|
|
|
|
Alpha = 3,
|
|
|
|
Compressed = 4,
|
|
|
|
OffsetU = 5,
|
|
|
|
OffsetV = 6,
|
|
|
|
OffsetW = 7,
|
|
|
|
OffsetQ = 8,
|
|
|
|
Luma = 9,
|
|
|
|
Height = 10,
|
|
|
|
VectorX = 11,
|
|
|
|
VectorY = 12,
|
|
|
|
VectorZ = 13,
|
|
|
|
Padding = 14,
|
|
|
|
Intensity = 15,
|
|
|
|
Index = 16,
|
|
|
|
Depth = 17,
|
|
|
|
Stencil = 18,
|
|
|
|
Empty = 19,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class Convention : uint32_t
|
|
|
|
{
|
|
|
|
NormInt = 0,
|
|
|
|
Half = 1,
|
|
|
|
Float = 2,
|
|
|
|
Index = 3,
|
|
|
|
Compressed = 4,
|
|
|
|
Unknown = 5,
|
|
|
|
Int = 6,
|
|
|
|
};
|
|
|
|
|
|
|
|
Type mType;
|
|
|
|
Convention mConvention;
|
|
|
|
uint8_t mBitsPerChannel;
|
|
|
|
bool mSigned;
|
|
|
|
|
|
|
|
void read(NIFStream* nif);
|
|
|
|
};
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-09-03 17:49:09 +00:00
|
|
|
Format mFormat{ Format::RGB };
|
|
|
|
std::array<uint32_t, 4> mColorMasks;
|
|
|
|
uint32_t mBitsPerPixel{ 0 };
|
|
|
|
uint32_t mPixelTiling{ 0 };
|
|
|
|
std::array<uint32_t, 2> mCompareBits;
|
|
|
|
uint32_t mRendererHint{ 0 };
|
|
|
|
uint32_t mExtraData{ 0 };
|
|
|
|
uint8_t mFlags{ 0 };
|
|
|
|
bool mUseSrgb{ false };
|
|
|
|
std::array<ChannelData, 4> mChannels;
|
|
|
|
|
|
|
|
void read(NIFStream* nif);
|
|
|
|
};
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-09-03 17:49:09 +00:00
|
|
|
struct NiPixelData : public Record
|
|
|
|
{
|
2016-02-15 15:49:58 +00:00
|
|
|
struct Mipmap
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-03 17:49:09 +00:00
|
|
|
uint32_t mWidth, mHeight;
|
|
|
|
uint32_t mOffset;
|
2022-09-22 18:26:05 +00:00
|
|
|
};
|
|
|
|
|
2023-09-03 17:49:09 +00:00
|
|
|
NiPixelFormat mPixelFormat;
|
|
|
|
NiPalettePtr mPalette;
|
|
|
|
uint32_t mBytesPerPixel;
|
|
|
|
std::vector<Mipmap> mMipmaps;
|
|
|
|
uint32_t mNumFaces{ 1 };
|
|
|
|
std::vector<uint8_t> mData;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2022-09-17 17:24:42 +00:00
|
|
|
void post(Reader& nif) override;
|
2016-02-15 15:49:58 +00:00
|
|
|
};
|
|
|
|
|
2021-01-09 09:36:40 +00:00
|
|
|
struct NiColorData : public Record
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2021-01-09 09:36:40 +00:00
|
|
|
Vector4KeyMapPtr mKeyMap;
|
2019-08-12 22:20:30 +00:00
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
2021-01-09 09:36:40 +00:00
|
|
|
};
|
2010-01-07 14:51:42 +00:00
|
|
|
|
2016-02-15 15:49:58 +00:00
|
|
|
struct NiVisData : public Record
|
|
|
|
{
|
2023-09-13 21:15:02 +00:00
|
|
|
// TODO: investigate possible use of BoolKeyMap
|
2023-09-03 15:43:08 +00:00
|
|
|
std::shared_ptr<std::map<float, bool>> mKeys;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2016-02-15 15:49:58 +00:00
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
2012-07-03 04:41:21 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
struct NiSkinInstance : public Record
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-03 12:21:42 +00:00
|
|
|
NiSkinDataPtr mData;
|
|
|
|
NiSkinPartitionPtr mPartitions;
|
2023-09-10 02:23:25 +00:00
|
|
|
NiAVObjectPtr mRoot;
|
|
|
|
NiAVObjectList mBones;
|
2010-01-07 14:51:42 +00:00
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2022-09-17 17:24:42 +00:00
|
|
|
void post(Reader& nif) override;
|
2023-12-03 15:20:05 +00:00
|
|
|
|
|
|
|
const Nif::NiSkinPartition* getPartitions() const;
|
2012-07-10 09:38:35 +00:00
|
|
|
};
|
|
|
|
|
2021-11-10 16:40:02 +00:00
|
|
|
struct BSDismemberSkinInstance : public NiSkinInstance
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-03 12:21:42 +00:00
|
|
|
struct BodyPart
|
|
|
|
{
|
|
|
|
uint16_t mFlags;
|
|
|
|
uint16_t mType;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<BodyPart> mParts;
|
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2010-01-07 14:51:42 +00:00
|
|
|
};
|
|
|
|
|
2023-09-27 09:17:44 +00:00
|
|
|
struct BSSkinInstance : Record
|
|
|
|
{
|
|
|
|
NiAVObjectPtr mRoot;
|
|
|
|
BSSkinBoneDataPtr mData;
|
|
|
|
NiAVObjectList mBones;
|
|
|
|
std::vector<osg::Vec3f> mScales;
|
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
void post(Reader& nif) override;
|
|
|
|
};
|
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiSkinData : public Record
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-04 22:18:37 +00:00
|
|
|
using VertWeight = std::pair<unsigned short, float>;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
struct BoneInfo
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-09 22:38:17 +00:00
|
|
|
NiTransform mTransform;
|
2023-09-04 22:18:37 +00:00
|
|
|
osg::BoundingSpheref mBoundSphere;
|
|
|
|
std::vector<VertWeight> mWeights;
|
2022-09-22 18:26:05 +00:00
|
|
|
};
|
2010-01-24 14:17:50 +00:00
|
|
|
|
2023-09-09 22:38:17 +00:00
|
|
|
NiTransform mTransform;
|
2023-09-04 22:18:37 +00:00
|
|
|
std::vector<BoneInfo> mBones;
|
|
|
|
NiSkinPartitionPtr mPartitions;
|
2010-01-24 14:17:50 +00:00
|
|
|
|
2021-11-10 16:40:02 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2022-09-17 17:24:42 +00:00
|
|
|
void post(Reader& nif) override;
|
2021-11-10 16:40:02 +00:00
|
|
|
};
|
|
|
|
|
2023-09-27 09:17:44 +00:00
|
|
|
struct BSSkinBoneData : Record
|
|
|
|
{
|
|
|
|
struct BoneInfo
|
|
|
|
{
|
|
|
|
osg::BoundingSpheref mBoundSphere;
|
|
|
|
NiTransform mTransform;
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<BoneInfo> mBones;
|
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiSkinPartition : public Record
|
2012-07-03 04:41:21 +00:00
|
|
|
{
|
2015-04-21 18:56:16 +00:00
|
|
|
struct Partition
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2023-09-05 20:19:35 +00:00
|
|
|
std::vector<unsigned short> mBones;
|
|
|
|
std::vector<unsigned short> mVertexMap;
|
|
|
|
std::vector<float> mWeights;
|
|
|
|
std::vector<std::vector<unsigned short>> mStrips;
|
|
|
|
std::vector<unsigned short> mTriangles;
|
|
|
|
std::vector<char> mBoneIndices;
|
2023-07-09 10:14:27 +00:00
|
|
|
BSVertexDesc mVertexDesc;
|
2023-09-05 20:19:35 +00:00
|
|
|
std::vector<unsigned short> mTrueTriangles;
|
|
|
|
std::vector<std::vector<unsigned short>> mTrueStrips;
|
|
|
|
uint8_t mLODLevel;
|
|
|
|
bool mGlobalVB;
|
2023-07-16 00:06:00 +00:00
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
void read(NIFStream* nif);
|
2022-09-22 18:26:05 +00:00
|
|
|
};
|
2023-07-09 10:14:27 +00:00
|
|
|
std::vector<Partition> mPartitions;
|
|
|
|
|
|
|
|
unsigned int mDataSize;
|
|
|
|
unsigned int mVertexSize;
|
|
|
|
BSVertexDesc mVertexDesc;
|
|
|
|
std::vector<BSVertexData> mVertexData;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2012-07-03 04:41:21 +00:00
|
|
|
};
|
2012-07-10 09:38:35 +00:00
|
|
|
|
2012-07-03 04:41:21 +00:00
|
|
|
struct NiMorphData : public Record
|
|
|
|
{
|
2015-02-20 16:56:49 +00:00
|
|
|
struct MorphData
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2015-02-20 16:56:49 +00:00
|
|
|
FloatKeyMapPtr mKeyFrames;
|
2015-03-26 22:15:46 +00:00
|
|
|
std::vector<osg::Vec3f> mVertices;
|
|
|
|
};
|
2023-09-03 13:29:42 +00:00
|
|
|
|
|
|
|
uint8_t mRelativeTargets;
|
2012-07-10 03:53:54 +00:00
|
|
|
std::vector<MorphData> mMorphs;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2012-07-10 03:53:54 +00:00
|
|
|
void read(NIFStream* nif) override;
|
2012-07-03 04:41:21 +00:00
|
|
|
};
|
2010-01-24 12:49:38 +00:00
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
struct NiKeyframeData : public Record
|
|
|
|
{
|
2015-03-22 22:47:49 +00:00
|
|
|
QuaternionKeyMapPtr mRotations;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
// may be NULL
|
|
|
|
FloatKeyMapPtr mXRotations;
|
2015-03-22 22:47:49 +00:00
|
|
|
FloatKeyMapPtr mYRotations;
|
|
|
|
FloatKeyMapPtr mZRotations;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
Vector3KeyMapPtr mTranslations;
|
|
|
|
FloatKeyMapPtr mScales;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2023-09-04 21:11:41 +00:00
|
|
|
enum class AxisOrder : uint32_t
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2022-02-18 17:47:34 +00:00
|
|
|
Order_XYZ = 0,
|
|
|
|
Order_XZY = 1,
|
|
|
|
Order_YZX = 2,
|
|
|
|
Order_YXZ = 3,
|
|
|
|
Order_ZXY = 4,
|
|
|
|
Order_ZYX = 5,
|
|
|
|
Order_XYX = 6,
|
|
|
|
Order_YZY = 7,
|
|
|
|
Order_ZXZ = 8
|
2022-09-22 18:26:05 +00:00
|
|
|
};
|
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
AxisOrder mAxisOrder{ AxisOrder::Order_XYZ };
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2020-11-07 01:04:46 +00:00
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
2010-01-07 18:11:03 +00:00
|
|
|
|
2020-10-16 18:18:54 +00:00
|
|
|
struct NiPalette : public Record
|
2022-09-22 18:26:05 +00:00
|
|
|
{
|
2020-10-16 18:18:54 +00:00
|
|
|
// 32-bit RGBA colors that correspond to 8-bit indices
|
2023-09-03 13:29:42 +00:00
|
|
|
std::vector<uint32_t> mColors;
|
2010-01-07 14:51:42 +00:00
|
|
|
|
2012-07-13 03:55:11 +00:00
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
2014-12-05 19:58:03 +00:00
|
|
|
|
2015-03-22 22:47:49 +00:00
|
|
|
struct NiStringPalette : public Record
|
2022-02-18 17:47:34 +00:00
|
|
|
{
|
2023-09-03 13:29:42 +00:00
|
|
|
std::string mPalette;
|
|
|
|
|
2022-02-18 17:47:34 +00:00
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
|
|
|
|
2020-12-15 22:06:05 +00:00
|
|
|
struct NiBoolData : public Record
|
2019-08-12 22:20:30 +00:00
|
|
|
{
|
2023-09-13 21:15:02 +00:00
|
|
|
BoolKeyMapPtr mKeyList;
|
|
|
|
|
2020-11-07 00:40:21 +00:00
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
|
|
|
|
2023-09-20 01:57:10 +00:00
|
|
|
struct NiAdditionalGeometryData : public Record
|
|
|
|
{
|
|
|
|
struct DataStream
|
|
|
|
{
|
|
|
|
uint32_t mType;
|
|
|
|
uint32_t mUnitSize;
|
|
|
|
uint32_t mTotalSize;
|
|
|
|
uint32_t mStride;
|
|
|
|
uint32_t mBlockIndex;
|
|
|
|
uint32_t mBlockOffset;
|
|
|
|
uint8_t mFlags;
|
|
|
|
|
|
|
|
void read(NIFStream* nif);
|
|
|
|
};
|
|
|
|
|
|
|
|
struct DataBlock
|
|
|
|
{
|
|
|
|
bool mValid;
|
|
|
|
uint32_t mBlockSize;
|
|
|
|
std::vector<uint32_t> mBlockOffsets;
|
|
|
|
std::vector<uint32_t> mDataSizes;
|
|
|
|
std::vector<char> mData;
|
|
|
|
uint32_t mShaderIndex;
|
|
|
|
uint32_t mTotalSize;
|
|
|
|
|
|
|
|
void read(NIFStream* nif, bool bsPacked);
|
|
|
|
};
|
|
|
|
|
|
|
|
uint16_t mNumVertices;
|
|
|
|
std::vector<DataStream> mBlockInfos;
|
|
|
|
std::vector<DataBlock> mBlocks;
|
|
|
|
|
|
|
|
void read(NIFStream* nif);
|
|
|
|
};
|
|
|
|
|
2023-05-22 19:28:05 +00:00
|
|
|
struct BSMultiBound : public Record
|
|
|
|
{
|
|
|
|
BSMultiBoundDataPtr mData;
|
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
void post(Reader& nif) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Abstract
|
|
|
|
struct BSMultiBoundData : public Record
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2023-09-20 00:42:59 +00:00
|
|
|
struct BSMultiBoundAABB : public BSMultiBoundData
|
|
|
|
{
|
|
|
|
osg::Vec3f mPosition;
|
|
|
|
osg::Vec3f mExtents;
|
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
|
|
|
|
2023-05-22 19:28:05 +00:00
|
|
|
struct BSMultiBoundOBB : public BSMultiBoundData
|
|
|
|
{
|
|
|
|
osg::Vec3f mCenter;
|
|
|
|
osg::Vec3f mSize;
|
|
|
|
Nif::Matrix3 mRotation;
|
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BSMultiBoundSphere : public BSMultiBoundData
|
|
|
|
{
|
2023-09-05 20:30:37 +00:00
|
|
|
osg::BoundingSpheref mSphere;
|
2023-05-22 19:28:05 +00:00
|
|
|
|
|
|
|
void read(NIFStream* nif) override;
|
|
|
|
};
|
2023-08-03 19:55:06 +00:00
|
|
|
|
2023-09-09 22:38:17 +00:00
|
|
|
}
|
2010-01-06 15:22:34 +00:00
|
|
|
#endif
|