From 65b5e2e923a3a789432da9f304244151e770cd23 Mon Sep 17 00:00:00 2001 From: Tazpn <tazpn@users.sourceforge.net> Date: Sun, 6 Aug 2006 17:09:22 +0000 Subject: [PATCH] 1. Restructure Max projects to use VC++ 2005 2. Start adding Collision import in to max importer 3. Fix bug with Glossiness in Exporter 4. Alter Exporter to use ini file instead of Registry if ini is present 5. Alter Exporter to share UPB values with Reactor 6. Remove duplicate niflib directory --- NifCommon/AppSettings.cpp | 159 + NifCommon/AppSettings.h | 122 + NifCommon/NifCommon_VC80.vcproj | 533 + NifGui.cpp => NifCommon/NifGui.cpp | 0 NifGui.h => NifCommon/NifGui.h | 0 NifPlugins.cpp => NifCommon/NifPlugins.cpp | 0 NifPlugins.h => NifCommon/NifPlugins.h | 27 +- {NifImport => NifCommon}/niutils.cpp | 19 +- {NifImport => NifCommon}/niutils.h | 9 + NifCommon/pch.cpp | 8 + NifCommon/pch.h | 30 + NifExport/Coll.cpp | 61 +- NifExport/Config.cpp | 108 +- NifExport/Exporter.cpp | 40 +- NifExport/Exporter.h | 12 +- NifExport/MtlTex.cpp | 48 +- NifExport/NifExport.cpp | 47 +- NifExport/NifExport.def | 1 - NifExport/NifExport_VC80.vcproj | 1024 ++ NifExport/NvTriStrip/NvTriStrip.cpp | 2 +- NifExport/NvTriStrip/NvTriStripObjects.cpp | 3 + NifExport/niflib/NIF_Blocks.cpp | 4963 ------ NifExport/niflib/NIF_Blocks.h | 3130 ---- NifExport/niflib/NIF_IO.cpp | 679 - NifExport/niflib/NIF_IO.h | 577 - NifExport/niflib/Ref.h | 173 - NifExport/niflib/SConstruct | 60 - NifExport/niflib/Type.cpp | 33 - NifExport/niflib/Type.h | 32 - NifExport/niflib/dll_export.h | 29 - NifExport/niflib/gen/AVObject.cpp | 12 - NifExport/niflib/gen/AVObject.h | 33 - NifExport/niflib/gen/BoundingBox.cpp | 11 - NifExport/niflib/gen/BoundingBox.h | 39 - NifExport/niflib/gen/ByteArray.cpp | 11 - NifExport/niflib/gen/ByteArray.h | 31 - NifExport/niflib/gen/ControllerLink.cpp | 15 - NifExport/niflib/gen/ControllerLink.h | 123 - NifExport/niflib/gen/Footer.cpp | 47 - NifExport/niflib/gen/Footer.h | 42 - NifExport/niflib/gen/FurniturePosition.cpp | 11 - NifExport/niflib/gen/FurniturePosition.h | 41 - NifExport/niflib/gen/Header.cpp | 123 - NifExport/niflib/gen/Header.h | 92 - NifExport/niflib/gen/KeyGroup.h | 33 - NifExport/niflib/gen/LODRange.cpp | 11 - NifExport/niflib/gen/LODRange.h | 31 - .../niflib/gen/LimitedHingeDescriptor.cpp | 11 - NifExport/niflib/gen/LimitedHingeDescriptor.h | 63 - NifExport/niflib/gen/MatchGroup.cpp | 11 - NifExport/niflib/gen/MatchGroup.h | 31 - NifExport/niflib/gen/MipMap.cpp | 11 - NifExport/niflib/gen/MipMap.h | 35 - NifExport/niflib/gen/Morph.cpp | 11 - NifExport/niflib/gen/Morph.h | 48 - NifExport/niflib/gen/NodeGroup.cpp | 12 - NifExport/niflib/gen/NodeGroup.h | 35 - NifExport/niflib/gen/Particle.cpp | 11 - NifExport/niflib/gen/Particle.h | 51 - NifExport/niflib/gen/QuaternionXYZW.cpp | 11 - NifExport/niflib/gen/QuaternionXYZW.h | 39 - NifExport/niflib/gen/RagDollDescriptor.cpp | 11 - NifExport/niflib/gen/RagDollDescriptor.h | 71 - NifExport/niflib/gen/RotationKeyArray.h | 32 - NifExport/niflib/gen/ShaderTexDesc.cpp | 13 - NifExport/niflib/gen/ShaderTexDesc.h | 37 - NifExport/niflib/gen/ShortString.cpp | 11 - NifExport/niflib/gen/ShortString.h | 33 - NifExport/niflib/gen/SkinData.cpp | 12 - NifExport/niflib/gen/SkinData.h | 52 - NifExport/niflib/gen/SkinPartition.cpp | 23 - NifExport/niflib/gen/SkinPartition.h | 93 - NifExport/niflib/gen/SkinShape.cpp | 13 - NifExport/niflib/gen/SkinShape.h | 36 - NifExport/niflib/gen/SkinShapeGroup.cpp | 14 - NifExport/niflib/gen/SkinShapeGroup.h | 34 - NifExport/niflib/gen/SkinWeight.cpp | 11 - NifExport/niflib/gen/SkinWeight.h | 31 - NifExport/niflib/gen/StringPalette.cpp | 11 - NifExport/niflib/gen/StringPalette.h | 31 - NifExport/niflib/gen/TBC.cpp | 11 - NifExport/niflib/gen/TBC.h | 35 - NifExport/niflib/gen/TexDesc.cpp | 12 - NifExport/niflib/gen/TexDesc.h | 79 - NifExport/niflib/gen/TexSource.cpp | 13 - NifExport/niflib/gen/TexSource.h | 57 - NifExport/niflib/gen/hkTriangle.cpp | 11 - NifExport/niflib/gen/hkTriangle.h | 36 - NifExport/niflib/gen/obj_defines.h | 5819 ------- NifExport/niflib/gen/obj_factories.cpp | 557 - NifExport/niflib/gen/obj_impl.cpp | 13135 ---------------- NifExport/niflib/kfm.cpp | 140 - NifExport/niflib/kfm.h | 73 - NifExport/niflib/nif_attrs.h | 1381 -- NifExport/niflib/nif_math.cpp | 538 - NifExport/niflib/nif_math.h | 891 -- NifExport/niflib/niflib.cpp | 959 -- NifExport/niflib/niflib.h | 587 - NifExport/niflib/niflib.sln | 22 - NifExport/niflib/niflib.vcproj | 1881 --- NifExport/niflib/obj/ABoneLODController.cpp | 39 - NifExport/niflib/obj/ABoneLODController.h | 46 - NifExport/niflib/obj/AKeyedData.cpp | 37 - NifExport/niflib/obj/AKeyedData.h | 41 - NifExport/niflib/obj/APSysCtlr.cpp | 37 - NifExport/niflib/obj/APSysCtlr.h | 42 - NifExport/niflib/obj/APSysData.cpp | 37 - NifExport/niflib/obj/APSysData.h | 41 - NifExport/niflib/obj/AParticleModifier.cpp | 38 - NifExport/niflib/obj/AParticleModifier.h | 47 - NifExport/niflib/obj/AbhkConstraint.cpp | 38 - NifExport/niflib/obj/AbhkConstraint.h | 44 - .../niflib/obj/AbhkRagdollConstraint.cpp | 37 - NifExport/niflib/obj/AbhkRagdollConstraint.h | 42 - NifExport/niflib/obj/AbhkShapeCollection.cpp | 37 - NifExport/niflib/obj/AbhkShapeCollection.h | 42 - NifExport/niflib/obj/AvoidNode.cpp | 37 - NifExport/niflib/obj/AvoidNode.h | 41 - NifExport/niflib/obj/BSBound.cpp | 37 - NifExport/niflib/obj/BSBound.h | 41 - NifExport/niflib/obj/BSFurnitureMarker.cpp | 47 - NifExport/niflib/obj/BSFurnitureMarker.h | 48 - NifExport/niflib/obj/BSKeyframeController.cpp | 38 - NifExport/niflib/obj/BSKeyframeController.h | 47 - NifExport/niflib/obj/BSPSysArrayEmitter.cpp | 37 - NifExport/niflib/obj/BSPSysArrayEmitter.h | 41 - .../niflib/obj/BSParentVelocityModifier.cpp | 37 - .../niflib/obj/BSParentVelocityModifier.h | 41 - NifExport/niflib/obj/BSXFlags.cpp | 44 - NifExport/niflib/obj/BSXFlags.h | 45 - NifExport/niflib/obj/FxButton.cpp | 37 - NifExport/niflib/obj/FxButton.h | 41 - NifExport/niflib/obj/FxRadioButton.cpp | 38 - NifExport/niflib/obj/FxRadioButton.h | 47 - NifExport/niflib/obj/FxWidget.cpp | 37 - NifExport/niflib/obj/FxWidget.h | 41 - NifExport/niflib/obj/NiAVObject.cpp | 152 - NifExport/niflib/obj/NiAVObject.cpp.bak | 152 - NifExport/niflib/obj/NiAVObject.h | 94 - NifExport/niflib/obj/NiAVObject.h.bak | 94 - NifExport/niflib/obj/NiAlphaController.cpp | 38 - NifExport/niflib/obj/NiAlphaController.h | 47 - NifExport/niflib/obj/NiAlphaProperty.cpp | 105 - NifExport/niflib/obj/NiAlphaProperty.h | 91 - NifExport/niflib/obj/NiAmbientLight.cpp | 37 - NifExport/niflib/obj/NiAmbientLight.h | 41 - .../niflib/obj/NiAutoNormalParticles.cpp | 37 - NifExport/niflib/obj/NiAutoNormalParticles.h | 41 - .../niflib/obj/NiAutoNormalParticlesData.cpp | 37 - .../niflib/obj/NiAutoNormalParticlesData.h | 43 - NifExport/niflib/obj/NiBSAnimationNode.cpp | 37 - NifExport/niflib/obj/NiBSAnimationNode.h | 42 - .../niflib/obj/NiBSBoneLODController.cpp | 37 - NifExport/niflib/obj/NiBSBoneLODController.h | 41 - NifExport/niflib/obj/NiBSPArrayController.cpp | 37 - NifExport/niflib/obj/NiBSPArrayController.h | 42 - NifExport/niflib/obj/NiBSParticleNode.cpp | 37 - NifExport/niflib/obj/NiBSParticleNode.h | 41 - NifExport/niflib/obj/NiBSplineBasisData.cpp | 37 - NifExport/niflib/obj/NiBSplineBasisData.h | 41 - .../obj/NiBSplineCompFloatInterpolator.cpp | 37 - .../obj/NiBSplineCompFloatInterpolator.h | 41 - .../obj/NiBSplineCompPoint3Interpolator.cpp | 39 - .../obj/NiBSplineCompPoint3Interpolator.h | 48 - .../NiBSplineCompTransformInterpolator.cpp | 39 - .../obj/NiBSplineCompTransformInterpolator.h | 48 - NifExport/niflib/obj/NiBSplineData.cpp | 37 - NifExport/niflib/obj/NiBSplineData.h | 41 - .../niflib/obj/NiBSplineInterpolator.cpp | 37 - NifExport/niflib/obj/NiBSplineInterpolator.h | 42 - NifExport/niflib/obj/NiBillboardNode.cpp | 37 - NifExport/niflib/obj/NiBillboardNode.h | 43 - NifExport/niflib/obj/NiBinaryExtraData.cpp | 47 - NifExport/niflib/obj/NiBinaryExtraData.h | 47 - .../niflib/obj/NiBlendBoolInterpolator.cpp | 37 - .../niflib/obj/NiBlendBoolInterpolator.h | 42 - .../niflib/obj/NiBlendFloatInterpolator.cpp | 37 - .../niflib/obj/NiBlendFloatInterpolator.h | 42 - NifExport/niflib/obj/NiBlendInterpolator.cpp | 37 - NifExport/niflib/obj/NiBlendInterpolator.h | 41 - .../niflib/obj/NiBlendPoint3Interpolator.cpp | 37 - .../niflib/obj/NiBlendPoint3Interpolator.h | 42 - .../obj/NiBlendTransformInterpolator.cpp | 37 - .../niflib/obj/NiBlendTransformInterpolator.h | 41 - NifExport/niflib/obj/NiBoneLODController.cpp | 42 - NifExport/niflib/obj/NiBoneLODController.h | 48 - NifExport/niflib/obj/NiBoolData.cpp | 53 - NifExport/niflib/obj/NiBoolData.h | 67 - NifExport/niflib/obj/NiBoolInterpolator.cpp | 38 - NifExport/niflib/obj/NiBoolInterpolator.h | 47 - .../niflib/obj/NiBoolTimelineInterpolator.cpp | 38 - .../niflib/obj/NiBoolTimelineInterpolator.h | 47 - NifExport/niflib/obj/NiBooleanExtraData.cpp | 44 - NifExport/niflib/obj/NiBooleanExtraData.h | 45 - NifExport/niflib/obj/NiCamera.cpp | 38 - NifExport/niflib/obj/NiCamera.h | 47 - NifExport/niflib/obj/NiCollisionData.cpp | 38 - NifExport/niflib/obj/NiCollisionData.h | 44 - NifExport/niflib/obj/NiCollisionObject.cpp | 50 - .../niflib/obj/NiCollisionObject.cpp.bak | 45 - NifExport/niflib/obj/NiCollisionObject.h | 52 - NifExport/niflib/obj/NiCollisionObject.h.bak | 51 - NifExport/niflib/obj/NiColorData.cpp | 54 - NifExport/niflib/obj/NiColorData.h | 66 - NifExport/niflib/obj/NiColorExtraData.cpp | 44 - NifExport/niflib/obj/NiColorExtraData.h | 45 - NifExport/niflib/obj/NiControllerManager.cpp | 39 - NifExport/niflib/obj/NiControllerManager.h | 49 - NifExport/niflib/obj/NiControllerSequence.cpp | 148 - NifExport/niflib/obj/NiControllerSequence.h | 86 - .../niflib/obj/NiDefaultAVObjectPalette.cpp | 39 - .../niflib/obj/NiDefaultAVObjectPalette.h | 46 - NifExport/niflib/obj/NiDirectionalLight.cpp | 37 - NifExport/niflib/obj/NiDirectionalLight.h | 41 - NifExport/niflib/obj/NiDitherProperty.cpp | 45 - NifExport/niflib/obj/NiDitherProperty.h | 45 - NifExport/niflib/obj/NiDynamicEffect.cpp | 38 - NifExport/niflib/obj/NiDynamicEffect.h | 47 - NifExport/niflib/obj/NiExtraData.cpp | 59 - NifExport/niflib/obj/NiExtraData.h | 77 - NifExport/niflib/obj/NiFlipController.cpp | 38 - NifExport/niflib/obj/NiFlipController.h | 47 - NifExport/niflib/obj/NiFloatData.cpp | 55 - NifExport/niflib/obj/NiFloatData.h | 67 - NifExport/niflib/obj/NiFloatExtraData.cpp | 44 - NifExport/niflib/obj/NiFloatExtraData.h | 45 - .../niflib/obj/NiFloatExtraDataController.cpp | 38 - .../niflib/obj/NiFloatExtraDataController.h | 48 - NifExport/niflib/obj/NiFloatInterpolator.cpp | 38 - NifExport/niflib/obj/NiFloatInterpolator.h | 47 - NifExport/niflib/obj/NiFloatsExtraData.cpp | 45 - NifExport/niflib/obj/NiFloatsExtraData.h | 45 - NifExport/niflib/obj/NiFogProperty.cpp | 61 - NifExport/niflib/obj/NiFogProperty.h | 51 - .../niflib/obj/NiGeomMorpherController.cpp | 55 - .../niflib/obj/NiGeomMorpherController.h | 54 - NifExport/niflib/obj/NiGravity.cpp | 37 - NifExport/niflib/obj/NiGravity.h | 41 - NifExport/niflib/obj/NiIntegerExtraData.cpp | 44 - NifExport/niflib/obj/NiIntegerExtraData.h | 45 - NifExport/niflib/obj/NiIntegersExtraData.cpp | 45 - NifExport/niflib/obj/NiIntegersExtraData.h | 47 - NifExport/niflib/obj/NiInterpolator.cpp | 37 - NifExport/niflib/obj/NiInterpolator.h | 41 - NifExport/niflib/obj/NiKeyframeController.cpp | 45 - NifExport/niflib/obj/NiKeyframeController.h | 51 - NifExport/niflib/obj/NiKeyframeData.cpp | 135 - NifExport/niflib/obj/NiKeyframeData.h | 193 - NifExport/niflib/obj/NiLODNode.cpp | 39 - NifExport/niflib/obj/NiLODNode.h | 50 - NifExport/niflib/obj/NiLight.cpp | 37 - NifExport/niflib/obj/NiLight.h | 42 - .../niflib/obj/NiLightColorController.cpp | 54 - NifExport/niflib/obj/NiLightColorController.h | 55 - .../niflib/obj/NiLightDimmerController.cpp | 38 - .../niflib/obj/NiLightDimmerController.h | 47 - NifExport/niflib/obj/NiLookAtController.cpp | 38 - NifExport/niflib/obj/NiLookAtController.h | 48 - NifExport/niflib/obj/NiLookAtInterpolator.cpp | 40 - NifExport/niflib/obj/NiLookAtInterpolator.h | 49 - .../niflib/obj/NiMaterialColorController.cpp | 38 - .../niflib/obj/NiMaterialColorController.h | 47 - NifExport/niflib/obj/NiMaterialProperty.cpp | 92 - NifExport/niflib/obj/NiMaterialProperty.h | 64 - NifExport/niflib/obj/NiMeshPSysData.cpp | 39 - NifExport/niflib/obj/NiMeshPSysData.h | 48 - NifExport/niflib/obj/NiMeshParticleSystem.cpp | 37 - NifExport/niflib/obj/NiMeshParticleSystem.h | 41 - NifExport/niflib/obj/NiMorphData.cpp | 92 - NifExport/niflib/obj/NiMorphData.h | 108 - .../obj/NiMultiTargetTransformController.cpp | 38 - .../obj/NiMultiTargetTransformController.h | 44 - NifExport/niflib/obj/NiNode.cpp | 314 - NifExport/niflib/obj/NiNode.h | 96 - NifExport/niflib/obj/NiObject.cpp | 69 - NifExport/niflib/obj/NiObject.h | 226 - NifExport/niflib/obj/NiObjectNET.cpp | 173 - NifExport/niflib/obj/NiObjectNET.h | 69 - .../niflib/obj/NiPSysAgeDeathModifier.cpp | 38 - NifExport/niflib/obj/NiPSysAgeDeathModifier.h | 47 - NifExport/niflib/obj/NiPSysBombModifier.cpp | 38 - NifExport/niflib/obj/NiPSysBombModifier.h | 44 - .../niflib/obj/NiPSysBoundUpdateModifier.cpp | 37 - .../niflib/obj/NiPSysBoundUpdateModifier.h | 42 - NifExport/niflib/obj/NiPSysBoxEmitter.cpp | 37 - NifExport/niflib/obj/NiPSysBoxEmitter.h | 42 - .../niflib/obj/NiPSysColliderManager.cpp | 38 - NifExport/niflib/obj/NiPSysColliderManager.h | 47 - NifExport/niflib/obj/NiPSysColorModifier.cpp | 38 - NifExport/niflib/obj/NiPSysColorModifier.h | 47 - .../niflib/obj/NiPSysCylinderEmitter.cpp | 37 - NifExport/niflib/obj/NiPSysCylinderEmitter.h | 42 - NifExport/niflib/obj/NiPSysData.cpp | 37 - NifExport/niflib/obj/NiPSysData.h | 41 - NifExport/niflib/obj/NiPSysDragModifier.cpp | 38 - NifExport/niflib/obj/NiPSysDragModifier.h | 44 - NifExport/niflib/obj/NiPSysEmitter.cpp | 37 - NifExport/niflib/obj/NiPSysEmitter.h | 42 - NifExport/niflib/obj/NiPSysEmitterCtlr.cpp | 39 - NifExport/niflib/obj/NiPSysEmitterCtlr.h | 48 - .../niflib/obj/NiPSysEmitterCtlrData.cpp | 38 - NifExport/niflib/obj/NiPSysEmitterCtlrData.h | 45 - .../obj/NiPSysEmitterDeclinationCtlr.cpp | 37 - .../niflib/obj/NiPSysEmitterDeclinationCtlr.h | 41 - .../obj/NiPSysEmitterDeclinationVarCtlr.cpp | 37 - .../obj/NiPSysEmitterDeclinationVarCtlr.h | 41 - .../obj/NiPSysEmitterInitialRadiusCtlr.cpp | 37 - .../obj/NiPSysEmitterInitialRadiusCtlr.h | 41 - .../niflib/obj/NiPSysEmitterLifeSpanCtlr.cpp | 37 - .../niflib/obj/NiPSysEmitterLifeSpanCtlr.h | 41 - .../niflib/obj/NiPSysEmitterSpeedCtlr.cpp | 37 - NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.h | 41 - .../niflib/obj/NiPSysGravityModifier.cpp | 38 - NifExport/niflib/obj/NiPSysGravityModifier.h | 44 - .../niflib/obj/NiPSysGravityStrengthCtlr.cpp | 37 - .../niflib/obj/NiPSysGravityStrengthCtlr.h | 41 - .../niflib/obj/NiPSysGrowFadeModifier.cpp | 37 - NifExport/niflib/obj/NiPSysGrowFadeModifier.h | 42 - NifExport/niflib/obj/NiPSysMeshEmitter.cpp | 38 - NifExport/niflib/obj/NiPSysMeshEmitter.h | 47 - .../niflib/obj/NiPSysMeshUpdateModifier.cpp | 38 - .../niflib/obj/NiPSysMeshUpdateModifier.h | 47 - NifExport/niflib/obj/NiPSysModifier.cpp | 38 - NifExport/niflib/obj/NiPSysModifier.h | 44 - .../niflib/obj/NiPSysModifierActiveCtlr.cpp | 37 - .../niflib/obj/NiPSysModifierActiveCtlr.h | 41 - NifExport/niflib/obj/NiPSysPlanarCollider.cpp | 40 - NifExport/niflib/obj/NiPSysPlanarCollider.h | 49 - .../niflib/obj/NiPSysPositionModifier.cpp | 37 - NifExport/niflib/obj/NiPSysPositionModifier.h | 41 - .../niflib/obj/NiPSysResetOnLoopCtlr.cpp | 37 - NifExport/niflib/obj/NiPSysResetOnLoopCtlr.h | 41 - .../niflib/obj/NiPSysRotationModifier.cpp | 37 - NifExport/niflib/obj/NiPSysRotationModifier.h | 42 - NifExport/niflib/obj/NiPSysSpawnModifier.cpp | 37 - NifExport/niflib/obj/NiPSysSpawnModifier.h | 42 - NifExport/niflib/obj/NiPSysSphereEmitter.cpp | 37 - NifExport/niflib/obj/NiPSysSphereEmitter.h | 42 - NifExport/niflib/obj/NiPSysUpdateCtlr.cpp | 37 - NifExport/niflib/obj/NiPSysUpdateCtlr.h | 41 - NifExport/niflib/obj/NiPSysVolumeEmitter.cpp | 38 - NifExport/niflib/obj/NiPSysVolumeEmitter.h | 44 - NifExport/niflib/obj/NiPalette.cpp | 63 - NifExport/niflib/obj/NiPalette.h | 52 - NifExport/niflib/obj/NiParticleBomb.cpp | 37 - NifExport/niflib/obj/NiParticleBomb.h | 41 - .../niflib/obj/NiParticleColorModifier.cpp | 38 - .../niflib/obj/NiParticleColorModifier.h | 47 - NifExport/niflib/obj/NiParticleGrowFade.cpp | 37 - NifExport/niflib/obj/NiParticleGrowFade.h | 45 - .../niflib/obj/NiParticleMeshModifier.cpp | 38 - NifExport/niflib/obj/NiParticleMeshModifier.h | 47 - NifExport/niflib/obj/NiParticleMeshes.cpp | 37 - NifExport/niflib/obj/NiParticleMeshes.h | 41 - NifExport/niflib/obj/NiParticleMeshesData.cpp | 38 - NifExport/niflib/obj/NiParticleMeshesData.h | 47 - NifExport/niflib/obj/NiParticleRotation.cpp | 37 - NifExport/niflib/obj/NiParticleRotation.h | 41 - NifExport/niflib/obj/NiParticleSystem.cpp | 38 - NifExport/niflib/obj/NiParticleSystem.h | 47 - .../niflib/obj/NiParticleSystemController.cpp | 40 - .../niflib/obj/NiParticleSystemController.h | 50 - NifExport/niflib/obj/NiParticles.cpp | 37 - NifExport/niflib/obj/NiParticles.h | 41 - NifExport/niflib/obj/NiParticlesData.cpp | 37 - NifExport/niflib/obj/NiParticlesData.h | 42 - NifExport/niflib/obj/NiPathController.cpp | 54 - NifExport/niflib/obj/NiPathController.h | 54 - NifExport/niflib/obj/NiPathInterpolator.cpp | 39 - NifExport/niflib/obj/NiPathInterpolator.h | 48 - NifExport/niflib/obj/NiPixelData.cpp | 351 - NifExport/niflib/obj/NiPixelData.h | 87 - NifExport/niflib/obj/NiPlanarCollider.cpp | 37 - NifExport/niflib/obj/NiPlanarCollider.h | 41 - NifExport/niflib/obj/NiPoint3Interpolator.cpp | 38 - NifExport/niflib/obj/NiPoint3Interpolator.h | 47 - NifExport/niflib/obj/NiPointLight.cpp | 37 - NifExport/niflib/obj/NiPointLight.h | 42 - NifExport/niflib/obj/NiPosData.cpp | 54 - NifExport/niflib/obj/NiPosData.h | 67 - NifExport/niflib/obj/NiProperty.cpp | 38 - NifExport/niflib/obj/NiProperty.h | 41 - NifExport/niflib/obj/NiRangeLODData.cpp | 38 - NifExport/niflib/obj/NiRangeLODData.h | 45 - NifExport/niflib/obj/NiRotatingParticles.cpp | 37 - NifExport/niflib/obj/NiRotatingParticles.h | 41 - .../niflib/obj/NiRotatingParticlesData.cpp | 37 - .../niflib/obj/NiRotatingParticlesData.h | 41 - NifExport/niflib/obj/NiScreenLODData.cpp | 37 - NifExport/niflib/obj/NiScreenLODData.h | 41 - .../niflib/obj/NiSequenceStreamHelper.cpp | 37 - NifExport/niflib/obj/NiSequenceStreamHelper.h | 41 - NifExport/niflib/obj/NiShadeProperty.cpp | 44 - NifExport/niflib/obj/NiShadeProperty.h | 46 - .../obj/NiSingleInterpolatorController.cpp | 45 - .../obj/NiSingleInterpolatorController.h | 50 - NifExport/niflib/obj/NiSkinData.cpp | 58 - NifExport/niflib/obj/NiSkinData.h | 52 - NifExport/niflib/obj/NiSkinInstance.cpp | 135 - NifExport/niflib/obj/NiSkinInstance.h | 83 - NifExport/niflib/obj/NiSkinPartition.cpp | 38 - NifExport/niflib/obj/NiSkinPartition.h | 47 - NifExport/niflib/obj/NiSourceTexture.cpp | 113 - NifExport/niflib/obj/NiSourceTexture.h | 76 - NifExport/niflib/obj/NiSpecularProperty.cpp | 44 - NifExport/niflib/obj/NiSpecularProperty.h | 45 - NifExport/niflib/obj/NiSphericalCollider.cpp | 37 - NifExport/niflib/obj/NiSphericalCollider.h | 41 - NifExport/niflib/obj/NiSpotLight.cpp | 37 - NifExport/niflib/obj/NiSpotLight.h | 42 - NifExport/niflib/obj/NiStencilProperty.cpp | 108 - NifExport/niflib/obj/NiStencilProperty.h | 70 - NifExport/niflib/obj/NiStringExtraData.cpp | 45 - NifExport/niflib/obj/NiStringExtraData.h | 47 - NifExport/niflib/obj/NiStringPalette.cpp | 77 - NifExport/niflib/obj/NiStringPalette.h | 52 - NifExport/niflib/obj/NiStringsExtraData.cpp | 45 - NifExport/niflib/obj/NiStringsExtraData.h | 46 - NifExport/niflib/obj/NiTextKeyExtraData.cpp | 45 - NifExport/niflib/obj/NiTextKeyExtraData.h | 56 - NifExport/niflib/obj/NiTextureEffect.cpp | 38 - NifExport/niflib/obj/NiTextureEffect.h | 50 - .../obj/NiTextureTransformController.cpp | 38 - .../niflib/obj/NiTextureTransformController.h | 47 - NifExport/niflib/obj/NiTexturingProperty.cpp | 264 - NifExport/niflib/obj/NiTexturingProperty.h | 153 - NifExport/niflib/obj/NiTimeController.cpp | 93 - NifExport/niflib/obj/NiTimeController.h | 86 - .../niflib/obj/NiTransformController.cpp | 37 - NifExport/niflib/obj/NiTransformController.h | 42 - NifExport/niflib/obj/NiTransformData.cpp | 37 - NifExport/niflib/obj/NiTransformData.h | 41 - .../niflib/obj/NiTransformInterpolator.cpp | 38 - .../niflib/obj/NiTransformInterpolator.h | 47 - NifExport/niflib/obj/NiTriBasedGeom.cpp | 77 - NifExport/niflib/obj/NiTriBasedGeom.h | 63 - NifExport/niflib/obj/NiTriBasedGeomData.cpp | 135 - NifExport/niflib/obj/NiTriBasedGeomData.h | 138 - NifExport/niflib/obj/NiTriShape.cpp | 37 - NifExport/niflib/obj/NiTriShape.h | 41 - NifExport/niflib/obj/NiTriShapeData.cpp | 80 - NifExport/niflib/obj/NiTriShapeData.h | 81 - NifExport/niflib/obj/NiTriStrips.cpp | 37 - NifExport/niflib/obj/NiTriStrips.h | 42 - NifExport/niflib/obj/NiTriStripsData.cpp | 112 - NifExport/niflib/obj/NiTriStripsData.h | 82 - NifExport/niflib/obj/NiUVController.cpp | 45 - NifExport/niflib/obj/NiUVController.h | 51 - NifExport/niflib/obj/NiUVData.cpp | 38 - NifExport/niflib/obj/NiUVData.h | 44 - NifExport/niflib/obj/NiVectorExtraData.cpp | 45 - NifExport/niflib/obj/NiVectorExtraData.h | 46 - .../niflib/obj/NiVertWeightsExtraData.cpp | 46 - NifExport/niflib/obj/NiVertWeightsExtraData.h | 46 - .../niflib/obj/NiVertexColorProperty.cpp | 60 - NifExport/niflib/obj/NiVertexColorProperty.h | 54 - NifExport/niflib/obj/NiVisController.cpp | 38 - NifExport/niflib/obj/NiVisController.h | 47 - NifExport/niflib/obj/NiVisData.cpp | 37 - NifExport/niflib/obj/NiVisData.h | 42 - NifExport/niflib/obj/NiWireframeProperty.cpp | 45 - NifExport/niflib/obj/NiWireframeProperty.h | 45 - NifExport/niflib/obj/NiZBufferProperty.cpp | 52 - NifExport/niflib/obj/NiZBufferProperty.h | 49 - NifExport/niflib/obj/RootCollisionNode.cpp | 37 - NifExport/niflib/obj/RootCollisionNode.h | 41 - .../niflib/obj/bhkBlendCollisionObject.cpp | 37 - .../niflib/obj/bhkBlendCollisionObject.h | 41 - NifExport/niflib/obj/bhkBlendController.cpp | 37 - NifExport/niflib/obj/bhkBlendController.h | 42 - NifExport/niflib/obj/bhkBoxShape.cpp | 41 - NifExport/niflib/obj/bhkBoxShape.h | 44 - NifExport/niflib/obj/bhkCapsuleShape.cpp | 58 - NifExport/niflib/obj/bhkCapsuleShape.h | 49 - NifExport/niflib/obj/bhkCollisionObject.cpp | 40 - NifExport/niflib/obj/bhkCollisionObject.h | 41 - NifExport/niflib/obj/bhkConvexShape.cpp | 37 - NifExport/niflib/obj/bhkConvexShape.h | 41 - .../niflib/obj/bhkConvexTransformShape.cpp | 37 - .../niflib/obj/bhkConvexTransformShape.h | 41 - .../niflib/obj/bhkConvexVerticesShape.cpp | 37 - NifExport/niflib/obj/bhkConvexVerticesShape.h | 41 - NifExport/niflib/obj/bhkEntity.cpp | 47 - NifExport/niflib/obj/bhkEntity.cpp.bak | 38 - NifExport/niflib/obj/bhkEntity.h | 50 - NifExport/niflib/obj/bhkEntity.h.bak | 47 - NifExport/niflib/obj/bhkHingeConstraint.cpp | 37 - NifExport/niflib/obj/bhkHingeConstraint.h | 41 - .../niflib/obj/bhkLimitedHingeConstraint.cpp | 38 - .../niflib/obj/bhkLimitedHingeConstraint.h | 45 - NifExport/niflib/obj/bhkListShape.cpp | 38 - NifExport/niflib/obj/bhkListShape.h | 47 - .../niflib/obj/bhkMalleableConstraint.cpp | 40 - NifExport/niflib/obj/bhkMalleableConstraint.h | 49 - NifExport/niflib/obj/bhkMoppBvTreeShape.cpp | 38 - NifExport/niflib/obj/bhkMoppBvTreeShape.h | 48 - NifExport/niflib/obj/bhkMultiSphereShape.cpp | 37 - NifExport/niflib/obj/bhkMultiSphereShape.h | 41 - NifExport/niflib/obj/bhkNiTriStripsShape.cpp | 70 - .../niflib/obj/bhkNiTriStripsShape.cpp.bak | 38 - NifExport/niflib/obj/bhkNiTriStripsShape.h | 56 - .../niflib/obj/bhkNiTriStripsShape.h.bak | 47 - .../niflib/obj/bhkPackedNiTriStripsShape.cpp | 38 - .../niflib/obj/bhkPackedNiTriStripsShape.h | 47 - .../niflib/obj/bhkPrismaticConstraint.cpp | 37 - NifExport/niflib/obj/bhkPrismaticConstraint.h | 41 - NifExport/niflib/obj/bhkRagdollConstraint.cpp | 37 - NifExport/niflib/obj/bhkRagdollConstraint.h | 41 - NifExport/niflib/obj/bhkRefObject.cpp | 37 - NifExport/niflib/obj/bhkRefObject.h | 41 - NifExport/niflib/obj/bhkRigidBody.cpp | 108 - NifExport/niflib/obj/bhkRigidBody.h | 63 - NifExport/niflib/obj/bhkRigidBodyT.cpp | 37 - NifExport/niflib/obj/bhkRigidBodyT.h | 41 - NifExport/niflib/obj/bhkSPCollisionObject.cpp | 37 - NifExport/niflib/obj/bhkSPCollisionObject.h | 41 - NifExport/niflib/obj/bhkSerializable.cpp | 37 - NifExport/niflib/obj/bhkSerializable.h | 42 - NifExport/niflib/obj/bhkShape.cpp | 37 - NifExport/niflib/obj/bhkShape.h | 41 - .../niflib/obj/bhkSimpleShapePhantom.cpp | 37 - NifExport/niflib/obj/bhkSimpleShapePhantom.h | 41 - NifExport/niflib/obj/bhkSphereRepShape.cpp | 41 - NifExport/niflib/obj/bhkSphereRepShape.h | 45 - NifExport/niflib/obj/bhkSphereShape.cpp | 41 - NifExport/niflib/obj/bhkSphereShape.h | 44 - .../niflib/obj/bhkStiffSpringConstraint.cpp | 37 - .../niflib/obj/bhkStiffSpringConstraint.h | 41 - NifExport/niflib/obj/bhkTransformShape.cpp | 37 - NifExport/niflib/obj/bhkTransformShape.h | 42 - NifExport/niflib/obj/bhkWorldObject.cpp | 37 - NifExport/niflib/obj/bhkWorldObject.h | 41 - .../niflib/obj/hkPackedNiTriStripsData.cpp | 38 - .../niflib/obj/hkPackedNiTriStripsData.h | 45 - NifExport/niflib/pch.cpp | 2 - NifExport/niflib/pch.h | 256 - NifExport/niflib/py_niflib.vcproj | 398 - NifExport/niflib/pyniflib.i | 1257 -- NifExport/niflib/pyniflib.sln | 20 - NifExport/pch.cpp | 4 + NifExport/pch.h | 47 +- NifFurniture/NifFurniture.cpp | 4 +- NifFurniture/NifFurniture.def | 1 - NifFurniture/NifFurniture_VC80.vcproj | 667 + NifImport/ImportCollision.cpp | 210 + NifImport/ImportMtlAndTex.cpp | 1 - NifImport/ImportSkeleton.cpp | 36 +- NifImport/MaxNifImport_VC80.vcproj | 807 + NifImport/MaxNifTools.ini | 135 - NifImport/NIFImport.cpp | 14 +- NifImport/NIFImporter.h | 9 + NifPlugins_Development_Readme.txt | 47 + NifPlugins_VC80.sln | 122 + NifProps/NifProps.cpp | 19 +- NifProps/NifProps.def | 1 - NifProps/NifProps_VC80.vcproj | 668 + 556 files changed, 4779 insertions(+), 61627 deletions(-) create mode 100644 NifCommon/AppSettings.cpp create mode 100644 NifCommon/AppSettings.h create mode 100644 NifCommon/NifCommon_VC80.vcproj rename NifGui.cpp => NifCommon/NifGui.cpp (100%) mode change 100755 => 100644 rename NifGui.h => NifCommon/NifGui.h (100%) mode change 100755 => 100644 rename NifPlugins.cpp => NifCommon/NifPlugins.cpp (100%) mode change 100755 => 100644 rename NifPlugins.h => NifCommon/NifPlugins.h (80%) mode change 100755 => 100644 rename {NifImport => NifCommon}/niutils.cpp (95%) rename {NifImport => NifCommon}/niutils.h (94%) create mode 100644 NifCommon/pch.cpp create mode 100644 NifCommon/pch.h create mode 100644 NifExport/NifExport_VC80.vcproj delete mode 100755 NifExport/niflib/NIF_Blocks.cpp delete mode 100755 NifExport/niflib/NIF_Blocks.h delete mode 100755 NifExport/niflib/NIF_IO.cpp delete mode 100755 NifExport/niflib/NIF_IO.h delete mode 100755 NifExport/niflib/Ref.h delete mode 100755 NifExport/niflib/SConstruct delete mode 100755 NifExport/niflib/Type.cpp delete mode 100755 NifExport/niflib/Type.h delete mode 100755 NifExport/niflib/dll_export.h delete mode 100755 NifExport/niflib/gen/AVObject.cpp delete mode 100755 NifExport/niflib/gen/AVObject.h delete mode 100755 NifExport/niflib/gen/BoundingBox.cpp delete mode 100755 NifExport/niflib/gen/BoundingBox.h delete mode 100755 NifExport/niflib/gen/ByteArray.cpp delete mode 100755 NifExport/niflib/gen/ByteArray.h delete mode 100755 NifExport/niflib/gen/ControllerLink.cpp delete mode 100755 NifExport/niflib/gen/ControllerLink.h delete mode 100755 NifExport/niflib/gen/Footer.cpp delete mode 100755 NifExport/niflib/gen/Footer.h delete mode 100755 NifExport/niflib/gen/FurniturePosition.cpp delete mode 100755 NifExport/niflib/gen/FurniturePosition.h delete mode 100755 NifExport/niflib/gen/Header.cpp delete mode 100755 NifExport/niflib/gen/Header.h delete mode 100755 NifExport/niflib/gen/KeyGroup.h delete mode 100755 NifExport/niflib/gen/LODRange.cpp delete mode 100755 NifExport/niflib/gen/LODRange.h delete mode 100755 NifExport/niflib/gen/LimitedHingeDescriptor.cpp delete mode 100755 NifExport/niflib/gen/LimitedHingeDescriptor.h delete mode 100755 NifExport/niflib/gen/MatchGroup.cpp delete mode 100755 NifExport/niflib/gen/MatchGroup.h delete mode 100755 NifExport/niflib/gen/MipMap.cpp delete mode 100755 NifExport/niflib/gen/MipMap.h delete mode 100755 NifExport/niflib/gen/Morph.cpp delete mode 100755 NifExport/niflib/gen/Morph.h delete mode 100755 NifExport/niflib/gen/NodeGroup.cpp delete mode 100755 NifExport/niflib/gen/NodeGroup.h delete mode 100755 NifExport/niflib/gen/Particle.cpp delete mode 100755 NifExport/niflib/gen/Particle.h delete mode 100755 NifExport/niflib/gen/QuaternionXYZW.cpp delete mode 100755 NifExport/niflib/gen/QuaternionXYZW.h delete mode 100755 NifExport/niflib/gen/RagDollDescriptor.cpp delete mode 100755 NifExport/niflib/gen/RagDollDescriptor.h delete mode 100755 NifExport/niflib/gen/RotationKeyArray.h delete mode 100755 NifExport/niflib/gen/ShaderTexDesc.cpp delete mode 100755 NifExport/niflib/gen/ShaderTexDesc.h delete mode 100755 NifExport/niflib/gen/ShortString.cpp delete mode 100755 NifExport/niflib/gen/ShortString.h delete mode 100755 NifExport/niflib/gen/SkinData.cpp delete mode 100755 NifExport/niflib/gen/SkinData.h delete mode 100755 NifExport/niflib/gen/SkinPartition.cpp delete mode 100755 NifExport/niflib/gen/SkinPartition.h delete mode 100755 NifExport/niflib/gen/SkinShape.cpp delete mode 100755 NifExport/niflib/gen/SkinShape.h delete mode 100755 NifExport/niflib/gen/SkinShapeGroup.cpp delete mode 100755 NifExport/niflib/gen/SkinShapeGroup.h delete mode 100755 NifExport/niflib/gen/SkinWeight.cpp delete mode 100755 NifExport/niflib/gen/SkinWeight.h delete mode 100755 NifExport/niflib/gen/StringPalette.cpp delete mode 100755 NifExport/niflib/gen/StringPalette.h delete mode 100755 NifExport/niflib/gen/TBC.cpp delete mode 100755 NifExport/niflib/gen/TBC.h delete mode 100755 NifExport/niflib/gen/TexDesc.cpp delete mode 100755 NifExport/niflib/gen/TexDesc.h delete mode 100755 NifExport/niflib/gen/TexSource.cpp delete mode 100755 NifExport/niflib/gen/TexSource.h delete mode 100755 NifExport/niflib/gen/hkTriangle.cpp delete mode 100755 NifExport/niflib/gen/hkTriangle.h delete mode 100755 NifExport/niflib/gen/obj_defines.h delete mode 100755 NifExport/niflib/gen/obj_factories.cpp delete mode 100755 NifExport/niflib/gen/obj_impl.cpp delete mode 100755 NifExport/niflib/kfm.cpp delete mode 100755 NifExport/niflib/kfm.h delete mode 100755 NifExport/niflib/nif_attrs.h delete mode 100755 NifExport/niflib/nif_math.cpp delete mode 100755 NifExport/niflib/nif_math.h delete mode 100755 NifExport/niflib/niflib.cpp delete mode 100755 NifExport/niflib/niflib.h delete mode 100755 NifExport/niflib/niflib.sln delete mode 100755 NifExport/niflib/niflib.vcproj delete mode 100755 NifExport/niflib/obj/ABoneLODController.cpp delete mode 100755 NifExport/niflib/obj/ABoneLODController.h delete mode 100755 NifExport/niflib/obj/AKeyedData.cpp delete mode 100755 NifExport/niflib/obj/AKeyedData.h delete mode 100755 NifExport/niflib/obj/APSysCtlr.cpp delete mode 100755 NifExport/niflib/obj/APSysCtlr.h delete mode 100755 NifExport/niflib/obj/APSysData.cpp delete mode 100755 NifExport/niflib/obj/APSysData.h delete mode 100755 NifExport/niflib/obj/AParticleModifier.cpp delete mode 100755 NifExport/niflib/obj/AParticleModifier.h delete mode 100755 NifExport/niflib/obj/AbhkConstraint.cpp delete mode 100755 NifExport/niflib/obj/AbhkConstraint.h delete mode 100755 NifExport/niflib/obj/AbhkRagdollConstraint.cpp delete mode 100755 NifExport/niflib/obj/AbhkRagdollConstraint.h delete mode 100755 NifExport/niflib/obj/AbhkShapeCollection.cpp delete mode 100755 NifExport/niflib/obj/AbhkShapeCollection.h delete mode 100755 NifExport/niflib/obj/AvoidNode.cpp delete mode 100755 NifExport/niflib/obj/AvoidNode.h delete mode 100755 NifExport/niflib/obj/BSBound.cpp delete mode 100755 NifExport/niflib/obj/BSBound.h delete mode 100755 NifExport/niflib/obj/BSFurnitureMarker.cpp delete mode 100755 NifExport/niflib/obj/BSFurnitureMarker.h delete mode 100755 NifExport/niflib/obj/BSKeyframeController.cpp delete mode 100755 NifExport/niflib/obj/BSKeyframeController.h delete mode 100755 NifExport/niflib/obj/BSPSysArrayEmitter.cpp delete mode 100755 NifExport/niflib/obj/BSPSysArrayEmitter.h delete mode 100755 NifExport/niflib/obj/BSParentVelocityModifier.cpp delete mode 100755 NifExport/niflib/obj/BSParentVelocityModifier.h delete mode 100755 NifExport/niflib/obj/BSXFlags.cpp delete mode 100755 NifExport/niflib/obj/BSXFlags.h delete mode 100755 NifExport/niflib/obj/FxButton.cpp delete mode 100755 NifExport/niflib/obj/FxButton.h delete mode 100755 NifExport/niflib/obj/FxRadioButton.cpp delete mode 100755 NifExport/niflib/obj/FxRadioButton.h delete mode 100755 NifExport/niflib/obj/FxWidget.cpp delete mode 100755 NifExport/niflib/obj/FxWidget.h delete mode 100755 NifExport/niflib/obj/NiAVObject.cpp delete mode 100755 NifExport/niflib/obj/NiAVObject.cpp.bak delete mode 100755 NifExport/niflib/obj/NiAVObject.h delete mode 100755 NifExport/niflib/obj/NiAVObject.h.bak delete mode 100755 NifExport/niflib/obj/NiAlphaController.cpp delete mode 100755 NifExport/niflib/obj/NiAlphaController.h delete mode 100755 NifExport/niflib/obj/NiAlphaProperty.cpp delete mode 100755 NifExport/niflib/obj/NiAlphaProperty.h delete mode 100755 NifExport/niflib/obj/NiAmbientLight.cpp delete mode 100755 NifExport/niflib/obj/NiAmbientLight.h delete mode 100755 NifExport/niflib/obj/NiAutoNormalParticles.cpp delete mode 100755 NifExport/niflib/obj/NiAutoNormalParticles.h delete mode 100755 NifExport/niflib/obj/NiAutoNormalParticlesData.cpp delete mode 100755 NifExport/niflib/obj/NiAutoNormalParticlesData.h delete mode 100755 NifExport/niflib/obj/NiBSAnimationNode.cpp delete mode 100755 NifExport/niflib/obj/NiBSAnimationNode.h delete mode 100755 NifExport/niflib/obj/NiBSBoneLODController.cpp delete mode 100755 NifExport/niflib/obj/NiBSBoneLODController.h delete mode 100755 NifExport/niflib/obj/NiBSPArrayController.cpp delete mode 100755 NifExport/niflib/obj/NiBSPArrayController.h delete mode 100755 NifExport/niflib/obj/NiBSParticleNode.cpp delete mode 100755 NifExport/niflib/obj/NiBSParticleNode.h delete mode 100755 NifExport/niflib/obj/NiBSplineBasisData.cpp delete mode 100755 NifExport/niflib/obj/NiBSplineBasisData.h delete mode 100755 NifExport/niflib/obj/NiBSplineCompFloatInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBSplineCompFloatInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.h delete mode 100755 NifExport/niflib/obj/NiBSplineCompTransformInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBSplineCompTransformInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBSplineData.cpp delete mode 100755 NifExport/niflib/obj/NiBSplineData.h delete mode 100755 NifExport/niflib/obj/NiBSplineInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBSplineInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBillboardNode.cpp delete mode 100755 NifExport/niflib/obj/NiBillboardNode.h delete mode 100755 NifExport/niflib/obj/NiBinaryExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiBinaryExtraData.h delete mode 100755 NifExport/niflib/obj/NiBlendBoolInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBlendBoolInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBlendFloatInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBlendFloatInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBlendInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBlendInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBlendPoint3Interpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBlendPoint3Interpolator.h delete mode 100755 NifExport/niflib/obj/NiBlendTransformInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBlendTransformInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBoneLODController.cpp delete mode 100755 NifExport/niflib/obj/NiBoneLODController.h delete mode 100755 NifExport/niflib/obj/NiBoolData.cpp delete mode 100755 NifExport/niflib/obj/NiBoolData.h delete mode 100755 NifExport/niflib/obj/NiBoolInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBoolInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBoolTimelineInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiBoolTimelineInterpolator.h delete mode 100755 NifExport/niflib/obj/NiBooleanExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiBooleanExtraData.h delete mode 100755 NifExport/niflib/obj/NiCamera.cpp delete mode 100755 NifExport/niflib/obj/NiCamera.h delete mode 100755 NifExport/niflib/obj/NiCollisionData.cpp delete mode 100755 NifExport/niflib/obj/NiCollisionData.h delete mode 100755 NifExport/niflib/obj/NiCollisionObject.cpp delete mode 100755 NifExport/niflib/obj/NiCollisionObject.cpp.bak delete mode 100755 NifExport/niflib/obj/NiCollisionObject.h delete mode 100755 NifExport/niflib/obj/NiCollisionObject.h.bak delete mode 100755 NifExport/niflib/obj/NiColorData.cpp delete mode 100755 NifExport/niflib/obj/NiColorData.h delete mode 100755 NifExport/niflib/obj/NiColorExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiColorExtraData.h delete mode 100755 NifExport/niflib/obj/NiControllerManager.cpp delete mode 100755 NifExport/niflib/obj/NiControllerManager.h delete mode 100755 NifExport/niflib/obj/NiControllerSequence.cpp delete mode 100755 NifExport/niflib/obj/NiControllerSequence.h delete mode 100755 NifExport/niflib/obj/NiDefaultAVObjectPalette.cpp delete mode 100755 NifExport/niflib/obj/NiDefaultAVObjectPalette.h delete mode 100755 NifExport/niflib/obj/NiDirectionalLight.cpp delete mode 100755 NifExport/niflib/obj/NiDirectionalLight.h delete mode 100755 NifExport/niflib/obj/NiDitherProperty.cpp delete mode 100755 NifExport/niflib/obj/NiDitherProperty.h delete mode 100755 NifExport/niflib/obj/NiDynamicEffect.cpp delete mode 100755 NifExport/niflib/obj/NiDynamicEffect.h delete mode 100755 NifExport/niflib/obj/NiExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiExtraData.h delete mode 100755 NifExport/niflib/obj/NiFlipController.cpp delete mode 100755 NifExport/niflib/obj/NiFlipController.h delete mode 100755 NifExport/niflib/obj/NiFloatData.cpp delete mode 100755 NifExport/niflib/obj/NiFloatData.h delete mode 100755 NifExport/niflib/obj/NiFloatExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiFloatExtraData.h delete mode 100755 NifExport/niflib/obj/NiFloatExtraDataController.cpp delete mode 100755 NifExport/niflib/obj/NiFloatExtraDataController.h delete mode 100755 NifExport/niflib/obj/NiFloatInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiFloatInterpolator.h delete mode 100755 NifExport/niflib/obj/NiFloatsExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiFloatsExtraData.h delete mode 100755 NifExport/niflib/obj/NiFogProperty.cpp delete mode 100755 NifExport/niflib/obj/NiFogProperty.h delete mode 100755 NifExport/niflib/obj/NiGeomMorpherController.cpp delete mode 100755 NifExport/niflib/obj/NiGeomMorpherController.h delete mode 100755 NifExport/niflib/obj/NiGravity.cpp delete mode 100755 NifExport/niflib/obj/NiGravity.h delete mode 100755 NifExport/niflib/obj/NiIntegerExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiIntegerExtraData.h delete mode 100755 NifExport/niflib/obj/NiIntegersExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiIntegersExtraData.h delete mode 100755 NifExport/niflib/obj/NiInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiInterpolator.h delete mode 100755 NifExport/niflib/obj/NiKeyframeController.cpp delete mode 100755 NifExport/niflib/obj/NiKeyframeController.h delete mode 100755 NifExport/niflib/obj/NiKeyframeData.cpp delete mode 100755 NifExport/niflib/obj/NiKeyframeData.h delete mode 100755 NifExport/niflib/obj/NiLODNode.cpp delete mode 100755 NifExport/niflib/obj/NiLODNode.h delete mode 100755 NifExport/niflib/obj/NiLight.cpp delete mode 100755 NifExport/niflib/obj/NiLight.h delete mode 100755 NifExport/niflib/obj/NiLightColorController.cpp delete mode 100755 NifExport/niflib/obj/NiLightColorController.h delete mode 100755 NifExport/niflib/obj/NiLightDimmerController.cpp delete mode 100755 NifExport/niflib/obj/NiLightDimmerController.h delete mode 100755 NifExport/niflib/obj/NiLookAtController.cpp delete mode 100755 NifExport/niflib/obj/NiLookAtController.h delete mode 100755 NifExport/niflib/obj/NiLookAtInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiLookAtInterpolator.h delete mode 100755 NifExport/niflib/obj/NiMaterialColorController.cpp delete mode 100755 NifExport/niflib/obj/NiMaterialColorController.h delete mode 100755 NifExport/niflib/obj/NiMaterialProperty.cpp delete mode 100755 NifExport/niflib/obj/NiMaterialProperty.h delete mode 100755 NifExport/niflib/obj/NiMeshPSysData.cpp delete mode 100755 NifExport/niflib/obj/NiMeshPSysData.h delete mode 100755 NifExport/niflib/obj/NiMeshParticleSystem.cpp delete mode 100755 NifExport/niflib/obj/NiMeshParticleSystem.h delete mode 100755 NifExport/niflib/obj/NiMorphData.cpp delete mode 100755 NifExport/niflib/obj/NiMorphData.h delete mode 100755 NifExport/niflib/obj/NiMultiTargetTransformController.cpp delete mode 100755 NifExport/niflib/obj/NiMultiTargetTransformController.h delete mode 100755 NifExport/niflib/obj/NiNode.cpp delete mode 100755 NifExport/niflib/obj/NiNode.h delete mode 100755 NifExport/niflib/obj/NiObject.cpp delete mode 100755 NifExport/niflib/obj/NiObject.h delete mode 100755 NifExport/niflib/obj/NiObjectNET.cpp delete mode 100755 NifExport/niflib/obj/NiObjectNET.h delete mode 100755 NifExport/niflib/obj/NiPSysAgeDeathModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysAgeDeathModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysBombModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysBombModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysBoundUpdateModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysBoundUpdateModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysBoxEmitter.cpp delete mode 100755 NifExport/niflib/obj/NiPSysBoxEmitter.h delete mode 100755 NifExport/niflib/obj/NiPSysColliderManager.cpp delete mode 100755 NifExport/niflib/obj/NiPSysColliderManager.h delete mode 100755 NifExport/niflib/obj/NiPSysColorModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysColorModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysCylinderEmitter.cpp delete mode 100755 NifExport/niflib/obj/NiPSysCylinderEmitter.h delete mode 100755 NifExport/niflib/obj/NiPSysData.cpp delete mode 100755 NifExport/niflib/obj/NiPSysData.h delete mode 100755 NifExport/niflib/obj/NiPSysDragModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysDragModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitter.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitter.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterCtlrData.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterCtlrData.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysGravityModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysGravityModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysGravityStrengthCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysGravityStrengthCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysGrowFadeModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysGrowFadeModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysMeshEmitter.cpp delete mode 100755 NifExport/niflib/obj/NiPSysMeshEmitter.h delete mode 100755 NifExport/niflib/obj/NiPSysMeshUpdateModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysMeshUpdateModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysModifierActiveCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysModifierActiveCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysPlanarCollider.cpp delete mode 100755 NifExport/niflib/obj/NiPSysPlanarCollider.h delete mode 100755 NifExport/niflib/obj/NiPSysPositionModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysPositionModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysResetOnLoopCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysResetOnLoopCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysRotationModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysRotationModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysSpawnModifier.cpp delete mode 100755 NifExport/niflib/obj/NiPSysSpawnModifier.h delete mode 100755 NifExport/niflib/obj/NiPSysSphereEmitter.cpp delete mode 100755 NifExport/niflib/obj/NiPSysSphereEmitter.h delete mode 100755 NifExport/niflib/obj/NiPSysUpdateCtlr.cpp delete mode 100755 NifExport/niflib/obj/NiPSysUpdateCtlr.h delete mode 100755 NifExport/niflib/obj/NiPSysVolumeEmitter.cpp delete mode 100755 NifExport/niflib/obj/NiPSysVolumeEmitter.h delete mode 100755 NifExport/niflib/obj/NiPalette.cpp delete mode 100755 NifExport/niflib/obj/NiPalette.h delete mode 100755 NifExport/niflib/obj/NiParticleBomb.cpp delete mode 100755 NifExport/niflib/obj/NiParticleBomb.h delete mode 100755 NifExport/niflib/obj/NiParticleColorModifier.cpp delete mode 100755 NifExport/niflib/obj/NiParticleColorModifier.h delete mode 100755 NifExport/niflib/obj/NiParticleGrowFade.cpp delete mode 100755 NifExport/niflib/obj/NiParticleGrowFade.h delete mode 100755 NifExport/niflib/obj/NiParticleMeshModifier.cpp delete mode 100755 NifExport/niflib/obj/NiParticleMeshModifier.h delete mode 100755 NifExport/niflib/obj/NiParticleMeshes.cpp delete mode 100755 NifExport/niflib/obj/NiParticleMeshes.h delete mode 100755 NifExport/niflib/obj/NiParticleMeshesData.cpp delete mode 100755 NifExport/niflib/obj/NiParticleMeshesData.h delete mode 100755 NifExport/niflib/obj/NiParticleRotation.cpp delete mode 100755 NifExport/niflib/obj/NiParticleRotation.h delete mode 100755 NifExport/niflib/obj/NiParticleSystem.cpp delete mode 100755 NifExport/niflib/obj/NiParticleSystem.h delete mode 100755 NifExport/niflib/obj/NiParticleSystemController.cpp delete mode 100755 NifExport/niflib/obj/NiParticleSystemController.h delete mode 100755 NifExport/niflib/obj/NiParticles.cpp delete mode 100755 NifExport/niflib/obj/NiParticles.h delete mode 100755 NifExport/niflib/obj/NiParticlesData.cpp delete mode 100755 NifExport/niflib/obj/NiParticlesData.h delete mode 100755 NifExport/niflib/obj/NiPathController.cpp delete mode 100755 NifExport/niflib/obj/NiPathController.h delete mode 100755 NifExport/niflib/obj/NiPathInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiPathInterpolator.h delete mode 100755 NifExport/niflib/obj/NiPixelData.cpp delete mode 100755 NifExport/niflib/obj/NiPixelData.h delete mode 100755 NifExport/niflib/obj/NiPlanarCollider.cpp delete mode 100755 NifExport/niflib/obj/NiPlanarCollider.h delete mode 100755 NifExport/niflib/obj/NiPoint3Interpolator.cpp delete mode 100755 NifExport/niflib/obj/NiPoint3Interpolator.h delete mode 100755 NifExport/niflib/obj/NiPointLight.cpp delete mode 100755 NifExport/niflib/obj/NiPointLight.h delete mode 100755 NifExport/niflib/obj/NiPosData.cpp delete mode 100755 NifExport/niflib/obj/NiPosData.h delete mode 100755 NifExport/niflib/obj/NiProperty.cpp delete mode 100755 NifExport/niflib/obj/NiProperty.h delete mode 100755 NifExport/niflib/obj/NiRangeLODData.cpp delete mode 100755 NifExport/niflib/obj/NiRangeLODData.h delete mode 100755 NifExport/niflib/obj/NiRotatingParticles.cpp delete mode 100755 NifExport/niflib/obj/NiRotatingParticles.h delete mode 100755 NifExport/niflib/obj/NiRotatingParticlesData.cpp delete mode 100755 NifExport/niflib/obj/NiRotatingParticlesData.h delete mode 100755 NifExport/niflib/obj/NiScreenLODData.cpp delete mode 100755 NifExport/niflib/obj/NiScreenLODData.h delete mode 100755 NifExport/niflib/obj/NiSequenceStreamHelper.cpp delete mode 100755 NifExport/niflib/obj/NiSequenceStreamHelper.h delete mode 100755 NifExport/niflib/obj/NiShadeProperty.cpp delete mode 100755 NifExport/niflib/obj/NiShadeProperty.h delete mode 100755 NifExport/niflib/obj/NiSingleInterpolatorController.cpp delete mode 100755 NifExport/niflib/obj/NiSingleInterpolatorController.h delete mode 100755 NifExport/niflib/obj/NiSkinData.cpp delete mode 100755 NifExport/niflib/obj/NiSkinData.h delete mode 100755 NifExport/niflib/obj/NiSkinInstance.cpp delete mode 100755 NifExport/niflib/obj/NiSkinInstance.h delete mode 100755 NifExport/niflib/obj/NiSkinPartition.cpp delete mode 100755 NifExport/niflib/obj/NiSkinPartition.h delete mode 100755 NifExport/niflib/obj/NiSourceTexture.cpp delete mode 100755 NifExport/niflib/obj/NiSourceTexture.h delete mode 100755 NifExport/niflib/obj/NiSpecularProperty.cpp delete mode 100755 NifExport/niflib/obj/NiSpecularProperty.h delete mode 100755 NifExport/niflib/obj/NiSphericalCollider.cpp delete mode 100755 NifExport/niflib/obj/NiSphericalCollider.h delete mode 100755 NifExport/niflib/obj/NiSpotLight.cpp delete mode 100755 NifExport/niflib/obj/NiSpotLight.h delete mode 100755 NifExport/niflib/obj/NiStencilProperty.cpp delete mode 100755 NifExport/niflib/obj/NiStencilProperty.h delete mode 100755 NifExport/niflib/obj/NiStringExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiStringExtraData.h delete mode 100755 NifExport/niflib/obj/NiStringPalette.cpp delete mode 100755 NifExport/niflib/obj/NiStringPalette.h delete mode 100755 NifExport/niflib/obj/NiStringsExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiStringsExtraData.h delete mode 100755 NifExport/niflib/obj/NiTextKeyExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiTextKeyExtraData.h delete mode 100755 NifExport/niflib/obj/NiTextureEffect.cpp delete mode 100755 NifExport/niflib/obj/NiTextureEffect.h delete mode 100755 NifExport/niflib/obj/NiTextureTransformController.cpp delete mode 100755 NifExport/niflib/obj/NiTextureTransformController.h delete mode 100755 NifExport/niflib/obj/NiTexturingProperty.cpp delete mode 100755 NifExport/niflib/obj/NiTexturingProperty.h delete mode 100755 NifExport/niflib/obj/NiTimeController.cpp delete mode 100755 NifExport/niflib/obj/NiTimeController.h delete mode 100755 NifExport/niflib/obj/NiTransformController.cpp delete mode 100755 NifExport/niflib/obj/NiTransformController.h delete mode 100755 NifExport/niflib/obj/NiTransformData.cpp delete mode 100755 NifExport/niflib/obj/NiTransformData.h delete mode 100755 NifExport/niflib/obj/NiTransformInterpolator.cpp delete mode 100755 NifExport/niflib/obj/NiTransformInterpolator.h delete mode 100755 NifExport/niflib/obj/NiTriBasedGeom.cpp delete mode 100755 NifExport/niflib/obj/NiTriBasedGeom.h delete mode 100755 NifExport/niflib/obj/NiTriBasedGeomData.cpp delete mode 100755 NifExport/niflib/obj/NiTriBasedGeomData.h delete mode 100755 NifExport/niflib/obj/NiTriShape.cpp delete mode 100755 NifExport/niflib/obj/NiTriShape.h delete mode 100755 NifExport/niflib/obj/NiTriShapeData.cpp delete mode 100755 NifExport/niflib/obj/NiTriShapeData.h delete mode 100755 NifExport/niflib/obj/NiTriStrips.cpp delete mode 100755 NifExport/niflib/obj/NiTriStrips.h delete mode 100755 NifExport/niflib/obj/NiTriStripsData.cpp delete mode 100755 NifExport/niflib/obj/NiTriStripsData.h delete mode 100755 NifExport/niflib/obj/NiUVController.cpp delete mode 100755 NifExport/niflib/obj/NiUVController.h delete mode 100755 NifExport/niflib/obj/NiUVData.cpp delete mode 100755 NifExport/niflib/obj/NiUVData.h delete mode 100755 NifExport/niflib/obj/NiVectorExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiVectorExtraData.h delete mode 100755 NifExport/niflib/obj/NiVertWeightsExtraData.cpp delete mode 100755 NifExport/niflib/obj/NiVertWeightsExtraData.h delete mode 100755 NifExport/niflib/obj/NiVertexColorProperty.cpp delete mode 100755 NifExport/niflib/obj/NiVertexColorProperty.h delete mode 100755 NifExport/niflib/obj/NiVisController.cpp delete mode 100755 NifExport/niflib/obj/NiVisController.h delete mode 100755 NifExport/niflib/obj/NiVisData.cpp delete mode 100755 NifExport/niflib/obj/NiVisData.h delete mode 100755 NifExport/niflib/obj/NiWireframeProperty.cpp delete mode 100755 NifExport/niflib/obj/NiWireframeProperty.h delete mode 100755 NifExport/niflib/obj/NiZBufferProperty.cpp delete mode 100755 NifExport/niflib/obj/NiZBufferProperty.h delete mode 100755 NifExport/niflib/obj/RootCollisionNode.cpp delete mode 100755 NifExport/niflib/obj/RootCollisionNode.h delete mode 100755 NifExport/niflib/obj/bhkBlendCollisionObject.cpp delete mode 100755 NifExport/niflib/obj/bhkBlendCollisionObject.h delete mode 100755 NifExport/niflib/obj/bhkBlendController.cpp delete mode 100755 NifExport/niflib/obj/bhkBlendController.h delete mode 100755 NifExport/niflib/obj/bhkBoxShape.cpp delete mode 100755 NifExport/niflib/obj/bhkBoxShape.h delete mode 100755 NifExport/niflib/obj/bhkCapsuleShape.cpp delete mode 100755 NifExport/niflib/obj/bhkCapsuleShape.h delete mode 100755 NifExport/niflib/obj/bhkCollisionObject.cpp delete mode 100755 NifExport/niflib/obj/bhkCollisionObject.h delete mode 100755 NifExport/niflib/obj/bhkConvexShape.cpp delete mode 100755 NifExport/niflib/obj/bhkConvexShape.h delete mode 100755 NifExport/niflib/obj/bhkConvexTransformShape.cpp delete mode 100755 NifExport/niflib/obj/bhkConvexTransformShape.h delete mode 100755 NifExport/niflib/obj/bhkConvexVerticesShape.cpp delete mode 100755 NifExport/niflib/obj/bhkConvexVerticesShape.h delete mode 100755 NifExport/niflib/obj/bhkEntity.cpp delete mode 100755 NifExport/niflib/obj/bhkEntity.cpp.bak delete mode 100755 NifExport/niflib/obj/bhkEntity.h delete mode 100755 NifExport/niflib/obj/bhkEntity.h.bak delete mode 100755 NifExport/niflib/obj/bhkHingeConstraint.cpp delete mode 100755 NifExport/niflib/obj/bhkHingeConstraint.h delete mode 100755 NifExport/niflib/obj/bhkLimitedHingeConstraint.cpp delete mode 100755 NifExport/niflib/obj/bhkLimitedHingeConstraint.h delete mode 100755 NifExport/niflib/obj/bhkListShape.cpp delete mode 100755 NifExport/niflib/obj/bhkListShape.h delete mode 100755 NifExport/niflib/obj/bhkMalleableConstraint.cpp delete mode 100755 NifExport/niflib/obj/bhkMalleableConstraint.h delete mode 100755 NifExport/niflib/obj/bhkMoppBvTreeShape.cpp delete mode 100755 NifExport/niflib/obj/bhkMoppBvTreeShape.h delete mode 100755 NifExport/niflib/obj/bhkMultiSphereShape.cpp delete mode 100755 NifExport/niflib/obj/bhkMultiSphereShape.h delete mode 100755 NifExport/niflib/obj/bhkNiTriStripsShape.cpp delete mode 100755 NifExport/niflib/obj/bhkNiTriStripsShape.cpp.bak delete mode 100755 NifExport/niflib/obj/bhkNiTriStripsShape.h delete mode 100755 NifExport/niflib/obj/bhkNiTriStripsShape.h.bak delete mode 100755 NifExport/niflib/obj/bhkPackedNiTriStripsShape.cpp delete mode 100755 NifExport/niflib/obj/bhkPackedNiTriStripsShape.h delete mode 100755 NifExport/niflib/obj/bhkPrismaticConstraint.cpp delete mode 100755 NifExport/niflib/obj/bhkPrismaticConstraint.h delete mode 100755 NifExport/niflib/obj/bhkRagdollConstraint.cpp delete mode 100755 NifExport/niflib/obj/bhkRagdollConstraint.h delete mode 100755 NifExport/niflib/obj/bhkRefObject.cpp delete mode 100755 NifExport/niflib/obj/bhkRefObject.h delete mode 100755 NifExport/niflib/obj/bhkRigidBody.cpp delete mode 100755 NifExport/niflib/obj/bhkRigidBody.h delete mode 100755 NifExport/niflib/obj/bhkRigidBodyT.cpp delete mode 100755 NifExport/niflib/obj/bhkRigidBodyT.h delete mode 100755 NifExport/niflib/obj/bhkSPCollisionObject.cpp delete mode 100755 NifExport/niflib/obj/bhkSPCollisionObject.h delete mode 100755 NifExport/niflib/obj/bhkSerializable.cpp delete mode 100755 NifExport/niflib/obj/bhkSerializable.h delete mode 100755 NifExport/niflib/obj/bhkShape.cpp delete mode 100755 NifExport/niflib/obj/bhkShape.h delete mode 100755 NifExport/niflib/obj/bhkSimpleShapePhantom.cpp delete mode 100755 NifExport/niflib/obj/bhkSimpleShapePhantom.h delete mode 100755 NifExport/niflib/obj/bhkSphereRepShape.cpp delete mode 100755 NifExport/niflib/obj/bhkSphereRepShape.h delete mode 100755 NifExport/niflib/obj/bhkSphereShape.cpp delete mode 100755 NifExport/niflib/obj/bhkSphereShape.h delete mode 100755 NifExport/niflib/obj/bhkStiffSpringConstraint.cpp delete mode 100755 NifExport/niflib/obj/bhkStiffSpringConstraint.h delete mode 100755 NifExport/niflib/obj/bhkTransformShape.cpp delete mode 100755 NifExport/niflib/obj/bhkTransformShape.h delete mode 100755 NifExport/niflib/obj/bhkWorldObject.cpp delete mode 100755 NifExport/niflib/obj/bhkWorldObject.h delete mode 100755 NifExport/niflib/obj/hkPackedNiTriStripsData.cpp delete mode 100755 NifExport/niflib/obj/hkPackedNiTriStripsData.h delete mode 100755 NifExport/niflib/pch.cpp delete mode 100755 NifExport/niflib/pch.h delete mode 100755 NifExport/niflib/py_niflib.vcproj delete mode 100755 NifExport/niflib/pyniflib.i delete mode 100755 NifExport/niflib/pyniflib.sln create mode 100644 NifExport/pch.cpp create mode 100644 NifFurniture/NifFurniture_VC80.vcproj create mode 100644 NifImport/ImportCollision.cpp create mode 100644 NifImport/MaxNifImport_VC80.vcproj delete mode 100644 NifImport/MaxNifTools.ini create mode 100644 NifPlugins_Development_Readme.txt create mode 100644 NifPlugins_VC80.sln create mode 100644 NifProps/NifProps_VC80.vcproj diff --git a/NifCommon/AppSettings.cpp b/NifCommon/AppSettings.cpp new file mode 100644 index 0000000..59cbb30 --- /dev/null +++ b/NifCommon/AppSettings.cpp @@ -0,0 +1,159 @@ +#include <io.h> +#include <string.h> +#include <tchar.h> +#include "AppSettings.h" + +AppSettingsMap TheAppSettings; + +void AppSettings::Initialize(Interface *gi) +{ + TCHAR iniName[MAX_PATH]; + LPCTSTR pluginDir = gi->GetDir(APP_PLUGCFG_DIR); + PathCombine(iniName, pluginDir, "MaxNifTools.ini"); + if (-1 != _taccess(iniName, 0)) { + bool reparse = GetIniValue<bool>("System", "Reparse", false, iniName); + if (reparse || TheAppSettings.empty()){ + TheAppSettings.clear(); + } + + string Applications = GetIniValue<string>("System", "KnownApplications", "", iniName); + stringlist apps = TokenizeString(Applications.c_str(), ";"); + for (stringlist::iterator appstr=apps.begin(); appstr != apps.end(); ++appstr){ + AppSettings* setting = FindAppSetting(*appstr); + if (NULL == setting){ + AppSettingsMap::iterator itr = TheAppSettings.insert(TheAppSettings.end(), AppSettings(*appstr)); + (*itr).ReadSettings(iniName); + } + } + } +} + +void AppSettings::ReadSettings(string iniFile) +{ + NameValueCollection settings = ReadIniSection(Name.c_str(), iniFile.c_str()); + + // expand indirect values first + for (NameValueCollection::iterator itr = settings.begin(), end = settings.end(); itr != end; ++itr) + itr->second = GetIndirectValue(itr->second.c_str()); + + // next expand qualifiers + for (NameValueCollection::iterator itr = settings.begin(), end = settings.end(); itr != end; ++itr) + itr->second = ExpandQualifiers(itr->second.c_str(), settings); + + // finally expand environment variables, last because it clobbers my custom qualifier expansion + for (NameValueCollection::iterator itr = settings.begin(), end = settings.end(); itr != end; ++itr) + itr->second = ExpandEnvironment(itr->second); + + std::swap(Environment, settings); + + rootPath = GetSetting<string>("RootPath"); + rootPaths = TokenizeString(GetSetting<string>("RootPaths").c_str(), ";"); + searchPaths = TokenizeString(GetSetting<string>("TextureSearchPaths").c_str(), ";"); + extensions = TokenizeString(GetSetting<string>("TextureExtensions").c_str(), ";"); + textureRootPaths = TokenizeString(GetSetting<string>("TextureRootPaths").c_str(), ";"); + + Skeleton = GetSetting<string>("Skeleton"); + useSkeleton = GetSetting<bool>("UseSkeleton", useSkeleton); + goToSkeletonBindPosition = GetSetting<bool>("GoToSkeletonBindPosition", goToSkeletonBindPosition); + disableCreateNubsForBones = GetSetting<bool>("DisableCreateNubsForBones", disableCreateNubsForBones); + applyOverallTransformToSkinAndBones = GetSetting<int>("ApplyOverallTransformToSkinAndBones", -1); + + dummyNodeMatches = TokenizeString(GetSetting<string>("DummyNodeMatches").c_str(), ";"); +} + +string AppSettings::FindImage(const string& fname){ + TCHAR buffer[MAX_PATH]; + + // Simply check for fully qualified path + if (!PathIsRelative(fname.c_str())) { + if (-1 != _taccess(fname.c_str(), 0)) + return fname; + } + + // Test if its relative and in one of the specified root paths + for (stringlist::iterator itr = textureRootPaths.begin(), end = textureRootPaths.end(); itr != end; ++itr ){ + PathCombine(buffer, itr->c_str(), fname.c_str()); + if (-1 != _taccess(buffer, 0)){ + return string(buffer); + } + } + + // Hit the directories to find out whats out there + if (!parsedImages){ + FindImages(imgTable, rootPath, searchPaths, extensions); + parsedImages = true; + } + + // Search my filename for our texture + _tcscpy(buffer, PathFindFileName(fname.c_str())); + PathRemoveExtension(buffer); + NameValueCollection::iterator itr = imgTable.find(buffer); + if (itr != imgTable.end()){ + if (!rootPath.empty()) { + _tcscpy(buffer, rootPath.c_str()); + PathCombine(buffer, rootPath.c_str(), ((*itr).second).c_str()); + return string(buffer); + } else { + return (*itr).second; + } + } + return fname; +} + + +// Check whether the given file is a child of the root paths +bool AppSettings::IsFileInRootPaths(const std::string& fname) +{ + TCHAR root[MAX_PATH]; + TCHAR file[MAX_PATH]; + GetFullPathName(fname.c_str(), _countof(file), file, NULL); + PathMakePretty(file); + + for (stringlist::iterator itr = rootPaths.begin(), end = rootPaths.end(); itr != end; ++itr ){ + GetFullPathName((*itr).c_str(), _countof(root), root, NULL); + PathAddBackslash(root); + PathMakePretty(root); + if (-1 != _taccess(root,0)) { + int len = _tcslen(root); + if (0 == _tcsncmp(root, file, len)) + return true; + } + } + return false; +} + +// Return the Relative Texture Path for filename or empty +std::string AppSettings::GetRelativeTexPath(const std::string& fname, const std::string& prefix) +{ + TCHAR buffer[MAX_PATH]; + if (!PathIsRelative(fname.c_str())) + { + TCHAR root[MAX_PATH]; + TCHAR file[MAX_PATH]; + GetFullPathName(fname.c_str(), _countof(file), file, NULL); + PathMakePretty(file); + + for (stringlist::iterator itr = textureRootPaths.begin(), end = textureRootPaths.end(); itr != end; ++itr ){ + GetFullPathName((*itr).c_str(), _countof(root), root, NULL); + PathAddBackslash(root); + PathMakePretty(root); + if (-1 != _taccess(root,0)) { + int len = _tcslen(root); + if (0 == _tcsncmp(root, file, len)) + return string(file+len); + } + } + } + else // Test if its relative to one of the specified root paths just return the texture + { + for (stringlist::iterator itr = textureRootPaths.begin(), end = textureRootPaths.end(); itr != end; ++itr ){ + PathCombine(buffer, itr->c_str(), fname.c_str()); + if (-1 != _taccess(buffer, 0)){ + return fname; + } + } + } + // Now just combine prefix with file portion of the name + PathCombine(buffer, prefix.c_str(), PathFindFileName(fname.c_str())); + return string(buffer); +} diff --git a/NifCommon/AppSettings.h b/NifCommon/AppSettings.h new file mode 100644 index 0000000..0d7cfec --- /dev/null +++ b/NifCommon/AppSettings.h @@ -0,0 +1,122 @@ +/********************************************************************** +*< +FILE: AppSettings.h + +DESCRIPTION: AppSetting helper class for managing game specific + file settings. + +CREATED BY: tazpn (Theo) + +HISTORY: + +*> Copyright (c) 2006, All Rights Reserved. +**********************************************************************/ +#ifndef _APPSETTINGS_H_ +#define _APPSETTINGS_H_ + +#include "niutils.h" + +class AppSettings +{ +public: + AppSettings(const std::string& name) + : Name(name) + , parsedImages(false) + , useSkeleton(false) + , goToSkeletonBindPosition(true) + , disableCreateNubsForBones(false) + {} + + std::string Name; + std::string rootPath; + bool parsedImages; + stringlist searchPaths; + stringlist textureRootPaths; + stringlist rootPaths; + stringlist extensions; + std::string Skeleton; + bool useSkeleton; + bool goToSkeletonBindPosition; + bool disableCreateNubsForBones; + NameValueCollection Environment; + NameValueCollection imgTable; + stringlist dummyNodeMatches; + int applyOverallTransformToSkinAndBones; + + static void Initialize(Interface *gi); + void ReadSettings(std::string iniFile); + std::string FindImage(const std::string& fname); + + // Check whether the given file is a child of the root paths + bool IsFileInRootPaths(const std::string& fname); + + // Return the Relative Texture Path for filename or empty + std::string GetRelativeTexPath(const std::string& fname, const std::string& prefix); + + template<typename T> + inline T GetSetting(std::string setting){ + T v; + NameValueCollection::iterator itr = Environment.find(setting); + if (itr != Environment.end()){ + stringstream sstr((*itr).second); + sstr >> v; + } + return v; + } + template<> + inline std::string GetSetting(std::string setting){ + NameValueCollection::iterator itr = Environment.find(setting); + if (itr != Environment.end()) + return (*itr).second; + return std::string(); + } + + template<typename T> + inline T GetSetting(std::string setting, T Default){ + NameValueCollection::iterator itr = Environment.find(setting); + if (itr != Environment.end()){ + T v; + stringstream sstr((*itr).second); + sstr >> v; + return v; + } + return Default; + } + template<> + inline std::string GetSetting(std::string setting, std::string Default){ + NameValueCollection::iterator itr = Environment.find(setting); + if (itr != Environment.end()) + return (*itr).second; + return Default; + } +}; + +typedef std::list<AppSettings> AppSettingsMap; + +struct AppSettingsNameEquivalence : public ltstr +{ + bool operator()(const AppSettings& n1, const AppSettings& n2) const { + return ltstr::operator()(n1.Name, n2.Name); + } + bool operator()(const string& n1, const AppSettings& n2) const { + return ltstr::operator()(n1, n2.Name); + } + bool operator()(const AppSettings& n1, const string& n2) const { + return ltstr::operator()(n1.Name, n2); + } +}; + +// The Global Map +// Global so that I dont have to parse the texture directories on every import +extern AppSettingsMap TheAppSettings; + +inline AppSettings* FindAppSetting(const std::string& name){ + AppSettingsNameEquivalence equiv; + for (AppSettingsMap::iterator itr=TheAppSettings.begin(), end = TheAppSettings.end(); itr != end; ++itr){ + if (!equiv(*itr, name) && !equiv(name, *itr)) + return &(*itr); + } + return NULL; +} + +#endif //_APPSETTINGS_H_ \ No newline at end of file diff --git a/NifCommon/NifCommon_VC80.vcproj b/NifCommon/NifCommon_VC80.vcproj new file mode 100644 index 0000000..0f75d8f --- /dev/null +++ b/NifCommon/NifCommon_VC80.vcproj @@ -0,0 +1,533 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NifCommon" + ProjectGUID="{E29131BC-410F-4B9B-B48F-6EED5D3B68A4}" + RootNamespace="NifCommon" + Keyword="Win32Proj" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/FI"$(ProjectDir)pch.h"" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES" + ExceptionHandling="2" + RuntimeLibrary="0" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy Solution Files to 3ds Max Directories if necessary" + CommandLine="set MaxRootDir=C:\3dsmax6
if exist "%MaxRootDir%\plugcfg" (
if not exist "%MaxRootDir%\plugcfg\MaxNifTools.ini" (
copy "$(ProjectDir)..\MaxNifTools.ini" "%MaxRootDir%\plugcfg\MaxNifTools.ini"
)
)
xcopy /D /Y /I "$(ProjectDir)..\MaxNifPlugins_Readme.txt" "$(OutDir)"
xcopy /D /Y /I "$(ProjectDir)..\MaxNifTools.ini" "$(OutDir)"
" + /> + </Configuration> + <Configuration + Name="Debug - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/FI"$(ProjectDir)pch.h"" + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES" + MinimalRebuild="true" + ExceptionHandling="2" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy Solution Files to 3ds Max Directories if necessary" + CommandLine="set MaxRootDir=C:\3dsmax6
if exist "%MaxRootDir%\plugcfg" (
if not exist "%MaxRootDir%\plugcfg\MaxNifTools.ini" (
copy "$(ProjectDir)..\MaxNifTools.ini" "%MaxRootDir%\plugcfg\MaxNifTools.ini"
)
)
" + /> + </Configuration> + <Configuration + Name="Release - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/FI"$(ProjectDir)pch.h"" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_BIPED" + ExceptionHandling="2" + RuntimeLibrary="0" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy Solution Files to 3ds Max Directories if necessary" + CommandLine="set MaxRootDir=C:\3dsmax7
if exist "%MaxRootDir%\plugcfg" (
if not exist "%MaxRootDir%\plugcfg\MaxNifTools.ini" (
copy "$(ProjectDir)..\MaxNifTools.ini" "%MaxRootDir%\plugcfg\MaxNifTools.ini"
)
)
xcopy /D /Y /I "$(ProjectDir)..\MaxNifPlugins_Readme.txt" "$(OutDir)"
xcopy /D /Y /I "$(ProjectDir)..\MaxNifTools.ini" "$(OutDir)"
" + /> + </Configuration> + <Configuration + Name="Debug - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/FI"$(ProjectDir)pch.h"" + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_BIPED" + MinimalRebuild="true" + ExceptionHandling="2" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy Solution Files to 3ds Max Directories if necessary" + CommandLine="set MaxRootDir=C:\3dsmax7
if exist "%MaxRootDir%\plugcfg" (
if not exist "%MaxRootDir%\plugcfg\MaxNifTools.ini" (
copy "$(ProjectDir)..\MaxNifTools.ini" "%MaxRootDir%\plugcfg\MaxNifTools.ini"
)
)
" + /> + </Configuration> + <Configuration + Name="Release - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/FI"$(ProjectDir)pch.h"" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_BIPED" + ExceptionHandling="2" + RuntimeLibrary="0" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy Solution Files to 3ds Max Directories if necessary" + CommandLine="set MaxRootDir=C:\3dsmax8
if exist "%MaxRootDir%\plugcfg" (
if not exist "%MaxRootDir%\plugcfg\MaxNifTools.ini" (
copy "$(ProjectDir)..\MaxNifTools.ini" "%MaxRootDir%\plugcfg\MaxNifTools.ini"
)
)
xcopy /D /Y /I "$(ProjectDir)..\MaxNifPlugins_Readme.txt" "$(OutDir)"
xcopy /D /Y /I "$(ProjectDir)..\MaxNifTools.ini" "$(OutDir)"
" + /> + </Configuration> + <Configuration + Name="Debug - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/FI"$(ProjectDir)pch.h"" + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_LIB;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_BIPED" + MinimalRebuild="true" + ExceptionHandling="2" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + Description="Copy Solution Files to 3ds Max Directories if necessary" + CommandLine="set MaxRootDir=C:\3dsmax8
if exist "%MaxRootDir%\plugcfg" (
if not exist "%MaxRootDir%\plugcfg\MaxNifTools.ini" (
copy "$(ProjectDir)..\MaxNifTools.ini" "%MaxRootDir%\plugcfg\MaxNifTools.ini"
)
)
" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\AppSettings.cpp" + > + </File> + <File + RelativePath=".\NifGui.cpp" + > + </File> + <File + RelativePath=".\NifPlugins.cpp" + > + </File> + <File + RelativePath=".\niutils.cpp" + > + </File> + <File + RelativePath=".\pch.cpp" + > + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\AppSettings.h" + > + </File> + <File + RelativePath=".\NifGui.h" + > + </File> + <File + RelativePath=".\NifPlugins.h" + > + </File> + <File + RelativePath=".\niutils.h" + > + </File> + <File + RelativePath=".\pch.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/NifGui.cpp b/NifCommon/NifGui.cpp old mode 100755 new mode 100644 similarity index 100% rename from NifGui.cpp rename to NifCommon/NifGui.cpp diff --git a/NifGui.h b/NifCommon/NifGui.h old mode 100755 new mode 100644 similarity index 100% rename from NifGui.h rename to NifCommon/NifGui.h diff --git a/NifPlugins.cpp b/NifCommon/NifPlugins.cpp old mode 100755 new mode 100644 similarity index 100% rename from NifPlugins.cpp rename to NifCommon/NifPlugins.cpp diff --git a/NifPlugins.h b/NifCommon/NifPlugins.h old mode 100755 new mode 100644 similarity index 80% rename from NifPlugins.h rename to NifCommon/NifPlugins.h index 3fa0164..ca1239c --- a/NifPlugins.h +++ b/NifCommon/NifPlugins.h @@ -1,20 +1,36 @@ #ifndef __NIFPLUGINS_H__ #define __NIFPLUGINS_H__ -#include "niflib/nif_math.h" +#include "nif_math.h" using Niflib::Vector3; /* node properties */ + +// Custom Properties shared with Havok +#define NP_HVK_MASS _T("Mass") +#define NP_HVK_FRICTION _T("Friction") +#define NP_HVK_RESTITUTION _T("Ellasticity") + +#define NP_HVK_MASS_OLD _T("np_hvk_mass") +#define NP_HVK_FRICTION_OLD _T("np_hvk_frict") +#define NP_HVK_RESTITUTION_OLD _T("np_hvk_resti") + + +/* default values */ +#define NP_DEFAULT_HVK_EMPTY 3.402823466e+38F +#define NP_DEFAULT_HVK_MASS 0 +#define NP_DEFAULT_HVK_FRICTION 0.3f +#define NP_DEFAULT_HVK_RESTITUTION 0.3f + + +// Custom Properties #define NP_HASCOLL _T("np_coll") #define NP_HVK_LAYER _T("np_hvk_layer") #define NP_HVK_MATERIAL _T("np_hvk_mtl") #define NP_HVK_CENTER _T("np_hvk_center") -#define NP_HVK_MASS _T("np_hvk_mass") #define NP_HVK_LINEAR_DAMPING _T("np_hvk_ldamp") #define NP_HVK_ANGULAR_DAMPING _T("np_hvk_adamp") -#define NP_HVK_FRICTION _T("np_hvk_frict") -#define NP_HVK_RESTITUTION _T("np_hvk_resti") #define NP_HVK_MAX_LINEAR_VELOCITY _T("np_hvk_max_lvel") #define NP_HVK_MAX_ANGULAR_VELOCITY _T("np_hvk_max_avel") #define NP_HVK_PENETRATION_DEPTH _T("np_hvk_pdepth") @@ -26,11 +42,8 @@ using Niflib::Vector3; /* default values */ #define NP_DEFAULT_HVK_MATERIAL 9 #define NP_DEFAULT_HVK_LAYER 1 -#define NP_DEFAULT_HVK_MASS 0 #define NP_DEFAULT_HVK_LINEAR_DAMPING 0.1f #define NP_DEFAULT_HVK_ANGULAR_DAMPING 0.05f -#define NP_DEFAULT_HVK_FRICTION 0.3f -#define NP_DEFAULT_HVK_RESTITUTION 0.3f #define NP_DEFAULT_HVK_MAX_LINEAR_VELOCITY 250.0f #define NP_DEFAULT_HVK_MAX_ANGULAR_VELOCITY 31.4159f #define NP_DEFAULT_HVK_PENETRATION_DEPTH 0.15f diff --git a/NifImport/niutils.cpp b/NifCommon/niutils.cpp similarity index 95% rename from NifImport/niutils.cpp rename to NifCommon/niutils.cpp index 449e445..9296d47 100644 --- a/NifImport/niutils.cpp +++ b/NifCommon/niutils.cpp @@ -10,7 +10,7 @@ HISTORY: *> Copyright (c) 2006, All Rights Reserved. **********************************************************************/ -#include "stdafx.h" +#include "pch.h" #include "niutils.h" #include <string.h> #include <ctype.h> @@ -18,6 +18,7 @@ HISTORY: #include <malloc.h> #include <sstream> #include <modstack.h> +#include <iparamb2.h> #include <iskin.h> #ifdef USE_BIPED # include <cs/BipedApi.h> @@ -542,4 +543,18 @@ TSTR PrintMatrix44(Matrix44& m) void DumpMatrix44(Matrix44& m) { OutputDebugString(PrintMatrix44(m)); -} \ No newline at end of file +} + +INode* FindINode(Interface *i, const string& name) +{ + return i->GetINodeByName(name.c_str()); +} + +INode* FindINode(Interface *i, NiObjectNETRef node) +{ + if (node != NULL) + { + return FindINode(i, node->GetName()); + } + return NULL; +} diff --git a/NifImport/niutils.h b/NifCommon/niutils.h similarity index 94% rename from NifImport/niutils.h rename to NifCommon/niutils.h index fd8f5cb..c3ebf85 100644 --- a/NifImport/niutils.h +++ b/NifCommon/niutils.h @@ -35,6 +35,7 @@ INFO: See Implementation for minimalist comments #include <obj\NiAVObject.h> #include <obj\NiObjectNET.h> #include <obj\NiNode.h> +#include <gen\QuaternionXYZW.h> #include <nif_math.h> #ifndef _countof @@ -234,6 +235,9 @@ extern int CountNodesByName( const vector<Niflib::NiNodeRef>& blocks, LPCTSTR ma extern std::vector<std::string> GetNamesOfNodes( const vector<Niflib::NiNodeRef>& blocks ); extern std::vector<Niflib::NiNodeRef> SelectNodesByName( const vector<Niflib::NiNodeRef>& blocks, LPCTSTR match); +extern INode* FindINode(Interface *i, const string& name); +extern INode* FindINode(Interface *i, Niflib::NiObjectNETRef node); + struct NodeEquivalence { bool operator()(const Niflib::NiNodeRef& lhs, const Niflib::NiNodeRef& rhs) const{ @@ -284,6 +288,11 @@ static inline Quat TOQUAT(const Niflib::Quaternion& q, bool inverse = false){ return (inverse) ? qt.Inverse() : qt; } +static inline Quat TOQUAT(const Niflib::QuaternionXYZW& q, bool inverse = false){ + Quat qt(q.x, q.y, q.z, q.w); + return (inverse) ? qt.Inverse() : qt; +} + static inline AngAxis TOANGAXIS(const Niflib::Quaternion& q, bool inverse = false){ Quat qt(q.x, q.y, q.z, q.w); if (inverse) qt.Invert(); diff --git a/NifCommon/pch.cpp b/NifCommon/pch.cpp new file mode 100644 index 0000000..90fd9c0 --- /dev/null +++ b/NifCommon/pch.cpp @@ -0,0 +1,8 @@ +// pch.cpp : source file that includes just the standard includes +// NifCommon.pch will be the pre-compiled header +// pch.obj will contain the pre-compiled type information + +#include "pch.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/NifCommon/pch.h b/NifCommon/pch.h new file mode 100644 index 0000000..59d4294 --- /dev/null +++ b/NifCommon/pch.h @@ -0,0 +1,30 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include <stdio.h> +#include <tchar.h> +#include <iomanip> +#include <cmath> +#include <iostream> +#include <fstream> +#include <string> +#include <map> +#include <exception> +#include <stdexcept> +#include <algorithm> +#include <functional> +#include <numeric> +#include <vector> +#include <list> +#include <map> + +// _WIN32 will detect windows on most compilers +#define WIN32_LEAN_AND_MEAN +#include <windows.h> +#include <commctrl.h> +#include <shlwapi.h> + diff --git a/NifExport/Coll.cpp b/NifExport/Coll.cpp index 0ab1167..20a7ab6 100755 --- a/NifExport/Coll.cpp +++ b/NifExport/Coll.cpp @@ -1,5 +1,13 @@ #include "pch.h" +#ifdef _DEBUG +#include <assert.h> +#include <crtdbg.h> +#define ASSERT _ASSERTE +#else +#define ASSERT(x) +#endif + static Class_ID SCUBA_CLASS_ID(0x6d3d77ac, 0x79c939a9); enum @@ -179,26 +187,26 @@ bool Exporter::makeCollisionHierarchy(NiNodeRef &parent, INode *node, TimeValue shape->SetStripsData(0, data); shape->SetMaterial(mtl); - array<float, 2> unknownFloats1; - uint i1 = 0x3DCCCCCD; - uint i2 = 0x004ABE60; - unknownFloats1[0] = *((float*)&i1); - unknownFloats1[1] = *((float*)&i2); - shape->SetUnknownFloats1(unknownFloats1); + //array<float, 2> unknownFloats1; + //uint i1 = 0x3DCCCCCD; + //uint i2 = 0x004ABE60; + //unknownFloats1[0] = *((float*)&i1); + //unknownFloats1[1] = *((float*)&i2); + //shape->SetUnknownFloats1(unknownFloats1); - array<float, 3> unknownFloats2; - unknownFloats2[0] = 1; - unknownFloats2[1] = 1; - unknownFloats2[2] = 1; - shape->SetUnknownFloats2(unknownFloats2); + //array<float, 3> unknownFloats2; + //unknownFloats2[0] = 1; + //unknownFloats2[1] = 1; + //unknownFloats2[2] = 1; + //shape->SetUnknownFloats2(unknownFloats2); - array<uint, 5> unknownInts1; - unknownInts1[4] = 1; - shape->SetUnknownInts1(unknownInts1); + //array<uint, 5> unknownInts1; + //unknownInts1[4] = 1; + //shape->SetUnknownInts1(unknownInts1); - vector<uint> unknownInts3; - unknownInts3.resize(1); - shape->SetUnknownInts3(unknownInts3); + //vector<uint> unknownInts3; + //unknownInts3.resize(1); + //shape->SetUnknownInts3(unknownInts3); // setup collision object bhkCollisionObjectRef co = DynamicCast<bhkCollisionObject>(CreateBlock("bhkCollisionObject")); @@ -305,15 +313,23 @@ bhkRigidBodyRef Exporter::makeCollisionBody(INode *node) float mass, lindamp, angdamp, frict, maxlinvel, maxangvel, resti, pendepth; Vector3 center; + // Handle compatibility + npGetProp(node, NP_HVK_MASS_OLD, mass, NP_DEFAULT_HVK_EMPTY); + if (mass != NP_DEFAULT_HVK_EMPTY) + npGetProp(node, NP_HVK_MASS, mass, NP_DEFAULT_HVK_MASS); + npGetProp(node, NP_HVK_FRICTION_OLD, frict, NP_DEFAULT_HVK_EMPTY); + if (frict != NP_DEFAULT_HVK_EMPTY) + npGetProp(node, NP_HVK_FRICTION, frict, NP_DEFAULT_HVK_FRICTION); + npGetProp(node, NP_HVK_RESTITUTION_OLD, resti, NP_DEFAULT_HVK_EMPTY); + if (resti != NP_DEFAULT_HVK_EMPTY) + npGetProp(node, NP_HVK_RESTITUTION, resti, NP_DEFAULT_HVK_RESTITUTION); + npGetProp(node, NP_HVK_LAYER, lyr, NP_DEFAULT_HVK_LAYER); npGetProp(node, NP_HVK_MATERIAL, mtl, NP_DEFAULT_HVK_MATERIAL); npGetProp(node, NP_HVK_MOTION_SYSTEM, msys, NP_DEFAULT_HVK_MOTION_SYSTEM); npGetProp(node, NP_HVK_QUALITY_TYPE, qtype, NP_DEFAULT_HVK_QUALITY_TYPE); - npGetProp(node, NP_HVK_MASS, mass, NP_DEFAULT_HVK_MASS); npGetProp(node, NP_HVK_LINEAR_DAMPING, lindamp, NP_DEFAULT_HVK_LINEAR_DAMPING); npGetProp(node, NP_HVK_ANGULAR_DAMPING, angdamp, NP_DEFAULT_HVK_ANGULAR_DAMPING); - npGetProp(node, NP_HVK_FRICTION, frict, NP_DEFAULT_HVK_FRICTION); - npGetProp(node, NP_HVK_RESTITUTION, resti, NP_DEFAULT_HVK_RESTITUTION); npGetProp(node, NP_HVK_MAX_LINEAR_VELOCITY, maxlinvel, NP_DEFAULT_HVK_MAX_LINEAR_VELOCITY); npGetProp(node, NP_HVK_MAX_ANGULAR_VELOCITY, maxangvel, NP_DEFAULT_HVK_MAX_ANGULAR_VELOCITY); npGetProp(node, NP_HVK_PENETRATION_DEPTH, pendepth, NP_DEFAULT_HVK_PENETRATION_DEPTH); @@ -473,10 +489,13 @@ bhkSphereRepShapeRef Exporter::makeTriStripsShape(INode *node) unknownInts1[4] = 1; shape->SetUnknownInts1(unknownInts1); */ + + ASSERT(!"TODO: Need to support this"); +/* Still not handled vector<uint> unknownInts2; unknownInts2.resize(1); shape->SetUnknownInts2(unknownInts2); - +*/ if (tri != os.obj) tri->DeleteMe(); diff --git a/NifExport/Config.cpp b/NifExport/Config.cpp index 24d99ad..659d7b0 100755 --- a/NifExport/Config.cpp +++ b/NifExport/Config.cpp @@ -1,7 +1,11 @@ #include "pch.h" +#include "AppSettings.h" +#include "niutils.h" #define REGPATH "Software\\NifTools\\MaxPlugins" +static LPCTSTR NifExportSection = TEXT("MaxNifExport"); + void regSet(HKEY hKey, const char *value, float f); void regSet(HKEY hKey, const char *value, bool b); void regSet(HKEY hKey, const char *value, DWORD dw); @@ -17,22 +21,44 @@ void Exporter::writeConfig(INode *node) { } -void Exporter::writeConfig() +void Exporter::writeConfig(Interface *i) { - HKEY hKey; - if (RegCreateKey(HKEY_CURRENT_USER, REGPATH, &hKey) != ERROR_SUCCESS) - return; - - regSet(hKey, "npx_ver", mVersion); - regSet(hKey, "npx_tristrips", mTriStrips); - regSet(hKey, "npx_hidden", mExportHidden); - regSet(hKey, "npx_furn", mExportFurn); - regSet(hKey, "npx_lights", mExportLights); - regSet(hKey, "npx_vcolors", mVertexColors); -// regSet(hKey, "npx_wthresh", mWeldThresh); - regSet(hKey, "npx_tprefix", mTexPrefix); - regSet(hKey, "npx_coll", mExportCollision); - regSet(hKey, "npx_remap", mRemapIndices); + if (mUseRegistry) + { + HKEY hKey; + if (RegCreateKey(HKEY_CURRENT_USER, REGPATH, &hKey) != ERROR_SUCCESS) + return; + + regSet(hKey, "npx_ver", mVersion); + regSet(hKey, "npx_tristrips", mTriStrips); + regSet(hKey, "npx_hidden", mExportHidden); + regSet(hKey, "npx_furn", mExportFurn); + regSet(hKey, "npx_lights", mExportLights); + regSet(hKey, "npx_vcolors", mVertexColors); + // regSet(hKey, "npx_wthresh", mWeldThresh); + regSet(hKey, "npx_tprefix", mTexPrefix); + regSet(hKey, "npx_coll", mExportCollision); + regSet(hKey, "npx_remap", mRemapIndices); + + RegCloseKey(hKey); + } + else + { + TCHAR iniName[MAX_PATH]; + LPCTSTR pluginDir = i->GetDir(APP_PLUGCFG_DIR); + PathCombine(iniName, pluginDir, "MaxNifTools.ini"); + + SetIniValue(NifExportSection, "Version", mVersion, iniName); + SetIniValue(NifExportSection, "GenerateStrips", mTriStrips, iniName); + SetIniValue(NifExportSection, "IncludeHidden", mExportHidden, iniName); + SetIniValue(NifExportSection, "FurnatureMarkers", mExportFurn, iniName); + SetIniValue(NifExportSection, "Lights", mExportLights, iniName); + SetIniValue(NifExportSection, "VertexColors", mVertexColors, iniName); + // SetIniValue(NifExportSection, "WeldThresh", mWeldThresh, iniName); + SetIniValue(NifExportSection, "TexturePrefix", mTexPrefix, iniName); + SetIniValue(NifExportSection, "ExportCollision", mExportCollision, iniName); + SetIniValue(NifExportSection, "RemapIndices", mRemapIndices, iniName); + } } void Exporter::readConfig(INode *node) @@ -40,23 +66,43 @@ void Exporter::readConfig(INode *node) } -void Exporter::readConfig() +void Exporter::readConfig(Interface *i) { - HKEY hKey; - if (RegCreateKey(HKEY_CURRENT_USER, REGPATH, &hKey) != ERROR_SUCCESS) - return; - - DWORD ver; - regGet(hKey, "npx_ver", ver); - regGet(hKey, "npx_tristrips", mTriStrips); - regGet(hKey, "npx_hidden", mExportHidden); - regGet(hKey, "npx_furn", mExportFurn); - regGet(hKey, "npx_lights", mExportLights); - regGet(hKey, "npx_vcolors", mVertexColors); -// regGet(hKey, "npx_wthresh", mWeldThresh); - regGet(hKey, "npx_tprefix", mTexPrefix); - regGet(hKey, "npx_coll", mExportCollision); - regGet(hKey, "npx_remap", mRemapIndices); + if (mUseRegistry) + { + HKEY hKey; + if (RegCreateKey(HKEY_CURRENT_USER, REGPATH, &hKey) != ERROR_SUCCESS) + return; + + DWORD ver; + regGet(hKey, "npx_ver", ver); + regGet(hKey, "npx_tristrips", mTriStrips); + regGet(hKey, "npx_hidden", mExportHidden); + regGet(hKey, "npx_furn", mExportFurn); + regGet(hKey, "npx_lights", mExportLights); + regGet(hKey, "npx_vcolors", mVertexColors); + // regGet(hKey, "npx_wthresh", mWeldThresh); + regGet(hKey, "npx_tprefix", mTexPrefix); + regGet(hKey, "npx_coll", mExportCollision); + regGet(hKey, "npx_remap", mRemapIndices); + } + else + { + TCHAR iniName[MAX_PATH]; + LPCTSTR pluginDir = i->GetDir(APP_PLUGCFG_DIR); + PathCombine(iniName, pluginDir, "MaxNifTools.ini"); + + mVersion = GetIniValue<int>(NifExportSection, "Version", 013, iniName); + mTriStrips = GetIniValue<bool>(NifExportSection, "GenerateStrips", true, iniName); + mExportHidden = GetIniValue<bool>(NifExportSection, "IncludeHidden", false, iniName); + mExportFurn = GetIniValue<bool>(NifExportSection, "FurnatureMarkers", true, iniName); + mExportLights = GetIniValue<bool>(NifExportSection, "Lights", false, iniName); + mVertexColors = GetIniValue<bool>(NifExportSection, "VertexColors", true, iniName); + // mWeldThresh = GetIniValue<float>(NifExportSection, "WeldThresh", 0.1f, iniName); + mTexPrefix = GetIniValue<string>(NifExportSection, "TexturePrefix", "textures", iniName); + mExportCollision = GetIniValue<bool>(NifExportSection, "ExportCollision", true, iniName); + mRemapIndices = GetIniValue(NifExportSection, "RemapIndices", true, iniName); + } } diff --git a/NifExport/Exporter.cpp b/NifExport/Exporter.cpp index e60f07f..05eaed7 100755 --- a/NifExport/Exporter.cpp +++ b/NifExport/Exporter.cpp @@ -1,4 +1,6 @@ #include "pch.h" +#include "AppSettings.h" +#include "niutils.h" int Exporter::mVersion=013; bool Exporter::mSelectedOnly=false; @@ -11,25 +13,41 @@ float Exporter::mWeldThresh=0.1f; string Exporter::mTexPrefix="textures"; bool Exporter::mExportCollision=true; bool Exporter::mRemapIndices=true; +bool Exporter::mUseRegistry=false; -Exporter::Exporter(Interface *i) - : mI(i) +Exporter::Exporter(Interface *i, AppSettings *appSettings) + : mI(i), mAppSettings(appSettings) { - } -Exporter::Result Exporter::export(NiNodeRef &root, INode *node) +Exporter::Result Exporter::doExport(NiNodeRef &root, INode *node) { BSXFlagsRef bsx = DynamicCast<BSXFlags>(CreateBlock("BSXFlags")); bsx->SetName("BSX"); bsx->SetFlags(0x00000002); - - NiStringExtraDataRef strings = DynamicCast<NiStringExtraData>(CreateBlock("NiStringExtraData")); - strings->SetName("UPB"); - strings->SetData("Ellasticity = 0.300000\r\nFriction = 0.300000\r\nUnyielding = 0\r\nProxy_Geometry = <None>\r\nUse_Display_Proxy = 0\r\nDisplay_Children = 1\r\nDisable_Collisions = 0\r\nInactive = 0\r\nDisplay_Proxy = <None>\r\nMass = 0.000000\r\nSimulation_Geometry = 2\r\nCollision_Groups = 589825\r\n"); - - root->AddExtraData(DynamicCast<NiExtraData>(bsx)); - root->AddExtraData(DynamicCast<NiExtraData>(strings)); + root->AddExtraData(DynamicCast<NiExtraData>(bsx)); + + // Write the actual UPB sans any np_ prefixed strings + TSTR upb; + node->GetUserPropBuffer(upb); + if (!upb.isNull()) + { + string line; + istringstream istr(string(upb), ios_base::out); + ostringstream ostr; + while (!istr.eof()) { + std::getline(istr, line); + if (!line.empty() && 0 != line.compare(0, 3, "np_")) + ostr << line << endl; + } + if (!ostr.str().empty()) + { + NiStringExtraDataRef strings = DynamicCast<NiStringExtraData>(CreateBlock("NiStringExtraData")); + strings->SetName("UPB"); + strings->SetData(ostr.str()); + root->AddExtraData(DynamicCast<NiExtraData>(strings)); + } + } mNiRoot = root; diff --git a/NifExport/Exporter.h b/NifExport/Exporter.h index a654cf2..01a991b 100755 --- a/NifExport/Exporter.h +++ b/NifExport/Exporter.h @@ -4,6 +4,7 @@ using namespace Niflib; class BitmapTex; +class AppSettings; class Exporter { @@ -22,7 +23,7 @@ public: static int mVersion; /* export options, static for dialog usage. */ - + static bool mUseRegistry; static bool mSelectedOnly; static bool mTriStrips; static bool mExportHidden; @@ -34,9 +35,9 @@ public: static bool mExportCollision; static bool mRemapIndices; - Exporter(Interface *i); + Exporter(Interface *i, AppSettings *appSettings); - Result export(NiNodeRef &root, INode *node); + Result doExport(NiNodeRef &root, INode *node); /* config is written to the registry and the root node of the scene, so that it is restored when opening it @@ -46,12 +47,12 @@ public: // writes config to root node static void writeConfig(INode *node); // writes config to registry - static void writeConfig(); + static void writeConfig(Interface *i); // reads config from root node static void readConfig(INode *node); // reads config from registry - static void readConfig(); + static void readConfig(Interface *i); private: @@ -73,6 +74,7 @@ private: Interface *mI; NiNodeRef mNiRoot; + AppSettings *mAppSettings; Result exportCollision(NiNodeRef &root, INode *node); Result exportMeshes(NiNodeRef &root, INode *node); diff --git a/NifExport/MtlTex.cpp b/NifExport/MtlTex.cpp index 2bd80bd..a18a2b2 100755 --- a/NifExport/MtlTex.cpp +++ b/NifExport/MtlTex.cpp @@ -1,5 +1,6 @@ #include "pch.h" #include "stdmat.h" +#include "AppSettings.h" void Exporter::makeTexture(NiAVObjectRef &parent, Mtl *mtl) { @@ -8,27 +9,37 @@ void Exporter::makeTexture(NiAVObjectRef &parent, Mtl *mtl) if (!bmTex) return; - TSTR mapPath, p, f; - mapPath = bmTex->GetMapName(); - SplitPathFile(mapPath, &p, &f); - NiTexturingPropertyRef texProp(DynamicCast<NiTexturingProperty>(CreateBlock("NiTexturingProperty"))); texProp->SetApplyMode(APPLY_MODULATE); texProp->SetTextureCount(7); TexDesc td; td.source = DynamicCast<NiSourceTexture>(CreateBlock("NiSourceTexture")); - NiObjectRef unk_link(NULL); - TSTR newPath; - if (mTexPrefix != "") - newPath = TSTR(mTexPrefix.c_str()) + _T("\\") + f; - else - newPath = f; - - char tmp[MAX_PATH]=""; - strncpy(tmp, (char*)newPath, newPath.Length()); - td.source->SetExternalTexture(tmp, unk_link); + // Get file name and check if it matches the "app" settings in the ini file + TSTR mapPath; + mapPath = bmTex->GetMapName(); + + if (mAppSettings) + { + string newPath = mAppSettings->GetRelativeTexPath(string(mapPath), mTexPrefix); + + NiObjectRef unk_link(NULL); + td.source->SetExternalTexture(newPath, unk_link); + } + else + { + TSTR p, f; + SplitPathFile(mapPath, &p, &f); + TSTR newPath; + if (mTexPrefix != "") + newPath = TSTR(mTexPrefix.c_str()) + _T("\\") + f; + else + newPath = f; + + NiObjectRef unk_link(NULL); + td.source->SetExternalTexture(newPath.data(), unk_link); + } texProp->SetTexture(BASE_MAP, td); NiPropertyRef prop = DynamicCast<NiProperty>(texProp); @@ -52,13 +63,18 @@ void Exporter::makeMaterial(NiAVObjectRef &parent, Mtl *mtl) c = mtl->GetSpecular(); mtlProp->SetSpecularColor(Color3(c.r, c.g, c.b)); - c = mtl->GetSelfIllumColor(); + c = (mtl->GetSelfIllumColorOn()) ? mtl->GetSelfIllumColor() : Color(0,0,0); mtlProp->SetEmissiveColor(Color3(c.r, c.g, c.b)); mtlProp->SetTransparency(1); - mtlProp->SetGlossiness(mtl->GetShininess()); + mtlProp->SetGlossiness(mtl->GetShininess() * 100.0); name = (char*)mtl->GetName(); + if(mtl->ClassID() == Class_ID(DMTL_CLASS_ID, 0) ) + { + StdMat2 * smtl = (StdMat2*)mtl; + mtlProp->SetTransparency(smtl->GetOpacity(0)); + } } else { mtlProp->SetAmbientColor(Color3(0.588f, 0.588f, 0.588f)); diff --git a/NifExport/NifExport.cpp b/NifExport/NifExport.cpp index b8f96a6..4095a3a 100755 --- a/NifExport/NifExport.cpp +++ b/NifExport/NifExport.cpp @@ -1,9 +1,14 @@ #include "pch.h" +#include "AppSettings.h" +#include "niutils.h" +#include <io.h> using namespace Niflib; #define NifExport_CLASS_ID Class_ID(0xa57ff0a4, 0xa0374ffb) +static LPCTSTR NifExportSection = TEXT("MaxNifExport"); + class NifExport : public SceneExport { public: @@ -204,19 +209,51 @@ BOOL NifExport::SupportsOptions(int ext, DWORD options) int NifExport::DoExport(const TCHAR *name, ExpInterface *ei, Interface *i, BOOL suppressPrompts, DWORD options) { + // read application settings + AppSettings::Initialize(i); + + TCHAR iniName[MAX_PATH]; + LPCTSTR pluginDir = i->GetDir(APP_PLUGCFG_DIR); + PathCombine(iniName, pluginDir, "MaxNifTools.ini"); + bool iniNameIsValid = (-1 != _taccess(iniName, 0)); + + // Set whether Config should use registry or not + Exporter::mUseRegistry = !iniNameIsValid || GetIniValue<bool>(NifExportSection, "UseRegistry", false, iniName); // read config from registry - Exporter::readConfig(); + Exporter::readConfig(i); // read config from root node Exporter::readConfig(i->GetRootNode()); + // locate the "default" app setting + AppSettings *appSettings = NULL; + if (iniNameIsValid) + { + string fname = name; + // Locate which application to use. If Auto, find first app where this file appears in the root path list + string curapp = GetIniValue<string>(NifExportSection, "CurrentApp", "AUTO", iniName); + if (0 == _tcsicmp(curapp.c_str(), "AUTO")) { + // Scan Root paths + for (AppSettingsMap::iterator itr = TheAppSettings.begin(), end = TheAppSettings.end(); itr != end; ++itr){ + if ((*itr).IsFileInRootPaths(fname)) { + appSettings = &(*itr); + break; + } + } + } else { + appSettings = FindAppSetting(curapp); + } + } + if (appSettings == NULL && !TheAppSettings.empty()){ + appSettings = &TheAppSettings.front(); + } + if(!suppressPrompts) { if (DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_PANEL), GetActiveWindow(), NifExportOptionsDlgProc, (LPARAM)this) != IDOK) return true; - // write config to registry - Exporter::writeConfig(); + Exporter::writeConfig(i); // write config to root node Exporter::writeConfig(i->GetRootNode()); } @@ -224,10 +261,10 @@ int NifExport::DoExport(const TCHAR *name, ExpInterface *ei, Interface *i, BOOL try { Exporter::mSelectedOnly = (options&SCENE_EXPORT_SELECTED) != 0; - Exporter exp(i); + Exporter exp(i, appSettings); Ref<NiNode> root = DynamicCast<NiNode>(CreateBlock( "NiNode" )); - Exporter::Result result = exp.export(root, i->GetRootNode()); + Exporter::Result result = exp.doExport(root, i->GetRootNode()); if (result!=Exporter::Ok) throw exception("Unknown error."); diff --git a/NifExport/NifExport.def b/NifExport/NifExport.def index 8d5cce9..739e3de 100755 --- a/NifExport/NifExport.def +++ b/NifExport/NifExport.def @@ -1,4 +1,3 @@ -LIBRARY NifExport EXPORTS LibDescription @1 LibNumberClasses @2 diff --git a/NifExport/NifExport_VC80.vcproj b/NifExport/NifExport_VC80.vcproj new file mode 100644 index 0000000..f26a65a --- /dev/null +++ b/NifExport/NifExport_VC80.vcproj @@ -0,0 +1,1024 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NifExport" + ProjectGUID="{E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}" + RootNamespace="NifExport" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifExport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /FI"$(ProjectDir)pch.h"" + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib niflib.lib" + OutputFile="c:\3dsmax8\plugins\NifExport.dle" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile="NifExport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifExport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /FI"$(ProjectDir)pch.h"" + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + MinimalRebuild="true" + ExceptionHandling="2" + RuntimeLibrary="1" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib niflibd.lib" + OutputFile="c:\3dsmax8\plugins\NifExport.dle" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile="NifExport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifExport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /FI"$(ProjectDir)pch.h"" + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + MinimalRebuild="true" + ExceptionHandling="2" + RuntimeLibrary="1" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib niflibd.lib" + OutputFile="c:\3dsmax6\plugins\NifExport.dle" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile="NifExport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifExport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /FI"$(ProjectDir)pch.h"" + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + SuppressStartupBanner="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib niflib.lib" + OutputFile="c:\3dsmax6\plugins\NifExport.dle" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile="NifExport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Release - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + CharacterSet="0" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifExport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /FI"$(ProjectDir)pch.h"" + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + SuppressStartupBanner="false" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib niflib.lib" + OutputFile="c:\3dsmax7\plugins\NifExport.dle" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile="NifExport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifExport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /FI"$(ProjectDir)pch.h"" + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + MinimalRebuild="true" + ExceptionHandling="2" + RuntimeLibrary="1" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + PrecompiledHeaderThrough="$(ProjectDir)pch.h" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib niflibd.lib" + OutputFile="c:\3dsmax7\plugins\NifExport.dle" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile="NifExport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath="Coll.cpp" + > + </File> + <File + RelativePath="Config.cpp" + > + </File> + <File + RelativePath=".\DllEntry.cpp" + > + </File> + <File + RelativePath="Exporter.cpp" + > + </File> + <File + RelativePath="Mesh.cpp" + > + </File> + <File + RelativePath="MtlTex.cpp" + > + </File> + <File + RelativePath="NifExport.cpp" + > + </File> + <File + RelativePath="NifExport.def" + > + </File> + <File + RelativePath=".\pch.cpp" + > + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + PrecompiledHeaderThrough="pch.h" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + PrecompiledHeaderThrough="pch.h" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + PrecompiledHeaderThrough="pch.h" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + PrecompiledHeaderThrough="pch.h" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + PrecompiledHeaderThrough="pch.h" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + PrecompiledHeaderThrough="pch.h" + /> + </FileConfiguration> + </File> + <File + RelativePath="Strips.cpp" + > + </File> + <File + RelativePath="Util.cpp" + > + </File> + <Filter + Name="NvTriStrip" + > + <File + RelativePath="NvTriStrip\NvTriStrip.cpp" + > + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + </File> + <File + RelativePath="NvTriStrip\NvTriStripObjects.cpp" + > + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + </File> + <File + RelativePath="NvTriStrip\VertexCache.cpp" + > + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="TriStripper" + > + <File + RelativePath="TriStripper\tri_stripper.cpp" + > + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="0" + /> + </FileConfiguration> + </File> + </Filter> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="Exporter.h" + > + </File> + <File + RelativePath="NifExport.h" + > + </File> + <File + RelativePath="pch.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + <Filter + Name="NvTriStrip" + > + <File + RelativePath="NvTriStrip\NvTriStrip.h" + > + </File> + <File + RelativePath="NvTriStrip\NvTriStripObjects.h" + > + </File> + <File + RelativePath="NvTriStrip\VertexCache.h" + > + </File> + </Filter> + <Filter + Name="TriStripper" + > + <File + RelativePath="TriStripper\cache_simulator.h" + > + </File> + <File + RelativePath="TriStripper\graph_array.h" + > + </File> + <File + RelativePath="TriStripper\heap_array.h" + > + </File> + <File + RelativePath="TriStripper\tri_stripper.h" + > + </File> + </Filter> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + <File + RelativePath="NifExport.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/NifExport/NvTriStrip/NvTriStrip.cpp b/NifExport/NvTriStrip/NvTriStrip.cpp index 779f37c..fb942c2 100755 --- a/NifExport/NvTriStrip/NvTriStrip.cpp +++ b/NifExport/NvTriStrip/NvTriStrip.cpp @@ -301,7 +301,7 @@ bool GenerateStrips(const unsigned short* in_indices, const unsigned int in_numI //first, the strips int startingLoc = 0; - for(size_t stripCtr = 0; stripCtr < numSeparateStrips; stripCtr++) + for(size_t stripCtr = 0; stripCtr < numSeparateStrips; stripCtr++) { int stripLength = 0; diff --git a/NifExport/NvTriStrip/NvTriStripObjects.cpp b/NifExport/NvTriStrip/NvTriStripObjects.cpp index e508ccc..474d530 100755 --- a/NifExport/NvTriStrip/NvTriStripObjects.cpp +++ b/NifExport/NvTriStrip/NvTriStripObjects.cpp @@ -297,6 +297,9 @@ NvFaceInfo* NvStripifier::FindGoodResetPoint(NvFaceInfoVec &faceInfos, NvEdgeInf if(result == NULL) { int numFaces = faceInfos.size(); + if (numFaces == 0) + return NULL; + int startPoint; if(bFirstTimeResetPoint) { diff --git a/NifExport/niflib/NIF_Blocks.cpp b/NifExport/niflib/NIF_Blocks.cpp deleted file mode 100755 index 3c052f6..0000000 --- a/NifExport/niflib/NIF_Blocks.cpp +++ /dev/null @@ -1,4963 +0,0 @@ -/* Copyright (c) 2005, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the NIF File Format Library and Tools - project nor the names of its contributors may be used to endorse - or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -//#define IM_DEBUG - -#include "NIF_Blocks.h" -#include "nif_math.h" -#include "nif_attrs.h" -#include <cmath> -#include <sstream> -#ifdef IM_DEBUG -#include <imdebug.h> -#endif - -#ifdef WIN32 -#define endl "\r\n" -#endif - -extern string current_file; - -/*********************************************************** - * ANode methods - **********************************************************/ - -Matrix44 ANode::GetLocalTransform() const { - //Get transform data from atributes - Matrix33 rot = GetAttr("Rotation")->asMatrix33(); - Float3 tran = GetAttr("Translation")->asFloat3(); - float scale = GetAttr("Scale")->asFloat(); - - return Matrix44( Vector3( tran[0], tran[1], tran[2] ), rot, scale ); -} - -Matrix44 ANode::GetWorldTransform() const { - //Get Parent Transform if there is one - blk_ref par = GetParent(); - INode * node; - if ( par.is_null() == false && ( node = (INode*)par->QueryInterface(ID_NODE) ) != NULL) { - //Get Local Transform - Matrix44 local = GetLocalTransform(); - - //Get Parent World Transform - Matrix44 par_world = node->GetWorldTransform(); - - //Multipy local matrix and parent world matrix for result - return par_world * local; - } - else { - //No parent transform, simply return local transform - return GetLocalTransform(); - } -} - -Matrix44 ANode::GetWorldBindPos() const { - return bindPosition; - //for (int i = 0; i < 4; ++i) { - // for (int j = 0; j < 4; ++j) { - // out_matrix[i][j] = bindPosition[i][j]; - // } - //} -} - -Matrix44 ANode::GetLocalBindPos() const { - //Get Parent Transform if there is one - blk_ref par = GetParent(); - INode * node; - if ( par.is_null() == false && ( node = (INode*)par->QueryInterface(ID_NODE) ) != NULL) { - //There is a node parent - //multiply its inverse with this block's bind position to get the local bind position - Matrix44 par_mat = node->GetWorldBindPos(); - Matrix44 par_inv = par_mat.Inverse(); - - return bindPosition * par_inv; - } - else { - //No parent transform, simply return local transform - return GetWorldBindPos(); - } -} - -void ANode::SetWorldBindPos( Matrix44 const & m ) { - bindPosition = m; - //for (int i = 0; i < 4; ++i) { - // for (int j = 0; j < 4; ++j) { - // bindPosition[i][j] = in_matrix[i][j]; - // } - //} -} - -void ANode::IncCrossRef( IBlock * block ) { - //Add block to list - ABlock::IncCrossRef( block ); - - ResetSkinnedFlag(); -} - -void ANode::DecCrossRef( IBlock * block ) { - ABlock::DecCrossRef( block ); - - ResetSkinnedFlag(); -} - -void ANode::ResetSkinnedFlag() { - //Count the number of cross references that are NiSkinData - int count = 0; - list<IBlock*>::iterator it; - for (it = _cross_refs.begin(); it != _cross_refs.end(); ++it) { - if ( (*it)->QueryInterface( ID_SKIN_DATA ) != NULL ) { - ++count; - } - } - - //Get Flags attribute - attr_ref flag_attr = GetAttr("Flags"); - int flags = flag_attr->asInt(); - - //If count == 0, then flag SHOULD be set - if ( count == 0 && ((flags & 8) == 0) ) { - //Flag is not set, flip the bit - flags ^= 8; - } - - //If count > 0, then flag should NOT be set - if ( count >> 0 && ((flags & 8) != 0) ) { - //Flag is set, flip the bit - flags ^= 8; - } - - //Store result - flag_attr->Set(flags); -} - -/*********************************************************** - * NiNode methods - **********************************************************/ - -string NiNode::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << ABlock::asString(); - - //Matrix33 m; - //GetAttr("Rotation")->asMatrix33( m ); - - //Vector rows[3]; - - //rows[0] = Vector(m[0][0], m[0][1], m[0][2]); - //rows[1] = Vector(m[1][0], m[1][1], m[1][2]); - //rows[2] = Vector(m[2][0], m[2][1], m[2][2]); - - - ////out << "Rotation Matrix Test:" << endl - //// << " Dot Products of each row with each other row:" << endl; - - ////for (int i = 0; i < 3; ++i) { - //// for (int j = 0; j < 3; ++j) { - //// out << " Rows " << i << " & " << j << ": " << rows[i].dot(rows[j]) << endl; - //// } - ////} - - //float pi = 3.141592653589793f; - //out << "Euler Angles:" << endl - // << " X: " << atan2( m[1][2], m[2][2] ) / pi * 180.0 << endl - // << " Y: " << asin( -m[0][2] ) / pi * 180.0 << endl - // << " Z: " << atan2( m[0][1], m[0][0] ) / pi * 180.0 << endl; - - //Quat q = MatrixToQuat( m ); - //out << "Quaternion: [" << setw(6) << q.w << " (" << setw(6) << q.x << "," << setw(6) << q.y << "," << setw(6) << q.z << ")]" << endl; - - //Matrix built_up = IdentityMatrix(); - //GetBuiltUpTransform(blk_ref(this), built_up); - //out << "Built Up Transformations:" << endl - // << " |" << setw(6) << built_up(0,0) << "," << setw(6) << built_up(0,1) << "," << setw(6) << built_up(0,2) << "," << setw(6) << built_up(0,3) << " |" << endl - // << " |" << setw(6) << built_up(1,0) << "," << setw(6) << built_up(1,1) << "," << setw(6) << built_up(1,2) << "," << setw(6) << built_up(1,3) << " |" << endl - // << " |" << setw(6) << built_up(2,0) << "," << setw(6) << built_up(2,1) << "," << setw(6) << built_up(2,2) << "," << setw(6) << built_up(2,3) << " |" << endl - // << " |" << setw(6) << built_up(3,0) << "," << setw(6) << built_up(3,1) << "," << setw(6) << built_up(3,2) << "," << setw(6) << built_up(3,3) << " |" << endl; - - //for ( int r = 0; r < 3; ++r ) { - // for ( int c = 0; c < 3; ++c) { - // m[r][c] = built_up(r,c); - // } - //} - //q = MatrixToQuat( m ); - //out << "Quaternion: [" << setw(6) << q.w << " (" << setw(6) << q.x << "," << setw(6) << q.y << "," << setw(6) << q.z << ")]" << endl; - //out << "Euler Angles:" << endl - // << " X: " << atan2( m[1][2], m[2][2] ) / pi * 180.0 << endl - // << " Y: " << asin( -m[0][2] ) / pi * 180.0 << endl - // << " Z: " << atan2( m[0][1], m[0][0] ) / pi * 180.0 << endl; - - //built_up = built_up.inverse(); - - //out << "Inverse Built Up:" << endl - // << " |" << setw(6) << built_up(0,0) << "," << setw(6) << built_up(0,1) << "," << setw(6) << built_up(0,2) << "," << setw(6) << built_up(0,3) << " |" << endl - // << " |" << setw(6) << built_up(1,0) << "," << setw(6) << built_up(1,1) << "," << setw(6) << built_up(1,2) << "," << setw(6) << built_up(1,3) << " |" << endl - // << " |" << setw(6) << built_up(2,0) << "," << setw(6) << built_up(2,1) << "," << setw(6) << built_up(2,2) << "," << setw(6) << built_up(2,3) << " |" << endl - // << " |" << setw(6) << built_up(3,0) << "," << setw(6) << built_up(3,1) << "," << setw(6) << built_up(3,2) << "," << setw(6) << built_up(3,3) << " |" << endl; - - //for ( int r = 0; r < 3; ++r ) { - // for ( int c = 0; c < 3; ++c) { - // m[r][c] = built_up(r,c); - // } - //} - //q = MatrixToQuat( m ); - //out << "Quaternion: [" << setw(6) << q.w << " (" << setw(6) << q.x << "," << setw(6) << q.y << "," << setw(6) << q.z << ")]" << endl; - - //out << "Euler Angles:" << endl - // << " X: " << atan2( m[1][2], m[2][2] ) / pi * 180.0 << endl - // << " Y: " << asin( -m[0][2] ) / pi * 180.0 << endl - // << " Z: " << atan2( m[0][1], m[0][0] ) / pi * 180.0 << endl; - - out << "Flag Analysis:" << endl - << " Hidden: "; - - int flags = GetAttr("Flags")->asInt(); - - if (flags & 1) - out << "Yes" << endl; - else - out << "No" << endl; - - out << " Collision Detection Mode: "; - - - if (flags & 2) - out << "Use Triangles" << endl; - else if (flags & 4) - out << "Use Oriented Bounding Boxes" << endl; - else - out << "None" << endl; - - out << " Is Skin Influence: "; - - if (flags & 8) - out << "No" << endl; - else - out << "Yes" << endl; - - //Create list of influenced skins - list<IBlock*> skin_refs; - - list<IBlock*>::const_iterator it; - for (it = _cross_refs.begin(); it != _cross_refs.end(); ++it ) { - if ( (*it)->QueryInterface( ID_SKIN_DATA ) != NULL ) { - skin_refs.push_back(*it); - } - } - - if (skin_refs.size() > 0) { - out << "Influenced Skins:" << endl; - - list<IBlock*>::const_iterator it; - for (it = skin_refs.begin(); it != skin_refs.end(); ++it ) { - out << " " << blk_ref(*it) << endl; - } - } - - return out.str(); -} - -/*********************************************************** - * NiTexturingProperty methods - **********************************************************/ - -void NiTexturingProperty::Read( istream& file, unsigned int version ){ - - AProperty::Read( file, version ); - - appl_mode = ApplyMode( ReadUInt(file) ); - - uint tex_count = ReadUInt( file ); - - textures.resize( tex_count ); - - for ( uint i = 0; i < textures.size(); ++i ) { - NifStream( textures[i], file, version ); - - if ( i == BUMP_MAP && textures[i].isUsed == true ) { - NifStream( bmLumaScale, file ); - NifStream( bmLumaOffset, file ); - NifStream( bmMatrix[0][0], file ); - NifStream( bmMatrix[1][0], file ); - NifStream( bmMatrix[0][1], file ); - NifStream( bmMatrix[1][1], file ); - } - } - - //Extra Texture group exists from version 10.0.1.0 on - if ( version >= VER_10_0_1_0 ) { - uint extra_tex_count = ReadUInt( file ); - - extra_textures.resize( extra_tex_count ); - - for ( uint i = 0; i < extra_textures.size(); ++i ) { - NifStream( extra_textures[i].first, file, version ); - if ( extra_textures[i].first.isUsed ) { - NifStream( extra_textures[i].second, file ); - } - } - } -} - -void NiTexturingProperty::Write( ostream& file, unsigned int version ) const { - - AProperty::Write( file, version ); - - WriteUInt( uint(appl_mode), file ); - - WriteUInt( uint(textures.size()), file ); - - for ( uint i = 0; i < textures.size(); ++i ) { - NifStream( textures[i], file, version ); - - if ( i == BUMP_MAP && textures[i].isUsed == true ) { - NifStream( bmLumaScale, file ); - NifStream( bmLumaOffset, file ); - NifStream( bmMatrix[0][0], file ); - NifStream( bmMatrix[1][0], file ); - NifStream( bmMatrix[0][1], file ); - NifStream( bmMatrix[1][1], file ); - } - } - - //Extra Texture group exists from version 10.0.1.0 on - if ( version >= VER_10_0_1_0 ) { - WriteUInt( uint(extra_textures.size()), file ); - - for ( uint i = 0; i < extra_textures.size(); ++i ) { - NifStream( extra_textures[i].first, file, version ); - if ( extra_textures[i].first.isUsed ) { - NifStream( extra_textures[i].second, file ); - } - } - } -} - -string NiTexturingProperty::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Apply Mode: " << appl_mode << endl - << "Main Textures: " << uint(textures.size()) << endl; - - for ( uint i = 0; i < textures.size(); ++i ) { - out << " Texture " << i + 1 << ": "; - switch (i) { - case BASE_MAP: - out << "Base Map"; - break; - case DARK_MAP: - out << "Dark Map"; - break; - case DETAIL_MAP: - out << "Detail Map"; - break; - case GLOSS_MAP: - out << "Gloss Map"; - break; - case GLOW_MAP: - out << "Glow Map"; - break; - case BUMP_MAP: - out << "Bump Map"; - break; - case DECAL_0_MAP: - out << "Decal 0 Map"; - break; - }; - out << endl; - - out << textures[i].asString(); - } - - if ( textures.size() >= BUMP_MAP && textures[BUMP_MAP].isUsed == true ) { - out << "BumpMap Info:" << endl - << " Luma Offset: " << bmLumaOffset << endl - << " Luma Scale: " << bmLumaScale << endl - << " Matrix:" << endl - << " |" << setw(6) << bmMatrix[0][0] << "," << setw(6) << bmMatrix[0][1] << " |" << endl - << " |" << setw(6) << bmMatrix[1][0] << "," << setw(6) << bmMatrix[1][1] << " |" << endl; - } - - for ( uint i = 0; i < extra_textures.size(); ++i ) { - out << " Extra Texture " << i + 1 << ": " << endl; - - out << extra_textures[i].first.asString() - << " Unknown Extra Int: " << extra_textures[i].second << endl; - } - - return out.str(); -} - -void NiTexturingProperty::FixLinks( const vector<blk_ref> & blocks ) { - ABlock::FixLinks( blocks ); - - //Main Textures - for (uint i = 0; i < textures.size(); ++i ) { - if ( textures[i].isUsed == true ) { - //Fix link for this child - textures[i].source = blocks[ textures[i].source.get_index() ]; - - //Add this block to child as a parent - AddChild( textures[i].source.get_block() ); - } - } - - //Extra Textures - for (uint i = 0; i < extra_textures.size(); ++i ) { - if ( extra_textures[i].first.isUsed == true ) { - //Fix link for this child - extra_textures[i].first.source = blocks[ extra_textures[i].first.source.get_index() ]; - - //Add this block to child as a parent - AddChild( extra_textures[i].first.source.get_block() ); - } - } -} - -list<blk_ref> NiTexturingProperty::GetLinks() const { - list<blk_ref> links = ABlock::GetLinks(); - - //--Add Internal Links--// - - //Main Textures - for (uint i = 0; i < textures.size(); ++i ) { - if ( textures[i].isUsed == true ) { - links.push_back( textures[i].source ); - } - } - - //Extra Textures - for (uint i = 0; i < extra_textures.size(); ++i ) { - if ( extra_textures[i].first.isUsed == true ) { - links.push_back( extra_textures[i].first.source ); - } - } - - //Remove NULL links - links.remove( blk_ref(-1) ); - - return links; -} - -NiTexturingProperty::~NiTexturingProperty() { - //Remove all parents that were set as this block is dying. - - //Main Textures - for (uint i = 0; i < textures.size(); ++i ) { - if ( textures[i].isUsed == true ) { - RemoveChild( textures[i].source.get_block() ); - } - } - - //Extra Textures - for (uint i = 0; i < extra_textures.size(); ++i ) { - if ( extra_textures[i].first.isUsed == true ) { - RemoveChild( extra_textures[i].first.source.get_block() ); - } - } -} - -void NiTexturingProperty::SetTextureCount( int new_count ) { - - if ( new_count < int(textures.size()) ) { - //Remove active texture links that are about to be destroyed as children - for ( uint i = new_count; i < textures.size(); ++i ) { - RemoveChild( textures[i].source.get_block() ); - } - } - - //Resize array - textures.resize( new_count ); -} - -void NiTexturingProperty::SetExtraTextureCount( int new_count ) { - if ( new_count < int(extra_textures.size()) ) { - //Remove active texture links that are about to be destroyed as children - for ( uint i = new_count; i < extra_textures.size(); ++i ) { - RemoveChild( extra_textures[i].first.source.get_block() ); - } - } - - //Resize array - extra_textures.resize( new_count ); -} - -void NiTexturingProperty::SetTexture( int n, TexDesc & new_val ) { - //Make sure index is not out of range - if ( n < 0 || n > int(textures.size()) ) { - throw runtime_error("SetTexture - Index out of range. Call SetTextureCount first."); - } - - //If new texture isUsed is false, then nullify any links - if ( new_val.isUsed == false ) { - new_val.source = blk_ref(-1); - } - - //If blk_ref is different, children need to be changed - if ( new_val.source != textures[n].source ) { - //the new reference is different, discard the old child... - if ( textures[n].source.is_null() == false ) { - RemoveChild( textures[n].source.get_block() ); - } - - //and add the new one - if ( new_val.source.is_null() == false ) { - AddChild( new_val.source.get_block() ); - } - } - - //Finally copy the values - textures[n] = new_val; -} - -void NiTexturingProperty::SetExtraTexture( int n, TexDesc & new_val ) { - //Make sure index is not out of range - if ( n < 0 || n > int(extra_textures.size()) ) { - throw runtime_error("SetTexture - Index out of range. Call SetTextureCount first."); - } - - //If new texture isUsed is false, then nullify any links - if ( new_val.isUsed == false ) { - new_val.source = blk_ref(-1); - } - - //If blk_ref is different, children need to be changed - if ( new_val.source != extra_textures[n].first.source ) { - //the new reference is different, discard the old child... - if ( extra_textures[n].first.source.is_null() == false ) { - RemoveChild( extra_textures[n].first.source.get_block() ); - } - - //and add the new one - if ( new_val.source.is_null() == false ) { - AddChild( new_val.source.get_block() ); - } - } - - //Finally copy the values - extra_textures[n].first = new_val; -} - -/*********************************************************** - * NiBoneLODController methods - **********************************************************/ - -void NiBoneLODController::Read( istream& file, unsigned int version ){ - - AController::Read( file, version ); - - unkInt1 = ReadUInt( file ); - - uint numNodeGroups = ReadUInt( file ); - - unkInt2 = ReadUInt( file ); - - // Read Node Groups - _node_groups.resize( numNodeGroups ); - for (uint i = 0; i < _node_groups.size(); ++i ) { - uint groupSize = ReadUInt( file ); - _node_groups[i].resize(groupSize); - for (uint j = 0; j < _node_groups[i].size(); ++j ) { - _node_groups[i][j].set_index( ReadUInt(file) ); - } - } - - // Read Shape Groups - uint numShapeGroups = ReadUInt( file ); - _shape_groups.resize( numShapeGroups ); - for ( uint i = 0; i < _shape_groups.size(); ++i ) { - uint groupSize = ReadUInt( file ); - _shape_groups[i].resize( groupSize ); - for ( uint j = 0; j < _shape_groups[i].size(); ++j ) { - _shape_groups[i][j].first.set_index( ReadUInt(file) ); - _shape_groups[i][j].second.set_index( ReadUInt(file) ); - } - } - - //Read Shape Group 2 - uint numShapeGroup2 = ReadUInt( file ); - _shape_group2.resize( numShapeGroup2 ); - - for ( uint i = 0; i < _shape_group2.size(); ++i ) { - _shape_group2[i].set_index( ReadUInt(file) ); - } - -} - -void NiBoneLODController::Write( ostream& file, unsigned int version ) const { - AController::Write( file, version ); - - WriteUInt( unkInt1, file ); - - WriteUInt( uint(_node_groups.size()), file ); - - WriteUInt( unkInt2, file ); - - //Node Groups - for (uint i = 0; i < _node_groups.size(); ++i ) { - WriteUInt( uint(_node_groups[i].size()), file ); - for (uint j = 0; j < _node_groups[i].size(); ++j ) { - WriteUInt( _node_groups[i][j]->GetBlockNum(), file ); - } - } - - //Shape Groups - WriteUInt( uint(_shape_groups.size()), file ); - for ( uint i = 0; i < _shape_groups.size(); ++i ) { - WriteUInt( (uint)_shape_groups[i].size(), file ); - for ( uint j = 0; j < _shape_groups[i].size(); ++j ) { - WriteUInt( _shape_groups[i][j].first->GetBlockNum(), file ); - WriteUInt( _shape_groups[i][j].second->GetBlockNum(), file ); - } - } - - //Shape Group 2 - WriteUInt( (uint)_shape_group2.size(), file ); - for ( uint i = 0; i < _shape_group2.size(); ++i ) { - WriteUInt( _shape_group2[i]->GetBlockNum(), file ); - } -} - -string NiBoneLODController::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Unknown Int 1: " << unkInt1 << endl - << "Num Node Groups: " << uint(_node_groups.size()) << endl - << "Unknown Int 2: " << unkInt2 << endl; - - //Node Groups - for (uint i = 0; i < _node_groups.size(); ++i ) { - out << " " << i + 1 << ": " << " Group Size: " << uint(_node_groups[i].size()) << endl; - - for (uint j = 0; j < _node_groups[i].size(); ++j ) { - out << " " << j + 1 << ": " << _node_groups[i][j] << endl; - } - } - - // Shape Groups - out << "Num Shape Groups: " << uint(_shape_groups.size()) << endl; - for ( uint i = 0; i < _shape_groups.size(); ++i ) { - out << " " << i + 1 << ": " << " Group Size: " << uint(_shape_groups[i].size()) << endl; - for ( uint j = 0; j < _shape_groups[i].size(); ++j ) { - out << " " << j + 1 << ": " << _shape_groups[i][j].first << endl - << " " << j + 1 << ": " << _shape_groups[i][j].second << endl; - } - } - - //Shape Group 2 - out << "Num Shape Group 2: " << uint(_shape_group2.size()) << endl; - for ( uint i = 0; i < _shape_group2.size(); ++i ) { - out << " " << i + 1 << ": " << _shape_group2[i] << endl; - } - - return out.str(); -} - -void NiBoneLODController::FixLinks( const vector<blk_ref> & blocks ) { - ABlock::FixLinks( blocks ); - - //Node Groups - for (uint i = 0; i < _node_groups.size(); ++i ) { - for (uint j = 0; j < _node_groups[i].size(); ++j ) { - //Fix link for this child - _node_groups[i][j] = blocks[ _node_groups[i][j].get_index() ]; - - //Add this block to child as a parent - AddChild( _node_groups[i][j].get_block() ); - } - } - - // Shape Groups - for ( uint i = 0; i < _shape_groups.size(); ++i ) { - for ( uint j = 0; j < _shape_groups[i].size(); ++j ) { - //Fix links for this child - _shape_groups[i][j].first = blocks[ _shape_groups[i][j].first.get_index() ]; - _shape_groups[i][j].second = blocks[ _shape_groups[i][j].second.get_index() ]; - - //Add these blocks to child as a parent - AddChild( _shape_groups[i][j].first.get_block() ); - AddChild( _shape_groups[i][j].second.get_block() ); - } - } - - //Shape Group 2 - for ( uint i = 0; i < _shape_group2.size(); ++i ) { - //Fix link for this child - _shape_group2[i] = blocks[ _shape_group2[i].get_index() ]; - - //Add this block to child as a parent - AddChild( _shape_group2[i].get_block() ); - } -} - -list<blk_ref> NiBoneLODController::GetLinks() const { - list<blk_ref> links = ABlock::GetLinks(); - - //--Add Internal Links--// - - //Node Groups - for (uint i = 0; i < _node_groups.size(); ++i ) { - for (uint j = 0; j < _node_groups[i].size(); ++j ) { - links.push_back( _node_groups[i][j] ); - } - } - - // Shape Groups - for ( uint i = 0; i < _shape_groups.size(); ++i ) { - for ( uint j = 0; j < _shape_groups[i].size(); ++j ) { - links.push_back( _shape_groups[i][j].first ); - links.push_back( _shape_groups[i][j].second ); - } - } - - //Shape Group 2 - for ( uint i = 0; i < _shape_group2.size(); ++i ) { - links.push_back( _shape_group2[i] ); - } - - //Remove NULL links - links.remove( blk_ref(-1) ); - - return links; -} - -NiBoneLODController::~NiBoneLODController() { - //Remove all parents that were set as this block is dying. - - //Node Groups - for (uint i = 0; i < _node_groups.size(); ++i ) { - for (uint j = 0; j < _node_groups[i].size(); ++j ) { - RemoveChild( _node_groups[i][j].get_block() ); - } - } - - // Shape Groups - for ( uint i = 0; i < _shape_groups.size(); ++i ) { - for ( uint j = 0; j < _shape_groups[i].size(); ++j ) { - //Add these blocks to child as a parent - /*((ABlock*)_shape_groups[i][j].first.get)->RemoveParent( this ); - ((ABlock*)_shape_groups[i][j].second)->RemoveParent( this );*/ - RemoveChild( _shape_groups[i][j].first.get_block() ); - RemoveChild( _shape_groups[i][j].second.get_block() ); - } - } - - //Shape Group 2 - for ( uint i = 0; i < _shape_group2.size(); ++i ) { - //Add this block to child as a parent - RemoveChild( _shape_group2[i].get_block() ); - } -} - -/*********************************************************** - * NiRangeLODData methods - **********************************************************/ - -void NiRangeLODData::Read( istream& file, unsigned int version ){ - NifStream( _center, file ); - int numRanges = ReadUInt( file ); - ranges.resize( numRanges ); - NifStream( ranges, file ); -} - -void NiRangeLODData::Write( ostream& file, unsigned int version ) const { - NifStream( _center, file ); - WriteUInt( uint(ranges.size()), file ); - NifStream( ranges, file ); -} - -string NiRangeLODData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << " LOD Center: (" << _center.x << ", " << _center.y << ", " << _center.z << ")" << endl; - - out << uint(ranges.size()) << endl; - - for ( uint i = 0; i < ranges.size(); ++i ) { - out << " " << i + 1 << ") Near: " << ranges[i].near << " Far: " << ranges[i].far << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiScreenLODData methods - **********************************************************/ - -void NiScreenLODData::Read( istream& file, unsigned int version ){ - //8 unknown floats - for ( uint i = 0; i < 8; ++i ) { - NifStream( unk_floats[i], file ); - } - - //float list - uint unk_count = ReadUInt( file ); - unk_float_list.resize( unk_count ); - - NifStream( unk_float_list, file ); -} - -void NiScreenLODData::Write( ostream& file, unsigned int version ) const { - //8 unknown floats - for ( uint i = 0; i < 8; ++i ) { - NifStream( unk_floats[i], file ); - } - - //float list - WriteUInt( uint( unk_float_list.size()), file ); - - NifStream( unk_float_list, file ); -} - -string NiScreenLODData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - //8 unknown floats - out << "Unknown 8 Floats: " << endl; - for ( uint i = 0; i < 8; ++i ) { - out << " " << i + 1 << ": " << unk_floats[i] << endl; - } - - //float list - out << "Unknown Float List: " << uint(unk_float_list.size()); - for ( uint i = 0; i < unk_float_list.size(); ++i ) { - out << " " << i + 1 << ": " << unk_float_list[i] << endl; - } - - return out.str(); -} - -/*********************************************************** - * AShapeData methods - **********************************************************/ - -/** - * AShapeData::Read - Assumes block name has already been read from in - */ -void AShapeData::Read( istream& in, unsigned int version ){ - - //GetAttr("Name")->Read( in, version ); - - ushort vert_count = ReadUShort( in ); - - //There is an unknown short here from version 10.1.0.0 on - if ( version >= VER_10_1_0_0 ) { - ReadUShort( in ); - } - - bool hasVertices = ReadBool( in, version ); - if ( hasVertices != 0 ){ - vertices.resize( vert_count ); - for ( uint i = 0; i < vertices.size(); ++i ){ - NifStream( vertices[i], in ); - } - } - - /// numTexSets up here up from version 10.0.1.0 on along with an unknown byte - ushort numTexSets; - bool hasUnknown; - if ( version >= VER_10_0_1_0 ) { - numTexSets = ReadByte( in ); - hasUnknown = ReadBool( in, version ); - } - - bool hasNormals = ReadBool( in, version );; - if ( hasNormals != 0 ){ - normals.resize( vert_count ); - for ( uint i = 0; i < normals.size(); ++i ){ - NifStream( normals[i], in ); - } - } - - //After version 10.1.0.0 there's several unknown vectors here - if ( version >= VER_10_1_0_0 && hasUnknown == true ) { - unk_vects.resize( vert_count * 2 ); - for ( uint i = 0; i < unk_vects.size(); ++i ){ - NifStream( unk_vects[i], in ); - } - } - - //Read center and radius but throw the values away - ReadFloat( in ); - ReadFloat( in ); - ReadFloat( in ); - ReadFloat( in ); - - bool hasVertexColors = ReadBool( in, version );; - if ( hasVertexColors != 0 ){ - colors.resize( vert_count ); - for ( uint i = 0; i < colors.size(); ++i ){ - NifStream( colors[i], in ); - } - } - // numTexSets down here up to version 4.2.2.0 - if ( version <= VER_4_2_2_0 ) { - numTexSets = ReadUShort( in ); - } - // hasUVs does not exist after version 4.0.0.2 - bool hasUVs = true; - if ( version <= VER_4_0_0_2 ) { - hasUVs = ReadBool( in, version ); - } - if ( numTexSets > 0 && hasUVs == true ){ - uv_sets.resize( numTexSets ); - for ( uint i = 0; i < uv_sets.size(); ++i ){ - uv_sets[i].resize( vert_count ); - for ( uint j = 0; j < uv_sets[i].size(); ++j){ - uv_sets[i][j].u = ReadFloat( in ); - uv_sets[i][j].v = ReadFloat( in ); - } - } - } - - //Unknown Short here from version 10.0.1.0 on - //Just read it and throw it away for now - if ( version >= VER_10_0_1_0) { - ReadUShort( in ); - } - - //GetAttr("Unknown Link")->Read( in, version ); -} - -string AShapeData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Name: " << GetAttr("Name")->asString() << endl; - - out << "Vertices: " << uint(vertices.size()); - if (verbose) { - out << " "; - for ( uint i = 0; i < vertices.size(); ++i) { - if (i % 3 == 0) - out << endl << " "; - else - out << " "; - - out << "(" << setw(5) << vertices[i].x << ", " << setw(5) << vertices[i].y << ", " << setw(5) << vertices[i].z << " )"; - } - } else { - out << endl << "<<Data Not Shown>>"; - } - out << endl; - - out << "Normals: " << uint(normals.size()); - if (verbose) { - out << " "; - for ( uint i = 0; i < normals.size(); ++i) { - if (i % 3 == 0) - out << endl << " "; - else - out << " "; - - out << "(" << setw(5) << normals[i].x << ", " << setw(5) << normals[i].y << ", " << setw(5) << normals[i].z << " )"; - } - } else { - out << endl << "<<Data Not Shown>>"; - } - out << endl; - - out << "Unknown Vectors: " << uint(unk_vects.size()); - if (verbose) { - out << " "; - for ( uint i = 0; i < unk_vects.size(); ++i) { - if (i % 3 == 0) - out << endl << " "; - else - out << " "; - - out << "(" << setw(5) << unk_vects[i].x << ", " << setw(5) << unk_vects[i].y << ", " << setw(5) << unk_vects[i].z << " )"; - } - } else { - out << endl << "<<Data Not Shown>>"; - } - out << endl; - - Vector3 center; - float radius; - CalcCentAndRad( center, radius ); - - - out << "Center: (" << center.x << ", " << center.y << ", " << center.z << ")" << endl - << "Radius: " << radius << endl - << "Vertex Colors: " << uint(colors.size()); - if (verbose) { - out << " "; - for ( uint i = 0; i < colors.size(); ++i) { - if (i % 3 == 0) - out << endl << " "; - else - out << " "; - - out << "(" << setw(5) << colors[i].r << ", " << setw(5) << colors[i].g << ", " << setw(5) << colors[i].b << ", " << setw(5) << colors[i].a << " )"; - } - } else { - out << endl << "<<Data Not Shown>>"; - } - out << endl; - - out << "Texture Coordinate Sets: " << uint(uv_sets.size()); - if (verbose) { - for ( uint i = 0; i < uv_sets.size(); ++i) { - out << endl - << " UV Set " << i+1 << ":"; - - for ( uint j = 0; j < uv_sets[i].size(); ++j) { - if (j % 3 == 0) - out << endl << " "; - else - out << " "; - - out << "(" << setw(5) << uv_sets[i][j].u << ", " << setw(5) << uv_sets[i][j].v << " )"; - } - } - } else { - out << endl << "<<Data Not Shown>>"; - } - out << endl; - - out << "Unknown Link: " << GetAttr("Unknown Link")->asString() << endl; - - return out.str(); -} - -void AShapeData::CalcCentAndRad( Vector3 & center, float & radius ) const { - //Check if there are no vertices - if ( vertices.size() == 0 ) { - center.Set(0.0f, 0.0f, 0.0f); - radius = 0.0f; - return; - } - - //Set lows and highs to first vertex - Vector3 lows = vertices[0]; - Vector3 highs = vertices[0]; - - //Iterate through the rest of the vertices, adjusting the stored values - //if a vertex with lower or higher values is found - for (vector<Vector3>::const_iterator i = vertices.begin()+1; i != vertices.end(); ++i ) { - if ( i->x > highs.x ) highs.x = i->x; - else if ( i->x < lows.x ) lows.x = i->x; - - if ( i->y > highs.y ) highs.y = i->y; - else if ( i->y < lows.y ) lows.y = i->y; - - if ( i->z > highs.z ) highs.z = i->z; - else if ( i->z < lows.z ) lows.z = i->z; - } - - //Now we know the extent of the shape, so the center will be the average of the lows and highs. - center.x = (highs.x + lows.x) / 2.0f; - center.y = (highs.y + lows.y) / 2.0f; - center.z = (highs.z + lows.z) / 2.0f; - - //The radius will be the largest distance from the center - Vector3 diff; - float dist2(0.0f), maxdist2(0.0f); - for (vector<Vector3>::const_iterator i = vertices.begin(); i != vertices.end(); ++i ) { - diff = center; - diff.x -= i->x; - diff.y -= i->y; - diff.z -= i->z; - dist2 = diff.x * diff.x + diff.y * diff.y + diff.z * diff.z; - if ( dist2 > maxdist2 ) maxdist2 = dist2; - }; - radius = sqrt(maxdist2); -} - -/** - * AShapeData::Write - */ -void AShapeData::Write( ostream& out, unsigned int version ) const { - - //GetAttr("Name")->Write( out, version ); - - WriteUShort( ushort(vertices.size()), out ); - - //There is an unknown short here from version 10.1.0.0 on - if ( version >= VER_10_1_0_0 ) { - WriteUShort( 0, out ); - } - - WriteBool( vertices.size() > 0, out, version ); - - for ( uint i = 0; i < vertices.size(); ++i ){ - NifStream( vertices[i], out ); - } - - /// numTexSets up here up from version 10.0.1.0 on along with an unkown byte - if ( version >= VER_10_0_1_0 ) { - WriteByte( byte(uv_sets.size()), out ); - WriteBool( unk_vects.size() > 0, out, version ); - } - - WriteBool( normals.size() > 0, out, version ); - - for ( uint i = 0; i < normals.size(); ++i ){ - NifStream( normals[i], out ); - } - - //Unkown vectors here from version 10.2.0.0 on - if ( version >= VER_10_2_0_0 ) { - for ( uint i = 0; i < unk_vects.size(); ++i ){ - NifStream( unk_vects[i], out ); - } - } - - Vector3 center; - float radius; - CalcCentAndRad( center, radius ); - - NifStream( center, out ); - NifStream( radius, out ); - - if ( version <= VER_4_0_0_2 ) { - // NifTexture bug workaround: - if ( colors.size() > 0 ) - WriteUInt( 0xffffffff, out ); - else - WriteUInt( 0, out ); - } else - WriteBool( colors.size() > 0, out, version ); - - for ( uint i = 0; i < colors.size(); ++i ){ - NifStream( colors[i], out ); - } - - // numTexSets down here up to version 4.2.2.0 - if ( version <= VER_4_2_2_0 ) { - WriteUShort( ushort(uv_sets.size()), out ); - } - // hasUVs does not exist after version 4.0.0.2 - //bool hasUVs = true; - if ( version <= VER_4_0_0_2 ) { - //WriteBool( uv_sets.size() > 0, out, version ); - // NifTexture bug workaround: - if (uv_sets.size() > 0) - WriteUInt( 0xffffffff, out ); - else - WriteUInt( 0, out ); - } - - for ( uint i = 0; i < uv_sets.size(); ++i ){ - for ( uint j = 0; j < uv_sets[i].size(); ++j){ - NifStream(uv_sets[i][j].u, out ); - NifStream(uv_sets[i][j].v, out ); - } - } - - //Unknown Short here from version 10.0.1.0 on - //Just write a zero - if ( version >= VER_10_0_1_0) { - WriteUShort( 0, out ); - } - - //GetAttr("Unknown Link")->Write( out, version ); -} - -void AShapeData::SetVertexCount(int n) { - if ( n > 65535 || n < 0 ) - throw runtime_error("Invalid Vertex Count: must be between 0 and 65535."); - - if ( n == 0 ) { - vertices.clear(); - normals.clear(); - colors.clear(); - for (uint i = 0; i < uv_sets.size(); ++i) { - uv_sets[i].clear(); - } - return; - } - - //n != 0 - vertices.resize(n); - - if ( normals.size() != 0 ) { - normals.resize(n); - } - if ( colors.size() != 0 ) { - colors.resize(n); - } - for (uint i = 0; i < uv_sets.size(); ++i) { - uv_sets[i].resize(n); - } -} - -void AShapeData::SetUVSetCount(int n) { - uv_sets.resize(n); -} - -//--Setters--// -void AShapeData::SetVertices( const vector<Vector3> & in ) { - if (in.size() != vertices.size() && in.size() != 0 ) - throw runtime_error("Vector size must equal Vertex Count or zero. Call SetVertexCount() to resize."); - vertices = in; -} - -void AShapeData::SetNormals( const vector<Vector3> & in ) { - if (in.size() != vertices.size() && in.size() != 0 ) - throw runtime_error("Vector size must equal Vertex Count or zero. Call SetVertexCount() to resize."); - normals = in; -} - -void AShapeData::SetColors( const vector<Color4> & in ) { - if (in.size() != vertices.size() && in.size() != 0 ) - throw runtime_error("Vector size must equal Vertex Count or zero. Call SetVertexCount() to resize."); - colors = in; -} - -void AShapeData::SetUVSet( int index, const vector<TexCoord> & in ) { - if (in.size() != vertices.size()) - throw runtime_error("Vector size must equal Vertex Count. Call SetVertexCount() to resize."); - uv_sets[index] = in; -} - -/*********************************************************** - * AParticlesData methods - **********************************************************/ - -void AParticlesData::Read( istream& file, unsigned int version ) { - AShapeData::Read( file, version ); - - //numParticles exists up to version 4.0.0.2 - if ( version <= VER_4_0_0_2 ) { - //This is just the number of vertices over again, so discard the data - ReadUShort( file ); - } - - //Size exists up to version 10.0.1.0 - if ( version <= VER_10_0_1_0 ) { - NifStream( size, file ); - } - - //numActive exists up to version 4.0.0.2 - if ( version <= VER_4_0_0_2 ) { - NifStream( numActive, file ); - } - - //Unknown short exits from version 4.1.0.12 to 10.0.1.0 - if ( version >= VER_4_1_0_12 && version <= VER_10_0_1_0 ) { - NifStream( unkShort, file ); - } - - hasSizes = ReadBool( file, version ); - - if ( hasSizes ) { - sizes.resize( vertices.size() ); - NifStream( sizes, file ); - } -} - -void AParticlesData::Write( ostream& file, unsigned int version ) const { - AShapeData::Write( file, version ); - - //numParticles exists up to version 4.0.0.2 - if ( version <= VER_4_0_0_2 ) { - //This is just the number of vertices over again - NifStream( uint(vertices.size()), file ); - } - - //Size exists up to version 10.0.1.0 - if ( version <= VER_10_1_0_0 ) { - NifStream( size, file ); - } - - //numActive exists up to version 4.0.0.2 - if ( version <= VER_4_0_0_2 ) { - NifStream( numActive, file ); - } - - //Unknown short exits from version 4.1.0.12 to 10.0.1.0 - if ( version >= VER_4_1_0_12 && version <= VER_10_0_1_0 ) { - NifStream( unkShort, file ); - } - - WriteBool( hasSizes, file, version ); - - if ( hasSizes ) { - NifStream( sizes, file ); - } -} - -string AParticlesData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AShapeData::asString(); - - out << "Num Particles: " << uint(vertices.size()) << endl - << "Size: " << size << endl - << "Num Active: " << numActive << endl - << "Unknown Short: " << unkShort << endl - << "Sizes: "; - - if ( hasSizes ) { - if (verbose) { - for ( uint i = 0; i < sizes.size(); ++i) { - out << i << ": " << sizes[i] << endl; - } - } else { - out << endl << "<<Data Not Shown>>"; - } - } else { - out << "None" << endl; - } - - return out.str(); -} - -/*********************************************************** - * APSysData methods - **********************************************************/ - -void APSysData::Read( istream& file, unsigned int version ) { - AShapeData::Read( file, version ); - - bool hasUnkFlts = ReadBool( file, version ); - if ( hasUnkFlts ) { - unkFloats1.resize( vertices.size() ); - for ( uint i = 0; i < unkFloats1.size(); ++i ) { - NifStream( unkFloats1[i], file ); - } - } - - NifStream( unkShort, file ); - - hasUnkFlts = ReadBool( file, version ); - if ( hasUnkFlts ) { - unkFloats2.resize( vertices.size() ); - for ( uint i = 0; i < unkFloats2.size(); ++i ) { - NifStream( unkFloats2[i], file ); - } - } - - NifStream( unkByte, file ); -} - -void APSysData::Write( ostream& file, unsigned int version ) const { - AShapeData::Write( file, version ); - - WriteBool( unkFloats1.size() > 0, file, version ); - for ( uint i = 0; i < unkFloats1.size(); ++i ) { - NifStream( unkFloats1[i], file ); - } - - NifStream( unkShort, file ); - - WriteBool( unkFloats2.size() > 0, file, version ); - for ( uint i = 0; i < unkFloats2.size(); ++i ) { - NifStream( unkFloats2[i], file ); - } - - - NifStream( unkByte, file ); -} - -string APSysData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AShapeData::asString(); - - out << "Unknown Floats 1: " << uint(unkFloats1.size()) << endl; - if (verbose) { - for ( uint i = 0; i < unkFloats1.size(); ++i ) { - out << i + 1 << ": " << unkFloats1[i] << endl; - } - } else { - out << "<<Data Not Shown>>"; - } - - out << "Unknown Short: " << unkShort << endl - << "Unknown Floats 2: " << uint(unkFloats2.size()) << endl; - if (verbose) { - for ( uint i = 0; i < unkFloats2.size(); ++i ) { - out << i + 1 << ": " << unkFloats2[i] << endl; - } - } else { - out << "<<Data Not Shown>>"; - } - - out << "Unknown Byte: " << int(unkByte) << endl; - - return out.str(); -} - -/*********************************************************** - * NiMeshPSysData methods - **********************************************************/ - -void NiMeshPSysData::Read( istream& file, unsigned int version ) { - APSysData::Read( file, version ); - - unkFloats.resize( vertices.size() * 14 ); - NifStream( unkFloats, file ); - - NifStream( unkInt, file ); - - //GetAttr("Modifier")->Read( file, version ); - - // From version 10.2.0.0 there are several new entries here - if ( version >= VER_10_2_0_0 ) { - NifStream( unkByte, file ); - - //GetAttr("Unknown Link Group")->Read( file, version ); - //GetAttr("Unknown Link 2")->Read( file, version ); - } -} - -void NiMeshPSysData::Write( ostream& file, unsigned int version ) const { - APSysData::Write( file, version ); - - NifStream( unkFloats, file ); - - NifStream( unkInt, file ); - - //GetAttr("Modifier")->Write( file, version ); - - // From version 10.2.0.0 there are several new entries here - if ( version >= VER_10_2_0_0 ) { - NifStream( unkByte, file ); - - //GetAttr("Unknown Link Group")->Write( file, version ); - //GetAttr("Unknown Link 2")->Write( file, version ); - } -} - -string NiMeshPSysData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AShapeData::asString(); - - out << "Unknown Floats: " << uint(unkFloats.size()) << endl; - - if (verbose) { - for (uint i = 0; i < unkFloats.size(); ++i ) { - out << " " << i + 1 << unkFloats[i] << endl; - } - } else { - out << " <<<Data Not Shown>>>"; - } - - out << "Unknown Int: " << unkInt << endl - << "Modifier: " << GetAttr("Modifier")->asString() << endl - << "Unknown Byte: " << unkByte << endl - << "Unknown Link Group: " << GetAttr("Unknown Link Group")->asString() << endl - << "Unknown Link 2: " << GetAttr("Unknown Link 2")->asString() << endl; - - return out.str(); -} - -/*********************************************************** - * NiPSysData methods - **********************************************************/ - -void NiPSysData::Read( istream& file, unsigned int version ) { - APSysData::Read( file, version ); - - //before version 20.0.0.4 there are unknown floats here - if ( version < VER_20_0_0_4 ) { - unkFloats.resize( vertices.size() * 10 ); - NifStream( unkFloats, file ); - } else { - //From version 20.0.0.4 on there are a lot of unknown bytes - unkBool1 = ReadBool( file, version ); - if ( unkBool1 ) { - //32 bytes per vertex - unkBytes1.resize( vertices.size() * 32 ); - } else { - // 28 bytes per vertex - unkBytes1.resize( vertices.size() * 28 ); - } - NifStream( unkBytes1, file ); - - NifStream( unkByte, file ); - - unkBool2 = ReadBool( file, version ); - if ( unkBool2 ) { - unkBytes2.resize( vertices.size() * 4 ); - NifStream( unkBytes2, file ); - } - } - - NifStream( unkInt, file ); -} - -void NiPSysData::Write( ostream& file, unsigned int version ) const { - APSysData::Write( file, version ); - - //before version 20.0.0.4 there are unknown floats here - if ( version < VER_20_0_0_4 ) { - NifStream( unkFloats, file ); - } else { - //From version 20.0.0.4 on there are a lot of unknown bytes - WriteBool( unkBool1, file, version ); - - NifStream( unkBytes1, file ); - - NifStream( unkByte, file ); - - WriteBool( unkBool2, file, version); - if ( unkBool2 ) { - NifStream( unkBytes2, file ); - } - } - - NifStream( unkInt, file ); -} - -string NiPSysData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AShapeData::asString(); - - out << "Unknown Floats: " << uint(unkFloats.size()) << endl; - - if (verbose) { - for (uint i = 0; i < unkFloats.size(); ++i ) { - out << " " << i + 1 << unkFloats[i] << endl; - } - } else { - out << " <<<Data Not Shown>>>"; - } - - out << "Unknown Bool 1: " << unkBool1 << endl - << "Unknown Bytes 1: " << uint(unkBytes1.size()) << endl; - - if (verbose) { - out << HexString( &unkBytes1[0], uint(unkBytes1.size()) ); - } else { - out << " <<<Data Not Shown>>>"; - } - - out << "Unknown Byte: " << unkByte << endl - << "Unknown Bool 2: " << unkBool2 << endl - << "Unknown Bytes 2: " << uint(unkBytes2.size()) << endl; - - - if (verbose) { - out << HexString( &unkBytes2[0], uint(unkBytes2.size()) ); - } else { - out << " <<<Data Not Shown>>>"; - } - - out << "Unknown Int: " << unkInt << endl; - - return out.str(); -} - -/*********************************************************** - * ARotatingParticlesData methods - **********************************************************/ - -void ARotatingParticlesData::Read( istream& file, unsigned int version ) { - AParticlesData::Read( file, version ); - - //After version 10.1.0.0 there are several new entries - if ( version >= VER_10_1_0_0 ) { - NifStream( numActiveRot, file ); - - bool hasUnkFloats = ReadBool( file, version ); - - if ( hasUnkFloats ) { - unkFloats.resize( vertices.size() ); - NifStream( unkFloats, file ); - } - } - - bool hasRotations = ReadBool( file, version ); - - if ( hasRotations ) { - rotations.resize( vertices.size() ); - NifStream( rotations, file ); - } -} - -void ARotatingParticlesData::Write( ostream& file, unsigned int version ) const { - AParticlesData::Write( file, version ); - - //After version 10.1.0.0 there are several new entries - if ( version >= VER_10_1_0_0 ) { - NifStream( numActiveRot, file ); - - WriteBool( (unkFloats.size() > 0), file, version ); - - NifStream( unkFloats, file ); - } - - WriteBool( (rotations.size() > 0), file, version ); - NifStream( rotations, file ); -} - -string ARotatingParticlesData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AParticlesData::asString() << endl - << "Num Active Rot: " << numActiveRot << endl - << "Unknown Floats: "; - - if ( unkFloats.size() > 0 ) { - if (verbose) { - out << endl; - for ( uint i = 0; i < unkFloats.size(); ++i) { - out << i << ": " << unkFloats[i] << endl; - } - } else { - out << endl << "<<Data Not Shown>>" << endl; - } - } else { - out << "None" << endl; - } - - out << "Rotations: "; - - if ( rotations.size() > 0 ) { - if (verbose) { - out << endl; - for ( uint i = 0; i < rotations.size(); ++i) { - out << i << ": [" << rotations[i].w << " (" << rotations[i].x << ", " << rotations[i].y << ", " << rotations[1].z << ")]" << endl; - } - } else { - out << endl << "<<Data Not Shown>>" << endl; - } - } else { - out << "None" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiParticleMeshesData methods - **********************************************************/ - -void NiParticleMeshesData::Read( istream& in, unsigned int version ) { - ARotatingParticlesData::Read( in, version ); - - //GetAttr("Unknown Link 2")->Read( in, version ); -} - -void NiParticleMeshesData::Write( ostream& out, unsigned int version ) const { - ARotatingParticlesData::Write( out, version ); - - //GetAttr("Unknown Link 2")->Write( out, version ); -} - -string NiParticleMeshesData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << ARotatingParticlesData::asString() - << "Unknown Link 2: " << GetAttr("Unknown Link 2")->asString() << endl; - - return out.str(); -} - -/*********************************************************** - * NiTriShapeData methods - **********************************************************/ - -/** - * NiTriShapeData::Read - Assumes block name has already been read from in - */ -void NiTriShapeData::Read( istream& in, unsigned int version ){ - AShapeData::Read( in, version ); - - ushort numTriangles = ReadUShort( in ); - ReadUInt( in ); // numTriangles * 3, we can throw this away - - //From version 10.1.0.0 on there is a bool to check whether or not there are any triangles - //We already know the answer to this from the numTriangles count, don't we? - //Jus in case, set numTriangles to zero if this is false. - if ( version >= VER_10_1_0_0 ) { - if ( ReadBool( in, version ) == false ) { - numTriangles = 0; - } - } - - triangles.resize( numTriangles ); - for ( uint i = 0; i < triangles.size(); ++i ){ - triangles[i].v1 = ReadUShort( in ); - triangles[i].v2 = ReadUShort( in ); - triangles[i].v3 = ReadUShort( in ); - } - - ushort matchGroupCount = ReadUShort( in ); - match_group_mode = ( matchGroupCount != 0 ); // Only record whether or not file prefers to have match data generated - - ushort sub_count; - for ( int i = 0; i < matchGroupCount; ++i ){ - sub_count = ReadUShort( in ); - for (ushort j = 0; j < sub_count; ++j) { - ReadUShort( in ); // Read data, but don't care what it is - } - } -} - -string NiTriShapeData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AShapeData::asString(); - - out << "Triangles: " << uint(triangles.size()); - if (verbose) { - for ( uint i = 0; i < triangles.size(); ++i) { - if (i % 3 == 0) - out << endl << " "; - else - out << " "; - - out << "(" << setw(5) << triangles[i].v1 << ", " << setw(5) << triangles[i].v2 << ", " << setw(5) << triangles[i].v3 << " )"; - } - } else { - out << endl << "<<Data Not Shown>>"; - } - out << endl; - - out << "Match Detection: "; - if ( match_group_mode ) - out << "On" << endl; - else - out << "Off" << endl; - - return out.str(); -} - -/** - * NiTriShapeData::Write - Writes block name to out, in addition to data. - */ -void NiTriShapeData::Write( ostream& out, unsigned int version ) const { - - AShapeData::Write( out, version ); - - WriteUShort( ushort(triangles.size()), out ); - WriteUInt( ushort(triangles.size()) * 3, out ); - - //From version 10.1.0.0 on there is a bool to check whether or not there are any triangles - if ( version >= VER_10_1_0_0 ) { - WriteBool( triangles.size() > 0, out, version ); - } - - for ( uint i = 0; i < triangles.size(); ++i ){ - WriteUShort( triangles[i].v1, out ); - WriteUShort( triangles[i].v2, out ); - WriteUShort( triangles[i].v3, out ); - } - - if ( match_group_mode ) { - WriteUShort( ushort(vertices.size()), out ); //Match Group Count = Vertex Count - - vector<ushort> matches; - for ( uint i = 0; i < vertices.size(); ++i ){ - // Find all vertices that match this one. - matches.clear(); - for (ushort j = 0; j < vertices.size(); ++j) { - if ( i != j && vertices[i].x == vertices[j].x && vertices[i].y == vertices[j].y && vertices[i].z == vertices[j].z ) { - matches.push_back(j); - } - } - //Match Count - WriteUShort( ushort(matches.size()) , out ); - - //Output Vertex indicies - for (ushort j = 0; j < matches.size(); ++j) { - WriteUShort( matches[j], out ); - } - } - } else { - WriteUShort( 0, out ); //Match Group Count = 0 - } -} - -//--Setters--// - -void NiTriShapeData::SetTriangles( const vector<Triangle> & in ) { - if ( in.size() > 65535 || in.size() < 0 ) { - throw runtime_error("Invalid Triangle Count: must be between 0 and 65535."); - } - - triangles = in; -} - -/*********************************************************** - * NiTriStripsData methods - **********************************************************/ - -void NiTriStripsData::Read( istream& in, unsigned int version ){ - AShapeData::Read( in, version ); - - //Read number of Triangles but discard it - ReadUShort( in ); - - //Initialize vectors to number and size of strips - ushort numStrips = ReadUShort( in ); - strips.resize( numStrips ); - for ( uint i = 0; i < strips.size(); ++i ) { - ushort stripSize = ReadUShort( in ); - strips[i].resize( stripSize ); - } - - //From version 10.1.0.0 on there is a bool to check whether or not there are any points - //We already know the answer to this from the counts above, don't we? - //Just in case, clear all strips if this is false. - if ( version >= VER_10_1_0_0 ) { - if ( ReadBool( in, version ) == false ) { - strips.resize(0); - } - } - - //Read points - for ( uint i = 0; i < strips.size(); ++i ) { - for ( uint j = 0; j < strips[i].size(); ++j ) { - strips[i][j] = ReadUShort( in ); - } - } -} - -void NiTriStripsData::Write( ostream& out, unsigned int version ) const { - - AShapeData::Write( out, version ); - - //Write number of triangles and strips - ushort numTriangles = GetTriangleCount(); - WriteUShort( numTriangles, out ); - WriteUShort( ushort(strips.size()), out ); - - //Write Strip Sizes - for ( uint i = 0; i < strips.size(); ++i ) { - WriteUShort( ushort(strips[i].size()), out ); - } - - //From version 10.1.0.0 on there is a bool to check whether or not there are any points - if ( version >= VER_10_1_0_0 ) { - WriteBool( numTriangles > 0, out, version ); - } - - //Write points - for ( uint i = 0; i < strips.size(); ++i ) { - for ( uint j = 0; j < strips[i].size(); ++j ) { - WriteUShort( strips[i][j], out ); - } - } -} - -string NiTriStripsData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AShapeData::asString(); - - out << "Triangles: " << GetTriangleCount() << endl - << "Strips: " << ushort(strips.size()) << endl; - - if (verbose) { - for ( uint i = 0; i < strips.size(); ++i ) { - out << " Strip " << i + 1 << endl; - for ( uint j = 0; j < strips[i].size(); ++j ) { - out << " " << strips[i][j] << endl; - } - } - } else { - out << endl << " <<Data Not Shown>>"; - } - - return out.str(); -} - -short NiTriStripsData::GetStripCount() const { - return short(strips.size()); -} - -void NiTriStripsData::SetStripCount(int n) { - strips.resize( n ); -} - -//Getters -vector<short> NiTriStripsData::GetStrip( int index ) const { - return strips[index]; -} - -vector<Triangle> NiTriStripsData::GetTriangles() const { - - //Create a vector to hold the triangles - vector<Triangle> triangles( GetTriangleCount() ); - int n = 0; // Current triangle - - //Cycle through all strips - vector< vector<short> >::const_iterator it; - for (it = strips.begin(); it != strips.end(); ++it ) { - //The first three values in the strip are the first triangle - triangles[n].Set( (*it)[0], (*it)[1], (*it)[2] ); - - //Move to the next triangle - ++n; - - //The remaining triangles use the previous two indices as their first two indices. - for( uint i = 3; i < it->size(); ++i ) { - //Odd numbered triangles need to be reversed to keep the vertices in counter-clockwise order - if ( i % 2 == 0 ) { - //cout << (*it)[i - 2] << ", " << (*it)[i - 1] << ", " << (*it)[i] << endl; - triangles[n].Set( (*it)[i - 2], (*it)[i - 1], (*it)[i] ); - } else { - //cout << (*it)[i] << ", " << (*it)[i - 1] << ", " << (*it)[i - 2] << endl; - triangles[n].Set( (*it)[i], (*it)[i - 1], (*it)[i - 2] ); - } - - //Move to the next triangle - ++n; - } - } - - return triangles; -} - -//Setter -void NiTriStripsData::SetStrip( int index, const vector<short> & in ) { - strips[index] = in; -} - -short NiTriStripsData::GetTriangleCount() const { - - //Calculate number of triangles - //Sum of length of each strip - 2 - short numTriangles = 0; - for ( uint i = 0; i < strips.size(); ++i ) { - numTriangles += short(strips[i].size() - 2); - } - - return numTriangles; -} - -/*********************************************************** - * NiBSplineData methods - **********************************************************/ - -void NiBSplineData::Read( istream& file, unsigned int version ){ - NifStream( unkInt, file ); - - uint count = ReadUInt( file ); - unkShorts.resize( count ); - NifStream( unkShorts, file ); -} - -void NiBSplineData::Write( ostream& file, unsigned int version ) const { - - NifStream( unkInt, file ); - - WriteUInt( uint(unkShorts.size()), file ); - - NifStream( unkShorts, file ); -} - -string NiBSplineData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Unknown Int: " << unkInt << endl - << "Unknown Shorts?: " << uint(unkShorts.size()) << endl; - - if (verbose) { - for ( uint i = 0; i < unkShorts.size(); ++i ) { - out << " " << i + 1 << ": " << unkShorts[i] << endl; - } - } else { - out << " <<<Data Not Shown>>>" << endl; - } - - - return out.str(); -} - -/*********************************************************** - * NiCollisionData methods - **********************************************************/ - -void NiCollisionData::Read( istream& in, unsigned int version ){ - //Read parent node but don't store it - ReadUInt( in ); - - unknownInt1 = ReadUInt( in ); - unknownByte = ReadByte( in ); - collisionType = ReadUInt( in ); - - if ( collisionType == 0 ) { - unknownInt2 = ReadUInt( in ); - ReadFVector3( unknown3Floats, in ); - } - else if ( collisionType == 1 ) { - for (int i = 0; i < 15; ++i ) { - unknown15Floats[i] = ReadFloat( in ); - } - } - else if ( collisionType == 2) { - for ( int i = 0; i < 8; ++i ) { - unknown8Floats[i] = ReadFloat( in ); - } - } -} - -void NiCollisionData::Write( ostream& out, unsigned int version ) const { - - //Write Parent node number - WriteUInt( GetParent().get_index(), out ); - - WriteUInt( unknownInt1, out ); - WriteByte( unknownByte, out ); - WriteUInt( collisionType, out ); - - if ( collisionType == 0 ) { - WriteUInt( unknownInt2, out ); - WriteFVector3( unknown3Floats, out ); - } - else if ( collisionType == 1 ) { - for (int i = 0; i < 15; ++i ) { - WriteFloat( unknown15Floats[i], out ); - } - } - else if ( collisionType == 2) { - for ( int i = 0; i < 8; ++i ) { - WriteFloat( unknown8Floats[i], out ); - } - } -} - -string NiCollisionData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - //Parent is already written, so don't do anything with it - - out << "Unknown Int 1: " << unknownInt1 << endl - << "Unknown Byte: " << int(unknownByte) << endl - << "Collision Type: " << collisionType << endl - << "Collision Data:" << endl; - - if ( collisionType == 0 ) { - out << " Unknown Int 2: " << unknownInt2 << endl - << " Unknown 3 Floats: " << unknown3Floats << endl; - } - else if ( collisionType == 1 ) { - out << " Unknown 15 Floats:" << endl; - for (int i = 0; i < 15; ++i ) { - out << " " << i + 1 << ": " << unknown15Floats[i] << endl; - } - } - else if ( collisionType == 2) { - out << " Unknown 8 Floats:" << endl; - for ( int i = 0; i < 8; ++i ) { - out << " " << i + 1 << ": " << unknown8Floats[i] << endl; - } - } - - return out.str(); -} - -/*********************************************************** - * NiSkinData methods - **********************************************************/ - -void NiSkinData::Read( istream& in, unsigned int version ) { - - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - rotation[r][c] = ReadFloat( in ); - } - } - ReadFVector3( translation, in ); - scale = ReadFloat( in ); - int boneCount = ReadUInt( in ); - //GetAttr("Skin Partition")->Read( in, version ); - //unknownByte exists from version 4.2.1.0 on - if ( version >= VER_4_2_1_0 ) { - unknownByte = ReadByte( in ); - } - bones.resize(boneCount); - for( int i = 0; i < boneCount; i++ ) { - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - bones[i].rotation[r][c] = ReadFloat( in ); - } - } - ReadFVector3( bones[i].translation, in ); - bones[i].scale = ReadFloat( in ); - ReadFVector4( bones[i].unknown4Floats, in ); - short numWeights = ReadUShort( in ); - bones[i].weights.clear(); - for ( int j = 0; j < numWeights; ++j ){ - short vertexNum = ReadUShort( in ); - float vertexWeight = ReadFloat( in ); - bones[i].weights[vertexNum] = vertexWeight; - } - } -} - -void NiSkinData::Write( ostream& out, unsigned int version ) const { - //Calculate offset matrices prior to writing data - - Matrix33 rot; - fVector3 tr; - float sc; - CalculateOverallOffset(rot, tr, sc); - - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - WriteFloat( rot[r][c], out ); - } - } - WriteFVector3( tr, out ); - WriteFloat( sc, out ); - WriteUInt(short(bone_map.size()), out); - //GetAttr("Skin Partition")->Write( out, version ); - //unknownByte exists from version 4.2.1.0 on - if ( version >= VER_4_2_1_0) { - WriteByte( unknownByte, out ); - } - - //Get parent node for bone calculations - INode const * const par_node = this->GetNodeParent(); - Bone bone; // temporary value - - map<IBlock *, Bone >::const_iterator it; - for( it = bone_map.begin(); it != bone_map.end(); ++it ) { - //Calculae offset for this bone (data is not stored) - CalculateBoneOffset( par_node, it->first, bone ); - - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - WriteFloat( bone.rotation[r][c], out ); - } - } - WriteFVector3( bone.translation, out ); - WriteFloat( bone.scale, out ); - - //Write 4 zeros for unknown floats - WriteFloat( 0.0f, out ); - WriteFloat( 0.0f, out ); - WriteFloat( 0.0f, out ); - WriteFloat( 0.0f, out ); - - //WriteFVector4( bone.unknown4Floats, out ); - - WriteUShort( short(it->second.weights.size() ), out ); - - map<int, float>::const_iterator it2; - for ( it2 = it->second.weights.begin(); it2 != it->second.weights.end(); ++it2 ){ - WriteUShort( it2->first, out ); - WriteFloat( it2->second, out ); - } - } -} - -//void GetBuiltUpTransform(blk_ref block, Matrix & m/*, blk_ref stop*/) { -// Matrix33 temp; -// float3 t2; -// -// // Do multiplication -// attr_ref rot_attr = block["Rotation"]; -// attr_ref trn_attr = block["Translation"]; -// attr_ref scl_attr = block["Scale"]; -// -// if ( rot_attr.is_null() == false && trn_attr.is_null() == false && scl_attr.is_null() == false ) { -// rot_attr->asMatrix33(temp); -// trn_attr->asFloat3(t2); -// float scale = scl_attr->asFloat(); -// -// Matrix tr = Matrix( temp[0][0], temp[0][1], temp[0][2], 0.0f, -// temp[1][0], temp[1][1], temp[1][2], 0.0f, -// temp[2][0], temp[2][1], temp[2][2], 0.0f, -// t2[0], t2[1], t2[2], 1.0f); -// -// Matrix s = Matrix( scale, 0.0f, 0.0f, 0.0f, -// 0.0f, scale, 0.0f, 0.0f, -// 0.0f, 0.0f, scale, 0.0f, -// 0.0f, 0.0f, 0.0f, 1.0f ); -// -// m = m * (tr * s); -// } -// else { -// throw runtime_error("GetBuiltUpTranslations attempted to access a block without rotation, translation, and scale"); -// } -// -// //Check if there are any parents -// blk_ref par = block->GetParent(); -// if ( par.is_null() == false ) { -// //There is a parent, re-call this function on it -// GetBuiltUpTransform( par, m/*, stop*/ ); -// } -//} - -string NiSkinData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - //If there is no parent, do nothing - if ( this->GetParent().is_null() == true ) { - out << "No parent - data cannot be calculated." << endl - << ABlock::asString() << endl; - return out.str(); - } - - Matrix33 rot; - fVector3 tr; - float sc; - try { - CalculateOverallOffset(rot, tr, sc); - } catch ( runtime_error & e ) { - out << e.what() << endl; - return out.str(); - } - - out << "Rotate:" << endl - << " |" << setw(6) << rot[0][0] << "," << setw(6) << rot[0][1] << "," << setw(6) << rot[0][2] << " |" << endl - << " |" << setw(6) << rot[1][0] << "," << setw(6) << rot[1][1] << "," << setw(6) << rot[1][2] << " |" << endl - << " |" << setw(6) << rot[2][0] << "," << setw(6) << rot[2][1] << "," << setw(6) << rot[2][2] << " |" << endl - << "Translate: " << tr << endl - << "Scale: " << sc << endl - << "Bone Count: " << uint(bone_map.size()) << endl - << "Skin Partition: " << GetAttr("Skin Partition")->asLink() << endl - << "Unknown Byte: " << int(unknownByte) << endl - << "Bones:" << endl; - - //Get parent node for bone calculations - INode const * const par_node = this->GetNodeParent(); - Bone bone; // temporary value - - map<IBlock *, Bone >::const_iterator it; - int num = 0; - for( it = bone_map.begin(); it != bone_map.end(); ++it ) { - //Calculae offset for this bone (data is not stored) - CalculateBoneOffset( par_node, it->first, bone ); - - num++; - out << "Bone " << num << ":" << endl - << " Block: " << it->first->GetBlockNum() << endl //blk_ref(it->first) << endl - << " Bone Offset Transforms:" << endl - << " Rotation:" << endl - << " |" << setw(6) << bone.rotation[0][0] << "," << setw(6) << bone.rotation[0][1] << "," << setw(6) << bone.rotation[0][2] << " |" << endl - << " |" << setw(6) << bone.rotation[1][0] << "," << setw(6) << bone.rotation[1][1] << "," << setw(6) << bone.rotation[1][2] << " |" << endl - << " |" << setw(6) << bone.rotation[2][0] << "," << setw(6) << bone.rotation[2][1] << "," << setw(6) << bone.rotation[2][2] << " |" << endl - << " Translate: " << bone.translation << endl - << " Scale: " << bone.scale << endl; - - float q[4] = { bone.unknown4Floats[0], - bone.unknown4Floats[1], - bone.unknown4Floats[2], - bone.unknown4Floats[3] }; - - out << "Unknown 4 Floats: " << setw(6) << q[0] << "," << setw(6) << q[1] << "," << setw(6) << q[2] << "," << setw(6) << q[3] << endl; - - out << " Weights: " << uint( it->second.weights.size()) << endl; - - if (verbose) { - map<int, float>::const_iterator it2; - for ( it2 = it->second.weights.begin(); it2 != it->second.weights.end(); ++it2 ){ - out << " Vertex: " << it2->first << "\tWeight: " << it2->second << endl; - } - } else { - out << " <<Data Not Shown>>" << endl; - } - } - - //out << setprecision(1); - - return out.str(); -} - -void NiSkinData::SetBones( const vector<blk_ref> & bone_blocks ) { - //--Move bones from temproary vector to map, sorted by blk_ref--// - for (uint i = 0; i < bones.size(); ++i) { - //IBlockInternal * blk_int = (IBlockInternal*)bone_blocks[i]->QueryInterface(BlockInternal); - - //move the data - bone_map.insert( pair<IBlock *, Bone>(bone_blocks[i].get_block(), bones[i]) ); - - //Increment reference at bone node site - ((ABlock*)bone_blocks[i].get_block())->IncCrossRef(this); - } - - //Clear temporary vector data - bones.clear(); -} - -void NiSkinData::StraightenSkeleton() { - ////Get bone blocks from parent SkinInstance - //vector<blk_ref> bone_blks; - //blk_ref par = GetParent(); - //blk_link l; - //attr_ref bone_attr = par->GetAttr("Bones"); - - //if ( bone_attr.is_null() == false ) { - // for (int i = 0; i < par->LinkCount(); ++i) { - // l = par->GetLink(i); - // if ( l.attr == bone_attr ) { - // bone_blks.push_back(l.block); - // } - // } - //} - - //Loop through all bones - map<IBlock *, Bone>::iterator it; - for ( it = bone_map.begin(); it != bone_map.end(); ++it ) { - //Friendlier name for current bone - Bone & bone = it->second; - - //Get current offset Matrix33 for this bone - - Matrix44 parent_offset( - bone.rotation[0][0], bone.rotation[0][1], bone.rotation[0][2], 0.0f, - bone.rotation[1][0], bone.rotation[1][1], bone.rotation[1][2], 0.0f, - bone.rotation[2][0], bone.rotation[2][1], bone.rotation[2][2], 0.0f, - bone.translation[0], bone.translation[1], bone.translation[2], 1.0f - ); - //Loop through all bones again, checking for any that have this bone as a parent - map<IBlock *, Bone>::iterator it2; - for ( it2 = bone_map.begin(); it2 != bone_map.end(); ++it2 ) { - if ( it2->first->GetParent() == it->first ) { - //Block 2 has block 1 as a parent - - Bone & bone2 = it2->second; - - //Get child offset Matrix33 - Matrix44 child_offset( - bone2.rotation[0][0], bone2.rotation[0][1], bone2.rotation[0][2], 0.0f, - bone2.rotation[1][0], bone2.rotation[1][1], bone2.rotation[1][2], 0.0f, - bone2.rotation[2][0], bone2.rotation[2][1], bone2.rotation[2][2], 0.0f, - bone2.translation[0], bone2.translation[1], bone2.translation[2], 1.0f - ); - - //Do calculation to get correct bone postion in relation to parent - Matrix44 inverse_co = child_offset.Inverse(); - Matrix44 child_pos = inverse_co * parent_offset; - - //Store result in block's Bind Position Matrix - INode * node = (INode*)it2->first->QueryInterface(ID_NODE); - if (node != NULL) { - node->SetWorldBindPos(child_pos); - } - - // //Store result in child block - //Matrix33 rotate = { - // child_pos[0][0], child_pos[0][1], child_pos[0][2], - // child_pos[1][0], child_pos[1][1], child_pos[1][2], - // child_pos[2][0], child_pos[2][1], child_pos[2][2] - //}; - //it2->first->GetAttr("Rotation")->Set( rotate ); - //it2->first->GetAttr("Translation")->Set( child_pos[3][0], child_pos[3][1], child_pos[3][2] ); - } - } - } -} - -void NiSkinData::RepositionTriShape( blk_ref & tri_shape ) { - //Get block we're going to move - //blk_ref tri_shape = GetParent()->GetParent(); - - //There must be at least one bone to do anything - if ( bone_map.size() > 0 ) { - //--Start Position--// - //Matrix start_mat = IdentityMatrix(); - //GetBuiltUpTransform( tri_shape->GetParent(), start_mat ); - - //--End Position--// - - //Get first bone - IBlock * bone_blk = bone_map.begin()->first; - Bone & bone = bone_map.begin()->second; - - - //blk_ref skin_inst = GetParent(); - //blk_link l; - //attr_ref bone_attr = skin_inst->GetAttr("Bones"); - // - //blk_ref bone_blk; - //if ( bone_attr.is_null() == false ) { - // for (int i = 0; i < skin_inst->LinkCount(); ++i) { - // l = skin_inst->GetLink(i); - // if ( l.attr == bone_attr ) { - // //Found the first bone, record it and break - // bone_blk = l.block; - // break; - // } - // } - //} - //else { - // //Couldn't get the bone attr - // cout << "Couldn't get the bone attr" << endl; - // return; - //} - - Matrix44 offset_mat( - bone.rotation[0][0], bone.rotation[0][1], bone.rotation[0][2], 0.0f, - bone.rotation[1][0], bone.rotation[1][1], bone.rotation[1][2], 0.0f, - bone.rotation[2][0], bone.rotation[2][1], bone.rotation[2][2], 0.0f, - bone.translation[0], bone.translation[1], bone.translation[2], 1.0f - ); - - //Get built up rotations to the root of the skeleton from this bone - INode * bone_node = (INode*)bone_blk->QueryInterface(ID_NODE); - if (bone_node == NULL) - throw runtime_error("Failed to get Node interface."); - - Matrix44 bone_mat = bone_node->GetWorldBindPos(); - - Matrix44 result_mat = offset_mat * bone_mat; - - //GetBuiltUpTransform( bone_blk, end_mat ); - - //--Set TriShape Bind Position to Result--// - INode * shape_node = (INode*)tri_shape->QueryInterface(ID_NODE); - if (shape_node == NULL) - throw runtime_error("Failed to get Node interface."); - - shape_node->SetWorldBindPos( result_mat ); - - - - //Matrix res_mat = end_mat;// * start_mat.inverse(); - - //tri_shape->GetAttr("Translation")->Set( res_mat(3,0), res_mat(3,1), res_mat(3,2) ); - - //Matrix33 rotation = { res_mat(0,0), res_mat(0,1), res_mat(0,2), - // res_mat(1,0), res_mat(1,1), res_mat(1,2), - // res_mat(2,0), res_mat(2,1), res_mat(2,2) }; - //tri_shape->GetAttr("Rotation")->Set( rotation ); - } - else { - cout << "Reposition Failed for " << tri_shape << endl; - } -} - -void NiSkinData::FixLinks( const vector<blk_ref> & blocks ) { - - ABlock::FixLinks( blocks ); - - //Fix indicies for bones as they are copied from NiSkinInstance block - blk_ref inst_blk = GetParent(); - if ( inst_blk.is_null() == false ) { - ISkinInstInternal * inst_data = (ISkinInstInternal*)inst_blk->QueryInterface( SkinInstInternal ); - if ( inst_data != NULL ) { - vector<int> bone_list = inst_data->GetBoneList(); - vector<blk_ref> bone_blks( bone_list.size() ); - for ( uint i = 0; i < bone_list.size(); ++i ) { - bone_blks[i] = blocks[ bone_list[i] ]; - } - SetBones( bone_blks ); - } - } - - //Straigten up the skeleton to match with the "bind pose" for any skin instances that exist - StraightenSkeleton(); -} - -vector<blk_ref> NiSkinData::GetBones() const { - //Put all the valid bones from the map into a vector to return - vector<blk_ref> bone_blks( bone_map.size() ); - - map<IBlock *, Bone>::const_iterator it; - int count = 0; - for (it = bone_map.begin(); it != bone_map.end(); ++it ) { - bone_blks[count] = it->first; - count++; - } - - return bone_blks; -} - -void NiSkinData::ReassignCrossRefs( const map<string,blk_ref> & name_map ) { - //This branch has been moved as part of a merge, so the cross references need to be moved to - //Point to the new blocks with the same names. As far as I know, cross references always point - //To ParentNode blocks. - - vector< map<IBlock *, Bone>::iterator > erase_list; - - map<IBlock *, Bone>::iterator it; - int count = 0; - for (it = bone_map.begin(); it != bone_map.end(); ++it ) { - //Get the name of the current target if there is one - attr_ref name_attr = it->first->GetAttr("Name"); - if ( name_attr.is_null() == true ) { - //Somehow this crossref is pointing to a block with no name - //do nothing - continue; - } - - string name = name_attr->asString(); - - //Check if this name exists in the new group of nodes - map<string,blk_ref>::const_iterator found_it = name_map.find( name ); - - if ( found_it == name_map.end() ) { - //There were no matches, so this cross reference will continue to - //point to the same place - continue; - } - - //--Reassign this cross reference to the new node with the same name that was found--// - - //cout << "Found a cross reference to re-assign to new block with name: " << name << endl; - - //Remove this cross reference from its current target - ((ABlock*)it->first)->DecCrossRef(this); - - //Assign to block with matching name - bone_map[found_it->second.get_block()] = it->second; - erase_list.push_back( it ); - - //Add as a cross reference to new block - ((ABlock*)found_it->second.get_block())->IncCrossRef(this); - } - - //Erase all old map entires - for ( uint i = 0; i < erase_list.size(); ++i ) { - bone_map.erase( erase_list[i] ); - } - - //cout << "Finished loop." << endl; -} - -map<int, float> NiSkinData::GetWeights( blk_ref const & bone ) const { - // since operator[] might insert a new element, it can't be const - // so we need the find function - return bone_map.find(bone.get_block())->second.weights; -} - -void NiSkinData::AddBone( blk_ref const & bone, map<int, float> const & in ) { - - //Add bone to internal list - bone_map[bone.get_block()].weights = in; - - //Increment reference at bone node site - ((ABlock*)bone.get_block())->IncCrossRef(this); -} - -void NiSkinData::RemoveCrossLink( IBlock * block_to_remove ) { - //Remove bone from internal list - bone_map.erase( block_to_remove ); - - //Do not decrement bone node location because it is already dead -} - -void NiSkinData::RemoveBone( blk_ref const & bone ) { - //Remove bone from internal list - bone_map.erase( bone.get_block() ); - - //Decrement reference at bone node site - //IBlockInternal * blk_int = (IBlockInternal*)bone->QueryInterface(BlockInternal); - ((ABlock*)bone.get_block())->DecCrossRef(this); -} - -NiSkinData::~NiSkinData() { - //Inform all linked bone nodes that this NiSkinData block is dying - map<IBlock *, Bone>::iterator it; - for (it = bone_map.begin(); it != bone_map.end(); ++it) { - //IBlockInternal * node_int = (IBlockInternal*)it->first->QueryInterface(BlockInternal); - ((ABlock*)it->first)->DecCrossRef(this); - } -} - -INode * NiSkinData::GetNodeParent() const { - //--Get Node Parent Bind Pose--// - - - blk_ref par_block = GetParent(); - if ( par_block.is_null() == true ) { - //throw runtime_error("SkinData block does not have parent."); - return NULL; - } - - par_block = par_block->GetParent(); - - if ( par_block.is_null() == true ) { - //throw runtime_error("SkinData block does not have parent of parent."); - return NULL; - } - - INode * par_node = (INode*)par_block->QueryInterface(ID_NODE); - if ( par_node == NULL ) { - //throw runtime_error("SkinData block's parent of parent is not a node."); - return NULL; - } - - return par_node; -} - -void NiSkinData::CalculateBoneOffset( INode const * const par_node, IBlock const * const bone_block, Bone & result ) const { - - //--Get Bone Bind Pose--// - - //Get Bone Node - INode * const bone_node = (INode*)bone_block->QueryInterface(ID_NODE); - - //Get bind matricies - Matrix44 par_mat, bone_mat, inv_mat, res_mat; - par_mat = par_node->GetWorldBindPos(); - bone_mat = bone_node->GetWorldBindPos(); - - //Inverse bone matrix & multiply with parent node matrix - inv_mat = bone_mat.Inverse(); - res_mat = par_mat * inv_mat; - - //--Extract Scale from first 3 rows--// - float scale[3]; - for (int r = 0; r < 3; ++r) { - //Get scale for this row - scale[r] = sqrt(res_mat[r][0] * res_mat[r][0] + res_mat[r][1] * res_mat[r][1] + res_mat[r][2] * res_mat[r][2] + res_mat[r][3] * res_mat[r][3]); - - //Normalize the row by dividing each factor by scale - res_mat[r][0] /= scale[r]; - res_mat[r][1] /= scale[r]; - res_mat[r][2] /= scale[r]; - res_mat[r][3] /= scale[r]; - } - - //--Store Result--// - - //Store rotation matrix - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - result.rotation[r][c] = res_mat[r][c]; - } - } - - //Store translate vector - result.translation[0] = res_mat[3][0]; - result.translation[1] = res_mat[3][1]; - result.translation[2] = res_mat[3][2]; - - - //Store average scale - result.scale = (scale[0] + scale[1] + scale[2]) / 3.0f; -} - -void NiSkinData::CalculateOverallOffset( Matrix33 & rot, fVector3 & tr, float & sc ) const { - // Node parent world transform - INode const * par = this->GetNodeParent(); - if ( par == NULL ) { - throw runtime_error("Cannot calculate overall offset because this NiSkinData does not seem to be connected to a NiTriShape through a NiSkinInstance."); - } - - Matrix44 par_mat = par->GetWorldTransform(); - - // Skeleton root world transform - blk_ref skel = GetParent()->GetAttr("Skeleton Root")->asLink(); - INode const * iskel = (INode const *)skel->QueryInterface(ID_NODE); - if ( iskel == NULL ) - throw runtime_error("SkinInfluence skeleton root is not a node."); - Matrix44 skel_mat = iskel->GetWorldTransform(); - - // Inverse parent node transform & multiply with skeleton matrix - Matrix44 inv_mat = par_mat.Inverse(); - Matrix44 res_mat = inv_mat * skel_mat; - - //--Extract Scale from first 3 rows--// - float scale[3]; - for (int r = 0; r < 3; ++r) { - //Get scale for this row - scale[r] = sqrt(res_mat[r][0] * res_mat[r][0] + res_mat[r][1] * res_mat[r][1] + res_mat[r][2] * res_mat[r][2]); - - //Normalize the row by dividing each factor by scale - res_mat[r][0] /= scale[r]; - res_mat[r][1] /= scale[r]; - res_mat[r][2] /= scale[r]; - } - - //--Store Result--// - - //Store rotation matrix - for (int c = 0; c < 3; ++c) - for (int r = 0; r < 3; ++r) - rot[r][c] = res_mat[r][c]; - - //Store translate vector - tr[0] = res_mat[3][0]; - tr[1] = res_mat[3][1]; - tr[2] = res_mat[3][2]; - - //Store average scale - sc = (scale[0] + scale[1] + scale[2]) / 3.0f; -} - -/*********************************************************** - * NiGeomMorpherController methods - **********************************************************/ - -string NiGeomMorpherController::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << ABlock::asString(); - - out << "Flag Analysis:" << endl - << " Animation Type: "; - - int flags = GetAttr("Flags")->asInt(); - - if (flags & 1) - out << "APP_INIT" << endl; - else - out << "APP_TIME" << endl; - - out << " Cycle Type: "; - if (flags & 2) - out << "REVERSE" << endl; - else if (flags & 4) - out << "CLAMP" << endl; - else - out << "LOOP" << endl; - - out << " Animation Enabled: "; - if (flags & 8) - out << "Yes" <<endl; - else - out << "No" <<endl; - - return out.str(); -} - -/*********************************************************** - * AKeyframeData methods - **********************************************************/ - -void AKeyframeData::Read( istream& file, unsigned int version ) { - - scaleType = rotationType = translationType = xyzTypes[0] = xyzTypes[1] = xyzTypes[2] = KeyType(0); - - //--Rotation--// - uint numRotations = ReadUInt( file ); - - if (numRotations > 0) { - NifStream( rotationType, file ); - - if ( rotationType != 4 ) { - rotKeys.resize( numRotations ); - for ( unsigned int i = 0; i < rotKeys.size(); ++i ) { - StreamQuatKey(rotKeys[i], file, rotationType ); - } - } - else { - //Before version 10.2.0.0, read vestigial time and discard - if ( version < VER_10_2_0_0 ) { - ReadFloat( file ); - } - - for (int i = 0; i < 3; i++) { - int subCount = ReadUInt( file ); - if ( subCount > 0 ) { - NifStream( xyzTypes[i], file ); - - xyzKeys[i].resize( subCount ); - for (uint j = 0; j < xyzKeys[i].size(); j++) { - NifStream(xyzKeys[i][j], file, xyzTypes[i] ); - } - } - } - } - } - - //--Translation--// - uint numTranslations = ReadUInt( file ); - - if (numTranslations > 0) { - NifStream( translationType, file ); - - transKeys.resize( numTranslations ); - for ( unsigned int i = 0; i < transKeys.size(); ++i ) { - NifStream(transKeys[i], file, translationType ); - } - } - - //--Scale--// - uint numScalings = ReadUInt( file ); - - if (numScalings > 0) { - NifStream( scaleType, file ); - - scaleKeys.resize( numScalings ); - for ( unsigned int i = 0; i < scaleKeys.size(); ++i ) { - NifStream(scaleKeys[i], file, scaleType ); - } - } -} - -void AKeyframeData::Write( ostream& file, unsigned int version ) const { - - //--Rotation--// - WriteUInt( uint(rotKeys.size()) , file ); - - if ( rotKeys.size() > 0) { - NifStream( rotationType, file ); - - if ( rotationType != 4 ) { - for ( unsigned int i = 0; i < rotKeys.size(); ++i ) { - StreamQuatKey(rotKeys[i], file, rotationType ); - } - } - else { - //Before version 10.2.0.0, write vestigial time - if ( version < VER_10_2_0_0 ) { - WriteFloat( 0.0, file ); - } - - for (int i = 0; i < 3; i++) { - WriteUInt( uint(xyzKeys[i].size()) , file ); - if ( xyzKeys[i].size() > 0 ) { - NifStream( xyzTypes[i], file ); - - for (uint j = 0; j < xyzKeys[i].size(); j++) { - NifStream(xyzKeys[i][j], file, xyzTypes[i] ); - } - } - } - } - } - - //--Translation--// - WriteUInt( uint(transKeys.size()) , file ); - - if ( transKeys.size() > 0) { - NifStream( translationType, file ); - - for ( unsigned int i = 0; i < transKeys.size(); ++i ) { - NifStream(transKeys[i], file, translationType ); - } - } - - //--Scale--// - WriteUInt( uint(scaleKeys.size()), file ); - - if (scaleKeys.size() > 0) { - NifStream( scaleType, file ); - - for ( unsigned int i = 0; i < scaleKeys.size(); ++i ) { - NifStream(scaleKeys[i], file, scaleType ); - } - } -} - -string AKeyframeData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - //--Rotation--// - out << "Rotations: " << uint(rotKeys.size()) << endl; - - if (rotKeys.size() > 0) { - out << "Rotation Type: " << rotationType << endl; - - if (verbose) { - for (unsigned int i = 0; i < rotKeys.size(); i++) { - out << "Key Time: " << rotKeys[i].time << " "; - - if (rotationType != 4) { - out << "Rotation: Q[" << rotKeys[i].data.w << " ( " << rotKeys[i].data.x << ", " << rotKeys[i].data.y << ", " << rotKeys[i].data.z << ")]" << endl; - // << " As Matrix:"; - //QuatToMatrix(rotKeys[i].data, out ); - //out << " As Angles:"; - //QuatToEuler(rotKeys[i].data, out ); - - } - - if (rotationType == 3) { - out << ", T " << rotKeys[i].tension << ", B " << rotKeys[i].bias << ", C " << rotKeys[i].continuity; - } else if (rotationType == 4) { - out << "Rotation Type 4 Unsupported - Data was not read" << endl; - } - out << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - } - - //--Translation--// - out << "Translations: " << uint(transKeys.size()) << endl; - - if (transKeys.size() > 0) { - out << "Translation Type: " << translationType << endl; - - if (verbose) { - for (unsigned int i = 0; i < transKeys.size(); i++) { - out << "Key Time: " << transKeys[i].time << " "; - - out << "Data: V(" << transKeys[i].data.x << ", " << transKeys[i].data.y << ", " << transKeys[i].data.z; - - if (translationType == 2) { - out << "), F(" << transKeys[i].forward_tangent.x << ", " << transKeys[i].forward_tangent.y << ", " << transKeys[i].forward_tangent.z << "), B(" << transKeys[i].backward_tangent.x << ", " << transKeys[i].backward_tangent.y << ", " << transKeys[i].backward_tangent.z << ")"; - }else if (translationType == 3) { - out << ", T " << transKeys[i].tension << ", B " << transKeys[i].bias << ", C " << transKeys[i].continuity; - } - out << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - } - - //--Scale--// - out << "Scalings: " << uint(scaleKeys.size()) << endl; - - if (verbose) { - if (scaleKeys.size() > 0) { - out << "Scale Type: " << scaleType << endl; - - for (unsigned int i = 0; i < scaleKeys.size(); i++) { - out << "Key Time: " << scaleKeys[i].time << " "; - - out << "Data: S(" << scaleKeys[i].data << ")"; - - if (scaleType == 2) { - out << ", FT(" << scaleKeys[i].forward_tangent << "), BT(" << scaleKeys[i].backward_tangent << ")"; - } else if (scaleType == 3) { - out << ", T " << scaleKeys[i].tension << ", B " << scaleKeys[i].bias << ", C " << scaleKeys[i].continuity; - } - out << endl; - } - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - //out << setprecision(1); - - return out.str(); -} - -/*********************************************************** - * NiPSysEmitterCtlrData methods - **********************************************************/ - -void NiPSysEmitterCtlrData::Read( istream& file, unsigned int version ) { - - //--Float Keys--// - uint numKeys = ReadUInt( file ); - - if (numKeys > 0) { - NifStream( f_key_type, file ); - float_keys.resize( numKeys ); - for ( uint i = 0; i < float_keys.size(); ++i ) { - NifStream( float_keys[i], file, f_key_type ); - } - } - - //--Byte Keys--// - numKeys = ReadUInt( file ); - - byte_keys.resize( numKeys ); - for ( uint i = 0; i < byte_keys.size(); ++i ) { - NifStream( byte_keys[i], file, LINEAR_KEY ); - } -} - -void NiPSysEmitterCtlrData::Write( ostream& file, unsigned int version ) const { - - //--Float Keys--// - WriteUInt( uint(float_keys.size()), file ); - - if (float_keys.size() > 0) { - NifStream( f_key_type, file ); - for ( uint i = 0; i < float_keys.size(); ++i ) { - NifStream( float_keys[i], file, f_key_type ); - } - } - - //--Byte Keys--// - WriteUInt( uint(byte_keys.size()), file ); - - for ( uint i = 0; i < byte_keys.size(); ++i ) { - NifStream( byte_keys[i], file, LINEAR_KEY ); - } -} - -string NiPSysEmitterCtlrData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Float Key Count: " << uint(float_keys.size()) << endl - << "Float Key Type: " << f_key_type << endl; - - if (verbose) { - vector< Key<float> >::const_iterator it; - for ( it = float_keys.begin(); it != float_keys.end(); ++it ) { - out << "Key Time: " << it->time << " Float Value: " << it->data << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - out << "Byte Key Count: " << uint(byte_keys.size()) << endl; - - if (verbose) { - vector< Key<byte> >::const_iterator it; - for ( it = byte_keys.begin(); it != byte_keys.end(); ++it ) { - out << "Key Time: " << it->time << " Float Value: " << it->data << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiBoolData methods - **********************************************************/ - -void NiBoolData::Read( istream& file, unsigned int version ) { - uint keyCount = ReadUInt( file ); - NifStream( _type, file ); - - _keys.resize( keyCount ); - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} - -void NiBoolData::Write( ostream& file, unsigned int version ) const { - WriteUInt( uint(_keys.size()), file ); - NifStream( _type, file ); - - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} - -string NiBoolData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Key Count: " << uint(_keys.size()) << endl - << "Key Type: " << _type << endl; - - if (verbose) { - vector< Key<byte> >::const_iterator it; - for ( it = _keys.begin(); it != _keys.end(); ++it ) { - out << "Key Time: " << it->time << " Is Visible: "; - if ( it->data != 0 ) { - out << "True" << endl; - } else { - out << "False" << endl; - } - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiColorData methods - **********************************************************/ - -void NiColorData::Read( istream& file, unsigned int version ) { - uint keyCount = ReadUInt( file ); - NifStream( _type, file ); - - _keys.resize( keyCount ); - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} - -void NiColorData::Write( ostream& file, unsigned int version ) const { - WriteUInt( uint(_keys.size()), file ); - NifStream( _type, file ); - - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} - -string NiColorData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Key Count: " << uint(_keys.size()) << endl - << "Key Type: " << _type << endl; - - if (verbose) { - vector< Key<Color4> >::const_iterator it; - for ( it = _keys.begin(); it != _keys.end(); ++it ) { - out << "Key Time: " << it->time << " Color: " << it->data.r << ", " << it->data.g << ", " << it->data.b << ", " << it->data.a << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiControllerSequence methods - **********************************************************/ - -void NiControllerSequence::Read( istream& file, unsigned int version ) { - //GetAttr("Name")->Read( file, version ); - - //Up to version 10.1.0.0 the text key block is up here and named - if ( version <= VER_10_1_0_0 ) { - NifStream( txt_key_name, file ); - txt_key_blk.set_index( ReadUInt( file ) ); - } - - //Read the ControllerLink array - uint count = ReadUInt( file ); - children.resize( count ); - - //After version 10.2.0.0 there is an unknown int here - if ( version >= VER_10_2_0_0 ) { - NifStream( unk_int1, file ); - } - - for (uint i = 0; i < children.size(); ++i ) { - //Up to version 10.1.0.0 the name is stored here in a string - if ( version <= VER_10_1_0_0 ) { - NifStream( children[i].name, file ); - } - children[i].block.set_index( ReadUInt(file) ); - //From version 10.2.0.0 there is a lot more stuff here - if ( version >= VER_10_2_0_0 ) { - children[i].unk_link.set_index( ReadUInt(file) ); - //Read and discard duplicate String Palette index - ReadUInt(file); - //Read offsets - NifStream( children[i].name_offset, file ); - NifStream( children[i].unk_short1, file ); - NifStream( children[i].property_offset, file ); - NifStream( children[i].unk_short2, file ); - NifStream( children[i].controller_offset, file ); - NifStream( children[i].unk_short3, file ); - NifStream( children[i].var1_offset, file ); - NifStream( children[i].unk_short4, file ); - NifStream( children[i].var2_offset, file ); - NifStream( children[i].unk_short5, file ); - } - } - - //And from version 10.2.0.0 there is a lot more stuff down here as well - if (version >= VER_10_2_0_0 ) { - NifStream( unk_float1, file ); - - //Text key link is down here now and has no name - txt_key_blk.set_index( ReadUInt( file ) ); - - for (int i = 0; i < 4; ++i ) { - NifStream( unk_4_floats[i], file ); - } - //This does not exist after version 10.2.0.0 - if ( version < VER_20_0_0_4 ) { - NifStream( unk_float2, file ); - } - NifStream( unk_int2, file ); - NifStream( unk_string, file ); - //GetAttr("String Palette")->Read( file, version ); - } -} - -void NiControllerSequence::Write( ostream& file, unsigned int version ) const { - //GetAttr("Name")->Write( file, version ); - - //Up to version 10.1.0.0 the text key block is up here and named - if ( version <= VER_10_1_0_0 ) { - NifStream( txt_key_name, file ); - WriteUInt( txt_key_blk.get_index(), file ); - } - - //Read the ControllerLink array - WriteUInt( uint(children.size()), file ); - - //After version 10.2.0.0 there is an unknown int here - if ( version >= VER_10_2_0_0 ) { - NifStream( unk_int1, file ); - } - - for (uint i = 0; i < children.size(); ++i ) { - //Up to version 10.1.0.0 the name is stored here in a string - if ( version <= VER_10_1_0_0 ) { - NifStream( children[i].name, file ); - } - WriteUInt( children[i].block.get_index(), file ); - //From version 10.2.0.0 there is a lot more stuff here - if ( version >= VER_10_2_0_0 ) { - WriteUInt( children[i].unk_link.get_index(), file ); - //Write duplicate String Palette index - //GetAttr("String Palette")->Write( file, version ); - - //Write offsets - NifStream( children[i].name_offset, file ); - NifStream( children[i].unk_short1, file ); - NifStream( children[i].property_offset, file ); - NifStream( children[i].unk_short2, file ); - NifStream( children[i].controller_offset, file ); - NifStream( children[i].unk_short3, file ); - NifStream( children[i].var1_offset, file ); - NifStream( children[i].unk_short4, file ); - NifStream( children[i].var2_offset, file ); - NifStream( children[i].unk_short5, file ); - } - } - - //And from version 10.2.0.0 there is a lot more stuff down here as well - if (version >= VER_10_2_0_0 ) { - NifStream( unk_float1, file ); - - //Text key link is down here now and has no name - WriteUInt( txt_key_blk.get_index(), file ); - - for (int i = 0; i < 4; ++i ) { - NifStream( unk_4_floats[i], file ); - } - //This does not exist after version 10.2.0.0 - if ( version < VER_20_0_0_4 ) { - NifStream( unk_float2, file ); - } - NifStream( unk_int2, file ); - NifStream( unk_string, file ); - //GetAttr("String Palette")->Write( file, version ); - } -} - -string NiControllerSequence::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Name: " << GetAttr("Name")->asString() << endl - << "Text Key Name: " << txt_key_name << endl - << "Text Key Block: " << txt_key_blk << endl - << "Unknown Int 1: " << unk_int1 << endl - << "Kf Children:"; - - if ( children.size() == 0 ) { - out << " None" << endl; - } else { - out << endl; - } - - //Check for a string palette - string pal; - blk_ref str_pal = GetAttr("String Palette")->asLink(); - if ( str_pal.is_fixed() == true && str_pal.is_null() == false ) { - pal = str_pal->GetAttr("Palette")->asString(); - } - - for (uint i = 0; i < children.size(); ++i ) { - out << " Kf Child " << i + 1 << ":" << endl - << " Name: " << children[i].name << endl - << " Block: " << children[i].block << endl - << " Unknown Link: " << children[i].unk_link << endl - << " Name Offset : " << children[i].name_offset <<" (" << GetSubStr( pal, children[i].name_offset) << ")" << endl - << " Unknown Short 1 : " << children[i].unk_short1 << endl - << " Property Offset : " << children[i].property_offset << " (" << GetSubStr( pal, children[i].property_offset) << ")" << endl - << " Unknown Short 2 : " << children[i].unk_short2 << endl - << " Controller Offset: " << children[i].controller_offset << " (" << GetSubStr( pal, children[i].controller_offset) << ")" << endl - << " Unknown Short 3 : " << children[i].unk_short3 << endl - << " Variable 1 Offset: " << children[i].var1_offset << " (" << GetSubStr( pal, children[i].var1_offset) << ")" << endl - << " Unknown Short 4 : " << children[i].unk_short4 << endl - << " Variable 2 Offset: " << children[i].var2_offset << " (" << GetSubStr( pal, children[i].var2_offset) << ")" << endl - << " Unknown Short 5 : " << children[i].unk_short5 << endl; - } - - out << "Unknown Float 1: " << unk_float1 << endl - << "Unknown 4 Floats: " << unk_4_floats[0] << ", " << unk_4_floats[1] << ", " << unk_4_floats[2] << ", " << unk_4_floats[3] << endl - << "Unknown Float 2: " << unk_float2 << endl - << "Unknown String: " << unk_string << endl - << "String Palette: " << GetAttr("String Palette")->asString() << endl; - - return out.str(); -} - -string NiControllerSequence::GetSubStr( const string & pal, short offset ) const { - string out; - - // -1 is a null offset - if ( offset == -1 ) { - return out; - } - - for ( uint i = offset; i < pal.size(); ++i ) { - if ( pal[i] == '\0' ) { - break; - } - out.push_back( pal[i] ); - } - - return out; -} - -void NiControllerSequence::FixLinks( const vector<blk_ref> & blocks ) { - ABlock::FixLinks( blocks ); - - //Fix text key lnk - if ( txt_key_blk.is_null() == false ) { - txt_key_blk = blocks[txt_key_blk.get_index()]; - - //Add this block as a child - AddChild( txt_key_blk.get_block() ); - } - - for (uint i = 0; i < children.size(); ++i ) { - if ( children[i].block.is_null() == false ) { - //Fix links for this child - children[i].block = blocks[children[i].block.get_index()]; - - //Add this block as a child - AddChild( children[i].block.get_block() ); - } - - if ( children[i].unk_link.is_null() == false ) { - children[i].unk_link = blocks[children[i].unk_link.get_index()]; - - //Add this block as a child - AddChild( children[i].unk_link.get_block() ); - } - } -} - -list<blk_ref> NiControllerSequence::GetLinks() const { - list<blk_ref> links = ABlock::GetLinks(); - - //add link for text key block - if ( txt_key_blk.is_null() == false ) { - links.push_back( txt_key_blk ); - } - - //Add child links - for (uint i = 0; i < children.size(); ++i ) { - if ( children[i].block.is_null() == false ) { - links.push_back( children[i].block ); - } - if ( children[i].unk_link.is_null() == false ) { - links.push_back( children[i].unk_link ); - } - } - - return links; -} - -NiControllerSequence::~NiControllerSequence() { - - //Remove text key child - RemoveChild( txt_key_blk.get_block() ); - - for (uint i = 0; i < children.size(); ++i ) { - //Remove child blocks - RemoveChild( children[i].block.get_block() ); - RemoveChild( children[i].unk_link.get_block() ); - } -} - -void NiControllerSequence::SetTextKey( string new_name, blk_ref new_link ) { - //Set new name - txt_key_name = new_name; - - //Check for identical block values - if ( new_link == txt_key_blk ) - return; - - //Remove old child - if ( txt_key_blk.is_null() == false ) { - RemoveChild( txt_key_blk.get_block() ); - } - - //Set new value - txt_key_blk = new_link; - - //Add new child - if ( txt_key_blk.is_null() == false ) { - AddChild( txt_key_blk.get_block() ); - } -} - -void NiControllerSequence::AddKfChild( string new_name, blk_ref new_link, string controller_type = "" ) { - //Make sure the link isn't null - if ( new_link.is_null() == true ) { - throw runtime_error("Attempted to add a null link to NiControllerSequence block."); - } - - KfChild kc; - - kc.block = new_link; - - //Check for a string palette - blk_ref str_pal = GetAttr("String Palette")->asLink(); - if ( str_pal.is_null() == true ) { - //No string palette, store name internally - kc.name = new_name; - } else { - //String palette exists - store name and controller type there - - //Make sure they didn't give us empty strings - if ( new_name.size() == 0 || controller_type.size() == 0 ) { - throw runtime_error( "You cannot use empty name or controller type strings when using a string palette."); - } - - //Get palette - string pal = str_pal->GetAttr("Palette")->asString(); - - //--Search for copies of the text we want to add--// - - //Search for the name string - int offset = (int)pal.find( new_name ); - if ( offset == -1 ) { - //String not found, append it - kc.name_offset = (uint)pal.size(); - pal.append( new_name + '\0' ); - } else { - //String found, use existing offset - kc.name_offset = offset; - } - - //Search for the controller type string - offset = (int)pal.find( controller_type ); - if ( offset == -1 ) { - //String not found, append it - kc.controller_offset = (uint)pal.size(); - pal.append( controller_type + '\0' ); - } else { - //String found, use existing offset - kc.controller_offset = offset; - } - - //Store the palette back to the string pal block - str_pal->GetAttr("Palette")->Set( pal ); - } - - children.push_back( kc ); - - //Add new child - AddChild( kc.block.get_block() ); - - //This should be impossible now, but don't want to forget it later - if ( kc.unk_link.is_null() != true ) { - AddChild( kc.unk_link.get_block() ); - } -} - -void NiControllerSequence::ClearKfChildren() { - - //Cycle through all Kf Children, removing them as parents from the blocks they refer to - for (uint i = 0; i < children.size(); ++i ) { - if ( children[i].block.is_null() != true ) { - RemoveChild( children[i].block.get_block() ); - } - if ( children[i].unk_link.is_null() != true ) { - RemoveChild( children[i].unk_link.get_block() ); - } - } - - //Clear list - children.clear(); - - //Check for a string palette - blk_ref str_pal = GetAttr("String Palette")->asLink(); - if ( str_pal.is_null() == false ) { - //There's a string palette, so clear it out - str_pal->GetAttr("Palette")->Set( "" ); - } -} - -/*********************************************************** - * NiFloatData methods - **********************************************************/ - -void NiFloatData::Read( istream& file, unsigned int version ) { - uint keyCount = ReadUInt( file ); - NifStream( _type, file ); - - _keys.resize( keyCount ); - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} - -void NiFloatData::Write( ostream& file, unsigned int version ) const { - WriteUInt( uint(_keys.size()), file ); - NifStream( _type, file ); - - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} - -string NiFloatData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Key Count: " << uint(_keys.size()) << endl - << "Key Type: " << _type << endl; - - if (verbose) { - vector< Key<float> >::const_iterator it; - for ( it = _keys.begin(); it != _keys.end(); ++it ) { - out << "Key Time: " << it->time << " Float Value: " << it->data << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiStringExtraData methods - **********************************************************/ - -void NiStringExtraData::Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - - //GetAttr("Name")->Read( in, version ); - //GetAttr("Next Extra Data")->Read( in, version ); - - - //Up to version 4.2.2.0, read bytes remaining but don't bother to store it - if ( version <= VER_4_2_2_0 ) { - ReadUInt( in ); - } - - //GetAttr("String Data")->Read( in, version ); -} - -void NiStringExtraData::Write( ostream& out, unsigned int version ) const { - //GetAttr("Name")->Write( out, version ); - //GetAttr("Next Extra Data")->Write( out, version ); - AExtraData::Write( out, version ); - - attr_ref string_data = GetAttr("String Data"); - - //Up to version 4.2.2.0, Write Bytes Remaining; length of string + 4 - if ( version <= VER_4_2_2_0 ) { - WriteUInt( uint(string_data->asString().length()) + 4, out ); - } - - //string_data->Write( out, version ); -} - -string NiStringExtraData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - attr_ref name_attr = GetAttr("Name"); - //attr_ref next_data = GetAttr("Next Extra Data"); - attr_ref string_data = GetAttr("String Data"); - - out << "Name: " << name_attr->asString() << endl - //<< next_data->GetName() << ": " << next_data->asLink() << endl - << "Bytes Remaining: " << uint(string_data->asString().length()) + 4 << endl - << string_data->GetName() << ": " << string_data->asString() << endl; - - return out.str(); -} - -/*********************************************************** - * NiMorphData methods - **********************************************************/ - -void NiMorphData::Read( istream& file, unsigned int version ) { - - uint morphCount = ReadUInt( file ); - NifStream( vertCount, file ); - - //GetAttr("Unknown Byte")->Read( file, version ); - byte unk_byte = ReadByte( file ); - - morphs.resize(morphCount); - for ( uint i = 0; i < morphs.size() ; ++i ) { - uint numKeys = ReadUInt( file ); - - NifStream( morphs[i]._type, file ); - - morphs[i].keys.resize( numKeys ); - - for (uint j = 0; j < morphs[i].keys.size(); j++) { - NifStream( morphs[i].keys[j], file, morphs[i]._type ); - } - - morphs[i].morph.resize( vertCount ); - //Stream whole array of Vector3 - NifStream( morphs[i].morph, file ); - } -} - -void NiMorphData::Write( ostream& file, unsigned int version ) const { - WriteUInt( uint(morphs.size()), file ); - NifStream( vertCount, file ); - - //GetAttr("Unknown Byte")->Write( file, version ); - - for ( uint i = 0; i < morphs.size() ; ++i ) { - WriteUInt( uint(morphs[i].keys.size()), file ); - - NifStream( morphs[i]._type, file ); - - for (uint j = 0; j < morphs[i].keys.size(); j++) { - NifStream( morphs[i].keys[j], file, morphs[i]._type ); - } - - //Stream whole array of Vector3 - NifStream( morphs[i].morph, file ); - } -} - -string NiMorphData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Morph Count: " << uint(morphs.size()) << endl - << "Vert Count: " << vertCount << endl - << "Unknown Byte: " << GetAttr("Unknown Byte")->asString() << endl; - - for ( uint i = 0; i < morphs.size() ; ++i ) { - out << "---Morph " << i + 1 << "---" << endl; - - out << "Time Count: " << uint(morphs[i].keys.size()) << endl - << "Key Type: " << morphs[i]._type << endl; - - if (verbose) { - for (uint j = 0; j < morphs[i].keys.size(); ++j ) { - //Always show time and data - out << "Key Time: " << morphs[i].keys[j].time << ", Influence?: " << morphs[i].keys[j].data; - if ( morphs[i]._type == 2 ) { - //Uses Quadratic interpolation - out << ", FT(" << morphs[i].keys[j].forward_tangent << ") BT(" << morphs[i].keys[j].backward_tangent << ")"; - } else if ( morphs[i]._type == 3 ) { - out << ", T " << morphs[i].keys[j].tension << ", B " << morphs[i].keys[j].bias << ", C " << morphs[i].keys[j].continuity; - } - out << endl; - } - - for (uint j = 0; j < vertCount ; ++j ) { - out << "Morph " << j + 1 << ": (" << morphs[i].morph[j].x << ", " << morphs[i].morph[j].y << ", " << morphs[i].morph[j].z << ")" << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - } - - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - return out.str(); -} - -void NiMorphData::SetVertexCount( int n ) { - vertCount = n; - for ( uint i = 0; i < morphs.size(); ++i ) { - morphs[i].morph.resize( n ); - } -} - -void NiMorphData::SetMorphVerts( int n, const vector<Vector3> & in ) { - // Make sure the size of the incoming vector equal vertCount - if ( in.size() != vertCount ) - throw runtime_error("Input array size must equal Vertex Count. Call SetVertexCount() to resize."); - - //It's the right size, so go ahead and set it - morphs[n].morph = in; -} - -/*********************************************************** - * NiPalette methods - **********************************************************/ - -void NiPalette::Read( istream& file, unsigned int version ) { - - NifStream( unkByte, file ); - NifStream( numEntries, file ); - - - //Read Palette - for (int i = 0; i < 256; ++i) { - for (int j = 0; j < 4; ++j) { - NifStream( palette[i][j], file ); - } - } -} - -void NiPalette::Write( ostream& file, unsigned int version ) const { - - NifStream( unkByte, file ); - NifStream( numEntries, file ); - - //Write Palette - for (int i = 0; i < 256; ++i) { - for (int j = 0; j < 4; ++j) { - NifStream( palette[i][j], file ); - } - } -} - - -string NiPalette::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Unknown Byte: " << int(unkByte) << endl; - out << "Num Entries?: " << numEntries << endl; - - //Print Palette - - vector<Color4>col_pal = GetPalette(); - - out << "Palette: (256 colors)" << endl; - if (verbose) { - for (int i = 0; i < 256; ++i) { - out << i + 1 << ": " << setw(4) << int(palette[i][0]) << ", " << setw(4) << int(palette[i][1]) << ", " << setw(4) << int(palette[i][2]) << ", " << setw(4) << int(palette[i][3]) << "\t"; - out << i + 1 << ": " << setw(4) << col_pal[i].r << ", " << setw(4) << col_pal[i].g << ", " << setw(4) << col_pal[i].b << ", " << setw(4) << col_pal[i].a << endl; - } - } else { - out << " <<Data Not Shown>>" << endl; - } - - return out.str(); -} - - -vector<Color4> NiPalette::GetPalette() const { - vector<Color4> color_pal(256); - - for ( uint i = 0; i < 256; ++i ) { - - color_pal[i].r = float(palette[i][0]) / 255.0f; - color_pal[i].g = float(palette[i][1]) / 255.0f; - color_pal[i].b = float(palette[i][2]) / 255.0f; - color_pal[i].a = float(palette[i][3]) / 255.0f; - } - - return color_pal; -} - -void NiPalette::SetPalette( const vector<Color4> & new_pal ) { - if ( new_pal.size() != 256 ) { - throw runtime_error( "Palette size must be 256" ); - } - - for ( uint i = 0; i < 256; ++i ) { - palette[i][0] = int( new_pal[i].r * 255.0f ); - palette[i][1] = int( new_pal[i].g * 255.0f ); - palette[i][2] = int( new_pal[i].b * 255.0f ); - palette[i][3] = int( new_pal[i].a * 255.0f ); - } -} - -/*********************************************************** - * NiSkinPartition methods - **********************************************************/ - -void NiSkinPartition::Read( istream& file, unsigned int version ) { - - uint numPartitions = ReadUInt( file ); - partitions.resize( numPartitions ); - - vector<SkinPartition>::iterator it; - for (it = partitions.begin(); it != partitions.end(); ++it ) { - - //Read counts - ushort numVertices = ReadUShort( file ); - ushort numTriangles = ReadUShort( file ); - ushort numBones = ReadUShort( file ); - ushort numStrips = ReadUShort( file ); - ushort numWeights = ReadUShort( file ); - - //Read bones - it->bones.resize( numBones ); - NifStream( it->bones, file ); - - //Read vertex map - //After version 10.1.0.0, the vertex map is conditioned on a bool - bool hasVertexMap = true; - if ( version >= VER_10_1_0_0 ) { - hasVertexMap = ReadBool( file, version ); - } - - if ( hasVertexMap ) { - it->vertexMap.resize( numVertices ); - NifStream( it->vertexMap, file ); - } - - //Read vertex weights - //After version 10.1.0.0, the vertex weights are conditioned on a bool - bool hasVertexWeights = true; - if ( version >= VER_10_1_0_0 ) { - hasVertexWeights = ReadBool( file, version ); - } - - if ( hasVertexWeights ) { - //Resize vectors 2 deep - it->vertexWeights.resize( numVertices ); - for ( uint i = 0; i < it->vertexWeights.size(); ++i ) { - it->vertexWeights[i].resize( numWeights ); - } - //Read it all - NifStream( it->vertexWeights, file ); - } - - //Read strip lenghts, resize strip vectors as we go. - it->strips.resize( numStrips ); - for ( uint i = 0; i < it->strips.size(); ++i ) { - it->strips[i].resize( ReadUShort( file ) ); - } - - //Read triangle strip points - //After version 10.1.0.0, the triangle strip points are conditioned on a bool - bool hasStrips = true; - if ( version >= VER_10_1_0_0 ) { - hasStrips = ReadBool( file, version ); - } - - if ( hasStrips ) { - //Read 2 deep - NifStream( it->strips, file ); - } - - //Read triangles - //Triangles only exist if numStrips == 0 - if ( it->strips.size() == 0 ) { - it->triangles.resize( numTriangles ); - NifStream( it->triangles, file ); - } - - //This bool exists in all versions - bool hasBoneIndices = ReadBool( file, version ); - - if ( hasBoneIndices ) { - //Resize vectors 2 deep - it->boneIndices.resize( numVertices ); - for ( uint i = 0; i < it->vertexWeights.size(); ++i ) { - it->boneIndices[i].resize( numWeights ); - } - //Read it all - NifStream( it->boneIndices, file ); - } - } -} - -void NiSkinPartition::Write( ostream& file, unsigned int version ) const { - - WriteUInt( uint(partitions.size()), file ); - - vector<SkinPartition>::const_iterator it; - for (it = partitions.begin(); it != partitions.end(); ++it ) { - //Write counts - WriteUShort( ushort( it->vertexMap.size()), file ); - WriteUShort( ushort( it->triangles.size()), file ); - WriteUShort( ushort( it->bones.size()), file ); - WriteUShort( ushort( it->strips.size()), file ); - WriteUShort( ushort( it->vertexWeights.size()), file ); - - //Write bones - NifStream( it->bones, file ); - - //Write vertex map - //After version 10.1.0.0, the vertex map is conditioned on a bool - if ( version >= VER_10_1_0_0 ) { - WriteBool( it->vertexMap.size() > 0, file, version ); - } - - NifStream( it->vertexMap, file ); - - //Write vertex weights - //After version 10.1.0.0, the vertex weights are conditioned on a bool - if ( version >= VER_10_1_0_0 ) { - WriteBool( it->vertexWeights.size() > 0, file, version ); - } - - //Write vertex weights - 2 deep - NifStream( it->vertexWeights, file ); - - //Write strip lenghts - for ( uint i = 0; i < it->strips.size(); ++i ) { - WriteUShort( ushort(it->strips.size()), file ); - } - - //Write triangle strip points - //After version 10.1.0.0, the triangle strip points are conditioned on a bool - if ( version >= VER_10_1_0_0 ) { - WriteBool( it->strips.size() > 0, file, version ); - } - - //Write strip points - 2 deep - NifStream( it->strips, file ); - - //Write triangles - //Triangles only exist if numStrips == 0 - if ( it->strips.size() == 0 ) { - NifStream( it->triangles, file ); - } - - //This bool exists in all versions - WriteBool( it->boneIndices.size() > 0, file, version ); - - //Write bone indices - 2 deep - NifStream( it->boneIndices, file ); - } -} - - -string NiSkinPartition::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - int count = 0; - vector<SkinPartition>::const_iterator it; - for (it = partitions.begin(); it != partitions.end(); ++it ) { - count++; - //Write counts - out << "Skin Partition " << count << ":" << endl - << " Vertex Count: " << ushort(it->vertexMap.size()) << endl - << " Triangle Count: " << ushort(it->triangles.size()) << endl - << " Bone Count: " << ushort(it->bones.size()) << endl - << " Triangle Strip Count: " << ushort(it->strips.size()) << endl - << " Vertex Weight Count: " << ushort(it->vertexWeights.size()) << endl; - - if (verbose) { - out << " Bones:" << endl; - for ( uint i = 0; i < it->bones.size(); ++i ) { - out << " " << i + 1 << ": " << it->bones[i] << endl; - } - - out << " Vertex Map:" << endl; - for ( uint i = 0; i < it->vertexMap.size(); ++i ) { - out << " " << i + 1 << ": " << it->vertexMap[i] << endl; - } - - out << " Vertex Weights:" << endl; - for ( uint i = 0; i < it->vertexWeights.size(); ++i ) { - out << "Group " << i + 1 << ":" << endl; - for ( uint j = 0; j < it->vertexWeights[i].size(); ++j ) { - out << " " << j + 1 << ": " << it->vertexWeights[i][j] << endl; - } - } - - out << " Triangle Strips:" << endl; - for ( uint i = 0; i < it->strips.size(); ++i ) { - out << "Strip " << i + 1 << ":" << endl; - for ( uint j = 0; j < it->strips[i].size(); ++j ) { - out << " " << j + 1 << ": " << it->strips[i][j] << endl; - } - } - - out << " Triangles:" << endl; - for ( uint i = 0; i < it->triangles.size(); ++i ) { - out << " " << i + 1 << ": " << setw(10) << it->triangles[i].v1 << "," << setw(10) << it->triangles[i].v2 << "," << setw(10) << it->triangles[i].v3 << endl; - } - - out << " Bone Indices:" << endl; - for ( uint i = 0; i < it->boneIndices.size(); ++i ) { - out << "Group " << i + 1 << ":" << endl; - for ( uint j = 0; j < it->boneIndices[i].size(); ++j ) { - out << " " << j + 1 << ": " << it->boneIndices[i][j] << endl; - } - } - } else { - out << " <<Data Not Shown>>" << endl; - } - } - - return out.str(); -} - -/*********************************************************** - * NiStringPalette methods - **********************************************************/ - -void NiStringPalette::Read( istream& file, unsigned int version ) { - - //GetAttr("Palette")->Read( file, version ); - - //Read extra length and throw it away - ReadUInt( file ); -} - -void NiStringPalette::Write( ostream& file, unsigned int version ) const { - - attr_ref pal_attr = GetAttr("Palette"); - //pal_attr->Write( file, version ); - string pal_str = pal_attr->asString(); - - //Write length of string again - WriteUInt( uint(pal_str.size()), file ); -} - - -string NiStringPalette::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - string pal = GetAttr("Palette")->asString(); - - ////Replace 0's with newlines - //replace( pal.begin(), pal.end(), 0x00, 0x0A ); - - //out << "String Palette: " << endl - // << pal << endl; - - out << "String Palette:" << endl - << " 0: "; - - if ( pal.size() > 0 ) for ( uint i = 0; i < pal.size() - 1; ++i ) { - if ( pal[i] == '\0') { - out << endl << " " << i + 1 << ": "; - } else { - out << pal[i]; - } - } - out << endl; - - return out.str(); -} - - -/*********************************************************** - * NiPixelData methods - **********************************************************/ - -void NiPixelData::Read( istream& file, unsigned int version ) { - //ABlock::Read( in, version ); - - pxFormat = PixelFormat( ReadUInt(file) ); - - //This data only exists before version 20.0.0.4 - if ( version < VER_20_0_0_4 ) { - NifStream( redMask, file ); - NifStream( greenMask, file ); - NifStream( blueMask, file ); - NifStream( alphaMask, file ); - - NifStream( bpp, file ); - - for ( int i = 0; i < 8; ++i ) { - NifStream( unk8Bytes[i], file ); - } - - //There is an unknown int here from version 10.1.0.0 to 10.2.0.0 - if ( version >= VER_10_1_0_0 ) { - NifStream( unkInt, file ); - } - } else { - //After version 20.0.0.4 there are 54 unknown bytes here - file.read( (char*)unk54Bytes, 54 ); - } - - //GetAttr("Palette")->Read( file, version ); - - uint mipCount = ReadUInt( file ); - - - - //Read Bytes per pixel and discard - ReadUInt( file ); - - mipmaps.resize( mipCount ); - for ( uint i = 0; i < mipCount; ++i ) { - mipmaps[i].width = ReadUInt( file ); - mipmaps[i].height = ReadUInt( file ); - mipmaps[i].offset = ReadUInt( file ); - } - - dataSize = ReadUInt( file ); - data = new byte[dataSize]; - - //After version 20.0.0.4 there is an unknown int here - if ( version >= VER_20_0_0_4 ) { - NifStream( unkInt2, file ); - } - - file.read( (char *)data, dataSize); -} - -void NiPixelData::Write( ostream& file, unsigned int version ) const { - //ABlock::Write( file, version ); - - WriteUInt( uint(pxFormat), file ); - - //This data only exists before version 20.0.0.4 - if ( version < VER_20_0_0_4 ) { - NifStream( redMask, file ); - NifStream( greenMask, file ); - NifStream( blueMask, file ); - NifStream( alphaMask, file ); - - NifStream( bpp, file ); - - for ( int i = 0; i < 8; ++i ) { - NifStream( unk8Bytes[i], file ); - } - - //There is an unknown int here from version 10.1.0.0 to version 10.2.0.0 - if ( version >= VER_10_1_0_0 ) { - NifStream( unkInt, file ); - } - } - - //GetAttr("Palette")->Write( file, version ); - - //If there is no data stored, then there are no mipmaps. - if ( dataSize > 0 ) { - WriteUInt( uint(mipmaps.size()), file ); - } else { - WriteUInt( 0, file ); - } - - WriteUInt( bpp / 8, file ); - - //If there is no data stored, then there are no mipmaps. - if ( dataSize > 0 ) { - for ( uint i = 0; i < mipmaps.size(); ++i ) { - WriteUInt( mipmaps[i].width, file ); - WriteUInt( mipmaps[i].height, file ); - WriteUInt( mipmaps[i].offset, file ); - } - } - - WriteUInt( dataSize, file ); - - //After version 20.0.0.4 there is an unknown int here - if ( version >= VER_20_0_0_4 ) { - NifStream( unkInt2, file ); - } - - file.write( (char *)data, dataSize); -} - -string NiPixelData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - //out << ABlock::asString(); - - out << "Pixel Format: "; - switch (pxFormat) { - case PX_FMT_RGB8: - out << "0 - PX_FMT_RGB8" << endl; - break; - case PX_FMT_RGBA8: - out << "1 - PX_FMT_RGBA8" << endl; - break; - case PX_FMT_PAL8: - out << "2 - PX_FMT_PAL8" << endl; - break; - default: - out << uint(pxFormat) << " - ???" << endl; - } - - out << "Red Mask: " << redMask << endl - << "Green Mask: " << greenMask << endl - << "Blue Mask: " << blueMask << endl - << "Alpha Mask: " << alphaMask << endl - << "Bits Per Pixel: " << bpp << endl - << "Mipmap Count: " << uint(mipmaps.size()) << endl - << "Bytes Per Pixel: " << bpp / 8 << endl - << "Unknown 8 Bytes:" << endl; - - for ( int i = 0; i < 8; ++i ) { - out << i + 1 << ": " << int(unk8Bytes[i]) << endl; - } - - out << "Unknown Int: " << unkInt << endl - << "Unknown 54 Bytes:" << endl; - - if (verbose) { - out << HexString( unk54Bytes, 54 ); - } else { - out << " <<<Data Not Shown>>>"; - } - - out << "Palette: " << GetAttr("Palette")->asLink() << endl; - - for ( uint i = 0; i < mipmaps.size(); ++i ) { - out << "Mipmap " << i + 1 << ":" << endl - << " Width: " << mipmaps[i].width << endl - << " Height: " << mipmaps[i].height << endl - << " Offset into Image Data Block: " << mipmaps[i].offset << endl; - -#ifdef IM_DEBUG - switch ( pxFormat ) { - case PX_FMT_RGB8: - imdebug("rgb w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &data[mipmaps[i].offset] ); - break; - case PX_FMT_RGBA8: - imdebug("rgba w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &data[mipmaps[i].offset] ); - break; - //case 4: - // byte * img = new byte[ mipmaps[i].width * mipmaps[i].height ]; - // for ( uint j = 0; j < mipmaps[i].width * mipmaps[i].height / 2; ++j ) { - // byte temp = data[mipmaps[i].offset + j]; - - // img[j*2] = (temp & 0x0F) * 0x11; - // img[j*2+1] = (temp & byte(0xF0) >> 4) * 0x11; - - // //cout << "Pixel " << j*2 << ": " << setbase(16) << int(img[j*2]) << endl; - // //cout << "Pixel " << j*2+1 << ": " << setbase(16) << int(img[j*2+1]) << endl; - // }; - // imdebug("lum w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, img ); - - // delete [] img; - // break; - } - - //cout << "Displaying NiPixelData Image. Press Enter to continue." << endl; - //cin.get(); -#endif - } - - out << "Unknown Int 2: " << unkInt2 << endl - << "Mipmap Image Data: " << dataSize << " Bytes (Not Shown)" << endl; - - return out.str(); -} - -int NiPixelData::GetHeight() const { - if ( mipmaps.size() == 0 ) { - return 0; - } else { - return mipmaps[0].height; - } -} - -int NiPixelData::GetWidth() const { - if (mipmaps.size() == 0 ) { - return 0; - } else { - return mipmaps[0].width; - } -} - -PixelFormat NiPixelData::GetPixelFormat() const { - return pxFormat; -} - -void NiPixelData::Reset( int new_width, int new_height, PixelFormat px_fmt ) { - //Ensure that texture dimentions are powers of two - if ( (new_height & (new_height-1)) != 0 ) { - throw runtime_error("Texture height must be a power of two. 1, 2, 4, 8, 16, 32, 64, 256, 512, etc."); - } - - if ( (new_width & (new_width-1)) != 0 ) { - throw runtime_error("Texture width must be a power of two. 1, 2, 4, 8, 16, 32, 64, 256, 512, etc."); - } - - //Delete any data that was previously held - if ( data != NULL ) { - delete [] data; - data = NULL; - dataSize = 0; - } - - dataSize = 0; - mipmaps.resize(1); - - - //Set up first mipmap - mipmaps[0].width = new_width; - mipmaps[0].height = new_height; - mipmaps[0].offset = 0; - - //Set up pixel format fields - pxFormat = px_fmt; - switch(pxFormat) { - case PX_FMT_RGB8: - redMask = 0x000000FF; - greenMask = 0x0000FF00; - blueMask = 0x00FF0000; - alphaMask = 0x00000000; - bpp = 24; - unk8Bytes[0] = 96; - unk8Bytes[1] = 8; - unk8Bytes[2] = 130; - unk8Bytes[3] = 0; - unk8Bytes[4] = 0; - unk8Bytes[5] = 65; - unk8Bytes[6] = 0; - unk8Bytes[7] = 0; - break; - case PX_FMT_RGBA8 : - redMask = 0x000000FF; - greenMask = 0x0000FF00; - blueMask = 0x00FF0000; - alphaMask = 0xFF000000; - bpp = 32; - unk8Bytes[0] = 129; - unk8Bytes[1] = 8; - unk8Bytes[2] = 130; - unk8Bytes[3] = 32; - unk8Bytes[4] = 0; - unk8Bytes[5] = 65; - unk8Bytes[6] = 12; - unk8Bytes[7] = 0; - break; - case PX_FMT_PAL8 : - redMask = 0x00000000; - blueMask = 0x00000000; - greenMask = 0x00000000; - alphaMask = 0x00000000; - bpp = 8; - unk8Bytes[0] = 34; - unk8Bytes[1] = 0; - unk8Bytes[2] = 0; - unk8Bytes[3] = 32; - unk8Bytes[4] = 0; - unk8Bytes[5] = 65; - unk8Bytes[6] = 12; - unk8Bytes[7] = 0; - break; - //[4,0,0,0,0,0,0,0] if 0 (?) bits per pixel - default: - throw runtime_error("The pixel type you have requested is not currently supported."); - } -} - -vector<Color4> NiPixelData::GetColors() const { - vector<Color4> pixels; - - if ( mipmaps.size() == 0 ) { - //Return empty vector - return pixels; - } - - //Pack the pixel data from the first mipmap into a vector of - //Color4 based on the pixel format. - pixels.resize( mipmaps[0].width * mipmaps[0].height ); - switch(pxFormat) { - case PX_FMT_RGB8: - for ( uint i = 0; i < pixels.size(); ++i ) { - pixels[i].r = float(data[i * 3]) / 255.0f; - pixels[i].g = float(data[i * 3 + 1]) / 255.0f; - pixels[i].b = float(data[i * 3 + 2]) / 255.0f; - pixels[i].a = 1.0f; - } - break; - case PX_FMT_RGBA8: - for ( uint i = 0; i < pixels.size(); ++i ) { - pixels[i].r = float(data[i * 4]) / 255.0f; - pixels[i].g = float(data[i * 4 + 1]) / 255.0f; - pixels[i].b = float(data[i * 4 + 2]) / 255.0f; - pixels[i].a = float(data[i * 4 + 3]) / 255.0f; - } - break; - default: - throw runtime_error("The GetColors function only supports the PX_FMT_RGB8 and PX_FMT_RGBA8 pixel formats."); - } - -#ifdef IM_DEBUG - - imdebug("rgba b=32f rs=2 w=%d h=%d %p", mipmaps[0].width, mipmaps[0].height, &pixels[0] ); - //delete [] img; - cout << "Showing image returned by GetColors function." << endl; - cin.get(); -#endif - - return pixels; -} - -void NiPixelData::SetColors( const vector<Color4> & new_pixels, bool generate_mipmaps ) { - //Ensure that compatible pixel format is being used - if ( pxFormat != PX_FMT_RGB8 && pxFormat != PX_FMT_RGBA8 ) { - throw runtime_error("The SetColors function only supports the PX_FMT_RGB8 and PX_FMT_RGBA8 pixel formats."); - } - - //Ensure that there is size information in the mipmaps - if ( mipmaps.size() == 0 ) { - throw runtime_error("The size informatoin has not been set. Call the IPixelData::Reset() function first."); - } - - //Ensure that the right number of pixels for the dimentions set have been passed - if ( new_pixels.size() != mipmaps[0].height * mipmaps[0].width ) { - throw runtime_error("You must pass one color for every pixel in the image. There should be height * width colors."); - } - - uint size = 0; - mipmaps.resize(1); - size = (mipmaps[0].height * mipmaps[0].width * bpp) / 8; - - //Deal with multiple mipmaps - if ( generate_mipmaps == true ) { - MipMap m; - m.height = mipmaps[0].height; - m.width = mipmaps[0].width; - - size = (mipmaps[0].height * mipmaps[0].width * bpp) / 8; - - while ( m.width != 1 && m.height != 1 ) { - ////cout << "Width: " << m.width << " Height: " << m.height << " Offset: " << m.offset << endl; - m.width /= 2; - m.height /= 2; - m.offset = size; - - size += (m.height * m.width * bpp) / 8; - - mipmaps.push_back(m); - } - } - - //Allocate space to store mipmaps - if ( data != NULL ) { - delete [] data; - } - - dataSize = size * bpp / 8; - data = new byte[dataSize]; - - //Copy pixels to Color4 C array - Color4 * tmp_image = new Color4[new_pixels.size()]; - - for (uint i = 0; i < new_pixels.size(); ++i ) { - tmp_image[i] = new_pixels[i]; - } - - //Pack pixel data - for (uint i = 0; i < mipmaps.size(); ++i ) { - cout << "Width: " << mipmaps[i].width << " Height: " << mipmaps[i].height << " Offset: " << mipmaps[i].offset << endl; - - if ( i > 0 ) { - //Allocate space to store re-sized image. - Color4 * resized = new Color4[ mipmaps[i].width * mipmaps[i].height ]; - - //Visit every other pixel in each row and column of the previous image - for ( uint w = 0; w < mipmaps[i-1].width; w+=2 ) { - for ( uint h = 0; h < mipmaps[i-1].height; h+=2 ) { - //cout << "w: " << w << " h: " << h << endl; - Color4 & av = resized[(h/2) * mipmaps[i].width + (w/2)]; - - //Start with the value of the current pixel - av = tmp_image[h * mipmaps[i-1].width + w]; - float num_colors = 1.0f; - - //Only process the pixel above if height is > 1 - if ( h > 1 ) { - Color4 & px = tmp_image[(h+1) * mipmaps[i-1].width + w]; - av.r += px.r; - av.g += px.g; - av.b += px.b; - av.a += px.a; - num_colors += 1.0f; - } - - //Only process the pixel to the right if width > 1 - if (w > 1 ) { - Color4 & px = tmp_image[h * mipmaps[i-1].width + (w+1)]; - av.r += px.r; - av.g += px.g; - av.b += px.b; - av.a += px.a; - num_colors += 1.0f; - } - - //Only process the pixel to the upper right if both width and height are > 1 - if ( w > 1 && h >> 1 ) { - Color4 & px = tmp_image[(h+1) * mipmaps[i-1].width + (w+1)]; - av.r += px.r; - av.g += px.g; - av.b += px.b; - av.a += px.a; - num_colors += 1.0f; - } - - //Calculate average - av.r /= num_colors; - av.g /= num_colors; - av.b /= num_colors; - av.a /= num_colors; - } - } - //Resize is complete, set result to tmp_image - - //delete old tmp_image data - delete [] tmp_image; - - //Adjust pointer values - tmp_image = resized; - resized = NULL; - } - - //Data is ready to be packed into the byes of this mipmap - - #ifdef IM_DEBUG - cout << "Showing mipmap size " << mipmaps[i].width << " x " << mipmaps[i].height << "." << endl; - imdebug("rgba b=32f w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &tmp_image[0] ); - cin.get(); - #endif - - //Start at offset - byte * map = &data[mipmaps[i].offset]; - - switch(pxFormat) { - case PX_FMT_RGB8: - for ( uint j = 0; j < mipmaps[i].width * mipmaps[i].height; ++j ) { - map[j * 3] = int( tmp_image[j].r * 255.0f ); - map[j * 3 + 1] = int( tmp_image[j].g * 255.0f ); - map[j * 3 + 2] = int( tmp_image[j].b * 255.0f ); - } - - //#ifdef IM_DEBUG - // cout << "Showing mipmap after being packed - size " << mipmaps[i].width << " x " << mipmaps[i].height << "." << endl; - // imdebug("rgb w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &map[0] ); - // cin.get(); - //#endif - break; - case PX_FMT_RGBA8: - for ( uint j = 0; j < mipmaps[i].width * mipmaps[i].height; ++j ) { - map[j * 4] = int( tmp_image[j].r * 255.0f ); - map[j * 4 + 1] = int( tmp_image[j].g * 255.0f ); - map[j * 4 + 2] = int( tmp_image[j].b * 255.0f ); - map[j * 4 + 3] = int( tmp_image[j].a * 255.0f ); - } - - //#ifdef IM_DEBUG - // cout << "Showing mipmap after being packed - size " << mipmaps[i].width << " x " << mipmaps[i].height << "." << endl; - // imdebug("rgba w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &map[0] ); - // cin.get(); - //#endif - break; - case PX_FMT_PAL8: - throw runtime_error("The SetColors function only supports the PX_FMT_RGB8 and PX_FMT_RGBA8 pixel formats."); - break; - } - } -} - -//enum PixelFormat { -// PX_FMT_RGBA8 = 0, /*!< 32-bit color with alpha: uses 8 bits to store each red, blue, green, and alpha component. */ -// PX_FMT_RGB8 = 1, /*!< 24-bit color: uses 8 bit to store each red, blue, and green component. */ -// PX_FMT_PAL8 = 2 /*!< 8-bit palette index: uses 8 bits to store an index into the palette stored in a NiPallete block. */ -//}; - -/*********************************************************** - * NiPosData methods - **********************************************************/ - -void NiPosData::Read( istream& file, unsigned int version ) { - uint keyCount = ReadUInt( file ); - if ( keyCount > 0 ) { - NifStream( _type, file ); - - _keys.resize( keyCount ); - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } - } -} - -void NiPosData::Write( ostream& file, unsigned int version ) const { - WriteUInt( uint(_keys.size()), file ); - if ( _keys.size() > 0 ) { - NifStream( _type, file ); - - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, _type ); - } -} -} - -string NiPosData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Key Count: " << uint(_keys.size()) << endl - << "Key Type: " << _type << endl; - - if (verbose) { - vector< Key<Vector3> >::const_iterator it; - for ( it = _keys.begin(); it != _keys.end(); ++it ) { - out << "Key Time: " << it->time << " Position: " << it->data.x << ", " << it->data.y << ", " << it->data.z << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiTextKeyExtraData methods - **********************************************************/ - -void NiTextKeyExtraData::Read( istream& file, unsigned int version ) { - /*GetAttr("Name")->Read( file, version ); - GetAttr("Next Extra Data")->Read( file, version ); - */ - AExtraData::Read( file, version ); - //GetAttr("Unknown Int")->Read( file, version ); - - uint keyCount = ReadUInt( file ); - - _keys.resize( keyCount ); - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, LINEAR_KEY ); - } -} - -void NiTextKeyExtraData::Write( ostream& file, unsigned int version ) const { - - /*GetAttr("Name")->Write( file, version ); - GetAttr("Next Extra Data")->Write( file, version ); - */ - AExtraData::Write( file, version ); - //GetAttr("Unknown Int")->Write( file, version ); - - WriteUInt( uint(_keys.size()), file ); - - for (uint i = 0; i < _keys.size(); i++) { - NifStream( _keys[i], file, LINEAR_KEY ); - } -} - -string NiTextKeyExtraData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Name: " << GetAttr("Name")->asString() << endl - //<< "Next Extra Data: " << GetAttr("Next Extra Data")->asString() << endl - << "Unknown Int: " << GetAttr("Unknown Int")->asString() << endl - << "Key Count: " << uint(_keys.size()) << endl; - - if (verbose) { - vector< Key<string> >::const_iterator it; - for ( it = _keys.begin(); it != _keys.end(); ++it ) { - out << "Key Time: " << it->time << " Key Text: " << it->data << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiUVData methods - **********************************************************/ - -void NiUVData::Read( istream& in, unsigned int version ) { - for (uint i = 0; i < 4; ++i) { - uint count = ReadUInt( in ); - - if ( count > 0 ) { - groups[i].keyType = ReadUInt( in ); - - groups[i].keys.resize(count); - for (uint j = 0; j < groups[i].keys.size(); ++j) { - groups[i].keys[j].time = ReadFloat( in ); - groups[i].keys[j].data = ReadFloat( in ); - - if ( groups[i].keyType == 2) { - groups[i].keys[j].forward_tangent = ReadFloat( in ); - groups[i].keys[j].backward_tangent = ReadFloat( in ); - } - } - } - } -} - -void NiUVData::Write( ostream& out, unsigned int version ) const { - for (uint i = 0; i < 4; ++i) { - WriteUInt( uint(groups[i].keys.size()), out ); - - if ( groups[i].keys.size() > 0 ) { - WriteUInt( groups[i].keyType, out ); - - for (uint j = 0; j < groups[i].keys.size(); ++j) { - WriteFloat( groups[i].keys[j].time, out ); - WriteFloat( groups[i].keys[j].data, out ); - - if ( groups[i].keyType == 2) { - WriteFloat( groups[i].keys[j].forward_tangent, out ); - WriteFloat( groups[i].keys[j].backward_tangent, out ); - } - } - } - } -} - -string NiUVData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - for (uint i = 0; i < 4; ++i) { - out << "UV Group " << i + 1 << ":" << endl - << " Key Count: " << uint(groups[i].keys.size()) << endl; - - if ( groups[i].keys.size() > 0 ) { - out << " Key Type: " << groups[i].keyType << endl; - - if (verbose) { - for (uint j = 0; j < groups[i].keys.size(); ++j) { - out << " Key Time: " << groups[i].keys[j].time << " Data: " << groups[i].keys[j].data; - - if ( groups[i].keyType == 2) { - out << " F: " << groups[i].keys[j].forward_tangent << " B: " << groups[i].keys[j].backward_tangent; - } - out << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - } - } - - return out.str(); -} - -/*********************************************************** - * NiVertWeightsExtraData methods - **********************************************************/ - -void NiVertWeightsExtraData::Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - - //Read byte count but throw it away - ReadUInt( in ); - - ushort verts = ReadUShort( in ); - - weights.resize( verts ); - for (uint i = 0; i < weights.size(); ++i) { - weights[i] = ReadFloat( in ); - } -} - -void NiVertWeightsExtraData::Write( ostream& out, unsigned int version ) const { - AExtraData::Write( out, version ); - - uint bytes = 2 + 4 * uint(weights.size()); - WriteUInt( bytes, out ); - WriteUShort( ushort(weights.size()), out ); - - for (uint i = 0; i < weights.size(); ++i) { - WriteFloat( weights[i], out ); - } -} - -string NiVertWeightsExtraData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString(); - - out << "Bytes: " << bytes << endl - << "Verts: " << uint(weights.size()) << endl; - - if (verbose) { - for (uint i = 0; i < weights.size(); ++i) { - out << "Weight " << i + 1 << ": " << weights[i] << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiVisData methods - **********************************************************/ - -void NiVisData ::Read( istream& in, unsigned int version ) { - uint keyCount = ReadUInt( in ); - - keys.resize( keyCount ); - for (uint i = 0; i < keys.size(); ++i) { - keys[i].time = ReadFloat( in ); - keys[i].data = ReadByte( in ); // Is Visible? True/False - } -} - -void NiVisData ::Write( ostream& out, unsigned int version ) const { - WriteUInt( uint(keys.size()), out ); - - for (uint i = 0; i < keys.size(); ++i) { - WriteFloat( keys[i].time, out ); - WriteByte( keys[i].data, out ); // Is Visible? True/False - } -} - -string NiVisData::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Key Count: " << uint(keys.size()) << endl; - - if (verbose) { - for (uint i = 0; i < keys.size(); ++i) { - out << "Key Time: " << keys[i].time << " Visible: " << int(keys[i].data) << endl; - } - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -/*********************************************************** - * NiLookAtInterpolator methods - **********************************************************/ - -//void NiLookAtInterpolator::Read( istream& file, unsigned int version ) { -// -// GetAttr("Unknown Short")->Read( file, version ); -// -// //Float Array -// uint numFloats = ReadUInt( file ); -// unkFloats.resize( numFloats ); -// NifStream( unkFloats, file ); -// -// GetAttr("Unknown Link")->Read( file, version ); -// -// //Byte Array -// for (uint i = 0; i < 8; ++i ) { -// NifStream( unkBytes[i], file ); -// } -//} -// -//void NiLookAtInterpolator::Write( ostream& file, unsigned int version ) const { -// -//} -// -//string NiLookAtInterpolator::asString() const { -// stringstream out; -// out.setf(ios::fixed, ios::floatfield); -// out << setprecision(1); -// -// return out.str(); -//} - - -/*********************************************************** - * UnknownMixIn methods - **********************************************************/ - -void UnknownMixIn::Read( istream &in, unsigned int version ) { - len = BlockSearch(in); - - //Create byte array and read in unknown block - data = new byte [len]; - in.read((char*)data, len); -} - -string UnknownMixIn::asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Unknown Data (" << len << " bytes):" << endl; - - if (verbose) { - //Display Data in Hex form - out << hex << setfill('0'); - for (int j = 0; j < len; j++) { - out << uppercase << setw(2) << uint(data[j]); - if (j % 16 == 15 || j == len - 1) - out << endl; - else if (j % 16 == 7) - out << " "; - else if (j % 8 == 3) - out << " "; - else - out << " "; - } - out << dec << setfill(' '); - } else { - out << "<<Data Not Shown>>" << endl; - } - - return out.str(); -} - -void UnknownMixIn::Write( ostream& out, unsigned int version ) const { - out.write( (const char*)data, len ); -} - -//int len = BlockSearch(in); - -////Create byte array and read in unknown block -//byte * data = new byte [len]; -//in.read((char*)data, len); - -////Display Data in Hex form -//cout << hex << setfill('0'); -//for (int j = 0; j < len; j++) { -// cout << uppercase << setw(2) << uint(data[j]); -// if (j % 16 == 15 || j == len - 1) -// cout << endl; -// else if (j % 16 == 7) -// cout << " "; -// else if (j % 8 == 3) -// cout << " "; -// else -// cout << " "; -//} -//cout << dec << setfill(' '); - -//delete [] data; diff --git a/NifExport/niflib/NIF_Blocks.h b/NifExport/niflib/NIF_Blocks.h deleted file mode 100755 index a6cb046..0000000 --- a/NifExport/niflib/NIF_Blocks.h +++ /dev/null @@ -1,3130 +0,0 @@ -/* Copyright (c) 2005, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the NIF File Format Library and Tools - project nor the names of its contributors may be used to endorse - or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -#ifndef _NIF_BLOCKS_H -#define _NIF_BLOCKS_H - -/* INCLUDES */ -#include "NiObject.h" -#include "obj\NiObject.h" -#include "NIF_IO.h" - -#include <vector> -#include <list> -#include <map> -#include <cmath> -#include <sstream> - -//--Types--// -//typedef pair<attr_ref, blk_ref> LinkPair; -//typedef multimap<attr_ref, blk_ref> LinkMap; -//typedef LinkMap::iterator LinkMapIt; -//typedef pair<LinkMapIt,LinkMapIt> LinkMapRange; - -//--Constants--// - -//Non-Public Interface IDs - -//const int SkinInstInternal = -2; -//const int SkinDataInternal = -3; - -class AControllable : public NiObject { -public: - static const Type TYPE; - AControllable(); - void Init() {} - bool IsControllable() const { return true; } - ~AControllable() {} -}; - -const Type AControllable::TYPE("AControllable", &NiObject::TYPE); - -class ANode : public AControllable { -public: - static const Type TYPE; - ANode(); - void Init() { - //Start the bind pose at an identity matrix - bindPosition = Matrix44::IDENTITY; - - //Start the flags at "Not a skin influence" - //GetAttr("Flags")->Set(8); - - }; - ~ANode() {}; - void InitAttrs(); - void Read( istream& in, unsigned int version ) { - NiObject::Read( in, version ); - Matrix44 transform; - transform = GetLocalTransform(); - SetWorldBindPos( transform ); - } - - /*! - * This is a conveniance function that allows you to retrieve the full 4x4 matrix transform of a node. It accesses the "Rotation," "Translation," and "Scale" attributes and builds a complete 4x4 transformation matrix from them. - * \return A 4x4 transformation matrix built from the node's transform attributes. - * \sa INode::GetWorldTransform - */ - Matrix44 GetLocalTransform() const; - - /*! - * This function will return a transform matrix that represents the location of this node in world space. In other words, it concatenates all parent transforms up to the root of the scene to give the ultimate combined transform from the origin for this node. - * \return The 4x4 world transform matrix of this node. - * \sa INode::GetLocalTransform - */ - Matrix44 GetWorldTransform() const; - - /*! - * This function returns the bind position world matrix. The bind position (also called the rest position) is the position of an object in a skin and bones system before any posing has been done. - * \return The 4x4 world bind position matrix of this node. - * \sa INode::GetLocalBindPos, INode::SetWorldBindPos - */ - Matrix44 GetWorldBindPos() const; - - /*! This function returns the bind position world matrix of this node multiplied with the inverse of the bind position world matrix of its parent object if any. Thus it returns the bind position of the object in local coordinates. The bind position (also called the rest position) is the position of an object in a skin and bones system before any posing has been done. - * \return The 4x4 local bind position matrix of this node. - * \sa INode::SetWorldBindPos, INode::GetWorldBindPos - */ - Matrix44 GetLocalBindPos() const; - - /*! - * This function sets the bind position of this object relative to the origin. The bind position (also called the rest position) is the position of an object in a skin and bones system before any posing has been done. This function must be called on every object in a skin and bones system (the bones and the skinned shapes) in order for skinning information to be written to a Nif file. - * \param m The 4x4 world bind position matrix of this node - * \sa INode::GetLocalBindPos, INode::GetWorldBindPos - */ - void SetWorldBindPos( Matrix44 const & m ); - - void IncCrossRef( IBlock * block ); - void DecCrossRef( IBlock * block ); - -protected: - void ResetSkinnedFlag(); - Matrix44 bindPosition; -}; - -/** - * AParentNode - */ -class AParentNode : public ANode { -public: - AParentNode(); - void Init() {} - ~AParentNode() {} -}; - -/** - * AFx - */ -class AFx : public AParentNode { -public: - - AFx(); - void Init() {} - ~AFx() {} -}; - -class AShape : public ANode { -public: - AShape(); - void Init() {} - ~AShape() {} -}; - -class AParticleNode : public AShape { -public: - AParticleNode(); - void Init() {} - ~AParticleNode() {} -}; - -class AProperty : public AControllable { -public: - AProperty(); - void Init() {} - ~AProperty() {} -}; - -class AController : public NiObject { -public: - AController(); - void Init() {} - bool IsController() { return true; } - ~AController() {} -}; - -class AData : public NiObject { -public: - AData() {} - void Init() {} - ~AData() {} -}; - -class AInterpolator : public NiObject { -public: - AInterpolator(); - void Init() {} - ~AInterpolator() {} -}; - -class AParticleModifier : public NiObject { -public: - AParticleModifier(); - void Init() {} - ~AParticleModifier() {} -}; - -class APSysModifier : public NiObject { -public: - APSysModifier(); - void Init() {} - ~APSysModifier() {} -}; - -class APSysEmitter : public APSysModifier { -public: - APSysEmitter(); - void Init() {} - ~APSysEmitter() {} -}; - -class APSysVolumeEmitter : public APSysEmitter { -public: - APSysVolumeEmitter(); - void Init() {} - ~APSysVolumeEmitter() {} -}; - -class AExtraData : public AData { -public: - AExtraData() { - //AddAttr( attr_string, "Name", VER_10_0_1_0 ); - //AddAttr( attr_link, "Next Extra Data", 0, VER_4_2_2_0 ); - } - ~AExtraData() {}; - void Read( istream& in, unsigned int version ) { - //GetAttr("Name")->Read( in, version ); - //GetAttr("Next Extra Data")->Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - //GetAttr("Name")->Write( out, version ); - //GetAttr("Next Extra Data")->Write( out, version ); - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << "Name: " << GetAttr("Name")->asString() << endl - << "Next Extra Data: " << GetAttr("Next Extra Data")->asString() << endl; - - return out.str(); - } -}; - - -class AParticleSystemController : public AController { -public: - AParticleSystemController(); - void Init() {} - ~AParticleSystemController() {} -}; - -class ADynamicEffect : public ANode { -public: - ADynamicEffect(); - void Init() {} - ~ADynamicEffect() {} -}; - -class ALight : public ADynamicEffect { -public: - ALight(); - void Init() {} - ~ALight() {} -}; - -class APointLight : public ALight { -public: - APointLight(); - void Init() {} - ~APointLight() {} -}; - -/** - * FxButton - */ -class FxButton : public AFx { -public: - - FxButton(); - void Init() {} - ~FxButton() {} - - string GetBlockType() const { return "FxButton"; } -}; - -/** - * FxRadioButton - */ -class FxRadioButton : public AFx { -public: - - FxRadioButton(); - void Init() {} - ~FxRadioButton() {} - - string GetBlockType() const { return "FxRadioButton"; } -}; - -/** - * FxWidget - */ -class FxWidget : public AFx { -public: - - FxWidget(); - void Init() {} - ~FxWidget() {} - - string GetBlockType() const { return "FxWidget"; } -}; - -/** - * NiNode - Root of each model component. - */ -class NiNode : public AParentNode { -public: - - NiNode(); - void Init() {} - ~NiNode() {} - string GetBlockType() const { return "NiNode"; } - string asString() const; -}; - -/** - * RootCollisionNode - */ -class RootCollisionNode : public AParentNode { -public: - - RootCollisionNode(); - void Init() {} - ~RootCollisionNode() {} - - string GetBlockType() const { return "RootCollisionNode"; } -}; - -/** - * AvoidNode - */ -class AvoidNode : public AParentNode { -public: - - AvoidNode(); - void Init() {} - ~AvoidNode() {} - - string GetBlockType() const { return "AvoidNode"; } -}; - -/** - * NiBillboardNode - */ -class NiBillboardNode : public AParentNode { -public: - NiBillboardNode(); - void Init() {} - ~NiBillboardNode() {} - - string GetBlockType() const { return "NiBillboardNode"; } -}; - -/** - * NiBSAnimationNode - */ -class NiBSAnimationNode : public AParentNode { -public: - NiBSAnimationNode(); - void Init() {} - ~NiBSAnimationNode() {} - - string GetBlockType() const { return "NiBSAnimationNode"; } -}; - -/** - * NiBSParticleNode - */ -class NiBSParticleNode : public AParentNode { -public: - NiBSParticleNode(); - void Init() {} - ~NiBSParticleNode() {} - - string GetBlockType() const { return "NiBSParticleNode"; } -}; - -/** - * NiLODNode - */ -class NiLODNode : public AParentNode { -public: - NiLODNode(); - void Init() {} - ~NiLODNode() {} - - string GetBlockType() const { return "NiLODNode"; } -}; - -/** - * ZBuffer data. - */ -class NiZBufferProperty : public AProperty { -public: - NiZBufferProperty(); - void Init() {} - ~NiZBufferProperty() {} - - string GetBlockType() const { return "NiZBufferProperty"; } -}; - -/** - * NiShadeProperty - */ -class NiShadeProperty : public AProperty { -public: - - NiShadeProperty(); - void Init() {} - ~NiShadeProperty() {} - - string GetBlockType() const { return "NiShadeProperty"; } -}; - -/** - * ZBuffer data.NiWireframeProperty - */ -class NiWireframeProperty : public AProperty { -public: - - NiWireframeProperty(); - void Init() {} - ~NiWireframeProperty() {} - - string GetBlockType() const { return "NiWireframeProperty"; } -}; - -/** - * NiDitherProperty - */ -class NiDitherProperty : public AProperty { -public: - - NiDitherProperty(); - void Init() {} - ~NiDitherProperty() {} - - string GetBlockType() const { return "NiDitherProperty"; } -}; - -/** - * NiFogProperty - */ -class NiFogProperty : public AProperty { -public: - - NiFogProperty(); - void Init() {} - ~NiFogProperty() {} - - string GetBlockType() const { return "NiFogProperty"; } -}; - -/** - * NiSequenceStreamHelper - */ -class NiSequenceStreamHelper : public AControllable { -public: - - NiSequenceStreamHelper (); - void Init() {} - ~NiSequenceStreamHelper () {} - - string GetBlockType() const { return "NiSequenceStreamHelper"; } -}; - -/** - * NiVertexColorProperty - Vertex colour data. - */ -class NiVertexColorProperty : public AProperty{ -public: - - NiVertexColorProperty(); - void Init() {} - ~NiVertexColorProperty() {} - - string GetBlockType() const { return "NiVertexColorProperty"; } -}; - - - -/** - * NiTriShape - - */ -class NiTriShape : public AShape { -public: - NiTriShape(); - void Init() {} - ~NiTriShape() {} - - string GetBlockType() const { return "NiTriShape"; } -}; - -/** - * NiTriStrips - - */ -class NiTriStrips : public AShape { -public: - NiTriStrips(); - void Init() {} - ~NiTriStrips() {} - - string GetBlockType() const { return "NiTriStrips"; } -}; - -/** - * NiTexturingProperty - references all textures attatched to meshes which include it in their property list. - */ -class NiTexturingProperty : public AProperty { -public: - NiTexturingProperty( ) { //AddAttr( attr_flags, "Flags", 0, VER_10_0_1_0 ); - } - void Init() {} - ~NiTexturingProperty(); - string GetBlockType() const { return "NiTexturingProperty"; } - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - void FixLinks( const vector<blk_ref> & blocks ); - list<blk_ref> GetLinks() const; - - /*! Retrieves the number of texture slots defined by this texturing propery. Texture slots may or may not actually contain textures, but each slot has a different meaning so the way a texture is used is dependant upon which slot it is in. - * \return The number of texture slots defined by this texturing property. - * \sa ITexturingProperty::SetTextureCount - */ - int GetTextureCount() const { return int(textures.size()); } - - /*! Sets the number of texture slots defined by this texturing propery. Known valid values are 7 and 8. - * \param n The new size of the texture slot array. - * \sa ITexturingProperty::GetTextureCount - */ - void SetTextureCount( int new_count ); - - /*! Retrieves the number of extra texture slots defined by this texturing propery. These only exist in later Nif versions and their function is unknown. - * \return The number of extra texture slots defined by this texturing property. - * \sa ITexturingProperty::SetExtraTextureCount - */ - int GetExtraTextureCount() const { return int(extra_textures.size()); } - - /*! Sets the number of extra texture slots defined by this texturing propery. Often zero. - * \param n The new size of the extra texture slot array. - * \sa ITexturingProperty::GetExtraTextureCount - */ - void SetExtraTextureCount( int new_count ); - - /*! Retrieves the current apply mode for this texturing propery. This enum value affects the way the textures will be drawn. - * \return The current apply mode for this texturing property. - * \sa ITexturingProperty::SetApplyMode - */ - ApplyMode GetApplyMode() const { return appl_mode; } - - /*! Sets the current apply mode for this texturing propery. This enum value affects the way the textures will be drawn. - * \param new_val The new apply mode for this texturing property. - * \sa ITexturingProperty::GetApplyMode - */ - void SetApplyMode( ApplyMode new_val ) { appl_mode = new_val; } - - /*! Retrieves the texture desription structure that describes a texture by slot number. The TexType enum is provided to make it easy to select the texture slot with the specific qualities that you want. - * \param n The slot number of the texture to get the texture description of. This is a positive zero based index that must be less than the value returned by ITexturingProperty::GetTextureCount. - * \sa ITexturingProperty::SetTexture, TexType - */ - TexDesc GetTexture( int n ) const { return textures[n]; } - - /*! Sets a new description for the texture in the given slot number. The TexType enum is provided to make it easy to select the texture slot with the specific qualities that you want. - * \param n The slot number of the texture to set the texture description of. This is a positive zero based index that must be less than the value returned by ITexturingProperty::GetTextureCount. - * \param new_val Thew new texture descriptoin for the texture at the given slot number. - * \sa ITexturingProperty::GetTexture, TexType - */ - void SetTexture( int n, TexDesc & new_val ); - - /*! Retrieves the texture desription structure that describes an extra texture by slot number. These only exist in the later Nif versions and their function is unknown. - * \param n The slot number of the extra texture to get the texture description of. This is a positive zero based index that must be less than the value returned by ITexturingProperty::GetExtraTextureCount. - * \sa ITexturingProperty::SetExtraTexture - */ - TexDesc GetExtraTexture( int n ) const { return extra_textures[n].first; } - - /*! Sets a new description for the texture in the given slot number. These only exist in the later Nif versions and their function is unknown. - * \param n The slot number of the extra texture to set the texture description of. This is a positive zero based index that must be less than the value returned by ITexturingProperty::GetTextureCount. - * \param new_val Thew new texture descriptoin for the extra texture at the given slot number. - * \sa ITexturingProperty::GetTexture, TexType - */ - void SetExtraTexture( int n, TexDesc & new_val ); - - /*! Retrieves the bump map luma offset. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \return The bump map luma offset. - * \sa ITexturingProperty::SetLumaOffset - */ - float GetLumaOffset() const { return bmLumaOffset; } - - /*! Sets the bump map luma offset. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \param new_val The new bump map luma offset. - * \sa ITexturingProperty::GetLumaOffset - */ - void SetLumaOffset( float new_val ) { bmLumaOffset = new_val; } - - /*! Retrieves the bump map luma scale. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \return The bump map luma scale. - * \sa ITexturingProperty::SetLumaScale - */ - float GetLumaScale() const { return bmLumaScale; } - - /*! Sets the bump map luma scale. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \param new_val The new bump map luma scale. - * \sa ITexturingProperty::GetLumaScale - */ - void SetLumaScale( float new_val ) { bmLumaScale = new_val; } - - /*! Retrieves the bump map matrix. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \return the bump map matrix. - * \sa ITexturingProperty::SetBumpMapMatrix - */ - Matrix22 GetBumpMapMatrix() const { return bmMatrix; } - - /*! Sets the bump map matrix. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \param new_val The new bump map matrix. - * \sa ITexturingProperty::GetBumpMapMatrix - */ - void SetBumpMapMatrix( Matrix22 & new_val ) { bmMatrix = new_val; } - -private: - ApplyMode appl_mode; - vector<TexDesc> textures; //the main textures, base, gloss, glow, etc. - vector< pair<TexDesc,uint> > extra_textures; //extra texture group - - //Bitmap info - only used if a bitmap texture is present - float bmLumaOffset; // The bitmap luma offset. Unsure of function. - float bmLumaScale; // The bitmap luma scale. Unsure of function. - Matrix22 bmMatrix; // The bitmap 2x2 matrix. Unsure of function. -}; - -/** - * NiSourceTexture - Data for the associated texture, included in nif or external. - */ -class NiSourceTexture : public AControllable{ -public: - NiSourceTexture(); - void Init() {} - ~NiSourceTexture() {} - string GetBlockType() const { return "NiSourceTexture"; } -}; - - -/** - * NiPixelData - Texture data for an included texture. - */ -class NiPixelData : public AData { -public: - NiPixelData() { - data = NULL; - dataSize = 0; - //AddAttr( attr_int, "Unknown Int" ); - //AddAttr( attr_link, "Palette" ); - - } - ~NiPixelData() { if (data != NULL) delete [] data; } - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiPixelData"; } - - /*! Retrieves the height of the texture image stored in this block. - * \return The height of the texture image stored in this block. - * \sa IPixelData::GetWidth, IPixelData::GetPixelFormat - */ - int GetHeight() const; - - /*! Retrieves the width of the texture image stored in this block. - * \return The width of the texture image stored in this block. - * \sa IPixelData::GetHeight, IPixelData::GetPixelFormat - */ - int GetWidth() const; - - /*! Retrieves the pixel format of the texture image stored in this block. - * \return The pixel format of the texture image stored in this block. - * \sa IPixelData::GetWidth, IPixelData::GetHeight - */ - PixelFormat GetPixelFormat() const; - - /*! Deletes all image data and sets a new size and format in preparation for new data to be provided. - * \param new_width The width of the new texture image. - * \param new_height The height of the new texture image. - * \param px_fmt The pixel format of the new texture image. - * \sa IPixelData::GetWidth, IPixelData::GetHeight - */ - void Reset( int new_width, int new_height, PixelFormat px_fmt ); - - /*! Retrieves the the pixels of the texture image stored in this block. This function does not work on palettized textures. - * \return A vector containing the colors of each pixel in the texture image stored in this block, one row after another starting from the bottom of the image. The width of the image must be used to interpret them correctly. - * \sa IPixelData::SetColors, IPixelData::GetWidth - */ - vector<Color4> GetColors() const; - - /*! Sets the the pixels of the texture image stored in this block and optionally generates mipmaps. This function does not work for palettized textures. - * \param new_pixels A vector containing the colors of each new pixel to be set in the texture image stored in this block, one row after another starting from the botom of the image. - * \param generate_mipmaps If true, mipmaps will be generated for the new image and stored in the file. - * \sa IPixelData::GetColors, IPixelData::GetWidth - */ - void SetColors( const vector<Color4> & new_pixels, bool generate_mipmaps ); - -private: - struct MipMap { - uint width, height, offset; - }; - - PixelFormat pxFormat; - uint redMask, blueMask, greenMask, alphaMask, bpp, unkInt; - byte unk8Bytes[8]; - vector<MipMap> mipmaps; - uint dataSize; - byte * data; - byte unk54Bytes[54]; - uint unkInt2; -}; - -/** - * NiMaterialProperty - material properties - */ -class NiMaterialProperty : public AProperty{ -public: - NiMaterialProperty(); - void Init() {} - ~NiMaterialProperty() {} - string GetBlockType() const { return "NiMaterialProperty"; }; -}; - -/** - * NiSpecularProperty - - */ -class NiSpecularProperty : public AProperty { -public: - NiSpecularProperty(); - void Init() {} - ~NiSpecularProperty() {} - string GetBlockType() const { return "NiSpecularProperty"; }; -}; - -/** - * NiStencilProperty - - */ -class NiStencilProperty : public AProperty { -public: - NiStencilProperty(); - void Init() {} - ~NiStencilProperty() {} - string GetBlockType() const { return "NiStencilProperty"; }; -}; - -/** - * NiAlphaProperty - Does the mesh have alpha-blending enabled? - */ -class NiAlphaProperty : public AProperty { -public: - NiAlphaProperty(); - void Init() {} - ~NiAlphaProperty() {} - string GetBlockType() const { return "NiAlphaProperty"; } -}; - -/** - * AShapeData - Mesh data: vertices, vertex normals, etc. - */ -class AShapeData : public AData { -public: - AShapeData() { - //AddAttr( attr_string, "Name", VER_10_2_0_0 ); - //AddAttr( attr_link, "Unknown Link", VER_20_0_0_4 ); - } - ~AShapeData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - //--Counts--// - - /*! Returns the number of verticies that make up this mesh. This is also the number of normals, colors, and UV coordinates if these are used. - * \return The number of vertices that make up this mesh. - * \sa IShapeData::SetVertexCount - */ - int GetVertexCount() const { return int(vertices.size()); } - - /*! Returns the number of texture coordinate sets used by this mesh. For each UV set, there is a pair of texture coordinates for every vertex in the mesh. Each set corresponds to a texture entry in the NiTexturingPropery block. - * \return The number of texture cooridnate sets used by this mesh. Can be zero. - * \sa IShapeData::SetUVSetCount, ITexturingProperty - */ - short GetUVSetCount() const { return short(uv_sets.size()); } - - /*! Changes the number of vertices used by this mesh. If the mesh already contains data, it will be retained so long as the new number is higher than the old number. Otherwise any verticies above the new number will be deleted. This also resizes any normal, color, or UV data associated with these verticies. Triangles and triangle strips that may be attached via other interfaces are not culled of references to newly invalid vertices, however. - * \param n The new size of the vertex array. - * \sa IShapeData::GetVertexCount - */ - void SetVertexCount(int n); - - /*! Changes the number of UV sets used by this mesh. If he new size is smaller, data at the end of the array will be lost. Otherwise it will be retained. The number of UV sets must correspond with the number of textures defined in the corresponding NiTexturingProperty block. - * \param n The new size of the uv set array. - * \sa IShapeData::GetUVSetCount, ITexturingProperty - */ - void SetUVSetCount(int n); - - //--Getters--// - - /*! Used to retrive the vertices used by this mesh. The size of the vector will be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \return A vector cntaining the vertices used by this mesh. - * \sa IShapeData::SetVertices, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<Vector3> GetVertices() const { return vertices; } - - /*! Used to retrive the normals used by this mesh. The size of the vector will either be zero if no normals are used, or be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \return A vector cntaining the normals used by this mesh, if any. - * \sa IShapeData::SetNormals, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<Vector3> GetNormals() const { return normals; } - - /*! Used to retrive the vertex colors used by this mesh. The size of the vector will either be zero if no vertex colors are used, or be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \return A vector cntaining the vertex colors used by this mesh, if any. - * \sa IShapeData::SetColors, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<Color4> GetColors() const { return colors; } - - /*! Used to retrive the texture coordinates from one of the texture sets used by this mesh. The function will throw an exception if a texture set index that does not exist is specified. The size of the vector will be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \param index The index of the texture coordinate set to retrieve the texture coordinates from. This index is zero based and must be a positive number smaller than that returned by the IShapeData::GetUVSetCount function. If there are no texture coordinate sets, this function will throw an exception. - * \return A vector cntaining the the texture coordinates used by the requested texture coordinate set. - * \sa IShapeData::SetUVSet, IShapeData::GetUVSetCount, IShapeData::SetUVSetCount, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<TexCoord> GetUVSet( int index ) const { return uv_sets[index]; } - -//--Setters--// - - /*! Used to set the vertex data used by this mesh. The size of the vector must be the same as the vertex count retrieved with the IShapeData::GetVertexCount function or the function will throw an exception. - * \param in A vector containing the vertices to replace those in the mesh with. Note that there is no way to set vertices one at a time, they must be sent in one batch. - * \sa IShapeData::GetVertices, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetVertices( const vector<Vector3> & in ); - - /*! Used to set the normal data used by this mesh. The size of the vector must either be zero, or the same as the vertex count retrieved with the IShapeData::GetVertexCount function or the function will throw an exception. - * \param in A vector containing the normals to replace those in the mesh with. Note that there is no way to set normals one at a time, they must be sent in one batch. Use an empty vector to signify that this mesh will not be using normals. - * \sa IShapeData::GetNormals, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetNormals( const vector<Vector3> & in ); - - /*! Used to set the vertex color data used by this mesh. The size of the vector must either be zero, or the same as the vertex count retrieved with the IShapeData::GetVertexCount function or the function will throw an exception. - * \param in A vector containing the vertex colors to replace those in the mesh with. Note that there is no way to set vertex colors one at a time, they must be sent in one batch. Use an empty vector to signify that this mesh will not be using vertex colors. - * \sa IShapeData::GetColors, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetColors( const vector<Color4> & in ); - - /*! Used to set the texture coordinate data from one of the texture sets used by this mesh. The function will throw an exception if a texture set index that does not exist is specified. The size of the vector must be the same as the vertex count retrieved with the IShapeData::GetVertexCount function, or the function will throw an exception. - * \param index The index of the texture coordinate set to retrieve the texture coordinates from. This index is zero based and must be a positive number smaller than that returned by the IShapeData::GetUVSetCount function. If there are no texture coordinate sets, this function will throw an exception. - * \param in A vector containing the the new texture coordinates to replace those in the requested texture coordinate set. - * \sa IShapeData::GetUVSet, IShapeData::GetUVSetCount, IShapeData::SetUVSetCount, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetUVSet( int index, const vector<TexCoord> & in ); - -protected: - vector<Vector3> vertices; - vector<Vector3> normals; - vector<Color4> colors; - vector<Vector3> unk_vects; - vector< vector<TexCoord> > uv_sets; - void CalcCentAndRad( Vector3 & center, float & radius ) const; -}; - -/** - * AParticlesData - Generic particle system data block. - */ - -class AParticlesData : public AShapeData { -public: - AParticlesData() {} - ~AParticlesData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; -protected: - bool hasSizes; - ushort numActive, unkShort; - float size; - vector<float> sizes; -}; - -/** - * APSysData - New generic particle system data block. - */ - -class APSysData : public AShapeData { -public: - APSysData() {} - ~APSysData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; -protected: - vector<float> unkFloats1; - ushort unkShort; - vector<float> unkFloats2; - byte unkByte; -}; - -/** - * NiMeshPSysData - */ - -class NiMeshPSysData : public APSysData { -public: - NiMeshPSysData() { - //AddAttr( attr_link, "Modifier" ); - //AddAttr( attr_linkgroup, "Unknown Link Group", VER_10_2_0_0 ); - //AddAttr( attr_link, "Unknown Link 2", VER_10_2_0_0 ); - } - ~NiMeshPSysData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiMeshPSysData"; }; -protected: - vector<float> unkFloats; - uint unkInt; - byte unkByte; - uint unk3Ints[3]; -}; - -/** - * NiPSysData - */ - -class NiPSysData : public APSysData { -public: - NiPSysData() {} - ~NiPSysData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiPSysData"; }; -protected: - vector<float> unkFloats; - uint unkInt; - bool unkBool1; - vector<byte> unkBytes1; - byte unkByte; - bool unkBool2; - vector<byte> unkBytes2; -}; - -/** - * ARotatingParticlesData - Generic rotating particles data block. - */ - -class ARotatingParticlesData : public AParticlesData { -public: - ARotatingParticlesData() {} - ~ARotatingParticlesData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; -protected: - ushort numActiveRot; - vector<float> unkFloats; - vector<Quaternion> rotations; -}; - -/** - * NiParticleMeshesData - Particle meshes data. - */ - -class NiParticleMeshesData : public ARotatingParticlesData { -public: - NiParticleMeshesData() { - //AddAttr( attr_link, "Unknown Link 2" ); - } - ~NiParticleMeshesData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiParticleMeshesData"; } -protected: - -}; - -/** - * NiAutoNormalParticlesData - Particle system data block (emits particles along vertex normals?). - */ - -class NiAutoNormalParticlesData : public AParticlesData { -public: - NiAutoNormalParticlesData() {} - ~NiAutoNormalParticlesData() {} - string GetBlockType() const { return "NiAutoNormalParticlesData"; } -}; - -/** - * NiTriShapeData - Holds mesh data using a list of singular triangles. - */ -class NiTriShapeData : public AShapeData { -public: - NiTriShapeData() : match_group_mode(false) {} - ~NiTriShapeData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiTriShapeData"; } - - //--ITriShapeData--// - - //--Match Detection--// - - /*! Used to turn match detection mode on and off. When match detection mode is on, a list of all the vertices that have identical positions are stored in the file. This may improve performance but is not well understood. - * \param choice True to enable match detection mode, false to disable it. - * \sa ITriShapeData::GetMatchDetectionMode - */ - void SetMatchDetectionMode(bool choice) { match_group_mode = choice; } - - /*! Used to query the current match detection mode. When match detection mode is on, a list of all the vertices that have identical positions are stored in the file. This may improve performance but is not well understood. - * \return True if match detection mode is on, false otherwise. - * \sa ITriShapeData::GetMatchDetectionMode - */ - bool GetMatchDetectionMode() const { return match_group_mode; } - - //--Getters--// - - /*! Returns the triangle faces that make up this mesh. - * \return A vector containing the triangle faces that make up this mesh. - * \sa ITriShapeData::SetTriangles - */ - vector<Triangle> GetTriangles() const { return triangles; } - - //--Setters--// - - /*! Replaces the triangle face data in this mesh with new data. - * \param in A vector containing the new face data. Maximum size is 65,535. - * \sa ITriShapeData::GetTriangles - */ - void SetTriangles( const vector<Triangle> & in ); - -private: - vector<Triangle> triangles; - bool match_group_mode; -}; - -/** - * NiTriStripsData - Holds mesh data using strips of triangles. - */ -class NiTriStripsData : public AShapeData { -public: - NiTriStripsData() {} - ~NiTriStripsData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiTriStripsData"; } - - //--Counts--// - - /*! Used to get the number of triangle strips that this mesh is divided into. - * \return The number of triangle strips used by this mesh. - * \sa ITriStripData::SetStripCount - */ - short GetStripCount() const; - - /*! Used to resize the triangle strips array. If the new size is smaller, strips at the end of the array will be deleted. - * \param n The new size of the triangle strips array. - * \sa ITriStripData::GetStripCount - */ - void SetStripCount(int n); - - //--Getters--// - - /*! Used to retrieve all the triangles from a specific triangle strip. - * \param index The index of the triangle strip to retrieve the triangles from. This is a zero-based index which must be a positive number less than that returned by NiTriStripsData::GetStripCount. - * \return A vector containing all the triangle faces from the triangle strip specified by index. - * \sa ITriStripsData::SetStrip, ITriStripsData::GetTriangles - */ - vector<short> GetStrip( int index ) const; - - /*! This is a conveniance function which returns all triangle faces in all triangle strips that make up this mesh. It is similar to the ITriShapeData::GetTriangles function. - * \return A vector containing all the triangle faces from all the triangle strips that make up this mesh. - * \sa ITriShapeData::GetTriangles, ITriStripsData::GetStrip, ITriStripsData::SetStrip - */ - vector<Triangle> GetTriangles() const; - - //--Setter--/ - - /*! Used to set the triangle face data in a specific triangle strip. - * \param index The index of the triangle strip to set the face data for. This is a zero-based index which must be a positive number less than that returned by NiTriStripsData::GetStripCount. - * \sa ITriStripsData::GetStrip, ITriStripsData::GetTriangles - */ - void SetStrip( int index, const vector<short> & in ); - -private: - short GetTriangleCount() const; - vector< vector<short> > strips; -}; - -/** - * NiBSplineBasisData - Collision box. - */ -class NiBSplineBasisData : public AData { -public: - NiBSplineBasisData() { - //AddAttr( attr_int, "Unknown Int" ); - } - ~NiBSplineBasisData() {} - - string GetBlockType() const { return "NiBSplineBasisData"; } -}; - -/** - * NiBSplineData - Collision box. - */ -class NiBSplineData : public AData { -public: - NiBSplineData() {} - ~NiBSplineData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiBSplineData"; } -private: - uint unkInt; - vector<ushort> unkShorts; -}; - -/** - * NiCollisionData - Collision box. - */ -class NiCollisionData : public AData { -public: - NiCollisionData() {} - ~NiCollisionData() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiCollisionData"; } -private: - int unknownInt1, collisionType, unknownInt2; - byte unknownByte; - fVector3 unknown3Floats; - float unknown15Floats[15]; - float unknown8Floats[8]; -}; - - - -/** - * NiKeyframeController - */ -class NiKeyframeController : public AController { -public: - NiKeyframeController(); - void Init() {} - ~NiKeyframeController() {} - string GetBlockType() const { return "NiKeyframeController"; } -}; - -/** - * NiLightColorController - */ -class NiLightColorController : public AController { -public: - NiLightColorController(); - void Init() {} - ~NiLightColorController() {} - string GetBlockType() const { return "NiLightColorController"; } -}; - -/** - * NiLightDimmerController - */ -class NiLightDimmerController : public AController { -public: - NiLightDimmerController(); - void Init() {} - ~NiLightDimmerController() {} - string GetBlockType() const { return "NiLightDimmerController"; } -}; - -/** - * NiKeyframeController - */ -class NiLookAtController : public AController { -public: - NiLookAtController(); - void Init() {} - ~NiLookAtController() {} - string GetBlockType() const { return "NiLookAtController"; } -}; - -/** - * NiAlphaController - */ -class NiAlphaController : public AController { -public: - NiAlphaController(); - void Init() {} - ~NiAlphaController() {} - string GetBlockType() const { return "NiAlphaController"; } -}; - -/** - * NiBoneLODController - */ -class NiBoneLODController : public AController { -public: - NiBoneLODController() {} - ~NiBoneLODController(); - string GetBlockType() const { return "NiBoneLODController"; } - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - void FixLinks( const vector<blk_ref> & blocks ); - list<blk_ref> GetLinks() const; - -private: - uint unkInt1, unkInt2; - vector< vector<blk_ref> > _node_groups; - vector< vector< pair<blk_ref,blk_ref> > > _shape_groups; - vector<blk_ref> _shape_group2; -}; - -/** - * NiRangeLODData - */ -class NiRangeLODData : public AData { -public: - NiRangeLODData() {} - ~NiRangeLODData() {} - string GetBlockType() const { return "NiRangeLODData"; } - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - -private: - Vector3 _center; - vector<LODRange> ranges; -}; - -class NiScreenLODData : public AData { -public: - NiScreenLODData() {} - ~NiScreenLODData() {} - - string GetBlockType() const { return "NiScreenLODData"; } - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - private: - float unk_floats[8]; - vector<float> unk_float_list; -}; - - -/** - * NiFlipController - */ -class NiFlipController : public AController { -public: - NiFlipController(); - void Init() {} - ~NiFlipController() {} - string GetBlockType() const { return "NiFlipController"; } -}; - -/** - * NiFloatExtraDataController - */ -class NiFloatExtraDataController : public AController { -public: - NiFloatExtraDataController(); - void Init() {} - ~NiFloatExtraDataController() {} - string GetBlockType() const { return "NiFloatExtraDataController"; } -}; - -/** - * NiVisController - */ -class NiVisController : public AController { -public: - NiVisController(); - void Init() {} - ~NiVisController() {} - string GetBlockType() const { return "NiVisController"; } -}; - -/** - * NiMaterialColorController - */ -class NiMaterialColorController : public AController { -public: - NiMaterialColorController(); - void Init() {} - ~NiMaterialColorController() {} - string GetBlockType() const { return "NiMaterialColorController"; } -}; - -/** - * NiMultiTargetTransformController - */ -class NiMultiTargetTransformController : public AController { -public: - NiMultiTargetTransformController(); - void Init() {} - ~NiMultiTargetTransformController() {} - string GetBlockType() const { return "NiMultiTargetTransformController"; } -}; - -/** - * NiPSysEmitterCtlr - */ -class NiPSysEmitterCtlr : public AController { -public: - NiPSysEmitterCtlr(); - void Init() {} - ~NiPSysEmitterCtlr() {} - string GetBlockType() const { return "NiPSysEmitterCtlr"; } -}; - -/** - * NiPSysEmitterDeclinationVarCtlr - */ -class NiPSysEmitterDeclinationVarCtlr : public AController { -public: - NiPSysEmitterDeclinationVarCtlr(); - void Init() {} - ~NiPSysEmitterDeclinationVarCtlr() {} - string GetBlockType() const { return "NiPSysEmitterDeclinationVarCtlr"; } -}; - -/** - * NiPSysEmitterInitialRadiusCtlr - */ -class NiPSysEmitterInitialRadiusCtlr : public AController { -public: - NiPSysEmitterInitialRadiusCtlr(); - void Init() {} - ~NiPSysEmitterInitialRadiusCtlr() {} - string GetBlockType() const { return "NiPSysEmitterInitialRadiusCtlr"; } -}; - -/** - * NiPSysResetOnLoopCtlr - */ -class NiPSysResetOnLoopCtlr : public AController { -public: - NiPSysResetOnLoopCtlr(); - void Init() {} - ~NiPSysResetOnLoopCtlr() {} - string GetBlockType() const { return "NiPSysResetOnLoopCtlr"; } -}; - -/** - * NiPSysUpdateCtlr - */ -class NiPSysUpdateCtlr : public AController { -public: - NiPSysUpdateCtlr(); - void Init() {} - ~NiPSysUpdateCtlr() {} - string GetBlockType() const { return "NiPSysUpdateCtlr"; } -}; - -/** - * NiTextureTransformController - */ -class NiTextureTransformController : public AController { -public: - NiTextureTransformController(); - void Init() {} - ~NiTextureTransformController() {} - string GetBlockType() const { return "NiTextureTransformController"; } -}; - -/** - * NiTransformController - */ -class NiTransformController : public AController { -public: - NiTransformController(); - void Init() {} - ~NiTransformController() {} - string GetBlockType() const { return "NiTransformController"; } -}; - -/** - * NiUVController - */ -class NiUVController : public AController { -public: - NiUVController(); - void Init() {} - ~NiUVController() {} - string GetBlockType() const { return "NiUVController"; } -}; - -/** - * NiPathController - */ - -class NiPathController : public AController { -public: - NiPathController(); - void Init() {} - ~NiPathController() {} - string GetBlockType() const { return "NiPathController"; } -}; - -/** - * NiAmbientLight - Not found in any official NIF files - */ - -class NiAmbientLight : public ALight { -public: - NiAmbientLight(); - void Init() {} - ~NiAmbientLight() {} - string GetBlockType() const { return "NiAmbientLight"; } -}; - -/** - * NiDirectionalLight - Not found in any official NIF files - */ - -class NiDirectionalLight : public ALight { -public: - NiDirectionalLight(); - void Init() {} - ~NiDirectionalLight() {} - string GetBlockType() const { return "NiDirectionalLight"; } -}; - -/** - * NiPointLight - */ - -class NiPointLight : public APointLight { -public: - NiPointLight(); - void Init() {} - ~NiPointLight() {} - string GetBlockType() const { return "NiPointLight"; } -}; - -/** - * NiSpotLight - */ - -class NiSpotLight : public APointLight { -public: - NiSpotLight(); - void Init() {} - ~NiSpotLight() {} - string GetBlockType() const { return "NiSpotLight"; } -}; - -/** - * NiParticles - */ - -class NiParticles : public AParticleNode { -public: - NiParticles(); - void Init() {} - ~NiParticles() {} - string GetBlockType() const { return "NiParticles"; } -}; - -/** - * NiParticleSystem - */ - -class NiParticleSystem : public AParticleNode { -public: - NiParticleSystem(); - void Init() {} - ~NiParticleSystem() {} - string GetBlockType() const { return "NiParticleSystem"; } -}; - -/** - * NiAutoNormalParticles - */ - -class NiAutoNormalParticles : public AParticleNode { -public: - NiAutoNormalParticles(); - void Init() {} - ~NiAutoNormalParticles() {} - string GetBlockType() const { return "NiAutoNormalParticles"; } -}; - -/** - * NiMeshParticleSystem - */ - -class NiMeshParticleSystem : public AParticleNode { -public: - NiMeshParticleSystem(); - void Init() {} - ~NiMeshParticleSystem() {} - string GetBlockType() const { return "NiMeshParticleSystem"; } -}; - -/** - * NiRotatingParticles - */ - -class NiRotatingParticles : public AParticleNode { -public: - NiRotatingParticles(); - void Init() {} - ~NiRotatingParticles() {} - string GetBlockType() const { return "NiRotatingParticles"; } -}; - -/** - * NiTextureEffect - */ - -class NiTextureEffect : public ADynamicEffect { -public: - NiTextureEffect(); - void Init() {} - ~NiTextureEffect() {} - string GetBlockType() const { return "NiTextureEffect"; } -}; - -/** - * NiCamera - */ - -class NiCamera : public ANode { -public: - NiCamera(); - void Init() {} - ~NiCamera() {} - string GetBlockType() const { return "NiCamera"; } -}; - -/** - * NiParticleMeshes - */ - -class NiParticleMeshes : public AParticleNode { -public: - NiParticleMeshes(); - void Init() {} - ~NiParticleMeshes() {} - string GetBlockType() const { return "NiParticleMeshes"; } -}; - -/** - * NiGravity - */ - -class NiGravity : public AParticleModifier { -public: - NiGravity(); - void Init() {} - ~NiGravity() {} - string GetBlockType() const { return "NiGravity"; } -}; - -/** - * NiParticleBomb - */ - -class NiParticleBomb : public AParticleModifier { -public: - NiParticleBomb(); - void Init() {} - ~NiParticleBomb() {} - string GetBlockType() const { return "NiParticleBomb"; } -}; - -/** - * NiPlanarCollider - */ - -class NiPlanarCollider : public AParticleModifier { -public: - NiPlanarCollider(); - void Init() {} - ~NiPlanarCollider() {} - string GetBlockType() const { return "NiPlanarCollider"; } -}; - -/** - * NiSphericalCollider - */ - -class NiSphericalCollider : public AParticleModifier { -public: - NiSphericalCollider(); - void Init() {} - ~NiSphericalCollider() {} - string GetBlockType() const { return "NiSphericalCollider"; } -}; - -/** - * NiParticleGrowFade - */ - -class NiParticleGrowFade : public AParticleModifier { -public: - NiParticleGrowFade(); - void Init() {} - ~NiParticleGrowFade() {} - string GetBlockType() const { return "NiParticleGrowFade"; } -}; - -/** - * NiParticleMeshModifier - */ - -class NiParticleMeshModifier : public AParticleModifier { -public: - NiParticleMeshModifier(); - void Init() {} - ~NiParticleMeshModifier() {} - string GetBlockType() const { return "NiParticleMeshModifier"; } -}; - -/** - * NiParticleColorModifier - */ - -class NiParticleColorModifier : public AParticleModifier { -public: - NiParticleColorModifier(); - void Init() {} - ~NiParticleColorModifier() {} - string GetBlockType() const { return "NiParticleColorModifier"; } -}; - -/** - * NiGravity - */ - -class NiParticleRotation : public AParticleModifier { -public: - NiParticleRotation(); - void Init() {} - ~NiParticleRotation() {} - string GetBlockType() const { return "NiParticleRotation"; } -}; - -/** - * NiPSysPlanarCollider - */ - -class NiPSysPlanarCollider : public NiObject { -public: - NiPSysPlanarCollider(); - void Init() {} - ~NiPSysPlanarCollider() {} - string GetBlockType() const { return "NiPSysPlanarCollider"; } -}; - -/** - * NiPSysAgeDeathModifier - */ - -class NiPSysAgeDeathModifier : public APSysModifier { -public: - NiPSysAgeDeathModifier(); - void Init() {} - ~NiPSysAgeDeathModifier() {} - string GetBlockType() const { return "NiPSysAgeDeathModifier"; } -}; - -/** - * NiPSysBoundUpdateModifier - */ - -class NiPSysBoundUpdateModifier : public APSysModifier { -public: - NiPSysBoundUpdateModifier(); - void Init() {} - ~NiPSysBoundUpdateModifier() {} - string GetBlockType() const { return "NiPSysBoundUpdateModifier"; } -}; - -/** - * NiPSysBoxEmitter - */ - -class NiPSysBoxEmitter : public APSysVolumeEmitter { -public: - NiPSysBoxEmitter(); - void Init() {} - ~NiPSysBoxEmitter() {} - string GetBlockType() const { return "NiPSysBoxEmitter"; } -}; - -/** - * NiPSysColliderManager - */ - -class NiPSysColliderManager : public APSysModifier { -public: - NiPSysColliderManager(); - void Init() {} - ~NiPSysColliderManager() {} - string GetBlockType() const { return "NiPSysColliderManager"; } -}; - -/** - * NiPSysColorModifier - */ - -class NiPSysColorModifier : public APSysModifier { -public: - NiPSysColorModifier(); - void Init() {} - ~NiPSysColorModifier() {} - string GetBlockType() const { return "NiPSysColorModifier"; } -}; - -/** - * NiPSysCylinderEmitter - */ - -class NiPSysCylinderEmitter : public APSysVolumeEmitter { -public: - NiPSysCylinderEmitter(); - void Init() {} - ~NiPSysCylinderEmitter() {} - string GetBlockType() const { return "NiPSysCylinderEmitter"; } -}; - -/** - * NiPSysGravityModifier - */ - -class NiPSysGravityModifier : public APSysModifier { -public: - NiPSysGravityModifier(); - void Init() {} - ~NiPSysGravityModifier() {} - string GetBlockType() const { return "NiPSysGravityModifier"; } -}; - -/** - * NiPSysGrowFadeModifier - */ - -class NiPSysGrowFadeModifier : public APSysModifier { -public: - NiPSysGrowFadeModifier(); - void Init() {} - ~NiPSysGrowFadeModifier() {} - string GetBlockType() const { return "NiPSysGrowFadeModifier"; } -}; - -/** - * NiPSysMeshUpdateModifier - */ - -class NiPSysMeshUpdateModifier : public APSysModifier { -public: - NiPSysMeshUpdateModifier(); - void Init() {} - ~NiPSysMeshUpdateModifier() {} - string GetBlockType() const { return "NiPSysMeshUpdateModifier"; } -}; - -/** - * NiPSysPositionModifier - */ - -class NiPSysPositionModifier : public APSysModifier { -public: - NiPSysPositionModifier(); - void Init() {} - ~NiPSysPositionModifier() {} - string GetBlockType() const { return "NiPSysPositionModifier"; } -}; - -/** - * NiPSysRotationModifier - */ - -class NiPSysRotationModifier : public APSysModifier { -public: - NiPSysRotationModifier(); - void Init() {} - ~NiPSysRotationModifier() {} - string GetBlockType() const { return "NiPSysRotationModifier"; } -}; - -/** - * NiPSysSpawnModifier - */ - -class NiPSysSpawnModifier : public APSysModifier { -public: - NiPSysSpawnModifier(); - void Init() {} - ~NiPSysSpawnModifier() {} - string GetBlockType() const { return "NiPSysSpawnModifier"; } -}; - -/** - * NiPSysSphereEmitter - */ - -class NiPSysSphereEmitter : public APSysVolumeEmitter { -public: - NiPSysSphereEmitter(); - void Init() {} - ~NiPSysSphereEmitter() {} - string GetBlockType() const { return "NiPSysSphereEmitter"; } -}; - -/** - * NiPSysEmitterCtlrData - */ -class NiPSysEmitterCtlrData : public AData { -public: - NiPSysEmitterCtlrData() {} - ~NiPSysEmitterCtlrData() {} - - string GetBlockType() const { return "NiPSysEmitterCtlrData"; } - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; -private: - KeyType f_key_type; - vector< Key<float> > float_keys; - vector< Key<byte> > byte_keys; -}; - -/** - * AKeyframeData - - */ - -class AKeyframeData : public AData { - -public: - - AKeyframeData() {} - ~AKeyframeData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "AKeyframeData"; } - - //--Rotate--// - - /*! Retrieves the type of rotation interpolation being used. - * \return The rotation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetRotateType - */ - KeyType GetRotateType() const { return rotationType; } - - /*! Sets the type of rotation interpolation being used. Does not affect existing key data. - * \param t The new rotation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetRotateType - */ - void SetRotateType( KeyType t ) { rotationType = t; } - - /*! Retrieves the rotation key data. - * \return A vector containing Key<Quaternion> data which specify rotation over time. - * \sa IKeyframeData::SetRotateKeys, Key - */ - vector< Key<Quaternion> > GetRotateKeys() const { return rotKeys; } - - /*! Sets the rotation key data. - * \param keys A vector containing new Key<Quaternion> data which will replace any existing data. - * \sa IKeyframeData::GetRotateKeys, Key - */ - void SetRotateKeys( const vector< Key<Quaternion> > & keys ) { rotKeys = keys; } - - //--Translate--// - - /*! Retrieves the type of translation interpolation being used. - * \return The translation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetTranslateType - */ - KeyType GetTranslateType() const { return translationType; } - - /*! Sets the type of translation interpolation being used. Does not affect existing key data. - * \param t The new translation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetTranslateType - */ - void SetTranslateType( KeyType t ) { translationType = t; } - - /*! Retrieves the translation key data. - * \return A vector containing Key<Vector3> data which specify translation over time. - * \sa IKeyframeData::SetTranslateKeys, Key - */ - vector< Key<Vector3> > GetTranslateKeys() const { return transKeys; } - - /*! Sets the translation key data. - * \param keys A vector containing new Key<Vector3> data which will replace any existing data. - * \sa IKeyframeData::GetTranslateKeys, Key - */ - void SetTranslateKeys( vector< Key<Vector3> > const & keys ) { transKeys = keys; } - - //--Scale--// - - /*! Retrieves the type of scale interpolation being used. - * \return The scale key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetTranslateType - */ - KeyType GetScaleType() const { return scaleType; } - - /*! Sets the type of scale interpolation being used. Does not affect existing key data. - * \param t The new scale key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetScaleType - */ - void SetScaleType( KeyType t ) { scaleType = t; } - - /*! Retrieves the scale key data. - * \return A vector containing Key<float> data which specify scale over time. - * \sa IKeyframeData::SetScaleKeys, Key - */ - vector< Key<float> > GetScaleKeys() const { return scaleKeys; } - - /*! Sets the scale key data. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa IKeyframeData::GetScaleKeys, Key - */ - void SetScaleKeys( vector< Key<float> > const & keys ) { scaleKeys = keys; } - -private: - KeyType rotationType; - vector< Key<Quaternion> > rotKeys; - - KeyType translationType; - vector< Key<Vector3> > transKeys; - - KeyType scaleType; - vector< Key<float> > scaleKeys; - - KeyType xyzTypes[3]; - vector< Key<float> > xyzKeys[3]; -}; - -/** - * NiKeyframeData - */ - -class NiKeyframeData : public AKeyframeData { -public: - NiKeyframeData() {} - ~NiKeyframeData() {} - - string GetBlockType() const { return "NiKeyframeData"; } -}; - -/** - * NiTransformData - */ - -class NiTransformData : public AKeyframeData { -public: - NiTransformData() {} - ~NiTransformData() {} - - string GetBlockType() const { return "NiTransformData"; } -}; - -/** - * NiPalette object. Contains a color palette for internally stored paletized textures. - */ -class NiPalette : public AData { -public: - NiPalette() {} - void Init() {} - ~NiPalette() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiPalette"; } - - /*! Retrieves the palette data from this palette block. - * \return A vector containing the the colors stored in the palette. - * \sa IPalette::SetPalette - */ - vector<Color4> GetPalette() const; - - /*! Sets the palette data for this palette block. - * \param new_apl A vector containing the the new colors to be stored in the palette. - * \sa IPalette::GetPalette - */ - void SetPalette( const vector<Color4> & new_pal ); - -private: - byte unkByte; - uint numEntries; - byte palette[256][4]; -}; - -/** - * NiSkinPartition - */ - -class NiSkinPartition : public AData { -public: - NiSkinPartition() {} - void Init() {} - ~NiSkinPartition() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiSkinPartition"; } -private: - struct SkinPartition { - vector<ushort> bones; - vector<ushort> vertexMap; - vector< vector<float> > vertexWeights; - vector< vector<ushort> > strips; - vector<Triangle> triangles; - vector< vector<byte> > boneIndices; - }; - vector<SkinPartition> partitions; -}; - -/** - * NiStringPalette - */ - -class NiStringPalette : public AData { -public: - NiStringPalette() { - //AddAttr( attr_string, "Palette" ); - } - void Init() {} - ~NiStringPalette() {} - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiStringPalette"; } -}; - - -/** - * NiSkinInstance - */ - -//Non-Public interface to allow NiSkinData to get the bone list read by NiSkinInstance -class ISkinInstInternal { -public: - virtual vector<int> GetBoneList() const = 0; - virtual void ReadBoneList( istream& in ) = 0; -}; - -class NiSkinInstance : public AData { -public: - NiSkinInstance(){ - //AddAttr( attr_link, "Data" ); - //AddAttr( attr_link, "Skin Partition", VER_10_2_0_0 ); - //AddAttr( attr_skeletonroot, "Skeleton Root" ); - //AddAttr( attr_bones, "Bones" ); - } - ~NiSkinInstance() {} - string GetBlockType() const { return "NiSkinInstance"; } - - //ISkinInstInternal - - vector<int> GetBoneList() const { return bones; } - - void ReadBoneList( istream& in ) { - int len = ReadUInt( in ); - bones.resize( len ); - for (int i = 0; i < len; ++i ) { - bones[i] = ReadUInt( in ); - } - } -private: - vector<int> bones; -}; - -class NiSkinData : public AData { - -public: - - NiSkinData() { - //AddAttr( attr_link, "Skin Partition", 0, VER_10_1_0_0 ); - rotation = Matrix33::IDENTITY; - translation[0] = 0.0f; - translation[1] = 0.0f; - translation[2] = 0.0f; - scale = 1.0f; - unknownInt = -1; - unknownByte = 1; - } - ~NiSkinData(); - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiSkinData"; } - - //IBlockInternal - void FixLinks( const vector<blk_ref> & blocks ); // This version of the function will copy the bones from the parent Skin Instance block and fix the links at the same time. - void RemoveCrossLink( IBlock * block_to_remove ); - - //ISkinDataInternal - void RepositionTriShape( blk_ref & tri_shape ); - - /*! Used to retrieve a list of all the bones that influence this skin - * \return A vector containing references to all the node blocks which act as bone influences on this skin. - * \sa ISkinData::AddBone, ISkinData::RemoveBone, ISkinData::GetWeights - */ - vector<blk_ref> GetBones() const; - - /*! Used to retrieve the skin weights associated with a specific bone - * \param bone A blk_ref pointing to one of the node blocks which acts as a bone influence on this skin that's related weights are to be retrieved. - * \return A map of ints to floats. The integers are the vertex number and the floats are the percentage influence (between 0.0 and 1.0) that the specified bone has on that vertex. Not all vertices will be influenced by all bones. - * \sa ISkinData::GetBones, ISkinData::AddBone, ISkinData::RemoveBone - */ - map<int, float> GetWeights( const blk_ref & bone ) const; - - /*! Adds a new bone influence to this skin alone with all its weight information. If a bone that already influences the skin is specified, the weight data will be overwritten. - * \param bone A blk_ref pointing to a node blocks which is to be added as a bone influence on this skin. - * \param in A map of ints to floats. The integers are the vertex number and the floats are the percentage influence (between 0.0 and 1.0) that the specified bone has on that vertex. Not all vertices need to be influenced by all bones. - * \sa ISkinData::RemoveBone, ISkinData::GetBones, ISkinData::GetWeights - */ - void AddBone( const blk_ref & bone, map<int, float> const & in ); - - /*! Removes a bone influence and deletes associated vertex weight information. - * \param bone A blk_ref pointing to a node blocks which is to be removed as a bone influence on this skin. - * \sa ISkinData::AddBone, ISkinData::GetBones - */ - void RemoveBone( const blk_ref & bone ); - - void ReassignCrossRefs( const map<string,blk_ref> & name_map ); -private: - void SetBones( const vector<blk_ref> & bone_blocks ); - void StraightenSkeleton(); - struct Bone { - Matrix33 rotation; - fVector3 translation; - float scale; - fVector4 unknown4Floats; - map<int, float> weights; - }; - - INode * GetNodeParent() const; - void CalculateOverallOffset( Matrix33 & rot, fVector3 & tr, float & sc ) const; - void CalculateBoneOffset( const INode * const par_node, const IBlock * const bone_block, Bone & result ) const; - Matrix33 rotation; - fVector3 translation; - float scale; - int unknownInt; - byte unknownByte; - map<IBlock *, Bone > bone_map; - vector<Bone> bones; -}; - -//-- New Nodes--// - -class NiGeomMorpherController : public AController{ -public: - NiGeomMorpherController(); - void Init() {} - ~NiGeomMorpherController() {} - - string asString() const; - string GetBlockType() const { return "NiGeomMorpherController"; } -}; - -/*! Contain an array of bool keys. */ -class NiBoolData : public AData { -public: - NiBoolData() {} - ~NiBoolData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiBoolData"; }; - - /*! Retrieves the type of boolean interpolation being used. - * \return The boolean key type specifing the type of interpolation being used. - * \sa IBoolData::SetKeyType - */ - KeyType GetKeyType() const { return _type; } - - /*! Sets the type of boolean interpolation being used. Does not affect existing key data. - * \param t The new boolean key type specifing the type of interpolation to be used. - * \sa IBoolData::GetKeyType - */ - void SetKeyType( KeyType t ) { _type = t; } - - /*! Retrieves the boolean key data. - * \return A vector containing Key<unsigned char> data which specify boolean values over time. - * \sa IBoolData::SetKeys, Key - */ - vector< Key<unsigned char> > GetKeys() const { return _keys; } - - /*! Sets the boolean key data. - * \param keys A vector containing new Key<unsigned char> data which will replace any existing data. - * \sa IBoolData::GetKeys, Key - */ - void SetKeys( vector< Key<unsigned char> > const & keys ) { _keys = keys; } - -private: - KeyType _type; - vector< Key<byte> > _keys; -}; - -/*! Contains an array of color keys. */ -class NiColorData : public AData { -public: - NiColorData() {} - ~NiColorData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiColorData"; }; - - /*! Retrieves the type of color interpolation being used. - * \return The color key type specifing the type of interpolation being used. - * \sa IColorData::SetKeyType - */ - KeyType GetKeyType() const { return _type; } - - /*! Sets the type of color interpolation being used. Does not affect existing key data. - * \param t The new color key type specifing the type of interpolation to be used. - * \sa IColorData::GetKeyType - */ - void SetKeyType( KeyType t ) { _type = t; } - - /*! Retrieves the color key data. - * \return A vector containing Key<Color4> data which specify color over time. - * \sa IColorData::SetKeys, Key - */ - vector< Key<Color4> > GetKeys() const { return _keys; } - - /*! Sets the color key data. - * \param keys A vector containing new Key<Color4> data which will replace any existing data. - * \sa IColorData::GetKeys, Key - */ - void SetKeys( vector< Key<Color4> > const & keys ) { _keys = keys; } - -private: - KeyType _type; - vector<Key<Color4> > _keys; -}; - -/** - * NiControllerSequence - Root node in .kf files (version 10.0.1.0 and up). - */ -class NiControllerSequence : public AData { -public: - NiControllerSequence() { - //AddAttr( attr_string, "Name" ); - //AddAttr( attr_link, "String Palette", VER_10_2_0_0 ); - } - ~NiControllerSequence(); - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - - string GetBlockType() const { return "NiControllerSequence"; } - - void FixLinks( const vector<blk_ref> & blocks ); - list<blk_ref> GetLinks() const; - - /*! Sets the name and block reference to the NiTextKeyExtraData block which will be used by this controller sequence to specify the keyframe labels or "notes." - * \param new_name The name of the NiTextKeyExtraData block to use. - * \param new_link The block reference of the NiTextKeyExtraData block to use. - * \sa ITextKeyExtraData - */ - void SetTextKey( string new_name, blk_ref new_link ); - - /*! Sets the name, block reference, and controller type to use as a new child to this Kf root node. The controller type is unnecessary before version 10.2.0.0. From that version on, these children must be interpolators. Before that version they will be keyframe controllers. - * \param new_name The name to re-link this Kf file child to when it is merged with a Nif file. - * \param new_link The block reference of the new Kf file child. - * \param controller_type The original controller type that this Kf file child was connected to. Only applies to versions which use interpolators. - * \sa IControllerSequence::ClearKfChildren - */ - void AddKfChild( string new_name, blk_ref new_link, string controller_type); - - /*! Removes all Kf file children from this Kf file root block. - * \sa IControllerSequence::AddKfChild - */ - void ClearKfChildren(); -private: - string GetSubStr( const string & pal, short offset ) const; - - struct KfChild { - blk_ref block; - string name; - blk_ref unk_link; - short name_offset; - short property_offset; - short controller_offset; - short var1_offset; - short var2_offset; - short unk_short1, unk_short2, unk_short3, unk_short4, unk_short5; - KfChild() : block(), name(), unk_link(), - name_offset(-1), controller_offset(-1), property_offset(-1), var1_offset(-1), var2_offset(-1), - unk_short1(0), unk_short2(0), unk_short3(0), unk_short4(0), unk_short5(0) {}; - }; - string txt_key_name; - blk_ref txt_key_blk; - vector< KfChild > children; - - uint unk_int1, unk_int2; - float unk_float1, unk_float2, unk_4_floats[4]; - string unk_string; -}; - -/* Contains an array of float keys. */ -class NiFloatData : public AData { -public: - NiFloatData() {} - ~NiFloatData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiFloatData"; }; - - /*! Retrieves the type of float interpolation being used. - * \return The float key type specifing the type of interpolation being used. - * \sa IFloatData::SetKeyType - */ - KeyType GetKeyType() const { return _type; } - - /*! Sets the type of float interpolation being used. Does not affect existing key data. - * \param t The new float key type specifing the type of interpolation to be used. - * \sa IFloatData::GetKeyType - */ - void SetKeyType( KeyType t ) { _type = t; } - - /*! Retrieves the float key data. - * \return A vector containing Key<float> data which specify float values over time. - * \sa IFloatData::SetKeys, Key - */ - vector< Key<float> > GetKeys() const { return _keys; } - - /*! Sets the float key data. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa IFloatData::GetKeys, Key - */ - void SetKeys( vector< Key<float> > const & keys ) { _keys = keys; } - -private: - KeyType _type; - vector<Key<float> > _keys; -}; - -class NiStringsExtraData : public AExtraData { -public: - NiStringsExtraData() {} - ~NiStringsExtraData() {} - string GetBlockType() const { return "NiStringsExtraData"; }; - - void Read( istream& file, unsigned int version ) { - AExtraData::Read( file, version ); - uint count = ReadUInt( file ); - string_data.resize( count ); - NifStream( string_data, file ); - } - void Write( ostream& file, unsigned int version ) const { - AExtraData::Write( file, version ); - WriteUInt( uint(string_data.size()), file ); - NifStream( string_data, file ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Strings: " << uint(string_data.size()) << endl; - - for ( uint i = 0; i < string_data.size(); ++i ) { - out << " " << i << ": " << string_data[i] << endl; - } - - return out.str(); - } -private: - vector<string> string_data; -}; - -class NiStringExtraData : public AExtraData { -public: - NiStringExtraData() { - //AddAttr( attr_string, "String Data" ); - } - ~NiStringExtraData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiStringExtraData"; } -}; - -class NiBooleanExtraData : public AExtraData { -public: - NiBooleanExtraData() { - //AddAttr( attr_byte, "Boolean Data" ); - } - ~NiBooleanExtraData() {} - string GetBlockType() const { return "NiBooleanExtraData"; }; - - void Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - //GetAttr("Boolean Data")->Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - AExtraData::Write( out, version ); - //GetAttr("Boolean Data")->Write( out, version ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Boolean Data: " << GetAttr("Boolean Data")->asString() << endl; - - return out.str(); - } - -}; - -class NiBinaryExtraData : public AExtraData { -public: - NiBinaryExtraData() {} - ~NiBinaryExtraData() {} - string GetBlockType() const { return "NiBinaryExtraData"; }; - - void Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - - uint numBytes = ReadUInt( in ); - binData.resize( numBytes ); - NifStream( binData, in ); - - } - void Write( ostream& out, unsigned int version ) const { - AExtraData::Write( out, version ); - - WriteUInt( uint(binData.size()), out ); - NifStream( binData, out ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Binary Data (" << uint(binData.size()) << " bytes):" << endl; - - for ( uint i = 0; i < binData.size(); ++i ) { - out << " " << i << ": " << binData[i] << endl; - } - - return out.str(); - } -private: - vector<byte> binData; - -}; - -class NiVectorExtraData : public AExtraData { -public: - NiVectorExtraData() { - //AddAttr( attr_vector3, "Vector Data" ); - //AddAttr( attr_float, "Unknown Float" ); - } - ~NiVectorExtraData() {} - string GetBlockType() const { return "NiVectorExtraData"; }; - - void Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - //GetAttr("Vector Data")->Read( in, version ); - //GetAttr("Unknown Float")->Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - //GetAttr("Vector Data")->Write( out, version ); - //GetAttr("Unknown Float")->Write( out, version ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Vector Data: " << GetAttr("Vector Data")->asString() << endl - << "Unknown Float: " << GetAttr("Unknown Float")->asString() << endl; - - return out.str(); - } - -}; - -class NiColorExtraData : public AExtraData { -public: - NiColorExtraData() {} - ~NiColorExtraData() {} - string GetBlockType() const { return "NiColorExtraData"; }; - - void Read( istream& file, unsigned int version ) { - AExtraData::Read( file, version ); - NifStream( color, file ); - } - void Write( ostream& file, unsigned int version ) const { - AExtraData::Write( file, version ); - NifStream( color, file ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Color Data: (" << color.r << ", " << color.g << ", " << color.b << ", " << color.a << ")" << endl; - - return out.str(); - } -private: - Color4 color; -}; - -class NiFloatExtraData : public AExtraData { -public: - NiFloatExtraData() { - //AddAttr( attr_float, "Float Data" ); - } - ~NiFloatExtraData() {} - string GetBlockType() const { return "NiFloatExtraData"; }; - - void Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - //GetAttr("Float Data")->Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - AExtraData::Write( out, version ); - //GetAttr("Float Data")->Write( out, version ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Float Data: " << GetAttr("Float Data")->asString() << endl; - - return out.str(); - } - -}; - -class NiFloatsExtraData : public AExtraData { -public: - NiFloatsExtraData() {} - ~NiFloatsExtraData() {} - string GetBlockType() const { return "NiFloatsExtraData"; }; - - void Read( istream& file, unsigned int version ) { - AExtraData::Read( file, version ); - uint count = ReadUInt( file ); - float_data.resize( count ); - NifStream( float_data, file ); - } - void Write( ostream& file, unsigned int version ) const { - AExtraData::Write( file, version ); - WriteUInt( uint(float_data.size()), file ); - NifStream( float_data, file ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Floats: " << uint(float_data.size()) << endl; - - for ( uint i = 0; i < float_data.size(); ++i ) { - out << " " << i << ": " << float_data[i] << endl; - } - - return out.str(); - } -private: - vector<float> float_data; -}; - -class NiIntegersExtraData : public AExtraData { -public: - NiIntegersExtraData() {} - ~NiIntegersExtraData() {} - string GetBlockType() const { return "NiIntegersExtraData"; }; - - void Read( istream& file, unsigned int version ) { - AExtraData::Read( file, version ); - uint count = ReadUInt( file ); - int_data.resize( count ); - NifStream( int_data, file ); - } - void Write( ostream& file, unsigned int version ) const { - AExtraData::Write( file, version ); - WriteUInt( uint(int_data.size()), file ); - NifStream( int_data, file ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Ints: " << uint(int_data.size()) << endl; - - for ( uint i = 0; i < int_data.size(); ++i ) { - out << " " << i << ": " << int_data[i] << endl; - } - - return out.str(); - } -private: - vector<uint> int_data; -}; - -class NiIntegerExtraData : public AExtraData { -public: - NiIntegerExtraData() { - //AddAttr( attr_int, "Integer Data" ); - } - ~NiIntegerExtraData() {} - - string GetBlockType() const { return "NiIntegerExtraData"; }; - - void Read( istream& in, unsigned int version ) { - AExtraData::Read( in, version ); - //GetAttr("Integer Data")->Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - AExtraData::Write( out, version ); - //GetAttr("Integer Data")->Write( out, version ); - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << AExtraData::asString() - << "Integer Data: " << GetAttr("Integer Data")->asString() << endl; - - return out.str(); - } -}; - -/*! Contains morphing animation data. */ -class NiMorphData : public AData { -public: - NiMorphData() { - //AddAttr( attr_byte, "Unknown Byte" ); - } - ~NiMorphData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiMorphData"; }; - - /*! Retrieves the number of verticies used in the morph targets. This must be the same as the number of verticies in the base mesh that the morph controller for which this block stores data is attatched. This is not done automatically by Niflib. - * \return The number of vertices used in the morph target meshes. - * \sa IMorphData::SetVertexCount - */ - int GetVertexCount() const { return vertCount; } - - /*! Sets the number of verticies used in the morph targets. This must be the same as the number of verticies in the base mesh that the morph controller for which this block stores data is attatched. This is not done automatically by Niflib. If the new size is smaller, vertices at the ends of the morph targets will be lost. - * \param n The new size of the morph target's vertex arrays. - * \sa IMorphData::GetVertexCount - */ - void SetVertexCount( int n ); - - /*! Retrieves the number of morph targets used by this morph controller data. - * \return The number of morph targets used by this morph controller data. - * \sa IMorphData::SetMorphCount - */ - int GetMorphCount() const { return int(morphs.size()); } - - /*! Resizes the morph target array used by this morph controller data. If the new size is smaller, morph targets at the end of the array and all associated data will be lost. - * \param n The new size of the morph target array. - * \sa IMorphData::GetMorphCount - */ - void SetMorphCount( int n ) { morphs.resize( n ); } - - /*! Retrieves the type of morph interpolation being used by a specific morph target. - * \param n The index of the morph to get the interpolation key type from. A zero-based positive value which must be less than that returned by IMoprhData::GetMorphCount. - * \return The morph key type specifing the type of interpolation being used by the specified morph target. - * \sa IMorphData::SetMorphKeyType - */ - KeyType GetMorphKeyType( int n ) const { return morphs[n]._type; } - - /*! Sets the type of morph interpolation being used by a specific morph target. Does not affect existing key data. - * \param n The index of the morph to get the interpolation key type from. A zero-based positive value which must be less than that returned by IMoprhData::GetMorphCount. - * \param t The new morph key type specifing the type of interpolation to be used by the specified morph target. - * \sa IMorphData::GetMorphKeyType - */ - void SetMorphKeyType( int n, KeyType t ) { morphs[n]._type = t; } - - /*! Retrieves the morph key data for a specified morph target. - * \return A vector containing Key<float> data which specify the influence of this morph target over time. - * \sa IMorphData::SetMorphKeys, Key - */ - vector< Key<float> > GetMorphKeys( int n ) const { return morphs[n].keys; } - - /*! Sets the morph key data. - * \param keys A vector containing new Key<float> data which will replace any existing data for this morph target. - * \sa IMorphData::GetMorphKeys, Key - */ - void SetMorphKeys( int n, vector< Key<float> > const & keys ) { morphs[n].keys = keys; } - - /*! Retrieves the vertex data from the specified morph target - * \param n The index of the morph target to retrieve vertex data for. This is a zero-based index whoes value that must be less than that returned by IMorphData::GetMorphCount. - * \return A vector containing the vertices used by this morph target. The size will be equal to the value returned by IMorphData::GetVertexCount. - * \sa IMorphData::SetMorphVerts - */ - vector<Vector3> GetMorphVerts( int n) const { return morphs[n].morph; } - - /*! Sets the vertex data for a specified morph target - * \param n The index of the morph target to set vertex data for. This is a zero-based index whoes value that must be less than that returned by IMorphData::GetMorphCount. - * \param in A vector containing the new vertices to be used by this morph target. The size will be equal to the value returned by IMorphData::GetVertexCount. - * \sa IMorphData::SetMorphVerts - */ - void SetMorphVerts( int n, const vector<Vector3> & in ); - -private: - struct Morph { - Morph() : _type(QUADRATIC_KEY) {} - ~Morph() {} - KeyType _type; - vector< Key<float> > keys; - vector< Vector3 > morph; - }; - - uint vertCount; - vector<Morph> morphs; -}; - -/*! Contains an array of position keys. */ -class NiPosData : public AData { -public: - NiPosData() {} - ~NiPosData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiPosData"; } - - /*! Retrieves the type of position interpolation being used. - * \return The position key type specifing the type of interpolation being used. - * \sa IPosData::SetKeyType - */ - KeyType GetKeyType() const { return _type; } - - /*! Sets the type of position interpolation being used. Does not affect existing key data. - * \param t The new position key type specifing the type of interpolation to be used. - * \sa IPosData::GetKeyType - */ - void SetKeyType( KeyType t ) { _type = t; } - - /*! Retrieves the position key data. - * \return A vector containing Key<Vector3> data which specify position over time. - * \sa IPosData::SetKeys, Key - */ - vector< Key<Vector3> > GetKeys() const { return _keys; } - - /*! Sets the position key data. - * \param keys A vector containing new Key<Vector3> data which will replace any existing data. - * \sa IPosData::GetKeys, Key - */ - void SetKeys( vector< Key<Vector3> > const & keys ) { _keys = keys; } - -private: - KeyType _type; - vector<Key<Vector3> > _keys; -}; - -class NiRotatingParticlesData : public ARotatingParticlesData { -public: - NiRotatingParticlesData() {} - ~NiRotatingParticlesData() {} - - string GetBlockType() const { return "NiRotationparticlesData"; } -}; - -class NiParticlesData : public ARotatingParticlesData { -public: - NiParticlesData() {} - ~NiParticlesData() {} - - string GetBlockType() const { return "NiParticlesData"; } -}; - -/*! Holds a list of textual notes and at which time they take effect which are used for designating the start and stop of animations and the triggering of sounds. */ -class NiTextKeyExtraData : public AExtraData { -public: - NiTextKeyExtraData() { - //AddAttr( attr_int, "Unknown Int", 0, VER_4_2_2_0 ); - } - ~NiTextKeyExtraData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiTextKeyExtraData"; } - - //--ITextKeyExtraData Functions--// - - /*! Retrieves the text note key data. - * \return A vector containing Key<string> data which specify text note over time. - * \sa IKeyframeData::SetKeys, Key - */ - virtual vector< Key<string> > GetKeys() const { return _keys; } - - /*! Sets the text note key data. - * \param keys A vector containing new Key<string> data which will replace any existing data. - * \sa IKeyframeData::GetKeys, Key - */ - virtual void SetKeys( vector< Key<string> > const & keys ) { _keys = keys; } - -private: - vector< Key<string> > _keys; -}; - -class NiUVData : public AData { -public: - NiUVData() {} - ~NiUVData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiUVData"; } - -private: - struct UVGroup { - uint keyType; - vector<Key<float> > keys; - }; - UVGroup groups[4]; -}; - -class NiVertWeightsExtraData : public AExtraData{ -public: - NiVertWeightsExtraData() {} - ~NiVertWeightsExtraData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiVertWeightsExtraData"; } - -private: - uint bytes; - vector<float> weights; -}; - -class NiVisData : public AData { -public: - NiVisData() {} - ~NiVisData() {} - - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return "NiVisData"; } - -private: - vector<Key<byte> > keys; -}; - -class UnknownMixIn { -public: - UnknownMixIn( string block_type ){ - data = NULL; - _block_type = block_type; - } - ~UnknownMixIn() { if (data != NULL) delete [] data; } - void Read( istream& in, unsigned int version ); - void Write( ostream& out, unsigned int version ) const; - string asString() const; - string GetBlockType() const { return _block_type; } - -private: - string _block_type; - int len; - byte * data; -}; - -class UnknownBlock : public NiObject, public UnknownMixIn { -public: - UnknownBlock( string block_type ) : UnknownMixIn(block_type) {} - ~UnknownBlock() {} - void Read( istream& in, unsigned int version ) { - //cout << endl << "Unknown Block Type found: " << GetBlockType() << "\a" << endl; - NiObject::Read( in, version ); - UnknownMixIn::Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - NiObject::Write( out, version ); - UnknownMixIn::Write( out, version ); - } - void asString( ostream & out ) { - out << NiObject::asString(); - out << UnknownMixIn::asString(); - } - string GetBlockType() const { return UnknownMixIn::GetBlockType(); } -}; - -class UnknownControllerBlock : public AController, public UnknownMixIn { -public: - UnknownControllerBlock( string block_type ) : UnknownMixIn(block_type) {} - ~UnknownControllerBlock() {} - void Read( istream& in, unsigned int version ) { - NiObject::Read( in, version ); - UnknownMixIn::Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - NiObject::Write( out, version ); - UnknownMixIn::Write( out, version ); - } - string asString() { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << NiObject::asString(); - out << UnknownMixIn::asString(); - - return out.str(); - } - string GetBlockType() const { return UnknownMixIn::GetBlockType(); } -}; - -class UnknownPropertyBlock : public AProperty, public UnknownMixIn { -public: - UnknownPropertyBlock( string block_type ) : UnknownMixIn(block_type) {} - ~UnknownPropertyBlock() {} - void Read( istream& in, unsigned int version ) { - NiObject::Read( in, version ); - UnknownMixIn::Read( in, version ); - } - void Write( ostream& out, unsigned int version ) const { - NiObject::Write( out, version ); - UnknownMixIn::Write( out, version ); - } - string asString() { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << NiObject::asString(); - out << UnknownMixIn::asString(); - - return out.str(); - } - string GetBlockType() const { return UnknownMixIn::GetBlockType(); } -}; - -/** - * NiParticleSystemController - */ -class NiParticleSystemController : public AParticleSystemController { -public: - NiParticleSystemController(); - void Init() {} - ~NiParticleSystemController() {} - string GetBlockType() const { return "NiParticleSystemController"; } -}; - -/** - * NiBSPArrayController - */ -class NiBSPArrayController : public AParticleSystemController { -public: - NiBSPArrayController(); - void Init() {} - ~NiBSPArrayController() {} - string GetBlockType() const { return "NiBSPArrayController"; } -}; - -/** - * NiBoolInterpolator - */ -class NiBoolInterpolator : public AInterpolator { -public: - NiBoolInterpolator(); - void Init() {} - ~NiBoolInterpolator() {} - string GetBlockType() const { return "NiBoolInterpolator"; } -}; - -/** - * NiBSplineCompFloatInterpolator - */ -class NiBSplineCompFloatInterpolator : public AInterpolator { -public: - NiBSplineCompFloatInterpolator(); - void Init() {} - ~NiBSplineCompFloatInterpolator() {} - string GetBlockType() const { return "NiBSplineCompFloatInterpolator"; } -}; - -/** - * NiBSplineCompPoint3Interpolator - */ -class NiBSplineCompPoint3Interpolator : public AInterpolator { -public: - NiBSplineCompPoint3Interpolator(); - void Init() {} - ~NiBSplineCompPoint3Interpolator() {} - string GetBlockType() const { return "NiBSplineCompPoint3Interpolator"; } -}; - -/** - * NiBSplineCompTransformInterpolator - */ -class NiBSplineCompTransformInterpolator : public AInterpolator { -public: - NiBSplineCompTransformInterpolator(); - void Init() {} - ~NiBSplineCompTransformInterpolator() {} - string GetBlockType() const { return "NiBSplineCompTransformInterpolator"; } -}; - -/** - * NiFloatInterpolator - */ -class NiFloatInterpolator : public AInterpolator { -public: - NiFloatInterpolator(); - void Init() {} - ~NiFloatInterpolator() {} - string GetBlockType() const { return "NiFloatInterpolator"; } -}; - -/** - * NiLookAtInterpolator - */ -class NiLookAtInterpolator : public AInterpolator { -public: - NiLookAtInterpolator(); - // AddAttr( attr_short, "Unknown Short", 0, 0xFFFFFFFF ); - - // AddAttr( attr_link, "Unknown Link", 0, 0xFFFFFFFF ); - // Init(); - //} - - //void Read( istream& in, unsigned int version ); - //void Write( ostream& out, unsigned int version ) const; - //string asString() const; - - void Init() {} - ~NiLookAtInterpolator() {} - string GetBlockType() const { return "NiLookAtInterpolator"; } -private: - vector<float> unkFloats; - byte unkBytes[8]; - -}; - -/** - * NiPoint3Interpolator - */ -class NiPoint3Interpolator : public AInterpolator { -public: - NiPoint3Interpolator(); - void Init() {} - ~NiPoint3Interpolator() {} - string GetBlockType() const { return "NiPoint3Interpolator"; } -}; - -/** - * NiTransformInterpolator - */ -class NiTransformInterpolator : public AInterpolator { -public: - NiTransformInterpolator(); - void Init() {} - ~NiTransformInterpolator() {} - string GetBlockType() const { return "NiTransformInterpolator"; } -}; - -#endif diff --git a/NifExport/niflib/NIF_IO.cpp b/NifExport/niflib/NIF_IO.cpp deleted file mode 100755 index 9b03afa..0000000 --- a/NifExport/niflib/NIF_IO.cpp +++ /dev/null @@ -1,679 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NIF_IO.h" -namespace Niflib { - -int BlockSearch( istream& in ) { - - //Get current file pos - int data_start = in.tellg(); - - //cout << "Current File Pos: " << data_start << endl; - //cout << "Searching for next block..." << endl; - - //Find Next Block - char tmp1 = 0, tmp2 = 0; - uint next_name_len = 0; - while (!in.eof()) { - while (!in.eof() && !((tmp1 == 'N' && tmp2 == 'i') || (tmp1 == 'R' && tmp2 == 'o') || (tmp1 == 'A' && tmp2 == 'v')) ) { - tmp1 = tmp2; - in.read(&tmp2, 1); - } - if (in.eof()) - break; - - //Move back to before the uint that holds the length of the string - in.seekg(-6, ios_base::cur); - - //Read the length of the string - next_name_len = ReadUInt( in ); - - //cout << "Matching Data: " << tmp1 << tmp2 << endl; - - //if name length is > 40, then this is unlikley to be a real node. - if (next_name_len <= 40 && next_name_len >= 5) { - //Read the string - char* next_name = new char[next_name_len]; - in.read( next_name, next_name_len ); - - //cout << "Found Match: " << Str(next_name, next_name_len) << endl; - - //Move back to where we were before we read anything - in.seekg( -(int(next_name_len) - 2), ios_base::cur); - - break; - } - else { - //Move back to where we were before we read anything - in.seekg(2, ios_base::cur); - - tmp1 = tmp2 = 0; - //cout << "Found possible block at: " << int(in.tellg()) - 6 << endl; - } - } - - //Note length of data - int data_length = 0; - if (in.eof()) { - //cout << "Reached End of File. Assuming no more blocks to find." << endl; - in.clear(); - in.seekg(-8, ios_base::end); - data_length = int(in.tellg()) - data_start; - in.seekg(data_start, ios_base::beg); - } - else { - in.seekg(-6, ios_base::cur); - data_length = int(in.tellg()) - data_start; - in.seekg(data_start, ios_base::beg); - } - - //cout << "Unknown area (" << data_length << " bytes):" << endl; - - return data_length; -} - -/** - * Read utility functions - */ -int ReadInt( istream& in ){ - - int tmp; - in.read( (char*)&tmp, 4 ); - return tmp; -} - -uint ReadUInt( istream& in ){ - - uint tmp; - in.read( (char*)&tmp, 4 ); - return tmp; -} - -ushort ReadUShort( istream& in ){ - - ushort tmp; - in.read( (char*)&tmp, 2 ); - return tmp; -} - -short ReadShort( istream& in ){ - - short tmp; - in.read( (char*)&tmp, 2 ); - return tmp; -} - -byte ReadByte( istream& in ){ - - byte tmp; - in.read( (char*)&tmp, 1 ); - return tmp; -} -float ReadFloat( istream &in ){ - - float tmp; - in.read( reinterpret_cast<char*>(&tmp), sizeof(tmp) ); - return tmp; -} - -string ReadString( istream &in ) { - uint len = ReadUInt( in ); - string out; - if ( len > 10000 ) - throw runtime_error("String too long. Not a NIF file or unsupported format?"); - if ( len > 0 ) { - out.resize(len); - in.read( (char*)&out[0], len ); - } - return out; -} - -bool ReadBool( istream &in, unsigned int version ) { - if ( version <= 0x04010001 ) { - //Bools are stored as integers before version 4.1.0.1 - return (ReadUInt( in ) != 0); - } else { - //And as bytes from 4.1.0.1 on - return (ReadByte( in ) != 0); - } -} - -/** - * Write utility functions. - */ -void WriteInt( int val, ostream& out ){ - - out.write( (char*)&val, 4 ); -} - -void WriteUInt( uint val, ostream& out ){ - - out.write( (char*)&val, 4 ); -} - -void WriteUShort( ushort val, ostream& out ){ - - out.write( (char*)&val, 2 ); -} - -void WriteShort( short val, ostream& out ){ - - out.write( (char*)&val, 2 ); -} - -void WriteByte( byte val, ostream& out ){ - - out.write( (char*)&val, 1 ); -} - -void WriteFloat( float val, ostream& out ){ - out.write( reinterpret_cast<char*>(&val), sizeof(val) ); -} - -void WriteString( string const & val, ostream& out ) { - WriteUInt( uint(val.size()), out ); - out.write( val.c_str(), std::streamsize(val.size()) ); -} - -void WriteBool( bool val, ostream& out, unsigned int version ) { - if ( version < 0x04010001 ) { - //Bools are stored as integers before version 4.1.0.1 - if (val) - WriteUInt( 1, out ); - else - WriteUInt( 0, out ); - } else { - //And as bytes from 4.1.0.1 on - if (val) - WriteByte( 1, out ); - else - WriteByte( 0, out ); - } -} - -//-- NifStream And ostream Functions --// -// The NifStream functions allow each built-in type to be streamed to and from a file. -// The ostream functions are for writing out a debug string. - -//--Basic Types--// - -//int -void NifStream( int & val, istream& in, uint version ) { val = ReadInt( in ); }; -void NifStream( int const & val, ostream& out, uint version ) { WriteInt( val, out ); } - -//uint -void NifStream( uint & val, istream& in, uint version ) { val = ReadUInt( in ); }; -void NifStream( uint const & val, ostream& out, uint version ) { WriteUInt( val, out ); } - -//ushort -void NifStream( ushort & val, istream& in, uint version ) { val = ReadUShort( in ); }; -void NifStream( ushort const & val, ostream& out, uint version ) { WriteUShort( val, out ); } - -//short -void NifStream( short & val, istream& in, uint version ) { val = ReadShort( in ); }; -void NifStream( short const & val, ostream& out, uint version ) { WriteShort( val, out ); } - -//byte -void NifStream( byte & val, istream& in, uint version ) { val = ReadByte( in ); }; -void NifStream( byte const & val, ostream& out, uint version ) { WriteByte( val, out ); } - -//bool -void NifStream( bool & val, istream& in, uint version ) { val = ReadBool( in, version ); }; -void NifStream( bool const & val, ostream& out, uint version ) { WriteBool( val, out, version ); } - -//float -void NifStream( float & val, istream& in, uint version ) { val = ReadFloat( in ); }; -void NifStream( float const & val, ostream& out, uint version ) { WriteFloat( val, out ); } - -//string -void NifStream( string & val, istream& in, uint version ) { val = ReadString( in ); }; -void NifStream( string const & val, ostream& out, uint version ) { WriteString( val, out ); } - -//--Structs--// - -//HeaderString -void NifStream( HeaderString & val, istream& in, uint version ) { - char tmp[64]; - in.getline( tmp, 64 ); - val.header = tmp; - - // make sure this is a NIF file - if ( ( val.header.substr(0, 22) != "NetImmerse File Format" ) - && ( val.header.substr(0, 20) != "Gamebryo File Format" ) ) - throw runtime_error("Not a NIF file."); - - // detect old versions - if ( ( val.header == "NetImmerse File Format, Version 3.1" ) - || ( val.header == "NetImmerse File Format, Version 3.03" ) - || ( val.header == "NetImmerse File Format, Version 3.0" ) - || ( val.header == "NetImmerse File Format, Version 2.3" ) ) - throw runtime_error("Unsupported: " + val.header); -}; - -void NifStream( HeaderString const & val, ostream& out, uint version ) { - stringstream header_string; - if ( version <= VER_10_0_1_0 ) { - header_string << "NetImmerse File Format, Version "; - } else { - header_string << "Gamebryo File Format, Version "; - } - char * byte_ver = (char*)&version; - int int_ver[4] = { byte_ver[3], byte_ver[2], byte_ver[1], byte_ver[0] }; - - - header_string << int_ver[0] << "." << int_ver[1] << "." << int_ver[2] << "." << int_ver[3]; - - out << header_string.str() << "\n"; -}; - -ostream & operator<<( ostream & out, HeaderString const & val ) { - return out << val.header; -} - -//ShortString -void NifStream( ShortString & val, istream& in, uint version ) { - byte len = ReadByte( in ); - char * buffer = new char[len]; - in.read( buffer, len ); - val.str = buffer; - delete [] buffer; -}; - -void NifStream( ShortString const & val, ostream& out, uint version ) { - WriteByte( byte(val.str.size() + 1), out ); - out.write( val.str.c_str(), std::streamsize(val.str.size()) ); - WriteByte( 0, out ); -}; - -ostream & operator<<( ostream & out, ShortString const & val ) { - return out << val.str; -} - -//TexCoord -void NifStream( TexCoord & val, istream& in, uint version ) { - val.u = ReadFloat( in ); - val.v = ReadFloat( in ); -}; - -void NifStream( TexCoord const & val, ostream& out, uint version ) { - WriteFloat( val.u, out ); - WriteFloat( val.v, out ); -}; - -//Triangle -void NifStream( Triangle & val, istream& in, uint version ) { - val.v1 = ReadUShort( in ); - val.v2 = ReadUShort( in ); - val.v3 = ReadUShort( in ); -}; - -void NifStream( Triangle const & val, ostream& out, uint version ) { - WriteUShort( val.v1, out ); - WriteUShort( val.v2, out ); - WriteUShort( val.v3, out ); -}; - -//Vector3 -void NifStream( Vector3 & val, istream& in, uint version ) { - val.x = ReadFloat( in ); - val.y = ReadFloat( in ); - val.z = ReadFloat( in ); -}; - -void NifStream( Vector3 const & val, ostream& out, uint version ) { - WriteFloat( val.x, out ); - WriteFloat( val.y, out ); - WriteFloat( val.z, out ); -}; - -//Float2 -void NifStream( Float2 & val, istream& in, uint version ) { - val.data[0] = ReadFloat( in ); - val.data[1] = ReadFloat( in ); -}; - -void NifStream( Float2 const & val, ostream& out, uint version ) { - WriteFloat( val.data[0], out ); - WriteFloat( val.data[1], out ); -}; - -//Matrix22 -void NifStream( Matrix22 & val, istream& in, uint version ) { - for (int c = 0; c < 2; ++c) { - for (int r = 0; r < 2; ++r) { - val[r][c] = ReadFloat( in ); - } - } -} - -void NifStream( Matrix22 const & val, ostream& out, uint version ) { - for (int c = 0; c < 2; ++c) { - for (int r = 0; r < 2; ++r) { - WriteFloat( val[r][c], out ); - } - } -} - -//Float3 -void NifStream( Float3 & val, istream& in, uint version ) { - val.data[0] = ReadFloat( in ); - val.data[1] = ReadFloat( in ); - val.data[2] = ReadFloat( in ); -}; - -void NifStream( Float3 const & val, ostream& out, uint version ) { - WriteFloat( val.data[0], out ); - WriteFloat( val.data[1], out ); - WriteFloat( val.data[2], out ); -}; - -//Matrix33 -void NifStream( Matrix33 & val, istream& in, uint version ) { - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - val[r][c] = ReadFloat( in ); - } - } -} - -void NifStream( Matrix33 const & val, ostream& out, uint version ) { - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - WriteFloat( val[r][c], out ); - } - } -} - -//Float4 -void NifStream( Float4 & val, istream& in, uint version ) { - val.data[0] = ReadFloat( in ); - val.data[1] = ReadFloat( in ); - val.data[2] = ReadFloat( in ); - val.data[3] = ReadFloat( in ); -}; - -void NifStream( Float4 const & val, ostream& out, uint version ) { - WriteFloat( val.data[0], out ); - WriteFloat( val.data[1], out ); - WriteFloat( val.data[2], out ); - WriteFloat( val.data[4], out ); -}; - -//Matrix44 -void NifStream( Matrix44 & val, istream& in, uint version ) { - for (int c = 0; c < 4; ++c) { - for (int r = 0; r < 4; ++r) { - val[r][c] = ReadFloat( in ); - } - } -} - -void NifStream( Matrix44 const & val, ostream& out, uint version ) { - for (int c = 0; c < 4; ++c) { - for (int r = 0; r < 4; ++r) { - WriteFloat( val[r][c], out ); - } - } -} - -//Color3 -void NifStream( Color3 & val, istream& in, uint version ) { - val.r = ReadFloat( in ); - val.g = ReadFloat( in ); - val.b = ReadFloat( in ); -}; - -void NifStream( Color3 const & val, ostream& out, uint version ) { - WriteFloat( val.r, out ); - WriteFloat( val.g, out ); - WriteFloat( val.b, out ); -}; - -//Color4 -void NifStream( Color4 & val, istream& in, uint version ) { - val.r = ReadFloat( in ); - val.g = ReadFloat( in ); - val.b = ReadFloat( in ); - val.a = ReadFloat( in ); -}; - -void NifStream( Color4 const & val, ostream& out, uint version ) { - WriteFloat( val.r, out ); - WriteFloat( val.g, out ); - WriteFloat( val.b, out ); - WriteFloat( val.a, out ); -}; - -//Quaternion -void NifStream( Quaternion & val, istream& in, uint version ) { - val.w = ReadFloat( in ); - val.x = ReadFloat( in ); - val.y = ReadFloat( in ); - val.z = ReadFloat( in ); -}; - -void NifStream( Quaternion const & val, ostream& out, uint version ) { - WriteFloat( val.w, out ); - WriteFloat( val.x, out ); - WriteFloat( val.y, out ); - WriteFloat( val.z, out ); -}; - -//--Enums--// - -//TexType -void NifStream( TexType & val, istream& in, uint version ) { val = TexType(ReadUInt( in )); }; -void NifStream( TexType const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, TexType const & val ) { - switch ( val ) { - case BASE_MAP: return out << "BASE_MAP"; - case DARK_MAP: return out << "DARK_MAP"; - case DETAIL_MAP: return out << "DETAIL_MAP"; - case GLOSS_MAP: return out << "GLOSS_MAP"; - case GLOW_MAP: return out << "GLOW_MAP"; - case BUMP_MAP: return out << "BUMP_MAP"; - case DECAL_0_MAP: return out << "DECAL_0_MAP"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//ApplyMode -void NifStream( ApplyMode & val, istream& in, uint version ) { val = ApplyMode(ReadUInt( in )); }; -void NifStream( ApplyMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, ApplyMode const & val ) { - switch ( val ) { - case APPLY_REPLACE: return out << "APPLY_REPLACE"; - case APPLY_DECAL: return out << "APPLY_DECAL"; - case APPLY_MODULATE: return out << "APPLY_MODULATE"; - case APPLY_HILIGHT: return out << "APPLY_HILIGHT"; - case APPLY_HILIGHT2: return out << "APPLY_HILIGHT2"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//TexClampMode -void NifStream( TexClampMode & val, istream& in, uint version ) { val = TexClampMode(ReadUInt( in )); }; -void NifStream( TexClampMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, TexClampMode const & val ) { - switch ( val ) { - case CLAMP_S_CLAMP_T: return out << "CLAMP_S_CLAMP_T"; - case CLAMP_S_WRAP_T: return out << "CLAMP_S_WRAP_T"; - case WRAP_S_CLAMP_T: return out << "WRAP_S_CLAMP_T"; - case WRAP_S_WRAP_T: return out << "WRAP_S_WRAP_T"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//TexFilterMode -void NifStream( TexFilterMode & val, istream& in, uint version ) { val = TexFilterMode(ReadUInt( in )); }; -void NifStream( TexFilterMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, TexFilterMode const & val ) { - switch ( val ) { - case FILTER_NEAREST: return out << "FILTER_NEAREST"; - case FILTER_BILERP: return out << "FILTER_BILERP"; - case FILTER_TRILERP: return out << "FILTER_TRILERP"; - case FILTER_NEAREST_MIPNEAREST: return out << "FILTER_NEAREST_MIPNEAREST"; - case FILTER_NEAREST_MIPLERP: return out << "FILTER_NEAREST_MIPLERP"; - case FILTER_BILERP_MIPNEAREST: return out << "FILTER_BILERP_MIPNEAREST"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//AlphaFormat -void NifStream( AlphaFormat & val, istream& in, uint version ) { val = AlphaFormat(ReadUInt( in )); }; -void NifStream( AlphaFormat const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, AlphaFormat const & val ) { - switch ( val ) { - case ALPHA_NONE: return out << "ALPHA_NONE"; - case ALPHA_BINARY: return out << "ALPHA_BINARY"; - case ALPHA_SMOOTH: return out << "ALPHA_SMOOTH"; - case ALPHA_DEFAULT: return out << "ALPHA_DEFAULT"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//KeyType -void NifStream( KeyType & val, istream& in, uint version ) { val = KeyType(ReadUInt( in )); }; -void NifStream( KeyType const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, KeyType const & val ) { - switch ( val ) { - case LINEAR_KEY: return out << "LINEAR_KEY"; - case QUADRATIC_KEY: return out << "QUADRATIC_KEY"; - case TBC_KEY: return out << "TBC_KEY"; - case XYZ_ROTATION_KEY: return out << "XYZ_ROTATION_KEY"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//PixelFormat -void NifStream( PixelFormat & val, istream& in, uint version ) { val = PixelFormat(ReadUInt( in )); }; -void NifStream( PixelFormat const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, PixelFormat const & val ) { - switch ( val ) { - case PX_FMT_RGB8: return out << "PX_FMT_RGB8"; - case PX_FMT_RGBA8: return out << "PX_FMT_RGBA8"; - case PX_FMT_PAL8: return out << "PX_FMT_PAL8"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//MipMapFormat -void NifStream( MipMapFormat & val, istream& in, uint version ) { val = MipMapFormat(ReadUInt( in )); }; -void NifStream( MipMapFormat const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, MipMapFormat const & val ) { - switch ( val ) { - case MIP_FMT_NO: return out << "MIP_FMT_NO"; - case MIP_FMT_YES: return out << "MIP_FMT_YES"; - case MIP_FMT_DEFAULT: return out << "MIP_FMT_DEFAULT"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//PixelLayout -void NifStream( PixelLayout & val, istream& in, uint version ) { val = PixelLayout(ReadUInt( in )); }; -void NifStream( PixelLayout const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, PixelLayout const & val ) { - switch ( val ) { - case PIX_LAY_PALETTISED: return out << "PIX_LAY_PALETTISED"; - case PIX_LAY_HIGH_COLOR_16: return out << "PIX_LAY_HIGH_COLOR_16"; - case PIX_LAY_TRUE_COLOR_32: return out << "PIX_LAY_TRUE_COLOR_32"; - case PIX_LAY_COMPRESSED: return out << "PIX_LAY_COMPRESSED"; - case PIX_LAY_BUMPMAP: return out << "PIX_LAY_BUMPMAP"; - case PIX_LAY_DEFAULT: return out << "PIX_LAY_DEFAULT"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//VertMode -void NifStream( VertMode & val, istream& in, uint version ) { val = VertMode(ReadUInt( in )); }; -void NifStream( VertMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, VertMode const & val ) { - switch ( val ) { - case VERT_MODE_SRC_IGNORE: return out << "VERT_MODE_SRC_IGNORE"; - case VERT_MODE_SRC_EMISSIVE: return out << "VERT_MODE_SRC_EMISSIVE"; - case VERT_MODE_SRC_AMB_DIF: return out << "VERT_MODE_SRC_AMB_DIF"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//LightMode -void NifStream( LightMode & val, istream& in, uint version ) { val = LightMode(ReadUInt( in )); }; -void NifStream( LightMode const & val, ostream& out, uint version ) { WriteUInt( val, out ); } -ostream & operator<<( ostream & out, LightMode const & val ) { - switch ( val ) { - case LIGHT_MODE_EMISSIVE: return out << "LIGHT_MODE_EMISSIVE"; - case LIGHT_MODE_EMI_AMB_DIF: return out << "LIGHT_MODE_EMI_AMB_DIF"; - default: return out << "Invalid Value! - " << uint(val); - }; -} - -//The HexString function creates a formatted hex display of the given data for use in printing -//a debug string for information that is not understood -string HexString( const byte * src, uint len ) { - stringstream out; - - //Display Data in Hex form - out << hex << setfill('0'); - - for ( uint i = 0; i < len; ++i ) { - out << uppercase << setw(2) << uint(src[i]); - if (i % 16 == 15 || i == len - 1) - out << endl; - else if (i % 16 == 7) - out << " "; - else if (i % 8 == 3) - out << " "; - else - out << " "; - } - - return out.str(); - -} - -//Byte -ostream & operator<<( ostream & out, byte const & val ) { - return out << uint(val); -} - -void NifStream( Key<Quaternion> & key, istream& file, uint version, KeyType type ) { - key.time = ReadFloat( file ); - - //If key type is not 1, 2, or 3, throw an exception - if ( type < 1 || type > 3 ) { - type = LINEAR_KEY; - //throw runtime_error("Invalid key type."); - } - - //Read data based on the type of key - NifStream( key.data, file ); - if ( type == TBC_KEY ) { - //Uses TBC interpolation - key.tension = ReadFloat( file ); - key.bias = ReadFloat( file ); - key.continuity = ReadFloat( file ); - } -} - - -void NifStream( Key<Quaternion> const & key, ostream& file, uint version, KeyType type ) { - WriteFloat( key.time, file ); - - //If key type is not 1, 2, or 3, throw an exception - if ( type < 1 || type > 3 ) { - type = LINEAR_KEY; - //throw runtime_error("Invalid key type."); - } - - //Read data based on the type of key - NifStream( key.data, file ); - if ( type == TBC_KEY ) { - //Uses TBC interpolation - WriteFloat( key.tension, file); - WriteFloat( key.bias, file); - WriteFloat( key.continuity, file); - } -} - -} diff --git a/NifExport/niflib/NIF_IO.h b/NifExport/niflib/NIF_IO.h deleted file mode 100755 index 6b2c2f1..0000000 --- a/NifExport/niflib/NIF_IO.h +++ /dev/null @@ -1,577 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIF_IO_H -#define _NIF_IO_H - -/* INCLUDES */ -#include <iostream> -#include <iomanip> -#include <string> -#include <sstream> -#include <vector> -#include "nif_math.h" -#include "nif_versions.h" -namespace Niflib { -using namespace std; - -#ifndef NULL -#define NULL 0 -#endif - -//--Non-mathematical Basic Types--// - -typedef unsigned char byte; -typedef unsigned short ushort; -typedef unsigned int uint; - -/*! Stores an animation key and the time in the animation that it takes affect. It is a template class so it can hold any kind of data as different blocks key different sorts of information to the animation timeline.*/ -template <class T> -struct Key { - float time; /*!< The time on the animation timeline that this keyframe takes affect. */ - T data; /*!< The data being keyed to the timeline. */ - T forward_tangent; /*!< A piece of data of the same type as is being keyed to the time line used as the forward tangent in quadratic interpolation. Ignored if key type is set as something else. */ - T backward_tangent; /*!< A piece of data of the same type as is being keyed to the time line used as the backward tangent in quadratic interpolation. Ignored if key type is set as something else. */ - float tension; /*!< The amount of tension to use in tension, bias, continuity interpolation. Ignored if key type is something else.*/ - float bias; /*!< The amount of bias to use in tension, bias, continuity interpolation. Ignored if key type is something else.*/ - float continuity; /*!< The amount of continuity to use in tension, bias, continuity interpolation. Ignored if key type is something else.*/ -}; - - -//! NVector Traits: Class overridable alloc/release methods -template<typename T> -class array_Traits -{ -public: - //! Default Initialization method - //! @param[in] v Vector of types to initialize - //! @param[in] length Length in bytes of memory to allocate - static void Initialize( T* v, int length ) { - memset(v, 0, sizeof(v[0]) * length); - } - //! Default Finalization method - //! @param[in] v Vector of types to initialize - //! @param[in] length Length in bytes of memory to allocate - static void Finalize( T* v, int length ) { - memset(v, 0, sizeof(v[0]) * length); - } - //! Default Initialization method - //! @param[in] s Vector of types to copy from - //! @param[in/out] d Vector of types to copy to - //! @param[in] length Length in bytes of memory to allocate - static void Copy(T const* s, T* d, int length ) { - for (int i=0; i<length; ++i) - d[i] = s[i]; - } -}; - -//! A fixed length vector of type T. -//! Data is allocated into a vector portion and the data section. -//! The vector simply points to appropriate places in the data section. -//! @param T Type of Vector -template<typename T, size_t len_> -class array -{ - typedef typename T * RawData; - typedef typename T const* ConstRawData; -public: - //! Default Constructor: Allocates empty vector - array() { - array_Traits<T>::Initialize(v_, len_); - } - - //! Copy Constructor - array(const array& other) { - array_Traits<T>::Copy(other.v_, v_, len_); - } - - //! Copy Constructor - array(const RawData& other) { - array_Traits<T>::Copy(other, v_, len_); - } - - //! Copy Constructor - array(RawData& other) { - array_Traits<T>::Copy(other, v_, len_); - } - - //! Default Destructor - ~array() { - array_Traits<T>::Finalize(v_, len_); - } - -//These operators cause SWIG warnings -#ifndef SWIG - //! Copy Assignment - array& operator=(const array& other) { - array tmp( other ); - swap( tmp ); - return *this; - } - - //! Copy Assignment - array& operator=(const ConstRawData& other) { - array tmp( other ); - swap( tmp ); - return *this; - } - - T& operator[](int index) { - // assert( index >= 0 && index < len_ ) - return v_[index]; - } - - const T& operator[](int index) const { - // assert( index >= 0 && index < len_ ) - return v_[index]; - } - - T& operator[](uint index) { - // assert( index >= 0 && index < len_ ) - return v_[index]; - } - - const T& operator[](uint index) const { - // assert( index >= 0 && index < len_ ) - return v_[index]; - } - -#endif - operator T*() const { - return v_; - } - - //! Number of items in the vector. - size_t size() const { return len_; } - size_t count() const { return len_; } - - T* begin() { - return v_; - } - - T* end() { - return v_ + len_; - } - - const T* begin() const { - return v_; - } - - const T* end() const { - return v_ + len_; - } - - //! Assign an element to vector at specified index - //! @param[in] index Index in array to assign - //! @param[in] value Value to copy into string - void assign(int index, T value) { - v_[index] = value; - } - - //! Reset vector back to zero size - void clear() { - array_Traits<T>::Finalize(v_, len_); - } - - //! Swap contents with another array - //! @param[in,out] other Other vector to swap with - void swap( array &other ) { - array tmp(other); - array_Traits<T>::Copy(v_, other.v_, len_); - array_Traits<T>::Copy(tmp.v_, v_, len_); - } - -private: - T v_[len_]; //! Vector data -}; - -struct HeaderString { - string header; -}; - -struct ShortString { - string str; -}; - -//TODO: This is temporary to make it compile. Should eventually be adjusted to display 1's and 0's insted of as an int. -typedef ushort Flags; - -/*! Lists the basic texture types availiable from the ITexturingProperty interface*/ -enum TexType { - BASE_MAP = 0, /*!< The basic texture used by most meshes. */ - DARK_MAP = 1, /*!< Used to darken the model with false lighting. */ - DETAIL_MAP = 2, /*!< Combined with base map for added detail. */ - GLOSS_MAP = 3, /*!< Allows the glossyness of an object to differ across its surface. */ - GLOW_MAP = 4, /*!< Creates a glowing effect. */ - BUMP_MAP = 5, /*!< Used to make the object appear to have more detail than it really does. */ - DECAL_0_MAP = 6, /*!< For placing images on the object like stickers. */ - DECAL_1_MAP = 7 /*!< For placing images on the object like stickers. */ -}; - -/*! Specifies the availiable texture apply modes. Affects the way colors are composed together. */ -enum ApplyMode { - APPLY_REPLACE = 0, /*!< Replaces existing color */ - APPLY_DECAL = 1, /*!< For placing images on the object like stickers. */ - APPLY_MODULATE = 2, /*!< Modulates existing color. */ - APPLY_HILIGHT = 3, /*!< PS2 Only */ - APPLY_HILIGHT2 = 4 /*!< PS2 Only */ -}; - -/*! Specifies the availiable texture clamp modes. That is, the behavior of pixels outside the range of the texture.*/ -enum TexClampMode { - CLAMP_S_CLAMP_T = 0, /*!< Clamp in both directions. */ - CLAMP_S_WRAP_T = 1, /*!< Clamp in the S direction but wrap in the T direction. */ - WRAP_S_CLAMP_T = 2, /*!< Wrap in the S direction but clamp in the T direction. */ - WRAP_S_WRAP_T = 3 /*!< Wrap in both directions. */ -}; - -/*! Specifies the availiable texture filter modes. That is, the way pixels within a texture are blended together when textures are displayed on the screen at a size other than their original dimentions.*/ -enum TexFilterMode { - FILTER_NEAREST = 0, /*!< Simply uses the nearest pixel. Very grainy. */ - FILTER_BILERP = 1, /*!< Uses bilinear filtering. */ - FILTER_TRILERP = 2, /*!< Uses trilinear filtering. */ - FILTER_NEAREST_MIPNEAREST = 3, /*!< Uses the nearest pixel from the mipmap that is closest to the display size. */ - FILTER_NEAREST_MIPLERP = 4, /*!< Blends the two mipmaps closest to the display size linearly, and then uses the nearest pixel from the result. */ - FILTER_BILERP_MIPNEAREST = 5, /*!< Uses the closest mipmap to the display size and then uses bilinear filtering on the pixels. */ -}; - -/*! Specifies the availiable alpha formats. That is, the type of alpha blending (transparency) that will be used on a particular texture.*/ -enum AlphaFormat { - ALPHA_NONE = 0, /*!< No alpha blending, the texture is fully opaque */ - ALPHA_BINARY = 1, /*!< Texture is either fully transparent or fully opaque. There are no partially transparent areas. */ - ALPHA_SMOOTH = 2, /*!< Full range of alpha values can be used from fully transparent to fully opaque including all partially transparent values in between. */ - ALPHA_DEFAULT = 3 /*!< Use default setting. */ -}; - -/*! - * This enum contains all the animation key types used by Niflib. - */ -enum KeyType { - LINEAR_KEY = 1, /*!< Use linear interpolation. */ - QUADRATIC_KEY = 2, /*!< Use quadratic interpolation. Forward and back tangents will be stored.*/ - TBC_KEY = 3, /*!< Use Tension Bias Continuity interpolation. Tension, bias, and continuity will be stored.*/ - XYZ_ROTATION_KEY = 4 /*!< For use only with rotation data. Separate X, Y, and Z keys will be stored instead of using quaternions. */ -}; - -/*! - * Specifies the pixel format used by the NiPixelData block to store a texture. - */ -enum PixelFormat { - PX_FMT_RGB8 = 0, /*!< 24-bit color: uses 8 bit to store each red, blue, and green component. */ - PX_FMT_RGBA8 = 1, /*!< 32-bit color with alpha: uses 8 bits to store each red, blue, green, and alpha component. */ - PX_FMT_PAL8 = 2 /*!< 8-bit palette index: uses 8 bits to store an index into the palette stored in a NiPallete block. */ -}; - -/*! - * Specifies the mip map format of a texture. - */ -enum MipMapFormat { - MIP_FMT_NO = 0, /*!< Texture does not use mip maps. */ - MIP_FMT_YES = 1,/*!< Texture uses mip maps. */ - MIP_FMT_DEFAULT = 2, /*!< Use default setting. */ -}; - -/*! - * Specifies the pixel layout of a texture. That is, the format of the image data. - */ -enum PixelLayout { - PIX_LAY_PALETTISED = 0, /*!< Texture is in 8-bit paletized format. */ - PIX_LAY_HIGH_COLOR_16 = 1, /*!< Texture is in 16-bit high color format. */ - PIX_LAY_TRUE_COLOR_32 = 2, /*!< Texture is in 32-bit true color format. */ - PIX_LAY_COMPRESSED = 3, /*!< Texture is compressed. */ - PIX_LAY_BUMPMAP = 4, /*!< Texture is a grayscale bump map. */ - PIX_LAY_DEFAULT = 5 /*!< Use default setting. */ -}; - -/*! - * Specifies what type of light is active on the shape. - */ -enum VertMode { - VERT_MODE_SRC_IGNORE = 0, /*!< Source Ignore. */ - VERT_MODE_SRC_EMISSIVE = 1, /*!< Source Emissive. */ - VERT_MODE_SRC_AMB_DIF = 2, /*!< Source Ambient/Diffuse. */ -}; - -/*! - * Specifies the light mode. - */ -enum LightMode { - LIGHT_MODE_EMISSIVE = 0, /*!< Emissive. */ - LIGHT_MODE_EMI_AMB_DIF = 1, /*!< Emissive + Ambient + Diffuse. */ -}; - -//--IO Functions--// - -int BlockSearch( istream& in ); - -/** - * Read utility functions - */ -int ReadInt( istream& in ); -uint ReadUInt( istream& in ); -ushort ReadUShort( istream& in ); -short ReadShort( istream& in ); -byte ReadByte( istream& in ); -float ReadFloat( istream &in ); -string ReadString( istream &in ); -bool ReadBool( istream &in, unsigned int version ); - -/** - * Write utility functions. - */ -void WriteInt( int val, ostream& out ); -void WriteUInt( uint val, ostream& out ); -void WriteUShort( ushort val, ostream& out ); -void WriteShort( short val, ostream& out ); -void WriteByte( byte val, ostream& out ); -void WriteFloat( float val, ostream& out ); -void WriteString( string const & val, ostream& out ); -void WriteBool( bool val, ostream& out, unsigned int version ); - -//-- NifStream And ostream Functions --// -// The NifStream functions allow each built-in type to be streamed to and from a file. -// The ostream functions are for writing out a debug string. - -//--Basic Types--// - -//int -void NifStream( int & val, istream& in, uint version = 0 ); -void NifStream( int const & val, ostream& out, uint version = 0 ); - -//uint -void NifStream( uint & val, istream& in, uint version = 0 ); -void NifStream( uint const & val, ostream& out, uint version = 0 ); - -//ushort -void NifStream( ushort & val, istream& in, uint version = 0 ); -void NifStream( ushort const & val, ostream& out, uint version = 0 ); - -//short -void NifStream( short & val, istream& in, uint version = 0 ); -void NifStream( short const & val, ostream& out, uint version = 0 ); - -//byte -void NifStream( byte & val, istream& in, uint version = 0 ); -void NifStream( byte const & val, ostream& out, uint version = 0 ); - -//bool -void NifStream( bool & val, istream& in, uint version ); // version is significant -void NifStream( bool const & val, ostream& out, uint version ); // version is significant - -//float -void NifStream( float & val, istream& in, uint version = 0 ); -void NifStream( float const & val, ostream& out, uint version = 0 ); - -//string -void NifStream( string & val, istream& in, uint version = 0 ); -void NifStream( string const & val, ostream& out, uint version = 0 ); - -//--Structs--// - -//TexCoord -void NifStream( TexCoord & val, istream& in, uint version = 0 ); -void NifStream( TexCoord const & val, ostream& out, uint version = 0 ); - -//Triangle -void NifStream( Triangle & val, istream& in, uint version = 0 ); -void NifStream( Triangle const & val, ostream& out, uint version = 0 ); - -//Vector3 -void NifStream( Vector3 & val, istream& in, uint version = 0 ); -void NifStream( Vector3 const & val, ostream& out, uint version = 0 ); - -//Float2 -void NifStream( Float2 & val, istream& in, uint version = 0 ); -void NifStream( Float2 const & val, ostream& out, uint version = 0 ); - -//Matrix22 -void NifStream( Matrix22 & val, istream& in, uint version = 0 ); -void NifStream( Matrix22 const & val, ostream& out, uint version = 0 ); - -//Float3 -void NifStream( Float3 & val, istream& in, uint version = 0 ); -void NifStream( Float3 const & val, ostream& out, uint version = 0 ); - -//Matrix33 -void NifStream( Matrix33 & val, istream& in, uint version = 0 ); -void NifStream( Matrix33 const & val, ostream& out, uint version = 0 ); - -//Float4 -void NifStream( Float4 & val, istream& in, uint version = 0 ); -void NifStream( Float4 const & val, ostream& out, uint version = 0 ); - -//Matrix44 -void NifStream( Matrix44 & val, istream& in, uint version = 0 ); -void NifStream( Matrix44 const & val, ostream& out, uint version = 0 ); - -//Color3 -void NifStream( Color3 & val, istream& in, uint version = 0 ); -void NifStream( Color3 const & val, ostream& out, uint version = 0 ); - -//Color4 -void NifStream( Color4 & val, istream& in, uint version = 0 ); -void NifStream( Color4 const & val, ostream& out, uint version = 0 ); - -//Quaternion -void NifStream( Quaternion & val, istream& in, uint version = 0 ); -void NifStream( Quaternion const & val, ostream& out, uint version = 0 ); - -//--Enums--// - -//TexType -void NifStream( TexType & val, istream& in, uint version = 0 ); -void NifStream( TexType const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, TexType const & val ); - -//ApplyMode -void NifStream( ApplyMode & val, istream& in, uint version = 0 ); -void NifStream( ApplyMode const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, ApplyMode const & val ); - -//TexClampMode -void NifStream( TexClampMode & val, istream& in, uint version = 0 ); -void NifStream( TexClampMode const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, TexClampMode const & val ); - -//TexFilterMode -void NifStream( TexFilterMode & val, istream& in, uint version = 0 ); -void NifStream( TexFilterMode const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, TexFilterMode const & val ); - -//AlphaFormat -void NifStream( AlphaFormat & val, istream& in, uint version = 0 ); -void NifStream( AlphaFormat const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, AlphaFormat const & val ); - -//KeyType -void NifStream( KeyType & val, istream& in, uint version = 0 ); -void NifStream( KeyType const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, KeyType const & val ); - -//PixelFormat -void NifStream( PixelFormat & val, istream& in, uint version = 0 ); -void NifStream( PixelFormat const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, PixelFormat const & val ); - -//MipMapFormat -void NifStream( MipMapFormat & val, istream& in, uint version = 0 ); -void NifStream( MipMapFormat const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, MipMapFormat const & val ); - -//PixelLayout -void NifStream( PixelLayout & val, istream& in, uint version = 0 ); -void NifStream( PixelLayout const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, PixelLayout const & val ); - -//VertMode -void NifStream( VertMode & val, istream& in, uint version = 0 ); -void NifStream( VertMode const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, VertMode const & val ); - -//LightMode -void NifStream( LightMode & val, istream& in, uint version = 0 ); -void NifStream( LightMode const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, LightMode const & val ); - -//HeaderString -void NifStream( HeaderString & val, istream& in, uint version = 0 ); -void NifStream( HeaderString const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, HeaderString const & val ); - -//ShortString -void NifStream( ShortString & val, istream& in, uint version = 0 ); -void NifStream( ShortString const & val, ostream& out, uint version = 0 ); -ostream & operator<<( ostream & out, ShortString const & val ); - -//--Templates--// - -void NifStream( Key<Quaternion> & key, istream& file, uint version, KeyType type ); - - -void NifStream( Key<Quaternion> const & key, ostream& file, uint version, KeyType type ); - -//Key<T> -template <class T> -void NifStream( Key<T> & key, istream& file, uint version, KeyType type ) { - key.time = ReadFloat( file ); - - //If key type is not 1, 2, or 3, throw an exception - if ( type < 1 || type > 3 ) { - type = LINEAR_KEY; - //throw runtime_error("Invalid key type."); - } - - //Read data based on the type of key - NifStream( key.data, file ); - if ( type == QUADRATIC_KEY ) { - //Uses Quadratic interpolation - NifStream( key.forward_tangent, file ); - NifStream( key.backward_tangent, file ); - } else if ( type == TBC_KEY ) { - //Uses TBC interpolation - key.tension = ReadFloat( file ); - key.bias = ReadFloat( file ); - key.continuity = ReadFloat( file ); - } -} - -template <class T> -void NifStream( Key<T> & key, istream & file, uint version, int type ) { - NifStream( key, file, version, (KeyType)type ); -} - -template <class T> -void NifStream( Key<T> const & key, ostream& file, uint version, KeyType type ) { - WriteFloat( key.time, file ); - - //If key type is not 1, 2, or 3, throw an exception - if ( type < 1 || type > 3 ) { - type = LINEAR_KEY; - //throw runtime_error("Invalid key type."); - } - - //Read data based on the type of key - NifStream( key.data, file ); - if ( type == QUADRATIC_KEY ) { - //Uses Quadratic interpolation - NifStream( key.forward_tangent, file ); - NifStream( key.backward_tangent, file ); - } else if ( type == TBC_KEY ) { - //Uses TBC interpolation - WriteFloat( key.tension, file); - WriteFloat( key.bias, file); - WriteFloat( key.continuity, file); - } -} - -template <class T> -void NifStream( Key<T> const & key, ostream & file, uint version, int type ) { - NifStream( key, file, version, (KeyType)type ); -} - -//These operators cause SWIG warnings -#ifndef SWIG -template <class T> -ostream & operator<<( ostream & out, Key<T> const & val ) { - return out << "Time: " << val.time << endl - << "Data: " << val.data << endl - << "Forward Tangent: " << val.forward_tangent << endl - << "Backward Tangent: " << val.backward_tangent << endl - << "Bias: " << val.bias << endl - << "Continuity: " << val.continuity << endl; -} -#endif - -//Key<Quaternion> -//void StreamQuatKey( Key<Quaternion> & key, istream& file, uint version, KeyType type ); -//void StreamQuatKey( Key<Quaternion> const & key, ostream& file, uint version, KeyType type ); - -//The HexString function creates a formatted hex display of the given data for use in printing -//a debug string for information that is not understood -string HexString( const byte * src, uint len ); - -//Byte -ostream & operator<<( ostream & out, byte const & val ); - -} -#endif diff --git a/NifExport/niflib/Ref.h b/NifExport/niflib/Ref.h deleted file mode 100755 index 1d091ae..0000000 --- a/NifExport/niflib/Ref.h +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NL_REF_H_ -#define _NL_REF_H_ -#include <ostream> -#include "dll_export.h" -namespace Niflib { - -/** - * Smart Pointer Template - */ - -template<class T> class Ref; -template<class T> std::ostream & operator<<(std::ostream &, const Ref<T> &); - - -/** -* Ref Traits: Class overridable behavior methods -*/ -template<typename T> -class RefTraits -{ -public: - static void AddRef( T* p ) { if (p) p->AddRef(); } - static void Release( T* p ) { if (p) p->SubtractRef(); } - static bool Less( T*l, T*r ) { return ( l < r ); } - static ::std::ostream & ToStream(::std::ostream &os, T* p) { - if (p) os << p->GetIDString(); - else os << "NULL"; - return os; - } -#ifdef USE_NIFLIB_TEMPLATE_HELPERS - template<typename U> static T* StaticCast(U* p) { return static_cast<T*>(p); } - template<typename U> static T* DynamicCast(U* p) { - if ( (NULL != p) && p->IsDerivedType(T::TypeConst()) ) { - return static_cast<T*>(p); - } else { - return NULL; - } - } -#endif -}; - - -/** -* Smart reference -*/ -template<class T> -class Ref -{ -public: - Ref( T* p = 0 ) - : p_( ShallowCopy( p ) ) - { - } - - ~Ref() { Release( ); } - - Ref& Attach( T* p = 0 ) - { - Reset(); - p_ = p; - return (*this); - } - - // Normally I'd disable this and force you to use safe/explicit conversions - operator T*() const { return p_; } - - T& operator*() const { return *p_; } - - T* operator->() const { return p_; } - - T* ToPointer() const { return p_; } - - void Swap( Ref& other ) { std::swap( p_, other.p_); } - - bool isEmpty() const - { return (p_ == 0); } - - bool isSet() const - { return (p_ != 0); } - - /** - * overload all potential null test comparison operators - */ - operator bool() const // Enables "if (sp) ..." - { return (p_ != 0); } - - bool operator!() const // Enables "if (!sp) ..." - { return (p_ == 0); } - - inline friend bool operator==(const Ref& lhs, const Ref& rhs) - { return (lhs.p_ == rhs.p_); } - - inline friend bool operator!=(const Ref& lhs, const Ref& rhs) - { return (lhs.p_ != rhs.p_); } - - inline friend bool operator==(const Ref& lhs, const T* rhs) - { return (lhs.p_ == rhs); } - - inline friend bool operator==(const T* lhs, const Ref& rhs) - { return (lhs == rhs.p_); } - - inline friend bool operator==(const Ref& lhs, intptr_t rhs) - { return (lhs.p_ == reinterpret_cast<T*>(rhs)); } - - inline friend bool operator==(intptr_t rhs, const Ref& lhs) - { return (reinterpret_cast<T*>(lhs) == rhs.p_); } - - inline friend bool operator!=(const Ref& lhs, const T* rhs) - { return (lhs.p_ != rhs); } - - inline friend bool operator!=(const T* lhs, const Ref& rhs) - { return (lhs != rhs.p_); } - - inline friend bool operator!=(const Ref& lhs, intptr_t rhs) - { return (lhs.p_ != reinterpret_cast<T*>(rhs)); } - - inline friend bool operator!=(intptr_t rhs, const Ref& lhs) - { return (reinterpret_cast<T*>(lhs) != rhs.p_); } - - inline friend bool operator<(const Ref& lhs, const Ref& rhs) - { return RefTraits<T>::Less(lhs.p_, rhs.p_); } - - inline friend std::ostream & operator<<(std::ostream &os, const Ref& rhs) - { return RefTraits<T>::ToStream(os, rhs.p_); } - - Ref( const Ref& other ) - : p_( ShallowCopy( other.p_ ) ) - { } - -#ifdef USE_NIFLIB_TEMPLATE_HELPERS - template<typename U> - Ref( const Ref<U>& other ) - : p_( ShallowCopy(RefTraits<T>::DynamicCast(other.p_)) ) - { } -#endif - - Ref& operator=( T * other ) - { - Ref temp(other); - Swap(temp); - return *this; - } - - Ref& operator=( const Ref& other ) - { - Ref temp(other); - Swap(temp); - return *this; - } - -private: - template<typename U> friend class Ref; - - T* ShallowCopy( T* p ) - { - RefTraits<T>::AddRef( p ); - return p; - } - - void Release( ) - { - RefTraits<T>::Release( p_ ); - p_ = 0; - } - - T* p_; -}; - -} -#endif diff --git a/NifExport/niflib/SConstruct b/NifExport/niflib/SConstruct deleted file mode 100755 index 0d204e6..0000000 --- a/NifExport/niflib/SConstruct +++ /dev/null @@ -1,60 +0,0 @@ - -import sys -import os -import time -from distutils import sysconfig - -Help(""" -'scons' to build niflib library and niflib python wrapper -'scons -c' to clean -""") - -# detect platform -if sys.platform == 'linux2' or sys.platform == 'linux-i386': - python_lib = ['python%d.%d' % sys.version_info[0:2]] - python_libpath = [sysconfig.get_python_lib (0, 1) + '/config'] - python_include = [sysconfig.get_python_inc ()] - cppflags = '-fPIC -Wall' -elif sys.platform == 'cygwin': - python_lib = ['python%d.%d' % sys.version_info[0:2]] - python_libpath = [sysconfig.get_python_lib (0, 1) + '/config'] - python_include = [sysconfig.get_python_inc ()] - cppflags = '-Wall' -elif sys.platform == 'win32': - python_include = [sysconfig.get_python_inc()] - python_libpath = [sysconfig.get_python_lib(1, 1) + '/../libs'] - python_lib = ['python24'] - cppflags = '/EHsc /O2 /GS /Zi /TP' -else: - print "Error: Platform %s not supported."%sys.platform - Exit(1) - -env = Environment(ENV = os.environ) - -# detect SWIG -try: - env['SWIG'] -except KeyError: - print """ -Error: SWIG not found. -Please install SWIG, it's needed to create the python wrapper. -You can get it from http://www.swig.org/""" - if sys.platform == "win32": print "Also don't forget to add the SWIG directory to your %PATH%." - Exit(1) - -# build niflib and python wrapper - -objfiles = 'gen/ByteArray.cpp gen/Footer.cpp gen/LODRange.cpp gen/MatchGroup.cpp gen/MipMap.cpp gen/NodeGroup.cpp gen/QuaternionXYZW.cpp gen/ShortString.cpp gen/SkinShape.cpp gen/SkinShapeGroup.cpp gen/SkinWeight.cpp gen/AVObject.cpp gen/ControllerLink.cpp gen/Header.cpp gen/StringPalette.cpp gen/TBC.cpp gen/TexDesc.cpp gen/ShaderTexDesc.cpp gen/TexSource.cpp gen/SkinPartition.cpp gen/BoundingBox.cpp gen/FurniturePosition.cpp gen/hkTriangle.cpp gen/Morph.cpp gen/Particle.cpp gen/SkinData.cpp gen/RagDollDescriptor.cpp gen/LimitedHingeDescriptor.cpp obj/NiObject.cpp obj/AKeyedData.cpp obj/AParticleModifier.cpp obj/bhkRefObject.cpp obj/bhkSerializable.cpp obj/AbhkConstraint.cpp obj/AbhkRagdollConstraint.cpp obj/bhkShape.cpp obj/AbhkShapeCollection.cpp obj/bhkSphereRepShape.cpp obj/bhkConvexShape.cpp obj/bhkWorldObject.cpp obj/bhkEntity.cpp obj/NiCollisionObject.cpp obj/NiExtraData.cpp obj/NiInterpolator.cpp obj/NiBlendInterpolator.cpp obj/NiBSplineInterpolator.cpp obj/NiObjectNET.cpp obj/NiAVObject.cpp obj/NiDynamicEffect.cpp obj/NiLight.cpp obj/NiProperty.cpp obj/NiPSysModifier.cpp obj/NiPSysEmitter.cpp obj/NiPSysVolumeEmitter.cpp obj/NiTimeController.cpp obj/ABoneLODController.cpp obj/NiSingleInterpolatorController.cpp obj/APSysCtlr.cpp obj/NiTriBasedGeom.cpp obj/NiTriBasedGeomData.cpp obj/APSysData.cpp obj/bhkBlendCollisionObject.cpp obj/bhkBlendController.cpp obj/bhkBoxShape.cpp obj/bhkCapsuleShape.cpp obj/bhkCollisionObject.cpp obj/bhkConvexVerticesShape.cpp obj/bhkHingeConstraint.cpp obj/bhkLimitedHingeConstraint.cpp obj/bhkListShape.cpp obj/bhkMalleableConstraint.cpp obj/bhkMoppBvTreeShape.cpp obj/bhkMultiSphereShape.cpp obj/bhkNiTriStripsShape.cpp obj/bhkPackedNiTriStripsShape.cpp obj/bhkPrismaticConstraint.cpp obj/bhkRagdollConstraint.cpp obj/bhkRigidBody.cpp obj/bhkRigidBodyT.cpp obj/bhkSimpleShapePhantom.cpp obj/bhkSPCollisionObject.cpp obj/bhkSphereShape.cpp obj/bhkStiffSpringConstraint.cpp obj/bhkTransformShape.cpp obj/bhkConvexTransformShape.cpp obj/BSBound.cpp obj/BSFurnitureMarker.cpp obj/BSParentVelocityModifier.cpp obj/BSPSysArrayEmitter.cpp obj/BSXFlags.cpp obj/hkPackedNiTriStripsData.cpp obj/NiAlphaController.cpp obj/NiAlphaProperty.cpp obj/NiAmbientLight.cpp obj/NiAutoNormalParticlesData.cpp obj/NiBinaryExtraData.cpp obj/NiBlendBoolInterpolator.cpp obj/NiBlendFloatInterpolator.cpp obj/NiBlendPoint3Interpolator.cpp obj/NiBlendTransformInterpolator.cpp obj/NiBoneLODController.cpp obj/NiBoolData.cpp obj/NiBooleanExtraData.cpp obj/NiBoolInterpolator.cpp obj/NiBoolTimelineInterpolator.cpp obj/NiBSBoneLODController.cpp obj/NiBSplineBasisData.cpp obj/NiBSplineCompFloatInterpolator.cpp obj/NiBSplineCompPoint3Interpolator.cpp obj/NiBSplineCompTransformInterpolator.cpp obj/NiBSplineData.cpp obj/NiCamera.cpp obj/NiCollisionData.cpp obj/NiColorData.cpp obj/NiColorExtraData.cpp obj/NiControllerManager.cpp obj/NiControllerSequence.cpp obj/NiDefaultAVObjectPalette.cpp obj/NiDirectionalLight.cpp obj/NiDitherProperty.cpp obj/NiFlipController.cpp obj/NiFloatData.cpp obj/NiFloatExtraData.cpp obj/NiFloatExtraDataController.cpp obj/NiFloatInterpolator.cpp obj/NiFloatsExtraData.cpp obj/NiFogProperty.cpp obj/NiGeomMorpherController.cpp obj/NiGravity.cpp obj/NiIntegerExtraData.cpp obj/NiIntegersExtraData.cpp obj/NiKeyframeController.cpp obj/BSKeyframeController.cpp obj/NiKeyframeData.cpp obj/NiLightColorController.cpp obj/NiLightDimmerController.cpp obj/NiLookAtController.cpp obj/NiLookAtInterpolator.cpp obj/NiMaterialColorController.cpp obj/NiMaterialProperty.cpp obj/NiMeshPSysData.cpp obj/NiMorphData.cpp obj/NiMultiTargetTransformController.cpp obj/NiNode.cpp obj/AvoidNode.cpp obj/FxWidget.cpp obj/FxButton.cpp obj/FxRadioButton.cpp obj/NiBillboardNode.cpp obj/NiBSAnimationNode.cpp obj/NiBSParticleNode.cpp obj/NiLODNode.cpp obj/NiPalette.cpp obj/NiParticleBomb.cpp obj/NiParticleColorModifier.cpp obj/NiParticleGrowFade.cpp obj/NiParticleMeshModifier.cpp obj/NiParticleRotation.cpp obj/NiParticles.cpp obj/NiAutoNormalParticles.cpp obj/NiParticleMeshes.cpp obj/NiParticlesData.cpp obj/NiParticleMeshesData.cpp obj/NiParticleSystem.cpp obj/NiMeshParticleSystem.cpp obj/NiParticleSystemController.cpp obj/NiBSPArrayController.cpp obj/NiPathController.cpp obj/NiPathInterpolator.cpp obj/NiPixelData.cpp obj/NiPlanarCollider.cpp obj/NiPoint3Interpolator.cpp obj/NiPointLight.cpp obj/NiPosData.cpp obj/NiPSysAgeDeathModifier.cpp obj/NiPSysBombModifier.cpp obj/NiPSysBoundUpdateModifier.cpp obj/NiPSysBoxEmitter.cpp obj/NiPSysColliderManager.cpp obj/NiPSysColorModifier.cpp obj/NiPSysCylinderEmitter.cpp obj/NiPSysData.cpp obj/NiPSysDragModifier.cpp obj/NiPSysEmitterCtlr.cpp obj/NiPSysEmitterCtlrData.cpp obj/NiPSysEmitterDeclinationCtlr.cpp obj/NiPSysEmitterDeclinationVarCtlr.cpp obj/NiPSysEmitterInitialRadiusCtlr.cpp obj/NiPSysEmitterLifeSpanCtlr.cpp obj/NiPSysEmitterSpeedCtlr.cpp obj/NiPSysGravityModifier.cpp obj/NiPSysGravityStrengthCtlr.cpp obj/NiPSysGrowFadeModifier.cpp obj/NiPSysMeshEmitter.cpp obj/NiPSysMeshUpdateModifier.cpp obj/NiPSysModifierActiveCtlr.cpp obj/NiPSysPlanarCollider.cpp obj/NiPSysPositionModifier.cpp obj/NiPSysResetOnLoopCtlr.cpp obj/NiPSysRotationModifier.cpp obj/NiPSysSpawnModifier.cpp obj/NiPSysSphereEmitter.cpp obj/NiPSysUpdateCtlr.cpp obj/NiRangeLODData.cpp obj/NiRotatingParticles.cpp obj/NiRotatingParticlesData.cpp obj/NiScreenLODData.cpp obj/NiSequenceStreamHelper.cpp obj/NiShadeProperty.cpp obj/NiSkinData.cpp obj/NiSkinInstance.cpp obj/NiSkinPartition.cpp obj/NiSourceTexture.cpp obj/NiSpecularProperty.cpp obj/NiSphericalCollider.cpp obj/NiSpotLight.cpp obj/NiStencilProperty.cpp obj/NiStringExtraData.cpp obj/NiStringPalette.cpp obj/NiStringsExtraData.cpp obj/NiTextKeyExtraData.cpp obj/NiTextureEffect.cpp obj/NiTextureTransformController.cpp obj/NiTexturingProperty.cpp obj/NiTransformController.cpp obj/NiTransformData.cpp obj/NiTransformInterpolator.cpp obj/NiTriShape.cpp obj/NiTriShapeData.cpp obj/NiTriStrips.cpp obj/NiTriStripsData.cpp obj/NiUVController.cpp obj/NiUVData.cpp obj/NiVectorExtraData.cpp obj/NiVertexColorProperty.cpp obj/NiVertWeightsExtraData.cpp obj/NiVisController.cpp obj/NiVisData.cpp obj/NiWireframeProperty.cpp obj/NiZBufferProperty.cpp obj/RootCollisionNode.cpp ' - -niflib = env.StaticLibrary('niflib', Split('niflib.cpp nif_math.cpp NIF_IO.cpp kfm.cpp Type.cpp gen/obj_factories.cpp ' + objfiles), CPPPATH = '.', CPPFLAGS = cppflags) -nifshlib = env.SharedLibrary('_niflib', 'pyniflib.i', LIBS=['niflib'] + python_lib, LIBPATH=['.'] + python_libpath, SWIGFLAGS = '-c++ -python', CPPPATH = ['.'] + python_include, CPPFLAGS = cppflags, SHLIBPREFIX='') -# makes sure niflib.lib is built before trying to build _niflib.dll -env.Depends(nifshlib, niflib) - - -# Here's how to compile niflyze: -#env.Program('niflyze', 'niflyze.cpp', LIBS=['niflib'], LIBPATH=['.'], CPPFLAGS = cppflags) - -# A test program: -#env.Program('test', 'test.cpp', LIBS=['niflib'], LIBPATH=['.'], CPPFLAGS = cppflags) - diff --git a/NifExport/niflib/Type.cpp b/NifExport/niflib/Type.cpp deleted file mode 100755 index e9bbd4a..0000000 --- a/NifExport/niflib/Type.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "Type.h" -using namespace Niflib; - -Type::Type (const string & type_name, const Type * par_type ) : name(type_name), base_type(par_type) {} - -Type::~Type() {} - -bool Type::operator<( const Type & compare_to ) const { - return (this < &compare_to); -} - -bool Type::IsSameType( const Type & compare_to ) const { - return &compare_to == this; -} - -bool Type::IsDerivedType( const Type & compare_to ) const { - - const Type * search = this; - while ( search != NULL ) { - if ( search == &compare_to ) { - return true; - } - search = search->base_type; - } - return false; -} - -string Type::GetTypeName() const { - return name; -} \ No newline at end of file diff --git a/NifExport/niflib/Type.h b/NifExport/niflib/Type.h deleted file mode 100755 index cfb35c4..0000000 --- a/NifExport/niflib/Type.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _TYPE_H_ -#define _TYPE_H_ - -#include <string> -#include "dll_export.h" - -using namespace std; -namespace Niflib { - -/** - * Run Time Type Inforamtion Class - */ -class Type { -public: - NIFLIB_API Type (const string & type_name, const Type * par_type ); - NIFLIB_API ~Type(); - - NIFLIB_API string GetTypeName() const; - - NIFLIB_API bool IsSameType ( const Type & compare_to ) const; - NIFLIB_API bool IsDerivedType ( const Type & compare_to ) const; - NIFLIB_API bool operator<( const Type & compare_to ) const; -private: - string name; - const Type * base_type; -}; - -} -#endif diff --git a/NifExport/niflib/dll_export.h b/NifExport/niflib/dll_export.h deleted file mode 100755 index d6a5ada..0000000 --- a/NifExport/niflib/dll_export.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _DLL_EXPORT_H_ -#define _DLL_EXPORT_H_ - -#ifdef USE_NIFLIB_DLL - #ifdef _MSC_VER - #ifdef BUILDING_NIFLIB_DLL - #define NIFLIB_API __declspec(dllexport) - #else - #define NIFLIB_API __declspec(dllimport) - #endif - #define NIFLIB_HIDDEN - #else - #ifdef HAVE_GCCVISIBILITYPATCH - #define NIFLIB_API __attribute__ ((visibility("default"))) - #define NIFLIB_HIDDEN __attribute__ ((visibility("hidden"))) - #else - #define NIFLIB_API - #define NIFLIB_HIDDEN - #endif - #endif -#else - #define NIFLIB_API - #define NIFLIB_HIDDEN -#endif - -#endif \ No newline at end of file diff --git a/NifExport/niflib/gen/AVObject.cpp b/NifExport/niflib/gen/AVObject.cpp deleted file mode 100755 index 0024067..0000000 --- a/NifExport/niflib/gen/AVObject.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AVObject.h" -#include "../obj/NiAVObject.h" -using namespace Niflib; - -//Constructor -AVObject::AVObject() : object(NULL) {}; - -//Destructor -AVObject::~AVObject() {}; diff --git a/NifExport/niflib/gen/AVObject.h b/NifExport/niflib/gen/AVObject.h deleted file mode 100755 index 0b18309..0000000 --- a/NifExport/niflib/gen/AVObject.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _AVOBJECT_H_ -#define _AVOBJECT_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; - -/*! - * Used in NiDefaultAVObjectPalette. - */ -struct NIFLIB_API AVObject { - /*! Default Constructor */ - AVObject(); - /*! Default Destructor */ - ~AVObject(); - /*! - * Object name. - */ - string name; - /*! - * Object reference. - */ - NiAVObject * object; -}; - -} -#endif diff --git a/NifExport/niflib/gen/BoundingBox.cpp b/NifExport/niflib/gen/BoundingBox.cpp deleted file mode 100755 index 52a0b33..0000000 --- a/NifExport/niflib/gen/BoundingBox.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BoundingBox.h" -using namespace Niflib; - -//Constructor -BoundingBox::BoundingBox() : unknownInt((uint)1) {}; - -//Destructor -BoundingBox::~BoundingBox() {}; diff --git a/NifExport/niflib/gen/BoundingBox.h b/NifExport/niflib/gen/BoundingBox.h deleted file mode 100755 index f1489ee..0000000 --- a/NifExport/niflib/gen/BoundingBox.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BOUNDINGBOX_H_ -#define _BOUNDINGBOX_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Bounding box. - */ -struct NIFLIB_API BoundingBox { - /*! Default Constructor */ - BoundingBox(); - /*! Default Destructor */ - ~BoundingBox(); - /*! - * Usually 1. - */ - uint unknownInt; - /*! - * Translation vector. - */ - Vector3 translation; - /*! - * Rotation matrix. - */ - Matrix33 rotation; - /*! - * Radius, per direction. - */ - Vector3 radius; -}; - -} -#endif diff --git a/NifExport/niflib/gen/ByteArray.cpp b/NifExport/niflib/gen/ByteArray.cpp deleted file mode 100755 index 8d7950f..0000000 --- a/NifExport/niflib/gen/ByteArray.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "ByteArray.h" -using namespace Niflib; - -//Constructor -ByteArray::ByteArray() : dataSize((uint)0) {}; - -//Destructor -ByteArray::~ByteArray() {}; diff --git a/NifExport/niflib/gen/ByteArray.h b/NifExport/niflib/gen/ByteArray.h deleted file mode 100755 index 61abc3c..0000000 --- a/NifExport/niflib/gen/ByteArray.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BYTEARRAY_H_ -#define _BYTEARRAY_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * An array of bytes. - */ -struct NIFLIB_API ByteArray { - /*! Default Constructor */ - ByteArray(); - /*! Default Destructor */ - ~ByteArray(); - /*! - * The number of bytes in this array - */ - mutable uint dataSize; - /*! - * The bytes which make up the array - */ - vector<byte > data; -}; - -} -#endif diff --git a/NifExport/niflib/gen/ControllerLink.cpp b/NifExport/niflib/gen/ControllerLink.cpp deleted file mode 100755 index 32dabe3..0000000 --- a/NifExport/niflib/gen/ControllerLink.cpp +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "ControllerLink.h" -#include "../obj/NiTimeController.h" -#include "../obj/NiInterpolator.h" -#include "../obj/NiObject.h" -#include "../obj/NiStringPalette.h" -using namespace Niflib; - -//Constructor -ControllerLink::ControllerLink() : controller(NULL), interpolator(NULL), unknownLink1(NULL), unknownLink2(NULL), unknownShort0((ushort)0), priority_((byte)0), stringPalette(NULL), nodeNameOffset((uint)0), propertyTypeOffset((uint)0), controllerTypeOffset((uint)0), variableOffset1((uint)0), variableOffset2((uint)0) {}; - -//Destructor -ControllerLink::~ControllerLink() {}; diff --git a/NifExport/niflib/gen/ControllerLink.h b/NifExport/niflib/gen/ControllerLink.h deleted file mode 100755 index 0f93e2d..0000000 --- a/NifExport/niflib/gen/ControllerLink.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _CONTROLLERLINK_H_ -#define _CONTROLLERLINK_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTimeController; -class NiInterpolator; -class NiObject; -class NiStringPalette; - -/*! - * In a .kf file, this links to a controllable block, via its name (or - * for version 10.2.0.0 and up, a link and offset to a NiStringPalette - * that contains the name), and a sequence of interpolators that apply to - * this controllable block, via links. - */ -struct NIFLIB_API ControllerLink { - /*! Default Constructor */ - ControllerLink(); - /*! Default Destructor */ - ~ControllerLink(); - /*! - * Name of a controllable object in another NIF file. - */ - string targetName; - /*! - * Link to a controller. - */ - Ref<NiTimeController > controller; - /*! - * Link to an interpolator. - */ - Ref<NiInterpolator > interpolator; - /*! - * Unknown link. Usually -1. - */ - Ref<NiObject > unknownLink1; - /*! - * Unknown. - */ - Ref<NiObject > unknownLink2; - /*! - * Unknown. - */ - ushort unknownShort0; - /*! - * Idle animations tend to have low values for this, and blocks that have - * high values tend to correspond with the important parts of the - * animation. - */ - byte priority_; - /*! - * Refers to the NiStringPalette which contains the name of the - * controlled block. - */ - Ref<NiStringPalette > stringPalette; - /*! - * The name of the animated node. - */ - string nodeName; - /*! - * Offset in the string palette where the name of the controlled node - * (NiNode, NiTriShape, ...) starts. - */ - uint nodeNameOffset; - /*! - * Name of the property (NiMaterialProperty, ...), if this controller - * controls a property. - */ - string propertyType; - /*! - * Offset in the string palette where the property (NiMaterialProperty, - * ...) starts, if this controller controls a property. Otherwise, -1. - */ - uint propertyTypeOffset; - /*! - * Probably the block type name of the controller in the NIF file that is - * child of the controlled block. - */ - string controllerType; - /*! - * Apparently the offset in the string palette of some type of controller - * related to Interpolator (for example, a 'NiTransformInterpolator' will - * have here a 'NiTransformController', etc.). Sometimes the type of - * controller that links to the interpolator. Probably it refers to the - * controller in the NIF file that is child of the controlled block, via - * its type name. - */ - uint controllerTypeOffset; - /*! - * Some variable string (such as 'SELF_ILLUM', '0-0-TT_TRANSLATE_U', - * 'tongue_out', etc.). - */ - string variable1; - /*! - * Offset in the string palette where some variable string starts (such - * as 'SELF_ILLUM', '0-0-TT_TRANSLATE_U', 'tongue_out', etc.). Usually, - * -1. - */ - uint variableOffset1; - /*! - * Another variable string, apparently used for particle system - * controllers. - */ - string variable2; - /*! - * Offset in the string palette where some variable string starts (so far - * only 'EmitterActive' and 'BirthRate' have been observed in official - * files, used for particle system controllers). Usually, -1. - */ - uint variableOffset2; -}; - -} -#endif diff --git a/NifExport/niflib/gen/Footer.cpp b/NifExport/niflib/gen/Footer.cpp deleted file mode 100755 index d0ee546..0000000 --- a/NifExport/niflib/gen/Footer.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "Footer.h" -#include "../obj/NiAVObject.h" -using namespace Niflib; - -//Constructor -Footer::Footer() : numRoots((uint)0) {}; - -//Destructor -Footer::~Footer() {}; - -void Footer::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NifStream( numRoots, in, version ); - roots.resize(numRoots); - for (uint i1 = 0; i1 < roots.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void Footer::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - numRoots = uint(roots.size()); - NifStream( numRoots, out, version ); - for (uint i1 = 0; i1 < roots.size(); i1++) { - if ( roots[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(roots[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -string Footer::asString( bool verbose ) const { - stringstream out; - numRoots = uint(roots.size()); - out << " Num Roots: " << numRoots << endl; - for (uint i1 = 0; i1 < roots.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Roots[" << i1 << "]: " << roots[i1] << endl; - }; - return out.str(); -} diff --git a/NifExport/niflib/gen/Footer.h b/NifExport/niflib/gen/Footer.h deleted file mode 100755 index 3b9233c..0000000 --- a/NifExport/niflib/gen/Footer.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _FOOTER_H_ -#define _FOOTER_H_ - -#include "../NIF_IO.h" -#include "../obj/NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; - -/*! - * The NIF file footer. - */ -struct NIFLIB_API Footer { - /*! Default Constructor */ - Footer(); - /*! Default Destructor */ - ~Footer(); - /*! - * The number of root references. - */ - mutable uint numRoots; - /*! - * List of root blocks. If there is a camera, for 1st person view, then - * this block is referred to as well in this list, even if it is not a - * root block (usually we want the camera to be attached to the Bip Head - * node). - */ - vector<Ref<NiAVObject > > roots; - void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - string asString( bool verbose = false ) const; -}; - -} -#endif diff --git a/NifExport/niflib/gen/FurniturePosition.cpp b/NifExport/niflib/gen/FurniturePosition.cpp deleted file mode 100755 index e4b418b..0000000 --- a/NifExport/niflib/gen/FurniturePosition.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "FurniturePosition.h" -using namespace Niflib; - -//Constructor -FurniturePosition::FurniturePosition() : orientation((ushort)0), positionRef1((byte)0), positionRef2((byte)0) {}; - -//Destructor -FurniturePosition::~FurniturePosition() {}; diff --git a/NifExport/niflib/gen/FurniturePosition.h b/NifExport/niflib/gen/FurniturePosition.h deleted file mode 100755 index a4042ee..0000000 --- a/NifExport/niflib/gen/FurniturePosition.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _FURNITUREPOSITION_H_ -#define _FURNITUREPOSITION_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Describes a furniture position? - */ -struct NIFLIB_API FurniturePosition { - /*! Default Constructor */ - FurniturePosition(); - /*! Default Destructor */ - ~FurniturePosition(); - /*! - * Offset of furniture marker. - */ - Vector3 offset; - /*! - * Furniture marker orientation. - */ - ushort orientation; - /*! - * Refers to a furnituremarkerxx.nif file. Always seems to be the same as - * Position Ref 2. - */ - byte positionRef1; - /*! - * Refers to a furnituremarkerxx.nif file. Always seems to be the same as - * Position Ref 1. - */ - byte positionRef2; -}; - -} -#endif diff --git a/NifExport/niflib/gen/Header.cpp b/NifExport/niflib/gen/Header.cpp deleted file mode 100755 index 558da4a..0000000 --- a/NifExport/niflib/gen/Header.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "Header.h" -using namespace Niflib; - -//Constructor -Header::Header() : version((uint)0x04000002), endianType((byte)1), userVersion((uint)0), numBlocks((uint)0), unknownInt1((uint)1), unknownInt3((uint)0), numBlockTypes((ushort)0), unknownInt2((uint)0) {}; - -//Destructor -Header::~Header() {}; -void Header::Read( istream& in ) { - NifStream( headerString, in, version ); - NifStream( version, in, version ); - if ( version >= 0x14000004 ) { - NifStream( endianType, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( userVersion, in, version ); - }; - NifStream( numBlocks, in, version ); - if ( ( version >= 0x0A000102 ) && ( version <= 0x0A000102 ) ) { - NifStream( unknownInt1, in, version ); - }; - if ( version >= 0x0A010000 ) { - if ( (userVersion != 0) ) { - NifStream( unknownInt3, in, version ); - }; - }; - if ( version >= 0x0A000102 ) { - if ( (userVersion != 0) ) { - NifStream( creator_, in, version ); - NifStream( exportType_, in, version ); - NifStream( exportScript_, in, version ); - }; - }; - if ( version >= 0x0A000100 ) { - NifStream( numBlockTypes, in, version ); - blockTypes.resize(numBlockTypes); - for (uint i2 = 0; i2 < blockTypes.size(); i2++) { - NifStream( blockTypes[i2], in, version ); - }; - blockTypeIndex.resize(numBlocks); - for (uint i2 = 0; i2 < blockTypeIndex.size(); i2++) { - NifStream( blockTypeIndex[i2], in, version ); - }; - NifStream( unknownInt2, in, version ); - }; -} - -void Header::Write( ostream& out ) const { - numBlockTypes = ushort(blockTypes.size()); - numBlocks = uint(blockTypeIndex.size()); - NifStream( headerString, out, version ); - NifStream( version, out, version ); - if ( version >= 0x14000004 ) { - NifStream( endianType, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( userVersion, out, version ); - }; - NifStream( numBlocks, out, version ); - if ( ( version >= 0x0A000102 ) && ( version <= 0x0A000102 ) ) { - NifStream( unknownInt1, out, version ); - }; - if ( version >= 0x0A010000 ) { - if ( (userVersion != 0) ) { - NifStream( unknownInt3, out, version ); - }; - }; - if ( version >= 0x0A000102 ) { - if ( (userVersion != 0) ) { - NifStream( creator_, out, version ); - NifStream( exportType_, out, version ); - NifStream( exportScript_, out, version ); - }; - }; - if ( version >= 0x0A000100 ) { - NifStream( numBlockTypes, out, version ); - for (uint i2 = 0; i2 < blockTypes.size(); i2++) { - NifStream( blockTypes[i2], out, version ); - }; - for (uint i2 = 0; i2 < blockTypeIndex.size(); i2++) { - NifStream( blockTypeIndex[i2], out, version ); - }; - NifStream( unknownInt2, out, version ); - }; -} - -string Header::asString( bool verbose ) const { - stringstream out; - numBlockTypes = ushort(blockTypes.size()); - numBlocks = uint(blockTypeIndex.size()); - out << " Header String: " << headerString << endl; - out << " Version: " << version << endl; - out << " Endian Type: " << endianType << endl; - out << " User Version: " << userVersion << endl; - out << " Num Blocks: " << numBlocks << endl; - out << " Unknown Int 1: " << unknownInt1 << endl; - if ( (userVersion != 0) ) { - out << " Unknown Int 3: " << unknownInt3 << endl; - out << " Creator?: " << creator_ << endl; - out << " Export Type?: " << exportType_ << endl; - out << " Export Script?: " << exportScript_ << endl; - }; - out << " Num Block Types: " << numBlockTypes << endl; - for (uint i1 = 0; i1 < blockTypes.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Block Types[" << i1 << "]: " << blockTypes[i1] << endl; - }; - for (uint i1 = 0; i1 < blockTypeIndex.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Block Type Index[" << i1 << "]: " << blockTypeIndex[i1] << endl; - }; - out << " Unknown Int 2: " << unknownInt2 << endl; - return out.str(); -} diff --git a/NifExport/niflib/gen/Header.h b/NifExport/niflib/gen/Header.h deleted file mode 100755 index be55f3f..0000000 --- a/NifExport/niflib/gen/Header.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _HEADER_H_ -#define _HEADER_H_ - -#include "../NIF_IO.h" -#include "../obj/NiObject.h" - -namespace Niflib { - - -/*! - * The NIF file header. - */ -struct NIFLIB_API Header { - /*! Default Constructor */ - Header(); - /*! Default Destructor */ - ~Header(); - /*! - * 'NetImmerse File Format x.x.x.x' (versions <= 10.0.1.2) or 'Gamebryo - * File Format x.x.x.x' (versions >= 10.1.0.0), with x.x.x.x the version - * written out. Ends with a newline character (0x0A). - */ - HeaderString headerString; - /*! - * The NIF version, in hexadecimal notation: 0x04000002, 0x0401000C, - * 0x04020002, 0x04020100, 0x04020200, 0x0A000100, 0x0A010000, - * 0x0A020000, 0x14000004, ... - */ - uint version; - /*! - * Determines the endian-ness of the data. 1 = little endian (default) 0 - * = big endian - */ - byte endianType; - /*! - * An extra version number, for companies that decide to modify the file - * format. - */ - uint userVersion; - /*! - * Number of file blocks. - */ - mutable uint numBlocks; - /*! - * Unknown. - */ - uint unknownInt1; - /*! - * Unknown. - */ - uint unknownInt3; - /*! - * Could be the name of the creator of the NIF file? - */ - ShortString creator_; - /*! - * Unknown. Can be something like 'TriStrip Process Script'. - */ - ShortString exportType_; - /*! - * Unknown. Possibly the selected option of the export script. Can be - * something like 'Default Export Script'. - */ - ShortString exportScript_; - /*! - * Number of block types in this NIF file. - */ - mutable ushort numBlockTypes; - /*! - * List of all block types used in this NIF file. - */ - vector<string > blockTypes; - /*! - * Maps file blocks on their corresponding type: first file block is of - * type block_types[block_type_index[0]], the second of - * block_types[block_type_index[1]], etc. - */ - vector<ushort > blockTypeIndex; - /*! - * Unknown. - */ - uint unknownInt2; - void Read( istream& in ); - void Write( ostream& out ) const; - string asString( bool verbose = false ) const; -}; - -} -#endif diff --git a/NifExport/niflib/gen/KeyGroup.h b/NifExport/niflib/gen/KeyGroup.h deleted file mode 100755 index ff67b94..0000000 --- a/NifExport/niflib/gen/KeyGroup.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _KEYGROUP_H_ -#define _KEYGROUP_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Array of vector keys (anything that can be interpolated, except - * rotations). - */ -template <class T > -struct NIFLIB_API KeyGroup { - /*! - * Number of keys in the array. - */ - mutable uint numKeys; - /*! - * The key type. - */ - KeyType interpolation; - /*! - * The keys. - */ - vector<Key<T > > keys; -}; - -} -#endif diff --git a/NifExport/niflib/gen/LODRange.cpp b/NifExport/niflib/gen/LODRange.cpp deleted file mode 100755 index db3314f..0000000 --- a/NifExport/niflib/gen/LODRange.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "LODRange.h" -using namespace Niflib; - -//Constructor -LODRange::LODRange() : nearExtent(0.0f), farExtent(0.0f) {}; - -//Destructor -LODRange::~LODRange() {}; diff --git a/NifExport/niflib/gen/LODRange.h b/NifExport/niflib/gen/LODRange.h deleted file mode 100755 index 233afb9..0000000 --- a/NifExport/niflib/gen/LODRange.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _LODRANGE_H_ -#define _LODRANGE_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * The distance range where a specific level of detail applies. - */ -struct NIFLIB_API LODRange { - /*! Default Constructor */ - LODRange(); - /*! Default Destructor */ - ~LODRange(); - /*! - * Begining of range. - */ - float nearExtent; - /*! - * End of Range. - */ - float farExtent; -}; - -} -#endif diff --git a/NifExport/niflib/gen/LimitedHingeDescriptor.cpp b/NifExport/niflib/gen/LimitedHingeDescriptor.cpp deleted file mode 100755 index a20dda4..0000000 --- a/NifExport/niflib/gen/LimitedHingeDescriptor.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "LimitedHingeDescriptor.h" -using namespace Niflib; - -//Constructor -LimitedHingeDescriptor::LimitedHingeDescriptor() : minAngle(0.0f), maxAngle(0.0f), maxFriction(0.0f) {}; - -//Destructor -LimitedHingeDescriptor::~LimitedHingeDescriptor() {}; diff --git a/NifExport/niflib/gen/LimitedHingeDescriptor.h b/NifExport/niflib/gen/LimitedHingeDescriptor.h deleted file mode 100755 index 2ddd572..0000000 --- a/NifExport/niflib/gen/LimitedHingeDescriptor.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _LIMITEDHINGEDESCRIPTOR_H_ -#define _LIMITEDHINGEDESCRIPTOR_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * - */ -struct NIFLIB_API LimitedHingeDescriptor { - /*! Default Constructor */ - LimitedHingeDescriptor(); - /*! Default Destructor */ - ~LimitedHingeDescriptor(); - /*! - * Unknown. - */ - Float4 pivotA; - /*! - * Unknown. - */ - Float4 axleA_; - /*! - * Unknown. - */ - Float4 perp2axleina1; - /*! - * Unknown. - */ - Float4 perp2axleina2; - /*! - * Unknown. - */ - Float4 pivotB; - /*! - * Unknown. - */ - Float4 axleB; - /*! - * Unknown. - */ - Float4 unknownVector; - /*! - * Unknown. - */ - float minAngle; - /*! - * Unknown. - */ - float maxAngle; - /*! - * Unknown. - */ - float maxFriction; -}; - -} -#endif diff --git a/NifExport/niflib/gen/MatchGroup.cpp b/NifExport/niflib/gen/MatchGroup.cpp deleted file mode 100755 index 6f5d895..0000000 --- a/NifExport/niflib/gen/MatchGroup.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "MatchGroup.h" -using namespace Niflib; - -//Constructor -MatchGroup::MatchGroup() : numVertices((ushort)0) {}; - -//Destructor -MatchGroup::~MatchGroup() {}; diff --git a/NifExport/niflib/gen/MatchGroup.h b/NifExport/niflib/gen/MatchGroup.h deleted file mode 100755 index ab0b150..0000000 --- a/NifExport/niflib/gen/MatchGroup.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _MATCHGROUP_H_ -#define _MATCHGROUP_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Group of vertex indices of vertices that match. - */ -struct NIFLIB_API MatchGroup { - /*! Default Constructor */ - MatchGroup(); - /*! Default Destructor */ - ~MatchGroup(); - /*! - * Number of vertices in this group. - */ - mutable ushort numVertices; - /*! - * The vertex indices. - */ - vector<ushort > vertexIndices; -}; - -} -#endif diff --git a/NifExport/niflib/gen/MipMap.cpp b/NifExport/niflib/gen/MipMap.cpp deleted file mode 100755 index 01169af..0000000 --- a/NifExport/niflib/gen/MipMap.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "MipMap.h" -using namespace Niflib; - -//Constructor -MipMap::MipMap() : width((uint)0), height((uint)0), offset((uint)0) {}; - -//Destructor -MipMap::~MipMap() {}; diff --git a/NifExport/niflib/gen/MipMap.h b/NifExport/niflib/gen/MipMap.h deleted file mode 100755 index d4febaf..0000000 --- a/NifExport/niflib/gen/MipMap.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _MIPMAP_H_ -#define _MIPMAP_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Description of a MipMap within a NiPixelData block. - */ -struct NIFLIB_API MipMap { - /*! Default Constructor */ - MipMap(); - /*! Default Destructor */ - ~MipMap(); - /*! - * Width of the mipmap image. - */ - uint width; - /*! - * Height of the mipmap image. - */ - uint height; - /*! - * Offset into the pixel data array where this mipmap starts. - */ - uint offset; -}; - -} -#endif diff --git a/NifExport/niflib/gen/Morph.cpp b/NifExport/niflib/gen/Morph.cpp deleted file mode 100755 index 6c698a7..0000000 --- a/NifExport/niflib/gen/Morph.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "Morph.h" -using namespace Niflib; - -//Constructor -Morph::Morph() : numMorphKeys((uint)0), morphInterpolation((KeyType)0), unknownInt((uint)0) {}; - -//Destructor -Morph::~Morph() {}; diff --git a/NifExport/niflib/gen/Morph.h b/NifExport/niflib/gen/Morph.h deleted file mode 100755 index 9efeddb..0000000 --- a/NifExport/niflib/gen/Morph.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _MORPH_H_ -#define _MORPH_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Geometry morphing data component. - */ -struct NIFLIB_API Morph { - /*! Default Constructor */ - Morph(); - /*! Default Destructor */ - ~Morph(); - /*! - * Name of the frame. - */ - string frameName; - /*! - * The number of morph keys that follow. - */ - mutable uint numMorphKeys; - /*! - * Unlike most blocks, the presense of this value is not conditional on - * there being keys. - */ - KeyType morphInterpolation; - /*! - * The morph key frames. - */ - vector<Key<float > > morphKeys; - /*! - * Unknown. - */ - uint unknownInt; - /*! - * Morph vectors. - */ - vector<Vector3 > vectors; -}; - -} -#endif diff --git a/NifExport/niflib/gen/NodeGroup.cpp b/NifExport/niflib/gen/NodeGroup.cpp deleted file mode 100755 index cf36491..0000000 --- a/NifExport/niflib/gen/NodeGroup.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NodeGroup.h" -#include "../obj/NiNode.h" -using namespace Niflib; - -//Constructor -NodeGroup::NodeGroup() : numNodes((uint)0) {}; - -//Destructor -NodeGroup::~NodeGroup() {}; diff --git a/NifExport/niflib/gen/NodeGroup.h b/NifExport/niflib/gen/NodeGroup.h deleted file mode 100755 index ea55a26..0000000 --- a/NifExport/niflib/gen/NodeGroup.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NODEGROUP_H_ -#define _NODEGROUP_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -/*! - * A group of NiNodes references. - */ -struct NIFLIB_API NodeGroup { - /*! Default Constructor */ - NodeGroup(); - /*! Default Destructor */ - ~NodeGroup(); - /*! - * Number of node references that follow. - */ - mutable uint numNodes; - /*! - * The list of NiNode references. - */ - vector<Ref<NiNode > > nodes; -}; - -} -#endif diff --git a/NifExport/niflib/gen/Particle.cpp b/NifExport/niflib/gen/Particle.cpp deleted file mode 100755 index 30d0a59..0000000 --- a/NifExport/niflib/gen/Particle.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "Particle.h" -using namespace Niflib; - -//Constructor -Particle::Particle() : lifetime(0.0f), lifespan(0.0f), timestamp(0.0f), unknownShort((ushort)0), vertexId((ushort)0) {}; - -//Destructor -Particle::~Particle() {}; diff --git a/NifExport/niflib/gen/Particle.h b/NifExport/niflib/gen/Particle.h deleted file mode 100755 index e192f22..0000000 --- a/NifExport/niflib/gen/Particle.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _PARTICLE_H_ -#define _PARTICLE_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * particle array entry - */ -struct NIFLIB_API Particle { - /*! Default Constructor */ - Particle(); - /*! Default Destructor */ - ~Particle(); - /*! - * Particle velocity - */ - Vector3 velocity; - /*! - * Unknown - */ - Vector3 unknownVector; - /*! - * The particle's age. - */ - float lifetime; - /*! - * Maximum age of the particle. - */ - float lifespan; - /*! - * Timestamp of the last update. - */ - float timestamp; - /*! - * Unknown short (=0) - */ - ushort unknownShort; - /*! - * Particle/vertex index matches array index - */ - ushort vertexId; -}; - -} -#endif diff --git a/NifExport/niflib/gen/QuaternionXYZW.cpp b/NifExport/niflib/gen/QuaternionXYZW.cpp deleted file mode 100755 index 3842b36..0000000 --- a/NifExport/niflib/gen/QuaternionXYZW.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "QuaternionXYZW.h" -using namespace Niflib; - -//Constructor -QuaternionXYZW::QuaternionXYZW() : x(0.0f), y(0.0f), z(0.0f), w(0.0f) {}; - -//Destructor -QuaternionXYZW::~QuaternionXYZW() {}; diff --git a/NifExport/niflib/gen/QuaternionXYZW.h b/NifExport/niflib/gen/QuaternionXYZW.h deleted file mode 100755 index 57333c6..0000000 --- a/NifExport/niflib/gen/QuaternionXYZW.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _QUATERNIONXYZW_H_ -#define _QUATERNIONXYZW_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * A quaternion as it appears in the havok blocks. - */ -struct NIFLIB_API QuaternionXYZW { - /*! Default Constructor */ - QuaternionXYZW(); - /*! Default Destructor */ - ~QuaternionXYZW(); - /*! - * The x-coordinate. - */ - float x; - /*! - * The y-coordinate. - */ - float y; - /*! - * The z-coordinate. - */ - float z; - /*! - * The w-coordinate. - */ - float w; -}; - -} -#endif diff --git a/NifExport/niflib/gen/RagDollDescriptor.cpp b/NifExport/niflib/gen/RagDollDescriptor.cpp deleted file mode 100755 index ce6a1e8..0000000 --- a/NifExport/niflib/gen/RagDollDescriptor.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "RagDollDescriptor.h" -using namespace Niflib; - -//Constructor -RagDollDescriptor::RagDollDescriptor() : coneMinAngle(0.0f), planeMinAngle(0.0f), planeMaxAngle(0.0f), twistMinAngle(0.0f), twistMaxAngle(0.0f), maxFriction(0.0f) {}; - -//Destructor -RagDollDescriptor::~RagDollDescriptor() {}; diff --git a/NifExport/niflib/gen/RagDollDescriptor.h b/NifExport/niflib/gen/RagDollDescriptor.h deleted file mode 100755 index 9d82af5..0000000 --- a/NifExport/niflib/gen/RagDollDescriptor.h +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _RAGDOLLDESCRIPTOR_H_ -#define _RAGDOLLDESCRIPTOR_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * - */ -struct NIFLIB_API RagDollDescriptor { - /*! Default Constructor */ - RagDollDescriptor(); - /*! Default Destructor */ - ~RagDollDescriptor(); - /*! - * Unknown. - */ - Float4 pivotA; - /*! - * Unknown. - */ - Float4 planeA; - /*! - * Unknown. - */ - Float4 twistA; - /*! - * Unknown. - */ - Float4 pivotB; - /*! - * Unknown. - */ - Float4 planeB; - /*! - * Unknown. - */ - Float4 twistB; - /*! - * Unknown. - */ - float coneMinAngle; - /*! - * Unknown. - */ - float planeMinAngle; - /*! - * Unknown. - */ - float planeMaxAngle; - /*! - * Unknown. - */ - float twistMinAngle; - /*! - * Unknown. - */ - float twistMaxAngle; - /*! - * Unknown. - */ - float maxFriction; -}; - -} -#endif diff --git a/NifExport/niflib/gen/RotationKeyArray.h b/NifExport/niflib/gen/RotationKeyArray.h deleted file mode 100755 index fca7375..0000000 --- a/NifExport/niflib/gen/RotationKeyArray.h +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _ROTATIONKEYARRAY_H_ -#define _ROTATIONKEYARRAY_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Rotation key array. - */ -template <class T > -struct NIFLIB_API RotationKeyArray { - /*! - * Number of keys. - */ - mutable uint numKeys; - /*! - * Key type (1, 2, 3, or 4). - */ - KeyType keyType; - /*! - * The rotation keys. - */ - vector<Key<T > > keys; -}; - -} -#endif diff --git a/NifExport/niflib/gen/ShaderTexDesc.cpp b/NifExport/niflib/gen/ShaderTexDesc.cpp deleted file mode 100755 index bdee52d..0000000 --- a/NifExport/niflib/gen/ShaderTexDesc.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "ShaderTexDesc.h" -#include "TexDesc.h" -#include "../obj/NiSourceTexture.h" -using namespace Niflib; - -//Constructor -ShaderTexDesc::ShaderTexDesc() : isUsed(false), unknownInt((uint)0) {}; - -//Destructor -ShaderTexDesc::~ShaderTexDesc() {}; diff --git a/NifExport/niflib/gen/ShaderTexDesc.h b/NifExport/niflib/gen/ShaderTexDesc.h deleted file mode 100755 index c747bd7..0000000 --- a/NifExport/niflib/gen/ShaderTexDesc.h +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SHADERTEXDESC_H_ -#define _SHADERTEXDESC_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "TexDesc.h" -namespace Niflib { - - -/*! - * An extended texture description for shader textures. - */ -struct NIFLIB_API ShaderTexDesc { - /*! Default Constructor */ - ShaderTexDesc(); - /*! Default Destructor */ - ~ShaderTexDesc(); - /*! - * Is it used? - */ - bool isUsed; - /*! - * The texture data. - */ - TexDesc textureData; - /*! - * Unknown. - */ - uint unknownInt; -}; - -} -#endif diff --git a/NifExport/niflib/gen/ShortString.cpp b/NifExport/niflib/gen/ShortString.cpp deleted file mode 100755 index 50d9735..0000000 --- a/NifExport/niflib/gen/ShortString.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "ShortString.h" -using namespace Niflib; - -//Constructor -ShortString::ShortString() : length((byte)0) {}; - -//Destructor -ShortString::~ShortString() {}; diff --git a/NifExport/niflib/gen/ShortString.h b/NifExport/niflib/gen/ShortString.h deleted file mode 100755 index 0028f76..0000000 --- a/NifExport/niflib/gen/ShortString.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SHORTSTRING_H_ -#define _SHORTSTRING_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Another string format, for short strings. Specific to Bethesda- - * specific header tags. - */ -struct NIFLIB_API ShortString { - /*! Default Constructor */ - ShortString(); - /*! Default Destructor */ - ~ShortString(); - /*! - * The string length. - */ - mutable byte length; - /*! - * The string itself, null terminated (the null terminator is taken into - * account in the length byte). - */ - vector<byte > value; -}; - -} -#endif diff --git a/NifExport/niflib/gen/SkinData.cpp b/NifExport/niflib/gen/SkinData.cpp deleted file mode 100755 index 540d1b3..0000000 --- a/NifExport/niflib/gen/SkinData.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "SkinData.h" -#include "SkinWeight.h" -using namespace Niflib; - -//Constructor -SkinData::SkinData() : scale(0.0f), numVertices((ushort)0) {}; - -//Destructor -SkinData::~SkinData() {}; diff --git a/NifExport/niflib/gen/SkinData.h b/NifExport/niflib/gen/SkinData.h deleted file mode 100755 index f33f32b..0000000 --- a/NifExport/niflib/gen/SkinData.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SKINDATA_H_ -#define _SKINDATA_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "SkinWeight.h" -namespace Niflib { - - -/*! - * Skinning data component. - */ -struct NIFLIB_API SkinData { - /*! Default Constructor */ - SkinData(); - /*! Default Destructor */ - ~SkinData(); - /*! - * Rotation offset of the skin from this bone in bind position. - */ - Matrix33 rotation; - /*! - * Translation offset of the skin from this bone in bind position. - */ - Vector3 translation; - /*! - * Scale offset of the skin from this bone in bind position. (Assumption - * - this is always 1.0 so far) - */ - float scale; - /*! - * This has been verified not to be a normalized quaternion. They may or - * may not be related to each other so their specification as an array of - * 4 floats may be misleading. - */ - array<float,4> unknown4Floats; - /*! - * Number of weighted vertices. - */ - mutable ushort numVertices; - /*! - * The vertex weights. - */ - vector<SkinWeight > vertexWeights; -}; - -} -#endif diff --git a/NifExport/niflib/gen/SkinPartition.cpp b/NifExport/niflib/gen/SkinPartition.cpp deleted file mode 100755 index 873a499..0000000 --- a/NifExport/niflib/gen/SkinPartition.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "SkinPartition.h" -using namespace Niflib; - -//Constructor -SkinPartition::SkinPartition() : numVertices((ushort)0), numTriangles((ushort)0), numBones((ushort)0), numStrips((ushort)0), numWeightsPerVertex((ushort)0), hasVertexMap(false), hasVertexWeights(false), hasStrips(false), hasBoneIndices(false) {}; - -//Destructor -SkinPartition::~SkinPartition() {}; - -// needs to be moved elsewhere but this will work for now -ushort SkinPartition::CalcNumTriangles() const { - ushort size = 0; - if (stripLengths.empty()) { - size = (ushort)triangles.size(); - } else { - for (size_t i=0; i<stripLengths.size(); ++i) - size += ((ushort)stripLengths[i] - 2); - } - return size; -} diff --git a/NifExport/niflib/gen/SkinPartition.h b/NifExport/niflib/gen/SkinPartition.h deleted file mode 100755 index 35384f1..0000000 --- a/NifExport/niflib/gen/SkinPartition.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SKINPARTITION_H_ -#define _SKINPARTITION_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Skinning data for a submesh, optimized for hardware skinning. Part of - * NiSkinPartition. - */ -struct NIFLIB_API SkinPartition { - /*! Default Constructor */ - SkinPartition(); - /*! Default Destructor */ - ~SkinPartition(); - /*! - * Number of vertices in this submesh. - */ - mutable ushort numVertices; - /*! - * Number of triangles in this submesh. - */ - mutable ushort numTriangles; - /*! - * Number of triangles in this submesh. - */ - ushort CalcNumTriangles() const; - /*! - * Number of bones influencing this submesh. - */ - mutable ushort numBones; - /*! - * Number of strips in this submesh (zero if not stripped). - */ - mutable ushort numStrips; - /*! - * Number of weight coefficients per vertex. - */ - mutable ushort numWeightsPerVertex; - /*! - * List of bones. - */ - vector<ushort > bones; - /*! - * Do we have a vertex map? - */ - bool hasVertexMap; - /*! - * Maps the weight/influence lists in this submesh to the vertices in the - * shape being skinned. - */ - vector<ushort > vertexMap; - /*! - * Do we have vertex weights? - */ - bool hasVertexWeights; - /*! - * The vertex weights. - */ - vector<vector<float > > vertexWeights; - /*! - * The strip lengths. - */ - mutable vector<ushort > stripLengths; - /*! - * Do we have strip data? - */ - bool hasStrips; - /*! - * The strips. - */ - vector<vector<ushort > > strips; - /*! - * The triangles. - */ - vector<Triangle > triangles; - /*! - * Do we have bone indices? - */ - bool hasBoneIndices; - /*! - * Bone indices, they index into 'Bones'. - */ - vector<vector<byte > > boneIndices; -}; - -} -#endif diff --git a/NifExport/niflib/gen/SkinShape.cpp b/NifExport/niflib/gen/SkinShape.cpp deleted file mode 100755 index 89e1600..0000000 --- a/NifExport/niflib/gen/SkinShape.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "SkinShape.h" -#include "../obj/NiTriShape.h" -#include "../obj/NiSkinInstance.h" -using namespace Niflib; - -//Constructor -SkinShape::SkinShape() : shape(NULL), skinInstance(NULL) {}; - -//Destructor -SkinShape::~SkinShape() {}; diff --git a/NifExport/niflib/gen/SkinShape.h b/NifExport/niflib/gen/SkinShape.h deleted file mode 100755 index ce3e0d7..0000000 --- a/NifExport/niflib/gen/SkinShape.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SKINSHAPE_H_ -#define _SKINSHAPE_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTriShape; -class NiSkinInstance; - -/*! - * Reference to shape and skin instance. - */ -struct NIFLIB_API SkinShape { - /*! Default Constructor */ - SkinShape(); - /*! Default Destructor */ - ~SkinShape(); - /*! - * The shape. - */ - Ref<NiTriShape > shape; - /*! - * Skinning instance for the shape? - */ - Ref<NiSkinInstance > skinInstance; -}; - -} -#endif diff --git a/NifExport/niflib/gen/SkinShapeGroup.cpp b/NifExport/niflib/gen/SkinShapeGroup.cpp deleted file mode 100755 index 235ac48..0000000 --- a/NifExport/niflib/gen/SkinShapeGroup.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "SkinShapeGroup.h" -#include "SkinShape.h" -#include "../obj/NiTriShape.h" -#include "../obj/NiSkinInstance.h" -using namespace Niflib; - -//Constructor -SkinShapeGroup::SkinShapeGroup() : numLinkPairs((uint)0) {}; - -//Destructor -SkinShapeGroup::~SkinShapeGroup() {}; diff --git a/NifExport/niflib/gen/SkinShapeGroup.h b/NifExport/niflib/gen/SkinShapeGroup.h deleted file mode 100755 index fb0c363..0000000 --- a/NifExport/niflib/gen/SkinShapeGroup.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SKINSHAPEGROUP_H_ -#define _SKINSHAPEGROUP_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "SkinShape.h" -namespace Niflib { - - -/*! - * Unknown. - */ -struct NIFLIB_API SkinShapeGroup { - /*! Default Constructor */ - SkinShapeGroup(); - /*! Default Destructor */ - ~SkinShapeGroup(); - /*! - * Counts unknown. - */ - mutable uint numLinkPairs; - /*! - * First link is a NiTriShape block. Second link is a NiSkinInstance - * block. - */ - vector<SkinShape > linkPairs; -}; - -} -#endif diff --git a/NifExport/niflib/gen/SkinWeight.cpp b/NifExport/niflib/gen/SkinWeight.cpp deleted file mode 100755 index 0a8af68..0000000 --- a/NifExport/niflib/gen/SkinWeight.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "SkinWeight.h" -using namespace Niflib; - -//Constructor -SkinWeight::SkinWeight() : index((ushort)0), weight(0.0f) {}; - -//Destructor -SkinWeight::~SkinWeight() {}; diff --git a/NifExport/niflib/gen/SkinWeight.h b/NifExport/niflib/gen/SkinWeight.h deleted file mode 100755 index 6a49949..0000000 --- a/NifExport/niflib/gen/SkinWeight.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _SKINWEIGHT_H_ -#define _SKINWEIGHT_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * A weighted vertex. - */ -struct NIFLIB_API SkinWeight { - /*! Default Constructor */ - SkinWeight(); - /*! Default Destructor */ - ~SkinWeight(); - /*! - * The vertex index, in the mesh. - */ - ushort index; - /*! - * The vertex weight - between 0.0 and 1.0 - */ - float weight; -}; - -} -#endif diff --git a/NifExport/niflib/gen/StringPalette.cpp b/NifExport/niflib/gen/StringPalette.cpp deleted file mode 100755 index 4557174..0000000 --- a/NifExport/niflib/gen/StringPalette.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "StringPalette.h" -using namespace Niflib; - -//Constructor -StringPalette::StringPalette() : length((uint)0) {}; - -//Destructor -StringPalette::~StringPalette() {}; diff --git a/NifExport/niflib/gen/StringPalette.h b/NifExport/niflib/gen/StringPalette.h deleted file mode 100755 index 903488e..0000000 --- a/NifExport/niflib/gen/StringPalette.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _STRINGPALETTE_H_ -#define _STRINGPALETTE_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * A list of \\0 terminated strings. - */ -struct NIFLIB_API StringPalette { - /*! Default Constructor */ - StringPalette(); - /*! Default Destructor */ - ~StringPalette(); - /*! - * A bunch of 0x00 seperated strings. - */ - string palette; - /*! - * Length of the palette string is repeated here. - */ - uint length; -}; - -} -#endif diff --git a/NifExport/niflib/gen/TBC.cpp b/NifExport/niflib/gen/TBC.cpp deleted file mode 100755 index 2ecbb94..0000000 --- a/NifExport/niflib/gen/TBC.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "TBC.h" -using namespace Niflib; - -//Constructor -TBC::TBC() : t(0.0f), b(0.0f), c(0.0f) {}; - -//Destructor -TBC::~TBC() {}; diff --git a/NifExport/niflib/gen/TBC.h b/NifExport/niflib/gen/TBC.h deleted file mode 100755 index 7f9d17d..0000000 --- a/NifExport/niflib/gen/TBC.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _TBC_H_ -#define _TBC_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * Tension, bias, continuity. - */ -struct NIFLIB_API TBC { - /*! Default Constructor */ - TBC(); - /*! Default Destructor */ - ~TBC(); - /*! - * Tension. - */ - float t; - /*! - * Bias. - */ - float b; - /*! - * Continuity. - */ - float c; -}; - -} -#endif diff --git a/NifExport/niflib/gen/TexDesc.cpp b/NifExport/niflib/gen/TexDesc.cpp deleted file mode 100755 index 1bb3845..0000000 --- a/NifExport/niflib/gen/TexDesc.cpp +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "TexDesc.h" -#include "../obj/NiSourceTexture.h" -using namespace Niflib; - -//Constructor -TexDesc::TexDesc() : source(NULL), clampMode((TexClampMode)WRAP_S_WRAP_T), filterMode((TexFilterMode)FILTER_TRILERP), textureSet((uint)0), ps2L((ushort)0), ps2K((ushort)0xFFB5), unknown1((ushort)0), hasTextureTransform(false), wRotation(0.0f), transformType_((uint)0) {}; - -//Destructor -TexDesc::~TexDesc() {}; diff --git a/NifExport/niflib/gen/TexDesc.h b/NifExport/niflib/gen/TexDesc.h deleted file mode 100755 index 7204854..0000000 --- a/NifExport/niflib/gen/TexDesc.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _TEXDESC_H_ -#define _TEXDESC_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiSourceTexture; - -/*! - * Texture description. - */ -struct NIFLIB_API TexDesc { - /*! Default Constructor */ - TexDesc(); - /*! Default Destructor */ - ~TexDesc(); - /*! - * NiSourceTexture block index. - */ - Ref<NiSourceTexture > source; - /*! - * 0=clamp S clamp T, 1=clamp S wrap T, 2=wrap S clamp T, 3=wrap S wrap T - */ - TexClampMode clampMode; - /*! - * 0=nearest, 1=bilinear, 2=trilinear, 3=..., 4=..., 5=... - */ - TexFilterMode filterMode; - /*! - * Texture set? Usually 0. - */ - uint textureSet; - /*! - * 0? - */ - ushort ps2L; - /*! - * 0xFFB5? - */ - ushort ps2K; - /*! - * Unknown, 0 or 0x0101? - */ - ushort unknown1; - /*! - * Determines whether or not the texture's coordinates are transformed. - */ - bool hasTextureTransform; - /*! - * The amount to translate the texture coordinates in each direction? - */ - TexCoord translation; - /*! - * The number of times the texture is tiled in each direction? - */ - TexCoord tiling; - /*! - * 2D Rotation of texture image around third W axis after U and V. - */ - float wRotation; - /*! - * The texture transform type? Doesn't seem to do anything. - */ - uint transformType_; - /*! - * The offset from the origin? - */ - TexCoord centerOffset; -}; - -} -#endif diff --git a/NifExport/niflib/gen/TexSource.cpp b/NifExport/niflib/gen/TexSource.cpp deleted file mode 100755 index 3e75690..0000000 --- a/NifExport/niflib/gen/TexSource.cpp +++ /dev/null @@ -1,13 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "TexSource.h" -#include "../obj/NiObject.h" -#include "../obj/NiPixelData.h" -using namespace Niflib; - -//Constructor -TexSource::TexSource() : useExternal((byte)0), unknownLink(NULL), unknownByte((byte)0), pixelData(NULL) {}; - -//Destructor -TexSource::~TexSource() {}; diff --git a/NifExport/niflib/gen/TexSource.h b/NifExport/niflib/gen/TexSource.h deleted file mode 100755 index bd9e75e..0000000 --- a/NifExport/niflib/gen/TexSource.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _TEXSOURCE_H_ -#define _TEXSOURCE_H_ - -#include "../NIF_IO.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; -class NiPixelData; - -/*! - * A texture source. - */ -struct NIFLIB_API TexSource { - /*! Default Constructor */ - TexSource(); - /*! Default Destructor */ - ~TexSource(); - /*! - * Is the texture external? - */ - byte useExternal; - /*! - * The external texture file name. Note: all original morrowind nifs use - * name.ext only for addressing the textures, but most mods use something - * like textures/[subdir/]name.ext. This is due to a feature in Morrowind - * resource manager: it loads name.ext, textures/name.ext and - * textures/subdir/name.ext but NOT subdir/name.ext. - */ - string fileName; - /*! - * Unknown. - */ - Ref<NiObject > unknownLink; - /*! - * Unknown. - */ - byte unknownByte; - /*! - * The original source filename of the image embedded by the referred - * NiPixelData block. - */ - string originalFileName_; - /*! - * Pixel data block index. - */ - Ref<NiPixelData > pixelData; -}; - -} -#endif diff --git a/NifExport/niflib/gen/hkTriangle.cpp b/NifExport/niflib/gen/hkTriangle.cpp deleted file mode 100755 index f17cecf..0000000 --- a/NifExport/niflib/gen/hkTriangle.cpp +++ /dev/null @@ -1,11 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "hkTriangle.h" -using namespace Niflib; - -//Constructor -hkTriangle::hkTriangle() : unknownShort((ushort)0) {}; - -//Destructor -hkTriangle::~hkTriangle() {}; diff --git a/NifExport/niflib/gen/hkTriangle.h b/NifExport/niflib/gen/hkTriangle.h deleted file mode 100755 index 0946ce7..0000000 --- a/NifExport/niflib/gen/hkTriangle.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _HKTRIANGLE_H_ -#define _HKTRIANGLE_H_ - -#include "../NIF_IO.h" - -namespace Niflib { - - -/*! - * A triangle with extra data used for physics. - */ -struct NIFLIB_API hkTriangle { - /*! Default Constructor */ - hkTriangle(); - /*! Default Destructor */ - ~hkTriangle(); - /*! - * The triangle. - */ - Triangle triangle; - /*! - * Another short, doesn't look like a vertex index. - */ - ushort unknownShort; - /*! - * This appears to be a normalized vector, so probably it is a normal or - * a tangent vector or something like that. - */ - Vector3 normal; -}; - -} -#endif diff --git a/NifExport/niflib/gen/obj_defines.h b/NifExport/niflib/gen/obj_defines.h deleted file mode 100755 index 3b5ac3d..0000000 --- a/NifExport/niflib/gen/obj_defines.h +++ /dev/null @@ -1,5819 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _OBJ_DEFINES_H_ -#define _OBJ_DEFINES_H_ - -#define MAXARRAYDUMP 20 - -#define STANDARD_INTERNAL_METHODS \ -private:\ - void InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version );\ - void InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const;\ - string InternalAsString( bool verbose ) const;\ - void InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version );\ - list<NiObjectRef> InternalGetRefs() const; -#define NI_OBJECT_MEMBERS \ - -#define NI_OBJECT_INCLUDE ".h" \ - -#define NI_OBJECT_PARENT \ - -#define NI_OBJECT_CONSTRUCT \ - -#define NI_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define A_KEYED_DATA_MEMBERS \ - -#define A_KEYED_DATA_INCLUDE "NiObject.h" \ - -#define A_KEYED_DATA_PARENT NiObject \ - -#define A_KEYED_DATA_CONSTRUCT \ - -#define A_KEYED_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define A_KEYED_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define A_KEYED_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define A_KEYED_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define A_KEYED_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define A_PARTICLE_MODIFIER_MEMBERS \ -Ref<AParticleModifier > nextModifier; \ -NiParticleSystemController * controller; \ - -#define A_PARTICLE_MODIFIER_INCLUDE "NiObject.h" \ - -#define A_PARTICLE_MODIFIER_PARENT NiObject \ - -#define A_PARTICLE_MODIFIER_CONSTRUCT \ - : nextModifier(NULL), controller(NULL) \ - -#define A_PARTICLE_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define A_PARTICLE_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define A_PARTICLE_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define A_PARTICLE_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define A_PARTICLE_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_REF_OBJECT_MEMBERS \ - -#define BHK_REF_OBJECT_INCLUDE "NiObject.h" \ - -#define BHK_REF_OBJECT_PARENT NiObject \ - -#define BHK_REF_OBJECT_CONSTRUCT \ - -#define BHK_REF_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_REF_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_REF_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_REF_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_REF_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_SERIALIZABLE_MEMBERS \ - -#define BHK_SERIALIZABLE_INCLUDE "bhkRefObject.h" \ - -#define BHK_SERIALIZABLE_PARENT bhkRefObject \ - -#define BHK_SERIALIZABLE_CONSTRUCT \ - -#define BHK_SERIALIZABLE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_SERIALIZABLE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_SERIALIZABLE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_SERIALIZABLE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_SERIALIZABLE_GETREFS \ -return InternalGetRefs(); \ - -#define ABHK_CONSTRAINT_MEMBERS \ -mutable uint numBodies; \ -vector<bhkShape * > bodies; \ -uint priority; \ - -#define ABHK_CONSTRAINT_INCLUDE "bhkSerializable.h" \ - -#define ABHK_CONSTRAINT_PARENT bhkSerializable \ - -#define ABHK_CONSTRAINT_CONSTRUCT \ - : numBodies((uint)0), priority((uint)1) \ - -#define ABHK_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define ABHK_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define ABHK_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define ABHK_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define ABHK_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define ABHK_RAGDOLL_CONSTRAINT_MEMBERS \ -Float4 pivotA; \ -Float4 planeA; \ -Float4 twistA; \ -Float4 pivotB; \ -Float4 planeB; \ -Float4 twistB; \ -float coneMinAngle; \ -float planeMinAngle; \ -float planeMaxAngle; \ -float twistMinAngle; \ -float twistMaxAngle; \ -float maxFriction; \ - -#define ABHK_RAGDOLL_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ - -#define ABHK_RAGDOLL_CONSTRAINT_PARENT AbhkConstraint \ - -#define ABHK_RAGDOLL_CONSTRAINT_CONSTRUCT \ - : coneMinAngle(0.0f), planeMinAngle(0.0f), planeMaxAngle(0.0f), twistMinAngle(0.0f), twistMaxAngle(0.0f), maxFriction(0.0f) \ - -#define ABHK_RAGDOLL_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define ABHK_RAGDOLL_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define ABHK_RAGDOLL_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define ABHK_RAGDOLL_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define ABHK_RAGDOLL_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_SHAPE_MEMBERS \ - -#define BHK_SHAPE_INCLUDE "bhkSerializable.h" \ - -#define BHK_SHAPE_PARENT bhkSerializable \ - -#define BHK_SHAPE_CONSTRUCT \ - -#define BHK_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define ABHK_SHAPE_COLLECTION_MEMBERS \ - -#define ABHK_SHAPE_COLLECTION_INCLUDE "bhkShape.h" \ - -#define ABHK_SHAPE_COLLECTION_PARENT bhkShape \ - -#define ABHK_SHAPE_COLLECTION_CONSTRUCT \ - -#define ABHK_SHAPE_COLLECTION_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define ABHK_SHAPE_COLLECTION_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define ABHK_SHAPE_COLLECTION_STRING \ -return InternalAsString( verbose ); \ - -#define ABHK_SHAPE_COLLECTION_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define ABHK_SHAPE_COLLECTION_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_SPHERE_REP_SHAPE_MEMBERS \ -uint material; \ - -#define BHK_SPHERE_REP_SHAPE_INCLUDE "bhkShape.h" \ - -#define BHK_SPHERE_REP_SHAPE_PARENT bhkShape \ - -#define BHK_SPHERE_REP_SHAPE_CONSTRUCT \ - : material((uint)0) \ - -#define BHK_SPHERE_REP_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_SPHERE_REP_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_SPHERE_REP_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_SPHERE_REP_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_SPHERE_REP_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_CONVEX_SHAPE_MEMBERS \ - -#define BHK_CONVEX_SHAPE_INCLUDE "bhkSphereRepShape.h" \ - -#define BHK_CONVEX_SHAPE_PARENT bhkSphereRepShape \ - -#define BHK_CONVEX_SHAPE_CONSTRUCT \ - -#define BHK_CONVEX_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_CONVEX_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_CONVEX_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_CONVEX_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_CONVEX_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_WORLD_OBJECT_MEMBERS \ - -#define BHK_WORLD_OBJECT_INCLUDE "bhkShape.h" \ - -#define BHK_WORLD_OBJECT_PARENT bhkShape \ - -#define BHK_WORLD_OBJECT_CONSTRUCT \ - -#define BHK_WORLD_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_WORLD_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_WORLD_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_WORLD_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_WORLD_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_ENTITY_MEMBERS \ -Ref<bhkShape > shape; \ -uint layer; \ - -#define BHK_ENTITY_INCLUDE "bhkWorldObject.h" \ - -#define BHK_ENTITY_PARENT bhkWorldObject \ - -#define BHK_ENTITY_CONSTRUCT \ - : shape(NULL), layer((uint)0) \ - -#define BHK_ENTITY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_ENTITY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_ENTITY_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_ENTITY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_ENTITY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_COLLISION_OBJECT_MEMBERS \ -NiAVObject * parent; \ -ushort unknownShort; \ -Ref<NiObject > body; \ - -#define NI_COLLISION_OBJECT_INCLUDE "NiObject.h" \ - -#define NI_COLLISION_OBJECT_PARENT NiObject \ - -#define NI_COLLISION_OBJECT_CONSTRUCT \ - : parent(NULL), unknownShort((ushort)0), body(NULL) \ - -#define NI_COLLISION_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_COLLISION_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_COLLISION_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_COLLISION_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_COLLISION_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_EXTRA_DATA_MEMBERS \ -string name; \ -Ref<NiExtraData > nextExtraData; \ - -#define NI_EXTRA_DATA_INCLUDE "NiObject.h" \ - -#define NI_EXTRA_DATA_PARENT NiObject \ - -#define NI_EXTRA_DATA_CONSTRUCT \ - : nextExtraData(NULL) \ - -#define NI_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_INTERPOLATOR_MEMBERS \ - -#define NI_INTERPOLATOR_INCLUDE "NiObject.h" \ - -#define NI_INTERPOLATOR_PARENT NiObject \ - -#define NI_INTERPOLATOR_CONSTRUCT \ - -#define NI_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BLEND_INTERPOLATOR_MEMBERS \ -ushort unknownShort; \ -uint unknownInt; \ - -#define NI_BLEND_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_BLEND_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_BLEND_INTERPOLATOR_CONSTRUCT \ - : unknownShort((ushort)0), unknownInt((uint)0) \ - -#define NI_BLEND_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BLEND_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BLEND_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BLEND_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BLEND_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_SPLINE_INTERPOLATOR_MEMBERS \ -float startTime; \ -float stopTime; \ - -#define NI_B_SPLINE_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_B_SPLINE_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_B_SPLINE_INTERPOLATOR_CONSTRUCT \ - : startTime(0.0f), stopTime(0.0f) \ - -#define NI_B_SPLINE_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_SPLINE_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_SPLINE_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_OBJECT_N_E_T_MEMBERS \ -string name; \ -Ref<NiExtraData > extraData; \ -mutable uint numExtraDataList; \ -vector<Ref<NiExtraData > > extraDataList; \ -Ref<NiTimeController > controller; \ - -#define NI_OBJECT_N_E_T_INCLUDE "NiObject.h" \ - -#define NI_OBJECT_N_E_T_PARENT NiObject \ - -#define NI_OBJECT_N_E_T_CONSTRUCT \ - : extraData(NULL), numExtraDataList((uint)0), controller(NULL) \ - -#define NI_OBJECT_N_E_T_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_OBJECT_N_E_T_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_OBJECT_N_E_T_STRING \ -return InternalAsString( verbose ); \ - -#define NI_OBJECT_N_E_T_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_OBJECT_N_E_T_GETREFS \ -return InternalGetRefs(); \ - -#define NI_A_V_OBJECT_MEMBERS \ -ushort flags; \ -Vector3 translation; \ -Matrix33 rotation; \ -float scale; \ -Vector3 velocity; \ -mutable uint numProperties; \ -vector<Ref<NiProperty > > properties; \ -bool hasBoundingBox; \ -BoundingBox boundingBox; \ -Ref<NiCollisionData > collisionData; \ -Ref<NiCollisionObject > collisionObject; \ - -#define NI_A_V_OBJECT_INCLUDE "NiObjectNET.h" \ - -#define NI_A_V_OBJECT_PARENT NiObjectNET \ - -#define NI_A_V_OBJECT_CONSTRUCT \ - : flags((ushort)0), scale(1.0f), numProperties((uint)0), hasBoundingBox(false), collisionData(NULL), collisionObject(NULL) \ - -#define NI_A_V_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_A_V_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_A_V_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_A_V_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_A_V_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_DYNAMIC_EFFECT_MEMBERS \ -bool hasAffectedNodeList_; \ -uint affectedNodeList_; \ -bool switchState; \ -mutable uint numAffectedNodes; \ -vector<Ref<NiAVObject > > affectedNodes; \ - -#define NI_DYNAMIC_EFFECT_INCLUDE "NiAVObject.h" \ - -#define NI_DYNAMIC_EFFECT_PARENT NiAVObject \ - -#define NI_DYNAMIC_EFFECT_CONSTRUCT \ - : hasAffectedNodeList_(false), affectedNodeList_((uint)0), switchState(false), numAffectedNodes((uint)0) \ - -#define NI_DYNAMIC_EFFECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_DYNAMIC_EFFECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_DYNAMIC_EFFECT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_DYNAMIC_EFFECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_DYNAMIC_EFFECT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_LIGHT_MEMBERS \ -float dimmer; \ -Color3 ambientColor; \ -Color3 diffuseColor; \ -Color3 specularColor; \ - -#define NI_LIGHT_INCLUDE "NiDynamicEffect.h" \ - -#define NI_LIGHT_PARENT NiDynamicEffect \ - -#define NI_LIGHT_CONSTRUCT \ - : dimmer(0.0f) \ - -#define NI_LIGHT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_LIGHT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_LIGHT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_LIGHT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_LIGHT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PROPERTY_MEMBERS \ - -#define NI_PROPERTY_INCLUDE "NiObjectNET.h" \ - -#define NI_PROPERTY_PARENT NiObjectNET \ - -#define NI_PROPERTY_CONSTRUCT \ - -#define NI_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_MODIFIER_MEMBERS \ -string name; \ -uint order; \ -NiParticleSystem * target; \ -bool active; \ - -#define NI_P_SYS_MODIFIER_INCLUDE "NiObject.h" \ - -#define NI_P_SYS_MODIFIER_PARENT NiObject \ - -#define NI_P_SYS_MODIFIER_CONSTRUCT \ - : order((uint)0), target(NULL), active(false) \ - -#define NI_P_SYS_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_MEMBERS \ -float speed; \ -float speedVariation; \ -float declination; \ -float declinationVariation; \ -float planarAngle; \ -float planarAngleVariation; \ -Color4 initialColor; \ -float initialRadius; \ -float radiusVariation; \ -float lifeSpan; \ -float lifeSpanVariation; \ - -#define NI_P_SYS_EMITTER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_EMITTER_PARENT NiPSysModifier \ - -#define NI_P_SYS_EMITTER_CONSTRUCT \ - : speed(0.0f), speedVariation(0.0f), declination(0.0f), declinationVariation(0.0f), planarAngle(0.0f), planarAngleVariation(0.0f), initialRadius(0.0f), radiusVariation(0.0f), lifeSpan(0.0f), lifeSpanVariation(0.0f) \ - -#define NI_P_SYS_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_VOLUME_EMITTER_MEMBERS \ -NiNode * emitterObject; \ - -#define NI_P_SYS_VOLUME_EMITTER_INCLUDE "NiPSysEmitter.h" \ - -#define NI_P_SYS_VOLUME_EMITTER_PARENT NiPSysEmitter \ - -#define NI_P_SYS_VOLUME_EMITTER_CONSTRUCT \ - : emitterObject(NULL) \ - -#define NI_P_SYS_VOLUME_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_VOLUME_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_VOLUME_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_VOLUME_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_VOLUME_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TIME_CONTROLLER_MEMBERS \ -Ref<NiTimeController > nextController; \ -ushort flags; \ -float frequency; \ -float phase; \ -float startTime; \ -float stopTime; \ -NiObjectNET * target; \ - -#define NI_TIME_CONTROLLER_INCLUDE "NiObject.h" \ - -#define NI_TIME_CONTROLLER_PARENT NiObject \ - -#define NI_TIME_CONTROLLER_CONSTRUCT \ - : nextController(NULL), flags((ushort)0), frequency(0.0f), phase(0.0f), startTime(0.0f), stopTime(0.0f), target(NULL) \ - -#define NI_TIME_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TIME_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TIME_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TIME_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TIME_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define A_BONE_L_O_D_CONTROLLER_MEMBERS \ -uint unknownInt1; \ -mutable uint numNodeGroups; \ -uint unknownInt2; \ -vector<NodeGroup > nodeGroups; \ - -#define A_BONE_L_O_D_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define A_BONE_L_O_D_CONTROLLER_PARENT NiTimeController \ - -#define A_BONE_L_O_D_CONTROLLER_CONSTRUCT \ - : unknownInt1((uint)0), numNodeGroups((uint)0), unknownInt2((uint)0) \ - -#define A_BONE_L_O_D_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define A_BONE_L_O_D_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define A_BONE_L_O_D_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define A_BONE_L_O_D_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define A_BONE_L_O_D_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_MEMBERS \ -Ref<NiInterpolator > interpolator; \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_PARENT NiTimeController \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_CONSTRUCT \ - : interpolator(NULL) \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SINGLE_INTERPOLATOR_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define A_P_SYS_CTLR_MEMBERS \ -string modifierName; \ - -#define A_P_SYS_CTLR_INCLUDE "NiSingleInterpolatorController.h" \ - -#define A_P_SYS_CTLR_PARENT NiSingleInterpolatorController \ - -#define A_P_SYS_CTLR_CONSTRUCT \ - -#define A_P_SYS_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define A_P_SYS_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define A_P_SYS_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define A_P_SYS_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define A_P_SYS_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRI_BASED_GEOM_MEMBERS \ -Ref<NiTriBasedGeomData > data; \ -Ref<NiSkinInstance > skinInstance; \ -bool hasShader; \ -string shaderName; \ -Ref<NiObject > unknownLink; \ - -#define NI_TRI_BASED_GEOM_INCLUDE "NiAVObject.h" \ - -#define NI_TRI_BASED_GEOM_PARENT NiAVObject \ - -#define NI_TRI_BASED_GEOM_CONSTRUCT \ - : data(NULL), skinInstance(NULL), hasShader(false), unknownLink(NULL) \ - -#define NI_TRI_BASED_GEOM_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRI_BASED_GEOM_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRI_BASED_GEOM_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRI_BASED_GEOM_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRI_BASED_GEOM_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRI_BASED_GEOM_DATA_MEMBERS \ -string name; \ -mutable ushort numVertices; \ -ushort unknownShort1; \ -bool hasVertices; \ -vector<Vector3 > vertices; \ -mutable byte numUvSets2; \ -byte unknownByte; \ -bool hasNormals; \ -vector<Vector3 > normals; \ -vector<Vector3 > unknownVectors1; \ -vector<Vector3 > unknownVectors2; \ -Vector3 center; \ -float radius; \ -bool hasVertexColors; \ -vector<Color4 > vertexColors; \ -mutable ushort numUvSets; \ -bool hasUv; \ -vector<vector<TexCoord > > uvSets; \ -ushort unknownShort2; \ -Ref<NiObject > unknownLink; \ - -#define NI_TRI_BASED_GEOM_DATA_INCLUDE "NiObject.h" \ - -#define NI_TRI_BASED_GEOM_DATA_PARENT NiObject \ - -#define NI_TRI_BASED_GEOM_DATA_CONSTRUCT \ - : numVertices((ushort)0), unknownShort1((ushort)0), hasVertices(false), numUvSets2((byte)0), unknownByte((byte)0), hasNormals(false), radius(0.0f), hasVertexColors(false), numUvSets((ushort)0), hasUv(false), unknownShort2((ushort)0), unknownLink(NULL) \ - -#define NI_TRI_BASED_GEOM_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRI_BASED_GEOM_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRI_BASED_GEOM_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRI_BASED_GEOM_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRI_BASED_GEOM_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define A_P_SYS_DATA_MEMBERS \ -bool hasUnknownFloats1; \ -vector<float > unknownFloats1; \ -ushort unknownShort3; \ -bool hasUnknownFloats2; \ -vector<float > unknownFloats2; \ -byte unknownByte1; \ - -#define A_P_SYS_DATA_INCLUDE "NiTriBasedGeomData.h" \ - -#define A_P_SYS_DATA_PARENT NiTriBasedGeomData \ - -#define A_P_SYS_DATA_CONSTRUCT \ - : hasUnknownFloats1(false), unknownShort3((ushort)0), hasUnknownFloats2(false), unknownByte1((byte)0) \ - -#define A_P_SYS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define A_P_SYS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define A_P_SYS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define A_P_SYS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define A_P_SYS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_BLEND_COLLISION_OBJECT_MEMBERS \ -float unknownFloat1; \ -float unknownFloat2; \ - -#define BHK_BLEND_COLLISION_OBJECT_INCLUDE "NiCollisionObject.h" \ - -#define BHK_BLEND_COLLISION_OBJECT_PARENT NiCollisionObject \ - -#define BHK_BLEND_COLLISION_OBJECT_CONSTRUCT \ - : unknownFloat1(0.0f), unknownFloat2(0.0f) \ - -#define BHK_BLEND_COLLISION_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_BLEND_COLLISION_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_BLEND_COLLISION_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_BLEND_COLLISION_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_BLEND_COLLISION_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_BLEND_CONTROLLER_MEMBERS \ -uint unknownInt; \ - -#define BHK_BLEND_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define BHK_BLEND_CONTROLLER_PARENT NiTimeController \ - -#define BHK_BLEND_CONTROLLER_CONSTRUCT \ - : unknownInt((uint)0) \ - -#define BHK_BLEND_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_BLEND_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_BLEND_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_BLEND_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_BLEND_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_BOX_SHAPE_MEMBERS \ -float unknownFloat1; \ -ushort unknownShort1; \ -ushort unknownShort2; \ -ushort unknownShort3; \ -ushort unknownShort4; \ -Vector3 dimensions; \ -float unknownFloat2; \ - -#define BHK_BOX_SHAPE_INCLUDE "bhkConvexShape.h" \ - -#define BHK_BOX_SHAPE_PARENT bhkConvexShape \ - -#define BHK_BOX_SHAPE_CONSTRUCT \ - : unknownFloat1(0.0f), unknownShort1((ushort)0), unknownShort2((ushort)0), unknownShort3((ushort)0), unknownShort4((ushort)0), unknownFloat2(0.0f) \ - -#define BHK_BOX_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_BOX_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_BOX_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_BOX_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_BOX_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_CAPSULE_SHAPE_MEMBERS \ -float radius; \ -ushort unknownShort1; \ -ushort unknownShort2; \ -ushort unknownShort3; \ -ushort unknownShort4; \ -Vector3 firstPoint; \ -float radius1; \ -Vector3 secondPoint; \ -float radius2; \ - -#define BHK_CAPSULE_SHAPE_INCLUDE "bhkConvexShape.h" \ - -#define BHK_CAPSULE_SHAPE_PARENT bhkConvexShape \ - -#define BHK_CAPSULE_SHAPE_CONSTRUCT \ - : radius(0.0f), unknownShort1((ushort)0), unknownShort2((ushort)0), unknownShort3((ushort)0), unknownShort4((ushort)0), radius1(0.0f), radius2(0.0f) \ - -#define BHK_CAPSULE_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_CAPSULE_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_CAPSULE_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_CAPSULE_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_CAPSULE_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_COLLISION_OBJECT_MEMBERS \ - -#define BHK_COLLISION_OBJECT_INCLUDE "NiCollisionObject.h" \ - -#define BHK_COLLISION_OBJECT_PARENT NiCollisionObject \ - -#define BHK_COLLISION_OBJECT_CONSTRUCT \ - -#define BHK_COLLISION_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_COLLISION_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_COLLISION_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_COLLISION_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_COLLISION_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_CONVEX_VERTICES_SHAPE_MEMBERS \ -array<float,7> unknownFloats1; \ -mutable uint num1; \ -vector<Float4 > unknownVectors1; \ -mutable uint num2; \ -vector<Float4 > unknownVectors2; \ - -#define BHK_CONVEX_VERTICES_SHAPE_INCLUDE "bhkSphereRepShape.h" \ - -#define BHK_CONVEX_VERTICES_SHAPE_PARENT bhkSphereRepShape \ - -#define BHK_CONVEX_VERTICES_SHAPE_CONSTRUCT \ - : num1((uint)0), num2((uint)0) \ - -#define BHK_CONVEX_VERTICES_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_CONVEX_VERTICES_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_CONVEX_VERTICES_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_CONVEX_VERTICES_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_CONVEX_VERTICES_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_HINGE_CONSTRAINT_MEMBERS \ -array<array<float,5>,4> unknownFloats; \ - -#define BHK_HINGE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ - -#define BHK_HINGE_CONSTRAINT_PARENT AbhkConstraint \ - -#define BHK_HINGE_CONSTRAINT_CONSTRUCT \ - -#define BHK_HINGE_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_HINGE_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_HINGE_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_HINGE_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_HINGE_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_MEMBERS \ -LimitedHingeDescriptor limitedHinge; \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_PARENT AbhkConstraint \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_CONSTRUCT \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_LIMITED_HINGE_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_LIST_SHAPE_MEMBERS \ -mutable uint numSubShapes; \ -vector<Ref<bhkShape > > subShapes; \ -uint material; \ -array<float,6> unknownFloats; \ -mutable uint numUnknownInts; \ -vector<uint > unknownInts; \ - -#define BHK_LIST_SHAPE_INCLUDE "AbhkShapeCollection.h" \ - -#define BHK_LIST_SHAPE_PARENT AbhkShapeCollection \ - -#define BHK_LIST_SHAPE_CONSTRUCT \ - : numSubShapes((uint)0), material((uint)0), numUnknownInts((uint)0) \ - -#define BHK_LIST_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_LIST_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_LIST_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_LIST_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_LIST_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_MALLEABLE_CONSTRAINT_MEMBERS \ -uint type; \ -uint unknownInt2; \ -Ref<NiObject > unknownLink1; \ -Ref<NiObject > unknownLink2; \ -uint unknownInt3; \ -RagDollDescriptor ragdoll; \ -LimitedHingeDescriptor limitedHinge; \ -float tau; \ -float damping; \ - -#define BHK_MALLEABLE_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ - -#define BHK_MALLEABLE_CONSTRAINT_PARENT AbhkConstraint \ - -#define BHK_MALLEABLE_CONSTRAINT_CONSTRUCT \ - : type((uint)0), unknownInt2((uint)0), unknownLink1(NULL), unknownLink2(NULL), unknownInt3((uint)0), tau(0.0f), damping(0.0f) \ - -#define BHK_MALLEABLE_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_MALLEABLE_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_MALLEABLE_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_MALLEABLE_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_MALLEABLE_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_MOPP_BV_TREE_SHAPE_MEMBERS \ -Ref<bhkShape > shape; \ -uint material; \ -array<byte,8> unknownBytes1; \ -float unknownFloat; \ -mutable uint numUnknownBytes2; \ -vector<byte > unknownBytes2; \ -Vector3 unknownVector; \ -float unknownFloat2; \ - -#define BHK_MOPP_BV_TREE_SHAPE_INCLUDE "bhkShape.h" \ - -#define BHK_MOPP_BV_TREE_SHAPE_PARENT bhkShape \ - -#define BHK_MOPP_BV_TREE_SHAPE_CONSTRUCT \ - : shape(NULL), material((uint)0), unknownFloat(0.0f), numUnknownBytes2((uint)0), unknownFloat2(0.0f) \ - -#define BHK_MOPP_BV_TREE_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_MOPP_BV_TREE_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_MOPP_BV_TREE_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_MOPP_BV_TREE_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_MOPP_BV_TREE_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_MULTI_SPHERE_SHAPE_MEMBERS \ -float unknownFloat1; \ -float unknownFloat2; \ -float unknownFloat3; \ -uint unknownInt2; \ -array<float,8> unknownFloats; \ - -#define BHK_MULTI_SPHERE_SHAPE_INCLUDE "bhkSphereRepShape.h" \ - -#define BHK_MULTI_SPHERE_SHAPE_PARENT bhkSphereRepShape \ - -#define BHK_MULTI_SPHERE_SHAPE_CONSTRUCT \ - : unknownFloat1(0.0f), unknownFloat2(0.0f), unknownFloat3(0.0f), unknownInt2((uint)0) \ - -#define BHK_MULTI_SPHERE_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_MULTI_SPHERE_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_MULTI_SPHERE_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_MULTI_SPHERE_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_MULTI_SPHERE_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_NI_TRI_STRIPS_SHAPE_MEMBERS \ -float unknownFloat1; \ -uint unknownInt1; \ -array<uint,4> unknownInts1; \ -uint unknownInt2; \ -Vector3 scale; \ -uint unknownInt3; \ -mutable uint numStripsData; \ -vector<Ref<NiTriStripsData > > stripsData; \ -mutable uint numUnknownInts2; \ -vector<uint > unknownInts2; \ - -#define BHK_NI_TRI_STRIPS_SHAPE_INCLUDE "bhkSphereRepShape.h" \ - -#define BHK_NI_TRI_STRIPS_SHAPE_PARENT bhkSphereRepShape \ - -#define BHK_NI_TRI_STRIPS_SHAPE_CONSTRUCT \ - : unknownFloat1(0.1f), unknownInt1((uint)0x004ABE60), unknownInt2((uint)1), scale(1.0f, 1.0f, 1.0f), unknownInt3((uint)0), numStripsData((uint)0), numUnknownInts2((uint)0) \ - -#define BHK_NI_TRI_STRIPS_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_NI_TRI_STRIPS_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_NI_TRI_STRIPS_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_NI_TRI_STRIPS_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_NI_TRI_STRIPS_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_MEMBERS \ -mutable ushort numSubparts; \ -vector< array<uint,3> > subparts; \ -array<float,9> unknownFloats; \ -float scale; \ -array<float,3> unknownFloats2; \ -Ref<hkPackedNiTriStripsData > data; \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_INCLUDE "AbhkShapeCollection.h" \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_PARENT AbhkShapeCollection \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_CONSTRUCT \ - : numSubparts((ushort)0), scale(1.0f), data(NULL) \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_PACKED_NI_TRI_STRIPS_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_PRISMATIC_CONSTRAINT_MEMBERS \ -array<Float4,8> unknownVectors; \ -array<float,3> unknownFloats2; \ - -#define BHK_PRISMATIC_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ - -#define BHK_PRISMATIC_CONSTRAINT_PARENT AbhkConstraint \ - -#define BHK_PRISMATIC_CONSTRAINT_CONSTRUCT \ - -#define BHK_PRISMATIC_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_PRISMATIC_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_PRISMATIC_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_PRISMATIC_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_PRISMATIC_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_RAGDOLL_CONSTRAINT_MEMBERS \ - -#define BHK_RAGDOLL_CONSTRAINT_INCLUDE "AbhkRagdollConstraint.h" \ - -#define BHK_RAGDOLL_CONSTRAINT_PARENT AbhkRagdollConstraint \ - -#define BHK_RAGDOLL_CONSTRAINT_CONSTRUCT \ - -#define BHK_RAGDOLL_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_RAGDOLL_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_RAGDOLL_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_RAGDOLL_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_RAGDOLL_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_RIGID_BODY_MEMBERS \ -array<float,5> unknownFloats1; \ -array<ushort,4> unknownShorts1; \ -uint layerCopy_; \ -array<ushort,6> unknownShorts2; \ -Vector3 translation; \ -float unknownFloat00; \ -QuaternionXYZW rotation; \ -Vector3 linearVelocity; \ -float unknownFloat01; \ -Vector3 angularVelocity; \ -float unknownFloat02; \ -array<float,12> transform_; \ -Vector3 center; \ -float unknownFloat03; \ -float mass; \ -float linearDamping; \ -float angularDamping; \ -float friction; \ -float restitution; \ -float maxLinearVelocity; \ -float maxAngularVelocity; \ -float penDepth; \ -byte motionSystem_; \ -byte unknownByte1; \ -byte unknownByte2; \ -byte qualityType; \ -uint unknownInt6; \ -uint unknownInt7; \ -uint unknownInt8; \ -mutable uint numConstraints; \ -vector<Ref<AbhkConstraint > > constraints; \ - -#define BHK_RIGID_BODY_INCLUDE "bhkEntity.h" \ - -#define BHK_RIGID_BODY_PARENT bhkEntity \ - -#define BHK_RIGID_BODY_CONSTRUCT \ - : layerCopy_((uint)0), unknownFloat00(0.0f), unknownFloat01(0.0f), unknownFloat02(0.0f), unknownFloat03(0.0f), mass(0.0f), linearDamping(0.0f), angularDamping(0.0f), friction(0.0f), restitution(0.0f), maxLinearVelocity(0.0f), maxAngularVelocity(31.415926535f), penDepth(0.0f), motionSystem_((byte)0), unknownByte1((byte)0), unknownByte2((byte)0), qualityType((byte)0), unknownInt6((uint)0), unknownInt7((uint)0), unknownInt8((uint)0), numConstraints((uint)0) \ - -#define BHK_RIGID_BODY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_RIGID_BODY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_RIGID_BODY_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_RIGID_BODY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_RIGID_BODY_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_RIGID_BODY_T_MEMBERS \ - -#define BHK_RIGID_BODY_T_INCLUDE "bhkRigidBody.h" \ - -#define BHK_RIGID_BODY_T_PARENT bhkRigidBody \ - -#define BHK_RIGID_BODY_T_CONSTRUCT \ - -#define BHK_RIGID_BODY_T_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_RIGID_BODY_T_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_RIGID_BODY_T_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_RIGID_BODY_T_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_RIGID_BODY_T_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_MEMBERS \ -array<float,7> unkownFloats; \ -array<array<float,3>,5> unknownFloats2; \ -float unknownFloat; \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_INCLUDE "bhkEntity.h" \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_PARENT bhkEntity \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_CONSTRUCT \ - : unknownFloat(0.0f) \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_SIMPLE_SHAPE_PHANTOM_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_S_P_COLLISION_OBJECT_MEMBERS \ - -#define BHK_S_P_COLLISION_OBJECT_INCLUDE "NiCollisionObject.h" \ - -#define BHK_S_P_COLLISION_OBJECT_PARENT NiCollisionObject \ - -#define BHK_S_P_COLLISION_OBJECT_CONSTRUCT \ - -#define BHK_S_P_COLLISION_OBJECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_S_P_COLLISION_OBJECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_S_P_COLLISION_OBJECT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_S_P_COLLISION_OBJECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_S_P_COLLISION_OBJECT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_SPHERE_SHAPE_MEMBERS \ -float radius; \ - -#define BHK_SPHERE_SHAPE_INCLUDE "bhkConvexShape.h" \ - -#define BHK_SPHERE_SHAPE_PARENT bhkConvexShape \ - -#define BHK_SPHERE_SHAPE_CONSTRUCT \ - : radius(0.0f) \ - -#define BHK_SPHERE_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_SPHERE_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_SPHERE_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_SPHERE_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_SPHERE_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_STIFF_SPRING_CONSTRAINT_MEMBERS \ -array<array<float,2>,4> unknownFloats; \ -float unknownFloat; \ - -#define BHK_STIFF_SPRING_CONSTRAINT_INCLUDE "AbhkConstraint.h" \ - -#define BHK_STIFF_SPRING_CONSTRAINT_PARENT AbhkConstraint \ - -#define BHK_STIFF_SPRING_CONSTRAINT_CONSTRUCT \ - : unknownFloat(0.0f) \ - -#define BHK_STIFF_SPRING_CONSTRAINT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_STIFF_SPRING_CONSTRAINT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_STIFF_SPRING_CONSTRAINT_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_STIFF_SPRING_CONSTRAINT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_STIFF_SPRING_CONSTRAINT_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_TRANSFORM_SHAPE_MEMBERS \ -float unknownFloat1; \ -float unknownFloat2; \ -float unknownFloat3; \ -Matrix44 transform; \ - -#define BHK_TRANSFORM_SHAPE_INCLUDE "bhkEntity.h" \ - -#define BHK_TRANSFORM_SHAPE_PARENT bhkEntity \ - -#define BHK_TRANSFORM_SHAPE_CONSTRUCT \ - : unknownFloat1(0.0f), unknownFloat2(0.0f), unknownFloat3(0.0f) \ - -#define BHK_TRANSFORM_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_TRANSFORM_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_TRANSFORM_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_TRANSFORM_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_TRANSFORM_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_MEMBERS \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_INCLUDE "bhkTransformShape.h" \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_PARENT bhkTransformShape \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_CONSTRUCT \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define BHK_CONVEX_TRANSFORM_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define B_S_BOUND_MEMBERS \ -array<float,6> unknownFloats; \ - -#define B_S_BOUND_INCLUDE "NiExtraData.h" \ - -#define B_S_BOUND_PARENT NiExtraData \ - -#define B_S_BOUND_CONSTRUCT \ - -#define B_S_BOUND_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define B_S_BOUND_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define B_S_BOUND_STRING \ -return InternalAsString( verbose ); \ - -#define B_S_BOUND_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define B_S_BOUND_GETREFS \ -return InternalGetRefs(); \ - -#define B_S_FURNITURE_MARKER_MEMBERS \ -mutable uint numPositions; \ -vector<FurniturePosition > positions; \ - -#define B_S_FURNITURE_MARKER_INCLUDE "NiExtraData.h" \ - -#define B_S_FURNITURE_MARKER_PARENT NiExtraData \ - -#define B_S_FURNITURE_MARKER_CONSTRUCT \ - : numPositions((uint)0) \ - -#define B_S_FURNITURE_MARKER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define B_S_FURNITURE_MARKER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define B_S_FURNITURE_MARKER_STRING \ -return InternalAsString( verbose ); \ - -#define B_S_FURNITURE_MARKER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define B_S_FURNITURE_MARKER_GETREFS \ -return InternalGetRefs(); \ - -#define B_S_PARENT_VELOCITY_MODIFIER_MEMBERS \ -float unknownFloat; \ - -#define B_S_PARENT_VELOCITY_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define B_S_PARENT_VELOCITY_MODIFIER_PARENT NiPSysModifier \ - -#define B_S_PARENT_VELOCITY_MODIFIER_CONSTRUCT \ - : unknownFloat(0.0f) \ - -#define B_S_PARENT_VELOCITY_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define B_S_PARENT_VELOCITY_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define B_S_PARENT_VELOCITY_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define B_S_PARENT_VELOCITY_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define B_S_PARENT_VELOCITY_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define B_S_P_SYS_ARRAY_EMITTER_MEMBERS \ - -#define B_S_P_SYS_ARRAY_EMITTER_INCLUDE "NiPSysVolumeEmitter.h" \ - -#define B_S_P_SYS_ARRAY_EMITTER_PARENT NiPSysVolumeEmitter \ - -#define B_S_P_SYS_ARRAY_EMITTER_CONSTRUCT \ - -#define B_S_P_SYS_ARRAY_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define B_S_P_SYS_ARRAY_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define B_S_P_SYS_ARRAY_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define B_S_P_SYS_ARRAY_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define B_S_P_SYS_ARRAY_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define B_S_X_FLAGS_MEMBERS \ -uint flags; \ - -#define B_S_X_FLAGS_INCLUDE "NiExtraData.h" \ - -#define B_S_X_FLAGS_PARENT NiExtraData \ - -#define B_S_X_FLAGS_CONSTRUCT \ - : flags((uint)0) \ - -#define B_S_X_FLAGS_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define B_S_X_FLAGS_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define B_S_X_FLAGS_STRING \ -return InternalAsString( verbose ); \ - -#define B_S_X_FLAGS_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define B_S_X_FLAGS_GETREFS \ -return InternalGetRefs(); \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_MEMBERS \ -mutable uint numTriangles; \ -vector<hkTriangle > triangles; \ -mutable uint numVertices; \ -vector<Vector3 > vertices; \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_INCLUDE "AbhkShapeCollection.h" \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_PARENT AbhkShapeCollection \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_CONSTRUCT \ - : numTriangles((uint)0), numVertices((uint)0) \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define HK_PACKED_NI_TRI_STRIPS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_ALPHA_CONTROLLER_MEMBERS \ -Ref<NiFloatData > data; \ - -#define NI_ALPHA_CONTROLLER_INCLUDE "NiSingleInterpolatorController.h" \ - -#define NI_ALPHA_CONTROLLER_PARENT NiSingleInterpolatorController \ - -#define NI_ALPHA_CONTROLLER_CONSTRUCT \ - : data(NULL) \ - -#define NI_ALPHA_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_ALPHA_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_ALPHA_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_ALPHA_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_ALPHA_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_ALPHA_PROPERTY_MEMBERS \ -ushort flags; \ -byte threshold; \ - -#define NI_ALPHA_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_ALPHA_PROPERTY_PARENT NiProperty \ - -#define NI_ALPHA_PROPERTY_CONSTRUCT \ - : flags((ushort)237), threshold((byte)0) \ - -#define NI_ALPHA_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_ALPHA_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_ALPHA_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_ALPHA_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_ALPHA_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_AMBIENT_LIGHT_MEMBERS \ - -#define NI_AMBIENT_LIGHT_INCLUDE "NiLight.h" \ - -#define NI_AMBIENT_LIGHT_PARENT NiLight \ - -#define NI_AMBIENT_LIGHT_CONSTRUCT \ - -#define NI_AMBIENT_LIGHT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_AMBIENT_LIGHT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_AMBIENT_LIGHT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_AMBIENT_LIGHT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_AMBIENT_LIGHT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_MEMBERS \ -ushort numParticles; \ -float size; \ -ushort numActive; \ -ushort unknownShort; \ -bool hasSizes; \ -vector<float > sizes; \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_INCLUDE "NiTriBasedGeomData.h" \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_PARENT NiTriBasedGeomData \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_CONSTRUCT \ - : numParticles((ushort)0), size(0.0f), numActive((ushort)0), unknownShort((ushort)0), hasSizes(false) \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_AUTO_NORMAL_PARTICLES_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BINARY_EXTRA_DATA_MEMBERS \ -ByteArray binaryData; \ - -#define NI_BINARY_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_BINARY_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_BINARY_EXTRA_DATA_CONSTRUCT \ - -#define NI_BINARY_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BINARY_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BINARY_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BINARY_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BINARY_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BLEND_BOOL_INTERPOLATOR_MEMBERS \ -byte boolValue; \ - -#define NI_BLEND_BOOL_INTERPOLATOR_INCLUDE "NiBlendInterpolator.h" \ - -#define NI_BLEND_BOOL_INTERPOLATOR_PARENT NiBlendInterpolator \ - -#define NI_BLEND_BOOL_INTERPOLATOR_CONSTRUCT \ - : boolValue((byte)0) \ - -#define NI_BLEND_BOOL_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BLEND_BOOL_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BLEND_BOOL_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BLEND_BOOL_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BLEND_BOOL_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_MEMBERS \ -float floatValue; \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_INCLUDE "NiBlendInterpolator.h" \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_PARENT NiBlendInterpolator \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_CONSTRUCT \ - : floatValue(0.0f) \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BLEND_FLOAT_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BLEND_POINT3_INTERPOLATOR_MEMBERS \ -Vector3 pointValue; \ - -#define NI_BLEND_POINT3_INTERPOLATOR_INCLUDE "NiBlendInterpolator.h" \ - -#define NI_BLEND_POINT3_INTERPOLATOR_PARENT NiBlendInterpolator \ - -#define NI_BLEND_POINT3_INTERPOLATOR_CONSTRUCT \ - -#define NI_BLEND_POINT3_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BLEND_POINT3_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BLEND_POINT3_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BLEND_POINT3_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BLEND_POINT3_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_MEMBERS \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_INCLUDE "NiBlendInterpolator.h" \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_PARENT NiBlendInterpolator \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_CONSTRUCT \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BLEND_TRANSFORM_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BONE_L_O_D_CONTROLLER_MEMBERS \ -mutable uint numShapeGroups; \ -vector<SkinShapeGroup > shapeGroups1; \ -mutable uint numShapeGroups2; \ -vector<Ref<NiTriShape > > shapeGroups2; \ - -#define NI_BONE_L_O_D_CONTROLLER_INCLUDE "ABoneLODController.h" \ - -#define NI_BONE_L_O_D_CONTROLLER_PARENT ABoneLODController \ - -#define NI_BONE_L_O_D_CONTROLLER_CONSTRUCT \ - : numShapeGroups((uint)0), numShapeGroups2((uint)0) \ - -#define NI_BONE_L_O_D_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BONE_L_O_D_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BONE_L_O_D_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BONE_L_O_D_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BONE_L_O_D_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BOOL_DATA_MEMBERS \ -KeyGroup<byte > data; \ - -#define NI_BOOL_DATA_INCLUDE "AKeyedData.h" \ - -#define NI_BOOL_DATA_PARENT AKeyedData \ - -#define NI_BOOL_DATA_CONSTRUCT \ - -#define NI_BOOL_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BOOL_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BOOL_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BOOL_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BOOL_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BOOLEAN_EXTRA_DATA_MEMBERS \ -byte booleanData; \ - -#define NI_BOOLEAN_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_BOOLEAN_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_BOOLEAN_EXTRA_DATA_CONSTRUCT \ - : booleanData((byte)0) \ - -#define NI_BOOLEAN_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BOOLEAN_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BOOLEAN_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BOOLEAN_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BOOLEAN_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BOOL_INTERPOLATOR_MEMBERS \ -bool boolValue; \ -Ref<NiBoolData > data; \ - -#define NI_BOOL_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_BOOL_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_BOOL_INTERPOLATOR_CONSTRUCT \ - : boolValue(false), data(NULL) \ - -#define NI_BOOL_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BOOL_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BOOL_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BOOL_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BOOL_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_MEMBERS \ -byte boolValue; \ -Ref<NiBoolData > data; \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_CONSTRUCT \ - : boolValue((byte)0), data(NULL) \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BOOL_TIMELINE_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_MEMBERS \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_INCLUDE "ABoneLODController.h" \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_PARENT ABoneLODController \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_CONSTRUCT \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_S_BONE_L_O_D_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_SPLINE_BASIS_DATA_MEMBERS \ -uint unknownInt; \ - -#define NI_B_SPLINE_BASIS_DATA_INCLUDE "NiObject.h" \ - -#define NI_B_SPLINE_BASIS_DATA_PARENT NiObject \ - -#define NI_B_SPLINE_BASIS_DATA_CONSTRUCT \ - : unknownInt((uint)0) \ - -#define NI_B_SPLINE_BASIS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_BASIS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_SPLINE_BASIS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_SPLINE_BASIS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_BASIS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_MEMBERS \ -array<float,6> unknownFloats; \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_PARENT NiBSplineInterpolator \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_CONSTRUCT \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_MEMBERS \ -Ref<NiBSplineData > data; \ -Ref<NiObject > unknownLink; \ -array<float,6> unknownFloats; \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_PARENT NiBSplineInterpolator \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_CONSTRUCT \ - : data(NULL), unknownLink(NULL) \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_MEMBERS \ -Ref<NiBSplineData > data; \ -Ref<NiBSplineBasisData > basisData; \ -array<float,17> unknown4; \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_INCLUDE "NiBSplineInterpolator.h" \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_PARENT NiBSplineInterpolator \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_CONSTRUCT \ - : data(NULL), basisData(NULL) \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_SPLINE_DATA_MEMBERS \ -uint unknownInt; \ -mutable uint count; \ -vector< array<byte,2> > unknownData; \ - -#define NI_B_SPLINE_DATA_INCLUDE "NiObject.h" \ - -#define NI_B_SPLINE_DATA_PARENT NiObject \ - -#define NI_B_SPLINE_DATA_CONSTRUCT \ - : unknownInt((uint)0), count((uint)0) \ - -#define NI_B_SPLINE_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_SPLINE_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_SPLINE_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_SPLINE_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_CAMERA_MEMBERS \ -ushort unknownShort; \ -float frustumLeft; \ -float frustumRight; \ -float frustumTop; \ -float frustumBottom; \ -float frustumNear; \ -float frustumFar; \ -bool useOrthographicProjection; \ -float viewportLeft; \ -float viewportRight; \ -float viewportTop; \ -float viewportBottom; \ -float lodAdjust; \ -Ref<NiObject > unknownLink_; \ -uint unknownInt; \ -uint unknownInt2; \ - -#define NI_CAMERA_INCLUDE "NiAVObject.h" \ - -#define NI_CAMERA_PARENT NiAVObject \ - -#define NI_CAMERA_CONSTRUCT \ - : unknownShort((ushort)0), frustumLeft(0.0f), frustumRight(0.0f), frustumTop(0.0f), frustumBottom(0.0f), frustumNear(0.0f), frustumFar(0.0f), useOrthographicProjection(false), viewportLeft(0.0f), viewportRight(0.0f), viewportTop(0.0f), viewportBottom(0.0f), lodAdjust(0.0f), unknownLink_(NULL), unknownInt((uint)0), unknownInt2((uint)0) \ - -#define NI_CAMERA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_CAMERA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_CAMERA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_CAMERA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_CAMERA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_COLLISION_DATA_MEMBERS \ -NiNode * targetNode; \ -uint unknown2; \ -byte unknown3; \ -uint collisionType; \ -uint unknown5; \ -Vector3 unknown7; \ -array<float,8> unknown6; \ -array<float,15> unknown8; \ - -#define NI_COLLISION_DATA_INCLUDE "NiObject.h" \ - -#define NI_COLLISION_DATA_PARENT NiObject \ - -#define NI_COLLISION_DATA_CONSTRUCT \ - : targetNode(NULL), unknown2((uint)0), unknown3((byte)0), collisionType((uint)0), unknown5((uint)0) \ - -#define NI_COLLISION_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_COLLISION_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_COLLISION_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_COLLISION_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_COLLISION_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_COLOR_DATA_MEMBERS \ -KeyGroup<Color4 > data; \ - -#define NI_COLOR_DATA_INCLUDE "AKeyedData.h" \ - -#define NI_COLOR_DATA_PARENT AKeyedData \ - -#define NI_COLOR_DATA_CONSTRUCT \ - -#define NI_COLOR_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_COLOR_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_COLOR_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_COLOR_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_COLOR_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_COLOR_EXTRA_DATA_MEMBERS \ -Color4 data; \ - -#define NI_COLOR_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_COLOR_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_COLOR_EXTRA_DATA_CONSTRUCT \ - -#define NI_COLOR_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_COLOR_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_COLOR_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_COLOR_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_COLOR_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_CONTROLLER_MANAGER_MEMBERS \ -bool cumulative; \ -mutable uint numControllerSequences; \ -vector<Ref<NiControllerSequence > > controllerSequences; \ -Ref<NiDefaultAVObjectPalette > objectPalette; \ - -#define NI_CONTROLLER_MANAGER_INCLUDE "NiTimeController.h" \ - -#define NI_CONTROLLER_MANAGER_PARENT NiTimeController \ - -#define NI_CONTROLLER_MANAGER_CONSTRUCT \ - : cumulative(false), numControllerSequences((uint)0), objectPalette(NULL) \ - -#define NI_CONTROLLER_MANAGER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_CONTROLLER_MANAGER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_CONTROLLER_MANAGER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_CONTROLLER_MANAGER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_CONTROLLER_MANAGER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_CONTROLLER_SEQUENCE_MEMBERS \ -string name; \ -string textKeysName; \ -Ref<NiTextKeyExtraData > textKeys; \ -mutable uint numControlledBlocks; \ -uint unknownInt1; \ -vector<ControllerLink > controlledBlocks; \ -float weight; \ -uint cycleType; \ -uint unknownInt0; \ -float frequency; \ -float startTime; \ -float stopTime; \ -float unknownFloat2; \ -byte unknownByte; \ -NiControllerManager * manager; \ -string unknownString; \ -Ref<NiStringPalette > stringPalette; \ - -#define NI_CONTROLLER_SEQUENCE_INCLUDE "NiObject.h" \ - -#define NI_CONTROLLER_SEQUENCE_PARENT NiObject \ - -#define NI_CONTROLLER_SEQUENCE_CONSTRUCT \ - : textKeys(NULL), numControlledBlocks((uint)0), unknownInt1((uint)0), weight(1.0f), cycleType((uint)0), unknownInt0((uint)0), frequency(0.0f), startTime(0.0f), stopTime(0.0f), unknownFloat2(0.0f), unknownByte((byte)0), manager(NULL), stringPalette(NULL) \ - -#define NI_CONTROLLER_SEQUENCE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_CONTROLLER_SEQUENCE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_CONTROLLER_SEQUENCE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_CONTROLLER_SEQUENCE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_CONTROLLER_SEQUENCE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_MEMBERS \ -uint unknownInt; \ -mutable uint numObjs; \ -vector<AVObject > objs; \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_INCLUDE "NiObject.h" \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_PARENT NiObject \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_CONSTRUCT \ - : unknownInt((uint)0), numObjs((uint)0) \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_DEFAULT_A_V_OBJECT_PALETTE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_DIRECTIONAL_LIGHT_MEMBERS \ - -#define NI_DIRECTIONAL_LIGHT_INCLUDE "NiLight.h" \ - -#define NI_DIRECTIONAL_LIGHT_PARENT NiLight \ - -#define NI_DIRECTIONAL_LIGHT_CONSTRUCT \ - -#define NI_DIRECTIONAL_LIGHT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_DIRECTIONAL_LIGHT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_DIRECTIONAL_LIGHT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_DIRECTIONAL_LIGHT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_DIRECTIONAL_LIGHT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_DITHER_PROPERTY_MEMBERS \ -ushort flags; \ - -#define NI_DITHER_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_DITHER_PROPERTY_PARENT NiProperty \ - -#define NI_DITHER_PROPERTY_CONSTRUCT \ - : flags((ushort)0) \ - -#define NI_DITHER_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_DITHER_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_DITHER_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_DITHER_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_DITHER_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FLIP_CONTROLLER_MEMBERS \ -uint textureSlot; \ -uint unknownInt2; \ -float delta; \ -mutable uint numSources; \ -vector<Ref<NiSourceTexture > > sources; \ - -#define NI_FLIP_CONTROLLER_INCLUDE "NiSingleInterpolatorController.h" \ - -#define NI_FLIP_CONTROLLER_PARENT NiSingleInterpolatorController \ - -#define NI_FLIP_CONTROLLER_CONSTRUCT \ - : textureSlot((uint)0), unknownInt2((uint)0), delta(0.0f), numSources((uint)0) \ - -#define NI_FLIP_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FLIP_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FLIP_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FLIP_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FLIP_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FLOAT_DATA_MEMBERS \ -KeyGroup<float > data; \ - -#define NI_FLOAT_DATA_INCLUDE "AKeyedData.h" \ - -#define NI_FLOAT_DATA_PARENT AKeyedData \ - -#define NI_FLOAT_DATA_CONSTRUCT \ - -#define NI_FLOAT_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FLOAT_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FLOAT_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FLOAT_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FLOAT_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FLOAT_EXTRA_DATA_MEMBERS \ -float floatData; \ - -#define NI_FLOAT_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_FLOAT_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_FLOAT_EXTRA_DATA_CONSTRUCT \ - : floatData(0.0f) \ - -#define NI_FLOAT_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FLOAT_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FLOAT_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FLOAT_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FLOAT_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_MEMBERS \ -Ref<NiObject > unknownLink; \ -string unknownString; \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_PARENT NiTimeController \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_CONSTRUCT \ - : unknownLink(NULL) \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FLOAT_EXTRA_DATA_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FLOAT_INTERPOLATOR_MEMBERS \ -float floatValue; \ -Ref<NiFloatData > data; \ - -#define NI_FLOAT_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_FLOAT_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_FLOAT_INTERPOLATOR_CONSTRUCT \ - : floatValue(0.0f), data(NULL) \ - -#define NI_FLOAT_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FLOAT_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FLOAT_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FLOAT_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FLOAT_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FLOATS_EXTRA_DATA_MEMBERS \ -mutable uint numFloats; \ -vector<float > data; \ - -#define NI_FLOATS_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_FLOATS_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_FLOATS_EXTRA_DATA_CONSTRUCT \ - : numFloats((uint)0) \ - -#define NI_FLOATS_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FLOATS_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FLOATS_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FLOATS_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FLOATS_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_FOG_PROPERTY_MEMBERS \ -ushort flags; \ -float fogDepth; \ -Color3 fogColor; \ - -#define NI_FOG_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_FOG_PROPERTY_PARENT NiProperty \ - -#define NI_FOG_PROPERTY_CONSTRUCT \ - : flags((ushort)0), fogDepth(0.0f) \ - -#define NI_FOG_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_FOG_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_FOG_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_FOG_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_FOG_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_GEOM_MORPHER_CONTROLLER_MEMBERS \ -ushort unknown; \ -byte unknown2; \ -Ref<NiMorphData > data; \ -byte unknownByte; \ -mutable uint numInterpolators; \ -vector<Ref<NiInterpolator > > interpolators; \ -mutable uint numUnknownInts; \ -vector<uint > unknownInts; \ - -#define NI_GEOM_MORPHER_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_GEOM_MORPHER_CONTROLLER_PARENT NiTimeController \ - -#define NI_GEOM_MORPHER_CONTROLLER_CONSTRUCT \ - : unknown((ushort)0), unknown2((byte)0), data(NULL), unknownByte((byte)0), numInterpolators((uint)0), numUnknownInts((uint)0) \ - -#define NI_GEOM_MORPHER_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_GEOM_MORPHER_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_GEOM_MORPHER_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_GEOM_MORPHER_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_GEOM_MORPHER_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_GRAVITY_MEMBERS \ -float unknownFloat1; \ -float force; \ -uint type; \ -Vector3 position; \ -Vector3 direction; \ - -#define NI_GRAVITY_INCLUDE "AParticleModifier.h" \ - -#define NI_GRAVITY_PARENT AParticleModifier \ - -#define NI_GRAVITY_CONSTRUCT \ - : unknownFloat1(0.0f), force(0.0f), type((uint)0) \ - -#define NI_GRAVITY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_GRAVITY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_GRAVITY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_GRAVITY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_GRAVITY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_INTEGER_EXTRA_DATA_MEMBERS \ -uint integerData; \ - -#define NI_INTEGER_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_INTEGER_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_INTEGER_EXTRA_DATA_CONSTRUCT \ - : integerData((uint)0) \ - -#define NI_INTEGER_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_INTEGER_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_INTEGER_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_INTEGER_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_INTEGER_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_INTEGERS_EXTRA_DATA_MEMBERS \ -mutable uint numIntegers; \ -vector<uint > data; \ - -#define NI_INTEGERS_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_INTEGERS_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_INTEGERS_EXTRA_DATA_CONSTRUCT \ - : numIntegers((uint)0) \ - -#define NI_INTEGERS_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_INTEGERS_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_INTEGERS_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_INTEGERS_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_INTEGERS_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_KEYFRAME_CONTROLLER_MEMBERS \ -Ref<NiKeyframeData > data; \ - -#define NI_KEYFRAME_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_KEYFRAME_CONTROLLER_PARENT NiTimeController \ - -#define NI_KEYFRAME_CONTROLLER_CONSTRUCT \ - : data(NULL) \ - -#define NI_KEYFRAME_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_KEYFRAME_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_KEYFRAME_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_KEYFRAME_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_KEYFRAME_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define B_S_KEYFRAME_CONTROLLER_MEMBERS \ -Ref<NiKeyframeData > data2; \ - -#define B_S_KEYFRAME_CONTROLLER_INCLUDE "NiKeyframeController.h" \ - -#define B_S_KEYFRAME_CONTROLLER_PARENT NiKeyframeController \ - -#define B_S_KEYFRAME_CONTROLLER_CONSTRUCT \ - : data2(NULL) \ - -#define B_S_KEYFRAME_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define B_S_KEYFRAME_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define B_S_KEYFRAME_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define B_S_KEYFRAME_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define B_S_KEYFRAME_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_KEYFRAME_DATA_MEMBERS \ -mutable uint numRotationKeys; \ -KeyType rotationType; \ -vector<Key<Quaternion > > quaternionKeys; \ -float unknownFloat; \ -array<KeyGroup<float >,3> xyzRotations; \ -KeyGroup<Vector3 > translations; \ -KeyGroup<float > scales; \ - -#define NI_KEYFRAME_DATA_INCLUDE "AKeyedData.h" \ - -#define NI_KEYFRAME_DATA_PARENT AKeyedData \ - -#define NI_KEYFRAME_DATA_CONSTRUCT \ - : numRotationKeys((uint)0), rotationType((KeyType)0), unknownFloat(0.0f) \ - -#define NI_KEYFRAME_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_KEYFRAME_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_KEYFRAME_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_KEYFRAME_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_KEYFRAME_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_LIGHT_COLOR_CONTROLLER_MEMBERS \ -ushort unknownShort; \ -Ref<NiPosData > data; \ -Ref<NiPoint3Interpolator > interpolator; \ - -#define NI_LIGHT_COLOR_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_LIGHT_COLOR_CONTROLLER_PARENT NiTimeController \ - -#define NI_LIGHT_COLOR_CONTROLLER_CONSTRUCT \ - : unknownShort((ushort)0), data(NULL), interpolator(NULL) \ - -#define NI_LIGHT_COLOR_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_LIGHT_COLOR_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_LIGHT_COLOR_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_LIGHT_COLOR_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_LIGHT_COLOR_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_LIGHT_DIMMER_CONTROLLER_MEMBERS \ -Ref<NiInterpolator > unknownLink; \ - -#define NI_LIGHT_DIMMER_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_LIGHT_DIMMER_CONTROLLER_PARENT NiTimeController \ - -#define NI_LIGHT_DIMMER_CONTROLLER_CONSTRUCT \ - : unknownLink(NULL) \ - -#define NI_LIGHT_DIMMER_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_LIGHT_DIMMER_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_LIGHT_DIMMER_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_LIGHT_DIMMER_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_LIGHT_DIMMER_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_LOOK_AT_CONTROLLER_MEMBERS \ -ushort unknown1; \ -Ref<NiNode > lookAtNode; \ - -#define NI_LOOK_AT_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_LOOK_AT_CONTROLLER_PARENT NiTimeController \ - -#define NI_LOOK_AT_CONTROLLER_CONSTRUCT \ - : unknown1((ushort)0), lookAtNode(NULL) \ - -#define NI_LOOK_AT_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_LOOK_AT_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_LOOK_AT_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_LOOK_AT_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_LOOK_AT_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_LOOK_AT_INTERPOLATOR_MEMBERS \ -ushort unknownShort; \ -Ref<NiNode > lookAt; \ -float unknownFloat; \ -Vector3 translation; \ -Quaternion rotation; \ -float scale; \ -Ref<NiPoint3Interpolator > unknownLink1; \ -Ref<NiFloatInterpolator > unknownLink2; \ -Ref<NiFloatInterpolator > unknownLink3; \ - -#define NI_LOOK_AT_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_LOOK_AT_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_LOOK_AT_INTERPOLATOR_CONSTRUCT \ - : unknownShort((ushort)0), lookAt(NULL), unknownFloat(0.0f), scale(0.0f), unknownLink1(NULL), unknownLink2(NULL), unknownLink3(NULL) \ - -#define NI_LOOK_AT_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_LOOK_AT_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_LOOK_AT_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_LOOK_AT_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_LOOK_AT_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_MATERIAL_COLOR_CONTROLLER_MEMBERS \ -ushort unknown; \ -Ref<NiPosData > data; \ - -#define NI_MATERIAL_COLOR_CONTROLLER_INCLUDE "NiSingleInterpolatorController.h" \ - -#define NI_MATERIAL_COLOR_CONTROLLER_PARENT NiSingleInterpolatorController \ - -#define NI_MATERIAL_COLOR_CONTROLLER_CONSTRUCT \ - : unknown((ushort)0), data(NULL) \ - -#define NI_MATERIAL_COLOR_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_MATERIAL_COLOR_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_MATERIAL_COLOR_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_MATERIAL_COLOR_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_MATERIAL_COLOR_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_MATERIAL_PROPERTY_MEMBERS \ -ushort flags; \ -Color3 ambientColor; \ -Color3 diffuseColor; \ -Color3 specularColor; \ -Color3 emissiveColor; \ -float glossiness; \ -float alpha; \ - -#define NI_MATERIAL_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_MATERIAL_PROPERTY_PARENT NiProperty \ - -#define NI_MATERIAL_PROPERTY_CONSTRUCT \ - : flags((ushort)0), glossiness(0.0f), alpha(0.0f) \ - -#define NI_MATERIAL_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_MATERIAL_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_MATERIAL_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_MATERIAL_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_MATERIAL_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_MESH_P_SYS_DATA_MEMBERS \ -byte unknownByte11; \ -vector< array<float,4> > unknownFloats3; \ -vector< array<float,10> > unknownFloats4; \ -vector< array<float,12> > unknownFloats5; \ -uint unknownInt1; \ -Ref<NiPSysModifier > modifier; \ -byte unknownByte2; \ -mutable uint numUnknownLinks; \ -vector<Ref<NiPSysModifier > > unknownLinks; \ -ushort unknownShort4; \ -uint unknownInt2; \ -byte unknownByte12; \ -uint unknownInt3; \ -uint unknownInt4; \ -Ref<NiNode > unknownLink2; \ - -#define NI_MESH_P_SYS_DATA_INCLUDE "APSysData.h" \ - -#define NI_MESH_P_SYS_DATA_PARENT APSysData \ - -#define NI_MESH_P_SYS_DATA_CONSTRUCT \ - : unknownByte11((byte)0), unknownInt1((uint)0), modifier(NULL), unknownByte2((byte)0), numUnknownLinks((uint)0), unknownShort4((ushort)0), unknownInt2((uint)0), unknownByte12((byte)0), unknownInt3((uint)0), unknownInt4((uint)0), unknownLink2(NULL) \ - -#define NI_MESH_P_SYS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_MESH_P_SYS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_MESH_P_SYS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_MESH_P_SYS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_MESH_P_SYS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_MORPH_DATA_MEMBERS \ -mutable uint numMorphs; \ -uint numVertices; \ -byte unknownByte; \ -vector<Morph > morphs; \ - -#define NI_MORPH_DATA_INCLUDE "NiObject.h" \ - -#define NI_MORPH_DATA_PARENT NiObject \ - -#define NI_MORPH_DATA_CONSTRUCT \ - : numMorphs((uint)0), numVertices((uint)0), unknownByte((byte)0) \ - -#define NI_MORPH_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_MORPH_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_MORPH_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_MORPH_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_MORPH_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_MEMBERS \ -mutable ushort numExtraTargets; \ -vector<NiNode * > extraTargets; \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_PARENT NiTimeController \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_CONSTRUCT \ - : numExtraTargets((ushort)0) \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_MULTI_TARGET_TRANSFORM_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_NODE_MEMBERS \ -mutable uint numChildren; \ -vector<Ref<NiAVObject > > children; \ -mutable uint numEffects; \ -vector<Ref<NiDynamicEffect > > effects; \ - -#define NI_NODE_INCLUDE "NiAVObject.h" \ - -#define NI_NODE_PARENT NiAVObject \ - -#define NI_NODE_CONSTRUCT \ - : numChildren((uint)0), numEffects((uint)0) \ - -#define NI_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_NODE_GETREFS \ -return InternalGetRefs(); \ - -#define AVOID_NODE_MEMBERS \ - -#define AVOID_NODE_INCLUDE "NiNode.h" \ - -#define AVOID_NODE_PARENT NiNode \ - -#define AVOID_NODE_CONSTRUCT \ - -#define AVOID_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define AVOID_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define AVOID_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define AVOID_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define AVOID_NODE_GETREFS \ -return InternalGetRefs(); \ - -#define FX_WIDGET_MEMBERS \ -byte unknown1; \ -array<byte,292> unknown292Bytes; \ - -#define FX_WIDGET_INCLUDE "NiNode.h" \ - -#define FX_WIDGET_PARENT NiNode \ - -#define FX_WIDGET_CONSTRUCT \ - : unknown1((byte)0) \ - -#define FX_WIDGET_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define FX_WIDGET_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define FX_WIDGET_STRING \ -return InternalAsString( verbose ); \ - -#define FX_WIDGET_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define FX_WIDGET_GETREFS \ -return InternalGetRefs(); \ - -#define FX_BUTTON_MEMBERS \ - -#define FX_BUTTON_INCLUDE "FxWidget.h" \ - -#define FX_BUTTON_PARENT FxWidget \ - -#define FX_BUTTON_CONSTRUCT \ - -#define FX_BUTTON_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define FX_BUTTON_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define FX_BUTTON_STRING \ -return InternalAsString( verbose ); \ - -#define FX_BUTTON_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define FX_BUTTON_GETREFS \ -return InternalGetRefs(); \ - -#define FX_RADIO_BUTTON_MEMBERS \ -uint unknownInt1; \ -uint unknownInt2; \ -uint unknownInt3; \ -mutable uint numUnknownLinks; \ -vector<Ref<NiObject > > unknownLinks; \ - -#define FX_RADIO_BUTTON_INCLUDE "FxWidget.h" \ - -#define FX_RADIO_BUTTON_PARENT FxWidget \ - -#define FX_RADIO_BUTTON_CONSTRUCT \ - : unknownInt1((uint)0), unknownInt2((uint)0), unknownInt3((uint)0), numUnknownLinks((uint)0) \ - -#define FX_RADIO_BUTTON_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define FX_RADIO_BUTTON_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define FX_RADIO_BUTTON_STRING \ -return InternalAsString( verbose ); \ - -#define FX_RADIO_BUTTON_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define FX_RADIO_BUTTON_GETREFS \ -return InternalGetRefs(); \ - -#define NI_BILLBOARD_NODE_MEMBERS \ -ushort billboardMode; \ - -#define NI_BILLBOARD_NODE_INCLUDE "NiNode.h" \ - -#define NI_BILLBOARD_NODE_PARENT NiNode \ - -#define NI_BILLBOARD_NODE_CONSTRUCT \ - : billboardMode((ushort)0) \ - -#define NI_BILLBOARD_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_BILLBOARD_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_BILLBOARD_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_BILLBOARD_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_BILLBOARD_NODE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_S_ANIMATION_NODE_MEMBERS \ - -#define NI_B_S_ANIMATION_NODE_INCLUDE "NiNode.h" \ - -#define NI_B_S_ANIMATION_NODE_PARENT NiNode \ - -#define NI_B_S_ANIMATION_NODE_CONSTRUCT \ - -#define NI_B_S_ANIMATION_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_S_ANIMATION_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_S_ANIMATION_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_S_ANIMATION_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_S_ANIMATION_NODE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_S_PARTICLE_NODE_MEMBERS \ - -#define NI_B_S_PARTICLE_NODE_INCLUDE "NiNode.h" \ - -#define NI_B_S_PARTICLE_NODE_PARENT NiNode \ - -#define NI_B_S_PARTICLE_NODE_CONSTRUCT \ - -#define NI_B_S_PARTICLE_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_S_PARTICLE_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_S_PARTICLE_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_S_PARTICLE_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_S_PARTICLE_NODE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_L_O_D_NODE_MEMBERS \ -uint lodType; \ -Vector3 lodCenter; \ -mutable uint numLodLevels; \ -vector<LODRange > lodLevels; \ -ushort unknownShort; \ -Ref<NiRangeLODData > rangeData; \ - -#define NI_L_O_D_NODE_INCLUDE "NiNode.h" \ - -#define NI_L_O_D_NODE_PARENT NiNode \ - -#define NI_L_O_D_NODE_CONSTRUCT \ - : lodType((uint)0), numLodLevels((uint)0), unknownShort((ushort)0), rangeData(NULL) \ - -#define NI_L_O_D_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_L_O_D_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_L_O_D_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_L_O_D_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_L_O_D_NODE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PALETTE_MEMBERS \ -byte unknownByte; \ -uint numEntries_; \ -array<array<byte,256>,4> palette; \ - -#define NI_PALETTE_INCLUDE "NiObject.h" \ - -#define NI_PALETTE_PARENT NiObject \ - -#define NI_PALETTE_CONSTRUCT \ - : unknownByte((byte)0), numEntries_((uint)0) \ - -#define NI_PALETTE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PALETTE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PALETTE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PALETTE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PALETTE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_BOMB_MEMBERS \ -float unknownFloat1; \ -float unknownFloat2; \ -float unknownFloat3; \ -float unknownFloat4; \ -uint unknownInt1; \ -uint unknownInt2; \ -float unknownFloat5; \ -float unknownFloat6; \ -float unknownFloat7; \ -float unknownFloat8; \ -float unknownFloat9; \ -float unknownFloat10; \ - -#define NI_PARTICLE_BOMB_INCLUDE "AParticleModifier.h" \ - -#define NI_PARTICLE_BOMB_PARENT AParticleModifier \ - -#define NI_PARTICLE_BOMB_CONSTRUCT \ - : unknownFloat1(0.0f), unknownFloat2(0.0f), unknownFloat3(0.0f), unknownFloat4(0.0f), unknownInt1((uint)0), unknownInt2((uint)0), unknownFloat5(0.0f), unknownFloat6(0.0f), unknownFloat7(0.0f), unknownFloat8(0.0f), unknownFloat9(0.0f), unknownFloat10(0.0f) \ - -#define NI_PARTICLE_BOMB_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_BOMB_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_BOMB_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_BOMB_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_BOMB_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_COLOR_MODIFIER_MEMBERS \ -Ref<NiColorData > colorData; \ - -#define NI_PARTICLE_COLOR_MODIFIER_INCLUDE "AParticleModifier.h" \ - -#define NI_PARTICLE_COLOR_MODIFIER_PARENT AParticleModifier \ - -#define NI_PARTICLE_COLOR_MODIFIER_CONSTRUCT \ - : colorData(NULL) \ - -#define NI_PARTICLE_COLOR_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_COLOR_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_COLOR_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_COLOR_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_COLOR_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_GROW_FADE_MEMBERS \ -float grow; \ -float fade; \ - -#define NI_PARTICLE_GROW_FADE_INCLUDE "AParticleModifier.h" \ - -#define NI_PARTICLE_GROW_FADE_PARENT AParticleModifier \ - -#define NI_PARTICLE_GROW_FADE_CONSTRUCT \ - : grow(0.0f), fade(0.0f) \ - -#define NI_PARTICLE_GROW_FADE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_GROW_FADE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_GROW_FADE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_GROW_FADE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_GROW_FADE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_MESH_MODIFIER_MEMBERS \ -mutable uint numParticleMeshes; \ -vector<Ref<NiAVObject > > particleMeshes; \ - -#define NI_PARTICLE_MESH_MODIFIER_INCLUDE "AParticleModifier.h" \ - -#define NI_PARTICLE_MESH_MODIFIER_PARENT AParticleModifier \ - -#define NI_PARTICLE_MESH_MODIFIER_CONSTRUCT \ - : numParticleMeshes((uint)0) \ - -#define NI_PARTICLE_MESH_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_MESH_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_MESH_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_MESH_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_MESH_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_ROTATION_MEMBERS \ -byte unknownByte; \ -float unknownFloat1; \ -float unknownFloat2; \ -float unknownFloat3; \ -float unknownFloat4; \ - -#define NI_PARTICLE_ROTATION_INCLUDE "AParticleModifier.h" \ - -#define NI_PARTICLE_ROTATION_PARENT AParticleModifier \ - -#define NI_PARTICLE_ROTATION_CONSTRUCT \ - : unknownByte((byte)0), unknownFloat1(0.0f), unknownFloat2(0.0f), unknownFloat3(0.0f), unknownFloat4(0.0f) \ - -#define NI_PARTICLE_ROTATION_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_ROTATION_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_ROTATION_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_ROTATION_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_ROTATION_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLES_MEMBERS \ - -#define NI_PARTICLES_INCLUDE "NiTriBasedGeom.h" \ - -#define NI_PARTICLES_PARENT NiTriBasedGeom \ - -#define NI_PARTICLES_CONSTRUCT \ - -#define NI_PARTICLES_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLES_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLES_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLES_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLES_GETREFS \ -return InternalGetRefs(); \ - -#define NI_AUTO_NORMAL_PARTICLES_MEMBERS \ - -#define NI_AUTO_NORMAL_PARTICLES_INCLUDE "NiParticles.h" \ - -#define NI_AUTO_NORMAL_PARTICLES_PARENT NiParticles \ - -#define NI_AUTO_NORMAL_PARTICLES_CONSTRUCT \ - -#define NI_AUTO_NORMAL_PARTICLES_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_AUTO_NORMAL_PARTICLES_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_AUTO_NORMAL_PARTICLES_STRING \ -return InternalAsString( verbose ); \ - -#define NI_AUTO_NORMAL_PARTICLES_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_AUTO_NORMAL_PARTICLES_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_MESHES_MEMBERS \ - -#define NI_PARTICLE_MESHES_INCLUDE "NiParticles.h" \ - -#define NI_PARTICLE_MESHES_PARENT NiParticles \ - -#define NI_PARTICLE_MESHES_CONSTRUCT \ - -#define NI_PARTICLE_MESHES_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_MESHES_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_MESHES_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_MESHES_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_MESHES_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLES_DATA_MEMBERS \ -ushort numActive; \ -bool hasUnknownFloats; \ -vector<float > unknownFloats; \ -bool hasRotations; \ -vector<Quaternion > rotations; \ - -#define NI_PARTICLES_DATA_INCLUDE "NiAutoNormalParticlesData.h" \ - -#define NI_PARTICLES_DATA_PARENT NiAutoNormalParticlesData \ - -#define NI_PARTICLES_DATA_CONSTRUCT \ - : numActive((ushort)0), hasUnknownFloats(false), hasRotations(false) \ - -#define NI_PARTICLES_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLES_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLES_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLES_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLES_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_MESHES_DATA_MEMBERS \ -Ref<NiAVObject > unknownLink2; \ - -#define NI_PARTICLE_MESHES_DATA_INCLUDE "NiParticlesData.h" \ - -#define NI_PARTICLE_MESHES_DATA_PARENT NiParticlesData \ - -#define NI_PARTICLE_MESHES_DATA_CONSTRUCT \ - : unknownLink2(NULL) \ - -#define NI_PARTICLE_MESHES_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_MESHES_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_MESHES_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_MESHES_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_MESHES_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_SYSTEM_MEMBERS \ -bool unknownBool; \ -mutable uint numModifiers; \ -vector<Ref<NiPSysModifier > > modifiers; \ - -#define NI_PARTICLE_SYSTEM_INCLUDE "NiParticles.h" \ - -#define NI_PARTICLE_SYSTEM_PARENT NiParticles \ - -#define NI_PARTICLE_SYSTEM_CONSTRUCT \ - : unknownBool(false), numModifiers((uint)0) \ - -#define NI_PARTICLE_SYSTEM_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_SYSTEM_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_SYSTEM_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_SYSTEM_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_SYSTEM_GETREFS \ -return InternalGetRefs(); \ - -#define NI_MESH_PARTICLE_SYSTEM_MEMBERS \ - -#define NI_MESH_PARTICLE_SYSTEM_INCLUDE "NiParticleSystem.h" \ - -#define NI_MESH_PARTICLE_SYSTEM_PARENT NiParticleSystem \ - -#define NI_MESH_PARTICLE_SYSTEM_CONSTRUCT \ - -#define NI_MESH_PARTICLE_SYSTEM_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_MESH_PARTICLE_SYSTEM_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_MESH_PARTICLE_SYSTEM_STRING \ -return InternalAsString( verbose ); \ - -#define NI_MESH_PARTICLE_SYSTEM_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_MESH_PARTICLE_SYSTEM_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_MEMBERS \ -float speed; \ -float speedRandom; \ -float verticalDirection; \ -float verticalAngle; \ -float horizontalDirection; \ -float horizontalAngle; \ -float unknownFloat5; \ -float unknownFloat6; \ -float unknownFloat7; \ -float unknownFloat8; \ -float unknownFloat9; \ -float unknownFloat10; \ -float unknownFloat11; \ -float size; \ -float emitStartTime; \ -float emitStopTime; \ -byte unknownByte; \ -float emitRate; \ -float lifetime; \ -float lifetimeRandom; \ -ushort emitFlags; \ -Vector3 startRandom; \ -Ref<NiObject > emitter; \ -ushort unknownShort2_; \ -float unknownFloat13_; \ -uint unknownInt1_; \ -uint unknownInt2_; \ -ushort unknownShort3_; \ -mutable ushort numParticles; \ -ushort numValid; \ -vector<Particle > particles; \ -Ref<NiObject > unknownLink; \ -Ref<AParticleModifier > particleExtra; \ -Ref<NiObject > unknownLink2; \ -byte trailer; \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_PARENT NiTimeController \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_CONSTRUCT \ - : speed(0.0f), speedRandom(0.0f), verticalDirection(0.0f), verticalAngle(0.0f), horizontalDirection(0.0f), horizontalAngle(0.0f), unknownFloat5(0.0f), unknownFloat6(0.0f), unknownFloat7(0.0f), unknownFloat8(0.0f), unknownFloat9(0.0f), unknownFloat10(0.0f), unknownFloat11(0.0f), size(0.0f), emitStartTime(0.0f), emitStopTime(0.0f), unknownByte((byte)0), emitRate(0.0f), lifetime(0.0f), lifetimeRandom(0.0f), emitFlags((ushort)0), emitter(NULL), unknownShort2_((ushort)0), unknownFloat13_(0.0f), unknownInt1_((uint)0), unknownInt2_((uint)0), unknownShort3_((ushort)0), numParticles((ushort)0), numValid((ushort)0), unknownLink(NULL), particleExtra(NULL), unknownLink2(NULL), trailer((byte)0) \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PARTICLE_SYSTEM_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_B_S_P_ARRAY_CONTROLLER_MEMBERS \ - -#define NI_B_S_P_ARRAY_CONTROLLER_INCLUDE "NiParticleSystemController.h" \ - -#define NI_B_S_P_ARRAY_CONTROLLER_PARENT NiParticleSystemController \ - -#define NI_B_S_P_ARRAY_CONTROLLER_CONSTRUCT \ - -#define NI_B_S_P_ARRAY_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_B_S_P_ARRAY_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_B_S_P_ARRAY_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_B_S_P_ARRAY_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_B_S_P_ARRAY_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PATH_CONTROLLER_MEMBERS \ -ushort unknownShort2; \ -uint unknownInt1; \ -uint unknownInt2; \ -uint unknownInt3; \ -ushort unknownShort; \ -Ref<NiPosData > posData; \ -Ref<NiFloatData > floatData; \ - -#define NI_PATH_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_PATH_CONTROLLER_PARENT NiTimeController \ - -#define NI_PATH_CONTROLLER_CONSTRUCT \ - : unknownShort2((ushort)0), unknownInt1((uint)0), unknownInt2((uint)0), unknownInt3((uint)0), unknownShort((ushort)0), posData(NULL), floatData(NULL) \ - -#define NI_PATH_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PATH_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PATH_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PATH_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PATH_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PATH_INTERPOLATOR_MEMBERS \ -float unknownFloat1; \ -float unknownFloat2; \ -ushort unknownShort2; \ -Ref<NiPosData > posData; \ -Ref<NiFloatData > floatData; \ - -#define NI_PATH_INTERPOLATOR_INCLUDE "NiBlendInterpolator.h" \ - -#define NI_PATH_INTERPOLATOR_PARENT NiBlendInterpolator \ - -#define NI_PATH_INTERPOLATOR_CONSTRUCT \ - : unknownFloat1(0.0f), unknownFloat2(0.0f), unknownShort2((ushort)0), posData(NULL), floatData(NULL) \ - -#define NI_PATH_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PATH_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PATH_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PATH_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PATH_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PIXEL_DATA_MEMBERS \ -PixelFormat pixelFormat; \ -uint redMask; \ -uint greenMask; \ -uint blueMask; \ -uint alphaMask; \ -uint bitsPerPixel; \ -array<byte,8> unknown8Bytes; \ -uint unknownInt; \ -array<byte,54> unknown54Bytes; \ -Ref<NiPalette > palette; \ -mutable uint numMipmaps; \ -uint bytesPerPixel; \ -vector<MipMap > mipmaps; \ -ByteArray pixelData; \ -uint unknownInt2; \ - -#define NI_PIXEL_DATA_INCLUDE "NiObject.h" \ - -#define NI_PIXEL_DATA_PARENT NiObject \ - -#define NI_PIXEL_DATA_CONSTRUCT \ - : pixelFormat((PixelFormat)0), redMask((uint)0), greenMask((uint)0), blueMask((uint)0), alphaMask((uint)0), bitsPerPixel((uint)0), unknownInt((uint)0), palette(NULL), numMipmaps((uint)0), bytesPerPixel((uint)0), unknownInt2((uint)0) \ - -#define NI_PIXEL_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PIXEL_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PIXEL_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PIXEL_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PIXEL_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_PLANAR_COLLIDER_MEMBERS \ -ushort unknownShort; \ -float unknownFloat1; \ -float unknownFloat2; \ -ushort unknownShort2; \ -float unknownFloat3; \ -float unknownFloat4; \ -float unknownFloat5; \ -float unknownFloat6; \ -float unknownFloat7; \ -float unknownFloat8; \ -float unknownFloat9; \ -float unknownFloat10; \ -float unknownFloat11; \ -float unknownFloat12; \ -float unknownFloat13; \ -float unknownFloat14; \ -float unknownFloat15; \ -float unknownFloat16; \ - -#define NI_PLANAR_COLLIDER_INCLUDE "AParticleModifier.h" \ - -#define NI_PLANAR_COLLIDER_PARENT AParticleModifier \ - -#define NI_PLANAR_COLLIDER_CONSTRUCT \ - : unknownShort((ushort)0), unknownFloat1(0.0f), unknownFloat2(0.0f), unknownShort2((ushort)0), unknownFloat3(0.0f), unknownFloat4(0.0f), unknownFloat5(0.0f), unknownFloat6(0.0f), unknownFloat7(0.0f), unknownFloat8(0.0f), unknownFloat9(0.0f), unknownFloat10(0.0f), unknownFloat11(0.0f), unknownFloat12(0.0f), unknownFloat13(0.0f), unknownFloat14(0.0f), unknownFloat15(0.0f), unknownFloat16(0.0f) \ - -#define NI_PLANAR_COLLIDER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_PLANAR_COLLIDER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_PLANAR_COLLIDER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_PLANAR_COLLIDER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_PLANAR_COLLIDER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_POINT3_INTERPOLATOR_MEMBERS \ -Vector3 point3Value; \ -Ref<NiPosData > data; \ - -#define NI_POINT3_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_POINT3_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_POINT3_INTERPOLATOR_CONSTRUCT \ - : data(NULL) \ - -#define NI_POINT3_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_POINT3_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_POINT3_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_POINT3_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_POINT3_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_POINT_LIGHT_MEMBERS \ -float constantAttenuation; \ -float linearAttenuation; \ -float quadraticAttenuation; \ - -#define NI_POINT_LIGHT_INCLUDE "NiLight.h" \ - -#define NI_POINT_LIGHT_PARENT NiLight \ - -#define NI_POINT_LIGHT_CONSTRUCT \ - : constantAttenuation(0.0f), linearAttenuation(0.0f), quadraticAttenuation(0.0f) \ - -#define NI_POINT_LIGHT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_POINT_LIGHT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_POINT_LIGHT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_POINT_LIGHT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_POINT_LIGHT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_POS_DATA_MEMBERS \ -KeyGroup<Vector3 > data; \ - -#define NI_POS_DATA_INCLUDE "AKeyedData.h" \ - -#define NI_POS_DATA_PARENT AKeyedData \ - -#define NI_POS_DATA_CONSTRUCT \ - -#define NI_POS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_POS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_POS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_POS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_POS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_MEMBERS \ -bool spawnOnDeath; \ -Ref<NiPSysSpawnModifier > spawnModifier; \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_CONSTRUCT \ - : spawnOnDeath(false), spawnModifier(NULL) \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_AGE_DEATH_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_BOMB_MODIFIER_MEMBERS \ -NiNode * unknownLink; \ -array<uint,2> unknownInts1; \ -array<float,3> unknownFloats; \ -array<uint,2> unknownInts2; \ - -#define NI_P_SYS_BOMB_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_BOMB_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_BOMB_MODIFIER_CONSTRUCT \ - : unknownLink(NULL) \ - -#define NI_P_SYS_BOMB_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_BOMB_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_BOMB_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_BOMB_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_BOMB_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_MEMBERS \ -ushort updateSkip; \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_CONSTRUCT \ - : updateSkip((ushort)0) \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_BOUND_UPDATE_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_BOX_EMITTER_MEMBERS \ -float width; \ -float height; \ -float depth; \ - -#define NI_P_SYS_BOX_EMITTER_INCLUDE "NiPSysVolumeEmitter.h" \ - -#define NI_P_SYS_BOX_EMITTER_PARENT NiPSysVolumeEmitter \ - -#define NI_P_SYS_BOX_EMITTER_CONSTRUCT \ - : width(0.0f), height(0.0f), depth(0.0f) \ - -#define NI_P_SYS_BOX_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_BOX_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_BOX_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_BOX_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_BOX_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_COLLIDER_MANAGER_MEMBERS \ -Ref<NiPSysPlanarCollider > collider; \ - -#define NI_P_SYS_COLLIDER_MANAGER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_COLLIDER_MANAGER_PARENT NiPSysModifier \ - -#define NI_P_SYS_COLLIDER_MANAGER_CONSTRUCT \ - : collider(NULL) \ - -#define NI_P_SYS_COLLIDER_MANAGER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_COLLIDER_MANAGER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_COLLIDER_MANAGER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_COLLIDER_MANAGER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_COLLIDER_MANAGER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_COLOR_MODIFIER_MEMBERS \ -Ref<NiColorData > data; \ - -#define NI_P_SYS_COLOR_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_COLOR_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_COLOR_MODIFIER_CONSTRUCT \ - : data(NULL) \ - -#define NI_P_SYS_COLOR_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_COLOR_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_COLOR_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_COLOR_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_COLOR_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_CYLINDER_EMITTER_MEMBERS \ -float radius; \ -float height; \ - -#define NI_P_SYS_CYLINDER_EMITTER_INCLUDE "NiPSysVolumeEmitter.h" \ - -#define NI_P_SYS_CYLINDER_EMITTER_PARENT NiPSysVolumeEmitter \ - -#define NI_P_SYS_CYLINDER_EMITTER_CONSTRUCT \ - : radius(0.0f), height(0.0f) \ - -#define NI_P_SYS_CYLINDER_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_CYLINDER_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_CYLINDER_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_CYLINDER_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_CYLINDER_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_DATA_MEMBERS \ -vector< array<float,10> > unknownFloats4; \ -bool unknownBool1; \ -vector< array<byte,32> > unknownBytes; \ -vector< array<byte,28> > unknownBytesAlt; \ -byte unknownByte3; \ -bool unknownBool2; \ -vector< array<byte,4> > unknownBytes2; \ -uint unknownInt1; \ - -#define NI_P_SYS_DATA_INCLUDE "APSysData.h" \ - -#define NI_P_SYS_DATA_PARENT APSysData \ - -#define NI_P_SYS_DATA_CONSTRUCT \ - : unknownBool1(false), unknownByte3((byte)0), unknownBool2(false), unknownInt1((uint)0) \ - -#define NI_P_SYS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_DRAG_MODIFIER_MEMBERS \ -NiObject * parent; \ -Vector3 dragAxis; \ -float percentage; \ -float range; \ -float rangeFalloff; \ - -#define NI_P_SYS_DRAG_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_DRAG_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_DRAG_MODIFIER_CONSTRUCT \ - : parent(NULL), percentage(0.0f), range(0.0f), rangeFalloff(0.0f) \ - -#define NI_P_SYS_DRAG_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_DRAG_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_DRAG_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_DRAG_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_DRAG_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_CTLR_MEMBERS \ -Ref<NiPSysEmitterCtlrData > data; \ -Ref<NiInterpolator > visibilityInterpolator; \ - -#define NI_P_SYS_EMITTER_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_EMITTER_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_EMITTER_CTLR_CONSTRUCT \ - : data(NULL), visibilityInterpolator(NULL) \ - -#define NI_P_SYS_EMITTER_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_MEMBERS \ -KeyGroup<float > floatKeys_; \ -mutable uint numVisibilityKeys_; \ -vector<Key<byte > > visibilityKeys_; \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_INCLUDE "NiObject.h" \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_PARENT NiObject \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_CONSTRUCT \ - : numVisibilityKeys_((uint)0) \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_CTLR_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_MEMBERS \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_CONSTRUCT \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_MEMBERS \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_CONSTRUCT \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_MEMBERS \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_CONSTRUCT \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_MEMBERS \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_CONSTRUCT \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_MEMBERS \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_CONSTRUCT \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_EMITTER_SPEED_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_GRAVITY_MODIFIER_MEMBERS \ -NiNode * gravityObject; \ -Vector3 gravityAxis; \ -float decay; \ -float strength; \ -uint forceType; \ -float turbulence; \ -float turbulenceScale; \ - -#define NI_P_SYS_GRAVITY_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_GRAVITY_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_GRAVITY_MODIFIER_CONSTRUCT \ - : gravityObject(NULL), decay(0.0f), strength(0.0f), forceType((uint)0), turbulence(0.0f), turbulenceScale(1.0f) \ - -#define NI_P_SYS_GRAVITY_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_GRAVITY_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_GRAVITY_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_GRAVITY_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_GRAVITY_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_MEMBERS \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_CONSTRUCT \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_GRAVITY_STRENGTH_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_MEMBERS \ -float growTime; \ -ushort growGeneration; \ -float fadeTime; \ -ushort fadeGeneration; \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_CONSTRUCT \ - : growTime(0.0f), growGeneration((ushort)0), fadeTime(0.0f), fadeGeneration((ushort)0) \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_GROW_FADE_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_MESH_EMITTER_MEMBERS \ -mutable uint numEmitterMeshes; \ -vector<Ref<NiTriBasedGeom > > emitterMeshes; \ -uint initialVelocityType; \ -uint emissionType; \ -Vector3 emissionAxis; \ - -#define NI_P_SYS_MESH_EMITTER_INCLUDE "NiPSysEmitter.h" \ - -#define NI_P_SYS_MESH_EMITTER_PARENT NiPSysEmitter \ - -#define NI_P_SYS_MESH_EMITTER_CONSTRUCT \ - : numEmitterMeshes((uint)0), initialVelocityType((uint)0), emissionType((uint)0) \ - -#define NI_P_SYS_MESH_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_MESH_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_MESH_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_MESH_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_MESH_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_MEMBERS \ -mutable uint numMeshes; \ -vector<Ref<NiNode > > meshes; \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_CONSTRUCT \ - : numMeshes((uint)0) \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_MESH_UPDATE_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_MEMBERS \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_INCLUDE "APSysCtlr.h" \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_PARENT APSysCtlr \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_CONSTRUCT \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_MODIFIER_ACTIVE_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_PLANAR_COLLIDER_MEMBERS \ -float bounce; \ -bool spawnOnCollide; \ -bool dieOnCollide; \ -Ref<NiPSysSpawnModifier > spawnModifier; \ -NiObject * parent; \ -Ref<NiObject > unknownLink_; \ -Ref<NiNode > colliderObject; \ -float width; \ -float height; \ -Vector3 xAxis; \ -Vector3 yAxis; \ - -#define NI_P_SYS_PLANAR_COLLIDER_INCLUDE "NiObject.h" \ - -#define NI_P_SYS_PLANAR_COLLIDER_PARENT NiObject \ - -#define NI_P_SYS_PLANAR_COLLIDER_CONSTRUCT \ - : bounce(0.0f), spawnOnCollide(false), dieOnCollide(false), spawnModifier(NULL), parent(NULL), unknownLink_(NULL), colliderObject(NULL), width(0.0f), height(0.0f) \ - -#define NI_P_SYS_PLANAR_COLLIDER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_PLANAR_COLLIDER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_PLANAR_COLLIDER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_PLANAR_COLLIDER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_PLANAR_COLLIDER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_POSITION_MODIFIER_MEMBERS \ - -#define NI_P_SYS_POSITION_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_POSITION_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_POSITION_MODIFIER_CONSTRUCT \ - -#define NI_P_SYS_POSITION_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_POSITION_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_POSITION_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_POSITION_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_POSITION_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_MEMBERS \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_INCLUDE "NiTimeController.h" \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_PARENT NiTimeController \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_CONSTRUCT \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_RESET_ON_LOOP_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_ROTATION_MODIFIER_MEMBERS \ -float initialRotationSpeed; \ -float initialRotationSpeedVariation; \ -float initialRotationAngle; \ -float initialRotationAngleVariation; \ -bool randomRotSpeedSign; \ -bool randomInitialAxis; \ -Vector3 initialAxis; \ - -#define NI_P_SYS_ROTATION_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_ROTATION_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_ROTATION_MODIFIER_CONSTRUCT \ - : initialRotationSpeed(0.0f), initialRotationSpeedVariation(0.0f), initialRotationAngle(0.0f), initialRotationAngleVariation(0.0f), randomRotSpeedSign(false), randomInitialAxis(false) \ - -#define NI_P_SYS_ROTATION_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_ROTATION_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_ROTATION_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_ROTATION_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_ROTATION_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_SPAWN_MODIFIER_MEMBERS \ -ushort numSpawnGenerations; \ -float percentageSpawned; \ -ushort minNumToSpawn; \ -ushort maxNumToSpawn; \ -float spawnSpeedChaos; \ -float spawnDirChaos; \ -float lifeSpan; \ -float lifeSpanVariation; \ - -#define NI_P_SYS_SPAWN_MODIFIER_INCLUDE "NiPSysModifier.h" \ - -#define NI_P_SYS_SPAWN_MODIFIER_PARENT NiPSysModifier \ - -#define NI_P_SYS_SPAWN_MODIFIER_CONSTRUCT \ - : numSpawnGenerations((ushort)0), percentageSpawned(0.0f), minNumToSpawn((ushort)0), maxNumToSpawn((ushort)0), spawnSpeedChaos(0.0f), spawnDirChaos(0.0f), lifeSpan(0.0f), lifeSpanVariation(0.0f) \ - -#define NI_P_SYS_SPAWN_MODIFIER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_SPAWN_MODIFIER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_SPAWN_MODIFIER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_SPAWN_MODIFIER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_SPAWN_MODIFIER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_SPHERE_EMITTER_MEMBERS \ -float radius; \ - -#define NI_P_SYS_SPHERE_EMITTER_INCLUDE "NiPSysVolumeEmitter.h" \ - -#define NI_P_SYS_SPHERE_EMITTER_PARENT NiPSysVolumeEmitter \ - -#define NI_P_SYS_SPHERE_EMITTER_CONSTRUCT \ - : radius(0.0f) \ - -#define NI_P_SYS_SPHERE_EMITTER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_SPHERE_EMITTER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_SPHERE_EMITTER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_SPHERE_EMITTER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_SPHERE_EMITTER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_P_SYS_UPDATE_CTLR_MEMBERS \ - -#define NI_P_SYS_UPDATE_CTLR_INCLUDE "NiTimeController.h" \ - -#define NI_P_SYS_UPDATE_CTLR_PARENT NiTimeController \ - -#define NI_P_SYS_UPDATE_CTLR_CONSTRUCT \ - -#define NI_P_SYS_UPDATE_CTLR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_P_SYS_UPDATE_CTLR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_P_SYS_UPDATE_CTLR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_P_SYS_UPDATE_CTLR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_P_SYS_UPDATE_CTLR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_RANGE_L_O_D_DATA_MEMBERS \ -Vector3 lodCenter; \ -mutable uint numLodLevels; \ -vector<LODRange > lodLevels; \ - -#define NI_RANGE_L_O_D_DATA_INCLUDE "NiObject.h" \ - -#define NI_RANGE_L_O_D_DATA_PARENT NiObject \ - -#define NI_RANGE_L_O_D_DATA_CONSTRUCT \ - : numLodLevels((uint)0) \ - -#define NI_RANGE_L_O_D_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_RANGE_L_O_D_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_RANGE_L_O_D_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_RANGE_L_O_D_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_RANGE_L_O_D_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_ROTATING_PARTICLES_MEMBERS \ - -#define NI_ROTATING_PARTICLES_INCLUDE "NiParticles.h" \ - -#define NI_ROTATING_PARTICLES_PARENT NiParticles \ - -#define NI_ROTATING_PARTICLES_CONSTRUCT \ - -#define NI_ROTATING_PARTICLES_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_ROTATING_PARTICLES_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_ROTATING_PARTICLES_STRING \ -return InternalAsString( verbose ); \ - -#define NI_ROTATING_PARTICLES_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_ROTATING_PARTICLES_GETREFS \ -return InternalGetRefs(); \ - -#define NI_ROTATING_PARTICLES_DATA_MEMBERS \ - -#define NI_ROTATING_PARTICLES_DATA_INCLUDE "NiParticlesData.h" \ - -#define NI_ROTATING_PARTICLES_DATA_PARENT NiParticlesData \ - -#define NI_ROTATING_PARTICLES_DATA_CONSTRUCT \ - -#define NI_ROTATING_PARTICLES_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_ROTATING_PARTICLES_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_ROTATING_PARTICLES_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_ROTATING_PARTICLES_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_ROTATING_PARTICLES_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SCREEN_L_O_D_DATA_MEMBERS \ -array<float,8> unknownFloats; \ -mutable uint unknownCount; \ -vector<float > unknownFloats2; \ - -#define NI_SCREEN_L_O_D_DATA_INCLUDE "NiObject.h" \ - -#define NI_SCREEN_L_O_D_DATA_PARENT NiObject \ - -#define NI_SCREEN_L_O_D_DATA_CONSTRUCT \ - : unknownCount((uint)0) \ - -#define NI_SCREEN_L_O_D_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SCREEN_L_O_D_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SCREEN_L_O_D_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SCREEN_L_O_D_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SCREEN_L_O_D_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SEQUENCE_STREAM_HELPER_MEMBERS \ - -#define NI_SEQUENCE_STREAM_HELPER_INCLUDE "NiObjectNET.h" \ - -#define NI_SEQUENCE_STREAM_HELPER_PARENT NiObjectNET \ - -#define NI_SEQUENCE_STREAM_HELPER_CONSTRUCT \ - -#define NI_SEQUENCE_STREAM_HELPER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SEQUENCE_STREAM_HELPER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SEQUENCE_STREAM_HELPER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SEQUENCE_STREAM_HELPER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SEQUENCE_STREAM_HELPER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SHADE_PROPERTY_MEMBERS \ -ushort flags; \ - -#define NI_SHADE_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_SHADE_PROPERTY_PARENT NiProperty \ - -#define NI_SHADE_PROPERTY_CONSTRUCT \ - : flags((ushort)0) \ - -#define NI_SHADE_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SHADE_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SHADE_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SHADE_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SHADE_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SKIN_DATA_MEMBERS \ -Matrix33 rotation; \ -Vector3 translation; \ -float scale; \ -mutable uint numBones; \ -Ref<NiSkinPartition > skinPartition; \ -byte unknownByte; \ -vector<SkinData > boneList; \ - -#define NI_SKIN_DATA_INCLUDE "NiObject.h" \ - -#define NI_SKIN_DATA_PARENT NiObject \ - -#define NI_SKIN_DATA_CONSTRUCT \ - : scale(0.0f), numBones((uint)0), skinPartition(NULL), unknownByte((byte)0) \ - -#define NI_SKIN_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SKIN_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SKIN_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SKIN_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SKIN_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SKIN_INSTANCE_MEMBERS \ -Ref<NiSkinData > data; \ -Ref<NiSkinPartition > skinPartition; \ -NiNode * skeletonRoot; \ -mutable uint numBones; \ -vector<NiNode * > bones; \ - -#define NI_SKIN_INSTANCE_INCLUDE "NiObject.h" \ - -#define NI_SKIN_INSTANCE_PARENT NiObject \ - -#define NI_SKIN_INSTANCE_CONSTRUCT \ - : data(NULL), skinPartition(NULL), skeletonRoot(NULL), numBones((uint)0) \ - -#define NI_SKIN_INSTANCE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SKIN_INSTANCE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SKIN_INSTANCE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SKIN_INSTANCE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SKIN_INSTANCE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SKIN_PARTITION_MEMBERS \ -mutable uint numSkinPartitionBlocks; \ -vector<SkinPartition > skinPartitionBlocks; \ - -#define NI_SKIN_PARTITION_INCLUDE "NiObject.h" \ - -#define NI_SKIN_PARTITION_PARENT NiObject \ - -#define NI_SKIN_PARTITION_CONSTRUCT \ - : numSkinPartitionBlocks((uint)0) \ - -#define NI_SKIN_PARTITION_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SKIN_PARTITION_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SKIN_PARTITION_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SKIN_PARTITION_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SKIN_PARTITION_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SOURCE_TEXTURE_MEMBERS \ -byte useExternal; \ -string fileName; \ -Ref<NiObject > unknownLink; \ -byte unknownByte; \ -string originalFileName_; \ -Ref<NiPixelData > pixelData; \ -PixelLayout pixelLayout; \ -MipMapFormat useMipmaps; \ -AlphaFormat alphaFormat; \ -byte unknownByte2; \ - -#define NI_SOURCE_TEXTURE_INCLUDE "NiObjectNET.h" \ - -#define NI_SOURCE_TEXTURE_PARENT NiObjectNET \ - -#define NI_SOURCE_TEXTURE_CONSTRUCT \ - : useExternal((byte)1), unknownLink(NULL), unknownByte((byte)0), pixelData(NULL), pixelLayout((PixelLayout)5), useMipmaps((MipMapFormat)2), alphaFormat((AlphaFormat)3), unknownByte2((byte)1) \ - -#define NI_SOURCE_TEXTURE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SOURCE_TEXTURE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SOURCE_TEXTURE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SOURCE_TEXTURE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SOURCE_TEXTURE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SPECULAR_PROPERTY_MEMBERS \ -ushort flags; \ - -#define NI_SPECULAR_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_SPECULAR_PROPERTY_PARENT NiProperty \ - -#define NI_SPECULAR_PROPERTY_CONSTRUCT \ - : flags((ushort)0) \ - -#define NI_SPECULAR_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SPECULAR_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SPECULAR_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SPECULAR_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SPECULAR_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SPHERICAL_COLLIDER_MEMBERS \ -float unknownFloat1; \ -ushort unknownShort; \ -float unknownFloat2; \ -float unknownFloat3; \ -float unknownFloat4; \ -float unknownFloat5; \ - -#define NI_SPHERICAL_COLLIDER_INCLUDE "AParticleModifier.h" \ - -#define NI_SPHERICAL_COLLIDER_PARENT AParticleModifier \ - -#define NI_SPHERICAL_COLLIDER_CONSTRUCT \ - : unknownFloat1(0.0f), unknownShort((ushort)0), unknownFloat2(0.0f), unknownFloat3(0.0f), unknownFloat4(0.0f), unknownFloat5(0.0f) \ - -#define NI_SPHERICAL_COLLIDER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SPHERICAL_COLLIDER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SPHERICAL_COLLIDER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SPHERICAL_COLLIDER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SPHERICAL_COLLIDER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_SPOT_LIGHT_MEMBERS \ -float cutoffAngle; \ -float exponent; \ - -#define NI_SPOT_LIGHT_INCLUDE "NiPointLight.h" \ - -#define NI_SPOT_LIGHT_PARENT NiPointLight \ - -#define NI_SPOT_LIGHT_CONSTRUCT \ - : cutoffAngle(0.0f), exponent(0.0f) \ - -#define NI_SPOT_LIGHT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_SPOT_LIGHT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_SPOT_LIGHT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_SPOT_LIGHT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_SPOT_LIGHT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_STENCIL_PROPERTY_MEMBERS \ -ushort flags; \ -bool stencilEnabled; \ -uint stencilFunction; \ -uint stencilRef; \ -uint stencilMask; \ -uint failAction; \ -uint zFailAction; \ -uint passAction; \ -uint drawMode; \ - -#define NI_STENCIL_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_STENCIL_PROPERTY_PARENT NiProperty \ - -#define NI_STENCIL_PROPERTY_CONSTRUCT \ - : flags((ushort)0), stencilEnabled(false), stencilFunction((uint)0), stencilRef((uint)0), stencilMask((uint)4294967295), failAction((uint)0), zFailAction((uint)0), passAction((uint)0), drawMode((uint)0) \ - -#define NI_STENCIL_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_STENCIL_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_STENCIL_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_STENCIL_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_STENCIL_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_STRING_EXTRA_DATA_MEMBERS \ -uint bytesRemaining; \ -string stringData; \ - -#define NI_STRING_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_STRING_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_STRING_EXTRA_DATA_CONSTRUCT \ - : bytesRemaining((uint)0) \ - -#define NI_STRING_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_STRING_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_STRING_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_STRING_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_STRING_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_STRING_PALETTE_MEMBERS \ -StringPalette palette; \ - -#define NI_STRING_PALETTE_INCLUDE "NiObject.h" \ - -#define NI_STRING_PALETTE_PARENT NiObject \ - -#define NI_STRING_PALETTE_CONSTRUCT \ - -#define NI_STRING_PALETTE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_STRING_PALETTE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_STRING_PALETTE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_STRING_PALETTE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_STRING_PALETTE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_STRINGS_EXTRA_DATA_MEMBERS \ -mutable uint numStrings; \ -vector<string > data; \ - -#define NI_STRINGS_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_STRINGS_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_STRINGS_EXTRA_DATA_CONSTRUCT \ - : numStrings((uint)0) \ - -#define NI_STRINGS_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_STRINGS_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_STRINGS_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_STRINGS_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_STRINGS_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TEXT_KEY_EXTRA_DATA_MEMBERS \ -uint unknownInt1; \ -mutable uint numTextKeys; \ -vector<Key<string > > textKeys; \ - -#define NI_TEXT_KEY_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_TEXT_KEY_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_TEXT_KEY_EXTRA_DATA_CONSTRUCT \ - : unknownInt1((uint)0), numTextKeys((uint)0) \ - -#define NI_TEXT_KEY_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TEXT_KEY_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TEXT_KEY_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TEXT_KEY_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TEXT_KEY_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TEXTURE_EFFECT_MEMBERS \ -Matrix33 modelProjectionMatrix; \ -Vector3 modelProjectionTransform; \ -uint textureFiltering; \ -uint textureClamping; \ -uint textureType; \ -uint coordinateGenerationType; \ -Ref<NiSourceTexture > sourceTexture; \ -byte clippingPlane; \ -Vector3 unknownVector; \ -float unknownFloat; \ -ushort ps2L; \ -ushort ps2K; \ -ushort unknownShort; \ - -#define NI_TEXTURE_EFFECT_INCLUDE "NiDynamicEffect.h" \ - -#define NI_TEXTURE_EFFECT_PARENT NiDynamicEffect \ - -#define NI_TEXTURE_EFFECT_CONSTRUCT \ - : textureFiltering((uint)0), textureClamping((uint)0), textureType((uint)0), coordinateGenerationType((uint)0), sourceTexture(NULL), clippingPlane((byte)0), unknownFloat(0.0f), ps2L((ushort)0), ps2K((ushort)0), unknownShort((ushort)0) \ - -#define NI_TEXTURE_EFFECT_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TEXTURE_EFFECT_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TEXTURE_EFFECT_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TEXTURE_EFFECT_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TEXTURE_EFFECT_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_MEMBERS \ -byte unknown2; \ -uint textureSlot; \ -uint operation; \ -Ref<NiFloatData > data; \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_INCLUDE "NiSingleInterpolatorController.h" \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_PARENT NiSingleInterpolatorController \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_CONSTRUCT \ - : unknown2((byte)0), textureSlot((uint)0), operation((uint)0), data(NULL) \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TEXTURE_TRANSFORM_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TEXTURING_PROPERTY_MEMBERS \ -ushort flags; \ -ApplyMode applyMode; \ -uint textureCount; \ -bool hasBaseTexture; \ -TexDesc baseTexture; \ -bool hasDarkTexture; \ -TexDesc darkTexture; \ -bool hasDetailTexture; \ -TexDesc detailTexture; \ -bool hasGlossTexture; \ -TexDesc glossTexture; \ -bool hasGlowTexture; \ -TexDesc glowTexture; \ -bool hasBumpMapTexture; \ -TexDesc bumpMapTexture; \ -float bumpMapLumaScale; \ -float bumpMapLumaOffset; \ -Matrix22 bumpMapMatrix; \ -bool hasDecal0Texture; \ -TexDesc decal0Texture; \ -bool hasDecal1Texture; \ -TexDesc decal1Texture; \ -mutable uint numShaderTextures; \ -vector<ShaderTexDesc > shaderTextures; \ - -#define NI_TEXTURING_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_TEXTURING_PROPERTY_PARENT NiProperty \ - -#define NI_TEXTURING_PROPERTY_CONSTRUCT \ - : flags((ushort)0), applyMode((ApplyMode)2), textureCount((uint)7), hasBaseTexture(false), hasDarkTexture(false), hasDetailTexture(false), hasGlossTexture(false), hasGlowTexture(false), hasBumpMapTexture(false), bumpMapLumaScale(0.0f), bumpMapLumaOffset(0.0f), hasDecal0Texture(false), hasDecal1Texture(false), numShaderTextures((uint)0) \ - -#define NI_TEXTURING_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TEXTURING_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TEXTURING_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TEXTURING_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TEXTURING_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRANSFORM_CONTROLLER_MEMBERS \ - -#define NI_TRANSFORM_CONTROLLER_INCLUDE "NiSingleInterpolatorController.h" \ - -#define NI_TRANSFORM_CONTROLLER_PARENT NiSingleInterpolatorController \ - -#define NI_TRANSFORM_CONTROLLER_CONSTRUCT \ - -#define NI_TRANSFORM_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRANSFORM_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRANSFORM_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRANSFORM_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRANSFORM_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRANSFORM_DATA_MEMBERS \ - -#define NI_TRANSFORM_DATA_INCLUDE "NiKeyframeData.h" \ - -#define NI_TRANSFORM_DATA_PARENT NiKeyframeData \ - -#define NI_TRANSFORM_DATA_CONSTRUCT \ - -#define NI_TRANSFORM_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRANSFORM_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRANSFORM_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRANSFORM_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRANSFORM_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRANSFORM_INTERPOLATOR_MEMBERS \ -Vector3 translation; \ -Quaternion rotation; \ -float scale; \ -array<byte,3> unknownBytes; \ -Ref<NiTransformData > data; \ - -#define NI_TRANSFORM_INTERPOLATOR_INCLUDE "NiInterpolator.h" \ - -#define NI_TRANSFORM_INTERPOLATOR_PARENT NiInterpolator \ - -#define NI_TRANSFORM_INTERPOLATOR_CONSTRUCT \ - : scale(0.0f), data(NULL) \ - -#define NI_TRANSFORM_INTERPOLATOR_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRANSFORM_INTERPOLATOR_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRANSFORM_INTERPOLATOR_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRANSFORM_INTERPOLATOR_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRANSFORM_INTERPOLATOR_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRI_SHAPE_MEMBERS \ - -#define NI_TRI_SHAPE_INCLUDE "NiTriBasedGeom.h" \ - -#define NI_TRI_SHAPE_PARENT NiTriBasedGeom \ - -#define NI_TRI_SHAPE_CONSTRUCT \ - -#define NI_TRI_SHAPE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRI_SHAPE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRI_SHAPE_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRI_SHAPE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRI_SHAPE_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRI_SHAPE_DATA_MEMBERS \ -mutable ushort numTriangles; \ -uint numTrianglePoints; \ -bool hasTriangles; \ -vector<Triangle > triangles; \ -mutable ushort numMatchGroups; \ -vector<MatchGroup > matchGroups; \ - -#define NI_TRI_SHAPE_DATA_INCLUDE "NiTriBasedGeomData.h" \ - -#define NI_TRI_SHAPE_DATA_PARENT NiTriBasedGeomData \ - -#define NI_TRI_SHAPE_DATA_CONSTRUCT \ - : numTriangles((ushort)0), numTrianglePoints((uint)0), hasTriangles(false), numMatchGroups((ushort)0) \ - -#define NI_TRI_SHAPE_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRI_SHAPE_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRI_SHAPE_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRI_SHAPE_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRI_SHAPE_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRI_STRIPS_MEMBERS \ - -#define NI_TRI_STRIPS_INCLUDE "NiTriBasedGeom.h" \ - -#define NI_TRI_STRIPS_PARENT NiTriBasedGeom \ - -#define NI_TRI_STRIPS_CONSTRUCT \ - -#define NI_TRI_STRIPS_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRI_STRIPS_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRI_STRIPS_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRI_STRIPS_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRI_STRIPS_GETREFS \ -return InternalGetRefs(); \ - -#define NI_TRI_STRIPS_DATA_MEMBERS \ -ushort numTriangles; \ -mutable ushort numStrips; \ -mutable vector<ushort > stripLengths; \ -bool hasPoints; \ -vector<vector<ushort > > points; \ - -#define NI_TRI_STRIPS_DATA_INCLUDE "NiTriBasedGeomData.h" \ - -#define NI_TRI_STRIPS_DATA_PARENT NiTriBasedGeomData \ - -#define NI_TRI_STRIPS_DATA_CONSTRUCT \ - : numTriangles((ushort)0), numStrips((ushort)0), hasPoints(false) \ - -#define NI_TRI_STRIPS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_TRI_STRIPS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_TRI_STRIPS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_TRI_STRIPS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_TRI_STRIPS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_U_V_CONTROLLER_MEMBERS \ -ushort unknownShort; \ -Ref<NiUVData > data; \ - -#define NI_U_V_CONTROLLER_INCLUDE "NiTimeController.h" \ - -#define NI_U_V_CONTROLLER_PARENT NiTimeController \ - -#define NI_U_V_CONTROLLER_CONSTRUCT \ - : unknownShort((ushort)0), data(NULL) \ - -#define NI_U_V_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_U_V_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_U_V_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_U_V_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_U_V_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_U_V_DATA_MEMBERS \ -array<KeyGroup<float >,4> uvGroups; \ - -#define NI_U_V_DATA_INCLUDE "NiObject.h" \ - -#define NI_U_V_DATA_PARENT NiObject \ - -#define NI_U_V_DATA_CONSTRUCT \ - -#define NI_U_V_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_U_V_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_U_V_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_U_V_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_U_V_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_VECTOR_EXTRA_DATA_MEMBERS \ -Vector3 vectorData; \ -float unknownFloat; \ - -#define NI_VECTOR_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_VECTOR_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_VECTOR_EXTRA_DATA_CONSTRUCT \ - : unknownFloat(0.0f) \ - -#define NI_VECTOR_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_VECTOR_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_VECTOR_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_VECTOR_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_VECTOR_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_VERTEX_COLOR_PROPERTY_MEMBERS \ -ushort flags; \ -VertMode vertexMode; \ -LightMode lightingMode; \ - -#define NI_VERTEX_COLOR_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_VERTEX_COLOR_PROPERTY_PARENT NiProperty \ - -#define NI_VERTEX_COLOR_PROPERTY_CONSTRUCT \ - : flags((ushort)0), vertexMode((VertMode)0), lightingMode((LightMode)0) \ - -#define NI_VERTEX_COLOR_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_VERTEX_COLOR_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_VERTEX_COLOR_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_VERTEX_COLOR_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_VERTEX_COLOR_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_MEMBERS \ -uint numBytes; \ -mutable ushort numVertices; \ -vector<float > weight; \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_INCLUDE "NiExtraData.h" \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_PARENT NiExtraData \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_CONSTRUCT \ - : numBytes((uint)0), numVertices((ushort)0) \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_VERT_WEIGHTS_EXTRA_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_VIS_CONTROLLER_MEMBERS \ -Ref<NiVisData > data; \ - -#define NI_VIS_CONTROLLER_INCLUDE "NiSingleInterpolatorController.h" \ - -#define NI_VIS_CONTROLLER_PARENT NiSingleInterpolatorController \ - -#define NI_VIS_CONTROLLER_CONSTRUCT \ - : data(NULL) \ - -#define NI_VIS_CONTROLLER_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_VIS_CONTROLLER_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_VIS_CONTROLLER_STRING \ -return InternalAsString( verbose ); \ - -#define NI_VIS_CONTROLLER_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_VIS_CONTROLLER_GETREFS \ -return InternalGetRefs(); \ - -#define NI_VIS_DATA_MEMBERS \ -mutable uint numVisKeys; \ -vector<Key<byte > > visKeys; \ - -#define NI_VIS_DATA_INCLUDE "AKeyedData.h" \ - -#define NI_VIS_DATA_PARENT AKeyedData \ - -#define NI_VIS_DATA_CONSTRUCT \ - : numVisKeys((uint)0) \ - -#define NI_VIS_DATA_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_VIS_DATA_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_VIS_DATA_STRING \ -return InternalAsString( verbose ); \ - -#define NI_VIS_DATA_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_VIS_DATA_GETREFS \ -return InternalGetRefs(); \ - -#define NI_WIREFRAME_PROPERTY_MEMBERS \ -ushort flags; \ - -#define NI_WIREFRAME_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_WIREFRAME_PROPERTY_PARENT NiProperty \ - -#define NI_WIREFRAME_PROPERTY_CONSTRUCT \ - : flags((ushort)0) \ - -#define NI_WIREFRAME_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_WIREFRAME_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_WIREFRAME_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_WIREFRAME_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_WIREFRAME_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define NI_Z_BUFFER_PROPERTY_MEMBERS \ -ushort flags; \ -uint function; \ - -#define NI_Z_BUFFER_PROPERTY_INCLUDE "NiProperty.h" \ - -#define NI_Z_BUFFER_PROPERTY_PARENT NiProperty \ - -#define NI_Z_BUFFER_PROPERTY_CONSTRUCT \ - : flags((ushort)3), function((uint)3) \ - -#define NI_Z_BUFFER_PROPERTY_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define NI_Z_BUFFER_PROPERTY_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define NI_Z_BUFFER_PROPERTY_STRING \ -return InternalAsString( verbose ); \ - -#define NI_Z_BUFFER_PROPERTY_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define NI_Z_BUFFER_PROPERTY_GETREFS \ -return InternalGetRefs(); \ - -#define ROOT_COLLISION_NODE_MEMBERS \ - -#define ROOT_COLLISION_NODE_INCLUDE "NiNode.h" \ - -#define ROOT_COLLISION_NODE_PARENT NiNode \ - -#define ROOT_COLLISION_NODE_CONSTRUCT \ - -#define ROOT_COLLISION_NODE_READ \ -InternalRead( in, link_stack, version, user_version ); \ - -#define ROOT_COLLISION_NODE_WRITE \ -InternalWrite( out, link_map, version, user_version ); \ - -#define ROOT_COLLISION_NODE_STRING \ -return InternalAsString( verbose ); \ - -#define ROOT_COLLISION_NODE_FIXLINKS \ -InternalFixLinks( objects, link_stack, version, user_version ); \ - -#define ROOT_COLLISION_NODE_GETREFS \ -return InternalGetRefs(); \ - -#endif diff --git a/NifExport/niflib/gen/obj_factories.cpp b/NifExport/niflib/gen/obj_factories.cpp deleted file mode 100755 index f373730..0000000 --- a/NifExport/niflib/gen/obj_factories.cpp +++ /dev/null @@ -1,557 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "../obj/NiObject.h" -using namespace Niflib; -using namespace std; -namespace Niflib { -typedef NiObject*(*blk_factory_func)(); -extern map<string, blk_factory_func> global_block_map; -} - -#include "../obj/bhkBlendCollisionObject.h" -NiObject * CreatebhkBlendCollisionObject() { return new bhkBlendCollisionObject; } -#include "../obj/bhkBlendController.h" -NiObject * CreatebhkBlendController() { return new bhkBlendController; } -#include "../obj/bhkBoxShape.h" -NiObject * CreatebhkBoxShape() { return new bhkBoxShape; } -#include "../obj/bhkCapsuleShape.h" -NiObject * CreatebhkCapsuleShape() { return new bhkCapsuleShape; } -#include "../obj/bhkCollisionObject.h" -NiObject * CreatebhkCollisionObject() { return new bhkCollisionObject; } -#include "../obj/bhkConvexVerticesShape.h" -NiObject * CreatebhkConvexVerticesShape() { return new bhkConvexVerticesShape; } -#include "../obj/bhkHingeConstraint.h" -NiObject * CreatebhkHingeConstraint() { return new bhkHingeConstraint; } -#include "../obj/bhkLimitedHingeConstraint.h" -NiObject * CreatebhkLimitedHingeConstraint() { return new bhkLimitedHingeConstraint; } -#include "../obj/bhkListShape.h" -NiObject * CreatebhkListShape() { return new bhkListShape; } -#include "../obj/bhkMalleableConstraint.h" -NiObject * CreatebhkMalleableConstraint() { return new bhkMalleableConstraint; } -#include "../obj/bhkMoppBvTreeShape.h" -NiObject * CreatebhkMoppBvTreeShape() { return new bhkMoppBvTreeShape; } -#include "../obj/bhkMultiSphereShape.h" -NiObject * CreatebhkMultiSphereShape() { return new bhkMultiSphereShape; } -#include "../obj/bhkNiTriStripsShape.h" -NiObject * CreatebhkNiTriStripsShape() { return new bhkNiTriStripsShape; } -#include "../obj/bhkPackedNiTriStripsShape.h" -NiObject * CreatebhkPackedNiTriStripsShape() { return new bhkPackedNiTriStripsShape; } -#include "../obj/bhkPrismaticConstraint.h" -NiObject * CreatebhkPrismaticConstraint() { return new bhkPrismaticConstraint; } -#include "../obj/bhkRagdollConstraint.h" -NiObject * CreatebhkRagdollConstraint() { return new bhkRagdollConstraint; } -#include "../obj/bhkRigidBody.h" -NiObject * CreatebhkRigidBody() { return new bhkRigidBody; } -#include "../obj/bhkRigidBodyT.h" -NiObject * CreatebhkRigidBodyT() { return new bhkRigidBodyT; } -#include "../obj/bhkSimpleShapePhantom.h" -NiObject * CreatebhkSimpleShapePhantom() { return new bhkSimpleShapePhantom; } -#include "../obj/bhkSPCollisionObject.h" -NiObject * CreatebhkSPCollisionObject() { return new bhkSPCollisionObject; } -#include "../obj/bhkSphereShape.h" -NiObject * CreatebhkSphereShape() { return new bhkSphereShape; } -#include "../obj/bhkStiffSpringConstraint.h" -NiObject * CreatebhkStiffSpringConstraint() { return new bhkStiffSpringConstraint; } -#include "../obj/bhkTransformShape.h" -NiObject * CreatebhkTransformShape() { return new bhkTransformShape; } -#include "../obj/bhkConvexTransformShape.h" -NiObject * CreatebhkConvexTransformShape() { return new bhkConvexTransformShape; } -#include "../obj/BSBound.h" -NiObject * CreateBSBound() { return new BSBound; } -#include "../obj/BSFurnitureMarker.h" -NiObject * CreateBSFurnitureMarker() { return new BSFurnitureMarker; } -#include "../obj/BSParentVelocityModifier.h" -NiObject * CreateBSParentVelocityModifier() { return new BSParentVelocityModifier; } -#include "../obj/BSPSysArrayEmitter.h" -NiObject * CreateBSPSysArrayEmitter() { return new BSPSysArrayEmitter; } -#include "../obj/BSXFlags.h" -NiObject * CreateBSXFlags() { return new BSXFlags; } -#include "../obj/hkPackedNiTriStripsData.h" -NiObject * CreatehkPackedNiTriStripsData() { return new hkPackedNiTriStripsData; } -#include "../obj/NiAlphaController.h" -NiObject * CreateNiAlphaController() { return new NiAlphaController; } -#include "../obj/NiAlphaProperty.h" -NiObject * CreateNiAlphaProperty() { return new NiAlphaProperty; } -#include "../obj/NiAmbientLight.h" -NiObject * CreateNiAmbientLight() { return new NiAmbientLight; } -#include "../obj/NiAutoNormalParticlesData.h" -NiObject * CreateNiAutoNormalParticlesData() { return new NiAutoNormalParticlesData; } -#include "../obj/NiBinaryExtraData.h" -NiObject * CreateNiBinaryExtraData() { return new NiBinaryExtraData; } -#include "../obj/NiBlendBoolInterpolator.h" -NiObject * CreateNiBlendBoolInterpolator() { return new NiBlendBoolInterpolator; } -#include "../obj/NiBlendFloatInterpolator.h" -NiObject * CreateNiBlendFloatInterpolator() { return new NiBlendFloatInterpolator; } -#include "../obj/NiBlendPoint3Interpolator.h" -NiObject * CreateNiBlendPoint3Interpolator() { return new NiBlendPoint3Interpolator; } -#include "../obj/NiBlendTransformInterpolator.h" -NiObject * CreateNiBlendTransformInterpolator() { return new NiBlendTransformInterpolator; } -#include "../obj/NiBoneLODController.h" -NiObject * CreateNiBoneLODController() { return new NiBoneLODController; } -#include "../obj/NiBoolData.h" -NiObject * CreateNiBoolData() { return new NiBoolData; } -#include "../obj/NiBooleanExtraData.h" -NiObject * CreateNiBooleanExtraData() { return new NiBooleanExtraData; } -#include "../obj/NiBoolInterpolator.h" -NiObject * CreateNiBoolInterpolator() { return new NiBoolInterpolator; } -#include "../obj/NiBoolTimelineInterpolator.h" -NiObject * CreateNiBoolTimelineInterpolator() { return new NiBoolTimelineInterpolator; } -#include "../obj/NiBSBoneLODController.h" -NiObject * CreateNiBSBoneLODController() { return new NiBSBoneLODController; } -#include "../obj/NiBSplineBasisData.h" -NiObject * CreateNiBSplineBasisData() { return new NiBSplineBasisData; } -#include "../obj/NiBSplineCompFloatInterpolator.h" -NiObject * CreateNiBSplineCompFloatInterpolator() { return new NiBSplineCompFloatInterpolator; } -#include "../obj/NiBSplineCompPoint3Interpolator.h" -NiObject * CreateNiBSplineCompPoint3Interpolator() { return new NiBSplineCompPoint3Interpolator; } -#include "../obj/NiBSplineCompTransformInterpolator.h" -NiObject * CreateNiBSplineCompTransformInterpolator() { return new NiBSplineCompTransformInterpolator; } -#include "../obj/NiBSplineData.h" -NiObject * CreateNiBSplineData() { return new NiBSplineData; } -#include "../obj/NiCamera.h" -NiObject * CreateNiCamera() { return new NiCamera; } -#include "../obj/NiCollisionData.h" -NiObject * CreateNiCollisionData() { return new NiCollisionData; } -#include "../obj/NiColorData.h" -NiObject * CreateNiColorData() { return new NiColorData; } -#include "../obj/NiColorExtraData.h" -NiObject * CreateNiColorExtraData() { return new NiColorExtraData; } -#include "../obj/NiControllerManager.h" -NiObject * CreateNiControllerManager() { return new NiControllerManager; } -#include "../obj/NiControllerSequence.h" -NiObject * CreateNiControllerSequence() { return new NiControllerSequence; } -#include "../obj/NiDefaultAVObjectPalette.h" -NiObject * CreateNiDefaultAVObjectPalette() { return new NiDefaultAVObjectPalette; } -#include "../obj/NiDirectionalLight.h" -NiObject * CreateNiDirectionalLight() { return new NiDirectionalLight; } -#include "../obj/NiDitherProperty.h" -NiObject * CreateNiDitherProperty() { return new NiDitherProperty; } -#include "../obj/NiFlipController.h" -NiObject * CreateNiFlipController() { return new NiFlipController; } -#include "../obj/NiFloatData.h" -NiObject * CreateNiFloatData() { return new NiFloatData; } -#include "../obj/NiFloatExtraData.h" -NiObject * CreateNiFloatExtraData() { return new NiFloatExtraData; } -#include "../obj/NiFloatExtraDataController.h" -NiObject * CreateNiFloatExtraDataController() { return new NiFloatExtraDataController; } -#include "../obj/NiFloatInterpolator.h" -NiObject * CreateNiFloatInterpolator() { return new NiFloatInterpolator; } -#include "../obj/NiFloatsExtraData.h" -NiObject * CreateNiFloatsExtraData() { return new NiFloatsExtraData; } -#include "../obj/NiFogProperty.h" -NiObject * CreateNiFogProperty() { return new NiFogProperty; } -#include "../obj/NiGeomMorpherController.h" -NiObject * CreateNiGeomMorpherController() { return new NiGeomMorpherController; } -#include "../obj/NiGravity.h" -NiObject * CreateNiGravity() { return new NiGravity; } -#include "../obj/NiIntegerExtraData.h" -NiObject * CreateNiIntegerExtraData() { return new NiIntegerExtraData; } -#include "../obj/NiIntegersExtraData.h" -NiObject * CreateNiIntegersExtraData() { return new NiIntegersExtraData; } -#include "../obj/NiKeyframeController.h" -NiObject * CreateNiKeyframeController() { return new NiKeyframeController; } -#include "../obj/BSKeyframeController.h" -NiObject * CreateBSKeyframeController() { return new BSKeyframeController; } -#include "../obj/NiKeyframeData.h" -NiObject * CreateNiKeyframeData() { return new NiKeyframeData; } -#include "../obj/NiLightColorController.h" -NiObject * CreateNiLightColorController() { return new NiLightColorController; } -#include "../obj/NiLightDimmerController.h" -NiObject * CreateNiLightDimmerController() { return new NiLightDimmerController; } -#include "../obj/NiLookAtController.h" -NiObject * CreateNiLookAtController() { return new NiLookAtController; } -#include "../obj/NiLookAtInterpolator.h" -NiObject * CreateNiLookAtInterpolator() { return new NiLookAtInterpolator; } -#include "../obj/NiMaterialColorController.h" -NiObject * CreateNiMaterialColorController() { return new NiMaterialColorController; } -#include "../obj/NiMaterialProperty.h" -NiObject * CreateNiMaterialProperty() { return new NiMaterialProperty; } -#include "../obj/NiMeshPSysData.h" -NiObject * CreateNiMeshPSysData() { return new NiMeshPSysData; } -#include "../obj/NiMorphData.h" -NiObject * CreateNiMorphData() { return new NiMorphData; } -#include "../obj/NiMultiTargetTransformController.h" -NiObject * CreateNiMultiTargetTransformController() { return new NiMultiTargetTransformController; } -#include "../obj/NiNode.h" -NiObject * CreateNiNode() { return new NiNode; } -#include "../obj/AvoidNode.h" -NiObject * CreateAvoidNode() { return new AvoidNode; } -#include "../obj/FxWidget.h" -NiObject * CreateFxWidget() { return new FxWidget; } -#include "../obj/FxButton.h" -NiObject * CreateFxButton() { return new FxButton; } -#include "../obj/FxRadioButton.h" -NiObject * CreateFxRadioButton() { return new FxRadioButton; } -#include "../obj/NiBillboardNode.h" -NiObject * CreateNiBillboardNode() { return new NiBillboardNode; } -#include "../obj/NiBSAnimationNode.h" -NiObject * CreateNiBSAnimationNode() { return new NiBSAnimationNode; } -#include "../obj/NiBSParticleNode.h" -NiObject * CreateNiBSParticleNode() { return new NiBSParticleNode; } -#include "../obj/NiLODNode.h" -NiObject * CreateNiLODNode() { return new NiLODNode; } -#include "../obj/NiPalette.h" -NiObject * CreateNiPalette() { return new NiPalette; } -#include "../obj/NiParticleBomb.h" -NiObject * CreateNiParticleBomb() { return new NiParticleBomb; } -#include "../obj/NiParticleColorModifier.h" -NiObject * CreateNiParticleColorModifier() { return new NiParticleColorModifier; } -#include "../obj/NiParticleGrowFade.h" -NiObject * CreateNiParticleGrowFade() { return new NiParticleGrowFade; } -#include "../obj/NiParticleMeshModifier.h" -NiObject * CreateNiParticleMeshModifier() { return new NiParticleMeshModifier; } -#include "../obj/NiParticleRotation.h" -NiObject * CreateNiParticleRotation() { return new NiParticleRotation; } -#include "../obj/NiParticles.h" -NiObject * CreateNiParticles() { return new NiParticles; } -#include "../obj/NiAutoNormalParticles.h" -NiObject * CreateNiAutoNormalParticles() { return new NiAutoNormalParticles; } -#include "../obj/NiParticleMeshes.h" -NiObject * CreateNiParticleMeshes() { return new NiParticleMeshes; } -#include "../obj/NiParticlesData.h" -NiObject * CreateNiParticlesData() { return new NiParticlesData; } -#include "../obj/NiParticleMeshesData.h" -NiObject * CreateNiParticleMeshesData() { return new NiParticleMeshesData; } -#include "../obj/NiParticleSystem.h" -NiObject * CreateNiParticleSystem() { return new NiParticleSystem; } -#include "../obj/NiMeshParticleSystem.h" -NiObject * CreateNiMeshParticleSystem() { return new NiMeshParticleSystem; } -#include "../obj/NiParticleSystemController.h" -NiObject * CreateNiParticleSystemController() { return new NiParticleSystemController; } -#include "../obj/NiBSPArrayController.h" -NiObject * CreateNiBSPArrayController() { return new NiBSPArrayController; } -#include "../obj/NiPathController.h" -NiObject * CreateNiPathController() { return new NiPathController; } -#include "../obj/NiPathInterpolator.h" -NiObject * CreateNiPathInterpolator() { return new NiPathInterpolator; } -#include "../obj/NiPixelData.h" -NiObject * CreateNiPixelData() { return new NiPixelData; } -#include "../obj/NiPlanarCollider.h" -NiObject * CreateNiPlanarCollider() { return new NiPlanarCollider; } -#include "../obj/NiPoint3Interpolator.h" -NiObject * CreateNiPoint3Interpolator() { return new NiPoint3Interpolator; } -#include "../obj/NiPointLight.h" -NiObject * CreateNiPointLight() { return new NiPointLight; } -#include "../obj/NiPosData.h" -NiObject * CreateNiPosData() { return new NiPosData; } -#include "../obj/NiPSysAgeDeathModifier.h" -NiObject * CreateNiPSysAgeDeathModifier() { return new NiPSysAgeDeathModifier; } -#include "../obj/NiPSysBombModifier.h" -NiObject * CreateNiPSysBombModifier() { return new NiPSysBombModifier; } -#include "../obj/NiPSysBoundUpdateModifier.h" -NiObject * CreateNiPSysBoundUpdateModifier() { return new NiPSysBoundUpdateModifier; } -#include "../obj/NiPSysBoxEmitter.h" -NiObject * CreateNiPSysBoxEmitter() { return new NiPSysBoxEmitter; } -#include "../obj/NiPSysColliderManager.h" -NiObject * CreateNiPSysColliderManager() { return new NiPSysColliderManager; } -#include "../obj/NiPSysColorModifier.h" -NiObject * CreateNiPSysColorModifier() { return new NiPSysColorModifier; } -#include "../obj/NiPSysCylinderEmitter.h" -NiObject * CreateNiPSysCylinderEmitter() { return new NiPSysCylinderEmitter; } -#include "../obj/NiPSysData.h" -NiObject * CreateNiPSysData() { return new NiPSysData; } -#include "../obj/NiPSysDragModifier.h" -NiObject * CreateNiPSysDragModifier() { return new NiPSysDragModifier; } -#include "../obj/NiPSysEmitterCtlr.h" -NiObject * CreateNiPSysEmitterCtlr() { return new NiPSysEmitterCtlr; } -#include "../obj/NiPSysEmitterCtlrData.h" -NiObject * CreateNiPSysEmitterCtlrData() { return new NiPSysEmitterCtlrData; } -#include "../obj/NiPSysEmitterDeclinationCtlr.h" -NiObject * CreateNiPSysEmitterDeclinationCtlr() { return new NiPSysEmitterDeclinationCtlr; } -#include "../obj/NiPSysEmitterDeclinationVarCtlr.h" -NiObject * CreateNiPSysEmitterDeclinationVarCtlr() { return new NiPSysEmitterDeclinationVarCtlr; } -#include "../obj/NiPSysEmitterInitialRadiusCtlr.h" -NiObject * CreateNiPSysEmitterInitialRadiusCtlr() { return new NiPSysEmitterInitialRadiusCtlr; } -#include "../obj/NiPSysEmitterLifeSpanCtlr.h" -NiObject * CreateNiPSysEmitterLifeSpanCtlr() { return new NiPSysEmitterLifeSpanCtlr; } -#include "../obj/NiPSysEmitterSpeedCtlr.h" -NiObject * CreateNiPSysEmitterSpeedCtlr() { return new NiPSysEmitterSpeedCtlr; } -#include "../obj/NiPSysGravityModifier.h" -NiObject * CreateNiPSysGravityModifier() { return new NiPSysGravityModifier; } -#include "../obj/NiPSysGravityStrengthCtlr.h" -NiObject * CreateNiPSysGravityStrengthCtlr() { return new NiPSysGravityStrengthCtlr; } -#include "../obj/NiPSysGrowFadeModifier.h" -NiObject * CreateNiPSysGrowFadeModifier() { return new NiPSysGrowFadeModifier; } -#include "../obj/NiPSysMeshEmitter.h" -NiObject * CreateNiPSysMeshEmitter() { return new NiPSysMeshEmitter; } -#include "../obj/NiPSysMeshUpdateModifier.h" -NiObject * CreateNiPSysMeshUpdateModifier() { return new NiPSysMeshUpdateModifier; } -#include "../obj/NiPSysModifierActiveCtlr.h" -NiObject * CreateNiPSysModifierActiveCtlr() { return new NiPSysModifierActiveCtlr; } -#include "../obj/NiPSysPlanarCollider.h" -NiObject * CreateNiPSysPlanarCollider() { return new NiPSysPlanarCollider; } -#include "../obj/NiPSysPositionModifier.h" -NiObject * CreateNiPSysPositionModifier() { return new NiPSysPositionModifier; } -#include "../obj/NiPSysResetOnLoopCtlr.h" -NiObject * CreateNiPSysResetOnLoopCtlr() { return new NiPSysResetOnLoopCtlr; } -#include "../obj/NiPSysRotationModifier.h" -NiObject * CreateNiPSysRotationModifier() { return new NiPSysRotationModifier; } -#include "../obj/NiPSysSpawnModifier.h" -NiObject * CreateNiPSysSpawnModifier() { return new NiPSysSpawnModifier; } -#include "../obj/NiPSysSphereEmitter.h" -NiObject * CreateNiPSysSphereEmitter() { return new NiPSysSphereEmitter; } -#include "../obj/NiPSysUpdateCtlr.h" -NiObject * CreateNiPSysUpdateCtlr() { return new NiPSysUpdateCtlr; } -#include "../obj/NiRangeLODData.h" -NiObject * CreateNiRangeLODData() { return new NiRangeLODData; } -#include "../obj/NiRotatingParticles.h" -NiObject * CreateNiRotatingParticles() { return new NiRotatingParticles; } -#include "../obj/NiRotatingParticlesData.h" -NiObject * CreateNiRotatingParticlesData() { return new NiRotatingParticlesData; } -#include "../obj/NiScreenLODData.h" -NiObject * CreateNiScreenLODData() { return new NiScreenLODData; } -#include "../obj/NiSequenceStreamHelper.h" -NiObject * CreateNiSequenceStreamHelper() { return new NiSequenceStreamHelper; } -#include "../obj/NiShadeProperty.h" -NiObject * CreateNiShadeProperty() { return new NiShadeProperty; } -#include "../obj/NiSkinData.h" -NiObject * CreateNiSkinData() { return new NiSkinData; } -#include "../obj/NiSkinInstance.h" -NiObject * CreateNiSkinInstance() { return new NiSkinInstance; } -#include "../obj/NiSkinPartition.h" -NiObject * CreateNiSkinPartition() { return new NiSkinPartition; } -#include "../obj/NiSourceTexture.h" -NiObject * CreateNiSourceTexture() { return new NiSourceTexture; } -#include "../obj/NiSpecularProperty.h" -NiObject * CreateNiSpecularProperty() { return new NiSpecularProperty; } -#include "../obj/NiSphericalCollider.h" -NiObject * CreateNiSphericalCollider() { return new NiSphericalCollider; } -#include "../obj/NiSpotLight.h" -NiObject * CreateNiSpotLight() { return new NiSpotLight; } -#include "../obj/NiStencilProperty.h" -NiObject * CreateNiStencilProperty() { return new NiStencilProperty; } -#include "../obj/NiStringExtraData.h" -NiObject * CreateNiStringExtraData() { return new NiStringExtraData; } -#include "../obj/NiStringPalette.h" -NiObject * CreateNiStringPalette() { return new NiStringPalette; } -#include "../obj/NiStringsExtraData.h" -NiObject * CreateNiStringsExtraData() { return new NiStringsExtraData; } -#include "../obj/NiTextKeyExtraData.h" -NiObject * CreateNiTextKeyExtraData() { return new NiTextKeyExtraData; } -#include "../obj/NiTextureEffect.h" -NiObject * CreateNiTextureEffect() { return new NiTextureEffect; } -#include "../obj/NiTextureTransformController.h" -NiObject * CreateNiTextureTransformController() { return new NiTextureTransformController; } -#include "../obj/NiTexturingProperty.h" -NiObject * CreateNiTexturingProperty() { return new NiTexturingProperty; } -#include "../obj/NiTransformController.h" -NiObject * CreateNiTransformController() { return new NiTransformController; } -#include "../obj/NiTransformData.h" -NiObject * CreateNiTransformData() { return new NiTransformData; } -#include "../obj/NiTransformInterpolator.h" -NiObject * CreateNiTransformInterpolator() { return new NiTransformInterpolator; } -#include "../obj/NiTriShape.h" -NiObject * CreateNiTriShape() { return new NiTriShape; } -#include "../obj/NiTriShapeData.h" -NiObject * CreateNiTriShapeData() { return new NiTriShapeData; } -#include "../obj/NiTriStrips.h" -NiObject * CreateNiTriStrips() { return new NiTriStrips; } -#include "../obj/NiTriStripsData.h" -NiObject * CreateNiTriStripsData() { return new NiTriStripsData; } -#include "../obj/NiUVController.h" -NiObject * CreateNiUVController() { return new NiUVController; } -#include "../obj/NiUVData.h" -NiObject * CreateNiUVData() { return new NiUVData; } -#include "../obj/NiVectorExtraData.h" -NiObject * CreateNiVectorExtraData() { return new NiVectorExtraData; } -#include "../obj/NiVertexColorProperty.h" -NiObject * CreateNiVertexColorProperty() { return new NiVertexColorProperty; } -#include "../obj/NiVertWeightsExtraData.h" -NiObject * CreateNiVertWeightsExtraData() { return new NiVertWeightsExtraData; } -#include "../obj/NiVisController.h" -NiObject * CreateNiVisController() { return new NiVisController; } -#include "../obj/NiVisData.h" -NiObject * CreateNiVisData() { return new NiVisData; } -#include "../obj/NiWireframeProperty.h" -NiObject * CreateNiWireframeProperty() { return new NiWireframeProperty; } -#include "../obj/NiZBufferProperty.h" -NiObject * CreateNiZBufferProperty() { return new NiZBufferProperty; } -#include "../obj/RootCollisionNode.h" -NiObject * CreateRootCollisionNode() { return new RootCollisionNode; } - -namespace Niflib { -//This function registers the factory functions with global_block_map which is used by CreateBlock -void RegisterBlockFactories() { - global_block_map["bhkBlendCollisionObject"] = CreatebhkBlendCollisionObject; - global_block_map["bhkBlendController"] = CreatebhkBlendController; - global_block_map["bhkBoxShape"] = CreatebhkBoxShape; - global_block_map["bhkCapsuleShape"] = CreatebhkCapsuleShape; - global_block_map["bhkCollisionObject"] = CreatebhkCollisionObject; - global_block_map["bhkConvexVerticesShape"] = CreatebhkConvexVerticesShape; - global_block_map["bhkHingeConstraint"] = CreatebhkHingeConstraint; - global_block_map["bhkLimitedHingeConstraint"] = CreatebhkLimitedHingeConstraint; - global_block_map["bhkListShape"] = CreatebhkListShape; - global_block_map["bhkMalleableConstraint"] = CreatebhkMalleableConstraint; - global_block_map["bhkMoppBvTreeShape"] = CreatebhkMoppBvTreeShape; - global_block_map["bhkMultiSphereShape"] = CreatebhkMultiSphereShape; - global_block_map["bhkNiTriStripsShape"] = CreatebhkNiTriStripsShape; - global_block_map["bhkPackedNiTriStripsShape"] = CreatebhkPackedNiTriStripsShape; - global_block_map["bhkPrismaticConstraint"] = CreatebhkPrismaticConstraint; - global_block_map["bhkRagdollConstraint"] = CreatebhkRagdollConstraint; - global_block_map["bhkRigidBody"] = CreatebhkRigidBody; - global_block_map["bhkRigidBodyT"] = CreatebhkRigidBodyT; - global_block_map["bhkSimpleShapePhantom"] = CreatebhkSimpleShapePhantom; - global_block_map["bhkSPCollisionObject"] = CreatebhkSPCollisionObject; - global_block_map["bhkSphereShape"] = CreatebhkSphereShape; - global_block_map["bhkStiffSpringConstraint"] = CreatebhkStiffSpringConstraint; - global_block_map["bhkTransformShape"] = CreatebhkTransformShape; - global_block_map["bhkConvexTransformShape"] = CreatebhkConvexTransformShape; - global_block_map["BSBound"] = CreateBSBound; - global_block_map["BSFurnitureMarker"] = CreateBSFurnitureMarker; - global_block_map["BSParentVelocityModifier"] = CreateBSParentVelocityModifier; - global_block_map["BSPSysArrayEmitter"] = CreateBSPSysArrayEmitter; - global_block_map["BSXFlags"] = CreateBSXFlags; - global_block_map["hkPackedNiTriStripsData"] = CreatehkPackedNiTriStripsData; - global_block_map["NiAlphaController"] = CreateNiAlphaController; - global_block_map["NiAlphaProperty"] = CreateNiAlphaProperty; - global_block_map["NiAmbientLight"] = CreateNiAmbientLight; - global_block_map["NiAutoNormalParticlesData"] = CreateNiAutoNormalParticlesData; - global_block_map["NiBinaryExtraData"] = CreateNiBinaryExtraData; - global_block_map["NiBlendBoolInterpolator"] = CreateNiBlendBoolInterpolator; - global_block_map["NiBlendFloatInterpolator"] = CreateNiBlendFloatInterpolator; - global_block_map["NiBlendPoint3Interpolator"] = CreateNiBlendPoint3Interpolator; - global_block_map["NiBlendTransformInterpolator"] = CreateNiBlendTransformInterpolator; - global_block_map["NiBoneLODController"] = CreateNiBoneLODController; - global_block_map["NiBoolData"] = CreateNiBoolData; - global_block_map["NiBooleanExtraData"] = CreateNiBooleanExtraData; - global_block_map["NiBoolInterpolator"] = CreateNiBoolInterpolator; - global_block_map["NiBoolTimelineInterpolator"] = CreateNiBoolTimelineInterpolator; - global_block_map["NiBSBoneLODController"] = CreateNiBSBoneLODController; - global_block_map["NiBSplineBasisData"] = CreateNiBSplineBasisData; - global_block_map["NiBSplineCompFloatInterpolator"] = CreateNiBSplineCompFloatInterpolator; - global_block_map["NiBSplineCompPoint3Interpolator"] = CreateNiBSplineCompPoint3Interpolator; - global_block_map["NiBSplineCompTransformInterpolator"] = CreateNiBSplineCompTransformInterpolator; - global_block_map["NiBSplineData"] = CreateNiBSplineData; - global_block_map["NiCamera"] = CreateNiCamera; - global_block_map["NiCollisionData"] = CreateNiCollisionData; - global_block_map["NiColorData"] = CreateNiColorData; - global_block_map["NiColorExtraData"] = CreateNiColorExtraData; - global_block_map["NiControllerManager"] = CreateNiControllerManager; - global_block_map["NiControllerSequence"] = CreateNiControllerSequence; - global_block_map["NiDefaultAVObjectPalette"] = CreateNiDefaultAVObjectPalette; - global_block_map["NiDirectionalLight"] = CreateNiDirectionalLight; - global_block_map["NiDitherProperty"] = CreateNiDitherProperty; - global_block_map["NiFlipController"] = CreateNiFlipController; - global_block_map["NiFloatData"] = CreateNiFloatData; - global_block_map["NiFloatExtraData"] = CreateNiFloatExtraData; - global_block_map["NiFloatExtraDataController"] = CreateNiFloatExtraDataController; - global_block_map["NiFloatInterpolator"] = CreateNiFloatInterpolator; - global_block_map["NiFloatsExtraData"] = CreateNiFloatsExtraData; - global_block_map["NiFogProperty"] = CreateNiFogProperty; - global_block_map["NiGeomMorpherController"] = CreateNiGeomMorpherController; - global_block_map["NiGravity"] = CreateNiGravity; - global_block_map["NiIntegerExtraData"] = CreateNiIntegerExtraData; - global_block_map["NiIntegersExtraData"] = CreateNiIntegersExtraData; - global_block_map["NiKeyframeController"] = CreateNiKeyframeController; - global_block_map["BSKeyframeController"] = CreateBSKeyframeController; - global_block_map["NiKeyframeData"] = CreateNiKeyframeData; - global_block_map["NiLightColorController"] = CreateNiLightColorController; - global_block_map["NiLightDimmerController"] = CreateNiLightDimmerController; - global_block_map["NiLookAtController"] = CreateNiLookAtController; - global_block_map["NiLookAtInterpolator"] = CreateNiLookAtInterpolator; - global_block_map["NiMaterialColorController"] = CreateNiMaterialColorController; - global_block_map["NiMaterialProperty"] = CreateNiMaterialProperty; - global_block_map["NiMeshPSysData"] = CreateNiMeshPSysData; - global_block_map["NiMorphData"] = CreateNiMorphData; - global_block_map["NiMultiTargetTransformController"] = CreateNiMultiTargetTransformController; - global_block_map["NiNode"] = CreateNiNode; - global_block_map["AvoidNode"] = CreateAvoidNode; - global_block_map["FxWidget"] = CreateFxWidget; - global_block_map["FxButton"] = CreateFxButton; - global_block_map["FxRadioButton"] = CreateFxRadioButton; - global_block_map["NiBillboardNode"] = CreateNiBillboardNode; - global_block_map["NiBSAnimationNode"] = CreateNiBSAnimationNode; - global_block_map["NiBSParticleNode"] = CreateNiBSParticleNode; - global_block_map["NiLODNode"] = CreateNiLODNode; - global_block_map["NiPalette"] = CreateNiPalette; - global_block_map["NiParticleBomb"] = CreateNiParticleBomb; - global_block_map["NiParticleColorModifier"] = CreateNiParticleColorModifier; - global_block_map["NiParticleGrowFade"] = CreateNiParticleGrowFade; - global_block_map["NiParticleMeshModifier"] = CreateNiParticleMeshModifier; - global_block_map["NiParticleRotation"] = CreateNiParticleRotation; - global_block_map["NiParticles"] = CreateNiParticles; - global_block_map["NiAutoNormalParticles"] = CreateNiAutoNormalParticles; - global_block_map["NiParticleMeshes"] = CreateNiParticleMeshes; - global_block_map["NiParticlesData"] = CreateNiParticlesData; - global_block_map["NiParticleMeshesData"] = CreateNiParticleMeshesData; - global_block_map["NiParticleSystem"] = CreateNiParticleSystem; - global_block_map["NiMeshParticleSystem"] = CreateNiMeshParticleSystem; - global_block_map["NiParticleSystemController"] = CreateNiParticleSystemController; - global_block_map["NiBSPArrayController"] = CreateNiBSPArrayController; - global_block_map["NiPathController"] = CreateNiPathController; - global_block_map["NiPathInterpolator"] = CreateNiPathInterpolator; - global_block_map["NiPixelData"] = CreateNiPixelData; - global_block_map["NiPlanarCollider"] = CreateNiPlanarCollider; - global_block_map["NiPoint3Interpolator"] = CreateNiPoint3Interpolator; - global_block_map["NiPointLight"] = CreateNiPointLight; - global_block_map["NiPosData"] = CreateNiPosData; - global_block_map["NiPSysAgeDeathModifier"] = CreateNiPSysAgeDeathModifier; - global_block_map["NiPSysBombModifier"] = CreateNiPSysBombModifier; - global_block_map["NiPSysBoundUpdateModifier"] = CreateNiPSysBoundUpdateModifier; - global_block_map["NiPSysBoxEmitter"] = CreateNiPSysBoxEmitter; - global_block_map["NiPSysColliderManager"] = CreateNiPSysColliderManager; - global_block_map["NiPSysColorModifier"] = CreateNiPSysColorModifier; - global_block_map["NiPSysCylinderEmitter"] = CreateNiPSysCylinderEmitter; - global_block_map["NiPSysData"] = CreateNiPSysData; - global_block_map["NiPSysDragModifier"] = CreateNiPSysDragModifier; - global_block_map["NiPSysEmitterCtlr"] = CreateNiPSysEmitterCtlr; - global_block_map["NiPSysEmitterCtlrData"] = CreateNiPSysEmitterCtlrData; - global_block_map["NiPSysEmitterDeclinationCtlr"] = CreateNiPSysEmitterDeclinationCtlr; - global_block_map["NiPSysEmitterDeclinationVarCtlr"] = CreateNiPSysEmitterDeclinationVarCtlr; - global_block_map["NiPSysEmitterInitialRadiusCtlr"] = CreateNiPSysEmitterInitialRadiusCtlr; - global_block_map["NiPSysEmitterLifeSpanCtlr"] = CreateNiPSysEmitterLifeSpanCtlr; - global_block_map["NiPSysEmitterSpeedCtlr"] = CreateNiPSysEmitterSpeedCtlr; - global_block_map["NiPSysGravityModifier"] = CreateNiPSysGravityModifier; - global_block_map["NiPSysGravityStrengthCtlr"] = CreateNiPSysGravityStrengthCtlr; - global_block_map["NiPSysGrowFadeModifier"] = CreateNiPSysGrowFadeModifier; - global_block_map["NiPSysMeshEmitter"] = CreateNiPSysMeshEmitter; - global_block_map["NiPSysMeshUpdateModifier"] = CreateNiPSysMeshUpdateModifier; - global_block_map["NiPSysModifierActiveCtlr"] = CreateNiPSysModifierActiveCtlr; - global_block_map["NiPSysPlanarCollider"] = CreateNiPSysPlanarCollider; - global_block_map["NiPSysPositionModifier"] = CreateNiPSysPositionModifier; - global_block_map["NiPSysResetOnLoopCtlr"] = CreateNiPSysResetOnLoopCtlr; - global_block_map["NiPSysRotationModifier"] = CreateNiPSysRotationModifier; - global_block_map["NiPSysSpawnModifier"] = CreateNiPSysSpawnModifier; - global_block_map["NiPSysSphereEmitter"] = CreateNiPSysSphereEmitter; - global_block_map["NiPSysUpdateCtlr"] = CreateNiPSysUpdateCtlr; - global_block_map["NiRangeLODData"] = CreateNiRangeLODData; - global_block_map["NiRotatingParticles"] = CreateNiRotatingParticles; - global_block_map["NiRotatingParticlesData"] = CreateNiRotatingParticlesData; - global_block_map["NiScreenLODData"] = CreateNiScreenLODData; - global_block_map["NiSequenceStreamHelper"] = CreateNiSequenceStreamHelper; - global_block_map["NiShadeProperty"] = CreateNiShadeProperty; - global_block_map["NiSkinData"] = CreateNiSkinData; - global_block_map["NiSkinInstance"] = CreateNiSkinInstance; - global_block_map["NiSkinPartition"] = CreateNiSkinPartition; - global_block_map["NiSourceTexture"] = CreateNiSourceTexture; - global_block_map["NiSpecularProperty"] = CreateNiSpecularProperty; - global_block_map["NiSphericalCollider"] = CreateNiSphericalCollider; - global_block_map["NiSpotLight"] = CreateNiSpotLight; - global_block_map["NiStencilProperty"] = CreateNiStencilProperty; - global_block_map["NiStringExtraData"] = CreateNiStringExtraData; - global_block_map["NiStringPalette"] = CreateNiStringPalette; - global_block_map["NiStringsExtraData"] = CreateNiStringsExtraData; - global_block_map["NiTextKeyExtraData"] = CreateNiTextKeyExtraData; - global_block_map["NiTextureEffect"] = CreateNiTextureEffect; - global_block_map["NiTextureTransformController"] = CreateNiTextureTransformController; - global_block_map["NiTexturingProperty"] = CreateNiTexturingProperty; - global_block_map["NiTransformController"] = CreateNiTransformController; - global_block_map["NiTransformData"] = CreateNiTransformData; - global_block_map["NiTransformInterpolator"] = CreateNiTransformInterpolator; - global_block_map["NiTriShape"] = CreateNiTriShape; - global_block_map["NiTriShapeData"] = CreateNiTriShapeData; - global_block_map["NiTriStrips"] = CreateNiTriStrips; - global_block_map["NiTriStripsData"] = CreateNiTriStripsData; - global_block_map["NiUVController"] = CreateNiUVController; - global_block_map["NiUVData"] = CreateNiUVData; - global_block_map["NiVectorExtraData"] = CreateNiVectorExtraData; - global_block_map["NiVertexColorProperty"] = CreateNiVertexColorProperty; - global_block_map["NiVertWeightsExtraData"] = CreateNiVertWeightsExtraData; - global_block_map["NiVisController"] = CreateNiVisController; - global_block_map["NiVisData"] = CreateNiVisData; - global_block_map["NiWireframeProperty"] = CreateNiWireframeProperty; - global_block_map["NiZBufferProperty"] = CreateNiZBufferProperty; - global_block_map["RootCollisionNode"] = CreateRootCollisionNode; -} -} diff --git a/NifExport/niflib/gen/obj_impl.cpp b/NifExport/niflib/gen/obj_impl.cpp deleted file mode 100755 index 50a3c69..0000000 --- a/NifExport/niflib/gen/obj_impl.cpp +++ /dev/null @@ -1,13135 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "../obj/NiObject.h" -using namespace Niflib; -using namespace std; - -#include "../obj/bhkBlendCollisionObject.h" -#include "../obj/bhkBlendController.h" -#include "../obj/bhkBoxShape.h" -#include "../obj/bhkCapsuleShape.h" -#include "../obj/bhkCollisionObject.h" -#include "../obj/bhkConvexVerticesShape.h" -#include "../obj/bhkHingeConstraint.h" -#include "../obj/bhkLimitedHingeConstraint.h" -#include "../obj/bhkListShape.h" -#include "../obj/bhkMalleableConstraint.h" -#include "../obj/bhkMoppBvTreeShape.h" -#include "../obj/bhkMultiSphereShape.h" -#include "../obj/bhkNiTriStripsShape.h" -#include "../obj/bhkPackedNiTriStripsShape.h" -#include "../obj/bhkPrismaticConstraint.h" -#include "../obj/bhkRagdollConstraint.h" -#include "../obj/bhkRigidBody.h" -#include "../obj/bhkRigidBodyT.h" -#include "../obj/bhkSimpleShapePhantom.h" -#include "../obj/bhkSPCollisionObject.h" -#include "../obj/bhkSphereShape.h" -#include "../obj/bhkStiffSpringConstraint.h" -#include "../obj/bhkTransformShape.h" -#include "../obj/bhkConvexTransformShape.h" -#include "../obj/BSBound.h" -#include "../obj/BSFurnitureMarker.h" -#include "../obj/BSParentVelocityModifier.h" -#include "../obj/BSPSysArrayEmitter.h" -#include "../obj/BSXFlags.h" -#include "../obj/hkPackedNiTriStripsData.h" -#include "../obj/NiAlphaController.h" -#include "../obj/NiAlphaProperty.h" -#include "../obj/NiAmbientLight.h" -#include "../obj/NiAutoNormalParticlesData.h" -#include "../obj/NiBinaryExtraData.h" -#include "../obj/NiBlendBoolInterpolator.h" -#include "../obj/NiBlendFloatInterpolator.h" -#include "../obj/NiBlendPoint3Interpolator.h" -#include "../obj/NiBlendTransformInterpolator.h" -#include "../obj/NiBoneLODController.h" -#include "../obj/NiBoolData.h" -#include "../obj/NiBooleanExtraData.h" -#include "../obj/NiBoolInterpolator.h" -#include "../obj/NiBoolTimelineInterpolator.h" -#include "../obj/NiBSBoneLODController.h" -#include "../obj/NiBSplineBasisData.h" -#include "../obj/NiBSplineCompFloatInterpolator.h" -#include "../obj/NiBSplineCompPoint3Interpolator.h" -#include "../obj/NiBSplineCompTransformInterpolator.h" -#include "../obj/NiBSplineData.h" -#include "../obj/NiCamera.h" -#include "../obj/NiCollisionData.h" -#include "../obj/NiColorData.h" -#include "../obj/NiColorExtraData.h" -#include "../obj/NiControllerManager.h" -#include "../obj/NiControllerSequence.h" -#include "../obj/NiDefaultAVObjectPalette.h" -#include "../obj/NiDirectionalLight.h" -#include "../obj/NiDitherProperty.h" -#include "../obj/NiFlipController.h" -#include "../obj/NiFloatData.h" -#include "../obj/NiFloatExtraData.h" -#include "../obj/NiFloatExtraDataController.h" -#include "../obj/NiFloatInterpolator.h" -#include "../obj/NiFloatsExtraData.h" -#include "../obj/NiFogProperty.h" -#include "../obj/NiGeomMorpherController.h" -#include "../obj/NiGravity.h" -#include "../obj/NiIntegerExtraData.h" -#include "../obj/NiIntegersExtraData.h" -#include "../obj/NiKeyframeController.h" -#include "../obj/BSKeyframeController.h" -#include "../obj/NiKeyframeData.h" -#include "../obj/NiLightColorController.h" -#include "../obj/NiLightDimmerController.h" -#include "../obj/NiLookAtController.h" -#include "../obj/NiLookAtInterpolator.h" -#include "../obj/NiMaterialColorController.h" -#include "../obj/NiMaterialProperty.h" -#include "../obj/NiMeshPSysData.h" -#include "../obj/NiMorphData.h" -#include "../obj/NiMultiTargetTransformController.h" -#include "../obj/NiNode.h" -#include "../obj/AvoidNode.h" -#include "../obj/FxWidget.h" -#include "../obj/FxButton.h" -#include "../obj/FxRadioButton.h" -#include "../obj/NiBillboardNode.h" -#include "../obj/NiBSAnimationNode.h" -#include "../obj/NiBSParticleNode.h" -#include "../obj/NiLODNode.h" -#include "../obj/NiPalette.h" -#include "../obj/NiParticleBomb.h" -#include "../obj/NiParticleColorModifier.h" -#include "../obj/NiParticleGrowFade.h" -#include "../obj/NiParticleMeshModifier.h" -#include "../obj/NiParticleRotation.h" -#include "../obj/NiParticles.h" -#include "../obj/NiAutoNormalParticles.h" -#include "../obj/NiParticleMeshes.h" -#include "../obj/NiParticlesData.h" -#include "../obj/NiParticleMeshesData.h" -#include "../obj/NiParticleSystem.h" -#include "../obj/NiMeshParticleSystem.h" -#include "../obj/NiParticleSystemController.h" -#include "../obj/NiBSPArrayController.h" -#include "../obj/NiPathController.h" -#include "../obj/NiPathInterpolator.h" -#include "../obj/NiPixelData.h" -#include "../obj/NiPlanarCollider.h" -#include "../obj/NiPoint3Interpolator.h" -#include "../obj/NiPointLight.h" -#include "../obj/NiPosData.h" -#include "../obj/NiPSysAgeDeathModifier.h" -#include "../obj/NiPSysBombModifier.h" -#include "../obj/NiPSysBoundUpdateModifier.h" -#include "../obj/NiPSysBoxEmitter.h" -#include "../obj/NiPSysColliderManager.h" -#include "../obj/NiPSysColorModifier.h" -#include "../obj/NiPSysCylinderEmitter.h" -#include "../obj/NiPSysData.h" -#include "../obj/NiPSysDragModifier.h" -#include "../obj/NiPSysEmitterCtlr.h" -#include "../obj/NiPSysEmitterCtlrData.h" -#include "../obj/NiPSysEmitterDeclinationCtlr.h" -#include "../obj/NiPSysEmitterDeclinationVarCtlr.h" -#include "../obj/NiPSysEmitterInitialRadiusCtlr.h" -#include "../obj/NiPSysEmitterLifeSpanCtlr.h" -#include "../obj/NiPSysEmitterSpeedCtlr.h" -#include "../obj/NiPSysGravityModifier.h" -#include "../obj/NiPSysGravityStrengthCtlr.h" -#include "../obj/NiPSysGrowFadeModifier.h" -#include "../obj/NiPSysMeshEmitter.h" -#include "../obj/NiPSysMeshUpdateModifier.h" -#include "../obj/NiPSysModifierActiveCtlr.h" -#include "../obj/NiPSysPlanarCollider.h" -#include "../obj/NiPSysPositionModifier.h" -#include "../obj/NiPSysResetOnLoopCtlr.h" -#include "../obj/NiPSysRotationModifier.h" -#include "../obj/NiPSysSpawnModifier.h" -#include "../obj/NiPSysSphereEmitter.h" -#include "../obj/NiPSysUpdateCtlr.h" -#include "../obj/NiRangeLODData.h" -#include "../obj/NiRotatingParticles.h" -#include "../obj/NiRotatingParticlesData.h" -#include "../obj/NiScreenLODData.h" -#include "../obj/NiSequenceStreamHelper.h" -#include "../obj/NiShadeProperty.h" -#include "../obj/NiSkinData.h" -#include "../obj/NiSkinInstance.h" -#include "../obj/NiSkinPartition.h" -#include "../obj/NiSourceTexture.h" -#include "../obj/NiSpecularProperty.h" -#include "../obj/NiSphericalCollider.h" -#include "../obj/NiSpotLight.h" -#include "../obj/NiStencilProperty.h" -#include "../obj/NiStringExtraData.h" -#include "../obj/NiStringPalette.h" -#include "../obj/NiStringsExtraData.h" -#include "../obj/NiTextKeyExtraData.h" -#include "../obj/NiTextureEffect.h" -#include "../obj/NiTextureTransformController.h" -#include "../obj/NiTexturingProperty.h" -#include "../obj/NiTransformController.h" -#include "../obj/NiTransformData.h" -#include "../obj/NiTransformInterpolator.h" -#include "../obj/NiTriShape.h" -#include "../obj/NiTriShapeData.h" -#include "../obj/NiTriStrips.h" -#include "../obj/NiTriStripsData.h" -#include "../obj/NiUVController.h" -#include "../obj/NiUVData.h" -#include "../obj/NiVectorExtraData.h" -#include "../obj/NiVertexColorProperty.h" -#include "../obj/NiVertWeightsExtraData.h" -#include "../obj/NiVisController.h" -#include "../obj/NiVisData.h" -#include "../obj/NiWireframeProperty.h" -#include "../obj/NiZBufferProperty.h" -#include "../obj/RootCollisionNode.h" - -void NiObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { -} - -void NiObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { -} - -std::string NiObject::InternalAsString( bool verbose ) const { - stringstream out; - return out.str(); -} - -void NiObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { -} - -std::list<NiObjectRef> NiObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - return refs; -} - -void AKeyedData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); -} - -void AKeyedData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); -} - -std::string AKeyedData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - return out.str(); -} - -void AKeyedData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> AKeyedData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void AParticleModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void AParticleModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - if ( nextModifier != NULL ) - NifStream( link_map[StaticCast<NiObject>(nextModifier)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( controller != NULL ) - NifStream( link_map[StaticCast<NiObject>(controller)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string AParticleModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Next Modifier: " << nextModifier << endl; - out << " Controller: " << controller << endl; - return out.str(); -} - -void AParticleModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nextModifier = DynamicCast<AParticleModifier>(objects[link_stack.front()]); - if ( nextModifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nextModifier = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controller = DynamicCast<NiParticleSystemController>(objects[link_stack.front()]); - if ( controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controller = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> AParticleModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( nextModifier != NULL ) - refs.push_back(StaticCast<NiObject>(nextModifier)); - return refs; -} - -void bhkRefObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); -} - -void bhkRefObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); -} - -std::string bhkRefObject::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - return out.str(); -} - -void bhkRefObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkRefObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void bhkSerializable::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkRefObject::Read( in, link_stack, version, user_version ); -} - -void bhkSerializable::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkRefObject::Write( out, link_map, version, user_version ); -} - -std::string bhkSerializable::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkRefObject::asString(); - return out.str(); -} - -void bhkSerializable::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkRefObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkSerializable::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkRefObject::GetRefs(); - return refs; -} - -void AbhkConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - bhkSerializable::Read( in, link_stack, version, user_version ); - NifStream( numBodies, in, version ); - bodies.resize(numBodies); - for (uint i1 = 0; i1 < bodies.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( priority, in, version ); -} - -void AbhkConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkSerializable::Write( out, link_map, version, user_version ); - numBodies = uint(bodies.size()); - NifStream( numBodies, out, version ); - for (uint i1 = 0; i1 < bodies.size(); i1++) { - if ( bodies[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(bodies[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( priority, out, version ); -} - -std::string AbhkConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkSerializable::asString(); - numBodies = uint(bodies.size()); - out << " Num Bodies: " << numBodies << endl; - for (uint i1 = 0; i1 < bodies.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Bodies[" << i1 << "]: " << bodies[i1] << endl; - }; - out << " Priority: " << priority << endl; - return out.str(); -} - -void AbhkConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSerializable::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < bodies.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - bodies[i1] = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( bodies[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - bodies[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> AbhkConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkSerializable::GetRefs(); - for (uint i1 = 0; i1 < bodies.size(); i1++) { - }; - return refs; -} - -void AbhkRagdollConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::Read( in, link_stack, version, user_version ); - NifStream( pivotA, in, version ); - NifStream( planeA, in, version ); - NifStream( twistA, in, version ); - NifStream( pivotB, in, version ); - NifStream( planeB, in, version ); - NifStream( twistB, in, version ); - NifStream( coneMinAngle, in, version ); - NifStream( planeMinAngle, in, version ); - NifStream( planeMaxAngle, in, version ); - NifStream( twistMinAngle, in, version ); - NifStream( twistMaxAngle, in, version ); - NifStream( maxFriction, in, version ); -} - -void AbhkRagdollConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkConstraint::Write( out, link_map, version, user_version ); - NifStream( pivotA, out, version ); - NifStream( planeA, out, version ); - NifStream( twistA, out, version ); - NifStream( pivotB, out, version ); - NifStream( planeB, out, version ); - NifStream( twistB, out, version ); - NifStream( coneMinAngle, out, version ); - NifStream( planeMinAngle, out, version ); - NifStream( planeMaxAngle, out, version ); - NifStream( twistMinAngle, out, version ); - NifStream( twistMaxAngle, out, version ); - NifStream( maxFriction, out, version ); -} - -std::string AbhkRagdollConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkConstraint::asString(); - out << " Pivot A: " << pivotA << endl; - out << " Plane A: " << planeA << endl; - out << " Twist A: " << twistA << endl; - out << " Pivot B: " << pivotB << endl; - out << " Plane B: " << planeB << endl; - out << " Twist B: " << twistB << endl; - out << " Cone Min Angle: " << coneMinAngle << endl; - out << " Plane Min Angle: " << planeMinAngle << endl; - out << " Plane Max Angle: " << planeMaxAngle << endl; - out << " Twist Min Angle: " << twistMinAngle << endl; - out << " Twist Max Angle: " << twistMaxAngle << endl; - out << " Max Friction: " << maxFriction << endl; - return out.str(); -} - -void AbhkRagdollConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> AbhkRagdollConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkConstraint::GetRefs(); - return refs; -} - -void bhkShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSerializable::Read( in, link_stack, version, user_version ); -} - -void bhkShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkSerializable::Write( out, link_map, version, user_version ); -} - -std::string bhkShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkSerializable::asString(); - return out.str(); -} - -void bhkShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSerializable::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkSerializable::GetRefs(); - return refs; -} - -void AbhkShapeCollection::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::Read( in, link_stack, version, user_version ); -} - -void AbhkShapeCollection::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkShape::Write( out, link_map, version, user_version ); -} - -std::string AbhkShapeCollection::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkShape::asString(); - return out.str(); -} - -void AbhkShapeCollection::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> AbhkShapeCollection::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkShape::GetRefs(); - return refs; -} - -void bhkSphereRepShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::Read( in, link_stack, version, user_version ); - NifStream( material, in, version ); -} - -void bhkSphereRepShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkShape::Write( out, link_map, version, user_version ); - NifStream( material, out, version ); -} - -std::string bhkSphereRepShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkShape::asString(); - out << " Material: " << material << endl; - return out.str(); -} - -void bhkSphereRepShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkSphereRepShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkShape::GetRefs(); - return refs; -} - -void bhkConvexShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::Read( in, link_stack, version, user_version ); -} - -void bhkConvexShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkSphereRepShape::Write( out, link_map, version, user_version ); -} - -std::string bhkConvexShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkSphereRepShape::asString(); - return out.str(); -} - -void bhkConvexShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkConvexShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkSphereRepShape::GetRefs(); - return refs; -} - -void bhkWorldObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::Read( in, link_stack, version, user_version ); -} - -void bhkWorldObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkShape::Write( out, link_map, version, user_version ); -} - -std::string bhkWorldObject::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkShape::asString(); - return out.str(); -} - -void bhkWorldObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkWorldObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkShape::GetRefs(); - return refs; -} - -void bhkEntity::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - bhkWorldObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( layer, in, version ); -} - -void bhkEntity::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkWorldObject::Write( out, link_map, version, user_version ); - if ( shape != NULL ) - NifStream( link_map[StaticCast<NiObject>(shape)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( layer, out, version ); -} - -std::string bhkEntity::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkWorldObject::asString(); - out << " Shape: " << shape << endl; - out << " Layer: " << layer << endl; - return out.str(); -} - -void bhkEntity::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkWorldObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shape = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( shape == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shape = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> bhkEntity::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkWorldObject::GetRefs(); - if ( shape != NULL ) - refs.push_back(StaticCast<NiObject>(shape)); - return refs; -} - -void NiCollisionObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownShort, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiCollisionObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - if ( parent != NULL ) - NifStream( link_map[StaticCast<NiObject>(parent)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownShort, out, version ); - if ( body != NULL ) - NifStream( link_map[StaticCast<NiObject>(body)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiCollisionObject::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Parent: " << parent << endl; - out << " Unknown Short: " << unknownShort << endl; - out << " Body: " << body << endl; - return out.str(); -} - -void NiCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - parent = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( parent == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - parent = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - body = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( body == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - body = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiCollisionObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( body != NULL ) - refs.push_back(StaticCast<NiObject>(body)); - return refs; -} - -void NiExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A000100 ) { - NifStream( name, in, version ); - }; - if ( version <= 0x04020200 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - if ( version >= 0x0A000100 ) { - NifStream( name, out, version ); - }; - if ( version <= 0x04020200 ) { - if ( nextExtraData != NULL ) - NifStream( link_map[StaticCast<NiObject>(nextExtraData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Name: " << name << endl; - out << " Next Extra Data: " << nextExtraData << endl; - return out.str(); -} - -void NiExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x04020200 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nextExtraData = DynamicCast<NiExtraData>(objects[link_stack.front()]); - if ( nextExtraData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nextExtraData = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( nextExtraData != NULL ) - refs.push_back(StaticCast<NiObject>(nextExtraData)); - return refs; -} - -void NiInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); -} - -void NiInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); -} - -std::string NiInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - return out.str(); -} - -void NiInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiBlendInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( unknownShort, in, version ); - NifStream( unknownInt, in, version ); -} - -void NiBlendInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( unknownShort, out, version ); - NifStream( unknownInt, out, version ); -} - -std::string NiBlendInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Unknown Short: " << unknownShort << endl; - out << " Unknown Int: " << unknownInt << endl; - return out.str(); -} - -void NiBlendInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBlendInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - return refs; -} - -void NiBSplineInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( startTime, in, version ); - NifStream( stopTime, in, version ); -} - -void NiBSplineInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( startTime, out, version ); - NifStream( stopTime, out, version ); -} - -std::string NiBSplineInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Start Time: " << startTime << endl; - out << " Stop Time: " << stopTime << endl; - return out.str(); -} - -void NiBSplineInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSplineInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - return refs; -} - -void NiObjectNET::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( name, in, version ); - if ( version <= 0x04020200 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x0A000100 ) { - NifStream( numExtraDataList, in, version ); - extraDataList.resize(numExtraDataList); - for (uint i2 = 0; i2 < extraDataList.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiObjectNET::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numExtraDataList = uint(extraDataList.size()); - NifStream( name, out, version ); - if ( version <= 0x04020200 ) { - if ( extraData != NULL ) - NifStream( link_map[StaticCast<NiObject>(extraData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x0A000100 ) { - NifStream( numExtraDataList, out, version ); - for (uint i2 = 0; i2 < extraDataList.size(); i2++) { - if ( extraDataList[i2] != NULL ) - NifStream( link_map[StaticCast<NiObject>(extraDataList[i2])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; - if ( controller != NULL ) - NifStream( link_map[StaticCast<NiObject>(controller)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiObjectNET::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numExtraDataList = uint(extraDataList.size()); - out << " Name: " << name << endl; - out << " Extra Data: " << extraData << endl; - out << " Num Extra Data List: " << numExtraDataList << endl; - for (uint i1 = 0; i1 < extraDataList.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Extra Data List[" << i1 << "]: " << extraDataList[i1] << endl; - }; - out << " Controller: " << controller << endl; - return out.str(); -} - -void NiObjectNET::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x04020200 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - extraData = DynamicCast<NiExtraData>(objects[link_stack.front()]); - if ( extraData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - extraData = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A000100 ) { - for (uint i2 = 0; i2 < extraDataList.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - extraDataList[i2] = DynamicCast<NiExtraData>(objects[link_stack.front()]); - if ( extraDataList[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - extraDataList[i2] = NULL; - link_stack.pop_front(); - }; - }; - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controller = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controller = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiObjectNET::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( extraData != NULL ) - refs.push_back(StaticCast<NiObject>(extraData)); - for (uint i1 = 0; i1 < extraDataList.size(); i1++) { - if ( extraDataList[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(extraDataList[i1])); - }; - if ( controller != NULL ) - refs.push_back(StaticCast<NiObject>(controller)); - return refs; -} - -void NiAVObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObjectNET::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); - NifStream( translation, in, version ); - NifStream( rotation, in, version ); - NifStream( scale, in, version ); - if ( version <= 0x04020200 ) { - NifStream( velocity, in, version ); - }; - NifStream( numProperties, in, version ); - properties.resize(numProperties); - for (uint i1 = 0; i1 < properties.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version <= 0x04020200 ) { - NifStream( hasBoundingBox, in, version ); - if ( (hasBoundingBox != 0) ) { - NifStream( boundingBox.unknownInt, in, version ); - NifStream( boundingBox.translation, in, version ); - NifStream( boundingBox.rotation, in, version ); - NifStream( boundingBox.radius, in, version ); - }; - }; - if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x14000004 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiAVObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObjectNET::Write( out, link_map, version, user_version ); - numProperties = uint(properties.size()); - NifStream( flags, out, version ); - NifStream( translation, out, version ); - NifStream( rotation, out, version ); - NifStream( scale, out, version ); - if ( version <= 0x04020200 ) { - NifStream( velocity, out, version ); - }; - NifStream( numProperties, out, version ); - for (uint i1 = 0; i1 < properties.size(); i1++) { - if ( properties[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(properties[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version <= 0x04020200 ) { - NifStream( hasBoundingBox, out, version ); - if ( (hasBoundingBox != 0) ) { - NifStream( boundingBox.unknownInt, out, version ); - NifStream( boundingBox.translation, out, version ); - NifStream( boundingBox.rotation, out, version ); - NifStream( boundingBox.radius, out, version ); - }; - }; - if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { - if ( collisionData != NULL ) - NifStream( link_map[StaticCast<NiObject>(collisionData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x14000004 ) { - if ( collisionObject != NULL ) - NifStream( link_map[StaticCast<NiObject>(collisionObject)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiAVObject::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObjectNET::asString(); - numProperties = uint(properties.size()); - out << " Flags: " << flags << endl; - out << " Translation: " << translation << endl; - out << " Rotation: " << rotation << endl; - out << " Scale: " << scale << endl; - out << " Velocity: " << velocity << endl; - out << " Num Properties: " << numProperties << endl; - for (uint i1 = 0; i1 < properties.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Properties[" << i1 << "]: " << properties[i1] << endl; - }; - out << " Has Bounding Box: " << hasBoundingBox << endl; - if ( (hasBoundingBox != 0) ) { - out << " Unknown Int: " << boundingBox.unknownInt << endl; - out << " Translation: " << boundingBox.translation << endl; - out << " Rotation: " << boundingBox.rotation << endl; - out << " Radius: " << boundingBox.radius << endl; - }; - out << " Collision Data: " << collisionData << endl; - out << " Collision Object: " << collisionObject << endl; - return out.str(); -} - -void NiAVObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObjectNET::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < properties.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - properties[i1] = DynamicCast<NiProperty>(objects[link_stack.front()]); - if ( properties[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - properties[i1] = NULL; - link_stack.pop_front(); - }; - if ( ( version >= 0x0A000100 ) && ( version <= 0x0A020000 ) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - collisionData = DynamicCast<NiCollisionData>(objects[link_stack.front()]); - if ( collisionData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - collisionData = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - collisionObject = DynamicCast<NiCollisionObject>(objects[link_stack.front()]); - if ( collisionObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - collisionObject = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiAVObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObjectNET::GetRefs(); - for (uint i1 = 0; i1 < properties.size(); i1++) { - if ( properties[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(properties[i1])); - }; - if ( collisionData != NULL ) - refs.push_back(StaticCast<NiObject>(collisionData)); - if ( collisionObject != NULL ) - refs.push_back(StaticCast<NiObject>(collisionObject)); - return refs; -} - -void NiDynamicEffect::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiAVObject::Read( in, link_stack, version, user_version ); - if ( version <= 0x04000002 ) { - NifStream( hasAffectedNodeList_, in, version ); - if ( (hasAffectedNodeList_ != 0) ) { - NifStream( affectedNodeList_, in, version ); - }; - }; - if ( version >= 0x0A020000 ) { - NifStream( switchState, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( numAffectedNodes, in, version ); - affectedNodes.resize(numAffectedNodes); - for (uint i2 = 0; i2 < affectedNodes.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; -} - -void NiDynamicEffect::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiAVObject::Write( out, link_map, version, user_version ); - numAffectedNodes = uint(affectedNodes.size()); - if ( version <= 0x04000002 ) { - NifStream( hasAffectedNodeList_, out, version ); - if ( (hasAffectedNodeList_ != 0) ) { - NifStream( affectedNodeList_, out, version ); - }; - }; - if ( version >= 0x0A020000 ) { - NifStream( switchState, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( numAffectedNodes, out, version ); - for (uint i2 = 0; i2 < affectedNodes.size(); i2++) { - if ( affectedNodes[i2] != NULL ) - NifStream( link_map[StaticCast<NiObject>(affectedNodes[i2])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; -} - -std::string NiDynamicEffect::InternalAsString( bool verbose ) const { - stringstream out; - out << NiAVObject::asString(); - numAffectedNodes = uint(affectedNodes.size()); - out << " Has Affected Node List?: " << hasAffectedNodeList_ << endl; - if ( (hasAffectedNodeList_ != 0) ) { - out << " Affected Node List?: " << affectedNodeList_ << endl; - }; - out << " Switch State: " << switchState << endl; - out << " Num Affected Nodes: " << numAffectedNodes << endl; - for (uint i1 = 0; i1 < affectedNodes.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Affected Nodes[" << i1 << "]: " << affectedNodes[i1] << endl; - }; - return out.str(); -} - -void NiDynamicEffect::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiAVObject::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - for (uint i2 = 0; i2 < affectedNodes.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - affectedNodes[i2] = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( affectedNodes[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - affectedNodes[i2] = NULL; - link_stack.pop_front(); - }; - }; -} - -std::list<NiObjectRef> NiDynamicEffect::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiAVObject::GetRefs(); - for (uint i1 = 0; i1 < affectedNodes.size(); i1++) { - if ( affectedNodes[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(affectedNodes[i1])); - }; - return refs; -} - -void NiLight::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiDynamicEffect::Read( in, link_stack, version, user_version ); - NifStream( dimmer, in, version ); - NifStream( ambientColor, in, version ); - NifStream( diffuseColor, in, version ); - NifStream( specularColor, in, version ); -} - -void NiLight::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiDynamicEffect::Write( out, link_map, version, user_version ); - NifStream( dimmer, out, version ); - NifStream( ambientColor, out, version ); - NifStream( diffuseColor, out, version ); - NifStream( specularColor, out, version ); -} - -std::string NiLight::InternalAsString( bool verbose ) const { - stringstream out; - out << NiDynamicEffect::asString(); - out << " Dimmer: " << dimmer << endl; - out << " Ambient Color: " << ambientColor << endl; - out << " Diffuse Color: " << diffuseColor << endl; - out << " Specular Color: " << specularColor << endl; - return out.str(); -} - -void NiLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiDynamicEffect::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiLight::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiDynamicEffect::GetRefs(); - return refs; -} - -void NiProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObjectNET::Read( in, link_stack, version, user_version ); -} - -void NiProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObjectNET::Write( out, link_map, version, user_version ); -} - -std::string NiProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObjectNET::asString(); - return out.str(); -} - -void NiProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObjectNET::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObjectNET::GetRefs(); - return refs; -} - -void NiPSysModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( name, in, version ); - NifStream( order, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( active, in, version ); -} - -void NiPSysModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - NifStream( name, out, version ); - NifStream( order, out, version ); - if ( target != NULL ) - NifStream( link_map[StaticCast<NiObject>(target)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( active, out, version ); -} - -std::string NiPSysModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Name: " << name << endl; - out << " Order: " << order << endl; - out << " Target: " << target << endl; - out << " Active: " << active << endl; - return out.str(); -} - -void NiPSysModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - target = DynamicCast<NiParticleSystem>(objects[link_stack.front()]); - if ( target == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - target = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiPSysEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( speed, in, version ); - NifStream( speedVariation, in, version ); - NifStream( declination, in, version ); - NifStream( declinationVariation, in, version ); - NifStream( planarAngle, in, version ); - NifStream( planarAngleVariation, in, version ); - NifStream( initialColor, in, version ); - NifStream( initialRadius, in, version ); - NifStream( radiusVariation, in, version ); - NifStream( lifeSpan, in, version ); - NifStream( lifeSpanVariation, in, version ); -} - -void NiPSysEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( speed, out, version ); - NifStream( speedVariation, out, version ); - NifStream( declination, out, version ); - NifStream( declinationVariation, out, version ); - NifStream( planarAngle, out, version ); - NifStream( planarAngleVariation, out, version ); - NifStream( initialColor, out, version ); - NifStream( initialRadius, out, version ); - NifStream( radiusVariation, out, version ); - NifStream( lifeSpan, out, version ); - NifStream( lifeSpanVariation, out, version ); -} - -std::string NiPSysEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Speed: " << speed << endl; - out << " Speed Variation: " << speedVariation << endl; - out << " Declination: " << declination << endl; - out << " Declination Variation: " << declinationVariation << endl; - out << " Planar Angle: " << planarAngle << endl; - out << " Planar Angle Variation: " << planarAngleVariation << endl; - out << " Initial Color: " << initialColor << endl; - out << " Initial Radius: " << initialRadius << endl; - out << " Radius Variation: " << radiusVariation << endl; - out << " Life Span: " << lifeSpan << endl; - out << " Life Span Variation: " << lifeSpanVariation << endl; - return out.str(); -} - -void NiPSysEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysVolumeEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysEmitter::Read( in, link_stack, version, user_version ); - if ( version >= 0x14000004 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiPSysVolumeEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysEmitter::Write( out, link_map, version, user_version ); - if ( version >= 0x14000004 ) { - if ( emitterObject != NULL ) - NifStream( link_map[StaticCast<NiObject>(emitterObject)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiPSysVolumeEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysEmitter::asString(); - out << " Emitter Object: " << emitterObject << endl; - return out.str(); -} - -void NiPSysVolumeEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysEmitter::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - emitterObject = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( emitterObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - emitterObject = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiPSysVolumeEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysEmitter::GetRefs(); - return refs; -} - -void NiTimeController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( flags, in, version ); - NifStream( frequency, in, version ); - NifStream( phase, in, version ); - NifStream( startTime, in, version ); - NifStream( stopTime, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiTimeController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - if ( nextController != NULL ) - NifStream( link_map[StaticCast<NiObject>(nextController)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( flags, out, version ); - NifStream( frequency, out, version ); - NifStream( phase, out, version ); - NifStream( startTime, out, version ); - NifStream( stopTime, out, version ); - if ( target != NULL ) - NifStream( link_map[StaticCast<NiObject>(target)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiTimeController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Next Controller: " << nextController << endl; - out << " Flags: " << flags << endl; - out << " Frequency: " << frequency << endl; - out << " Phase: " << phase << endl; - out << " Start Time: " << startTime << endl; - out << " Stop Time: " << stopTime << endl; - out << " Target: " << target << endl; - return out.str(); -} - -void NiTimeController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nextController = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( nextController == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nextController = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - target = DynamicCast<NiObjectNET>(objects[link_stack.front()]); - if ( target == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - target = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiTimeController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( nextController != NULL ) - refs.push_back(StaticCast<NiObject>(nextController)); - return refs; -} - -void ABoneLODController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( unknownInt1, in, version ); - NifStream( numNodeGroups, in, version ); - NifStream( unknownInt2, in, version ); - nodeGroups.resize(numNodeGroups); - for (uint i1 = 0; i1 < nodeGroups.size(); i1++) { - NifStream( nodeGroups[i1].numNodes, in, version ); - nodeGroups[i1].nodes.resize(nodeGroups[i1].numNodes); - for (uint i2 = 0; i2 < nodeGroups[i1].nodes.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; -} - -void ABoneLODController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - numNodeGroups = uint(nodeGroups.size()); - NifStream( unknownInt1, out, version ); - NifStream( numNodeGroups, out, version ); - NifStream( unknownInt2, out, version ); - for (uint i1 = 0; i1 < nodeGroups.size(); i1++) { - nodeGroups[i1].numNodes = uint(nodeGroups[i1].nodes.size()); - NifStream( nodeGroups[i1].numNodes, out, version ); - for (uint i2 = 0; i2 < nodeGroups[i1].nodes.size(); i2++) { - if ( nodeGroups[i1].nodes[i2] != NULL ) - NifStream( link_map[StaticCast<NiObject>(nodeGroups[i1].nodes[i2])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; -} - -std::string ABoneLODController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - numNodeGroups = uint(nodeGroups.size()); - out << " Unknown Int 1: " << unknownInt1 << endl; - out << " Num Node Groups: " << numNodeGroups << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - for (uint i1 = 0; i1 < nodeGroups.size(); i1++) { - nodeGroups[i1].numNodes = uint(nodeGroups[i1].nodes.size()); - out << " Num Nodes: " << nodeGroups[i1].numNodes << endl; - for (uint i2 = 0; i2 < nodeGroups[i1].nodes.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Nodes[" << i2 << "]: " << nodeGroups[i1].nodes[i2] << endl; - }; - }; - return out.str(); -} - -void ABoneLODController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < nodeGroups.size(); i1++) { - for (uint i2 = 0; i2 < nodeGroups[i1].nodes.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - nodeGroups[i1].nodes[i2] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( nodeGroups[i1].nodes[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - nodeGroups[i1].nodes[i2] = NULL; - link_stack.pop_front(); - }; - }; -} - -std::list<NiObjectRef> ABoneLODController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - for (uint i1 = 0; i1 < nodeGroups.size(); i1++) { - for (uint i2 = 0; i2 < nodeGroups[i1].nodes.size(); i2++) { - if ( nodeGroups[i1].nodes[i2] != NULL ) - refs.push_back(StaticCast<NiObject>(nodeGroups[i1].nodes[i2])); - }; - }; - return refs; -} - -void NiSingleInterpolatorController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiSingleInterpolatorController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( version >= 0x0A020000 ) { - if ( interpolator != NULL ) - NifStream( link_map[StaticCast<NiObject>(interpolator)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiSingleInterpolatorController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Interpolator: " << interpolator << endl; - return out.str(); -} - -void NiSingleInterpolatorController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - interpolator = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( interpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - interpolator = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiSingleInterpolatorController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( interpolator != NULL ) - refs.push_back(StaticCast<NiObject>(interpolator)); - return refs; -} - -void APSysCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); - NifStream( modifierName, in, version ); -} - -void APSysCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); - NifStream( modifierName, out, version ); -} - -std::string APSysCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - out << " Modifier Name: " << modifierName << endl; - return out.str(); -} - -void APSysCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> APSysCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - return refs; -} - -void NiTriBasedGeom::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiAVObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - if ( version >= 0x0A000100 ) { - NifStream( hasShader, in, version ); - if ( (hasShader != 0) ) { - NifStream( shaderName, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; -} - -void NiTriBasedGeom::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiAVObject::Write( out, link_map, version, user_version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( skinInstance != NULL ) - NifStream( link_map[StaticCast<NiObject>(skinInstance)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( version >= 0x0A000100 ) { - NifStream( hasShader, out, version ); - if ( (hasShader != 0) ) { - NifStream( shaderName, out, version ); - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; -} - -std::string NiTriBasedGeom::InternalAsString( bool verbose ) const { - stringstream out; - out << NiAVObject::asString(); - out << " Data: " << data << endl; - out << " Skin Instance: " << skinInstance << endl; - out << " Has Shader: " << hasShader << endl; - if ( (hasShader != 0) ) { - out << " Shader Name: " << shaderName << endl; - out << " Unknown Link: " << unknownLink << endl; - }; - return out.str(); -} - -void NiTriBasedGeom::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiAVObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiTriBasedGeomData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skinInstance = DynamicCast<NiSkinInstance>(objects[link_stack.front()]); - if ( skinInstance == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skinInstance = NULL; - link_stack.pop_front(); - if ( version >= 0x0A000100 ) { - if ( (hasShader != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); - }; - }; -} - -std::list<NiObjectRef> NiTriBasedGeom::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiAVObject::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - if ( skinInstance != NULL ) - refs.push_back(StaticCast<NiObject>(skinInstance)); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - return refs; -} - -void NiTriBasedGeomData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A020000 ) { - NifStream( name, in, version ); - }; - NifStream( numVertices, in, version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownShort1, in, version ); - }; - NifStream( hasVertices, in, version ); - if ( (hasVertices != 0) ) { - vertices.resize(numVertices); - for (uint i2 = 0; i2 < vertices.size(); i2++) { - NifStream( vertices[i2], in, version ); - }; - }; - if ( version >= 0x0A000100 ) { - NifStream( numUvSets2, in, version ); - NifStream( unknownByte, in, version ); - }; - NifStream( hasNormals, in, version ); - if ( (hasNormals != 0) ) { - normals.resize(numVertices); - for (uint i2 = 0; i2 < normals.size(); i2++) { - NifStream( normals[i2], in, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (((hasNormals != 0)) && ((unknownByte & 16))) ) { - unknownVectors1.resize(numVertices); - for (uint i3 = 0; i3 < unknownVectors1.size(); i3++) { - NifStream( unknownVectors1[i3], in, version ); - }; - unknownVectors2.resize(numVertices); - for (uint i3 = 0; i3 < unknownVectors2.size(); i3++) { - NifStream( unknownVectors2[i3], in, version ); - }; - }; - }; - NifStream( center, in, version ); - NifStream( radius, in, version ); - NifStream( hasVertexColors, in, version ); - if ( (hasVertexColors != 0) ) { - vertexColors.resize(numVertices); - for (uint i2 = 0; i2 < vertexColors.size(); i2++) { - NifStream( vertexColors[i2], in, version ); - }; - }; - if ( version <= 0x04020200 ) { - NifStream( numUvSets, in, version ); - }; - if ( version <= 0x04000002 ) { - NifStream( hasUv, in, version ); - }; - if ( version <= 0x04020200 ) { - uvSets.resize(numUvSets); - for (uint i2 = 0; i2 < uvSets.size(); i2++) { - uvSets[i2].resize(numVertices); - for (uint i3 = 0; i3 < uvSets[i2].size(); i3++) { - NifStream( uvSets[i2][i3], in, version ); - }; - }; - }; - if ( version >= 0x0A000100 ) { - uvSets.resize((numUvSets2 & 63)); - for (uint i2 = 0; i2 < uvSets.size(); i2++) { - uvSets[i2].resize(numVertices); - for (uint i3 = 0; i3 < uvSets[i2].size(); i3++) { - NifStream( uvSets[i2][i3], in, version ); - }; - }; - NifStream( unknownShort2, in, version ); - }; - if ( version >= 0x14000004 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiTriBasedGeomData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numUvSets = ushort(uvSets.size()); - numUvSets2 = byte(uvSets.size()); - numVertices = ushort(vertices.size()); - if ( version >= 0x0A020000 ) { - NifStream( name, out, version ); - }; - NifStream( numVertices, out, version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownShort1, out, version ); - }; - NifStream( hasVertices, out, version ); - if ( (hasVertices != 0) ) { - for (uint i2 = 0; i2 < vertices.size(); i2++) { - NifStream( vertices[i2], out, version ); - }; - }; - if ( version >= 0x0A000100 ) { - NifStream( numUvSets2, out, version ); - NifStream( unknownByte, out, version ); - }; - NifStream( hasNormals, out, version ); - if ( (hasNormals != 0) ) { - for (uint i2 = 0; i2 < normals.size(); i2++) { - NifStream( normals[i2], out, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (((hasNormals != 0)) && ((unknownByte & 16))) ) { - for (uint i3 = 0; i3 < unknownVectors1.size(); i3++) { - NifStream( unknownVectors1[i3], out, version ); - }; - for (uint i3 = 0; i3 < unknownVectors2.size(); i3++) { - NifStream( unknownVectors2[i3], out, version ); - }; - }; - }; - NifStream( center, out, version ); - NifStream( radius, out, version ); - NifStream( hasVertexColors, out, version ); - if ( (hasVertexColors != 0) ) { - for (uint i2 = 0; i2 < vertexColors.size(); i2++) { - NifStream( vertexColors[i2], out, version ); - }; - }; - if ( version <= 0x04020200 ) { - NifStream( numUvSets, out, version ); - }; - if ( version <= 0x04000002 ) { - NifStream( hasUv, out, version ); - }; - if ( version <= 0x04020200 ) { - for (uint i2 = 0; i2 < uvSets.size(); i2++) { - for (uint i3 = 0; i3 < uvSets[i2].size(); i3++) { - NifStream( uvSets[i2][i3], out, version ); - }; - }; - }; - if ( version >= 0x0A000100 ) { - for (uint i2 = 0; i2 < uvSets.size(); i2++) { - for (uint i3 = 0; i3 < uvSets[i2].size(); i3++) { - NifStream( uvSets[i2][i3], out, version ); - }; - }; - NifStream( unknownShort2, out, version ); - }; - if ( version >= 0x14000004 ) { - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiTriBasedGeomData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numUvSets = ushort(uvSets.size()); - numUvSets2 = byte(uvSets.size()); - numVertices = ushort(vertices.size()); - out << " Name: " << name << endl; - out << " Num Vertices: " << numVertices << endl; - out << " Unknown Short 1: " << unknownShort1 << endl; - out << " Has Vertices: " << hasVertices << endl; - if ( (hasVertices != 0) ) { - for (uint i2 = 0; i2 < vertices.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vertices[" << i2 << "]: " << vertices[i2] << endl; - }; - }; - out << " Num UV Sets 2: " << numUvSets2 << endl; - out << " Unknown Byte: " << unknownByte << endl; - out << " Has Normals: " << hasNormals << endl; - if ( (hasNormals != 0) ) { - for (uint i2 = 0; i2 < normals.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Normals[" << i2 << "]: " << normals[i2] << endl; - }; - }; - if ( (((hasNormals != 0)) && ((unknownByte & 16))) ) { - for (uint i2 = 0; i2 < unknownVectors1.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Vectors 1[" << i2 << "]: " << unknownVectors1[i2] << endl; - }; - for (uint i2 = 0; i2 < unknownVectors2.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Vectors 2[" << i2 << "]: " << unknownVectors2[i2] << endl; - }; - }; - out << " Center: " << center << endl; - out << " Radius: " << radius << endl; - out << " Has Vertex Colors: " << hasVertexColors << endl; - if ( (hasVertexColors != 0) ) { - for (uint i2 = 0; i2 < vertexColors.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vertex Colors[" << i2 << "]: " << vertexColors[i2] << endl; - }; - }; - out << " Num UV Sets: " << numUvSets << endl; - out << " Has UV: " << hasUv << endl; - for (uint i1 = 0; i1 < uvSets.size(); i1++) { - for (uint i2 = 0; i2 < uvSets[i1].size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " UV Sets[" << i1 << "][" << i2 << "]: " << uvSets[i1][i2] << endl; - }; - }; - out << " Unknown Short 2: " << unknownShort2 << endl; - out << " Unknown Link: " << unknownLink << endl; - return out.str(); -} - -void NiTriBasedGeomData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiTriBasedGeomData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - return refs; -} - -void APSysData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::Read( in, link_stack, version, user_version ); - NifStream( hasUnknownFloats1, in, version ); - if ( (hasUnknownFloats1 != 0) ) { - unknownFloats1.resize(numVertices); - for (uint i2 = 0; i2 < unknownFloats1.size(); i2++) { - NifStream( unknownFloats1[i2], in, version ); - }; - }; - NifStream( unknownShort3, in, version ); - NifStream( hasUnknownFloats2, in, version ); - if ( (hasUnknownFloats2 != 0) ) { - unknownFloats2.resize(numVertices); - for (uint i2 = 0; i2 < unknownFloats2.size(); i2++) { - NifStream( unknownFloats2[i2], in, version ); - }; - }; - NifStream( unknownByte1, in, version ); -} - -void APSysData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeomData::Write( out, link_map, version, user_version ); - NifStream( hasUnknownFloats1, out, version ); - if ( (hasUnknownFloats1 != 0) ) { - for (uint i2 = 0; i2 < unknownFloats1.size(); i2++) { - NifStream( unknownFloats1[i2], out, version ); - }; - }; - NifStream( unknownShort3, out, version ); - NifStream( hasUnknownFloats2, out, version ); - if ( (hasUnknownFloats2 != 0) ) { - for (uint i2 = 0; i2 < unknownFloats2.size(); i2++) { - NifStream( unknownFloats2[i2], out, version ); - }; - }; - NifStream( unknownByte1, out, version ); -} - -std::string APSysData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeomData::asString(); - out << " Has Unknown Floats 1: " << hasUnknownFloats1 << endl; - if ( (hasUnknownFloats1 != 0) ) { - for (uint i2 = 0; i2 < unknownFloats1.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 1[" << i2 << "]: " << unknownFloats1[i2] << endl; - }; - }; - out << " Unknown Short 3: " << unknownShort3 << endl; - out << " Has Unknown Floats 2: " << hasUnknownFloats2 << endl; - if ( (hasUnknownFloats2 != 0) ) { - for (uint i2 = 0; i2 < unknownFloats2.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 2[" << i2 << "]: " << unknownFloats2[i2] << endl; - }; - }; - out << " Unknown Byte 1: " << unknownByte1 << endl; - return out.str(); -} - -void APSysData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> APSysData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeomData::GetRefs(); - return refs; -} - -void bhkBlendCollisionObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiCollisionObject::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); -} - -void bhkBlendCollisionObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiCollisionObject::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); -} - -std::string bhkBlendCollisionObject::InternalAsString( bool verbose ) const { - stringstream out; - out << NiCollisionObject::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - return out.str(); -} - -void bhkBlendCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiCollisionObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkBlendCollisionObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiCollisionObject::GetRefs(); - return refs; -} - -void bhkBlendController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( unknownInt, in, version ); -} - -void bhkBlendController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - NifStream( unknownInt, out, version ); -} - -std::string bhkBlendController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown Int: " << unknownInt << endl; - return out.str(); -} - -void bhkBlendController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkBlendController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - return refs; -} - -void bhkBoxShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkConvexShape::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownShort1, in, version ); - NifStream( unknownShort2, in, version ); - NifStream( unknownShort3, in, version ); - NifStream( unknownShort4, in, version ); - NifStream( dimensions, in, version ); - NifStream( unknownFloat2, in, version ); -} - -void bhkBoxShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkConvexShape::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownShort1, out, version ); - NifStream( unknownShort2, out, version ); - NifStream( unknownShort3, out, version ); - NifStream( unknownShort4, out, version ); - NifStream( dimensions, out, version ); - NifStream( unknownFloat2, out, version ); -} - -std::string bhkBoxShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkConvexShape::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Short 1: " << unknownShort1 << endl; - out << " Unknown Short 2: " << unknownShort2 << endl; - out << " Unknown Short 3: " << unknownShort3 << endl; - out << " Unknown Short 4: " << unknownShort4 << endl; - out << " Dimensions: " << dimensions << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - return out.str(); -} - -void bhkBoxShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkConvexShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkBoxShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkConvexShape::GetRefs(); - return refs; -} - -void bhkCapsuleShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkConvexShape::Read( in, link_stack, version, user_version ); - NifStream( radius, in, version ); - NifStream( unknownShort1, in, version ); - NifStream( unknownShort2, in, version ); - NifStream( unknownShort3, in, version ); - NifStream( unknownShort4, in, version ); - NifStream( firstPoint, in, version ); - NifStream( radius1, in, version ); - NifStream( secondPoint, in, version ); - NifStream( radius2, in, version ); -} - -void bhkCapsuleShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkConvexShape::Write( out, link_map, version, user_version ); - NifStream( radius, out, version ); - NifStream( unknownShort1, out, version ); - NifStream( unknownShort2, out, version ); - NifStream( unknownShort3, out, version ); - NifStream( unknownShort4, out, version ); - NifStream( firstPoint, out, version ); - NifStream( radius1, out, version ); - NifStream( secondPoint, out, version ); - NifStream( radius2, out, version ); -} - -std::string bhkCapsuleShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkConvexShape::asString(); - out << " Radius: " << radius << endl; - out << " Unknown Short 1: " << unknownShort1 << endl; - out << " Unknown Short 2: " << unknownShort2 << endl; - out << " Unknown Short 3: " << unknownShort3 << endl; - out << " Unknown Short 4: " << unknownShort4 << endl; - out << " First Point: " << firstPoint << endl; - out << " Radius 1: " << radius1 << endl; - out << " Second Point: " << secondPoint << endl; - out << " Radius 2: " << radius2 << endl; - return out.str(); -} - -void bhkCapsuleShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkConvexShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkCapsuleShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkConvexShape::GetRefs(); - return refs; -} - -void bhkCollisionObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiCollisionObject::Read( in, link_stack, version, user_version ); -} - -void bhkCollisionObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiCollisionObject::Write( out, link_map, version, user_version ); -} - -std::string bhkCollisionObject::InternalAsString( bool verbose ) const { - stringstream out; - out << NiCollisionObject::asString(); - return out.str(); -} - -void bhkCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiCollisionObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkCollisionObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiCollisionObject::GetRefs(); - return refs; -} - -void bhkConvexVerticesShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 7; i1++) { - NifStream( unknownFloats1[i1], in, version ); - }; - NifStream( num1, in, version ); - unknownVectors1.resize(num1); - for (uint i1 = 0; i1 < unknownVectors1.size(); i1++) { - NifStream( unknownVectors1[i1], in, version ); - }; - NifStream( num2, in, version ); - unknownVectors2.resize(num2); - for (uint i1 = 0; i1 < unknownVectors2.size(); i1++) { - NifStream( unknownVectors2[i1], in, version ); - }; -} - -void bhkConvexVerticesShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkSphereRepShape::Write( out, link_map, version, user_version ); - num2 = uint(unknownVectors2.size()); - num1 = uint(unknownVectors1.size()); - for (uint i1 = 0; i1 < 7; i1++) { - NifStream( unknownFloats1[i1], out, version ); - }; - NifStream( num1, out, version ); - for (uint i1 = 0; i1 < unknownVectors1.size(); i1++) { - NifStream( unknownVectors1[i1], out, version ); - }; - NifStream( num2, out, version ); - for (uint i1 = 0; i1 < unknownVectors2.size(); i1++) { - NifStream( unknownVectors2[i1], out, version ); - }; -} - -std::string bhkConvexVerticesShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkSphereRepShape::asString(); - num2 = uint(unknownVectors2.size()); - num1 = uint(unknownVectors1.size()); - for (uint i1 = 0; i1 < 7; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 1[" << i1 << "]: " << unknownFloats1[i1] << endl; - }; - out << " Num 1: " << num1 << endl; - for (uint i1 = 0; i1 < unknownVectors1.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Vectors 1[" << i1 << "]: " << unknownVectors1[i1] << endl; - }; - out << " Num 2: " << num2 << endl; - for (uint i1 = 0; i1 < unknownVectors2.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Vectors 2[" << i1 << "]: " << unknownVectors2[i1] << endl; - }; - return out.str(); -} - -void bhkConvexVerticesShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkConvexVerticesShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkSphereRepShape::GetRefs(); - return refs; -} - -void bhkHingeConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 5; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( unknownFloats[i1][i2], in, version ); - }; - }; -} - -void bhkHingeConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkConstraint::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 5; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( unknownFloats[i1][i2], out, version ); - }; - }; -} - -std::string bhkHingeConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkConstraint::asString(); - for (uint i1 = 0; i1 < 5; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "][" << i2 << "]: " << unknownFloats[i1][i2] << endl; - }; - }; - return out.str(); -} - -void bhkHingeConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkHingeConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkConstraint::GetRefs(); - return refs; -} - -void bhkLimitedHingeConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::Read( in, link_stack, version, user_version ); - NifStream( limitedHinge.pivotA, in, version ); - NifStream( limitedHinge.axleA_, in, version ); - NifStream( limitedHinge.perp2axleina1, in, version ); - NifStream( limitedHinge.perp2axleina2, in, version ); - NifStream( limitedHinge.pivotB, in, version ); - NifStream( limitedHinge.axleB, in, version ); - NifStream( limitedHinge.unknownVector, in, version ); - NifStream( limitedHinge.minAngle, in, version ); - NifStream( limitedHinge.maxAngle, in, version ); - NifStream( limitedHinge.maxFriction, in, version ); -} - -void bhkLimitedHingeConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkConstraint::Write( out, link_map, version, user_version ); - NifStream( limitedHinge.pivotA, out, version ); - NifStream( limitedHinge.axleA_, out, version ); - NifStream( limitedHinge.perp2axleina1, out, version ); - NifStream( limitedHinge.perp2axleina2, out, version ); - NifStream( limitedHinge.pivotB, out, version ); - NifStream( limitedHinge.axleB, out, version ); - NifStream( limitedHinge.unknownVector, out, version ); - NifStream( limitedHinge.minAngle, out, version ); - NifStream( limitedHinge.maxAngle, out, version ); - NifStream( limitedHinge.maxFriction, out, version ); -} - -std::string bhkLimitedHingeConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkConstraint::asString(); - out << " Pivot A: " << limitedHinge.pivotA << endl; - out << " Axle A ?: " << limitedHinge.axleA_ << endl; - out << " Perp2AxleInA1: " << limitedHinge.perp2axleina1 << endl; - out << " Perp2AxleInA2: " << limitedHinge.perp2axleina2 << endl; - out << " Pivot B: " << limitedHinge.pivotB << endl; - out << " Axle B: " << limitedHinge.axleB << endl; - out << " Unknown Vector: " << limitedHinge.unknownVector << endl; - out << " Min Angle: " << limitedHinge.minAngle << endl; - out << " Max Angle: " << limitedHinge.maxAngle << endl; - out << " Max Friction: " << limitedHinge.maxFriction << endl; - return out.str(); -} - -void bhkLimitedHingeConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkLimitedHingeConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkConstraint::GetRefs(); - return refs; -} - -void bhkListShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - AbhkShapeCollection::Read( in, link_stack, version, user_version ); - NifStream( numSubShapes, in, version ); - subShapes.resize(numSubShapes); - for (uint i1 = 0; i1 < subShapes.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( material, in, version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; - NifStream( numUnknownInts, in, version ); - unknownInts.resize(numUnknownInts); - for (uint i1 = 0; i1 < unknownInts.size(); i1++) { - NifStream( unknownInts[i1], in, version ); - }; -} - -void bhkListShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkShapeCollection::Write( out, link_map, version, user_version ); - numUnknownInts = uint(unknownInts.size()); - numSubShapes = uint(subShapes.size()); - NifStream( numSubShapes, out, version ); - for (uint i1 = 0; i1 < subShapes.size(); i1++) { - if ( subShapes[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(subShapes[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( material, out, version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; - NifStream( numUnknownInts, out, version ); - for (uint i1 = 0; i1 < unknownInts.size(); i1++) { - NifStream( unknownInts[i1], out, version ); - }; -} - -std::string bhkListShape::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkShapeCollection::asString(); - numUnknownInts = uint(unknownInts.size()); - numSubShapes = uint(subShapes.size()); - out << " Num Sub Shapes: " << numSubShapes << endl; - for (uint i1 = 0; i1 < subShapes.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Sub Shapes[" << i1 << "]: " << subShapes[i1] << endl; - }; - out << " Material: " << material << endl; - for (uint i1 = 0; i1 < 6; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - out << " Num Unknown Ints: " << numUnknownInts << endl; - for (uint i1 = 0; i1 < unknownInts.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Ints[" << i1 << "]: " << unknownInts[i1] << endl; - }; - return out.str(); -} - -void bhkListShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkShapeCollection::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < subShapes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - subShapes[i1] = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( subShapes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - subShapes[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> bhkListShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkShapeCollection::GetRefs(); - for (uint i1 = 0; i1 < subShapes.size(); i1++) { - if ( subShapes[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(subShapes[i1])); - }; - return refs; -} - -void bhkMalleableConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - AbhkConstraint::Read( in, link_stack, version, user_version ); - NifStream( type, in, version ); - NifStream( unknownInt2, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownInt3, in, version ); - if ( (type == 7) ) { - NifStream( ragdoll.pivotA, in, version ); - NifStream( ragdoll.planeA, in, version ); - NifStream( ragdoll.twistA, in, version ); - NifStream( ragdoll.pivotB, in, version ); - NifStream( ragdoll.planeB, in, version ); - NifStream( ragdoll.twistB, in, version ); - NifStream( ragdoll.coneMinAngle, in, version ); - NifStream( ragdoll.planeMinAngle, in, version ); - NifStream( ragdoll.planeMaxAngle, in, version ); - NifStream( ragdoll.twistMinAngle, in, version ); - NifStream( ragdoll.twistMaxAngle, in, version ); - NifStream( ragdoll.maxFriction, in, version ); - }; - if ( (type == 2) ) { - NifStream( limitedHinge.pivotA, in, version ); - NifStream( limitedHinge.axleA_, in, version ); - NifStream( limitedHinge.perp2axleina1, in, version ); - NifStream( limitedHinge.perp2axleina2, in, version ); - NifStream( limitedHinge.pivotB, in, version ); - NifStream( limitedHinge.axleB, in, version ); - NifStream( limitedHinge.unknownVector, in, version ); - NifStream( limitedHinge.minAngle, in, version ); - NifStream( limitedHinge.maxAngle, in, version ); - NifStream( limitedHinge.maxFriction, in, version ); - }; - NifStream( tau, in, version ); - NifStream( damping, in, version ); -} - -void bhkMalleableConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkConstraint::Write( out, link_map, version, user_version ); - NifStream( type, out, version ); - NifStream( unknownInt2, out, version ); - if ( unknownLink1 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink1)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( unknownLink2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink2)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownInt3, out, version ); - if ( (type == 7) ) { - NifStream( ragdoll.pivotA, out, version ); - NifStream( ragdoll.planeA, out, version ); - NifStream( ragdoll.twistA, out, version ); - NifStream( ragdoll.pivotB, out, version ); - NifStream( ragdoll.planeB, out, version ); - NifStream( ragdoll.twistB, out, version ); - NifStream( ragdoll.coneMinAngle, out, version ); - NifStream( ragdoll.planeMinAngle, out, version ); - NifStream( ragdoll.planeMaxAngle, out, version ); - NifStream( ragdoll.twistMinAngle, out, version ); - NifStream( ragdoll.twistMaxAngle, out, version ); - NifStream( ragdoll.maxFriction, out, version ); - }; - if ( (type == 2) ) { - NifStream( limitedHinge.pivotA, out, version ); - NifStream( limitedHinge.axleA_, out, version ); - NifStream( limitedHinge.perp2axleina1, out, version ); - NifStream( limitedHinge.perp2axleina2, out, version ); - NifStream( limitedHinge.pivotB, out, version ); - NifStream( limitedHinge.axleB, out, version ); - NifStream( limitedHinge.unknownVector, out, version ); - NifStream( limitedHinge.minAngle, out, version ); - NifStream( limitedHinge.maxAngle, out, version ); - NifStream( limitedHinge.maxFriction, out, version ); - }; - NifStream( tau, out, version ); - NifStream( damping, out, version ); -} - -std::string bhkMalleableConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkConstraint::asString(); - out << " Type: " << type << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Unknown Link 1: " << unknownLink1 << endl; - out << " Unknown Link 2: " << unknownLink2 << endl; - out << " Unknown Int 3: " << unknownInt3 << endl; - if ( (type == 7) ) { - out << " Pivot A: " << ragdoll.pivotA << endl; - out << " Plane A: " << ragdoll.planeA << endl; - out << " Twist A: " << ragdoll.twistA << endl; - out << " Pivot B: " << ragdoll.pivotB << endl; - out << " Plane B: " << ragdoll.planeB << endl; - out << " Twist B: " << ragdoll.twistB << endl; - out << " Cone Min Angle: " << ragdoll.coneMinAngle << endl; - out << " Plane Min Angle: " << ragdoll.planeMinAngle << endl; - out << " Plane Max Angle: " << ragdoll.planeMaxAngle << endl; - out << " Twist Min Angle: " << ragdoll.twistMinAngle << endl; - out << " Twist Max Angle: " << ragdoll.twistMaxAngle << endl; - out << " Max Friction: " << ragdoll.maxFriction << endl; - }; - if ( (type == 2) ) { - out << " Pivot A: " << limitedHinge.pivotA << endl; - out << " Axle A ?: " << limitedHinge.axleA_ << endl; - out << " Perp2AxleInA1: " << limitedHinge.perp2axleina1 << endl; - out << " Perp2AxleInA2: " << limitedHinge.perp2axleina2 << endl; - out << " Pivot B: " << limitedHinge.pivotB << endl; - out << " Axle B: " << limitedHinge.axleB << endl; - out << " Unknown Vector: " << limitedHinge.unknownVector << endl; - out << " Min Angle: " << limitedHinge.minAngle << endl; - out << " Max Angle: " << limitedHinge.maxAngle << endl; - out << " Max Friction: " << limitedHinge.maxFriction << endl; - }; - out << " Tau: " << tau << endl; - out << " Damping: " << damping << endl; - return out.str(); -} - -void bhkMalleableConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink1 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink1 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink1 = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> bhkMalleableConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkConstraint::GetRefs(); - if ( unknownLink1 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink1)); - if ( unknownLink2 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink2)); - return refs; -} - -void bhkMoppBvTreeShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - bhkShape::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( material, in, version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownBytes1[i1], in, version ); - }; - NifStream( unknownFloat, in, version ); - NifStream( numUnknownBytes2, in, version ); - unknownBytes2.resize(numUnknownBytes2); - for (uint i1 = 0; i1 < unknownBytes2.size(); i1++) { - NifStream( unknownBytes2[i1], in, version ); - }; - NifStream( unknownVector, in, version ); - NifStream( unknownFloat2, in, version ); -} - -void bhkMoppBvTreeShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkShape::Write( out, link_map, version, user_version ); - numUnknownBytes2 = uint(unknownBytes2.size()); - if ( shape != NULL ) - NifStream( link_map[StaticCast<NiObject>(shape)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( material, out, version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownBytes1[i1], out, version ); - }; - NifStream( unknownFloat, out, version ); - NifStream( numUnknownBytes2, out, version ); - for (uint i1 = 0; i1 < unknownBytes2.size(); i1++) { - NifStream( unknownBytes2[i1], out, version ); - }; - NifStream( unknownVector, out, version ); - NifStream( unknownFloat2, out, version ); -} - -std::string bhkMoppBvTreeShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkShape::asString(); - numUnknownBytes2 = uint(unknownBytes2.size()); - out << " Shape: " << shape << endl; - out << " Material: " << material << endl; - for (uint i1 = 0; i1 < 8; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Bytes 1[" << i1 << "]: " << unknownBytes1[i1] << endl; - }; - out << " Unknown Float: " << unknownFloat << endl; - out << " Num Unknown Bytes 2: " << numUnknownBytes2 << endl; - for (uint i1 = 0; i1 < unknownBytes2.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Bytes 2[" << i1 << "]: " << unknownBytes2[i1] << endl; - }; - out << " Unknown Vector: " << unknownVector << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - return out.str(); -} - -void bhkMoppBvTreeShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkShape::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shape = DynamicCast<bhkShape>(objects[link_stack.front()]); - if ( shape == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shape = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> bhkMoppBvTreeShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkShape::GetRefs(); - if ( shape != NULL ) - refs.push_back(StaticCast<NiObject>(shape)); - return refs; -} - -void bhkMultiSphereShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); - NifStream( unknownFloat3, in, version ); - NifStream( unknownInt2, in, version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; -} - -void bhkMultiSphereShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkSphereRepShape::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); - NifStream( unknownFloat3, out, version ); - NifStream( unknownInt2, out, version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; -} - -std::string bhkMultiSphereShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkSphereRepShape::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Float 3: " << unknownFloat3 << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - for (uint i1 = 0; i1 < 8; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - return out.str(); -} - -void bhkMultiSphereShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkMultiSphereShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkSphereRepShape::GetRefs(); - return refs; -} - -void bhkNiTriStripsShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - bhkSphereRepShape::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownInt1, in, version ); - for (uint i1 = 0; i1 < 4; i1++) { - NifStream( unknownInts1[i1], in, version ); - }; - NifStream( unknownInt2, in, version ); - NifStream( scale, in, version ); - NifStream( unknownInt3, in, version ); - NifStream( numStripsData, in, version ); - stripsData.resize(numStripsData); - for (uint i1 = 0; i1 < stripsData.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( numUnknownInts2, in, version ); - unknownInts2.resize(numUnknownInts2); - for (uint i1 = 0; i1 < unknownInts2.size(); i1++) { - NifStream( unknownInts2[i1], in, version ); - }; -} - -void bhkNiTriStripsShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkSphereRepShape::Write( out, link_map, version, user_version ); - numUnknownInts2 = uint(unknownInts2.size()); - numStripsData = uint(stripsData.size()); - NifStream( unknownFloat1, out, version ); - NifStream( unknownInt1, out, version ); - for (uint i1 = 0; i1 < 4; i1++) { - NifStream( unknownInts1[i1], out, version ); - }; - NifStream( unknownInt2, out, version ); - NifStream( scale, out, version ); - NifStream( unknownInt3, out, version ); - NifStream( numStripsData, out, version ); - for (uint i1 = 0; i1 < stripsData.size(); i1++) { - if ( stripsData[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(stripsData[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( numUnknownInts2, out, version ); - for (uint i1 = 0; i1 < unknownInts2.size(); i1++) { - NifStream( unknownInts2[i1], out, version ); - }; -} - -std::string bhkNiTriStripsShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkSphereRepShape::asString(); - numUnknownInts2 = uint(unknownInts2.size()); - numStripsData = uint(stripsData.size()); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Int 1: " << unknownInt1 << endl; - for (uint i1 = 0; i1 < 4; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Ints 1[" << i1 << "]: " << unknownInts1[i1] << endl; - }; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Scale: " << scale << endl; - out << " Unknown Int 3: " << unknownInt3 << endl; - out << " Num Strips Data: " << numStripsData << endl; - for (uint i1 = 0; i1 < stripsData.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Strips Data[" << i1 << "]: " << stripsData[i1] << endl; - }; - out << " Num Unknown Ints 2: " << numUnknownInts2 << endl; - for (uint i1 = 0; i1 < unknownInts2.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Ints 2[" << i1 << "]: " << unknownInts2[i1] << endl; - }; - return out.str(); -} - -void bhkNiTriStripsShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkSphereRepShape::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < stripsData.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - stripsData[i1] = DynamicCast<NiTriStripsData>(objects[link_stack.front()]); - if ( stripsData[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - stripsData[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> bhkNiTriStripsShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkSphereRepShape::GetRefs(); - for (uint i1 = 0; i1 < stripsData.size(); i1++) { - if ( stripsData[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(stripsData[i1])); - }; - return refs; -} - -void bhkPackedNiTriStripsShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - AbhkShapeCollection::Read( in, link_stack, version, user_version ); - NifStream( numSubparts, in, version ); - subparts.resize(numSubparts); - for (uint i1 = 0; i1 < subparts.size(); i1++) { - for (uint i2 = 0; i2 < 3; i2++) { - NifStream( subparts[i1][i2], in, version ); - }; - }; - for (uint i1 = 0; i1 < 9; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; - NifStream( scale, in, version ); - for (uint i1 = 0; i1 < 3; i1++) { - NifStream( unknownFloats2[i1], in, version ); - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void bhkPackedNiTriStripsShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkShapeCollection::Write( out, link_map, version, user_version ); - numSubparts = ushort(subparts.size()); - NifStream( numSubparts, out, version ); - for (uint i1 = 0; i1 < subparts.size(); i1++) { - for (uint i2 = 0; i2 < 3; i2++) { - NifStream( subparts[i1][i2], out, version ); - }; - }; - for (uint i1 = 0; i1 < 9; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; - NifStream( scale, out, version ); - for (uint i1 = 0; i1 < 3; i1++) { - NifStream( unknownFloats2[i1], out, version ); - }; - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string bhkPackedNiTriStripsShape::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkShapeCollection::asString(); - numSubparts = ushort(subparts.size()); - out << " Num Subparts: " << numSubparts << endl; - for (uint i1 = 0; i1 < subparts.size(); i1++) { - for (uint i2 = 0; i2 < 3; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Subparts[" << i1 << "][" << i2 << "]: " << subparts[i1][i2] << endl; - }; - }; - for (uint i1 = 0; i1 < 9; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - out << " Scale: " << scale << endl; - for (uint i1 = 0; i1 < 3; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 2[" << i1 << "]: " << unknownFloats2[i1] << endl; - }; - out << " Data: " << data << endl; - return out.str(); -} - -void bhkPackedNiTriStripsShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkShapeCollection::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<hkPackedNiTriStripsData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> bhkPackedNiTriStripsShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkShapeCollection::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void bhkPrismaticConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownVectors[i1], in, version ); - }; - for (uint i1 = 0; i1 < 3; i1++) { - NifStream( unknownFloats2[i1], in, version ); - }; -} - -void bhkPrismaticConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkConstraint::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownVectors[i1], out, version ); - }; - for (uint i1 = 0; i1 < 3; i1++) { - NifStream( unknownFloats2[i1], out, version ); - }; -} - -std::string bhkPrismaticConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkConstraint::asString(); - for (uint i1 = 0; i1 < 8; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Vectors[" << i1 << "]: " << unknownVectors[i1] << endl; - }; - for (uint i1 = 0; i1 < 3; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 2[" << i1 << "]: " << unknownFloats2[i1] << endl; - }; - return out.str(); -} - -void bhkPrismaticConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkPrismaticConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkConstraint::GetRefs(); - return refs; -} - -void bhkRagdollConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkRagdollConstraint::Read( in, link_stack, version, user_version ); -} - -void bhkRagdollConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkRagdollConstraint::Write( out, link_map, version, user_version ); -} - -std::string bhkRagdollConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkRagdollConstraint::asString(); - return out.str(); -} - -void bhkRagdollConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkRagdollConstraint::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkRagdollConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkRagdollConstraint::GetRefs(); - return refs; -} - -void bhkRigidBody::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - bhkEntity::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 5; i1++) { - NifStream( unknownFloats1[i1], in, version ); - }; - for (uint i1 = 0; i1 < 4; i1++) { - NifStream( unknownShorts1[i1], in, version ); - }; - NifStream( layerCopy_, in, version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownShorts2[i1], in, version ); - }; - NifStream( translation, in, version ); - NifStream( unknownFloat00, in, version ); - NifStream( rotation.x, in, version ); - NifStream( rotation.y, in, version ); - NifStream( rotation.z, in, version ); - NifStream( rotation.w, in, version ); - NifStream( linearVelocity, in, version ); - NifStream( unknownFloat01, in, version ); - NifStream( angularVelocity, in, version ); - NifStream( unknownFloat02, in, version ); - for (uint i1 = 0; i1 < 12; i1++) { - NifStream( transform_[i1], in, version ); - }; - NifStream( center, in, version ); - NifStream( unknownFloat03, in, version ); - NifStream( mass, in, version ); - NifStream( linearDamping, in, version ); - NifStream( angularDamping, in, version ); - NifStream( friction, in, version ); - NifStream( restitution, in, version ); - NifStream( maxLinearVelocity, in, version ); - NifStream( maxAngularVelocity, in, version ); - NifStream( penDepth, in, version ); - NifStream( motionSystem_, in, version ); - NifStream( unknownByte1, in, version ); - NifStream( unknownByte2, in, version ); - NifStream( qualityType, in, version ); - NifStream( unknownInt6, in, version ); - NifStream( unknownInt7, in, version ); - NifStream( unknownInt8, in, version ); - NifStream( numConstraints, in, version ); - constraints.resize(numConstraints); - for (uint i1 = 0; i1 < constraints.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( unknownInt6, in, version ); -} - -void bhkRigidBody::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkEntity::Write( out, link_map, version, user_version ); - numConstraints = uint(constraints.size()); - for (uint i1 = 0; i1 < 5; i1++) { - NifStream( unknownFloats1[i1], out, version ); - }; - for (uint i1 = 0; i1 < 4; i1++) { - NifStream( unknownShorts1[i1], out, version ); - }; - NifStream( layerCopy_, out, version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownShorts2[i1], out, version ); - }; - NifStream( translation, out, version ); - NifStream( unknownFloat00, out, version ); - NifStream( rotation.x, out, version ); - NifStream( rotation.y, out, version ); - NifStream( rotation.z, out, version ); - NifStream( rotation.w, out, version ); - NifStream( linearVelocity, out, version ); - NifStream( unknownFloat01, out, version ); - NifStream( angularVelocity, out, version ); - NifStream( unknownFloat02, out, version ); - for (uint i1 = 0; i1 < 12; i1++) { - NifStream( transform_[i1], out, version ); - }; - NifStream( center, out, version ); - NifStream( unknownFloat03, out, version ); - NifStream( mass, out, version ); - NifStream( linearDamping, out, version ); - NifStream( angularDamping, out, version ); - NifStream( friction, out, version ); - NifStream( restitution, out, version ); - NifStream( maxLinearVelocity, out, version ); - NifStream( maxAngularVelocity, out, version ); - NifStream( penDepth, out, version ); - NifStream( motionSystem_, out, version ); - NifStream( unknownByte1, out, version ); - NifStream( unknownByte2, out, version ); - NifStream( qualityType, out, version ); - NifStream( unknownInt6, out, version ); - NifStream( unknownInt7, out, version ); - NifStream( unknownInt8, out, version ); - NifStream( numConstraints, out, version ); - for (uint i1 = 0; i1 < constraints.size(); i1++) { - if ( constraints[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(constraints[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( unknownInt6, out, version ); -} - -std::string bhkRigidBody::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkEntity::asString(); - numConstraints = uint(constraints.size()); - for (uint i1 = 0; i1 < 5; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 1[" << i1 << "]: " << unknownFloats1[i1] << endl; - }; - for (uint i1 = 0; i1 < 4; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Shorts 1[" << i1 << "]: " << unknownShorts1[i1] << endl; - }; - out << " Layer Copy?: " << layerCopy_ << endl; - for (uint i1 = 0; i1 < 6; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Shorts 2[" << i1 << "]: " << unknownShorts2[i1] << endl; - }; - out << " Translation: " << translation << endl; - out << " Unknown Float 00: " << unknownFloat00 << endl; - out << " x: " << rotation.x << endl; - out << " y: " << rotation.y << endl; - out << " z: " << rotation.z << endl; - out << " w: " << rotation.w << endl; - out << " Linear Velocity: " << linearVelocity << endl; - out << " Unknown Float 01: " << unknownFloat01 << endl; - out << " Angular Velocity: " << angularVelocity << endl; - out << " Unknown Float 02: " << unknownFloat02 << endl; - for (uint i1 = 0; i1 < 12; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Transform?[" << i1 << "]: " << transform_[i1] << endl; - }; - out << " Center: " << center << endl; - out << " Unknown Float 03: " << unknownFloat03 << endl; - out << " Mass: " << mass << endl; - out << " Linear Damping: " << linearDamping << endl; - out << " Angular Damping: " << angularDamping << endl; - out << " Friction: " << friction << endl; - out << " Restitution: " << restitution << endl; - out << " Max Linear Velocity: " << maxLinearVelocity << endl; - out << " Max Angular Velocity: " << maxAngularVelocity << endl; - out << " Pen Depth: " << penDepth << endl; - out << " Motion System?: " << motionSystem_ << endl; - out << " Unknown Byte 1: " << unknownByte1 << endl; - out << " Unknown Byte 2: " << unknownByte2 << endl; - out << " Quality Type: " << qualityType << endl; - out << " Unknown Int 6: " << unknownInt6 << endl; - out << " Unknown Int 7: " << unknownInt7 << endl; - out << " Unknown Int 8: " << unknownInt8 << endl; - out << " Num Constraints: " << numConstraints << endl; - for (uint i1 = 0; i1 < constraints.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Constraints[" << i1 << "]: " << constraints[i1] << endl; - }; - return out.str(); -} - -void bhkRigidBody::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkEntity::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < constraints.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - constraints[i1] = DynamicCast<AbhkConstraint>(objects[link_stack.front()]); - if ( constraints[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - constraints[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> bhkRigidBody::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkEntity::GetRefs(); - for (uint i1 = 0; i1 < constraints.size(); i1++) { - if ( constraints[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(constraints[i1])); - }; - return refs; -} - -void bhkRigidBodyT::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkRigidBody::Read( in, link_stack, version, user_version ); -} - -void bhkRigidBodyT::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkRigidBody::Write( out, link_map, version, user_version ); -} - -std::string bhkRigidBodyT::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkRigidBody::asString(); - return out.str(); -} - -void bhkRigidBodyT::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkRigidBody::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkRigidBodyT::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkRigidBody::GetRefs(); - return refs; -} - -void bhkSimpleShapePhantom::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkEntity::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 7; i1++) { - NifStream( unkownFloats[i1], in, version ); - }; - for (uint i1 = 0; i1 < 3; i1++) { - for (uint i2 = 0; i2 < 5; i2++) { - NifStream( unknownFloats2[i1][i2], in, version ); - }; - }; - NifStream( unknownFloat, in, version ); -} - -void bhkSimpleShapePhantom::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkEntity::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 7; i1++) { - NifStream( unkownFloats[i1], out, version ); - }; - for (uint i1 = 0; i1 < 3; i1++) { - for (uint i2 = 0; i2 < 5; i2++) { - NifStream( unknownFloats2[i1][i2], out, version ); - }; - }; - NifStream( unknownFloat, out, version ); -} - -std::string bhkSimpleShapePhantom::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkEntity::asString(); - for (uint i1 = 0; i1 < 7; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unkown Floats[" << i1 << "]: " << unkownFloats[i1] << endl; - }; - for (uint i1 = 0; i1 < 3; i1++) { - for (uint i2 = 0; i2 < 5; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 2[" << i1 << "][" << i2 << "]: " << unknownFloats2[i1][i2] << endl; - }; - }; - out << " Unknown Float: " << unknownFloat << endl; - return out.str(); -} - -void bhkSimpleShapePhantom::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkEntity::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkSimpleShapePhantom::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkEntity::GetRefs(); - return refs; -} - -void bhkSPCollisionObject::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiCollisionObject::Read( in, link_stack, version, user_version ); -} - -void bhkSPCollisionObject::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiCollisionObject::Write( out, link_map, version, user_version ); -} - -std::string bhkSPCollisionObject::InternalAsString( bool verbose ) const { - stringstream out; - out << NiCollisionObject::asString(); - return out.str(); -} - -void bhkSPCollisionObject::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiCollisionObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkSPCollisionObject::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiCollisionObject::GetRefs(); - return refs; -} - -void bhkSphereShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkConvexShape::Read( in, link_stack, version, user_version ); - NifStream( radius, in, version ); -} - -void bhkSphereShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkConvexShape::Write( out, link_map, version, user_version ); - NifStream( radius, out, version ); -} - -std::string bhkSphereShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkConvexShape::asString(); - out << " Radius: " << radius << endl; - return out.str(); -} - -void bhkSphereShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkConvexShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkSphereShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkConvexShape::GetRefs(); - return refs; -} - -void bhkStiffSpringConstraint::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 2; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( unknownFloats[i1][i2], in, version ); - }; - }; - NifStream( unknownFloat, in, version ); -} - -void bhkStiffSpringConstraint::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkConstraint::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 2; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( unknownFloats[i1][i2], out, version ); - }; - }; - NifStream( unknownFloat, out, version ); -} - -std::string bhkStiffSpringConstraint::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkConstraint::asString(); - for (uint i1 = 0; i1 < 2; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "][" << i2 << "]: " << unknownFloats[i1][i2] << endl; - }; - }; - out << " Unknown Float: " << unknownFloat << endl; - return out.str(); -} - -void bhkStiffSpringConstraint::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkConstraint::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkStiffSpringConstraint::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkConstraint::GetRefs(); - return refs; -} - -void bhkTransformShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkEntity::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); - NifStream( unknownFloat3, in, version ); - NifStream( transform, in, version ); -} - -void bhkTransformShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkEntity::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); - NifStream( unknownFloat3, out, version ); - NifStream( transform, out, version ); -} - -std::string bhkTransformShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkEntity::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Float 3: " << unknownFloat3 << endl; - out << " Transform: " << transform << endl; - return out.str(); -} - -void bhkTransformShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkEntity::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkTransformShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkEntity::GetRefs(); - return refs; -} - -void bhkConvexTransformShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkTransformShape::Read( in, link_stack, version, user_version ); -} - -void bhkConvexTransformShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - bhkTransformShape::Write( out, link_map, version, user_version ); -} - -std::string bhkConvexTransformShape::InternalAsString( bool verbose ) const { - stringstream out; - out << bhkTransformShape::asString(); - return out.str(); -} - -void bhkConvexTransformShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - bhkTransformShape::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> bhkConvexTransformShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = bhkTransformShape::GetRefs(); - return refs; -} - -void BSBound::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; -} - -void BSBound::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; -} - -std::string BSBound::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - for (uint i1 = 0; i1 < 6; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - return out.str(); -} - -void BSBound::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> BSBound::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void BSFurnitureMarker::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( numPositions, in, version ); - positions.resize(numPositions); - for (uint i1 = 0; i1 < positions.size(); i1++) { - NifStream( positions[i1].offset, in, version ); - NifStream( positions[i1].orientation, in, version ); - NifStream( positions[i1].positionRef1, in, version ); - NifStream( positions[i1].positionRef2, in, version ); - }; -} - -void BSFurnitureMarker::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - numPositions = uint(positions.size()); - NifStream( numPositions, out, version ); - for (uint i1 = 0; i1 < positions.size(); i1++) { - NifStream( positions[i1].offset, out, version ); - NifStream( positions[i1].orientation, out, version ); - NifStream( positions[i1].positionRef1, out, version ); - NifStream( positions[i1].positionRef2, out, version ); - }; -} - -std::string BSFurnitureMarker::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - numPositions = uint(positions.size()); - out << " Num Positions: " << numPositions << endl; - for (uint i1 = 0; i1 < positions.size(); i1++) { - out << " Offset: " << positions[i1].offset << endl; - out << " Orientation: " << positions[i1].orientation << endl; - out << " Position Ref 1: " << positions[i1].positionRef1 << endl; - out << " Position Ref 2: " << positions[i1].positionRef2 << endl; - }; - return out.str(); -} - -void BSFurnitureMarker::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> BSFurnitureMarker::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void BSParentVelocityModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat, in, version ); -} - -void BSParentVelocityModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( unknownFloat, out, version ); -} - -std::string BSParentVelocityModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Unknown Float: " << unknownFloat << endl; - return out.str(); -} - -void BSParentVelocityModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> BSParentVelocityModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void BSPSysArrayEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::Read( in, link_stack, version, user_version ); -} - -void BSPSysArrayEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysVolumeEmitter::Write( out, link_map, version, user_version ); -} - -std::string BSPSysArrayEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysVolumeEmitter::asString(); - return out.str(); -} - -void BSPSysArrayEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> BSPSysArrayEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysVolumeEmitter::GetRefs(); - return refs; -} - -void BSXFlags::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); -} - -void BSXFlags::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); -} - -std::string BSXFlags::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Flags: " << flags << endl; - return out.str(); -} - -void BSXFlags::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> BSXFlags::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void hkPackedNiTriStripsData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkShapeCollection::Read( in, link_stack, version, user_version ); - NifStream( numTriangles, in, version ); - triangles.resize(numTriangles); - for (uint i1 = 0; i1 < triangles.size(); i1++) { - NifStream( triangles[i1].triangle, in, version ); - NifStream( triangles[i1].unknownShort, in, version ); - NifStream( triangles[i1].normal, in, version ); - }; - NifStream( numVertices, in, version ); - vertices.resize(numVertices); - for (uint i1 = 0; i1 < vertices.size(); i1++) { - NifStream( vertices[i1], in, version ); - }; -} - -void hkPackedNiTriStripsData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AbhkShapeCollection::Write( out, link_map, version, user_version ); - numVertices = uint(vertices.size()); - numTriangles = uint(triangles.size()); - NifStream( numTriangles, out, version ); - for (uint i1 = 0; i1 < triangles.size(); i1++) { - NifStream( triangles[i1].triangle, out, version ); - NifStream( triangles[i1].unknownShort, out, version ); - NifStream( triangles[i1].normal, out, version ); - }; - NifStream( numVertices, out, version ); - for (uint i1 = 0; i1 < vertices.size(); i1++) { - NifStream( vertices[i1], out, version ); - }; -} - -std::string hkPackedNiTriStripsData::InternalAsString( bool verbose ) const { - stringstream out; - out << AbhkShapeCollection::asString(); - numVertices = uint(vertices.size()); - numTriangles = uint(triangles.size()); - out << " Num Triangles: " << numTriangles << endl; - for (uint i1 = 0; i1 < triangles.size(); i1++) { - out << " Triangle: " << triangles[i1].triangle << endl; - out << " Unknown Short: " << triangles[i1].unknownShort << endl; - out << " Normal: " << triangles[i1].normal << endl; - }; - out << " Num Vertices: " << numVertices << endl; - for (uint i1 = 0; i1 < vertices.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vertices[" << i1 << "]: " << vertices[i1] << endl; - }; - return out.str(); -} - -void hkPackedNiTriStripsData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AbhkShapeCollection::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> hkPackedNiTriStripsData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AbhkShapeCollection::GetRefs(); - return refs; -} - -void NiAlphaController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiAlphaController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); - if ( version <= 0x0A010000 ) { - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiAlphaController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - out << " Data: " << data << endl; - return out.str(); -} - -void NiAlphaController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiAlphaController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiAlphaProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); - NifStream( threshold, in, version ); -} - -void NiAlphaProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); - NifStream( threshold, out, version ); -} - -std::string NiAlphaProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - out << " Threshold: " << threshold << endl; - return out.str(); -} - -void NiAlphaProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiAlphaProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiAmbientLight::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiLight::Read( in, link_stack, version, user_version ); -} - -void NiAmbientLight::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiLight::Write( out, link_map, version, user_version ); -} - -std::string NiAmbientLight::InternalAsString( bool verbose ) const { - stringstream out; - out << NiLight::asString(); - return out.str(); -} - -void NiAmbientLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiLight::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiAmbientLight::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiLight::GetRefs(); - return refs; -} - -void NiAutoNormalParticlesData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::Read( in, link_stack, version, user_version ); - if ( version <= 0x04000002 ) { - NifStream( numParticles, in, version ); - }; - if ( version <= 0x0A000100 ) { - NifStream( size, in, version ); - }; - if ( version <= 0x04000002 ) { - NifStream( numActive, in, version ); - }; - if ( ( version >= 0x0401000C ) && ( version <= 0x0A000100 ) ) { - NifStream( unknownShort, in, version ); - }; - NifStream( hasSizes, in, version ); - if ( (hasSizes != 0) ) { - sizes.resize(numVertices); - for (uint i2 = 0; i2 < sizes.size(); i2++) { - NifStream( sizes[i2], in, version ); - }; - }; -} - -void NiAutoNormalParticlesData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeomData::Write( out, link_map, version, user_version ); - if ( version <= 0x04000002 ) { - NifStream( numParticles, out, version ); - }; - if ( version <= 0x0A000100 ) { - NifStream( size, out, version ); - }; - if ( version <= 0x04000002 ) { - NifStream( numActive, out, version ); - }; - if ( ( version >= 0x0401000C ) && ( version <= 0x0A000100 ) ) { - NifStream( unknownShort, out, version ); - }; - NifStream( hasSizes, out, version ); - if ( (hasSizes != 0) ) { - for (uint i2 = 0; i2 < sizes.size(); i2++) { - NifStream( sizes[i2], out, version ); - }; - }; -} - -std::string NiAutoNormalParticlesData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeomData::asString(); - out << " Num Particles: " << numParticles << endl; - out << " Size: " << size << endl; - out << " Num Active: " << numActive << endl; - out << " Unknown Short: " << unknownShort << endl; - out << " Has Sizes: " << hasSizes << endl; - if ( (hasSizes != 0) ) { - for (uint i2 = 0; i2 < sizes.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Sizes[" << i2 << "]: " << sizes[i2] << endl; - }; - }; - return out.str(); -} - -void NiAutoNormalParticlesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiAutoNormalParticlesData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeomData::GetRefs(); - return refs; -} - -void NiBinaryExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( binaryData.dataSize, in, version ); - binaryData.data.resize(binaryData.dataSize); - for (uint i1 = 0; i1 < binaryData.data.size(); i1++) { - NifStream( binaryData.data[i1], in, version ); - }; -} - -void NiBinaryExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - binaryData.dataSize = uint(binaryData.data.size()); - NifStream( binaryData.dataSize, out, version ); - for (uint i1 = 0; i1 < binaryData.data.size(); i1++) { - NifStream( binaryData.data[i1], out, version ); - }; -} - -std::string NiBinaryExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - binaryData.dataSize = uint(binaryData.data.size()); - out << " Data Size: " << binaryData.dataSize << endl; - for (uint i1 = 0; i1 < binaryData.data.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Data[" << i1 << "]: " << binaryData.data[i1] << endl; - }; - return out.str(); -} - -void NiBinaryExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBinaryExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiBlendBoolInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::Read( in, link_stack, version, user_version ); - NifStream( boolValue, in, version ); -} - -void NiBlendBoolInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBlendInterpolator::Write( out, link_map, version, user_version ); - NifStream( boolValue, out, version ); -} - -std::string NiBlendBoolInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBlendInterpolator::asString(); - out << " Bool Value: " << boolValue << endl; - return out.str(); -} - -void NiBlendBoolInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBlendBoolInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBlendInterpolator::GetRefs(); - return refs; -} - -void NiBlendFloatInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::Read( in, link_stack, version, user_version ); - NifStream( floatValue, in, version ); -} - -void NiBlendFloatInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBlendInterpolator::Write( out, link_map, version, user_version ); - NifStream( floatValue, out, version ); -} - -std::string NiBlendFloatInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBlendInterpolator::asString(); - out << " Float Value: " << floatValue << endl; - return out.str(); -} - -void NiBlendFloatInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBlendFloatInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBlendInterpolator::GetRefs(); - return refs; -} - -void NiBlendPoint3Interpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::Read( in, link_stack, version, user_version ); - NifStream( pointValue, in, version ); -} - -void NiBlendPoint3Interpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBlendInterpolator::Write( out, link_map, version, user_version ); - NifStream( pointValue, out, version ); -} - -std::string NiBlendPoint3Interpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBlendInterpolator::asString(); - out << " Point Value: " << pointValue << endl; - return out.str(); -} - -void NiBlendPoint3Interpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBlendPoint3Interpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBlendInterpolator::GetRefs(); - return refs; -} - -void NiBlendTransformInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::Read( in, link_stack, version, user_version ); -} - -void NiBlendTransformInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBlendInterpolator::Write( out, link_map, version, user_version ); -} - -std::string NiBlendTransformInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBlendInterpolator::asString(); - return out.str(); -} - -void NiBlendTransformInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBlendTransformInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBlendInterpolator::GetRefs(); - return refs; -} - -void NiBoneLODController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - ABoneLODController::Read( in, link_stack, version, user_version ); - NifStream( numShapeGroups, in, version ); - shapeGroups1.resize(numShapeGroups); - for (uint i1 = 0; i1 < shapeGroups1.size(); i1++) { - NifStream( shapeGroups1[i1].numLinkPairs, in, version ); - shapeGroups1[i1].linkPairs.resize(shapeGroups1[i1].numLinkPairs); - for (uint i2 = 0; i2 < shapeGroups1[i1].linkPairs.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; - NifStream( numShapeGroups2, in, version ); - shapeGroups2.resize(numShapeGroups2); - for (uint i1 = 0; i1 < shapeGroups2.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiBoneLODController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - ABoneLODController::Write( out, link_map, version, user_version ); - numShapeGroups2 = uint(shapeGroups2.size()); - numShapeGroups = uint(shapeGroups1.size()); - NifStream( numShapeGroups, out, version ); - for (uint i1 = 0; i1 < shapeGroups1.size(); i1++) { - shapeGroups1[i1].numLinkPairs = uint(shapeGroups1[i1].linkPairs.size()); - NifStream( shapeGroups1[i1].numLinkPairs, out, version ); - for (uint i2 = 0; i2 < shapeGroups1[i1].linkPairs.size(); i2++) { - if ( shapeGroups1[i1].linkPairs[i2].shape != NULL ) - NifStream( link_map[StaticCast<NiObject>(shapeGroups1[i1].linkPairs[i2].shape)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( shapeGroups1[i1].linkPairs[i2].skinInstance != NULL ) - NifStream( link_map[StaticCast<NiObject>(shapeGroups1[i1].linkPairs[i2].skinInstance)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; - NifStream( numShapeGroups2, out, version ); - for (uint i1 = 0; i1 < shapeGroups2.size(); i1++) { - if ( shapeGroups2[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(shapeGroups2[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiBoneLODController::InternalAsString( bool verbose ) const { - stringstream out; - out << ABoneLODController::asString(); - numShapeGroups2 = uint(shapeGroups2.size()); - numShapeGroups = uint(shapeGroups1.size()); - out << " Num Shape Groups: " << numShapeGroups << endl; - for (uint i1 = 0; i1 < shapeGroups1.size(); i1++) { - shapeGroups1[i1].numLinkPairs = uint(shapeGroups1[i1].linkPairs.size()); - out << " Num Link Pairs: " << shapeGroups1[i1].numLinkPairs << endl; - for (uint i2 = 0; i2 < shapeGroups1[i1].linkPairs.size(); i2++) { - out << " Shape: " << shapeGroups1[i1].linkPairs[i2].shape << endl; - out << " Skin Instance: " << shapeGroups1[i1].linkPairs[i2].skinInstance << endl; - }; - }; - out << " Num Shape Groups 2: " << numShapeGroups2 << endl; - for (uint i1 = 0; i1 < shapeGroups2.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Shape Groups 2[" << i1 << "]: " << shapeGroups2[i1] << endl; - }; - return out.str(); -} - -void NiBoneLODController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABoneLODController::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < shapeGroups1.size(); i1++) { - for (uint i2 = 0; i2 < shapeGroups1[i1].linkPairs.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shapeGroups1[i1].linkPairs[i2].shape = DynamicCast<NiTriShape>(objects[link_stack.front()]); - if ( shapeGroups1[i1].linkPairs[i2].shape == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shapeGroups1[i1].linkPairs[i2].shape = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shapeGroups1[i1].linkPairs[i2].skinInstance = DynamicCast<NiSkinInstance>(objects[link_stack.front()]); - if ( shapeGroups1[i1].linkPairs[i2].skinInstance == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shapeGroups1[i1].linkPairs[i2].skinInstance = NULL; - link_stack.pop_front(); - }; - }; - for (uint i1 = 0; i1 < shapeGroups2.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shapeGroups2[i1] = DynamicCast<NiTriShape>(objects[link_stack.front()]); - if ( shapeGroups2[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shapeGroups2[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiBoneLODController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = ABoneLODController::GetRefs(); - for (uint i1 = 0; i1 < shapeGroups1.size(); i1++) { - for (uint i2 = 0; i2 < shapeGroups1[i1].linkPairs.size(); i2++) { - if ( shapeGroups1[i1].linkPairs[i2].shape != NULL ) - refs.push_back(StaticCast<NiObject>(shapeGroups1[i1].linkPairs[i2].shape)); - if ( shapeGroups1[i1].linkPairs[i2].skinInstance != NULL ) - refs.push_back(StaticCast<NiObject>(shapeGroups1[i1].linkPairs[i2].skinInstance)); - }; - }; - for (uint i1 = 0; i1 < shapeGroups2.size(); i1++) { - if ( shapeGroups2[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(shapeGroups2[i1])); - }; - return refs; -} - -void NiBoolData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::Read( in, link_stack, version, user_version ); - NifStream( data.numKeys, in, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, in, version ); - }; - data.keys.resize(data.numKeys); - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], in, version, data.interpolation ); - }; -} - -void NiBoolData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AKeyedData::Write( out, link_map, version, user_version ); - data.numKeys = uint(data.keys.size()); - NifStream( data.numKeys, out, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], out, version, data.interpolation ); - }; -} - -std::string NiBoolData::InternalAsString( bool verbose ) const { - stringstream out; - out << AKeyedData::asString(); - data.numKeys = uint(data.keys.size()); - out << " Num Keys: " << data.numKeys << endl; - if ( (data.numKeys != 0) ) { - out << " Interpolation: " << data.interpolation << endl; - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << data.keys[i1] << endl; - }; - return out.str(); -} - -void NiBoolData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBoolData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AKeyedData::GetRefs(); - return refs; -} - -void NiBooleanExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( booleanData, in, version ); -} - -void NiBooleanExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - NifStream( booleanData, out, version ); -} - -std::string NiBooleanExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Boolean Data: " << booleanData << endl; - return out.str(); -} - -void NiBooleanExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBooleanExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiBoolInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( boolValue, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiBoolInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( boolValue, out, version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiBoolInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Bool Value: " << boolValue << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiBoolInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiBoolData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiBoolInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiBoolTimelineInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( boolValue, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiBoolTimelineInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( boolValue, out, version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiBoolTimelineInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Bool Value: " << boolValue << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiBoolTimelineInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiBoolData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiBoolTimelineInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiBSBoneLODController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABoneLODController::Read( in, link_stack, version, user_version ); -} - -void NiBSBoneLODController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - ABoneLODController::Write( out, link_map, version, user_version ); -} - -std::string NiBSBoneLODController::InternalAsString( bool verbose ) const { - stringstream out; - out << ABoneLODController::asString(); - return out.str(); -} - -void NiBSBoneLODController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABoneLODController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSBoneLODController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = ABoneLODController::GetRefs(); - return refs; -} - -void NiBSplineBasisData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( unknownInt, in, version ); -} - -void NiBSplineBasisData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - NifStream( unknownInt, out, version ); -} - -std::string NiBSplineBasisData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Unknown Int: " << unknownInt << endl; - return out.str(); -} - -void NiBSplineBasisData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSplineBasisData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiBSplineCompFloatInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBSplineInterpolator::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; -} - -void NiBSplineCompFloatInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBSplineInterpolator::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; -} - -std::string NiBSplineCompFloatInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBSplineInterpolator::asString(); - for (uint i1 = 0; i1 < 6; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - return out.str(); -} - -void NiBSplineCompFloatInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBSplineInterpolator::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSplineCompFloatInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBSplineInterpolator::GetRefs(); - return refs; -} - -void NiBSplineCompPoint3Interpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiBSplineInterpolator::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; -} - -void NiBSplineCompPoint3Interpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBSplineInterpolator::Write( out, link_map, version, user_version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - for (uint i1 = 0; i1 < 6; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; -} - -std::string NiBSplineCompPoint3Interpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBSplineInterpolator::asString(); - out << " Data: " << data << endl; - out << " Unknown Link: " << unknownLink << endl; - for (uint i1 = 0; i1 < 6; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - return out.str(); -} - -void NiBSplineCompPoint3Interpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBSplineInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiBSplineData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiBSplineCompPoint3Interpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBSplineInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - return refs; -} - -void NiBSplineCompTransformInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiBSplineInterpolator::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - for (uint i1 = 0; i1 < 17; i1++) { - NifStream( unknown4[i1], in, version ); - }; -} - -void NiBSplineCompTransformInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBSplineInterpolator::Write( out, link_map, version, user_version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( basisData != NULL ) - NifStream( link_map[StaticCast<NiObject>(basisData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - for (uint i1 = 0; i1 < 17; i1++) { - NifStream( unknown4[i1], out, version ); - }; -} - -std::string NiBSplineCompTransformInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBSplineInterpolator::asString(); - out << " Data: " << data << endl; - out << " Basis Data: " << basisData << endl; - for (uint i1 = 0; i1 < 17; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown4[" << i1 << "]: " << unknown4[i1] << endl; - }; - return out.str(); -} - -void NiBSplineCompTransformInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBSplineInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiBSplineData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - basisData = DynamicCast<NiBSplineBasisData>(objects[link_stack.front()]); - if ( basisData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - basisData = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiBSplineCompTransformInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBSplineInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - if ( basisData != NULL ) - refs.push_back(StaticCast<NiObject>(basisData)); - return refs; -} - -void NiBSplineData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( unknownInt, in, version ); - NifStream( count, in, version ); - unknownData.resize(count); - for (uint i1 = 0; i1 < unknownData.size(); i1++) { - for (uint i2 = 0; i2 < 2; i2++) { - NifStream( unknownData[i1][i2], in, version ); - }; - }; -} - -void NiBSplineData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - count = uint(unknownData.size()); - NifStream( unknownInt, out, version ); - NifStream( count, out, version ); - for (uint i1 = 0; i1 < unknownData.size(); i1++) { - for (uint i2 = 0; i2 < 2; i2++) { - NifStream( unknownData[i1][i2], out, version ); - }; - }; -} - -std::string NiBSplineData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - count = uint(unknownData.size()); - out << " Unknown Int: " << unknownInt << endl; - out << " Count: " << count << endl; - for (uint i1 = 0; i1 < unknownData.size(); i1++) { - for (uint i2 = 0; i2 < 2; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Data[" << i1 << "][" << i2 << "]: " << unknownData[i1][i2] << endl; - }; - }; - return out.str(); -} - -void NiBSplineData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSplineData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiCamera::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiAVObject::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownShort, in, version ); - }; - NifStream( frustumLeft, in, version ); - NifStream( frustumRight, in, version ); - NifStream( frustumTop, in, version ); - NifStream( frustumBottom, in, version ); - NifStream( frustumNear, in, version ); - NifStream( frustumFar, in, version ); - if ( version >= 0x0A010000 ) { - NifStream( useOrthographicProjection, in, version ); - }; - NifStream( viewportLeft, in, version ); - NifStream( viewportRight, in, version ); - NifStream( viewportTop, in, version ); - NifStream( viewportBottom, in, version ); - NifStream( lodAdjust, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownInt, in, version ); - if ( version >= 0x04020100 ) { - NifStream( unknownInt2, in, version ); - }; -} - -void NiCamera::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiAVObject::Write( out, link_map, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownShort, out, version ); - }; - NifStream( frustumLeft, out, version ); - NifStream( frustumRight, out, version ); - NifStream( frustumTop, out, version ); - NifStream( frustumBottom, out, version ); - NifStream( frustumNear, out, version ); - NifStream( frustumFar, out, version ); - if ( version >= 0x0A010000 ) { - NifStream( useOrthographicProjection, out, version ); - }; - NifStream( viewportLeft, out, version ); - NifStream( viewportRight, out, version ); - NifStream( viewportTop, out, version ); - NifStream( viewportBottom, out, version ); - NifStream( lodAdjust, out, version ); - if ( unknownLink_ != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink_)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownInt, out, version ); - if ( version >= 0x04020100 ) { - NifStream( unknownInt2, out, version ); - }; -} - -std::string NiCamera::InternalAsString( bool verbose ) const { - stringstream out; - out << NiAVObject::asString(); - out << " Unknown Short: " << unknownShort << endl; - out << " Frustum Left: " << frustumLeft << endl; - out << " Frustum Right: " << frustumRight << endl; - out << " Frustum Top: " << frustumTop << endl; - out << " Frustum Bottom: " << frustumBottom << endl; - out << " Frustum Near: " << frustumNear << endl; - out << " Frustum Far: " << frustumFar << endl; - out << " Use Orthographic Projection: " << useOrthographicProjection << endl; - out << " Viewport Left: " << viewportLeft << endl; - out << " Viewport Right: " << viewportRight << endl; - out << " Viewport Top: " << viewportTop << endl; - out << " Viewport Bottom: " << viewportBottom << endl; - out << " LOD Adjust: " << lodAdjust << endl; - out << " Unknown Link?: " << unknownLink_ << endl; - out << " Unknown Int: " << unknownInt << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - return out.str(); -} - -void NiCamera::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiAVObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink_ = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink_ == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink_ = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiCamera::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiAVObject::GetRefs(); - if ( unknownLink_ != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink_)); - return refs; -} - -void NiCollisionData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknown2, in, version ); - NifStream( unknown3, in, version ); - NifStream( collisionType, in, version ); - if ( (collisionType == 0) ) { - NifStream( unknown5, in, version ); - NifStream( unknown7, in, version ); - }; - if ( (collisionType == 2) ) { - for (uint i2 = 0; i2 < 8; i2++) { - NifStream( unknown6[i2], in, version ); - }; - }; - if ( (collisionType == 1) ) { - for (uint i2 = 0; i2 < 15; i2++) { - NifStream( unknown8[i2], in, version ); - }; - }; -} - -void NiCollisionData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - if ( targetNode != NULL ) - NifStream( link_map[StaticCast<NiObject>(targetNode)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknown2, out, version ); - NifStream( unknown3, out, version ); - NifStream( collisionType, out, version ); - if ( (collisionType == 0) ) { - NifStream( unknown5, out, version ); - NifStream( unknown7, out, version ); - }; - if ( (collisionType == 2) ) { - for (uint i2 = 0; i2 < 8; i2++) { - NifStream( unknown6[i2], out, version ); - }; - }; - if ( (collisionType == 1) ) { - for (uint i2 = 0; i2 < 15; i2++) { - NifStream( unknown8[i2], out, version ); - }; - }; -} - -std::string NiCollisionData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Target Node: " << targetNode << endl; - out << " Unknown2: " << unknown2 << endl; - out << " Unknown3: " << unknown3 << endl; - out << " Collision Type: " << collisionType << endl; - if ( (collisionType == 0) ) { - out << " Unknown5: " << unknown5 << endl; - out << " Unknown7: " << unknown7 << endl; - }; - if ( (collisionType == 2) ) { - for (uint i2 = 0; i2 < 8; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown6[" << i2 << "]: " << unknown6[i2] << endl; - }; - }; - if ( (collisionType == 1) ) { - for (uint i2 = 0; i2 < 15; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown8[" << i2 << "]: " << unknown8[i2] << endl; - }; - }; - return out.str(); -} - -void NiCollisionData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - targetNode = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( targetNode == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - targetNode = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiCollisionData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiColorData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::Read( in, link_stack, version, user_version ); - NifStream( data.numKeys, in, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, in, version ); - }; - data.keys.resize(data.numKeys); - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], in, version, data.interpolation ); - }; -} - -void NiColorData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AKeyedData::Write( out, link_map, version, user_version ); - data.numKeys = uint(data.keys.size()); - NifStream( data.numKeys, out, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], out, version, data.interpolation ); - }; -} - -std::string NiColorData::InternalAsString( bool verbose ) const { - stringstream out; - out << AKeyedData::asString(); - data.numKeys = uint(data.keys.size()); - out << " Num Keys: " << data.numKeys << endl; - if ( (data.numKeys != 0) ) { - out << " Interpolation: " << data.interpolation << endl; - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << data.keys[i1] << endl; - }; - return out.str(); -} - -void NiColorData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiColorData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AKeyedData::GetRefs(); - return refs; -} - -void NiColorExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( data, in, version ); -} - -void NiColorExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - NifStream( data, out, version ); -} - -std::string NiColorExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Data: " << data << endl; - return out.str(); -} - -void NiColorExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiColorExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiControllerManager::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( cumulative, in, version ); - NifStream( numControllerSequences, in, version ); - controllerSequences.resize(numControllerSequences); - for (uint i1 = 0; i1 < controllerSequences.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiControllerManager::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - numControllerSequences = uint(controllerSequences.size()); - NifStream( cumulative, out, version ); - NifStream( numControllerSequences, out, version ); - for (uint i1 = 0; i1 < controllerSequences.size(); i1++) { - if ( controllerSequences[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(controllerSequences[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( objectPalette != NULL ) - NifStream( link_map[StaticCast<NiObject>(objectPalette)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiControllerManager::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - numControllerSequences = uint(controllerSequences.size()); - out << " Cumulative: " << cumulative << endl; - out << " Num Controller Sequences: " << numControllerSequences << endl; - for (uint i1 = 0; i1 < controllerSequences.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Controller Sequences[" << i1 << "]: " << controllerSequences[i1] << endl; - }; - out << " Object Palette: " << objectPalette << endl; - return out.str(); -} - -void NiControllerManager::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < controllerSequences.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controllerSequences[i1] = DynamicCast<NiControllerSequence>(objects[link_stack.front()]); - if ( controllerSequences[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controllerSequences[i1] = NULL; - link_stack.pop_front(); - }; - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - objectPalette = DynamicCast<NiDefaultAVObjectPalette>(objects[link_stack.front()]); - if ( objectPalette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - objectPalette = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiControllerManager::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - for (uint i1 = 0; i1 < controllerSequences.size(); i1++) { - if ( controllerSequences[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(controllerSequences[i1])); - }; - if ( objectPalette != NULL ) - refs.push_back(StaticCast<NiObject>(objectPalette)); - return refs; -} - -void NiControllerSequence::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( name, in, version ); - if ( version <= 0x0A010000 ) { - NifStream( textKeysName, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( numControlledBlocks, in, version ); - if ( version >= 0x0A01006A ) { - NifStream( unknownInt1, in, version ); - }; - controlledBlocks.resize(numControlledBlocks); - for (uint i1 = 0; i1 < controlledBlocks.size(); i1++) { - if ( version <= 0x0A010000 ) { - NifStream( controlledBlocks[i1].targetName, in, version ); - }; - if ( version <= 0x0A01006A ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x0A01006A ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( controlledBlocks[i1].unknownShort0, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( user_version == 10 ) ) { - NifStream( controlledBlocks[i1].priority_, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( user_version == 11 ) ) { - NifStream( controlledBlocks[i1].priority_, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].nodeName, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].nodeNameOffset, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].propertyType, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].propertyTypeOffset, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].controllerType, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].controllerTypeOffset, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].variable1, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].variableOffset1, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].variable2, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].variableOffset2, in, version ); - }; - }; - if ( version >= 0x0A01006A ) { - NifStream( weight, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( cycleType, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( unknownInt0, in, version ); - }; - if ( version >= 0x0A01006A ) { - NifStream( frequency, in, version ); - NifStream( startTime, in, version ); - NifStream( stopTime, in, version ); - }; - if ( ( version >= 0x0A020000 ) && ( version <= 0x0A020000 ) ) { - NifStream( unknownFloat2, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( unknownByte, in, version ); - }; - if ( version >= 0x0A01006A ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownString, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiControllerSequence::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numControlledBlocks = uint(controlledBlocks.size()); - NifStream( name, out, version ); - if ( version <= 0x0A010000 ) { - NifStream( textKeysName, out, version ); - if ( textKeys != NULL ) - NifStream( link_map[StaticCast<NiObject>(textKeys)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( numControlledBlocks, out, version ); - if ( version >= 0x0A01006A ) { - NifStream( unknownInt1, out, version ); - }; - for (uint i1 = 0; i1 < controlledBlocks.size(); i1++) { - if ( version <= 0x0A010000 ) { - NifStream( controlledBlocks[i1].targetName, out, version ); - }; - if ( version <= 0x0A01006A ) { - if ( controlledBlocks[i1].controller != NULL ) - NifStream( link_map[StaticCast<NiObject>(controlledBlocks[i1].controller)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x0A020000 ) { - if ( controlledBlocks[i1].interpolator != NULL ) - NifStream( link_map[StaticCast<NiObject>(controlledBlocks[i1].interpolator)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x0A01006A ) { - if ( controlledBlocks[i1].unknownLink1 != NULL ) - NifStream( link_map[StaticCast<NiObject>(controlledBlocks[i1].unknownLink1)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - if ( controlledBlocks[i1].unknownLink2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(controlledBlocks[i1].unknownLink2)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( controlledBlocks[i1].unknownShort0, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( user_version == 10 ) ) { - NifStream( controlledBlocks[i1].priority_, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( user_version == 11 ) ) { - NifStream( controlledBlocks[i1].priority_, out, version ); - }; - if ( version >= 0x0A020000 ) { - if ( controlledBlocks[i1].stringPalette != NULL ) - NifStream( link_map[StaticCast<NiObject>(controlledBlocks[i1].stringPalette)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].nodeName, out, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].nodeNameOffset, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].propertyType, out, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].propertyTypeOffset, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].controllerType, out, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].controllerTypeOffset, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].variable1, out, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].variableOffset1, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( controlledBlocks[i1].variable2, out, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( controlledBlocks[i1].variableOffset2, out, version ); - }; - }; - if ( version >= 0x0A01006A ) { - NifStream( weight, out, version ); - if ( textKeys != NULL ) - NifStream( link_map[StaticCast<NiObject>(textKeys)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( cycleType, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( unknownInt0, out, version ); - }; - if ( version >= 0x0A01006A ) { - NifStream( frequency, out, version ); - NifStream( startTime, out, version ); - NifStream( stopTime, out, version ); - }; - if ( ( version >= 0x0A020000 ) && ( version <= 0x0A020000 ) ) { - NifStream( unknownFloat2, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( unknownByte, out, version ); - }; - if ( version >= 0x0A01006A ) { - if ( manager != NULL ) - NifStream( link_map[StaticCast<NiObject>(manager)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownString, out, version ); - }; - if ( version >= 0x0A020000 ) { - if ( stringPalette != NULL ) - NifStream( link_map[StaticCast<NiObject>(stringPalette)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiControllerSequence::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numControlledBlocks = uint(controlledBlocks.size()); - out << " Name: " << name << endl; - out << " Text Keys Name: " << textKeysName << endl; - out << " Text Keys: " << textKeys << endl; - out << " Num Controlled Blocks: " << numControlledBlocks << endl; - out << " Unknown Int 1: " << unknownInt1 << endl; - for (uint i1 = 0; i1 < controlledBlocks.size(); i1++) { - out << " Target Name: " << controlledBlocks[i1].targetName << endl; - out << " Controller: " << controlledBlocks[i1].controller << endl; - out << " Interpolator: " << controlledBlocks[i1].interpolator << endl; - out << " Unknown Link 1: " << controlledBlocks[i1].unknownLink1 << endl; - out << " Unknown Link 2: " << controlledBlocks[i1].unknownLink2 << endl; - out << " Unknown Short 0: " << controlledBlocks[i1].unknownShort0 << endl; - out << " Priority?: " << controlledBlocks[i1].priority_ << endl; - out << " String Palette: " << controlledBlocks[i1].stringPalette << endl; - out << " Node Name: " << controlledBlocks[i1].nodeName << endl; - out << " Node Name Offset: " << controlledBlocks[i1].nodeNameOffset << endl; - out << " Property Type: " << controlledBlocks[i1].propertyType << endl; - out << " Property Type Offset: " << controlledBlocks[i1].propertyTypeOffset << endl; - out << " Controller Type: " << controlledBlocks[i1].controllerType << endl; - out << " Controller Type Offset: " << controlledBlocks[i1].controllerTypeOffset << endl; - out << " Variable 1: " << controlledBlocks[i1].variable1 << endl; - out << " Variable Offset 1: " << controlledBlocks[i1].variableOffset1 << endl; - out << " Variable 2: " << controlledBlocks[i1].variable2 << endl; - out << " Variable Offset 2: " << controlledBlocks[i1].variableOffset2 << endl; - }; - out << " Weight: " << weight << endl; - out << " Cycle Type: " << cycleType << endl; - out << " Unknown Int 0: " << unknownInt0 << endl; - out << " Frequency: " << frequency << endl; - out << " Start Time: " << startTime << endl; - out << " Stop Time: " << stopTime << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Byte: " << unknownByte << endl; - out << " Manager: " << manager << endl; - out << " Unknown String: " << unknownString << endl; - out << " String Palette: " << stringPalette << endl; - return out.str(); -} - -void NiControllerSequence::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - textKeys = DynamicCast<NiTextKeyExtraData>(objects[link_stack.front()]); - if ( textKeys == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - textKeys = NULL; - link_stack.pop_front(); - }; - for (uint i1 = 0; i1 < controlledBlocks.size(); i1++) { - if ( version <= 0x0A01006A ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].controller = DynamicCast<NiTimeController>(objects[link_stack.front()]); - if ( controlledBlocks[i1].controller == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].controller = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].interpolator = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( controlledBlocks[i1].interpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].interpolator = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A01006A ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].unknownLink1 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( controlledBlocks[i1].unknownLink1 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].unknownLink1 = NULL; - link_stack.pop_front(); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].unknownLink2 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( controlledBlocks[i1].unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].unknownLink2 = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - controlledBlocks[i1].stringPalette = DynamicCast<NiStringPalette>(objects[link_stack.front()]); - if ( controlledBlocks[i1].stringPalette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - controlledBlocks[i1].stringPalette = NULL; - link_stack.pop_front(); - }; - }; - if ( version >= 0x0A01006A ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - textKeys = DynamicCast<NiTextKeyExtraData>(objects[link_stack.front()]); - if ( textKeys == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - textKeys = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - manager = DynamicCast<NiControllerManager>(objects[link_stack.front()]); - if ( manager == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - manager = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - stringPalette = DynamicCast<NiStringPalette>(objects[link_stack.front()]); - if ( stringPalette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - stringPalette = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiControllerSequence::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( textKeys != NULL ) - refs.push_back(StaticCast<NiObject>(textKeys)); - for (uint i1 = 0; i1 < controlledBlocks.size(); i1++) { - if ( controlledBlocks[i1].controller != NULL ) - refs.push_back(StaticCast<NiObject>(controlledBlocks[i1].controller)); - if ( controlledBlocks[i1].interpolator != NULL ) - refs.push_back(StaticCast<NiObject>(controlledBlocks[i1].interpolator)); - if ( controlledBlocks[i1].unknownLink1 != NULL ) - refs.push_back(StaticCast<NiObject>(controlledBlocks[i1].unknownLink1)); - if ( controlledBlocks[i1].unknownLink2 != NULL ) - refs.push_back(StaticCast<NiObject>(controlledBlocks[i1].unknownLink2)); - if ( controlledBlocks[i1].stringPalette != NULL ) - refs.push_back(StaticCast<NiObject>(controlledBlocks[i1].stringPalette)); - }; - if ( stringPalette != NULL ) - refs.push_back(StaticCast<NiObject>(stringPalette)); - return refs; -} - -void NiDefaultAVObjectPalette::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( unknownInt, in, version ); - NifStream( numObjs, in, version ); - objs.resize(numObjs); - for (uint i1 = 0; i1 < objs.size(); i1++) { - NifStream( objs[i1].name, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiDefaultAVObjectPalette::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numObjs = uint(objs.size()); - NifStream( unknownInt, out, version ); - NifStream( numObjs, out, version ); - for (uint i1 = 0; i1 < objs.size(); i1++) { - NifStream( objs[i1].name, out, version ); - if ( objs[i1].object != NULL ) - NifStream( link_map[StaticCast<NiObject>(objs[i1].object)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiDefaultAVObjectPalette::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numObjs = uint(objs.size()); - out << " Unknown Int: " << unknownInt << endl; - out << " Num Objs: " << numObjs << endl; - for (uint i1 = 0; i1 < objs.size(); i1++) { - out << " Name: " << objs[i1].name << endl; - out << " Object: " << objs[i1].object << endl; - }; - return out.str(); -} - -void NiDefaultAVObjectPalette::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < objs.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - objs[i1].object = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( objs[i1].object == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - objs[i1].object = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiDefaultAVObjectPalette::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - for (uint i1 = 0; i1 < objs.size(); i1++) { - }; - return refs; -} - -void NiDirectionalLight::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiLight::Read( in, link_stack, version, user_version ); -} - -void NiDirectionalLight::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiLight::Write( out, link_map, version, user_version ); -} - -std::string NiDirectionalLight::InternalAsString( bool verbose ) const { - stringstream out; - out << NiLight::asString(); - return out.str(); -} - -void NiDirectionalLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiLight::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiDirectionalLight::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiLight::GetRefs(); - return refs; -} - -void NiDitherProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); -} - -void NiDitherProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); -} - -std::string NiDitherProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - return out.str(); -} - -void NiDitherProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiDitherProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiFlipController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); - NifStream( textureSlot, in, version ); - if ( version <= 0x0A010000 ) { - NifStream( unknownInt2, in, version ); - NifStream( delta, in, version ); - }; - NifStream( numSources, in, version ); - sources.resize(numSources); - for (uint i1 = 0; i1 < sources.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiFlipController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); - numSources = uint(sources.size()); - NifStream( textureSlot, out, version ); - if ( version <= 0x0A010000 ) { - NifStream( unknownInt2, out, version ); - NifStream( delta, out, version ); - }; - NifStream( numSources, out, version ); - for (uint i1 = 0; i1 < sources.size(); i1++) { - if ( sources[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(sources[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiFlipController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - numSources = uint(sources.size()); - out << " Texture Slot: " << textureSlot << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Delta: " << delta << endl; - out << " Num Sources: " << numSources << endl; - for (uint i1 = 0; i1 < sources.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Sources[" << i1 << "]: " << sources[i1] << endl; - }; - return out.str(); -} - -void NiFlipController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < sources.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - sources[i1] = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( sources[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - sources[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiFlipController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - for (uint i1 = 0; i1 < sources.size(); i1++) { - if ( sources[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(sources[i1])); - }; - return refs; -} - -void NiFloatData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::Read( in, link_stack, version, user_version ); - NifStream( data.numKeys, in, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, in, version ); - }; - data.keys.resize(data.numKeys); - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], in, version, data.interpolation ); - }; -} - -void NiFloatData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AKeyedData::Write( out, link_map, version, user_version ); - data.numKeys = uint(data.keys.size()); - NifStream( data.numKeys, out, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], out, version, data.interpolation ); - }; -} - -std::string NiFloatData::InternalAsString( bool verbose ) const { - stringstream out; - out << AKeyedData::asString(); - data.numKeys = uint(data.keys.size()); - out << " Num Keys: " << data.numKeys << endl; - if ( (data.numKeys != 0) ) { - out << " Interpolation: " << data.interpolation << endl; - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << data.keys[i1] << endl; - }; - return out.str(); -} - -void NiFloatData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiFloatData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AKeyedData::GetRefs(); - return refs; -} - -void NiFloatExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( floatData, in, version ); -} - -void NiFloatExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - NifStream( floatData, out, version ); -} - -std::string NiFloatExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Float Data: " << floatData << endl; - return out.str(); -} - -void NiFloatExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiFloatExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiFloatExtraDataController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - if ( version >= 0x14000004 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownString, in, version ); - }; -} - -void NiFloatExtraDataController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( version >= 0x14000004 ) { - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownString, out, version ); - }; -} - -std::string NiFloatExtraDataController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown Link: " << unknownLink << endl; - out << " Unknown String: " << unknownString << endl; - return out.str(); -} - -void NiFloatExtraDataController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiFloatExtraDataController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - return refs; -} - -void NiFloatInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( floatValue, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiFloatInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( floatValue, out, version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiFloatInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Float Value: " << floatValue << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiFloatInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiFloatInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiFloatsExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( numFloats, in, version ); - data.resize(numFloats); - for (uint i1 = 0; i1 < data.size(); i1++) { - NifStream( data[i1], in, version ); - }; -} - -void NiFloatsExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - numFloats = uint(data.size()); - NifStream( numFloats, out, version ); - for (uint i1 = 0; i1 < data.size(); i1++) { - NifStream( data[i1], out, version ); - }; -} - -std::string NiFloatsExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - numFloats = uint(data.size()); - out << " Num Floats: " << numFloats << endl; - for (uint i1 = 0; i1 < data.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Data[" << i1 << "]: " << data[i1] << endl; - }; - return out.str(); -} - -void NiFloatsExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiFloatsExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiFogProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); - NifStream( fogDepth, in, version ); - NifStream( fogColor, in, version ); -} - -void NiFogProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); - NifStream( fogDepth, out, version ); - NifStream( fogColor, out, version ); -} - -std::string NiFogProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - out << " Fog Depth: " << fogDepth << endl; - out << " Fog Color: " << fogColor << endl; - return out.str(); -} - -void NiFogProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiFogProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiGeomMorpherController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknown, in, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( unknown2, in, version ); - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownByte, in, version ); - if ( version >= 0x0A01006A ) { - NifStream( numInterpolators, in, version ); - interpolators.resize(numInterpolators); - for (uint i2 = 0; i2 < interpolators.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; - if ( version >= 0x0A020000 ) { - NifStream( numUnknownInts, in, version ); - unknownInts.resize(numUnknownInts); - for (uint i2 = 0; i2 < unknownInts.size(); i2++) { - NifStream( unknownInts[i2], in, version ); - }; - }; -} - -void NiGeomMorpherController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - numUnknownInts = uint(unknownInts.size()); - numInterpolators = uint(interpolators.size()); - if ( version >= 0x0A010000 ) { - NifStream( unknown, out, version ); - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( unknown2, out, version ); - }; - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownByte, out, version ); - if ( version >= 0x0A01006A ) { - NifStream( numInterpolators, out, version ); - for (uint i2 = 0; i2 < interpolators.size(); i2++) { - if ( interpolators[i2] != NULL ) - NifStream( link_map[StaticCast<NiObject>(interpolators[i2])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; - if ( version >= 0x0A020000 ) { - NifStream( numUnknownInts, out, version ); - for (uint i2 = 0; i2 < unknownInts.size(); i2++) { - NifStream( unknownInts[i2], out, version ); - }; - }; -} - -std::string NiGeomMorpherController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - numUnknownInts = uint(unknownInts.size()); - numInterpolators = uint(interpolators.size()); - out << " Unknown: " << unknown << endl; - out << " Unknown 2: " << unknown2 << endl; - out << " Data: " << data << endl; - out << " Unknown Byte: " << unknownByte << endl; - out << " Num Interpolators: " << numInterpolators << endl; - for (uint i1 = 0; i1 < interpolators.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Interpolators[" << i1 << "]: " << interpolators[i1] << endl; - }; - out << " Num Unknown Ints: " << numUnknownInts << endl; - for (uint i1 = 0; i1 < unknownInts.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Ints[" << i1 << "]: " << unknownInts[i1] << endl; - }; - return out.str(); -} - -void NiGeomMorpherController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiMorphData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - if ( version >= 0x0A01006A ) { - for (uint i2 = 0; i2 < interpolators.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - interpolators[i2] = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( interpolators[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - interpolators[i2] = NULL; - link_stack.pop_front(); - }; - }; -} - -std::list<NiObjectRef> NiGeomMorpherController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - for (uint i1 = 0; i1 < interpolators.size(); i1++) { - if ( interpolators[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(interpolators[i1])); - }; - return refs; -} - -void NiGravity::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( force, in, version ); - NifStream( type, in, version ); - NifStream( position, in, version ); - NifStream( direction, in, version ); -} - -void NiGravity::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( force, out, version ); - NifStream( type, out, version ); - NifStream( position, out, version ); - NifStream( direction, out, version ); -} - -std::string NiGravity::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Force: " << force << endl; - out << " Type: " << type << endl; - out << " Position: " << position << endl; - out << " Direction: " << direction << endl; - return out.str(); -} - -void NiGravity::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiGravity::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - return refs; -} - -void NiIntegerExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( integerData, in, version ); -} - -void NiIntegerExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - NifStream( integerData, out, version ); -} - -std::string NiIntegerExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Integer Data: " << integerData << endl; - return out.str(); -} - -void NiIntegerExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiIntegerExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiIntegersExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( numIntegers, in, version ); - data.resize(numIntegers); - for (uint i1 = 0; i1 < data.size(); i1++) { - NifStream( data[i1], in, version ); - }; -} - -void NiIntegersExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - numIntegers = uint(data.size()); - NifStream( numIntegers, out, version ); - for (uint i1 = 0; i1 < data.size(); i1++) { - NifStream( data[i1], out, version ); - }; -} - -std::string NiIntegersExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - numIntegers = uint(data.size()); - out << " Num Integers: " << numIntegers << endl; - for (uint i1 = 0; i1 < data.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Data[" << i1 << "]: " << data[i1] << endl; - }; - return out.str(); -} - -void NiIntegersExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiIntegersExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiKeyframeController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiKeyframeController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiKeyframeController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Data: " << data << endl; - return out.str(); -} - -void NiKeyframeController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiKeyframeData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiKeyframeController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void BSKeyframeController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiKeyframeController::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void BSKeyframeController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiKeyframeController::Write( out, link_map, version, user_version ); - if ( data2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(data2)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string BSKeyframeController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiKeyframeController::asString(); - out << " Data 2: " << data2 << endl; - return out.str(); -} - -void BSKeyframeController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiKeyframeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data2 = DynamicCast<NiKeyframeData>(objects[link_stack.front()]); - if ( data2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data2 = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> BSKeyframeController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiKeyframeController::GetRefs(); - if ( data2 != NULL ) - refs.push_back(StaticCast<NiObject>(data2)); - return refs; -} - -void NiKeyframeData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::Read( in, link_stack, version, user_version ); - NifStream( numRotationKeys, in, version ); - if ( (numRotationKeys != 0) ) { - NifStream( rotationType, in, version ); - }; - if ( (rotationType != 4) ) { - quaternionKeys.resize(numRotationKeys); - for (uint i2 = 0; i2 < quaternionKeys.size(); i2++) { - NifStream( quaternionKeys[i2], in, version, rotationType ); - }; - }; - if ( version <= 0x0A010000 ) { - if ( (rotationType == 4) ) { - NifStream( unknownFloat, in, version ); - }; - }; - if ( (rotationType == 4) ) { - for (uint i2 = 0; i2 < 3; i2++) { - NifStream( xyzRotations[i2].numKeys, in, version ); - if ( (xyzRotations[i2].numKeys != 0) ) { - NifStream( xyzRotations[i2].interpolation, in, version ); - }; - xyzRotations[i2].keys.resize(xyzRotations[i2].numKeys); - for (uint i3 = 0; i3 < xyzRotations[i2].keys.size(); i3++) { - NifStream( xyzRotations[i2].keys[i3], in, version, xyzRotations[i2].interpolation ); - }; - }; - }; - NifStream( translations.numKeys, in, version ); - if ( (translations.numKeys != 0) ) { - NifStream( translations.interpolation, in, version ); - }; - translations.keys.resize(translations.numKeys); - for (uint i1 = 0; i1 < translations.keys.size(); i1++) { - NifStream( translations.keys[i1], in, version, translations.interpolation ); - }; - NifStream( scales.numKeys, in, version ); - if ( (scales.numKeys != 0) ) { - NifStream( scales.interpolation, in, version ); - }; - scales.keys.resize(scales.numKeys); - for (uint i1 = 0; i1 < scales.keys.size(); i1++) { - NifStream( scales.keys[i1], in, version, scales.interpolation ); - }; -} - -void NiKeyframeData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AKeyedData::Write( out, link_map, version, user_version ); - NifStream( numRotationKeys, out, version ); - if ( (numRotationKeys != 0) ) { - NifStream( rotationType, out, version ); - }; - if ( (rotationType != 4) ) { - for (uint i2 = 0; i2 < quaternionKeys.size(); i2++) { - NifStream( quaternionKeys[i2], out, version, rotationType ); - }; - }; - if ( version <= 0x0A010000 ) { - if ( (rotationType == 4) ) { - NifStream( unknownFloat, out, version ); - }; - }; - if ( (rotationType == 4) ) { - for (uint i2 = 0; i2 < 3; i2++) { - xyzRotations[i2].numKeys = uint(xyzRotations[i2].keys.size()); - NifStream( xyzRotations[i2].numKeys, out, version ); - if ( (xyzRotations[i2].numKeys != 0) ) { - NifStream( xyzRotations[i2].interpolation, out, version ); - }; - for (uint i3 = 0; i3 < xyzRotations[i2].keys.size(); i3++) { - NifStream( xyzRotations[i2].keys[i3], out, version, xyzRotations[i2].interpolation ); - }; - }; - }; - translations.numKeys = uint(translations.keys.size()); - NifStream( translations.numKeys, out, version ); - if ( (translations.numKeys != 0) ) { - NifStream( translations.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < translations.keys.size(); i1++) { - NifStream( translations.keys[i1], out, version, translations.interpolation ); - }; - scales.numKeys = uint(scales.keys.size()); - NifStream( scales.numKeys, out, version ); - if ( (scales.numKeys != 0) ) { - NifStream( scales.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < scales.keys.size(); i1++) { - NifStream( scales.keys[i1], out, version, scales.interpolation ); - }; -} - -std::string NiKeyframeData::InternalAsString( bool verbose ) const { - stringstream out; - out << AKeyedData::asString(); - out << " Num Rotation Keys: " << numRotationKeys << endl; - if ( (numRotationKeys != 0) ) { - out << " Rotation Type: " << rotationType << endl; - }; - if ( (rotationType != 4) ) { - for (uint i2 = 0; i2 < quaternionKeys.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Quaternion Keys[" << i2 << "]: " << quaternionKeys[i2] << endl; - }; - }; - if ( (rotationType == 4) ) { - out << " Unknown Float: " << unknownFloat << endl; - for (uint i2 = 0; i2 < 3; i2++) { - xyzRotations[i2].numKeys = uint(xyzRotations[i2].keys.size()); - out << " Num Keys: " << xyzRotations[i2].numKeys << endl; - if ( (xyzRotations[i2].numKeys != 0) ) { - out << " Interpolation: " << xyzRotations[i2].interpolation << endl; - }; - for (uint i3 = 0; i3 < xyzRotations[i2].keys.size(); i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i3 << "]: " << xyzRotations[i2].keys[i3] << endl; - }; - }; - }; - translations.numKeys = uint(translations.keys.size()); - out << " Num Keys: " << translations.numKeys << endl; - if ( (translations.numKeys != 0) ) { - out << " Interpolation: " << translations.interpolation << endl; - }; - for (uint i1 = 0; i1 < translations.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << translations.keys[i1] << endl; - }; - scales.numKeys = uint(scales.keys.size()); - out << " Num Keys: " << scales.numKeys << endl; - if ( (scales.numKeys != 0) ) { - out << " Interpolation: " << scales.interpolation << endl; - }; - for (uint i1 = 0; i1 < scales.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << scales.keys[i1] << endl; - }; - return out.str(); -} - -void NiKeyframeData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiKeyframeData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AKeyedData::GetRefs(); - return refs; -} - -void NiLightColorController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - if ( ( version >= 0x0A010000 ) && ( version <= 0x0A010000 ) ) { - NifStream( unknownShort, in, version ); - }; - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownShort, in, version ); - }; -} - -void NiLightColorController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( ( version >= 0x0A010000 ) && ( version <= 0x0A010000 ) ) { - NifStream( unknownShort, out, version ); - }; - if ( version <= 0x0A010000 ) { - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x0A020000 ) { - if ( interpolator != NULL ) - NifStream( link_map[StaticCast<NiObject>(interpolator)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownShort, out, version ); - }; -} - -std::string NiLightColorController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown Short: " << unknownShort << endl; - out << " Data: " << data << endl; - out << " Interpolator: " << interpolator << endl; - return out.str(); -} - -void NiLightColorController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - interpolator = DynamicCast<NiPoint3Interpolator>(objects[link_stack.front()]); - if ( interpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - interpolator = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiLightColorController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - if ( interpolator != NULL ) - refs.push_back(StaticCast<NiObject>(interpolator)); - return refs; -} - -void NiLightDimmerController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiLightDimmerController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiLightDimmerController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown Link: " << unknownLink << endl; - return out.str(); -} - -void NiLightDimmerController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiLightDimmerController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - return refs; -} - -void NiLookAtController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknown1, in, version ); - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiLookAtController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknown1, out, version ); - }; - if ( lookAtNode != NULL ) - NifStream( link_map[StaticCast<NiObject>(lookAtNode)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiLookAtController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown1: " << unknown1 << endl; - out << " Look At Node: " << lookAtNode << endl; - return out.str(); -} - -void NiLookAtController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - lookAtNode = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( lookAtNode == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - lookAtNode = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiLookAtController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( lookAtNode != NULL ) - refs.push_back(StaticCast<NiObject>(lookAtNode)); - return refs; -} - -void NiLookAtInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( unknownShort, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownFloat, in, version ); - NifStream( translation, in, version ); - NifStream( rotation, in, version ); - NifStream( scale, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiLookAtInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( unknownShort, out, version ); - if ( lookAt != NULL ) - NifStream( link_map[StaticCast<NiObject>(lookAt)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownFloat, out, version ); - NifStream( translation, out, version ); - NifStream( rotation, out, version ); - NifStream( scale, out, version ); - if ( unknownLink1 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink1)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( unknownLink2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink2)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( unknownLink3 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink3)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiLookAtInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Unknown Short: " << unknownShort << endl; - out << " Look At: " << lookAt << endl; - out << " Unknown Float: " << unknownFloat << endl; - out << " Translation: " << translation << endl; - out << " Rotation: " << rotation << endl; - out << " Scale: " << scale << endl; - out << " Unknown Link 1: " << unknownLink1 << endl; - out << " Unknown Link 2: " << unknownLink2 << endl; - out << " Unknown Link 3: " << unknownLink3 << endl; - return out.str(); -} - -void NiLookAtInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - lookAt = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( lookAt == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - lookAt = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink1 = DynamicCast<NiPoint3Interpolator>(objects[link_stack.front()]); - if ( unknownLink1 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink1 = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiFloatInterpolator>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink3 = DynamicCast<NiFloatInterpolator>(objects[link_stack.front()]); - if ( unknownLink3 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink3 = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiLookAtInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - if ( lookAt != NULL ) - refs.push_back(StaticCast<NiObject>(lookAt)); - if ( unknownLink1 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink1)); - if ( unknownLink2 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink2)); - if ( unknownLink3 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink3)); - return refs; -} - -void NiMaterialColorController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknown, in, version ); - }; - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiMaterialColorController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknown, out, version ); - }; - if ( version <= 0x0A010000 ) { - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiMaterialColorController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - out << " Unknown: " << unknown << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiMaterialColorController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiMaterialColorController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiMaterialProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A000102 ) { - NifStream( flags, in, version ); - }; - NifStream( ambientColor, in, version ); - NifStream( diffuseColor, in, version ); - NifStream( specularColor, in, version ); - NifStream( emissiveColor, in, version ); - NifStream( glossiness, in, version ); - NifStream( alpha, in, version ); -} - -void NiMaterialProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - if ( version <= 0x0A000102 ) { - NifStream( flags, out, version ); - }; - NifStream( ambientColor, out, version ); - NifStream( diffuseColor, out, version ); - NifStream( specularColor, out, version ); - NifStream( emissiveColor, out, version ); - NifStream( glossiness, out, version ); - NifStream( alpha, out, version ); -} - -std::string NiMaterialProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - out << " Ambient Color: " << ambientColor << endl; - out << " Diffuse Color: " << diffuseColor << endl; - out << " Specular Color: " << specularColor << endl; - out << " Emissive Color: " << emissiveColor << endl; - out << " Glossiness: " << glossiness << endl; - out << " Alpha: " << alpha << endl; - return out.str(); -} - -void NiMaterialProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiMaterialProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiMeshPSysData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - APSysData::Read( in, link_stack, version, user_version ); - if ( version >= 0x14000005 ) { - NifStream( unknownByte11, in, version ); - }; - if ( version <= 0x14000004 ) { - unknownFloats3.resize(numVertices); - for (uint i2 = 0; i2 < unknownFloats3.size(); i2++) { - for (uint i3 = 0; i3 < 4; i3++) { - NifStream( unknownFloats3[i2][i3], in, version ); - }; - }; - unknownFloats4.resize(numVertices); - for (uint i2 = 0; i2 < unknownFloats4.size(); i2++) { - for (uint i3 = 0; i3 < 10; i3++) { - NifStream( unknownFloats4[i2][i3], in, version ); - }; - }; - }; - if ( version >= 0x14000005 ) { - unknownFloats5.resize(numVertices); - for (uint i2 = 0; i2 < unknownFloats5.size(); i2++) { - for (uint i3 = 0; i3 < 12; i3++) { - NifStream( unknownFloats5[i2][i3], in, version ); - }; - }; - }; - NifStream( unknownInt1, in, version ); - if ( version <= 0x14000004 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( ( version >= 0x0A020000 ) && ( version <= 0x14000004 ) ) { - NifStream( unknownByte2, in, version ); - NifStream( numUnknownLinks, in, version ); - unknownLinks.resize(numUnknownLinks); - for (uint i2 = 0; i2 < unknownLinks.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; - if ( version >= 0x14000005 ) { - NifStream( unknownShort4, in, version ); - NifStream( unknownInt2, in, version ); - NifStream( unknownByte12, in, version ); - NifStream( unknownInt3, in, version ); - NifStream( unknownInt4, in, version ); - }; - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiMeshPSysData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysData::Write( out, link_map, version, user_version ); - numUnknownLinks = uint(unknownLinks.size()); - if ( version >= 0x14000005 ) { - NifStream( unknownByte11, out, version ); - }; - if ( version <= 0x14000004 ) { - for (uint i2 = 0; i2 < unknownFloats3.size(); i2++) { - for (uint i3 = 0; i3 < 4; i3++) { - NifStream( unknownFloats3[i2][i3], out, version ); - }; - }; - for (uint i2 = 0; i2 < unknownFloats4.size(); i2++) { - for (uint i3 = 0; i3 < 10; i3++) { - NifStream( unknownFloats4[i2][i3], out, version ); - }; - }; - }; - if ( version >= 0x14000005 ) { - for (uint i2 = 0; i2 < unknownFloats5.size(); i2++) { - for (uint i3 = 0; i3 < 12; i3++) { - NifStream( unknownFloats5[i2][i3], out, version ); - }; - }; - }; - NifStream( unknownInt1, out, version ); - if ( version <= 0x14000004 ) { - if ( modifier != NULL ) - NifStream( link_map[StaticCast<NiObject>(modifier)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( ( version >= 0x0A020000 ) && ( version <= 0x14000004 ) ) { - NifStream( unknownByte2, out, version ); - NifStream( numUnknownLinks, out, version ); - for (uint i2 = 0; i2 < unknownLinks.size(); i2++) { - if ( unknownLinks[i2] != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLinks[i2])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; - if ( version >= 0x14000005 ) { - NifStream( unknownShort4, out, version ); - NifStream( unknownInt2, out, version ); - NifStream( unknownByte12, out, version ); - NifStream( unknownInt3, out, version ); - NifStream( unknownInt4, out, version ); - }; - if ( version >= 0x0A020000 ) { - if ( unknownLink2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink2)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiMeshPSysData::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysData::asString(); - numUnknownLinks = uint(unknownLinks.size()); - out << " Unknown Byte 11: " << unknownByte11 << endl; - for (uint i1 = 0; i1 < unknownFloats3.size(); i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 3[" << i1 << "][" << i2 << "]: " << unknownFloats3[i1][i2] << endl; - }; - }; - for (uint i1 = 0; i1 < unknownFloats4.size(); i1++) { - for (uint i2 = 0; i2 < 10; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 4[" << i1 << "][" << i2 << "]: " << unknownFloats4[i1][i2] << endl; - }; - }; - for (uint i1 = 0; i1 < unknownFloats5.size(); i1++) { - for (uint i2 = 0; i2 < 12; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 5[" << i1 << "][" << i2 << "]: " << unknownFloats5[i1][i2] << endl; - }; - }; - out << " Unknown Int 1: " << unknownInt1 << endl; - out << " Modifier: " << modifier << endl; - out << " Unknown Byte 2: " << unknownByte2 << endl; - out << " Num Unknown Links: " << numUnknownLinks << endl; - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Links[" << i1 << "]: " << unknownLinks[i1] << endl; - }; - out << " Unknown Short 4: " << unknownShort4 << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Unknown Byte 12: " << unknownByte12 << endl; - out << " Unknown Int 3: " << unknownInt3 << endl; - out << " Unknown Int 4: " << unknownInt4 << endl; - out << " Unknown Link 2: " << unknownLink2 << endl; - return out.str(); -} - -void NiMeshPSysData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysData::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x14000004 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - modifier = DynamicCast<NiPSysModifier>(objects[link_stack.front()]); - if ( modifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - modifier = NULL; - link_stack.pop_front(); - }; - if ( ( version >= 0x0A020000 ) && ( version <= 0x14000004 ) ) { - for (uint i2 = 0; i2 < unknownLinks.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLinks[i2] = DynamicCast<NiPSysModifier>(objects[link_stack.front()]); - if ( unknownLinks[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLinks[i2] = NULL; - link_stack.pop_front(); - }; - }; - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiMeshPSysData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysData::GetRefs(); - if ( modifier != NULL ) - refs.push_back(StaticCast<NiObject>(modifier)); - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if ( unknownLinks[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLinks[i1])); - }; - if ( unknownLink2 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink2)); - return refs; -} - -void NiMorphData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( numMorphs, in, version ); - NifStream( numVertices, in, version ); - NifStream( unknownByte, in, version ); - morphs.resize(numMorphs); - for (uint i1 = 0; i1 < morphs.size(); i1++) { - if ( version >= 0x0A01006A ) { - NifStream( morphs[i1].frameName, in, version ); - }; - if ( version <= 0x0A000102 ) { - NifStream( morphs[i1].numMorphKeys, in, version ); - NifStream( morphs[i1].morphInterpolation, in, version ); - morphs[i1].morphKeys.resize(morphs[i1].numMorphKeys); - for (uint i3 = 0; i3 < morphs[i1].morphKeys.size(); i3++) { - NifStream( morphs[i1].morphKeys[i3], in, version, morphs[i1].morphInterpolation ); - }; - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( morphs[i1].unknownInt, in, version ); - }; - morphs[i1].vectors.resize(numVertices); - for (uint i2 = 0; i2 < morphs[i1].vectors.size(); i2++) { - NifStream( morphs[i1].vectors[i2], in, version ); - }; - }; -} - -void NiMorphData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numMorphs = uint(morphs.size()); - NifStream( numMorphs, out, version ); - NifStream( numVertices, out, version ); - NifStream( unknownByte, out, version ); - for (uint i1 = 0; i1 < morphs.size(); i1++) { - morphs[i1].numMorphKeys = uint(morphs[i1].morphKeys.size()); - if ( version >= 0x0A01006A ) { - NifStream( morphs[i1].frameName, out, version ); - }; - if ( version <= 0x0A000102 ) { - NifStream( morphs[i1].numMorphKeys, out, version ); - NifStream( morphs[i1].morphInterpolation, out, version ); - for (uint i3 = 0; i3 < morphs[i1].morphKeys.size(); i3++) { - NifStream( morphs[i1].morphKeys[i3], out, version, morphs[i1].morphInterpolation ); - }; - }; - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - NifStream( morphs[i1].unknownInt, out, version ); - }; - for (uint i2 = 0; i2 < morphs[i1].vectors.size(); i2++) { - NifStream( morphs[i1].vectors[i2], out, version ); - }; - }; -} - -std::string NiMorphData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numMorphs = uint(morphs.size()); - out << " Num Morphs: " << numMorphs << endl; - out << " Num Vertices: " << numVertices << endl; - out << " Unknown Byte: " << unknownByte << endl; - for (uint i1 = 0; i1 < morphs.size(); i1++) { - morphs[i1].numMorphKeys = uint(morphs[i1].morphKeys.size()); - out << " Frame Name: " << morphs[i1].frameName << endl; - out << " Num Morph Keys: " << morphs[i1].numMorphKeys << endl; - out << " Morph Interpolation: " << morphs[i1].morphInterpolation << endl; - for (uint i2 = 0; i2 < morphs[i1].morphKeys.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Morph Keys[" << i2 << "]: " << morphs[i1].morphKeys[i2] << endl; - }; - out << " Unknown Int: " << morphs[i1].unknownInt << endl; - for (uint i2 = 0; i2 < morphs[i1].vectors.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vectors[" << i2 << "]: " << morphs[i1].vectors[i2] << endl; - }; - }; - return out.str(); -} - -void NiMorphData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiMorphData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiMultiTargetTransformController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( numExtraTargets, in, version ); - extraTargets.resize(numExtraTargets); - for (uint i1 = 0; i1 < extraTargets.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiMultiTargetTransformController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - numExtraTargets = ushort(extraTargets.size()); - NifStream( numExtraTargets, out, version ); - for (uint i1 = 0; i1 < extraTargets.size(); i1++) { - if ( extraTargets[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(extraTargets[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiMultiTargetTransformController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - numExtraTargets = ushort(extraTargets.size()); - out << " Num Extra Targets: " << numExtraTargets << endl; - for (uint i1 = 0; i1 < extraTargets.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Extra Targets[" << i1 << "]: " << extraTargets[i1] << endl; - }; - return out.str(); -} - -void NiMultiTargetTransformController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < extraTargets.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - extraTargets[i1] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( extraTargets[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - extraTargets[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiMultiTargetTransformController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - for (uint i1 = 0; i1 < extraTargets.size(); i1++) { - }; - return refs; -} - -void NiNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiAVObject::Read( in, link_stack, version, user_version ); - NifStream( numChildren, in, version ); - children.resize(numChildren); - for (uint i1 = 0; i1 < children.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( numEffects, in, version ); - effects.resize(numEffects); - for (uint i1 = 0; i1 < effects.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiAVObject::Write( out, link_map, version, user_version ); - numEffects = uint(effects.size()); - numChildren = uint(children.size()); - NifStream( numChildren, out, version ); - for (uint i1 = 0; i1 < children.size(); i1++) { - if ( children[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(children[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( numEffects, out, version ); - for (uint i1 = 0; i1 < effects.size(); i1++) { - if ( effects[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(effects[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiAVObject::asString(); - numEffects = uint(effects.size()); - numChildren = uint(children.size()); - out << " Num Children: " << numChildren << endl; - for (uint i1 = 0; i1 < children.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Children[" << i1 << "]: " << children[i1] << endl; - }; - out << " Num Effects: " << numEffects << endl; - for (uint i1 = 0; i1 < effects.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Effects[" << i1 << "]: " << effects[i1] << endl; - }; - return out.str(); -} - -void NiNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiAVObject::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < children.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - children[i1] = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( children[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - children[i1] = NULL; - link_stack.pop_front(); - }; - for (uint i1 = 0; i1 < effects.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - effects[i1] = DynamicCast<NiDynamicEffect>(objects[link_stack.front()]); - if ( effects[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - effects[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiAVObject::GetRefs(); - for (uint i1 = 0; i1 < children.size(); i1++) { - if ( children[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(children[i1])); - }; - for (uint i1 = 0; i1 < effects.size(); i1++) { - if ( effects[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(effects[i1])); - }; - return refs; -} - -void AvoidNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::Read( in, link_stack, version, user_version ); -} - -void AvoidNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); -} - -std::string AvoidNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - return out.str(); -} - -void AvoidNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> AvoidNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - return refs; -} - -void FxWidget::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::Read( in, link_stack, version, user_version ); - NifStream( unknown1, in, version ); - for (uint i1 = 0; i1 < 292; i1++) { - NifStream( unknown292Bytes[i1], in, version ); - }; -} - -void FxWidget::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); - NifStream( unknown1, out, version ); - for (uint i1 = 0; i1 < 292; i1++) { - NifStream( unknown292Bytes[i1], out, version ); - }; -} - -std::string FxWidget::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - out << " Unknown1: " << unknown1 << endl; - for (uint i1 = 0; i1 < 292; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown 292 Bytes[" << i1 << "]: " << unknown292Bytes[i1] << endl; - }; - return out.str(); -} - -void FxWidget::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> FxWidget::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - return refs; -} - -void FxButton::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FxWidget::Read( in, link_stack, version, user_version ); -} - -void FxButton::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - FxWidget::Write( out, link_map, version, user_version ); -} - -std::string FxButton::InternalAsString( bool verbose ) const { - stringstream out; - out << FxWidget::asString(); - return out.str(); -} - -void FxButton::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FxWidget::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> FxButton::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = FxWidget::GetRefs(); - return refs; -} - -void FxRadioButton::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - FxWidget::Read( in, link_stack, version, user_version ); - NifStream( unknownInt1, in, version ); - NifStream( unknownInt2, in, version ); - NifStream( unknownInt3, in, version ); - NifStream( numUnknownLinks, in, version ); - unknownLinks.resize(numUnknownLinks); - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void FxRadioButton::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - FxWidget::Write( out, link_map, version, user_version ); - numUnknownLinks = uint(unknownLinks.size()); - NifStream( unknownInt1, out, version ); - NifStream( unknownInt2, out, version ); - NifStream( unknownInt3, out, version ); - NifStream( numUnknownLinks, out, version ); - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if ( unknownLinks[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLinks[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string FxRadioButton::InternalAsString( bool verbose ) const { - stringstream out; - out << FxWidget::asString(); - numUnknownLinks = uint(unknownLinks.size()); - out << " Unknown Int 1: " << unknownInt1 << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Unknown Int 3: " << unknownInt3 << endl; - out << " Num Unknown Links: " << numUnknownLinks << endl; - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Links[" << i1 << "]: " << unknownLinks[i1] << endl; - }; - return out.str(); -} - -void FxRadioButton::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FxWidget::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLinks[i1] = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLinks[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLinks[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> FxRadioButton::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = FxWidget::GetRefs(); - for (uint i1 = 0; i1 < unknownLinks.size(); i1++) { - if ( unknownLinks[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLinks[i1])); - }; - return refs; -} - -void NiBillboardNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( billboardMode, in, version ); - }; -} - -void NiBillboardNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( billboardMode, out, version ); - }; -} - -std::string NiBillboardNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - out << " Billboard Mode: " << billboardMode << endl; - return out.str(); -} - -void NiBillboardNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBillboardNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - return refs; -} - -void NiBSAnimationNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::Read( in, link_stack, version, user_version ); -} - -void NiBSAnimationNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); -} - -std::string NiBSAnimationNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - return out.str(); -} - -void NiBSAnimationNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSAnimationNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - return refs; -} - -void NiBSParticleNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::Read( in, link_stack, version, user_version ); -} - -void NiBSParticleNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); -} - -std::string NiBSParticleNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - return out.str(); -} - -void NiBSParticleNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSParticleNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - return refs; -} - -void NiLODNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiNode::Read( in, link_stack, version, user_version ); - NifStream( lodType, in, version ); - if ( (lodType == 0) ) { - NifStream( lodCenter, in, version ); - NifStream( numLodLevels, in, version ); - lodLevels.resize(numLodLevels); - for (uint i2 = 0; i2 < lodLevels.size(); i2++) { - NifStream( lodLevels[i2].nearExtent, in, version ); - NifStream( lodLevels[i2].farExtent, in, version ); - }; - }; - if ( (lodType == 1) ) { - NifStream( unknownShort, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiLODNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); - numLodLevels = uint(lodLevels.size()); - NifStream( lodType, out, version ); - if ( (lodType == 0) ) { - NifStream( lodCenter, out, version ); - NifStream( numLodLevels, out, version ); - for (uint i2 = 0; i2 < lodLevels.size(); i2++) { - NifStream( lodLevels[i2].nearExtent, out, version ); - NifStream( lodLevels[i2].farExtent, out, version ); - }; - }; - if ( (lodType == 1) ) { - NifStream( unknownShort, out, version ); - if ( rangeData != NULL ) - NifStream( link_map[StaticCast<NiObject>(rangeData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiLODNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - numLodLevels = uint(lodLevels.size()); - out << " LOD Type: " << lodType << endl; - if ( (lodType == 0) ) { - out << " LOD Center: " << lodCenter << endl; - out << " Num LOD Levels: " << numLodLevels << endl; - for (uint i2 = 0; i2 < lodLevels.size(); i2++) { - out << " Near Extent: " << lodLevels[i2].nearExtent << endl; - out << " Far Extent: " << lodLevels[i2].farExtent << endl; - }; - }; - if ( (lodType == 1) ) { - out << " Unknown Short: " << unknownShort << endl; - out << " Range Data: " << rangeData << endl; - }; - return out.str(); -} - -void NiLODNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); - if ( (lodType == 1) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - rangeData = DynamicCast<NiRangeLODData>(objects[link_stack.front()]); - if ( rangeData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - rangeData = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiLODNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - if ( rangeData != NULL ) - refs.push_back(StaticCast<NiObject>(rangeData)); - return refs; -} - -void NiPalette::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( unknownByte, in, version ); - NifStream( numEntries_, in, version ); - for (uint i1 = 0; i1 < 256; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( palette[i1][i2], in, version ); - }; - }; -} - -void NiPalette::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - NifStream( unknownByte, out, version ); - NifStream( numEntries_, out, version ); - for (uint i1 = 0; i1 < 256; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( palette[i1][i2], out, version ); - }; - }; -} - -std::string NiPalette::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Unknown Byte: " << unknownByte << endl; - out << " Num Entries?: " << numEntries_ << endl; - for (uint i1 = 0; i1 < 256; i1++) { - for (uint i2 = 0; i2 < 4; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Palette[" << i1 << "][" << i2 << "]: " << palette[i1][i2] << endl; - }; - }; - return out.str(); -} - -void NiPalette::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPalette::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiParticleBomb::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); - NifStream( unknownFloat3, in, version ); - NifStream( unknownFloat4, in, version ); - NifStream( unknownInt1, in, version ); - NifStream( unknownInt2, in, version ); - NifStream( unknownFloat5, in, version ); - NifStream( unknownFloat6, in, version ); - NifStream( unknownFloat7, in, version ); - NifStream( unknownFloat8, in, version ); - NifStream( unknownFloat9, in, version ); - NifStream( unknownFloat10, in, version ); -} - -void NiParticleBomb::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); - NifStream( unknownFloat3, out, version ); - NifStream( unknownFloat4, out, version ); - NifStream( unknownInt1, out, version ); - NifStream( unknownInt2, out, version ); - NifStream( unknownFloat5, out, version ); - NifStream( unknownFloat6, out, version ); - NifStream( unknownFloat7, out, version ); - NifStream( unknownFloat8, out, version ); - NifStream( unknownFloat9, out, version ); - NifStream( unknownFloat10, out, version ); -} - -std::string NiParticleBomb::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Float 3: " << unknownFloat3 << endl; - out << " Unknown Float 4: " << unknownFloat4 << endl; - out << " Unknown Int 1: " << unknownInt1 << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Unknown Float 5: " << unknownFloat5 << endl; - out << " Unknown Float 6: " << unknownFloat6 << endl; - out << " Unknown Float 7: " << unknownFloat7 << endl; - out << " Unknown Float 8: " << unknownFloat8 << endl; - out << " Unknown Float 9: " << unknownFloat9 << endl; - out << " Unknown Float 10: " << unknownFloat10 << endl; - return out.str(); -} - -void NiParticleBomb::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiParticleBomb::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - return refs; -} - -void NiParticleColorModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiParticleColorModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - if ( colorData != NULL ) - NifStream( link_map[StaticCast<NiObject>(colorData)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiParticleColorModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Color Data: " << colorData << endl; - return out.str(); -} - -void NiParticleColorModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - colorData = DynamicCast<NiColorData>(objects[link_stack.front()]); - if ( colorData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - colorData = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiParticleColorModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - if ( colorData != NULL ) - refs.push_back(StaticCast<NiObject>(colorData)); - return refs; -} - -void NiParticleGrowFade::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( grow, in, version ); - NifStream( fade, in, version ); -} - -void NiParticleGrowFade::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - NifStream( grow, out, version ); - NifStream( fade, out, version ); -} - -std::string NiParticleGrowFade::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Grow: " << grow << endl; - out << " Fade: " << fade << endl; - return out.str(); -} - -void NiParticleGrowFade::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiParticleGrowFade::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - return refs; -} - -void NiParticleMeshModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( numParticleMeshes, in, version ); - particleMeshes.resize(numParticleMeshes); - for (uint i1 = 0; i1 < particleMeshes.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiParticleMeshModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - numParticleMeshes = uint(particleMeshes.size()); - NifStream( numParticleMeshes, out, version ); - for (uint i1 = 0; i1 < particleMeshes.size(); i1++) { - if ( particleMeshes[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(particleMeshes[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiParticleMeshModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - numParticleMeshes = uint(particleMeshes.size()); - out << " Num Particle Meshes: " << numParticleMeshes << endl; - for (uint i1 = 0; i1 < particleMeshes.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Particle Meshes[" << i1 << "]: " << particleMeshes[i1] << endl; - }; - return out.str(); -} - -void NiParticleMeshModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < particleMeshes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - particleMeshes[i1] = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( particleMeshes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - particleMeshes[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiParticleMeshModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - for (uint i1 = 0; i1 < particleMeshes.size(); i1++) { - if ( particleMeshes[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(particleMeshes[i1])); - }; - return refs; -} - -void NiParticleRotation::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( unknownByte, in, version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); - NifStream( unknownFloat3, in, version ); - NifStream( unknownFloat4, in, version ); -} - -void NiParticleRotation::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - NifStream( unknownByte, out, version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); - NifStream( unknownFloat3, out, version ); - NifStream( unknownFloat4, out, version ); -} - -std::string NiParticleRotation::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Unknown Byte: " << unknownByte << endl; - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Float 3: " << unknownFloat3 << endl; - out << " Unknown Float 4: " << unknownFloat4 << endl; - return out.str(); -} - -void NiParticleRotation::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiParticleRotation::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - return refs; -} - -void NiParticles::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeom::Read( in, link_stack, version, user_version ); -} - -void NiParticles::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeom::Write( out, link_map, version, user_version ); -} - -std::string NiParticles::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeom::asString(); - return out.str(); -} - -void NiParticles::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiParticles::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeom::GetRefs(); - return refs; -} - -void NiAutoNormalParticles::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::Read( in, link_stack, version, user_version ); -} - -void NiAutoNormalParticles::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticles::Write( out, link_map, version, user_version ); -} - -std::string NiAutoNormalParticles::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticles::asString(); - return out.str(); -} - -void NiAutoNormalParticles::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiAutoNormalParticles::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticles::GetRefs(); - return refs; -} - -void NiParticleMeshes::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::Read( in, link_stack, version, user_version ); -} - -void NiParticleMeshes::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticles::Write( out, link_map, version, user_version ); -} - -std::string NiParticleMeshes::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticles::asString(); - return out.str(); -} - -void NiParticleMeshes::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiParticleMeshes::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticles::GetRefs(); - return refs; -} - -void NiParticlesData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiAutoNormalParticlesData::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( numActive, in, version ); - NifStream( hasUnknownFloats, in, version ); - if ( (hasUnknownFloats != 0) ) { - unknownFloats.resize(numVertices); - for (uint i3 = 0; i3 < unknownFloats.size(); i3++) { - NifStream( unknownFloats[i3], in, version ); - }; - }; - }; - NifStream( hasRotations, in, version ); - if ( (hasRotations != 0) ) { - rotations.resize(numVertices); - for (uint i2 = 0; i2 < rotations.size(); i2++) { - NifStream( rotations[i2], in, version ); - }; - }; -} - -void NiParticlesData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiAutoNormalParticlesData::Write( out, link_map, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( numActive, out, version ); - NifStream( hasUnknownFloats, out, version ); - if ( (hasUnknownFloats != 0) ) { - for (uint i3 = 0; i3 < unknownFloats.size(); i3++) { - NifStream( unknownFloats[i3], out, version ); - }; - }; - }; - NifStream( hasRotations, out, version ); - if ( (hasRotations != 0) ) { - for (uint i2 = 0; i2 < rotations.size(); i2++) { - NifStream( rotations[i2], out, version ); - }; - }; -} - -std::string NiParticlesData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiAutoNormalParticlesData::asString(); - out << " Num Active: " << numActive << endl; - out << " Has Unknown Floats: " << hasUnknownFloats << endl; - if ( (hasUnknownFloats != 0) ) { - for (uint i2 = 0; i2 < unknownFloats.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i2 << "]: " << unknownFloats[i2] << endl; - }; - }; - out << " Has Rotations: " << hasRotations << endl; - if ( (hasRotations != 0) ) { - for (uint i2 = 0; i2 < rotations.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Rotations[" << i2 << "]: " << rotations[i2] << endl; - }; - }; - return out.str(); -} - -void NiParticlesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiAutoNormalParticlesData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiParticlesData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiAutoNormalParticlesData::GetRefs(); - return refs; -} - -void NiParticleMeshesData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiParticlesData::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiParticleMeshesData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticlesData::Write( out, link_map, version, user_version ); - if ( unknownLink2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink2)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiParticleMeshesData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticlesData::asString(); - out << " Unknown Link 2: " << unknownLink2 << endl; - return out.str(); -} - -void NiParticleMeshesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticlesData::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiAVObject>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiParticleMeshesData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticlesData::GetRefs(); - if ( unknownLink2 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink2)); - return refs; -} - -void NiParticleSystem::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiParticles::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownBool, in, version ); - NifStream( numModifiers, in, version ); - modifiers.resize(numModifiers); - for (uint i2 = 0; i2 < modifiers.size(); i2++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; -} - -void NiParticleSystem::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticles::Write( out, link_map, version, user_version ); - numModifiers = uint(modifiers.size()); - if ( version >= 0x0A010000 ) { - NifStream( unknownBool, out, version ); - NifStream( numModifiers, out, version ); - for (uint i2 = 0; i2 < modifiers.size(); i2++) { - if ( modifiers[i2] != NULL ) - NifStream( link_map[StaticCast<NiObject>(modifiers[i2])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; -} - -std::string NiParticleSystem::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticles::asString(); - numModifiers = uint(modifiers.size()); - out << " Unknown Bool: " << unknownBool << endl; - out << " Num Modifiers: " << numModifiers << endl; - for (uint i1 = 0; i1 < modifiers.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Modifiers[" << i1 << "]: " << modifiers[i1] << endl; - }; - return out.str(); -} - -void NiParticleSystem::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - for (uint i2 = 0; i2 < modifiers.size(); i2++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - modifiers[i2] = DynamicCast<NiPSysModifier>(objects[link_stack.front()]); - if ( modifiers[i2] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - modifiers[i2] = NULL; - link_stack.pop_front(); - }; - }; -} - -std::list<NiObjectRef> NiParticleSystem::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticles::GetRefs(); - for (uint i1 = 0; i1 < modifiers.size(); i1++) { - if ( modifiers[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(modifiers[i1])); - }; - return refs; -} - -void NiMeshParticleSystem::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticleSystem::Read( in, link_stack, version, user_version ); -} - -void NiMeshParticleSystem::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticleSystem::Write( out, link_map, version, user_version ); -} - -std::string NiMeshParticleSystem::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticleSystem::asString(); - return out.str(); -} - -void NiMeshParticleSystem::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticleSystem::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiMeshParticleSystem::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticleSystem::GetRefs(); - return refs; -} - -void NiParticleSystemController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( speed, in, version ); - NifStream( speedRandom, in, version ); - NifStream( verticalDirection, in, version ); - NifStream( verticalAngle, in, version ); - NifStream( horizontalDirection, in, version ); - NifStream( horizontalAngle, in, version ); - NifStream( unknownFloat5, in, version ); - NifStream( unknownFloat6, in, version ); - NifStream( unknownFloat7, in, version ); - NifStream( unknownFloat8, in, version ); - NifStream( unknownFloat9, in, version ); - NifStream( unknownFloat10, in, version ); - NifStream( unknownFloat11, in, version ); - NifStream( size, in, version ); - NifStream( emitStartTime, in, version ); - NifStream( emitStopTime, in, version ); - NifStream( unknownByte, in, version ); - NifStream( emitRate, in, version ); - NifStream( lifetime, in, version ); - NifStream( lifetimeRandom, in, version ); - NifStream( emitFlags, in, version ); - NifStream( startRandom, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( unknownShort2_, in, version ); - NifStream( unknownFloat13_, in, version ); - NifStream( unknownInt1_, in, version ); - NifStream( unknownInt2_, in, version ); - NifStream( unknownShort3_, in, version ); - NifStream( numParticles, in, version ); - NifStream( numValid, in, version ); - particles.resize(numParticles); - for (uint i1 = 0; i1 < particles.size(); i1++) { - NifStream( particles[i1].velocity, in, version ); - NifStream( particles[i1].unknownVector, in, version ); - NifStream( particles[i1].lifetime, in, version ); - NifStream( particles[i1].lifespan, in, version ); - NifStream( particles[i1].timestamp, in, version ); - NifStream( particles[i1].unknownShort, in, version ); - NifStream( particles[i1].vertexId, in, version ); - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( trailer, in, version ); -} - -void NiParticleSystemController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - numParticles = ushort(particles.size()); - NifStream( speed, out, version ); - NifStream( speedRandom, out, version ); - NifStream( verticalDirection, out, version ); - NifStream( verticalAngle, out, version ); - NifStream( horizontalDirection, out, version ); - NifStream( horizontalAngle, out, version ); - NifStream( unknownFloat5, out, version ); - NifStream( unknownFloat6, out, version ); - NifStream( unknownFloat7, out, version ); - NifStream( unknownFloat8, out, version ); - NifStream( unknownFloat9, out, version ); - NifStream( unknownFloat10, out, version ); - NifStream( unknownFloat11, out, version ); - NifStream( size, out, version ); - NifStream( emitStartTime, out, version ); - NifStream( emitStopTime, out, version ); - NifStream( unknownByte, out, version ); - NifStream( emitRate, out, version ); - NifStream( lifetime, out, version ); - NifStream( lifetimeRandom, out, version ); - NifStream( emitFlags, out, version ); - NifStream( startRandom, out, version ); - if ( emitter != NULL ) - NifStream( link_map[StaticCast<NiObject>(emitter)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( unknownShort2_, out, version ); - NifStream( unknownFloat13_, out, version ); - NifStream( unknownInt1_, out, version ); - NifStream( unknownInt2_, out, version ); - NifStream( unknownShort3_, out, version ); - NifStream( numParticles, out, version ); - NifStream( numValid, out, version ); - for (uint i1 = 0; i1 < particles.size(); i1++) { - NifStream( particles[i1].velocity, out, version ); - NifStream( particles[i1].unknownVector, out, version ); - NifStream( particles[i1].lifetime, out, version ); - NifStream( particles[i1].lifespan, out, version ); - NifStream( particles[i1].timestamp, out, version ); - NifStream( particles[i1].unknownShort, out, version ); - NifStream( particles[i1].vertexId, out, version ); - }; - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( particleExtra != NULL ) - NifStream( link_map[StaticCast<NiObject>(particleExtra)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( unknownLink2 != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink2)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( trailer, out, version ); -} - -std::string NiParticleSystemController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - numParticles = ushort(particles.size()); - out << " Speed: " << speed << endl; - out << " Speed Random: " << speedRandom << endl; - out << " Vertical Direction: " << verticalDirection << endl; - out << " Vertical Angle: " << verticalAngle << endl; - out << " Horizontal Direction: " << horizontalDirection << endl; - out << " Horizontal Angle: " << horizontalAngle << endl; - out << " Unknown Float 5: " << unknownFloat5 << endl; - out << " Unknown Float 6: " << unknownFloat6 << endl; - out << " Unknown Float 7: " << unknownFloat7 << endl; - out << " Unknown Float 8: " << unknownFloat8 << endl; - out << " Unknown Float 9: " << unknownFloat9 << endl; - out << " Unknown Float 10: " << unknownFloat10 << endl; - out << " Unknown Float 11: " << unknownFloat11 << endl; - out << " Size: " << size << endl; - out << " Emit Start Time: " << emitStartTime << endl; - out << " Emit Stop Time: " << emitStopTime << endl; - out << " Unknown Byte: " << unknownByte << endl; - out << " Emit Rate: " << emitRate << endl; - out << " Lifetime: " << lifetime << endl; - out << " Lifetime Random: " << lifetimeRandom << endl; - out << " Emit Flags: " << emitFlags << endl; - out << " Start Random: " << startRandom << endl; - out << " Emitter: " << emitter << endl; - out << " Unknown Short 2?: " << unknownShort2_ << endl; - out << " Unknown Float 13?: " << unknownFloat13_ << endl; - out << " Unknown Int 1?: " << unknownInt1_ << endl; - out << " Unknown Int 2?: " << unknownInt2_ << endl; - out << " Unknown Short 3?: " << unknownShort3_ << endl; - out << " Num Particles: " << numParticles << endl; - out << " Num Valid: " << numValid << endl; - for (uint i1 = 0; i1 < particles.size(); i1++) { - out << " Velocity: " << particles[i1].velocity << endl; - out << " Unknown Vector: " << particles[i1].unknownVector << endl; - out << " Lifetime: " << particles[i1].lifetime << endl; - out << " Lifespan: " << particles[i1].lifespan << endl; - out << " Timestamp: " << particles[i1].timestamp << endl; - out << " Unknown Short: " << particles[i1].unknownShort << endl; - out << " Vertex ID: " << particles[i1].vertexId << endl; - }; - out << " Unknown Link: " << unknownLink << endl; - out << " Particle Extra: " << particleExtra << endl; - out << " Unknown Link 2: " << unknownLink2 << endl; - out << " Trailer: " << trailer << endl; - return out.str(); -} - -void NiParticleSystemController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - emitter = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( emitter == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - emitter = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - particleExtra = DynamicCast<AParticleModifier>(objects[link_stack.front()]); - if ( particleExtra == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - particleExtra = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink2 = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink2 == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink2 = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiParticleSystemController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( emitter != NULL ) - refs.push_back(StaticCast<NiObject>(emitter)); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - if ( particleExtra != NULL ) - refs.push_back(StaticCast<NiObject>(particleExtra)); - if ( unknownLink2 != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink2)); - return refs; -} - -void NiBSPArrayController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticleSystemController::Read( in, link_stack, version, user_version ); -} - -void NiBSPArrayController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticleSystemController::Write( out, link_map, version, user_version ); -} - -std::string NiBSPArrayController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticleSystemController::asString(); - return out.str(); -} - -void NiBSPArrayController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticleSystemController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiBSPArrayController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticleSystemController::GetRefs(); - return refs; -} - -void NiPathController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownShort2, in, version ); - }; - NifStream( unknownInt1, in, version ); - NifStream( unknownInt2, in, version ); - NifStream( unknownInt3, in, version ); - NifStream( unknownShort, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiPathController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - if ( version >= 0x0A010000 ) { - NifStream( unknownShort2, out, version ); - }; - NifStream( unknownInt1, out, version ); - NifStream( unknownInt2, out, version ); - NifStream( unknownInt3, out, version ); - NifStream( unknownShort, out, version ); - if ( posData != NULL ) - NifStream( link_map[StaticCast<NiObject>(posData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( floatData != NULL ) - NifStream( link_map[StaticCast<NiObject>(floatData)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiPathController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown Short 2: " << unknownShort2 << endl; - out << " Unknown Int 1: " << unknownInt1 << endl; - out << " Unknown Int 2: " << unknownInt2 << endl; - out << " Unknown Int 3: " << unknownInt3 << endl; - out << " Unknown Short: " << unknownShort << endl; - out << " Pos Data: " << posData << endl; - out << " Float Data: " << floatData << endl; - return out.str(); -} - -void NiPathController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - posData = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( posData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - posData = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - floatData = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( floatData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - floatData = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPathController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( posData != NULL ) - refs.push_back(StaticCast<NiObject>(posData)); - if ( floatData != NULL ) - refs.push_back(StaticCast<NiObject>(floatData)); - return refs; -} - -void NiPathInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiBlendInterpolator::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); - NifStream( unknownShort2, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiPathInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiBlendInterpolator::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); - NifStream( unknownShort2, out, version ); - if ( posData != NULL ) - NifStream( link_map[StaticCast<NiObject>(posData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( floatData != NULL ) - NifStream( link_map[StaticCast<NiObject>(floatData)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiPathInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiBlendInterpolator::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Short 2: " << unknownShort2 << endl; - out << " Pos Data: " << posData << endl; - out << " Float Data: " << floatData << endl; - return out.str(); -} - -void NiPathInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiBlendInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - posData = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( posData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - posData = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - floatData = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( floatData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - floatData = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPathInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiBlendInterpolator::GetRefs(); - if ( posData != NULL ) - refs.push_back(StaticCast<NiObject>(posData)); - if ( floatData != NULL ) - refs.push_back(StaticCast<NiObject>(floatData)); - return refs; -} - -void NiPixelData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( pixelFormat, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( redMask, in, version ); - NifStream( greenMask, in, version ); - NifStream( blueMask, in, version ); - NifStream( alphaMask, in, version ); - NifStream( bitsPerPixel, in, version ); - for (uint i2 = 0; i2 < 8; i2++) { - NifStream( unknown8Bytes[i2], in, version ); - }; - }; - if ( ( version >= 0x0A010000 ) && ( version <= 0x0A020000 ) ) { - NifStream( unknownInt, in, version ); - }; - if ( version >= 0x14000004 ) { - for (uint i2 = 0; i2 < 54; i2++) { - NifStream( unknown54Bytes[i2], in, version ); - }; - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( numMipmaps, in, version ); - NifStream( bytesPerPixel, in, version ); - mipmaps.resize(numMipmaps); - for (uint i1 = 0; i1 < mipmaps.size(); i1++) { - NifStream( mipmaps[i1].width, in, version ); - NifStream( mipmaps[i1].height, in, version ); - NifStream( mipmaps[i1].offset, in, version ); - }; - NifStream( pixelData.dataSize, in, version ); - pixelData.data.resize(pixelData.dataSize); - for (uint i1 = 0; i1 < pixelData.data.size(); i1++) { - NifStream( pixelData.data[i1], in, version ); - }; - if ( version >= 0x14000004 ) { - NifStream( unknownInt2, in, version ); - }; -} - -void NiPixelData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numMipmaps = uint(mipmaps.size()); - NifStream( pixelFormat, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( redMask, out, version ); - NifStream( greenMask, out, version ); - NifStream( blueMask, out, version ); - NifStream( alphaMask, out, version ); - NifStream( bitsPerPixel, out, version ); - for (uint i2 = 0; i2 < 8; i2++) { - NifStream( unknown8Bytes[i2], out, version ); - }; - }; - if ( ( version >= 0x0A010000 ) && ( version <= 0x0A020000 ) ) { - NifStream( unknownInt, out, version ); - }; - if ( version >= 0x14000004 ) { - for (uint i2 = 0; i2 < 54; i2++) { - NifStream( unknown54Bytes[i2], out, version ); - }; - }; - if ( palette != NULL ) - NifStream( link_map[StaticCast<NiObject>(palette)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( numMipmaps, out, version ); - NifStream( bytesPerPixel, out, version ); - for (uint i1 = 0; i1 < mipmaps.size(); i1++) { - NifStream( mipmaps[i1].width, out, version ); - NifStream( mipmaps[i1].height, out, version ); - NifStream( mipmaps[i1].offset, out, version ); - }; - pixelData.dataSize = uint(pixelData.data.size()); - NifStream( pixelData.dataSize, out, version ); - for (uint i1 = 0; i1 < pixelData.data.size(); i1++) { - NifStream( pixelData.data[i1], out, version ); - }; - if ( version >= 0x14000004 ) { - NifStream( unknownInt2, out, version ); - }; -} - -std::string NiPixelData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numMipmaps = uint(mipmaps.size()); - out << " Pixel Format: " << pixelFormat << endl; - out << " Red Mask: " << redMask << endl; - out << " Green Mask: " << greenMask << endl; - out << " Blue Mask: " << blueMask << endl; - out << " Alpha Mask: " << alphaMask << endl; - out << " Bits Per Pixel: " << bitsPerPixel << endl; - for (uint i1 = 0; i1 < 8; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown 8 Bytes[" << i1 << "]: " << unknown8Bytes[i1] << endl; - }; - out << " Unknown Int: " << unknownInt << endl; - for (uint i1 = 0; i1 < 54; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown 54 Bytes[" << i1 << "]: " << unknown54Bytes[i1] << endl; - }; - out << " Palette: " << palette << endl; - out << " Num Mipmaps: " << numMipmaps << endl; - out << " Bytes Per Pixel: " << bytesPerPixel << endl; - for (uint i1 = 0; i1 < mipmaps.size(); i1++) { - out << " Width: " << mipmaps[i1].width << endl; - out << " Height: " << mipmaps[i1].height << endl; - out << " Offset: " << mipmaps[i1].offset << endl; - }; - pixelData.dataSize = uint(pixelData.data.size()); - out << " Data Size: " << pixelData.dataSize << endl; - for (uint i1 = 0; i1 < pixelData.data.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Data[" << i1 << "]: " << pixelData.data[i1] << endl; - }; - out << " Unknown Int 2: " << unknownInt2 << endl; - return out.str(); -} - -void NiPixelData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - palette = DynamicCast<NiPalette>(objects[link_stack.front()]); - if ( palette == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - palette = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPixelData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( palette != NULL ) - refs.push_back(StaticCast<NiObject>(palette)); - return refs; -} - -void NiPlanarCollider::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::Read( in, link_stack, version, user_version ); - if ( version >= 0x0A000100 ) { - NifStream( unknownShort, in, version ); - }; - NifStream( unknownFloat1, in, version ); - NifStream( unknownFloat2, in, version ); - if ( ( version >= 0x04020200 ) && ( version <= 0x04020200 ) ) { - NifStream( unknownShort2, in, version ); - }; - NifStream( unknownFloat3, in, version ); - NifStream( unknownFloat4, in, version ); - NifStream( unknownFloat5, in, version ); - NifStream( unknownFloat6, in, version ); - NifStream( unknownFloat7, in, version ); - NifStream( unknownFloat8, in, version ); - NifStream( unknownFloat9, in, version ); - NifStream( unknownFloat10, in, version ); - NifStream( unknownFloat11, in, version ); - NifStream( unknownFloat12, in, version ); - NifStream( unknownFloat13, in, version ); - NifStream( unknownFloat14, in, version ); - NifStream( unknownFloat15, in, version ); - NifStream( unknownFloat16, in, version ); -} - -void NiPlanarCollider::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - if ( version >= 0x0A000100 ) { - NifStream( unknownShort, out, version ); - }; - NifStream( unknownFloat1, out, version ); - NifStream( unknownFloat2, out, version ); - if ( ( version >= 0x04020200 ) && ( version <= 0x04020200 ) ) { - NifStream( unknownShort2, out, version ); - }; - NifStream( unknownFloat3, out, version ); - NifStream( unknownFloat4, out, version ); - NifStream( unknownFloat5, out, version ); - NifStream( unknownFloat6, out, version ); - NifStream( unknownFloat7, out, version ); - NifStream( unknownFloat8, out, version ); - NifStream( unknownFloat9, out, version ); - NifStream( unknownFloat10, out, version ); - NifStream( unknownFloat11, out, version ); - NifStream( unknownFloat12, out, version ); - NifStream( unknownFloat13, out, version ); - NifStream( unknownFloat14, out, version ); - NifStream( unknownFloat15, out, version ); - NifStream( unknownFloat16, out, version ); -} - -std::string NiPlanarCollider::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Unknown Short: " << unknownShort << endl; - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Short 2: " << unknownShort2 << endl; - out << " Unknown Float 3: " << unknownFloat3 << endl; - out << " Unknown Float 4: " << unknownFloat4 << endl; - out << " Unknown Float 5: " << unknownFloat5 << endl; - out << " Unknown Float 6: " << unknownFloat6 << endl; - out << " Unknown Float 7: " << unknownFloat7 << endl; - out << " Unknown Float 8: " << unknownFloat8 << endl; - out << " Unknown Float 9: " << unknownFloat9 << endl; - out << " Unknown Float 10: " << unknownFloat10 << endl; - out << " Unknown Float 11: " << unknownFloat11 << endl; - out << " Unknown Float 12: " << unknownFloat12 << endl; - out << " Unknown Float 13: " << unknownFloat13 << endl; - out << " Unknown Float 14: " << unknownFloat14 << endl; - out << " Unknown Float 15: " << unknownFloat15 << endl; - out << " Unknown Float 16: " << unknownFloat16 << endl; - return out.str(); -} - -void NiPlanarCollider::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPlanarCollider::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - return refs; -} - -void NiPoint3Interpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( point3Value, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiPoint3Interpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( point3Value, out, version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiPoint3Interpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Point 3 Value: " << point3Value << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiPoint3Interpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPosData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPoint3Interpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiPointLight::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiLight::Read( in, link_stack, version, user_version ); - NifStream( constantAttenuation, in, version ); - NifStream( linearAttenuation, in, version ); - NifStream( quadraticAttenuation, in, version ); -} - -void NiPointLight::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiLight::Write( out, link_map, version, user_version ); - NifStream( constantAttenuation, out, version ); - NifStream( linearAttenuation, out, version ); - NifStream( quadraticAttenuation, out, version ); -} - -std::string NiPointLight::InternalAsString( bool verbose ) const { - stringstream out; - out << NiLight::asString(); - out << " Constant Attenuation: " << constantAttenuation << endl; - out << " Linear Attenuation: " << linearAttenuation << endl; - out << " Quadratic Attenuation: " << quadraticAttenuation << endl; - return out.str(); -} - -void NiPointLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiLight::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPointLight::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiLight::GetRefs(); - return refs; -} - -void NiPosData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::Read( in, link_stack, version, user_version ); - NifStream( data.numKeys, in, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, in, version ); - }; - data.keys.resize(data.numKeys); - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], in, version, data.interpolation ); - }; -} - -void NiPosData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AKeyedData::Write( out, link_map, version, user_version ); - data.numKeys = uint(data.keys.size()); - NifStream( data.numKeys, out, version ); - if ( (data.numKeys != 0) ) { - NifStream( data.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - NifStream( data.keys[i1], out, version, data.interpolation ); - }; -} - -std::string NiPosData::InternalAsString( bool verbose ) const { - stringstream out; - out << AKeyedData::asString(); - data.numKeys = uint(data.keys.size()); - out << " Num Keys: " << data.numKeys << endl; - if ( (data.numKeys != 0) ) { - out << " Interpolation: " << data.interpolation << endl; - }; - for (uint i1 = 0; i1 < data.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << data.keys[i1] << endl; - }; - return out.str(); -} - -void NiPosData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPosData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AKeyedData::GetRefs(); - return refs; -} - -void NiPSysAgeDeathModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( spawnOnDeath, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiPSysAgeDeathModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( spawnOnDeath, out, version ); - if ( spawnModifier != NULL ) - NifStream( link_map[StaticCast<NiObject>(spawnModifier)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiPSysAgeDeathModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Spawn on Death: " << spawnOnDeath << endl; - out << " Spawn Modifier: " << spawnModifier << endl; - return out.str(); -} - -void NiPSysAgeDeathModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - spawnModifier = DynamicCast<NiPSysSpawnModifier>(objects[link_stack.front()]); - if ( spawnModifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - spawnModifier = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysAgeDeathModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - if ( spawnModifier != NULL ) - refs.push_back(StaticCast<NiObject>(spawnModifier)); - return refs; -} - -void NiPSysBombModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - for (uint i1 = 0; i1 < 2; i1++) { - NifStream( unknownInts1[i1], in, version ); - }; - for (uint i1 = 0; i1 < 3; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; - for (uint i1 = 0; i1 < 2; i1++) { - NifStream( unknownInts2[i1], in, version ); - }; -} - -void NiPSysBombModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - for (uint i1 = 0; i1 < 2; i1++) { - NifStream( unknownInts1[i1], out, version ); - }; - for (uint i1 = 0; i1 < 3; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; - for (uint i1 = 0; i1 < 2; i1++) { - NifStream( unknownInts2[i1], out, version ); - }; -} - -std::string NiPSysBombModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Unknown Link: " << unknownLink << endl; - for (uint i1 = 0; i1 < 2; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Ints 1[" << i1 << "]: " << unknownInts1[i1] << endl; - }; - for (uint i1 = 0; i1 < 3; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - for (uint i1 = 0; i1 < 2; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Ints 2[" << i1 << "]: " << unknownInts2[i1] << endl; - }; - return out.str(); -} - -void NiPSysBombModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysBombModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysBoundUpdateModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( updateSkip, in, version ); -} - -void NiPSysBoundUpdateModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( updateSkip, out, version ); -} - -std::string NiPSysBoundUpdateModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Update Skip: " << updateSkip << endl; - return out.str(); -} - -void NiPSysBoundUpdateModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysBoundUpdateModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysBoxEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::Read( in, link_stack, version, user_version ); - NifStream( width, in, version ); - NifStream( height, in, version ); - NifStream( depth, in, version ); -} - -void NiPSysBoxEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysVolumeEmitter::Write( out, link_map, version, user_version ); - NifStream( width, out, version ); - NifStream( height, out, version ); - NifStream( depth, out, version ); -} - -std::string NiPSysBoxEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysVolumeEmitter::asString(); - out << " Width: " << width << endl; - out << " Height: " << height << endl; - out << " Depth: " << depth << endl; - return out.str(); -} - -void NiPSysBoxEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysBoxEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysVolumeEmitter::GetRefs(); - return refs; -} - -void NiPSysColliderManager::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiPSysColliderManager::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - if ( collider != NULL ) - NifStream( link_map[StaticCast<NiObject>(collider)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiPSysColliderManager::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Collider: " << collider << endl; - return out.str(); -} - -void NiPSysColliderManager::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - collider = DynamicCast<NiPSysPlanarCollider>(objects[link_stack.front()]); - if ( collider == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - collider = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysColliderManager::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - if ( collider != NULL ) - refs.push_back(StaticCast<NiObject>(collider)); - return refs; -} - -void NiPSysColorModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiPSysColorModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiPSysColorModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Data: " << data << endl; - return out.str(); -} - -void NiPSysColorModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiColorData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysColorModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiPSysCylinderEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::Read( in, link_stack, version, user_version ); - NifStream( radius, in, version ); - NifStream( height, in, version ); -} - -void NiPSysCylinderEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysVolumeEmitter::Write( out, link_map, version, user_version ); - NifStream( radius, out, version ); - NifStream( height, out, version ); -} - -std::string NiPSysCylinderEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysVolumeEmitter::asString(); - out << " Radius: " << radius << endl; - out << " Height: " << height << endl; - return out.str(); -} - -void NiPSysCylinderEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysCylinderEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysVolumeEmitter::GetRefs(); - return refs; -} - -void NiPSysData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysData::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A020000 ) { - unknownFloats4.resize(numVertices); - for (uint i2 = 0; i2 < unknownFloats4.size(); i2++) { - for (uint i3 = 0; i3 < 10; i3++) { - NifStream( unknownFloats4[i2][i3], in, version ); - }; - }; - }; - if ( version >= 0x14000004 ) { - NifStream( unknownBool1, in, version ); - if ( (unknownBool1 != 0) ) { - unknownBytes.resize(numVertices); - for (uint i3 = 0; i3 < unknownBytes.size(); i3++) { - for (uint i4 = 0; i4 < 32; i4++) { - NifStream( unknownBytes[i3][i4], in, version ); - }; - }; - }; - if ( (unknownBool1 == 0) ) { - unknownBytesAlt.resize(numVertices); - for (uint i3 = 0; i3 < unknownBytesAlt.size(); i3++) { - for (uint i4 = 0; i4 < 28; i4++) { - NifStream( unknownBytesAlt[i3][i4], in, version ); - }; - }; - }; - NifStream( unknownByte3, in, version ); - NifStream( unknownBool2, in, version ); - if ( (unknownBool2 != 0) ) { - unknownBytes2.resize(numVertices); - for (uint i3 = 0; i3 < unknownBytes2.size(); i3++) { - for (uint i4 = 0; i4 < 4; i4++) { - NifStream( unknownBytes2[i3][i4], in, version ); - }; - }; - }; - }; - NifStream( unknownInt1, in, version ); -} - -void NiPSysData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysData::Write( out, link_map, version, user_version ); - if ( version <= 0x0A020000 ) { - for (uint i2 = 0; i2 < unknownFloats4.size(); i2++) { - for (uint i3 = 0; i3 < 10; i3++) { - NifStream( unknownFloats4[i2][i3], out, version ); - }; - }; - }; - if ( version >= 0x14000004 ) { - NifStream( unknownBool1, out, version ); - if ( (unknownBool1 != 0) ) { - for (uint i3 = 0; i3 < unknownBytes.size(); i3++) { - for (uint i4 = 0; i4 < 32; i4++) { - NifStream( unknownBytes[i3][i4], out, version ); - }; - }; - }; - if ( (unknownBool1 == 0) ) { - for (uint i3 = 0; i3 < unknownBytesAlt.size(); i3++) { - for (uint i4 = 0; i4 < 28; i4++) { - NifStream( unknownBytesAlt[i3][i4], out, version ); - }; - }; - }; - NifStream( unknownByte3, out, version ); - NifStream( unknownBool2, out, version ); - if ( (unknownBool2 != 0) ) { - for (uint i3 = 0; i3 < unknownBytes2.size(); i3++) { - for (uint i4 = 0; i4 < 4; i4++) { - NifStream( unknownBytes2[i3][i4], out, version ); - }; - }; - }; - }; - NifStream( unknownInt1, out, version ); -} - -std::string NiPSysData::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysData::asString(); - for (uint i1 = 0; i1 < unknownFloats4.size(); i1++) { - for (uint i2 = 0; i2 < 10; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 4[" << i1 << "][" << i2 << "]: " << unknownFloats4[i1][i2] << endl; - }; - }; - out << " Unknown Bool 1: " << unknownBool1 << endl; - if ( (unknownBool1 != 0) ) { - for (uint i2 = 0; i2 < unknownBytes.size(); i2++) { - for (uint i3 = 0; i3 < 32; i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Bytes[" << i2 << "][" << i3 << "]: " << unknownBytes[i2][i3] << endl; - }; - }; - }; - if ( (unknownBool1 == 0) ) { - for (uint i2 = 0; i2 < unknownBytesAlt.size(); i2++) { - for (uint i3 = 0; i3 < 28; i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Bytes Alt[" << i2 << "][" << i3 << "]: " << unknownBytesAlt[i2][i3] << endl; - }; - }; - }; - out << " Unknown Byte 3: " << unknownByte3 << endl; - out << " Unknown Bool 2: " << unknownBool2 << endl; - if ( (unknownBool2 != 0) ) { - for (uint i2 = 0; i2 < unknownBytes2.size(); i2++) { - for (uint i3 = 0; i3 < 4; i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Bytes 2[" << i2 << "][" << i3 << "]: " << unknownBytes2[i2][i3] << endl; - }; - }; - }; - out << " Unknown Int 1: " << unknownInt1 << endl; - return out.str(); -} - -void NiPSysData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysData::GetRefs(); - return refs; -} - -void NiPSysDragModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( dragAxis, in, version ); - NifStream( percentage, in, version ); - NifStream( range, in, version ); - NifStream( rangeFalloff, in, version ); -} - -void NiPSysDragModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - if ( parent != NULL ) - NifStream( link_map[StaticCast<NiObject>(parent)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( dragAxis, out, version ); - NifStream( percentage, out, version ); - NifStream( range, out, version ); - NifStream( rangeFalloff, out, version ); -} - -std::string NiPSysDragModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Parent: " << parent << endl; - out << " Drag Axis: " << dragAxis << endl; - out << " Percentage: " << percentage << endl; - out << " Range: " << range << endl; - out << " Range Falloff: " << rangeFalloff << endl; - return out.str(); -} - -void NiPSysDragModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - parent = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( parent == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - parent = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysDragModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysEmitterCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - APSysCtlr::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiPSysEmitterCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); - if ( version <= 0x0A010000 ) { - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x0A020000 ) { - if ( visibilityInterpolator != NULL ) - NifStream( link_map[StaticCast<NiObject>(visibilityInterpolator)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiPSysEmitterCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - out << " Data: " << data << endl; - out << " Visibility Interpolator: " << visibilityInterpolator << endl; - return out.str(); -} - -void NiPSysEmitterCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiPSysEmitterCtlrData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - visibilityInterpolator = DynamicCast<NiInterpolator>(objects[link_stack.front()]); - if ( visibilityInterpolator == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - visibilityInterpolator = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiPSysEmitterCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - if ( visibilityInterpolator != NULL ) - refs.push_back(StaticCast<NiObject>(visibilityInterpolator)); - return refs; -} - -void NiPSysEmitterCtlrData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( floatKeys_.numKeys, in, version ); - if ( (floatKeys_.numKeys != 0) ) { - NifStream( floatKeys_.interpolation, in, version ); - }; - floatKeys_.keys.resize(floatKeys_.numKeys); - for (uint i1 = 0; i1 < floatKeys_.keys.size(); i1++) { - NifStream( floatKeys_.keys[i1], in, version, floatKeys_.interpolation ); - }; - NifStream( numVisibilityKeys_, in, version ); - visibilityKeys_.resize(numVisibilityKeys_); - for (uint i1 = 0; i1 < visibilityKeys_.size(); i1++) { - NifStream( visibilityKeys_[i1], in, version, 1 ); - }; -} - -void NiPSysEmitterCtlrData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numVisibilityKeys_ = uint(visibilityKeys_.size()); - floatKeys_.numKeys = uint(floatKeys_.keys.size()); - NifStream( floatKeys_.numKeys, out, version ); - if ( (floatKeys_.numKeys != 0) ) { - NifStream( floatKeys_.interpolation, out, version ); - }; - for (uint i1 = 0; i1 < floatKeys_.keys.size(); i1++) { - NifStream( floatKeys_.keys[i1], out, version, floatKeys_.interpolation ); - }; - NifStream( numVisibilityKeys_, out, version ); - for (uint i1 = 0; i1 < visibilityKeys_.size(); i1++) { - NifStream( visibilityKeys_[i1], out, version, 1 ); - }; -} - -std::string NiPSysEmitterCtlrData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numVisibilityKeys_ = uint(visibilityKeys_.size()); - floatKeys_.numKeys = uint(floatKeys_.keys.size()); - out << " Num Keys: " << floatKeys_.numKeys << endl; - if ( (floatKeys_.numKeys != 0) ) { - out << " Interpolation: " << floatKeys_.interpolation << endl; - }; - for (uint i1 = 0; i1 < floatKeys_.keys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i1 << "]: " << floatKeys_.keys[i1] << endl; - }; - out << " Num Visibility Keys?: " << numVisibilityKeys_ << endl; - for (uint i1 = 0; i1 < visibilityKeys_.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Visibility Keys?[" << i1 << "]: " << visibilityKeys_[i1] << endl; - }; - return out.str(); -} - -void NiPSysEmitterCtlrData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitterCtlrData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiPSysEmitterDeclinationCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysEmitterDeclinationCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysEmitterDeclinationCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysEmitterDeclinationCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitterDeclinationCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysEmitterDeclinationVarCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysEmitterDeclinationVarCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysEmitterDeclinationVarCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysEmitterDeclinationVarCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitterDeclinationVarCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysEmitterInitialRadiusCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysEmitterInitialRadiusCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysEmitterInitialRadiusCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysEmitterInitialRadiusCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitterInitialRadiusCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysEmitterLifeSpanCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysEmitterLifeSpanCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysEmitterLifeSpanCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysEmitterLifeSpanCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitterLifeSpanCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysEmitterSpeedCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysEmitterSpeedCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysEmitterSpeedCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysEmitterSpeedCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysEmitterSpeedCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysGravityModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( gravityAxis, in, version ); - NifStream( decay, in, version ); - NifStream( strength, in, version ); - NifStream( forceType, in, version ); - NifStream( turbulence, in, version ); - NifStream( turbulenceScale, in, version ); -} - -void NiPSysGravityModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - if ( gravityObject != NULL ) - NifStream( link_map[StaticCast<NiObject>(gravityObject)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( gravityAxis, out, version ); - NifStream( decay, out, version ); - NifStream( strength, out, version ); - NifStream( forceType, out, version ); - NifStream( turbulence, out, version ); - NifStream( turbulenceScale, out, version ); -} - -std::string NiPSysGravityModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Gravity Object: " << gravityObject << endl; - out << " Gravity Axis: " << gravityAxis << endl; - out << " Decay: " << decay << endl; - out << " Strength: " << strength << endl; - out << " Force Type: " << forceType << endl; - out << " Turbulence: " << turbulence << endl; - out << " Turbulence Scale: " << turbulenceScale << endl; - return out.str(); -} - -void NiPSysGravityModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - gravityObject = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( gravityObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - gravityObject = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysGravityModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysGravityStrengthCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysGravityStrengthCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysGravityStrengthCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysGravityStrengthCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysGravityStrengthCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysGrowFadeModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( growTime, in, version ); - NifStream( growGeneration, in, version ); - NifStream( fadeTime, in, version ); - NifStream( fadeGeneration, in, version ); -} - -void NiPSysGrowFadeModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( growTime, out, version ); - NifStream( growGeneration, out, version ); - NifStream( fadeTime, out, version ); - NifStream( fadeGeneration, out, version ); -} - -std::string NiPSysGrowFadeModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Grow Time: " << growTime << endl; - out << " Grow Generation: " << growGeneration << endl; - out << " Fade Time: " << fadeTime << endl; - out << " Fade Generation: " << fadeGeneration << endl; - return out.str(); -} - -void NiPSysGrowFadeModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysGrowFadeModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysMeshEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysEmitter::Read( in, link_stack, version, user_version ); - NifStream( numEmitterMeshes, in, version ); - emitterMeshes.resize(numEmitterMeshes); - for (uint i1 = 0; i1 < emitterMeshes.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( initialVelocityType, in, version ); - NifStream( emissionType, in, version ); - NifStream( emissionAxis, in, version ); -} - -void NiPSysMeshEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysEmitter::Write( out, link_map, version, user_version ); - numEmitterMeshes = uint(emitterMeshes.size()); - NifStream( numEmitterMeshes, out, version ); - for (uint i1 = 0; i1 < emitterMeshes.size(); i1++) { - if ( emitterMeshes[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(emitterMeshes[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( initialVelocityType, out, version ); - NifStream( emissionType, out, version ); - NifStream( emissionAxis, out, version ); -} - -std::string NiPSysMeshEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysEmitter::asString(); - numEmitterMeshes = uint(emitterMeshes.size()); - out << " Num Emitter Meshes: " << numEmitterMeshes << endl; - for (uint i1 = 0; i1 < emitterMeshes.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Emitter Meshes[" << i1 << "]: " << emitterMeshes[i1] << endl; - }; - out << " Initial Velocity Type: " << initialVelocityType << endl; - out << " Emission Type: " << emissionType << endl; - out << " Emission Axis: " << emissionAxis << endl; - return out.str(); -} - -void NiPSysMeshEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysEmitter::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < emitterMeshes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - emitterMeshes[i1] = DynamicCast<NiTriBasedGeom>(objects[link_stack.front()]); - if ( emitterMeshes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - emitterMeshes[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiPSysMeshEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysEmitter::GetRefs(); - for (uint i1 = 0; i1 < emitterMeshes.size(); i1++) { - if ( emitterMeshes[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(emitterMeshes[i1])); - }; - return refs; -} - -void NiPSysMeshUpdateModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( numMeshes, in, version ); - meshes.resize(numMeshes); - for (uint i1 = 0; i1 < meshes.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiPSysMeshUpdateModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - numMeshes = uint(meshes.size()); - NifStream( numMeshes, out, version ); - for (uint i1 = 0; i1 < meshes.size(); i1++) { - if ( meshes[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(meshes[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiPSysMeshUpdateModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - numMeshes = uint(meshes.size()); - out << " Num Meshes: " << numMeshes << endl; - for (uint i1 = 0; i1 < meshes.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Meshes[" << i1 << "]: " << meshes[i1] << endl; - }; - return out.str(); -} - -void NiPSysMeshUpdateModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); - for (uint i1 = 0; i1 < meshes.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - meshes[i1] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( meshes[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - meshes[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiPSysMeshUpdateModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - for (uint i1 = 0; i1 < meshes.size(); i1++) { - if ( meshes[i1] != NULL ) - refs.push_back(StaticCast<NiObject>(meshes[i1])); - }; - return refs; -} - -void NiPSysModifierActiveCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::Read( in, link_stack, version, user_version ); -} - -void NiPSysModifierActiveCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - APSysCtlr::Write( out, link_map, version, user_version ); -} - -std::string NiPSysModifierActiveCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << APSysCtlr::asString(); - return out.str(); -} - -void NiPSysModifierActiveCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - APSysCtlr::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysModifierActiveCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = APSysCtlr::GetRefs(); - return refs; -} - -void NiPSysPlanarCollider::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( bounce, in, version ); - NifStream( spawnOnCollide, in, version ); - NifStream( dieOnCollide, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( width, in, version ); - NifStream( height, in, version ); - NifStream( xAxis, in, version ); - NifStream( yAxis, in, version ); -} - -void NiPSysPlanarCollider::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - NifStream( bounce, out, version ); - NifStream( spawnOnCollide, out, version ); - NifStream( dieOnCollide, out, version ); - if ( spawnModifier != NULL ) - NifStream( link_map[StaticCast<NiObject>(spawnModifier)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( parent != NULL ) - NifStream( link_map[StaticCast<NiObject>(parent)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( unknownLink_ != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink_)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( colliderObject != NULL ) - NifStream( link_map[StaticCast<NiObject>(colliderObject)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( width, out, version ); - NifStream( height, out, version ); - NifStream( xAxis, out, version ); - NifStream( yAxis, out, version ); -} - -std::string NiPSysPlanarCollider::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Bounce: " << bounce << endl; - out << " Spawn on Collide: " << spawnOnCollide << endl; - out << " Die on Collide: " << dieOnCollide << endl; - out << " Spawn Modifier: " << spawnModifier << endl; - out << " Parent: " << parent << endl; - out << " Unknown Link?: " << unknownLink_ << endl; - out << " Collider Object: " << colliderObject << endl; - out << " Width: " << width << endl; - out << " Height: " << height << endl; - out << " X Axis: " << xAxis << endl; - out << " Y Axis: " << yAxis << endl; - return out.str(); -} - -void NiPSysPlanarCollider::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - spawnModifier = DynamicCast<NiPSysSpawnModifier>(objects[link_stack.front()]); - if ( spawnModifier == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - spawnModifier = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - parent = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( parent == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - parent = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink_ = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink_ == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink_ = NULL; - link_stack.pop_front(); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - colliderObject = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( colliderObject == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - colliderObject = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiPSysPlanarCollider::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( spawnModifier != NULL ) - refs.push_back(StaticCast<NiObject>(spawnModifier)); - if ( unknownLink_ != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink_)); - if ( colliderObject != NULL ) - refs.push_back(StaticCast<NiObject>(colliderObject)); - return refs; -} - -void NiPSysPositionModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); -} - -void NiPSysPositionModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); -} - -std::string NiPSysPositionModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - return out.str(); -} - -void NiPSysPositionModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysPositionModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysResetOnLoopCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::Read( in, link_stack, version, user_version ); -} - -void NiPSysResetOnLoopCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); -} - -std::string NiPSysResetOnLoopCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - return out.str(); -} - -void NiPSysResetOnLoopCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysResetOnLoopCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - return refs; -} - -void NiPSysRotationModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( initialRotationSpeed, in, version ); - if ( version >= 0x14000004 ) { - NifStream( initialRotationSpeedVariation, in, version ); - NifStream( initialRotationAngle, in, version ); - NifStream( initialRotationAngleVariation, in, version ); - NifStream( randomRotSpeedSign, in, version ); - }; - NifStream( randomInitialAxis, in, version ); - NifStream( initialAxis, in, version ); -} - -void NiPSysRotationModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( initialRotationSpeed, out, version ); - if ( version >= 0x14000004 ) { - NifStream( initialRotationSpeedVariation, out, version ); - NifStream( initialRotationAngle, out, version ); - NifStream( initialRotationAngleVariation, out, version ); - NifStream( randomRotSpeedSign, out, version ); - }; - NifStream( randomInitialAxis, out, version ); - NifStream( initialAxis, out, version ); -} - -std::string NiPSysRotationModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Initial Rotation Speed: " << initialRotationSpeed << endl; - out << " Initial Rotation Speed Variation: " << initialRotationSpeedVariation << endl; - out << " Initial Rotation Angle: " << initialRotationAngle << endl; - out << " Initial Rotation Angle Variation: " << initialRotationAngleVariation << endl; - out << " Random Rot Speed Sign: " << randomRotSpeedSign << endl; - out << " Random Initial Axis: " << randomInitialAxis << endl; - out << " Initial Axis: " << initialAxis << endl; - return out.str(); -} - -void NiPSysRotationModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysRotationModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysSpawnModifier::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::Read( in, link_stack, version, user_version ); - NifStream( numSpawnGenerations, in, version ); - NifStream( percentageSpawned, in, version ); - NifStream( minNumToSpawn, in, version ); - NifStream( maxNumToSpawn, in, version ); - NifStream( spawnSpeedChaos, in, version ); - NifStream( spawnDirChaos, in, version ); - NifStream( lifeSpan, in, version ); - NifStream( lifeSpanVariation, in, version ); -} - -void NiPSysSpawnModifier::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysModifier::Write( out, link_map, version, user_version ); - NifStream( numSpawnGenerations, out, version ); - NifStream( percentageSpawned, out, version ); - NifStream( minNumToSpawn, out, version ); - NifStream( maxNumToSpawn, out, version ); - NifStream( spawnSpeedChaos, out, version ); - NifStream( spawnDirChaos, out, version ); - NifStream( lifeSpan, out, version ); - NifStream( lifeSpanVariation, out, version ); -} - -std::string NiPSysSpawnModifier::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysModifier::asString(); - out << " Num Spawn Generations: " << numSpawnGenerations << endl; - out << " Percentage Spawned: " << percentageSpawned << endl; - out << " Min Num to Spawn: " << minNumToSpawn << endl; - out << " Max Num to Spawn: " << maxNumToSpawn << endl; - out << " Spawn Speed Chaos: " << spawnSpeedChaos << endl; - out << " Spawn Dir Chaos: " << spawnDirChaos << endl; - out << " Life Span: " << lifeSpan << endl; - out << " Life Span Variation: " << lifeSpanVariation << endl; - return out.str(); -} - -void NiPSysSpawnModifier::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysSpawnModifier::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysModifier::GetRefs(); - return refs; -} - -void NiPSysSphereEmitter::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::Read( in, link_stack, version, user_version ); - NifStream( radius, in, version ); -} - -void NiPSysSphereEmitter::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPSysVolumeEmitter::Write( out, link_map, version, user_version ); - NifStream( radius, out, version ); -} - -std::string NiPSysSphereEmitter::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPSysVolumeEmitter::asString(); - out << " Radius: " << radius << endl; - return out.str(); -} - -void NiPSysSphereEmitter::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPSysVolumeEmitter::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysSphereEmitter::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPSysVolumeEmitter::GetRefs(); - return refs; -} - -void NiPSysUpdateCtlr::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::Read( in, link_stack, version, user_version ); -} - -void NiPSysUpdateCtlr::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); -} - -std::string NiPSysUpdateCtlr::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - return out.str(); -} - -void NiPSysUpdateCtlr::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiPSysUpdateCtlr::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - return refs; -} - -void NiRangeLODData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( lodCenter, in, version ); - NifStream( numLodLevels, in, version ); - lodLevels.resize(numLodLevels); - for (uint i1 = 0; i1 < lodLevels.size(); i1++) { - NifStream( lodLevels[i1].nearExtent, in, version ); - NifStream( lodLevels[i1].farExtent, in, version ); - }; -} - -void NiRangeLODData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numLodLevels = uint(lodLevels.size()); - NifStream( lodCenter, out, version ); - NifStream( numLodLevels, out, version ); - for (uint i1 = 0; i1 < lodLevels.size(); i1++) { - NifStream( lodLevels[i1].nearExtent, out, version ); - NifStream( lodLevels[i1].farExtent, out, version ); - }; -} - -std::string NiRangeLODData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numLodLevels = uint(lodLevels.size()); - out << " LOD Center: " << lodCenter << endl; - out << " Num LOD Levels: " << numLodLevels << endl; - for (uint i1 = 0; i1 < lodLevels.size(); i1++) { - out << " Near Extent: " << lodLevels[i1].nearExtent << endl; - out << " Far Extent: " << lodLevels[i1].farExtent << endl; - }; - return out.str(); -} - -void NiRangeLODData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiRangeLODData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiRotatingParticles::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::Read( in, link_stack, version, user_version ); -} - -void NiRotatingParticles::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticles::Write( out, link_map, version, user_version ); -} - -std::string NiRotatingParticles::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticles::asString(); - return out.str(); -} - -void NiRotatingParticles::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticles::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiRotatingParticles::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticles::GetRefs(); - return refs; -} - -void NiRotatingParticlesData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticlesData::Read( in, link_stack, version, user_version ); -} - -void NiRotatingParticlesData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiParticlesData::Write( out, link_map, version, user_version ); -} - -std::string NiRotatingParticlesData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiParticlesData::asString(); - return out.str(); -} - -void NiRotatingParticlesData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiParticlesData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiRotatingParticlesData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiParticlesData::GetRefs(); - return refs; -} - -void NiScreenLODData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownFloats[i1], in, version ); - }; - NifStream( unknownCount, in, version ); - unknownFloats2.resize(unknownCount); - for (uint i1 = 0; i1 < unknownFloats2.size(); i1++) { - NifStream( unknownFloats2[i1], in, version ); - }; -} - -void NiScreenLODData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - unknownCount = uint(unknownFloats2.size()); - for (uint i1 = 0; i1 < 8; i1++) { - NifStream( unknownFloats[i1], out, version ); - }; - NifStream( unknownCount, out, version ); - for (uint i1 = 0; i1 < unknownFloats2.size(); i1++) { - NifStream( unknownFloats2[i1], out, version ); - }; -} - -std::string NiScreenLODData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - unknownCount = uint(unknownFloats2.size()); - for (uint i1 = 0; i1 < 8; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats[" << i1 << "]: " << unknownFloats[i1] << endl; - }; - out << " Unknown Count: " << unknownCount << endl; - for (uint i1 = 0; i1 < unknownFloats2.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Floats 2[" << i1 << "]: " << unknownFloats2[i1] << endl; - }; - return out.str(); -} - -void NiScreenLODData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiScreenLODData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiSequenceStreamHelper::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObjectNET::Read( in, link_stack, version, user_version ); -} - -void NiSequenceStreamHelper::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObjectNET::Write( out, link_map, version, user_version ); -} - -std::string NiSequenceStreamHelper::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObjectNET::asString(); - return out.str(); -} - -void NiSequenceStreamHelper::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObjectNET::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiSequenceStreamHelper::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObjectNET::GetRefs(); - return refs; -} - -void NiShadeProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); -} - -void NiShadeProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); -} - -std::string NiShadeProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - return out.str(); -} - -void NiShadeProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiShadeProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiSkinData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( rotation, in, version ); - NifStream( translation, in, version ); - NifStream( scale, in, version ); - NifStream( numBones, in, version ); - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - if ( version >= 0x04020100 ) { - NifStream( unknownByte, in, version ); - }; - boneList.resize(numBones); - for (uint i1 = 0; i1 < boneList.size(); i1++) { - NifStream( boneList[i1].rotation, in, version ); - NifStream( boneList[i1].translation, in, version ); - NifStream( boneList[i1].scale, in, version ); - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( boneList[i1].unknown4Floats[i2], in, version ); - }; - NifStream( boneList[i1].numVertices, in, version ); - boneList[i1].vertexWeights.resize(boneList[i1].numVertices); - for (uint i2 = 0; i2 < boneList[i1].vertexWeights.size(); i2++) { - NifStream( boneList[i1].vertexWeights[i2].index, in, version ); - NifStream( boneList[i1].vertexWeights[i2].weight, in, version ); - }; - }; -} - -void NiSkinData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numBones = uint(boneList.size()); - NifStream( rotation, out, version ); - NifStream( translation, out, version ); - NifStream( scale, out, version ); - NifStream( numBones, out, version ); - if ( version <= 0x0A010000 ) { - if ( skinPartition != NULL ) - NifStream( link_map[StaticCast<NiObject>(skinPartition)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( version >= 0x04020100 ) { - NifStream( unknownByte, out, version ); - }; - for (uint i1 = 0; i1 < boneList.size(); i1++) { - boneList[i1].numVertices = ushort(boneList[i1].vertexWeights.size()); - NifStream( boneList[i1].rotation, out, version ); - NifStream( boneList[i1].translation, out, version ); - NifStream( boneList[i1].scale, out, version ); - for (uint i2 = 0; i2 < 4; i2++) { - NifStream( boneList[i1].unknown4Floats[i2], out, version ); - }; - NifStream( boneList[i1].numVertices, out, version ); - for (uint i2 = 0; i2 < boneList[i1].vertexWeights.size(); i2++) { - NifStream( boneList[i1].vertexWeights[i2].index, out, version ); - NifStream( boneList[i1].vertexWeights[i2].weight, out, version ); - }; - }; -} - -std::string NiSkinData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numBones = uint(boneList.size()); - out << " Rotation: " << rotation << endl; - out << " Translation: " << translation << endl; - out << " Scale: " << scale << endl; - out << " Num Bones: " << numBones << endl; - out << " Skin Partition: " << skinPartition << endl; - out << " Unknown Byte: " << unknownByte << endl; - for (uint i1 = 0; i1 < boneList.size(); i1++) { - boneList[i1].numVertices = ushort(boneList[i1].vertexWeights.size()); - out << " Rotation: " << boneList[i1].rotation << endl; - out << " Translation: " << boneList[i1].translation << endl; - out << " Scale: " << boneList[i1].scale << endl; - for (uint i2 = 0; i2 < 4; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown 4 Floats[" << i2 << "]: " << boneList[i1].unknown4Floats[i2] << endl; - }; - out << " Num Vertices: " << boneList[i1].numVertices << endl; - for (uint i2 = 0; i2 < boneList[i1].vertexWeights.size(); i2++) { - out << " Index: " << boneList[i1].vertexWeights[i2].index << endl; - out << " Weight: " << boneList[i1].vertexWeights[i2].weight << endl; - }; - }; - return out.str(); -} - -void NiSkinData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skinPartition = DynamicCast<NiSkinPartition>(objects[link_stack.front()]); - if ( skinPartition == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skinPartition = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiSkinData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( skinPartition != NULL ) - refs.push_back(StaticCast<NiObject>(skinPartition)); - return refs; -} - -void NiSkinInstance::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObject::Read( in, link_stack, version, user_version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - if ( version >= 0x0A020000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( numBones, in, version ); - bones.resize(numBones); - for (uint i1 = 0; i1 < bones.size(); i1++) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiSkinInstance::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numBones = uint(bones.size()); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - if ( version >= 0x0A020000 ) { - if ( skinPartition != NULL ) - NifStream( link_map[StaticCast<NiObject>(skinPartition)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - if ( skeletonRoot != NULL ) - NifStream( link_map[StaticCast<NiObject>(skeletonRoot)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( numBones, out, version ); - for (uint i1 = 0; i1 < bones.size(); i1++) { - if ( bones[i1] != NULL ) - NifStream( link_map[StaticCast<NiObject>(bones[i1])], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiSkinInstance::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numBones = uint(bones.size()); - out << " Data: " << data << endl; - out << " Skin Partition: " << skinPartition << endl; - out << " Skeleton Root: " << skeletonRoot << endl; - out << " Num Bones: " << numBones << endl; - for (uint i1 = 0; i1 < bones.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Bones[" << i1 << "]: " << bones[i1] << endl; - }; - return out.str(); -} - -void NiSkinInstance::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiSkinData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - if ( version >= 0x0A020000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skinPartition = DynamicCast<NiSkinPartition>(objects[link_stack.front()]); - if ( skinPartition == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skinPartition = NULL; - link_stack.pop_front(); - }; - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - skeletonRoot = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( skeletonRoot == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - skeletonRoot = NULL; - link_stack.pop_front(); - for (uint i1 = 0; i1 < bones.size(); i1++) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - bones[i1] = DynamicCast<NiNode>(objects[link_stack.front()]); - if ( bones[i1] == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - bones[i1] = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiSkinInstance::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - if ( skinPartition != NULL ) - refs.push_back(StaticCast<NiObject>(skinPartition)); - for (uint i1 = 0; i1 < bones.size(); i1++) { - }; - return refs; -} - -void NiSkinPartition::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( numSkinPartitionBlocks, in, version ); - skinPartitionBlocks.resize(numSkinPartitionBlocks); - for (uint i1 = 0; i1 < skinPartitionBlocks.size(); i1++) { - NifStream( skinPartitionBlocks[i1].numVertices, in, version ); - NifStream( skinPartitionBlocks[i1].numTriangles, in, version ); - NifStream( skinPartitionBlocks[i1].numBones, in, version ); - NifStream( skinPartitionBlocks[i1].numStrips, in, version ); - NifStream( skinPartitionBlocks[i1].numWeightsPerVertex, in, version ); - skinPartitionBlocks[i1].bones.resize(skinPartitionBlocks[i1].numBones); - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].bones.size(); i2++) { - NifStream( skinPartitionBlocks[i1].bones[i2], in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( skinPartitionBlocks[i1].hasVertexMap, in, version ); - }; - if ( version <= 0x0A000102 ) { - skinPartitionBlocks[i1].vertexMap.resize(skinPartitionBlocks[i1].numVertices); - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].vertexMap.size(); i3++) { - NifStream( skinPartitionBlocks[i1].vertexMap[i3], in, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (skinPartitionBlocks[i1].hasVertexMap != 0) ) { - skinPartitionBlocks[i1].vertexMap.resize(skinPartitionBlocks[i1].numVertices); - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].vertexMap.size(); i4++) { - NifStream( skinPartitionBlocks[i1].vertexMap[i4], in, version ); - }; - }; - NifStream( skinPartitionBlocks[i1].hasVertexWeights, in, version ); - }; - if ( version <= 0x0A000102 ) { - skinPartitionBlocks[i1].vertexWeights.resize(skinPartitionBlocks[i1].numVertices); - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].vertexWeights.size(); i3++) { - skinPartitionBlocks[i1].vertexWeights[i3].resize(skinPartitionBlocks[i1].numWeightsPerVertex); - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].vertexWeights[i3].size(); i4++) { - NifStream( skinPartitionBlocks[i1].vertexWeights[i3][i4], in, version ); - }; - }; - }; - if ( version >= 0x0A010000 ) { - if ( (skinPartitionBlocks[i1].hasVertexWeights != 0) ) { - skinPartitionBlocks[i1].vertexWeights.resize(skinPartitionBlocks[i1].numVertices); - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].vertexWeights.size(); i4++) { - skinPartitionBlocks[i1].vertexWeights[i4].resize(skinPartitionBlocks[i1].numWeightsPerVertex); - for (uint i5 = 0; i5 < skinPartitionBlocks[i1].vertexWeights[i4].size(); i5++) { - NifStream( skinPartitionBlocks[i1].vertexWeights[i4][i5], in, version ); - }; - }; - }; - }; - skinPartitionBlocks[i1].stripLengths.resize(skinPartitionBlocks[i1].numStrips); - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].stripLengths.size(); i2++) { - NifStream( skinPartitionBlocks[i1].stripLengths[i2], in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( skinPartitionBlocks[i1].hasStrips, in, version ); - }; - if ( version <= 0x0A000102 ) { - skinPartitionBlocks[i1].strips.resize(skinPartitionBlocks[i1].numStrips); - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].strips.size(); i3++) { - skinPartitionBlocks[i1].strips[i3].resize(skinPartitionBlocks[i1].stripLengths[i3]); - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].stripLengths[i3]; i4++) { - NifStream( skinPartitionBlocks[i1].strips[i3][i4], in, version ); - }; - }; - }; - if ( version >= 0x0A010000 ) { - if ( (skinPartitionBlocks[i1].hasStrips != 0) ) { - skinPartitionBlocks[i1].strips.resize(skinPartitionBlocks[i1].numStrips); - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].strips.size(); i4++) { - skinPartitionBlocks[i1].strips[i4].resize(skinPartitionBlocks[i1].stripLengths[i4]); - for (uint i5 = 0; i5 < skinPartitionBlocks[i1].stripLengths[i4]; i5++) { - NifStream( skinPartitionBlocks[i1].strips[i4][i5], in, version ); - }; - }; - }; - }; - if ( (skinPartitionBlocks[i1].numStrips == 0) ) { - skinPartitionBlocks[i1].triangles.resize(skinPartitionBlocks[i1].numTriangles); - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].triangles.size(); i3++) { - NifStream( skinPartitionBlocks[i1].triangles[i3], in, version ); - }; - }; - NifStream( skinPartitionBlocks[i1].hasBoneIndices, in, version ); - if ( (skinPartitionBlocks[i1].hasBoneIndices != 0) ) { - skinPartitionBlocks[i1].boneIndices.resize(skinPartitionBlocks[i1].numVertices); - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].boneIndices.size(); i3++) { - skinPartitionBlocks[i1].boneIndices[i3].resize(skinPartitionBlocks[i1].numWeightsPerVertex); - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].boneIndices[i3].size(); i4++) { - NifStream( skinPartitionBlocks[i1].boneIndices[i3][i4], in, version ); - }; - }; - }; - }; -} - -void NiSkinPartition::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - numSkinPartitionBlocks = uint(skinPartitionBlocks.size()); - NifStream( numSkinPartitionBlocks, out, version ); - for (uint i1 = 0; i1 < skinPartitionBlocks.size(); i1++) { - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].strips.size(); i2++) - skinPartitionBlocks[i1].stripLengths[i2] = ushort(skinPartitionBlocks[i1].strips[i2].size()); - skinPartitionBlocks[i1].numWeightsPerVertex = ushort((skinPartitionBlocks[i1].vertexWeights.size() > 0) ? skinPartitionBlocks[i1].vertexWeights[0].size() : 0); - skinPartitionBlocks[i1].numStrips = ushort(skinPartitionBlocks[i1].stripLengths.size()); - skinPartitionBlocks[i1].numBones = ushort(skinPartitionBlocks[i1].bones.size()); - skinPartitionBlocks[i1].numTriangles = skinPartitionBlocks[i1].CalcNumTriangles(); - skinPartitionBlocks[i1].numVertices = ushort(skinPartitionBlocks[i1].vertexMap.size()); - NifStream( skinPartitionBlocks[i1].numVertices, out, version ); - NifStream( skinPartitionBlocks[i1].numTriangles, out, version ); - NifStream( skinPartitionBlocks[i1].numBones, out, version ); - NifStream( skinPartitionBlocks[i1].numStrips, out, version ); - NifStream( skinPartitionBlocks[i1].numWeightsPerVertex, out, version ); - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].bones.size(); i2++) { - NifStream( skinPartitionBlocks[i1].bones[i2], out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( skinPartitionBlocks[i1].hasVertexMap, out, version ); - }; - if ( version <= 0x0A000102 ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].vertexMap.size(); i3++) { - NifStream( skinPartitionBlocks[i1].vertexMap[i3], out, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (skinPartitionBlocks[i1].hasVertexMap != 0) ) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].vertexMap.size(); i4++) { - NifStream( skinPartitionBlocks[i1].vertexMap[i4], out, version ); - }; - }; - NifStream( skinPartitionBlocks[i1].hasVertexWeights, out, version ); - }; - if ( version <= 0x0A000102 ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].vertexWeights.size(); i3++) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].vertexWeights[i3].size(); i4++) { - NifStream( skinPartitionBlocks[i1].vertexWeights[i3][i4], out, version ); - }; - }; - }; - if ( version >= 0x0A010000 ) { - if ( (skinPartitionBlocks[i1].hasVertexWeights != 0) ) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].vertexWeights.size(); i4++) { - for (uint i5 = 0; i5 < skinPartitionBlocks[i1].vertexWeights[i4].size(); i5++) { - NifStream( skinPartitionBlocks[i1].vertexWeights[i4][i5], out, version ); - }; - }; - }; - }; - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].stripLengths.size(); i2++) { - NifStream( skinPartitionBlocks[i1].stripLengths[i2], out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( skinPartitionBlocks[i1].hasStrips, out, version ); - }; - if ( version <= 0x0A000102 ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].strips.size(); i3++) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].stripLengths[i3]; i4++) { - NifStream( skinPartitionBlocks[i1].strips[i3][i4], out, version ); - }; - }; - }; - if ( version >= 0x0A010000 ) { - if ( (skinPartitionBlocks[i1].hasStrips != 0) ) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].strips.size(); i4++) { - for (uint i5 = 0; i5 < skinPartitionBlocks[i1].stripLengths[i4]; i5++) { - NifStream( skinPartitionBlocks[i1].strips[i4][i5], out, version ); - }; - }; - }; - }; - if ( (skinPartitionBlocks[i1].numStrips == 0) ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].triangles.size(); i3++) { - NifStream( skinPartitionBlocks[i1].triangles[i3], out, version ); - }; - }; - NifStream( skinPartitionBlocks[i1].hasBoneIndices, out, version ); - if ( (skinPartitionBlocks[i1].hasBoneIndices != 0) ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].boneIndices.size(); i3++) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].boneIndices[i3].size(); i4++) { - NifStream( skinPartitionBlocks[i1].boneIndices[i3][i4], out, version ); - }; - }; - }; - }; -} - -std::string NiSkinPartition::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - numSkinPartitionBlocks = uint(skinPartitionBlocks.size()); - out << " Num Skin Partition Blocks: " << numSkinPartitionBlocks << endl; - for (uint i1 = 0; i1 < skinPartitionBlocks.size(); i1++) { - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].strips.size(); i2++) - skinPartitionBlocks[i1].stripLengths[i2] = ushort(skinPartitionBlocks[i1].strips[i2].size()); - skinPartitionBlocks[i1].numWeightsPerVertex = ushort((skinPartitionBlocks[i1].vertexWeights.size() > 0) ? skinPartitionBlocks[i1].vertexWeights[0].size() : 0); - skinPartitionBlocks[i1].numStrips = ushort(skinPartitionBlocks[i1].stripLengths.size()); - skinPartitionBlocks[i1].numBones = ushort(skinPartitionBlocks[i1].bones.size()); - skinPartitionBlocks[i1].numTriangles = skinPartitionBlocks[i1].CalcNumTriangles(); - skinPartitionBlocks[i1].numVertices = ushort(skinPartitionBlocks[i1].vertexMap.size()); - out << " Num Vertices: " << skinPartitionBlocks[i1].numVertices << endl; - out << " Num Triangles: " << skinPartitionBlocks[i1].numTriangles << endl; - out << " Num Bones: " << skinPartitionBlocks[i1].numBones << endl; - out << " Num Strips: " << skinPartitionBlocks[i1].numStrips << endl; - out << " Num Weights Per Vertex: " << skinPartitionBlocks[i1].numWeightsPerVertex << endl; - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].bones.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Bones[" << i2 << "]: " << skinPartitionBlocks[i1].bones[i2] << endl; - }; - out << " Has Vertex Map: " << skinPartitionBlocks[i1].hasVertexMap << endl; - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].vertexMap.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vertex Map[" << i2 << "]: " << skinPartitionBlocks[i1].vertexMap[i2] << endl; - }; - out << " Has Vertex Weights: " << skinPartitionBlocks[i1].hasVertexWeights << endl; - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].vertexWeights.size(); i2++) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].vertexWeights[i2].size(); i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vertex Weights[" << i2 << "][" << i3 << "]: " << skinPartitionBlocks[i1].vertexWeights[i2][i3] << endl; - }; - }; - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].stripLengths.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Strip Lengths[" << i2 << "]: " << skinPartitionBlocks[i1].stripLengths[i2] << endl; - }; - out << " Has Strips: " << skinPartitionBlocks[i1].hasStrips << endl; - for (uint i2 = 0; i2 < skinPartitionBlocks[i1].strips.size(); i2++) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].stripLengths[i2]; i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Strips[" << i2 << "][" << i3 << "]: " << skinPartitionBlocks[i1].strips[i2][i3] << endl; - }; - }; - if ( (skinPartitionBlocks[i1].numStrips == 0) ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].triangles.size(); i3++) { - if ( !verbose && ( i3 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Triangles[" << i3 << "]: " << skinPartitionBlocks[i1].triangles[i3] << endl; - }; - }; - out << " Has Bone Indices: " << skinPartitionBlocks[i1].hasBoneIndices << endl; - if ( (skinPartitionBlocks[i1].hasBoneIndices != 0) ) { - for (uint i3 = 0; i3 < skinPartitionBlocks[i1].boneIndices.size(); i3++) { - for (uint i4 = 0; i4 < skinPartitionBlocks[i1].boneIndices[i3].size(); i4++) { - if ( !verbose && ( i4 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Bone Indices[" << i3 << "][" << i4 << "]: " << skinPartitionBlocks[i1].boneIndices[i3][i4] << endl; - }; - }; - }; - }; - return out.str(); -} - -void NiSkinPartition::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiSkinPartition::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiSourceTexture::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiObjectNET::Read( in, link_stack, version, user_version ); - NifStream( useExternal, in, version ); - if ( (useExternal == 1) ) { - NifStream( fileName, in, version ); - }; - if ( version >= 0x0A010000 ) { - if ( (useExternal == 1) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - }; - if ( version <= 0x0A000100 ) { - if ( (useExternal == 0) ) { - NifStream( unknownByte, in, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (useExternal == 0) ) { - NifStream( originalFileName_, in, version ); - }; - }; - if ( (useExternal == 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; - NifStream( pixelLayout, in, version ); - NifStream( useMipmaps, in, version ); - NifStream( alphaFormat, in, version ); - NifStream( unknownByte, in, version ); - if ( version >= 0x0A01006A ) { - NifStream( unknownByte2, in, version ); - }; -} - -void NiSourceTexture::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObjectNET::Write( out, link_map, version, user_version ); - NifStream( useExternal, out, version ); - if ( (useExternal == 1) ) { - NifStream( fileName, out, version ); - }; - if ( version >= 0x0A010000 ) { - if ( (useExternal == 1) ) { - if ( unknownLink != NULL ) - NifStream( link_map[StaticCast<NiObject>(unknownLink)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - }; - if ( version <= 0x0A000100 ) { - if ( (useExternal == 0) ) { - NifStream( unknownByte, out, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (useExternal == 0) ) { - NifStream( originalFileName_, out, version ); - }; - }; - if ( (useExternal == 0) ) { - if ( pixelData != NULL ) - NifStream( link_map[StaticCast<NiObject>(pixelData)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; - NifStream( pixelLayout, out, version ); - NifStream( useMipmaps, out, version ); - NifStream( alphaFormat, out, version ); - NifStream( unknownByte, out, version ); - if ( version >= 0x0A01006A ) { - NifStream( unknownByte2, out, version ); - }; -} - -std::string NiSourceTexture::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObjectNET::asString(); - out << " Use External: " << useExternal << endl; - if ( (useExternal == 1) ) { - out << " File Name: " << fileName << endl; - out << " Unknown Link: " << unknownLink << endl; - }; - if ( (useExternal == 0) ) { - out << " Unknown Byte: " << unknownByte << endl; - out << " Original File Name?: " << originalFileName_ << endl; - out << " Pixel Data: " << pixelData << endl; - }; - out << " Pixel Layout: " << pixelLayout << endl; - out << " Use Mipmaps: " << useMipmaps << endl; - out << " Alpha Format: " << alphaFormat << endl; - out << " Unknown Byte 2: " << unknownByte2 << endl; - return out.str(); -} - -void NiSourceTexture::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObjectNET::FixLinks( objects, link_stack, version, user_version ); - if ( version >= 0x0A010000 ) { - if ( (useExternal == 1) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - unknownLink = DynamicCast<NiObject>(objects[link_stack.front()]); - if ( unknownLink == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - unknownLink = NULL; - link_stack.pop_front(); - }; - }; - if ( (useExternal == 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - pixelData = DynamicCast<NiPixelData>(objects[link_stack.front()]); - if ( pixelData == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - pixelData = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiSourceTexture::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObjectNET::GetRefs(); - if ( unknownLink != NULL ) - refs.push_back(StaticCast<NiObject>(unknownLink)); - if ( pixelData != NULL ) - refs.push_back(StaticCast<NiObject>(pixelData)); - return refs; -} - -void NiSpecularProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); -} - -void NiSpecularProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); -} - -std::string NiSpecularProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - return out.str(); -} - -void NiSpecularProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiSpecularProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiSphericalCollider::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::Read( in, link_stack, version, user_version ); - NifStream( unknownFloat1, in, version ); - NifStream( unknownShort, in, version ); - NifStream( unknownFloat2, in, version ); - NifStream( unknownFloat3, in, version ); - NifStream( unknownFloat4, in, version ); - NifStream( unknownFloat5, in, version ); -} - -void NiSphericalCollider::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AParticleModifier::Write( out, link_map, version, user_version ); - NifStream( unknownFloat1, out, version ); - NifStream( unknownShort, out, version ); - NifStream( unknownFloat2, out, version ); - NifStream( unknownFloat3, out, version ); - NifStream( unknownFloat4, out, version ); - NifStream( unknownFloat5, out, version ); -} - -std::string NiSphericalCollider::InternalAsString( bool verbose ) const { - stringstream out; - out << AParticleModifier::asString(); - out << " Unknown Float 1: " << unknownFloat1 << endl; - out << " Unknown Short: " << unknownShort << endl; - out << " Unknown Float 2: " << unknownFloat2 << endl; - out << " Unknown Float 3: " << unknownFloat3 << endl; - out << " Unknown Float 4: " << unknownFloat4 << endl; - out << " Unknown Float 5: " << unknownFloat5 << endl; - return out.str(); -} - -void NiSphericalCollider::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AParticleModifier::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiSphericalCollider::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AParticleModifier::GetRefs(); - return refs; -} - -void NiSpotLight::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPointLight::Read( in, link_stack, version, user_version ); - NifStream( cutoffAngle, in, version ); - NifStream( exponent, in, version ); -} - -void NiSpotLight::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiPointLight::Write( out, link_map, version, user_version ); - NifStream( cutoffAngle, out, version ); - NifStream( exponent, out, version ); -} - -std::string NiSpotLight::InternalAsString( bool verbose ) const { - stringstream out; - out << NiPointLight::asString(); - out << " Cutoff Angle: " << cutoffAngle << endl; - out << " Exponent: " << exponent << endl; - return out.str(); -} - -void NiSpotLight::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiPointLight::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiSpotLight::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiPointLight::GetRefs(); - return refs; -} - -void NiStencilProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A000102 ) { - NifStream( flags, in, version ); - }; - NifStream( stencilEnabled, in, version ); - NifStream( stencilFunction, in, version ); - NifStream( stencilRef, in, version ); - NifStream( stencilMask, in, version ); - NifStream( failAction, in, version ); - NifStream( zFailAction, in, version ); - NifStream( passAction, in, version ); - NifStream( drawMode, in, version ); -} - -void NiStencilProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - if ( version <= 0x0A000102 ) { - NifStream( flags, out, version ); - }; - NifStream( stencilEnabled, out, version ); - NifStream( stencilFunction, out, version ); - NifStream( stencilRef, out, version ); - NifStream( stencilMask, out, version ); - NifStream( failAction, out, version ); - NifStream( zFailAction, out, version ); - NifStream( passAction, out, version ); - NifStream( drawMode, out, version ); -} - -std::string NiStencilProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - out << " Stencil Enabled: " << stencilEnabled << endl; - out << " Stencil Function: " << stencilFunction << endl; - out << " Stencil Ref: " << stencilRef << endl; - out << " Stencil Mask: " << stencilMask << endl; - out << " Fail Action: " << failAction << endl; - out << " Z Fail Action: " << zFailAction << endl; - out << " Pass Action: " << passAction << endl; - out << " Draw Mode: " << drawMode << endl; - return out.str(); -} - -void NiStencilProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiStencilProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiStringExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - if ( version <= 0x04020200 ) { - NifStream( bytesRemaining, in, version ); - }; - NifStream( stringData, in, version ); -} - -void NiStringExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - if ( version <= 0x04020200 ) { - NifStream( bytesRemaining, out, version ); - }; - NifStream( stringData, out, version ); -} - -std::string NiStringExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Bytes Remaining: " << bytesRemaining << endl; - out << " String Data: " << stringData << endl; - return out.str(); -} - -void NiStringExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiStringExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiStringPalette::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - NifStream( palette.palette, in, version ); - NifStream( palette.length, in, version ); -} - -void NiStringPalette::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - NifStream( palette.palette, out, version ); - NifStream( palette.length, out, version ); -} - -std::string NiStringPalette::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - out << " Palette: " << palette.palette << endl; - out << " Length: " << palette.length << endl; - return out.str(); -} - -void NiStringPalette::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiStringPalette::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiStringsExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( numStrings, in, version ); - data.resize(numStrings); - for (uint i1 = 0; i1 < data.size(); i1++) { - NifStream( data[i1], in, version ); - }; -} - -void NiStringsExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - numStrings = uint(data.size()); - NifStream( numStrings, out, version ); - for (uint i1 = 0; i1 < data.size(); i1++) { - NifStream( data[i1], out, version ); - }; -} - -std::string NiStringsExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - numStrings = uint(data.size()); - out << " Num Strings: " << numStrings << endl; - for (uint i1 = 0; i1 < data.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Data[" << i1 << "]: " << data[i1] << endl; - }; - return out.str(); -} - -void NiStringsExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiStringsExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiTextKeyExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - if ( version <= 0x04020200 ) { - NifStream( unknownInt1, in, version ); - }; - NifStream( numTextKeys, in, version ); - textKeys.resize(numTextKeys); - for (uint i1 = 0; i1 < textKeys.size(); i1++) { - NifStream( textKeys[i1], in, version, 1 ); - }; -} - -void NiTextKeyExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - numTextKeys = uint(textKeys.size()); - if ( version <= 0x04020200 ) { - NifStream( unknownInt1, out, version ); - }; - NifStream( numTextKeys, out, version ); - for (uint i1 = 0; i1 < textKeys.size(); i1++) { - NifStream( textKeys[i1], out, version, 1 ); - }; -} - -std::string NiTextKeyExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - numTextKeys = uint(textKeys.size()); - out << " Unknown Int 1: " << unknownInt1 << endl; - out << " Num Text Keys: " << numTextKeys << endl; - for (uint i1 = 0; i1 < textKeys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Text Keys[" << i1 << "]: " << textKeys[i1] << endl; - }; - return out.str(); -} - -void NiTextKeyExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTextKeyExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiTextureEffect::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiDynamicEffect::Read( in, link_stack, version, user_version ); - NifStream( modelProjectionMatrix, in, version ); - NifStream( modelProjectionTransform, in, version ); - NifStream( textureFiltering, in, version ); - NifStream( textureClamping, in, version ); - NifStream( textureType, in, version ); - NifStream( coordinateGenerationType, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( clippingPlane, in, version ); - NifStream( unknownVector, in, version ); - NifStream( unknownFloat, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( ps2L, in, version ); - NifStream( ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( unknownShort, in, version ); - }; -} - -void NiTextureEffect::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiDynamicEffect::Write( out, link_map, version, user_version ); - NifStream( modelProjectionMatrix, out, version ); - NifStream( modelProjectionTransform, out, version ); - NifStream( textureFiltering, out, version ); - NifStream( textureClamping, out, version ); - NifStream( textureType, out, version ); - NifStream( coordinateGenerationType, out, version ); - if ( sourceTexture != NULL ) - NifStream( link_map[StaticCast<NiObject>(sourceTexture)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( clippingPlane, out, version ); - NifStream( unknownVector, out, version ); - NifStream( unknownFloat, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( ps2L, out, version ); - NifStream( ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( unknownShort, out, version ); - }; -} - -std::string NiTextureEffect::InternalAsString( bool verbose ) const { - stringstream out; - out << NiDynamicEffect::asString(); - out << " Model Projection Matrix: " << modelProjectionMatrix << endl; - out << " Model Projection Transform: " << modelProjectionTransform << endl; - out << " Texture Filtering: " << textureFiltering << endl; - out << " Texture Clamping: " << textureClamping << endl; - out << " Texture Type: " << textureType << endl; - out << " Coordinate Generation Type: " << coordinateGenerationType << endl; - out << " Source Texture: " << sourceTexture << endl; - out << " Clipping Plane: " << clippingPlane << endl; - out << " Unknown Vector: " << unknownVector << endl; - out << " Unknown Float: " << unknownFloat << endl; - out << " PS2 L: " << ps2L << endl; - out << " PS2 K: " << ps2K << endl; - out << " Unknown Short: " << unknownShort << endl; - return out.str(); -} - -void NiTextureEffect::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiDynamicEffect::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - sourceTexture = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( sourceTexture == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - sourceTexture = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiTextureEffect::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiDynamicEffect::GetRefs(); - if ( sourceTexture != NULL ) - refs.push_back(StaticCast<NiObject>(sourceTexture)); - return refs; -} - -void NiTextureTransformController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); - NifStream( unknown2, in, version ); - NifStream( textureSlot, in, version ); - NifStream( operation, in, version ); - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiTextureTransformController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); - NifStream( unknown2, out, version ); - NifStream( textureSlot, out, version ); - NifStream( operation, out, version ); - if ( version <= 0x0A010000 ) { - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiTextureTransformController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - out << " Unknown2: " << unknown2 << endl; - out << " Texture Slot: " << textureSlot << endl; - out << " Operation: " << operation << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiTextureTransformController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiFloatData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiTextureTransformController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiTexturingProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiProperty::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A000102 ) { - NifStream( flags, in, version ); - }; - NifStream( applyMode, in, version ); - NifStream( textureCount, in, version ); - NifStream( hasBaseTexture, in, version ); - if ( (hasBaseTexture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( baseTexture.clampMode, in, version ); - NifStream( baseTexture.filterMode, in, version ); - NifStream( baseTexture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( baseTexture.ps2L, in, version ); - NifStream( baseTexture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( baseTexture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( baseTexture.hasTextureTransform, in, version ); - if ( (baseTexture.hasTextureTransform != 0) ) { - NifStream( baseTexture.translation, in, version ); - NifStream( baseTexture.tiling, in, version ); - NifStream( baseTexture.wRotation, in, version ); - NifStream( baseTexture.transformType_, in, version ); - NifStream( baseTexture.centerOffset, in, version ); - }; - }; - }; - NifStream( hasDarkTexture, in, version ); - if ( (hasDarkTexture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( darkTexture.clampMode, in, version ); - NifStream( darkTexture.filterMode, in, version ); - NifStream( darkTexture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( darkTexture.ps2L, in, version ); - NifStream( darkTexture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( darkTexture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( darkTexture.hasTextureTransform, in, version ); - if ( (darkTexture.hasTextureTransform != 0) ) { - NifStream( darkTexture.translation, in, version ); - NifStream( darkTexture.tiling, in, version ); - NifStream( darkTexture.wRotation, in, version ); - NifStream( darkTexture.transformType_, in, version ); - NifStream( darkTexture.centerOffset, in, version ); - }; - }; - }; - NifStream( hasDetailTexture, in, version ); - if ( (hasDetailTexture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( detailTexture.clampMode, in, version ); - NifStream( detailTexture.filterMode, in, version ); - NifStream( detailTexture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( detailTexture.ps2L, in, version ); - NifStream( detailTexture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( detailTexture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( detailTexture.hasTextureTransform, in, version ); - if ( (detailTexture.hasTextureTransform != 0) ) { - NifStream( detailTexture.translation, in, version ); - NifStream( detailTexture.tiling, in, version ); - NifStream( detailTexture.wRotation, in, version ); - NifStream( detailTexture.transformType_, in, version ); - NifStream( detailTexture.centerOffset, in, version ); - }; - }; - }; - NifStream( hasGlossTexture, in, version ); - if ( (hasGlossTexture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( glossTexture.clampMode, in, version ); - NifStream( glossTexture.filterMode, in, version ); - NifStream( glossTexture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( glossTexture.ps2L, in, version ); - NifStream( glossTexture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( glossTexture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( glossTexture.hasTextureTransform, in, version ); - if ( (glossTexture.hasTextureTransform != 0) ) { - NifStream( glossTexture.translation, in, version ); - NifStream( glossTexture.tiling, in, version ); - NifStream( glossTexture.wRotation, in, version ); - NifStream( glossTexture.transformType_, in, version ); - NifStream( glossTexture.centerOffset, in, version ); - }; - }; - }; - NifStream( hasGlowTexture, in, version ); - if ( (hasGlowTexture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( glowTexture.clampMode, in, version ); - NifStream( glowTexture.filterMode, in, version ); - NifStream( glowTexture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( glowTexture.ps2L, in, version ); - NifStream( glowTexture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( glowTexture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( glowTexture.hasTextureTransform, in, version ); - if ( (glowTexture.hasTextureTransform != 0) ) { - NifStream( glowTexture.translation, in, version ); - NifStream( glowTexture.tiling, in, version ); - NifStream( glowTexture.wRotation, in, version ); - NifStream( glowTexture.transformType_, in, version ); - NifStream( glowTexture.centerOffset, in, version ); - }; - }; - }; - NifStream( hasBumpMapTexture, in, version ); - if ( (hasBumpMapTexture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( bumpMapTexture.clampMode, in, version ); - NifStream( bumpMapTexture.filterMode, in, version ); - NifStream( bumpMapTexture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( bumpMapTexture.ps2L, in, version ); - NifStream( bumpMapTexture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( bumpMapTexture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( bumpMapTexture.hasTextureTransform, in, version ); - if ( (bumpMapTexture.hasTextureTransform != 0) ) { - NifStream( bumpMapTexture.translation, in, version ); - NifStream( bumpMapTexture.tiling, in, version ); - NifStream( bumpMapTexture.wRotation, in, version ); - NifStream( bumpMapTexture.transformType_, in, version ); - NifStream( bumpMapTexture.centerOffset, in, version ); - }; - }; - NifStream( bumpMapLumaScale, in, version ); - NifStream( bumpMapLumaOffset, in, version ); - NifStream( bumpMapMatrix, in, version ); - }; - NifStream( hasDecal0Texture, in, version ); - if ( (hasDecal0Texture != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( decal0Texture.clampMode, in, version ); - NifStream( decal0Texture.filterMode, in, version ); - NifStream( decal0Texture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( decal0Texture.ps2L, in, version ); - NifStream( decal0Texture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( decal0Texture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( decal0Texture.hasTextureTransform, in, version ); - if ( (decal0Texture.hasTextureTransform != 0) ) { - NifStream( decal0Texture.translation, in, version ); - NifStream( decal0Texture.tiling, in, version ); - NifStream( decal0Texture.wRotation, in, version ); - NifStream( decal0Texture.transformType_, in, version ); - NifStream( decal0Texture.centerOffset, in, version ); - }; - }; - }; - if ( (textureCount == 8) ) { - NifStream( hasDecal1Texture, in, version ); - }; - if ( version >= 0x14000004 ) { - if ( (((textureCount == 8)) && ((hasDecal1Texture != 0))) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( decal1Texture.clampMode, in, version ); - NifStream( decal1Texture.filterMode, in, version ); - NifStream( decal1Texture.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( decal1Texture.ps2L, in, version ); - NifStream( decal1Texture.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( decal1Texture.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( decal1Texture.hasTextureTransform, in, version ); - if ( (decal1Texture.hasTextureTransform != 0) ) { - NifStream( decal1Texture.translation, in, version ); - NifStream( decal1Texture.tiling, in, version ); - NifStream( decal1Texture.wRotation, in, version ); - NifStream( decal1Texture.transformType_, in, version ); - NifStream( decal1Texture.centerOffset, in, version ); - }; - }; - }; - }; - if ( version >= 0x0A000100 ) { - NifStream( numShaderTextures, in, version ); - shaderTextures.resize(numShaderTextures); - for (uint i2 = 0; i2 < shaderTextures.size(); i2++) { - NifStream( shaderTextures[i2].isUsed, in, version ); - if ( (shaderTextures[i2].isUsed != 0) ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - NifStream( shaderTextures[i2].textureData.clampMode, in, version ); - NifStream( shaderTextures[i2].textureData.filterMode, in, version ); - NifStream( shaderTextures[i2].textureData.textureSet, in, version ); - if ( version <= 0x0A020000 ) { - NifStream( shaderTextures[i2].textureData.ps2L, in, version ); - NifStream( shaderTextures[i2].textureData.ps2K, in, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( shaderTextures[i2].textureData.unknown1, in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( shaderTextures[i2].textureData.hasTextureTransform, in, version ); - if ( (shaderTextures[i2].textureData.hasTextureTransform != 0) ) { - NifStream( shaderTextures[i2].textureData.translation, in, version ); - NifStream( shaderTextures[i2].textureData.tiling, in, version ); - NifStream( shaderTextures[i2].textureData.wRotation, in, version ); - NifStream( shaderTextures[i2].textureData.transformType_, in, version ); - NifStream( shaderTextures[i2].textureData.centerOffset, in, version ); - }; - }; - NifStream( shaderTextures[i2].unknownInt, in, version ); - }; - }; - }; -} - -void NiTexturingProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - numShaderTextures = uint(shaderTextures.size()); - if ( version <= 0x0A000102 ) { - NifStream( flags, out, version ); - }; - NifStream( applyMode, out, version ); - NifStream( textureCount, out, version ); - NifStream( hasBaseTexture, out, version ); - if ( (hasBaseTexture != 0) ) { - if ( baseTexture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(baseTexture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( baseTexture.clampMode, out, version ); - NifStream( baseTexture.filterMode, out, version ); - NifStream( baseTexture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( baseTexture.ps2L, out, version ); - NifStream( baseTexture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( baseTexture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( baseTexture.hasTextureTransform, out, version ); - if ( (baseTexture.hasTextureTransform != 0) ) { - NifStream( baseTexture.translation, out, version ); - NifStream( baseTexture.tiling, out, version ); - NifStream( baseTexture.wRotation, out, version ); - NifStream( baseTexture.transformType_, out, version ); - NifStream( baseTexture.centerOffset, out, version ); - }; - }; - }; - NifStream( hasDarkTexture, out, version ); - if ( (hasDarkTexture != 0) ) { - if ( darkTexture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(darkTexture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( darkTexture.clampMode, out, version ); - NifStream( darkTexture.filterMode, out, version ); - NifStream( darkTexture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( darkTexture.ps2L, out, version ); - NifStream( darkTexture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( darkTexture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( darkTexture.hasTextureTransform, out, version ); - if ( (darkTexture.hasTextureTransform != 0) ) { - NifStream( darkTexture.translation, out, version ); - NifStream( darkTexture.tiling, out, version ); - NifStream( darkTexture.wRotation, out, version ); - NifStream( darkTexture.transformType_, out, version ); - NifStream( darkTexture.centerOffset, out, version ); - }; - }; - }; - NifStream( hasDetailTexture, out, version ); - if ( (hasDetailTexture != 0) ) { - if ( detailTexture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(detailTexture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( detailTexture.clampMode, out, version ); - NifStream( detailTexture.filterMode, out, version ); - NifStream( detailTexture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( detailTexture.ps2L, out, version ); - NifStream( detailTexture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( detailTexture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( detailTexture.hasTextureTransform, out, version ); - if ( (detailTexture.hasTextureTransform != 0) ) { - NifStream( detailTexture.translation, out, version ); - NifStream( detailTexture.tiling, out, version ); - NifStream( detailTexture.wRotation, out, version ); - NifStream( detailTexture.transformType_, out, version ); - NifStream( detailTexture.centerOffset, out, version ); - }; - }; - }; - NifStream( hasGlossTexture, out, version ); - if ( (hasGlossTexture != 0) ) { - if ( glossTexture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(glossTexture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( glossTexture.clampMode, out, version ); - NifStream( glossTexture.filterMode, out, version ); - NifStream( glossTexture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( glossTexture.ps2L, out, version ); - NifStream( glossTexture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( glossTexture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( glossTexture.hasTextureTransform, out, version ); - if ( (glossTexture.hasTextureTransform != 0) ) { - NifStream( glossTexture.translation, out, version ); - NifStream( glossTexture.tiling, out, version ); - NifStream( glossTexture.wRotation, out, version ); - NifStream( glossTexture.transformType_, out, version ); - NifStream( glossTexture.centerOffset, out, version ); - }; - }; - }; - NifStream( hasGlowTexture, out, version ); - if ( (hasGlowTexture != 0) ) { - if ( glowTexture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(glowTexture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( glowTexture.clampMode, out, version ); - NifStream( glowTexture.filterMode, out, version ); - NifStream( glowTexture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( glowTexture.ps2L, out, version ); - NifStream( glowTexture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( glowTexture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( glowTexture.hasTextureTransform, out, version ); - if ( (glowTexture.hasTextureTransform != 0) ) { - NifStream( glowTexture.translation, out, version ); - NifStream( glowTexture.tiling, out, version ); - NifStream( glowTexture.wRotation, out, version ); - NifStream( glowTexture.transformType_, out, version ); - NifStream( glowTexture.centerOffset, out, version ); - }; - }; - }; - NifStream( hasBumpMapTexture, out, version ); - if ( (hasBumpMapTexture != 0) ) { - if ( bumpMapTexture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(bumpMapTexture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( bumpMapTexture.clampMode, out, version ); - NifStream( bumpMapTexture.filterMode, out, version ); - NifStream( bumpMapTexture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( bumpMapTexture.ps2L, out, version ); - NifStream( bumpMapTexture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( bumpMapTexture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( bumpMapTexture.hasTextureTransform, out, version ); - if ( (bumpMapTexture.hasTextureTransform != 0) ) { - NifStream( bumpMapTexture.translation, out, version ); - NifStream( bumpMapTexture.tiling, out, version ); - NifStream( bumpMapTexture.wRotation, out, version ); - NifStream( bumpMapTexture.transformType_, out, version ); - NifStream( bumpMapTexture.centerOffset, out, version ); - }; - }; - NifStream( bumpMapLumaScale, out, version ); - NifStream( bumpMapLumaOffset, out, version ); - NifStream( bumpMapMatrix, out, version ); - }; - NifStream( hasDecal0Texture, out, version ); - if ( (hasDecal0Texture != 0) ) { - if ( decal0Texture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(decal0Texture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( decal0Texture.clampMode, out, version ); - NifStream( decal0Texture.filterMode, out, version ); - NifStream( decal0Texture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( decal0Texture.ps2L, out, version ); - NifStream( decal0Texture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( decal0Texture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( decal0Texture.hasTextureTransform, out, version ); - if ( (decal0Texture.hasTextureTransform != 0) ) { - NifStream( decal0Texture.translation, out, version ); - NifStream( decal0Texture.tiling, out, version ); - NifStream( decal0Texture.wRotation, out, version ); - NifStream( decal0Texture.transformType_, out, version ); - NifStream( decal0Texture.centerOffset, out, version ); - }; - }; - }; - if ( (textureCount == 8) ) { - NifStream( hasDecal1Texture, out, version ); - }; - if ( version >= 0x14000004 ) { - if ( (((textureCount == 8)) && ((hasDecal1Texture != 0))) ) { - if ( decal1Texture.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(decal1Texture.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( decal1Texture.clampMode, out, version ); - NifStream( decal1Texture.filterMode, out, version ); - NifStream( decal1Texture.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( decal1Texture.ps2L, out, version ); - NifStream( decal1Texture.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( decal1Texture.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( decal1Texture.hasTextureTransform, out, version ); - if ( (decal1Texture.hasTextureTransform != 0) ) { - NifStream( decal1Texture.translation, out, version ); - NifStream( decal1Texture.tiling, out, version ); - NifStream( decal1Texture.wRotation, out, version ); - NifStream( decal1Texture.transformType_, out, version ); - NifStream( decal1Texture.centerOffset, out, version ); - }; - }; - }; - }; - if ( version >= 0x0A000100 ) { - NifStream( numShaderTextures, out, version ); - for (uint i2 = 0; i2 < shaderTextures.size(); i2++) { - NifStream( shaderTextures[i2].isUsed, out, version ); - if ( (shaderTextures[i2].isUsed != 0) ) { - if ( shaderTextures[i2].textureData.source != NULL ) - NifStream( link_map[StaticCast<NiObject>(shaderTextures[i2].textureData.source)], out, version ); - else - NifStream( 0xffffffff, out, version ); - NifStream( shaderTextures[i2].textureData.clampMode, out, version ); - NifStream( shaderTextures[i2].textureData.filterMode, out, version ); - NifStream( shaderTextures[i2].textureData.textureSet, out, version ); - if ( version <= 0x0A020000 ) { - NifStream( shaderTextures[i2].textureData.ps2L, out, version ); - NifStream( shaderTextures[i2].textureData.ps2K, out, version ); - }; - if ( version <= 0x0401000C ) { - NifStream( shaderTextures[i2].textureData.unknown1, out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( shaderTextures[i2].textureData.hasTextureTransform, out, version ); - if ( (shaderTextures[i2].textureData.hasTextureTransform != 0) ) { - NifStream( shaderTextures[i2].textureData.translation, out, version ); - NifStream( shaderTextures[i2].textureData.tiling, out, version ); - NifStream( shaderTextures[i2].textureData.wRotation, out, version ); - NifStream( shaderTextures[i2].textureData.transformType_, out, version ); - NifStream( shaderTextures[i2].textureData.centerOffset, out, version ); - }; - }; - NifStream( shaderTextures[i2].unknownInt, out, version ); - }; - }; - }; -} - -std::string NiTexturingProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - numShaderTextures = uint(shaderTextures.size()); - out << " Flags: " << flags << endl; - out << " Apply Mode: " << applyMode << endl; - out << " Texture Count: " << textureCount << endl; - out << " Has Base Texture: " << hasBaseTexture << endl; - if ( (hasBaseTexture != 0) ) { - out << " Source: " << baseTexture.source << endl; - out << " Clamp Mode: " << baseTexture.clampMode << endl; - out << " Filter Mode: " << baseTexture.filterMode << endl; - out << " Texture Set: " << baseTexture.textureSet << endl; - out << " PS2 L: " << baseTexture.ps2L << endl; - out << " PS2 K: " << baseTexture.ps2K << endl; - out << " Unknown1: " << baseTexture.unknown1 << endl; - out << " Has Texture Transform: " << baseTexture.hasTextureTransform << endl; - if ( (baseTexture.hasTextureTransform != 0) ) { - out << " Translation: " << baseTexture.translation << endl; - out << " Tiling: " << baseTexture.tiling << endl; - out << " W Rotation: " << baseTexture.wRotation << endl; - out << " Transform Type?: " << baseTexture.transformType_ << endl; - out << " Center Offset: " << baseTexture.centerOffset << endl; - }; - }; - out << " Has Dark Texture: " << hasDarkTexture << endl; - if ( (hasDarkTexture != 0) ) { - out << " Source: " << darkTexture.source << endl; - out << " Clamp Mode: " << darkTexture.clampMode << endl; - out << " Filter Mode: " << darkTexture.filterMode << endl; - out << " Texture Set: " << darkTexture.textureSet << endl; - out << " PS2 L: " << darkTexture.ps2L << endl; - out << " PS2 K: " << darkTexture.ps2K << endl; - out << " Unknown1: " << darkTexture.unknown1 << endl; - out << " Has Texture Transform: " << darkTexture.hasTextureTransform << endl; - if ( (darkTexture.hasTextureTransform != 0) ) { - out << " Translation: " << darkTexture.translation << endl; - out << " Tiling: " << darkTexture.tiling << endl; - out << " W Rotation: " << darkTexture.wRotation << endl; - out << " Transform Type?: " << darkTexture.transformType_ << endl; - out << " Center Offset: " << darkTexture.centerOffset << endl; - }; - }; - out << " Has Detail Texture: " << hasDetailTexture << endl; - if ( (hasDetailTexture != 0) ) { - out << " Source: " << detailTexture.source << endl; - out << " Clamp Mode: " << detailTexture.clampMode << endl; - out << " Filter Mode: " << detailTexture.filterMode << endl; - out << " Texture Set: " << detailTexture.textureSet << endl; - out << " PS2 L: " << detailTexture.ps2L << endl; - out << " PS2 K: " << detailTexture.ps2K << endl; - out << " Unknown1: " << detailTexture.unknown1 << endl; - out << " Has Texture Transform: " << detailTexture.hasTextureTransform << endl; - if ( (detailTexture.hasTextureTransform != 0) ) { - out << " Translation: " << detailTexture.translation << endl; - out << " Tiling: " << detailTexture.tiling << endl; - out << " W Rotation: " << detailTexture.wRotation << endl; - out << " Transform Type?: " << detailTexture.transformType_ << endl; - out << " Center Offset: " << detailTexture.centerOffset << endl; - }; - }; - out << " Has Gloss Texture: " << hasGlossTexture << endl; - if ( (hasGlossTexture != 0) ) { - out << " Source: " << glossTexture.source << endl; - out << " Clamp Mode: " << glossTexture.clampMode << endl; - out << " Filter Mode: " << glossTexture.filterMode << endl; - out << " Texture Set: " << glossTexture.textureSet << endl; - out << " PS2 L: " << glossTexture.ps2L << endl; - out << " PS2 K: " << glossTexture.ps2K << endl; - out << " Unknown1: " << glossTexture.unknown1 << endl; - out << " Has Texture Transform: " << glossTexture.hasTextureTransform << endl; - if ( (glossTexture.hasTextureTransform != 0) ) { - out << " Translation: " << glossTexture.translation << endl; - out << " Tiling: " << glossTexture.tiling << endl; - out << " W Rotation: " << glossTexture.wRotation << endl; - out << " Transform Type?: " << glossTexture.transformType_ << endl; - out << " Center Offset: " << glossTexture.centerOffset << endl; - }; - }; - out << " Has Glow Texture: " << hasGlowTexture << endl; - if ( (hasGlowTexture != 0) ) { - out << " Source: " << glowTexture.source << endl; - out << " Clamp Mode: " << glowTexture.clampMode << endl; - out << " Filter Mode: " << glowTexture.filterMode << endl; - out << " Texture Set: " << glowTexture.textureSet << endl; - out << " PS2 L: " << glowTexture.ps2L << endl; - out << " PS2 K: " << glowTexture.ps2K << endl; - out << " Unknown1: " << glowTexture.unknown1 << endl; - out << " Has Texture Transform: " << glowTexture.hasTextureTransform << endl; - if ( (glowTexture.hasTextureTransform != 0) ) { - out << " Translation: " << glowTexture.translation << endl; - out << " Tiling: " << glowTexture.tiling << endl; - out << " W Rotation: " << glowTexture.wRotation << endl; - out << " Transform Type?: " << glowTexture.transformType_ << endl; - out << " Center Offset: " << glowTexture.centerOffset << endl; - }; - }; - out << " Has Bump Map Texture: " << hasBumpMapTexture << endl; - if ( (hasBumpMapTexture != 0) ) { - out << " Source: " << bumpMapTexture.source << endl; - out << " Clamp Mode: " << bumpMapTexture.clampMode << endl; - out << " Filter Mode: " << bumpMapTexture.filterMode << endl; - out << " Texture Set: " << bumpMapTexture.textureSet << endl; - out << " PS2 L: " << bumpMapTexture.ps2L << endl; - out << " PS2 K: " << bumpMapTexture.ps2K << endl; - out << " Unknown1: " << bumpMapTexture.unknown1 << endl; - out << " Has Texture Transform: " << bumpMapTexture.hasTextureTransform << endl; - if ( (bumpMapTexture.hasTextureTransform != 0) ) { - out << " Translation: " << bumpMapTexture.translation << endl; - out << " Tiling: " << bumpMapTexture.tiling << endl; - out << " W Rotation: " << bumpMapTexture.wRotation << endl; - out << " Transform Type?: " << bumpMapTexture.transformType_ << endl; - out << " Center Offset: " << bumpMapTexture.centerOffset << endl; - }; - out << " Bump Map Luma Scale: " << bumpMapLumaScale << endl; - out << " Bump Map Luma Offset: " << bumpMapLumaOffset << endl; - out << " Bump Map Matrix: " << bumpMapMatrix << endl; - }; - out << " Has Decal 0 Texture: " << hasDecal0Texture << endl; - if ( (hasDecal0Texture != 0) ) { - out << " Source: " << decal0Texture.source << endl; - out << " Clamp Mode: " << decal0Texture.clampMode << endl; - out << " Filter Mode: " << decal0Texture.filterMode << endl; - out << " Texture Set: " << decal0Texture.textureSet << endl; - out << " PS2 L: " << decal0Texture.ps2L << endl; - out << " PS2 K: " << decal0Texture.ps2K << endl; - out << " Unknown1: " << decal0Texture.unknown1 << endl; - out << " Has Texture Transform: " << decal0Texture.hasTextureTransform << endl; - if ( (decal0Texture.hasTextureTransform != 0) ) { - out << " Translation: " << decal0Texture.translation << endl; - out << " Tiling: " << decal0Texture.tiling << endl; - out << " W Rotation: " << decal0Texture.wRotation << endl; - out << " Transform Type?: " << decal0Texture.transformType_ << endl; - out << " Center Offset: " << decal0Texture.centerOffset << endl; - }; - }; - if ( (textureCount == 8) ) { - out << " Has Decal 1 Texture: " << hasDecal1Texture << endl; - }; - if ( (((textureCount == 8)) && ((hasDecal1Texture != 0))) ) { - out << " Source: " << decal1Texture.source << endl; - out << " Clamp Mode: " << decal1Texture.clampMode << endl; - out << " Filter Mode: " << decal1Texture.filterMode << endl; - out << " Texture Set: " << decal1Texture.textureSet << endl; - out << " PS2 L: " << decal1Texture.ps2L << endl; - out << " PS2 K: " << decal1Texture.ps2K << endl; - out << " Unknown1: " << decal1Texture.unknown1 << endl; - out << " Has Texture Transform: " << decal1Texture.hasTextureTransform << endl; - if ( (decal1Texture.hasTextureTransform != 0) ) { - out << " Translation: " << decal1Texture.translation << endl; - out << " Tiling: " << decal1Texture.tiling << endl; - out << " W Rotation: " << decal1Texture.wRotation << endl; - out << " Transform Type?: " << decal1Texture.transformType_ << endl; - out << " Center Offset: " << decal1Texture.centerOffset << endl; - }; - }; - out << " Num Shader Textures: " << numShaderTextures << endl; - for (uint i1 = 0; i1 < shaderTextures.size(); i1++) { - out << " Is Used: " << shaderTextures[i1].isUsed << endl; - if ( (shaderTextures[i1].isUsed != 0) ) { - out << " Source: " << shaderTextures[i1].textureData.source << endl; - out << " Clamp Mode: " << shaderTextures[i1].textureData.clampMode << endl; - out << " Filter Mode: " << shaderTextures[i1].textureData.filterMode << endl; - out << " Texture Set: " << shaderTextures[i1].textureData.textureSet << endl; - out << " PS2 L: " << shaderTextures[i1].textureData.ps2L << endl; - out << " PS2 K: " << shaderTextures[i1].textureData.ps2K << endl; - out << " Unknown1: " << shaderTextures[i1].textureData.unknown1 << endl; - out << " Has Texture Transform: " << shaderTextures[i1].textureData.hasTextureTransform << endl; - if ( (shaderTextures[i1].textureData.hasTextureTransform != 0) ) { - out << " Translation: " << shaderTextures[i1].textureData.translation << endl; - out << " Tiling: " << shaderTextures[i1].textureData.tiling << endl; - out << " W Rotation: " << shaderTextures[i1].textureData.wRotation << endl; - out << " Transform Type?: " << shaderTextures[i1].textureData.transformType_ << endl; - out << " Center Offset: " << shaderTextures[i1].textureData.centerOffset << endl; - }; - out << " Unknown Int: " << shaderTextures[i1].unknownInt << endl; - }; - }; - return out.str(); -} - -void NiTexturingProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); - if ( (hasBaseTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - baseTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( baseTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - baseTexture.source = NULL; - link_stack.pop_front(); - }; - if ( (hasDarkTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - darkTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( darkTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - darkTexture.source = NULL; - link_stack.pop_front(); - }; - if ( (hasDetailTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - detailTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( detailTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - detailTexture.source = NULL; - link_stack.pop_front(); - }; - if ( (hasGlossTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - glossTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( glossTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - glossTexture.source = NULL; - link_stack.pop_front(); - }; - if ( (hasGlowTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - glowTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( glowTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - glowTexture.source = NULL; - link_stack.pop_front(); - }; - if ( (hasBumpMapTexture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - bumpMapTexture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( bumpMapTexture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - bumpMapTexture.source = NULL; - link_stack.pop_front(); - }; - if ( (hasDecal0Texture != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - decal0Texture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( decal0Texture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - decal0Texture.source = NULL; - link_stack.pop_front(); - }; - if ( version >= 0x14000004 ) { - if ( (((textureCount == 8)) && ((hasDecal1Texture != 0))) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - decal1Texture.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( decal1Texture.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - decal1Texture.source = NULL; - link_stack.pop_front(); - }; - }; - if ( version >= 0x0A000100 ) { - for (uint i2 = 0; i2 < shaderTextures.size(); i2++) { - if ( (shaderTextures[i2].isUsed != 0) ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - shaderTextures[i2].textureData.source = DynamicCast<NiSourceTexture>(objects[link_stack.front()]); - if ( shaderTextures[i2].textureData.source == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - shaderTextures[i2].textureData.source = NULL; - link_stack.pop_front(); - }; - }; - }; -} - -std::list<NiObjectRef> NiTexturingProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - if ( baseTexture.source != NULL ) - refs.push_back(StaticCast<NiObject>(baseTexture.source)); - if ( darkTexture.source != NULL ) - refs.push_back(StaticCast<NiObject>(darkTexture.source)); - if ( detailTexture.source != NULL ) - refs.push_back(StaticCast<NiObject>(detailTexture.source)); - if ( glossTexture.source != NULL ) - refs.push_back(StaticCast<NiObject>(glossTexture.source)); - if ( glowTexture.source != NULL ) - refs.push_back(StaticCast<NiObject>(glowTexture.source)); - if ( bumpMapTexture.source != NULL ) - refs.push_back(StaticCast<NiObject>(bumpMapTexture.source)); - if ( decal0Texture.source != NULL ) - refs.push_back(StaticCast<NiObject>(decal0Texture.source)); - if ( decal1Texture.source != NULL ) - refs.push_back(StaticCast<NiObject>(decal1Texture.source)); - for (uint i1 = 0; i1 < shaderTextures.size(); i1++) { - if ( shaderTextures[i1].textureData.source != NULL ) - refs.push_back(StaticCast<NiObject>(shaderTextures[i1].textureData.source)); - }; - return refs; -} - -void NiTransformController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); -} - -void NiTransformController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); -} - -std::string NiTransformController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - return out.str(); -} - -void NiTransformController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTransformController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - return refs; -} - -void NiTransformData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiKeyframeData::Read( in, link_stack, version, user_version ); -} - -void NiTransformData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiKeyframeData::Write( out, link_map, version, user_version ); -} - -std::string NiTransformData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiKeyframeData::asString(); - return out.str(); -} - -void NiTransformData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiKeyframeData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTransformData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiKeyframeData::GetRefs(); - return refs; -} - -void NiTransformInterpolator::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiInterpolator::Read( in, link_stack, version, user_version ); - NifStream( translation, in, version ); - NifStream( rotation, in, version ); - NifStream( scale, in, version ); - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - for (uint i2 = 0; i2 < 3; i2++) { - NifStream( unknownBytes[i2], in, version ); - }; - }; - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiTransformInterpolator::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiInterpolator::Write( out, link_map, version, user_version ); - NifStream( translation, out, version ); - NifStream( rotation, out, version ); - NifStream( scale, out, version ); - if ( ( version >= 0x0A01006A ) && ( version <= 0x0A01006A ) ) { - for (uint i2 = 0; i2 < 3; i2++) { - NifStream( unknownBytes[i2], out, version ); - }; - }; - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiTransformInterpolator::InternalAsString( bool verbose ) const { - stringstream out; - out << NiInterpolator::asString(); - out << " Translation: " << translation << endl; - out << " Rotation: " << rotation << endl; - out << " Scale: " << scale << endl; - for (uint i1 = 0; i1 < 3; i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Unknown Bytes[" << i1 << "]: " << unknownBytes[i1] << endl; - }; - out << " Data: " << data << endl; - return out.str(); -} - -void NiTransformInterpolator::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiInterpolator::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiTransformData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiTransformInterpolator::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiInterpolator::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiTriShape::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeom::Read( in, link_stack, version, user_version ); -} - -void NiTriShape::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeom::Write( out, link_map, version, user_version ); -} - -std::string NiTriShape::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeom::asString(); - return out.str(); -} - -void NiTriShape::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTriShape::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeom::GetRefs(); - return refs; -} - -void NiTriShapeData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::Read( in, link_stack, version, user_version ); - NifStream( numTriangles, in, version ); - NifStream( numTrianglePoints, in, version ); - if ( version >= 0x0A010000 ) { - NifStream( hasTriangles, in, version ); - }; - if ( version <= 0x0A000102 ) { - triangles.resize(numTriangles); - for (uint i2 = 0; i2 < triangles.size(); i2++) { - NifStream( triangles[i2], in, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (hasTriangles != 0) ) { - triangles.resize(numTriangles); - for (uint i3 = 0; i3 < triangles.size(); i3++) { - NifStream( triangles[i3], in, version ); - }; - }; - }; - NifStream( numMatchGroups, in, version ); - matchGroups.resize(numMatchGroups); - for (uint i1 = 0; i1 < matchGroups.size(); i1++) { - NifStream( matchGroups[i1].numVertices, in, version ); - matchGroups[i1].vertexIndices.resize(matchGroups[i1].numVertices); - for (uint i2 = 0; i2 < matchGroups[i1].vertexIndices.size(); i2++) { - NifStream( matchGroups[i1].vertexIndices[i2], in, version ); - }; - }; -} - -void NiTriShapeData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeomData::Write( out, link_map, version, user_version ); - numMatchGroups = ushort(matchGroups.size()); - numTriangles = ushort(triangles.size()); - NifStream( numTriangles, out, version ); - NifStream( numTrianglePoints, out, version ); - if ( version >= 0x0A010000 ) { - NifStream( hasTriangles, out, version ); - }; - if ( version <= 0x0A000102 ) { - for (uint i2 = 0; i2 < triangles.size(); i2++) { - NifStream( triangles[i2], out, version ); - }; - }; - if ( version >= 0x0A010000 ) { - if ( (hasTriangles != 0) ) { - for (uint i3 = 0; i3 < triangles.size(); i3++) { - NifStream( triangles[i3], out, version ); - }; - }; - }; - NifStream( numMatchGroups, out, version ); - for (uint i1 = 0; i1 < matchGroups.size(); i1++) { - matchGroups[i1].numVertices = ushort(matchGroups[i1].vertexIndices.size()); - NifStream( matchGroups[i1].numVertices, out, version ); - for (uint i2 = 0; i2 < matchGroups[i1].vertexIndices.size(); i2++) { - NifStream( matchGroups[i1].vertexIndices[i2], out, version ); - }; - }; -} - -std::string NiTriShapeData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeomData::asString(); - numMatchGroups = ushort(matchGroups.size()); - numTriangles = ushort(triangles.size()); - out << " Num Triangles: " << numTriangles << endl; - out << " Num Triangle Points: " << numTrianglePoints << endl; - out << " Has Triangles: " << hasTriangles << endl; - for (uint i1 = 0; i1 < triangles.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Triangles[" << i1 << "]: " << triangles[i1] << endl; - }; - out << " Num Match Groups: " << numMatchGroups << endl; - for (uint i1 = 0; i1 < matchGroups.size(); i1++) { - matchGroups[i1].numVertices = ushort(matchGroups[i1].vertexIndices.size()); - out << " Num Vertices: " << matchGroups[i1].numVertices << endl; - for (uint i2 = 0; i2 < matchGroups[i1].vertexIndices.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vertex Indices[" << i2 << "]: " << matchGroups[i1].vertexIndices[i2] << endl; - }; - }; - return out.str(); -} - -void NiTriShapeData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTriShapeData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeomData::GetRefs(); - return refs; -} - -void NiTriStrips::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeom::Read( in, link_stack, version, user_version ); -} - -void NiTriStrips::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeom::Write( out, link_map, version, user_version ); -} - -std::string NiTriStrips::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeom::asString(); - return out.str(); -} - -void NiTriStrips::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeom::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTriStrips::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeom::GetRefs(); - return refs; -} - -void NiTriStripsData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::Read( in, link_stack, version, user_version ); - NifStream( numTriangles, in, version ); - NifStream( numStrips, in, version ); - stripLengths.resize(numStrips); - for (uint i1 = 0; i1 < stripLengths.size(); i1++) { - NifStream( stripLengths[i1], in, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( hasPoints, in, version ); - }; - if ( version <= 0x0A000102 ) { - points.resize(numStrips); - for (uint i2 = 0; i2 < points.size(); i2++) { - points[i2].resize(stripLengths[i2]); - for (uint i3 = 0; i3 < stripLengths[i2]; i3++) { - NifStream( points[i2][i3], in, version ); - }; - }; - }; - if ( version >= 0x0A010000 ) { - if ( (hasPoints != 0) ) { - points.resize(numStrips); - for (uint i3 = 0; i3 < points.size(); i3++) { - points[i3].resize(stripLengths[i3]); - for (uint i4 = 0; i4 < stripLengths[i3]; i4++) { - NifStream( points[i3][i4], in, version ); - }; - }; - }; - }; -} - -void NiTriStripsData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTriBasedGeomData::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < points.size(); i1++) - stripLengths[i1] = ushort(points[i1].size()); - numStrips = ushort(stripLengths.size()); - NifStream( numTriangles, out, version ); - NifStream( numStrips, out, version ); - for (uint i1 = 0; i1 < stripLengths.size(); i1++) { - NifStream( stripLengths[i1], out, version ); - }; - if ( version >= 0x0A010000 ) { - NifStream( hasPoints, out, version ); - }; - if ( version <= 0x0A000102 ) { - for (uint i2 = 0; i2 < points.size(); i2++) { - for (uint i3 = 0; i3 < stripLengths[i2]; i3++) { - NifStream( points[i2][i3], out, version ); - }; - }; - }; - if ( version >= 0x0A010000 ) { - if ( (hasPoints != 0) ) { - for (uint i3 = 0; i3 < points.size(); i3++) { - for (uint i4 = 0; i4 < stripLengths[i3]; i4++) { - NifStream( points[i3][i4], out, version ); - }; - }; - }; - }; -} - -std::string NiTriStripsData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTriBasedGeomData::asString(); - for (uint i1 = 0; i1 < points.size(); i1++) - stripLengths[i1] = ushort(points[i1].size()); - numStrips = ushort(stripLengths.size()); - out << " Num Triangles: " << numTriangles << endl; - out << " Num Strips: " << numStrips << endl; - for (uint i1 = 0; i1 < stripLengths.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Strip Lengths[" << i1 << "]: " << stripLengths[i1] << endl; - }; - out << " Has Points: " << hasPoints << endl; - for (uint i1 = 0; i1 < points.size(); i1++) { - for (uint i2 = 0; i2 < stripLengths[i1]; i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Points[" << i1 << "][" << i2 << "]: " << points[i1][i2] << endl; - }; - }; - return out.str(); -} - -void NiTriStripsData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTriBasedGeomData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiTriStripsData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTriBasedGeomData::GetRefs(); - return refs; -} - -void NiUVController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiTimeController::Read( in, link_stack, version, user_version ); - NifStream( unknownShort, in, version ); - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); -} - -void NiUVController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiTimeController::Write( out, link_map, version, user_version ); - NifStream( unknownShort, out, version ); - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); -} - -std::string NiUVController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiTimeController::asString(); - out << " Unknown Short: " << unknownShort << endl; - out << " Data: " << data << endl; - return out.str(); -} - -void NiUVController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiTimeController::FixLinks( objects, link_stack, version, user_version ); - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiUVData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); -} - -std::list<NiObjectRef> NiUVController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiTimeController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiUVData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::Read( in, link_stack, version, user_version ); - for (uint i1 = 0; i1 < 4; i1++) { - NifStream( uvGroups[i1].numKeys, in, version ); - if ( (uvGroups[i1].numKeys != 0) ) { - NifStream( uvGroups[i1].interpolation, in, version ); - }; - uvGroups[i1].keys.resize(uvGroups[i1].numKeys); - for (uint i2 = 0; i2 < uvGroups[i1].keys.size(); i2++) { - NifStream( uvGroups[i1].keys[i2], in, version, uvGroups[i1].interpolation ); - }; - }; -} - -void NiUVData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiObject::Write( out, link_map, version, user_version ); - for (uint i1 = 0; i1 < 4; i1++) { - uvGroups[i1].numKeys = uint(uvGroups[i1].keys.size()); - NifStream( uvGroups[i1].numKeys, out, version ); - if ( (uvGroups[i1].numKeys != 0) ) { - NifStream( uvGroups[i1].interpolation, out, version ); - }; - for (uint i2 = 0; i2 < uvGroups[i1].keys.size(); i2++) { - NifStream( uvGroups[i1].keys[i2], out, version, uvGroups[i1].interpolation ); - }; - }; -} - -std::string NiUVData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiObject::asString(); - for (uint i1 = 0; i1 < 4; i1++) { - uvGroups[i1].numKeys = uint(uvGroups[i1].keys.size()); - out << " Num Keys: " << uvGroups[i1].numKeys << endl; - if ( (uvGroups[i1].numKeys != 0) ) { - out << " Interpolation: " << uvGroups[i1].interpolation << endl; - }; - for (uint i2 = 0; i2 < uvGroups[i1].keys.size(); i2++) { - if ( !verbose && ( i2 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Keys[" << i2 << "]: " << uvGroups[i1].keys[i2] << endl; - }; - }; - return out.str(); -} - -void NiUVData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiObject::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiUVData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiObject::GetRefs(); - return refs; -} - -void NiVectorExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( vectorData, in, version ); - NifStream( unknownFloat, in, version ); -} - -void NiVectorExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - NifStream( vectorData, out, version ); - NifStream( unknownFloat, out, version ); -} - -std::string NiVectorExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - out << " Vector Data: " << vectorData << endl; - out << " Unknown Float: " << unknownFloat << endl; - return out.str(); -} - -void NiVectorExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiVectorExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiVertexColorProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); - NifStream( vertexMode, in, version ); - NifStream( lightingMode, in, version ); -} - -void NiVertexColorProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); - NifStream( vertexMode, out, version ); - NifStream( lightingMode, out, version ); -} - -std::string NiVertexColorProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - out << " Vertex Mode: " << vertexMode << endl; - out << " Lighting Mode: " << lightingMode << endl; - return out.str(); -} - -void NiVertexColorProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiVertexColorProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiVertWeightsExtraData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::Read( in, link_stack, version, user_version ); - NifStream( numBytes, in, version ); - NifStream( numVertices, in, version ); - weight.resize(numVertices); - for (uint i1 = 0; i1 < weight.size(); i1++) { - NifStream( weight[i1], in, version ); - }; -} - -void NiVertWeightsExtraData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiExtraData::Write( out, link_map, version, user_version ); - numVertices = ushort(weight.size()); - NifStream( numBytes, out, version ); - NifStream( numVertices, out, version ); - for (uint i1 = 0; i1 < weight.size(); i1++) { - NifStream( weight[i1], out, version ); - }; -} - -std::string NiVertWeightsExtraData::InternalAsString( bool verbose ) const { - stringstream out; - out << NiExtraData::asString(); - numVertices = ushort(weight.size()); - out << " Num Bytes: " << numBytes << endl; - out << " Num Vertices: " << numVertices << endl; - for (uint i1 = 0; i1 < weight.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Weight[" << i1 << "]: " << weight[i1] << endl; - }; - return out.str(); -} - -void NiVertWeightsExtraData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiExtraData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiVertWeightsExtraData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiExtraData::GetRefs(); - return refs; -} - -void NiVisController::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - uint block_num; - NiSingleInterpolatorController::Read( in, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - NifStream( block_num, in, version ); - link_stack.push_back( block_num ); - }; -} - -void NiVisController::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiSingleInterpolatorController::Write( out, link_map, version, user_version ); - if ( version <= 0x0A010000 ) { - if ( data != NULL ) - NifStream( link_map[StaticCast<NiObject>(data)], out, version ); - else - NifStream( 0xffffffff, out, version ); - }; -} - -std::string NiVisController::InternalAsString( bool verbose ) const { - stringstream out; - out << NiSingleInterpolatorController::asString(); - out << " Data: " << data << endl; - return out.str(); -} - -void NiVisController::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiSingleInterpolatorController::FixLinks( objects, link_stack, version, user_version ); - if ( version <= 0x0A010000 ) { - if (link_stack.empty()) - throw runtime_error("Trying to pop a link from empty stack. This is probably a bug."); - if (link_stack.front() != 0xffffffff) { - data = DynamicCast<NiVisData>(objects[link_stack.front()]); - if ( data == NULL ) - throw runtime_error("Link could not be cast to required type during file read. This NIF file may be invalid or improperly understood."); - } else - data = NULL; - link_stack.pop_front(); - }; -} - -std::list<NiObjectRef> NiVisController::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiSingleInterpolatorController::GetRefs(); - if ( data != NULL ) - refs.push_back(StaticCast<NiObject>(data)); - return refs; -} - -void NiVisData::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::Read( in, link_stack, version, user_version ); - NifStream( numVisKeys, in, version ); - visKeys.resize(numVisKeys); - for (uint i1 = 0; i1 < visKeys.size(); i1++) { - NifStream( visKeys[i1], in, version, 1 ); - }; -} - -void NiVisData::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AKeyedData::Write( out, link_map, version, user_version ); - numVisKeys = uint(visKeys.size()); - NifStream( numVisKeys, out, version ); - for (uint i1 = 0; i1 < visKeys.size(); i1++) { - NifStream( visKeys[i1], out, version, 1 ); - }; -} - -std::string NiVisData::InternalAsString( bool verbose ) const { - stringstream out; - out << AKeyedData::asString(); - numVisKeys = uint(visKeys.size()); - out << " Num Vis Keys: " << numVisKeys << endl; - for (uint i1 = 0; i1 < visKeys.size(); i1++) { - if ( !verbose && ( i1 > MAXARRAYDUMP ) ) { - out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl; - break; - }; - out << " Vis Keys[" << i1 << "]: " << visKeys[i1] << endl; - }; - return out.str(); -} - -void NiVisData::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AKeyedData::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiVisData::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = AKeyedData::GetRefs(); - return refs; -} - -void NiWireframeProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); -} - -void NiWireframeProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); -} - -std::string NiWireframeProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - return out.str(); -} - -void NiWireframeProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiWireframeProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void NiZBufferProperty::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::Read( in, link_stack, version, user_version ); - NifStream( flags, in, version ); - if ( version >= 0x0401000C ) { - NifStream( function, in, version ); - }; -} - -void NiZBufferProperty::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiProperty::Write( out, link_map, version, user_version ); - NifStream( flags, out, version ); - if ( version >= 0x0401000C ) { - NifStream( function, out, version ); - }; -} - -std::string NiZBufferProperty::InternalAsString( bool verbose ) const { - stringstream out; - out << NiProperty::asString(); - out << " Flags: " << flags << endl; - out << " Function: " << function << endl; - return out.str(); -} - -void NiZBufferProperty::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiProperty::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> NiZBufferProperty::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiProperty::GetRefs(); - return refs; -} - -void RootCollisionNode::InternalRead( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::Read( in, link_stack, version, user_version ); -} - -void RootCollisionNode::InternalWrite( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NiNode::Write( out, link_map, version, user_version ); -} - -std::string RootCollisionNode::InternalAsString( bool verbose ) const { - stringstream out; - out << NiNode::asString(); - return out.str(); -} - -void RootCollisionNode::InternalFixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NiNode::FixLinks( objects, link_stack, version, user_version ); -} - -std::list<NiObjectRef> RootCollisionNode::InternalGetRefs() const { - list<Ref<NiObject> > refs; - refs = NiNode::GetRefs(); - return refs; -} - diff --git a/NifExport/niflib/kfm.cpp b/NifExport/niflib/kfm.cpp deleted file mode 100755 index f76a66f..0000000 --- a/NifExport/niflib/kfm.cpp +++ /dev/null @@ -1,140 +0,0 @@ -//--Kfm Functions--// - -#include "kfm.h" -#include "NIF_IO.h" - -void KfmEventString::Read( istream & in, unsigned int version ) { - unk_int = ReadUInt(in); - event = ReadString(in); -}; - -void KfmEventString::Write( ostream & out, unsigned int version ) { - WriteUInt(unk_int, out); - WriteString(event, out); -}; - -void KfmEvent::Read( istream & in, uint version ) { - id = ReadUInt(in); - type = ReadUInt(in); - if ( type != 5 ) { - unk_float = ReadFloat(in); - event_strings.resize(ReadUInt(in)); - for ( vector<KfmEventString>::iterator it = event_strings.begin(); it != event_strings.end(); it++ ) it->Read(in, version); - unk_int3 = ReadUInt(in); - }; -}; - -void KfmAction::Read( istream & in, uint version ) { - if ( version <= VER_KFM_1_2_4b ) action_name = ReadString(in); - action_filename = ReadString(in); - unk_int1 = ReadUInt(in); - events.resize(ReadUInt(in)); - for ( vector<KfmEvent>::iterator it = events.begin(); it != events.end(); it++ ) it->Read(in, version); - unk_int2 = ReadUInt(in); -}; - -unsigned int Kfm::Read( string const & file_name ) { - ifstream in( file_name.c_str(), ifstream::binary ); - unsigned int version = Read(in); - if ( in.eof() ) - throw runtime_error("End of file reached prematurely. This KFM may be corrupt or improperly supported."); - ReadByte( in ); // this should fail, and trigger the in.eof() flag - if ( ! in.eof() ) - throw runtime_error("End of file not reached. This KFM may be corrupt or improperly supported."); - return version; -}; - -unsigned int Kfm::Read( istream & in ) { - //--Read Header--// - char header_string[64]; - in.getline( header_string, 64 ); - string headerstr(header_string); - - // make sure this is a KFM file - if ( headerstr.substr(0, 26) != ";Gamebryo KFM File Version" ) { - version = VER_INVALID; - return version; - }; - - // supported versions - if ( headerstr == ";Gamebryo KFM File Version 2.0.0.0b" ) version = VER_KFM_2_0_0_0b; - else if ( headerstr == ";Gamebryo KFM File Version 1.2.4b" ) version = VER_KFM_1_2_4b; - //else if ( headerstr == ";Gamebryo KFM File Version 1.0" ) version = VER_KFM_1_0; - //else if ( headerstr == ";Gamebryo KFM File Version 1.0\r" ) version = VER_KFM_1_0; // Windows eol style - else { - version = VER_UNSUPPORTED; - return version; - }; - - //--Read remainder--// - if (version == VER_KFM_1_0) { - // TODO write a parser - } else { - if (version >= VER_KFM_2_0_0_0b) unk_byte = ReadByte(in); - else unk_byte = 1; - nif_filename = ReadString(in); - master = ReadString(in); - unk_int1 = ReadUInt(in); - unk_int2 = ReadUInt(in); - unk_float1 = ReadFloat(in); - unk_float2 = ReadFloat(in); - actions.resize(ReadUInt(in)); - unk_int3 = ReadUInt(in); - for ( vector<KfmAction>::iterator it = actions.begin(); it != actions.end(); it++ ) it->Read(in, version); - }; - - // Retrieve action names - if ( version >= VER_KFM_2_0_0_0b ) { - string model_name = nif_filename.substr(0, nif_filename.length()-4); // strip .nif extension - for ( vector<KfmAction>::iterator it = actions.begin(); it != actions.end(); it++ ) { - string action_name = it->action_filename.substr(0, it->action_filename.length()-3); // strip .kf extension - if (action_name.find( model_name + "_" ) == 0) - action_name = action_name.substr(model_name.length() + 1, string::npos); - if (action_name.find( master + "_" ) == 0) - action_name = action_name.substr(master.length() + 1, string::npos); - it->action_name = action_name; - }; - }; - - return version; -}; - -/* -void Kfm::Write( ostream & out, uint version ) { - if ( version == VER_KFM_1_0 ) { - // handle this case seperately - out << ";Gamebryo KFM File Version 1.0" << endl; - // TODO write the rest of the data - } else { - if ( version == VER_KFM_1_2_4b ) - out.write(";Gamebryo KFM File Version 1.2.4b\n", 34); - else if ( version == VER_KFM_2_0_0_0b ) - out.write(";Gamebryo KFM File Version 2.0.0.0b\n", 37); - else throw runtime_error("Cannot write KFM file of this version."); - }; -}; -*/ - -blk_ref Kfm::MergeActions( string const & path ) { - // Read NIF file - cout << path + '\\' + nif_filename << endl; - blk_ref nif = ReadNifTree( path + '\\' + nif_filename); - - // Read Kf files - vector<blk_ref> kf; - for ( vector<KfmAction>::iterator it = actions.begin(); it != actions.end(); it++ ) { - string action_filename = path + '\\' + it->action_filename; - // Check if the file exists. - // Probably we should check some other field in the Kfm file to determine this... - bool exists = false; - fstream fin; - fin.open(action_filename.c_str(), ios::in); - if( fin.is_open() ) exists = true; - fin.close(); - // Import it, if it exists. - if (exists) kf.push_back( ReadNifTree(action_filename) ); - }; - - // TODO: merge everything into the nif file - return nif; -} diff --git a/NifExport/niflib/kfm.h b/NifExport/niflib/kfm.h deleted file mode 100755 index e1689fe..0000000 --- a/NifExport/niflib/kfm.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _KFM_H -#define _KFM_H - -#include "niflib.h" -namespace NifLib { - -using namespace std; - -//--KFM File Format--// - -//KFM Versions -const unsigned int VER_KFM_1_0 = 0x01000000; /*!< Kfm Version 1.0 */ -const unsigned int VER_KFM_1_2_4b = 0x01020400; /*!< Kfm Version 1.2.4b */ -const unsigned int VER_KFM_2_0_0_0b = 0x02000000; /*!< Kfm Version 2.0.0.0b */ - -//KFM Data Structure - -struct KfmEventString { - unsigned int unk_int; - string event; - - KfmEventString() : unk_int(0), event() {}; - void Read( istream & in, unsigned int version ); - void Write( ostream & out, unsigned int version ); -}; - -struct KfmEvent { - unsigned int id; - unsigned int type; - float unk_float; - vector<KfmEventString> event_strings; - unsigned int unk_int3; - - KfmEvent() : id(0), type(0), unk_float(0.5f), event_strings(), unk_int3(0) {}; - void Read( istream & in, unsigned int version ); - //void Write( ostream & out, unsigned int version ); -}; - -struct KfmAction { - string action_name; - string action_filename; - unsigned int unk_int1; - vector<KfmEvent> events; - unsigned int unk_int2; - - void Read( istream & in, unsigned int version ); - //void Write( ostream & out, unsigned int version ); -}; - -struct Kfm { - unsigned int version; - unsigned char unk_byte; - string nif_filename; - string master; - unsigned int unk_int1; - unsigned int unk_int2; - float unk_float1; - float unk_float2; - unsigned int unk_int3; - vector<KfmAction> actions; - - // Reads the given file and returns the KFM version. - unsigned int Read( string const & file_name ); // returns Kfm version - unsigned int Read( istream & in ); // returns Kfm version - - // Reads the NIF file and all KF files referred to in this KFM, and returns the root block of the resulting NIF tree. - blk_ref Kfm::MergeActions( string const & path ); - //void Write( string const & file_name, unsigned int version ); - //void Write( ostream & out, unsigned int version ); -}; - -} -#endif diff --git a/NifExport/niflib/nif_attrs.h b/NifExport/niflib/nif_attrs.h deleted file mode 100755 index 8f9c774..0000000 --- a/NifExport/niflib/nif_attrs.h +++ /dev/null @@ -1,1381 +0,0 @@ -/* Copyright (c) 2005, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the NIF File Format Library and Tools - project nor the names of its contributors may be used to endorse - or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -#ifndef _NIF_ATTRS_H_ -#define _NIF_ATTRS_H_ - -#include <sstream> -#include <list> -#include "niflib_internal.h" - -#define endl "\r\n" - - -class IntAttr : public AAttr { -public: - IntAttr( string const & name, IBlock * owner, int * data ) : AAttr( name, owner ), _data(data) {} - ~IntAttr() {} - AttrType GetType() const { return attr_int; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - int asInt() const { return *_data; } - void Set(int n ) { *_data = n; } -protected: - int * _data; -}; - -class UIntAttr : public AAttr { -public: - UIntAttr( string const & name, IBlock * owner, uint * data ) : AAttr( name, owner ), _data(data) {} - ~UIntAttr() {} - AttrType GetType() const { return attr_int; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - int asInt() const { return int(*_data); } - void Set(int n ) { *_data = uint(n); } -protected: - uint * _data; -}; - -class ShortAttr : public AAttr { -public: - ShortAttr( string const & name, IBlock * owner, short * data ) : AAttr( name, owner ), _data(data) {} - ~ShortAttr() {} - AttrType GetType() const { return attr_short; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - int asInt() const { return int(*_data); } - void Set(int n ) { *_data = short(n); } -protected: - short * _data; -}; - -class UShortAttr : public AAttr { -public: - UShortAttr( string const & name, IBlock * owner, ushort * data ) : AAttr( name, owner ), _data(data) {} - ~UShortAttr() {} - AttrType GetType() const { return attr_short; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - int asInt() const { return int(*_data); } - void Set(int n ) { *_data = ushort(n); } -protected: - ushort * _data; -}; - -class ByteAttr : public AAttr { -public: - ByteAttr( string const & name, IBlock * owner, byte * data ) : AAttr( name, owner ), _data(data) {} - ~ByteAttr() {} - AttrType GetType() const { return attr_byte; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << int(*_data); - - return out.str(); - } - int asInt() const { return int(*_data); } - void Set(int n ) { *_data = byte(n); } -protected: - byte * _data; -}; - -class FloatAttr : public AAttr { -public: - FloatAttr( string const & name, IBlock * owner, float * data ) : AAttr( name, owner ), _data(data) {} - ~FloatAttr() {} - AttrType GetType() const { return attr_float; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - float asFloat() const { return *_data; } - void Set(float n ) { *_data = n; } -protected: - float * _data; -}; - -class Float3Attr : public AAttr { -public: - Float3Attr( string const & name, IBlock * owner, Float3 * data ) : AAttr( name, owner ), _data(data) {} - ~Float3Attr() {} - AttrType GetType() const { return attr_float3; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - Float3 asFloat3() const { return *_data; } - void Set(Float3 const & n ) { *_data = n; } -protected: - Float3 * _data; -}; - -class Float4Attr : public AAttr { -public: - Float4Attr( string const & name, IBlock * owner, Float4 * data ) : AAttr( name, owner ), _data(data) {} - ~Float4Attr() {} - AttrType GetType() const { return attr_float4; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - Float4 asFloat4() const { return *_data; } - void Set(Float4 const & n ) { *_data = n; } -protected: - Float4 * _data; -}; - -class Vector3Attr : public AAttr { -public: - Vector3Attr( string const & name, IBlock * owner, Vector3 * data ) : AAttr( name, owner ), _data(data) {} - ~Vector3Attr() {} - AttrType GetType() const { return attr_vector3; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - Float3 asFloat3() const { return Float3(_data->x, _data->y, _data->z); } - void Set(Float3 const & n ) { - _data->x = n.data[0]; - _data->y = n.data[1]; - _data->z = n.data[2]; - } -protected: - Vector3 * _data; -}; - -//class Color3Attr : public AAttr { -//public: -// Color3Attr( string const & name, IBlock * owner, Color3 * data ) : AAttr( name, owner ), _data(data) {} -// ~Color3Attr() {} -// AttrType GetType() const { return attr_color3; } -// string asString() const { -// stringstream out; -// out.setf(ios::fixed, ios::floatfield); -// out << setprecision(1); -// -// out << *data; -// -// return out.str(); -// } -// Float3 asFloat3() const { return Float3(_data->r, _data->g, _data->b); } -// void Set(Float3 const & n ) { -// _data->r = n.data[0]; -// _data->g = n.data[1]; -// _data->b = n.data[2]; -// } -//protected: -// Color3 * _data; -//}; - -//class Color4Attr : public AAttr { -//public: -// Color4Attr( string const & name, IBlock * owner, Color4 * data ) : AAttr( name, owner ), _data(data) {} -// ~Color4Attr() {} -// AttrType GetType() const { return attr_color4; } -// string asString() const { -// stringstream out; -// out.setf(ios::fixed, ios::floatfield); -// out << setprecision(1); -// -// out << *data; -// -// return out.str(); -// } -// Float3 asFloat4() const { return Float3(_data->r, _data->g, _data->b, _data->a); } -// void Set(Float4 const & n ) { -// _data->r = n.data[0]; -// _data->g = n.data[1]; -// _data->b = n.data[2]; -// _data->a = n.data[2]; -// } -//protected: -// Color4 * _data; -//}; - -class QuaternionAttr : public AAttr { -public: - QuaternionAttr( string const & name, IBlock * owner, Quaternion * data ) : AAttr( name, owner ), _data(data) {} - ~QuaternionAttr() {} - AttrType GetType() const { return attr_quaternion; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - Float4 asFloat4() const { return Float4(_data->w, _data->x, _data->y, _data->z); } - void Set(Float4 const & n ) { - _data->w = n.data[0]; - _data->x = n.data[1]; - _data->y = n.data[2]; - _data->z = n.data[2]; - } -protected: - Quaternion * _data; -}; - -class StringAttr : public AAttr { -public: - StringAttr( string const & name, IBlock * owner, string * data ) : AAttr( name, owner ), _data(data) {} - ~StringAttr() {} - AttrType GetType() const { return attr_string; } - string asString() const { return *_data; } - void Set(string const & n) { *_data = n; } -private: - string * _data; -}; - -class LinkAttr : public AAttr { -public: - LinkAttr( string const & name, IBlock * owner, Link * data ) : AAttr( name, owner ), _data(data) {} - ~LinkAttr() {} - AttrType GetType() const { return attr_link; } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - bool HasLinks() const { return true; } - list<blk_ref> asLinkList() const { - list<blk_ref> out; - - out.push_back( _data->GetLink() ); - - return out; - } - void ClearLinks() { _data->Nullify(); } - void AddLinks( list<blk_ref> const & new_links ) { - //Just take the first one - _data->SetLink( *(new_links.begin()) ); - } - - blk_ref asLink() const { return _data->GetLink(); } - void Set( blk_ref const & n ) { _data->SetLink(n); } -private: - Link * _data; -}; - -class CrossRefAttr : public AAttr { -public: - CrossRefAttr( string const & name, IBlock * owner, CrossRef * data ) : AAttr( name, owner ), _data(data) {} - ~CrossRefAttr() {} - AttrType GetType() const { - return attr_link; - } - string asString() const { - //cout << endl << "CrossRefAttr::asString()"; - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - bool HasLinks() const { - //cout << endl << "CrossRefAttr::HasLinks()"; - return true; - } - list<blk_ref> asLinkList() const { - //cout << endl << "CrossRefAttr::asLinkList()"; - list<blk_ref> out; - - out.push_back( blk_ref(_data->GetCrossRef()) ); - - return out; - } - void ClearLinks() { - //cout << endl << "CrossRefAttr::ClearLinks()"; - _data->Nullify(); - } - void AddLinks( list<blk_ref> const & new_links ) { - //cout << endl << "CrossRefAttr::AddLinks()"; - //Just take the first one - _data->SetCrossRef( new_links.begin()->get_block() ); - } - - blk_ref asLink() const { return blk_ref(_data->GetCrossRef()); } - void Set( blk_ref const & n ) { - _data->SetCrossRef( n.get_block() ); - } -private: - CrossRef * _data; -}; - - -class FlagsAttr : public AAttr { -public: - FlagsAttr( string const & name, IBlock * owner ) : AAttr( name, owner ), data(0) {} - ~FlagsAttr() {} - AttrType GetType() const { return attr_flags; } - void ReadAttr( istream& in, unsigned int version ) { data = ReadUShort( in ); } - void WriteAttr( ostream& out, unsigned int version ) const { WriteUShort( data, out ); } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << data; - short t = data; - for (uint i = 0; i < 16; ++i) { - if((t & 1) !=0) { - out << endl << " Bit " << i + 1 << " set "; - } - t >>= 1; - } - - return out.str(); - } - int asInt() const { return int(data); } - void Set(int n ) { data = short(n); } -private: - short data; -}; - -class Matrix33Attr : public AAttr { -public: - Matrix33Attr( string const & name, IBlock * owner, Matrix33 * data ) : AAttr( name, owner ), _data(data) {} - ~Matrix33Attr() {} - AttrType GetType() const { return attr_matrix33; } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data << endl; - - return out.str(); - } - Matrix33 asMatrix33() const { - return *_data; - } - void Set( Matrix33 const & n ) { - *_data = n; - } -private: - Matrix33 * _data; -}; - -class BoneAttr : public AAttr { -public: - BoneAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~BoneAttr() {} - AttrType GetType() const { return attr_bones; } - void ReadAttr( istream& in, unsigned int version ) { - ISkinInstInternal * data = (ISkinInstInternal*)_owner->QueryInterface( SkinInstInternal ); - if ( data != NULL ) { - data->ReadBoneList( in ); - } else { - throw runtime_error ("Attempted to use a bone list attribute on a block that doesn't support it."); - } - } - void WriteAttr( ostream& out, unsigned int version ) const { - //ISkinInstInternal * data = (ISkinInstInternal*)_owner->QueryInterface( SkinInstInternal ); - blk_ref data_blk = _owner->GetAttr("Data")->asLink(); - if ( data_blk.is_null() == false ) { - //Get Bone data from data block - ISkinData * data = (ISkinData*)data_blk->QueryInterface( ID_SKIN_DATA ); - vector<blk_ref> bones = data->GetBones(); - - //Write bone indices to file - WriteUInt( uint(bones.size()), out ); - for (uint i = 0; i < bones.size(); ++i ) { - WriteUInt( bones[i].get_index(), out ); - } - } - else { - //No data, so write zero for no bones - WriteUInt( 0, out ); - } - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - //See if there is a data block - blk_ref data_blk = _owner->GetAttr("Data")->asLink(); - if ( data_blk.is_null() == false && data_blk.is_fixed() == true ) { - //Get Bone data from data block - ISkinData * data = (ISkinData*)data_blk->QueryInterface( ID_SKIN_DATA ); - vector<blk_ref> bones = data->GetBones(); - - //Print Bone List - for (uint i = 0; i < bones.size(); ++i ) { - out << endl << " " << bones[i]; - } - if ( bones.size() == 0 ) { - out << "None"; - } - } - else { - //No data, so write none - out << "None"; - } - - return out.str(); - } -}; -*/ - -class LinkGroupAttr : public AAttr { -public: - LinkGroupAttr( string const & name, IBlock * owner, vector<Link> * data ) : AAttr( name, owner ), _data(data) {} - ~LinkGroupAttr() {} - AttrType GetType() const { return attr_linkgroup; } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - for (vector<Link>::const_iterator it = _data->begin(); it != _data->end(); ++it ) { - out << endl << " " << it->GetLink(); - } - if (_data->size() == 0 ) { - out << "None"; - } - - return out.str(); - } - - bool HasLinks() const { return true; } - - list<blk_ref> asLinkList() const { - list<blk_ref> out; - - for (vector<Link>::iterator it = _data->begin(); it != _data->end(); ++it ) { - out.push_back( it->GetLink() ); - } - - return out; - } - - void AddLink( blk_ref const & block ) { - Link new_link(_owner); - new_link.SetLink( block ); - _data->push_back( new_link); - } - - void AddLinks( list<blk_ref> const & new_links ) { - //Add new list of links - for (list<blk_ref>::const_iterator it = new_links.begin(); it != new_links.end(); ++it ) { - Link new_link(_owner); - new_link.SetLink( *it ); - try { - _data->push_back( new_link ); - } - catch( exception & e ) { - cout << "Error: " << e.what() << endl; - } - } - } - - blk_ref FindLink( string const & block_type ) const { - //Find the first link with the requested block type - for (vector<Link>::const_iterator it = _data->begin(); it != _data->end(); ++it ) { - if ( it->GetLink()->GetBlockType() == block_type ) - return it->GetLink(); - } - - //No block was found, so return a null one - return blk_ref(-1); - } - - void ClearLinks() { _data->clear(); } - - void RemoveLinks( blk_ref const & block ) { - //Remove all links that match this block - for (vector<Link>::iterator it = _data->begin(); it != _data->end(); ++it ) { - if ( it->GetLink() == block ) { - _data->erase( it ); - return; - } - } - } -protected: - vector<Link> * _data; -}; -/* -class TargetGroupAttr : public AAttr { -public: - TargetGroupAttr( string const & name, IBlock * owner ) : AAttr( name, owner ) { - //cout << endl << "TargetGroupAttr()"; - } - ~TargetGroupAttr() { - //cout << endl << "~TargetGroupAttr()"; - ClearLinks(); - } - - AttrType GetType() const { - //cout << endl << "GetType()"; - return attr_targetgroup; - } - - void ReadAttr( istream& in, unsigned int version ) { - //cout << endl << "ReadAttr()"; - int len = ReadUShort( in ); - - if ( len > 1000 ) { - throw runtime_error("Unlikley number of links found. (>1000)"); - } - - for (int i = 0; i < len; ++i ) { - CrossRefAttr * new_attr = new CrossRefAttr( "", _owner, 0, 0xFFFFFFFF ); - new_attr->Read( in, version ); - links.push_back( new_attr ); - } - } - void WriteAttr( ostream& out, unsigned int version ) const { - //cout << endl << "WriteAttr()"; - //Write the number of links - WriteUShort( ushort(links.size()), out ); - //cout << "Link Group Size: " << uint(links.size()) << endl; - - if ( links.size() > 1000 ) { - throw runtime_error("You probably shouldn't write more than 1000 links"); - } - - //Write the block indices - for ( uint i = 0; i < links.size(); ++i ) { - links[i]->Write( out, version ); - } - } - string asString() const { - //cout << endl << "asString()"; - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - for ( uint i = 0; i < links.size(); ++i ) { - out << endl << " " << links[i]->asString(); - } - if (links.size() == 0 ) { - out << "None"; - } - - return out.str(); - } - - bool HasLinks() const { - //cout << endl << "HasLinks()"; - return true; - } - - list<blk_ref> asLinkList() const { - //cout << endl << "asLinkList()"; - list<blk_ref> out; - - //cout << endl << "Link List size: " << uint(links.size()); - for ( uint i = 0; i < links.size(); ++i ) { - //cout << endl << "Link: " << links[i]->asLink(); - out.push_back( links[i]->asLink() ); - } - - //cout << endl << "Out List Size: " << uint(out.size()); - - return out; - } - - void AddLink( blk_ref const & block ) { - //cout << endl << "AddLink()"; - CrossRefAttr * new_attr = new CrossRefAttr( "", _owner, 0, 0xFFFFFFFF ); - new_attr->Set( block ); - links.push_back( new_attr ); - } - - void AddLinks( list<blk_ref> const & new_links ) { - //cout << endl << "AddLinks()"; - //Add new list of links - list<blk_ref>::const_iterator it; - for (it = new_links.begin(); it != new_links.end(); ++it ) { - AddLink( *it ); - } - } - - blk_ref FindLink( string const & block_type ) const { - //cout << endl << "FindLink()"; - //Find the first link with the requested block type - for ( uint i = 0; i < links.size(); ++i ) { - blk_ref found_block = links[i]->asLink(); - if ( found_block->GetBlockType() == block_type ) { - return found_block; - } - } - - //No block was found, so return a null one - return blk_ref(-1); - } - - void ClearLinks() { - //cout << endl << "ClearLinks()"; - - vector<CrossRefAttr*>::iterator it; - for ( it = links.begin(); it != links.end(); ++it ) { - delete *it; - } - links.clear(); - } - - void RemoveLinks( blk_ref const & block ) { - cout << endl << "RemoveLinks()"; - //Remove all links that match this block - vector<CrossRefAttr*>::iterator it; - for ( it = links.begin(); it != links.end(); ++it ) { - if ( (*it)->asLink() == block ) { - delete *it; - links.erase( it ); - } - } - } - void RemoveCrossLinks( IBlock * block_to_remove ) { - //cout << endl << "RemoveCrossLinks()"; - vector<CrossRefAttr*>::iterator it; - for ( it = links.begin(); it != links.end(); ++it ) { - (*it)->RemoveCrossLinks( block_to_remove ); - if ( (*it)->asLink().is_null() == true ) { - delete *it; - links.erase( it ); - } - } - } -private: - vector<CrossRefAttr*> links; -}; - -class ModifierGroupAttr : public LinkGroupAttr { -public: - ModifierGroupAttr( string const & name, IBlock * owner ) : LinkGroupAttr( name, owner, first_ver, last_ver ) {} - ~ModifierGroupAttr() {} - - AttrType GetType() const { return attr_modifiergroup; } - - void ReadAttr( istream& in, unsigned int version ) { - - //The only difference is that there is a boolean before this link group - //bool has_links = - ReadBool( in, version ); - - //if ( has_links || version >= VER_10_2_0_0 ) { - LinkGroupAttr::ReadAttr( in, version ); - //} - } - void WriteAttr( ostream& out, unsigned int version ) const { - //The only difference is that there is a boolean before this link group - WriteBool( (links.size() > 0), out, version ); - - //if ( links.size() > 0 || version >= VER_10_2_0_0) { - LinkGroupAttr::WriteAttr( out, version ); - //} - - } -}; -*/ -class BoundingBoxAttr : public AAttr { -public: - BoundingBoxAttr( string const & name, IBlock * owner, BoundingBox * data ) : AAttr( name, owner ), _data(data) {} - ~BoundingBoxAttr() {} - AttrType GetType() const { return attr_bbox; } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << *_data; - - return out.str(); - } - BoundingBox asBoundingBox() const { return *_data; } - void Set(BoundingBox const & n ) { *_data = n; } - -private: - BoundingBox * _data; -}; - -/* -class ShaderAttr : public LinkAttr { -public: - ShaderAttr( string const & name, IBlock * owner ) : LinkAttr(name, owner, first_ver, last_ver), isUsed(false) {} - ~ShaderAttr() {} - AttrType GetType() const { return attr_shader; } - void ReadAttr( istream& in, unsigned int version ) { - isUsed = ReadBool( in, version ); - if ( isUsed ) { - //Read in shader name - _shader_name = ReadString( in ); - - //Read in unknown link - LinkAttr::ReadAttr( in, version ); - } - } - void WriteAttr( ostream& out, unsigned int version ) const { - WriteBool( isUsed, out, version ); - if ( isUsed ) { - //Write out shader name - WriteString( _shader_name, out ); - - //Write out unknown link - LinkAttr::WriteAttr( out, version ); - } - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Shader: "; - - if ( isUsed ) { - out << endl - << " Shader Name: " << _shader_name << endl - << " Unknown Link: " << LinkAttr::asLink() << endl; - } else { - out << "None" << endl; - } - - return out.str(); - } - -protected: - bool isUsed; - string _shader_name; -}; -*/ - -/*class TexSourceAttr : public LinkAttr { -public: - TexSourceAttr( string const & name, IBlock * owner ) : LinkAttr(name, owner ) { - data.unknownByte = 0; - data.useExternal = false; - } - ~TexSourceAttr() {} - AttrType GetType() const { return attr_texsource; } - void ReadAttr( istream& in, unsigned int version ) { - data.useExternal = ( ReadByte(in) != 0); - - //All data is always read after version 10.1.0.0 - if ( version >= VER_10_1_0_0 ) { - data.fileName = ReadString( in ); - LinkAttr::ReadAttr( in, version ); - - } else if ( data.useExternal ) { - data.fileName = ReadString( in ); - } else { - //Unknown byte exists up to version 10.0.1.0 - if ( version <= VER_10_0_1_0 ) { - data.unknownByte = ReadByte ( in ); - } - - //Read link for Pixel Data - LinkAttr::ReadAttr( in, version ); - } - } - void WriteAttr( ostream& out, unsigned int version ) const { - WriteByte( byte(data.useExternal), out ); - - //All data is always written after version 10.1.0.0 - if ( version >= VER_10_1_0_0 ) { - WriteString( data.fileName, out ); - LinkAttr::WriteAttr( out, version ); - - } else if ( data.useExternal ) { - WriteString( data.fileName, out ); - } else { - //Unknown byte exists up to version 10.0.1.0 - if ( version <= VER_10_0_1_0 ) { - WriteByte ( data.unknownByte, out ); - } - - //Write link for Pixel Data - LinkAttr::WriteAttr( out, version ); - } - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << endl - << " Location: "; - - if ( data.useExternal ) { - out << "External"; - } else { - out << "Internal"; - } - - out << endl - << " File Name: " << data.fileName << endl - << " Unknown Byte: " << int(data.unknownByte) << endl - << " Pixel Data: " << asLink(); - - return out.str(); - } - TexSource asTexSource() const { return data; } - void Set( TexSource const &n ) { - data.useExternal = n.useExternal; - data.unknownByte = n.unknownByte; - data.fileName = n.fileName; - } -private: - TexSource data; -};*/ - -/*class ControllerTargetAttr : public AAttr { -public: - ControllerTargetAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~ControllerTargetAttr() {} - AttrType GetType() const { return attr_controllertarget; } - void ReadAttr( istream& in, unsigned int version ) { - ReadUInt(in); - } - void WriteAttr( ostream& out, unsigned int version ) const { - //WriteUInt( FindTarget()->GetBlockNum(), out ); - WriteUInt( FindTarget().get_index(), out ); // we need get_index(), GetBlockNum() chokes on null block references - } - blk_ref FindTarget() const { - //Find first ancestor that is controllable - blk_ref block(_owner); - blk_ref par; - while ( true ) { - //Get parent - par = block->GetParent(); - - //If parent is null, we're done - there are no node ancestors so return a null reference - if (par.is_null() == true) - return blk_ref(-1); - - // If parent is NiSequenceStreamHelper, return null reference (this is necessary to create consistent XKf files) - if ( par->GetBlockType() == "NiSequenceStreamHelper" ) - return blk_ref(-1); - - //If parent is controllable, return it - if ( par->IsControllable() == true ) - return par; - - //We didn't find a controllable object this time, set block to par and try again - block = par; - } - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << FindTarget(); - - return out.str(); - } - blk_ref asLink() const { return FindTarget(); } - void Set(blk_ref const &) { throw runtime_error("The attribute you tried to set is calculated automatically. You cannot change it directly."); } - -};*/ - -class EmitterObjectAttr : public AAttr { -public: - EmitterObjectAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~EmitterObjectAttr() {} - AttrType GetType() const { return attr_emitterobject; } - void ReadAttr( istream& in, unsigned int version ) { - ReadUInt(in); - } - void WriteAttr( ostream& out, unsigned int version ) const { - //WriteUInt( FindTarget()->GetBlockNum(), out ); - WriteUInt( FindTarget().get_index(), out ); // we need get_index(), GetBlockNum() chokes on null block references - } - blk_ref FindTarget() const { - //Find first ancestor that is a node - blk_ref block(_owner); - blk_ref par; - while ( true ) { - //Get parent - par = block->GetParent(); - - //If parent is null, we're done - there are no node ancestors so return a null reference - if (par.is_null() == true) - return blk_ref(-1); - - // If parent is NiSequenceStreamHelper, return null reference (this is necessary to create consistent XKf files) - if ( par->GetBlockType() == "NiSequenceStreamHelper" ) - return blk_ref(-1); - - //If parent is a node, return it - if ( QueryNode( par ) != NULL ) - return par; - - //We didn't find a node this time, set block to par and try again - block = par; - } - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << FindTarget(); - - return out.str(); - } - blk_ref asLink() const { return FindTarget(); } - void Set(blk_ref const &) { throw runtime_error("The attribute you tried to set is calculated automatically. You cannot change it directly."); } - -}; - -class SelfLinkAttr : public AAttr { -public: - SelfLinkAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~SelfLinkAttr() {} - AttrType GetType() const { return attr_emitterobject; } - void ReadAttr( istream& in, unsigned int version ) { - ReadUInt(in); - } - void WriteAttr( ostream& out, unsigned int version ) const { - //WriteUInt( FindTarget()->GetBlockNum(), out ); - WriteUInt( _owner->GetBlockNum(), out ); - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << blk_ref(_owner) << endl; - - return out.str(); - } - blk_ref asLink() const { return blk_ref(_owner); } - void Set(blk_ref const &) { throw runtime_error("The attribute you tried to set is calculated automatically. You cannot change it directly."); } - -}; - -class SkeletonRootAttr : public AAttr { -public: - SkeletonRootAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~SkeletonRootAttr() {} - AttrType GetType() const { return attr_skeletonroot; } - void ReadAttr( istream& in, unsigned int version ) { - original_root = ReadUInt( in ); //Read data but do nothing with it - } - void WriteAttr( ostream& out, unsigned int version ) const { - WriteUInt( FindRoot().get_index(), out ); - } - blk_ref FindRoot() const { - //Find Skeleton Root - first node in ancestry of any bone that has 'not a skin influence' flag set - - //Get skin data to find a bone - blk_ref skin_dat_blk = _owner->GetAttr("Data"); - - //If there is no skin data, return a null block - if ( skin_dat_blk.is_null() == true || skin_dat_blk.is_fixed() == false ) { - return blk_ref(-1); - } - - //Get bones from skin data - ISkinData * skin_dat_int = QuerySkinData(skin_dat_blk); - vector<blk_ref> bones = skin_dat_int->GetBones(); - - //If size of bones is zero, return a null block - if ( bones.size() == 0 ) { - return blk_ref(-1); - } - - //Arbitrarily start at the first bone in the list, and get it's ancestors - // We want to get the closest common ancestor between the _owner and the bones - // So start with a list of ancestors of the first bone (this is just a random choice) - blk_ref block = bones[0]; - blk_ref par = block->GetParent(); - list<blk_ref> bone_pars; - while ( par.is_null() == false ) { - bone_pars.push_front(par); - par = par->GetParent(); - }; - - // There is something odd going on with some of the DAoC files: - // all bones would refer to the scene root (see Atlantis/figures/fig03/lbody08_hig_m.nif). - // In this case the skeleton root also refers to the scene root; let's cover this case here. - if (bone_pars.empty()) return blk_ref(bones[0]); - - // Now do the same with the owner. - block = _owner; - par = block->GetParent(); - list<blk_ref> owner_pars; - while ( par.is_null() == false ) { - owner_pars.push_front(par); - par = par->GetParent(); - }; - // Now find closest common ancestor. - if ( owner_pars.empty() ) - throw runtime_error("Owner has no parents (invalid NIF file?). Cannot set skeleton root."); - blk_ref skelroot; - list<blk_ref>::const_iterator bone_par_it = bone_pars.begin(); - list<blk_ref>::const_iterator owner_par_it = owner_pars.begin(); - while ( *bone_par_it == *owner_par_it ) { - skelroot = *bone_par_it; - bone_par_it++; - owner_par_it++; - }; - if ( skelroot.is_null() ) - throw runtime_error("Skinning instance has no common parent with the bones it refers to (invalid NIF file?). Cannot set skeleton root."); - return skelroot; - /*NEW CODE END*/ - /*OLD CODE BEGIN - blk_ref block = bones[0]; - blk_ref par; - int flags; - while ( true ) { - //Get parent - par = block->GetParent(); - - //If parent is null, we're done - every node is an influence or there are no nodes - //Probably shouldn't happen - if (par.is_null() == true) { - return block; - - } - - //If parent is a node and its 'not a skin influence' flag is set, it is the root for this skeleton - if ( par->QueryInterface(ID_NODE) != NULL ) { - flags = par->GetAttr("Flags")->asInt(); - - if ( (flags & 8) != 0 ) { - // extra check: skeleton root cannot be a bone (this fixes the BabelFish.nif problem) - int par_is_bone = false; - for ( vector<blk_ref>::const_iterator it = bones.begin(); it != bones.end(); ++it) { - if ( *it == par ) { - par_is_bone = true; - break; - }; - } - if ( ! par_is_bone ) return par; - } - } - - //We didn't find the root this time, set block to par and try again - block = par; - } - //OLD CODE END - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - blk_ref root; - root = FindRoot(); - out << root; - - return out.str(); - } - blk_ref asLink() const { return FindRoot(); } - void Set(blk_ref const &) { throw runtime_error("The attribute you tried to set is calculated automatically. You cannot change it directly."); } - -private: - int original_root; -}; - -class ParentAttr : public AAttr { -public: - ParentAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~ParentAttr() {} - AttrType GetType() const { return attr_parent; } - void ReadAttr( istream& in, unsigned int version ) { - ReadUInt(in); - } - void WriteAttr( ostream& out, unsigned int version ) const { - WriteUInt( _owner->GetParent()->GetBlockNum(), out ); - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << _owner->GetParent(); - - return out.str(); - } - blk_ref asLink() const { return _owner->GetParent(); } - void Set(blk_ref const &) { throw runtime_error("The attribute you tried to set is calculated automatically. You cannot change it directly."); } -}; - -class ParticleGroupAttr : public AAttr { -public: - ParticleGroupAttr( string const & name, IBlock * owner ) : AAttr(name, owner, first_ver, last_ver) {} - ~ParticleGroupAttr() {} - AttrType GetType() const { return attr_particlegroup; } - - void ReadAttr( istream& in, unsigned int version ) { - num_particles = ReadUShort( in ); - num_valid = ReadUShort( in ); - - particles.resize(num_particles); - for ( int i = 0; i < num_particles; ++i ) { - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - particles[i].unk_matrix[r][c] = ReadFloat( in ); - } - } - particles[i].unk_short = ReadUShort( in ); - particles[i].vert_id = ReadUShort( in ); - } - } - - void WriteAttr( ostream& out, unsigned int version ) const { - WriteUShort( num_particles, out ); - WriteUShort( num_valid, out ); - - for ( int i = 0; i < num_particles; ++i ) { - for (int c = 0; c < 3; ++c) { - for (int r = 0; r < 3; ++r) { - WriteFloat( particles[i].unk_matrix[r][c], out ); - } - } - - WriteUShort( particles[i].unk_short, out ); - WriteUShort( particles[i].vert_id, out ); - } - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Num Particles: " << num_particles << endl - << "Num Valid: " << num_valid << endl - << "Particles:" << endl; - - for ( int i = 0; i < num_particles; ++i ) { - out << " Particle " << i << ":" << endl; - const Matrix33 & m = particles[i].unk_matrix; - out << " |" << setw(6) << m[0][0] << "," << setw(6) << m[0][1] << "," << setw(6) << m[0][2] << " |" << endl - << " |" << setw(6) << m[1][0] << "," << setw(6) << m[1][1] << "," << setw(6) << m[1][2] << " |" << endl - << " |" << setw(6) << m[2][0] << "," << setw(6) << m[2][1] << "," << setw(6) << m[2][2] << " |" << endl; - - out << " Unknown Short: " << particles[i].unk_short << endl - << " Vertex ID: " << particles[i].vert_id << endl; - } - return out.str(); - } - -private: - struct Particle { - Matrix33 unk_matrix; - short unk_short; - short vert_id; - }; - short num_particles; - short num_valid; - vector<Particle> particles; -}; - - - -class LODInfoAttr : public LinkAttr { -public: - LODInfoAttr( string const & name, IBlock * owner ) : LinkAttr(name, owner, first_ver, last_ver) {} - ~LODInfoAttr() {} - AttrType GetType() const { return attr_lodinfo; } - - void ReadAttr( istream& file, unsigned int version ) { - NifStream( _type, file ); - if ( _type == 0 ) { - NifStream( _center, file ); - int numRanges = ReadUInt( file ); - ranges.resize( numRanges ); - NifStream( ranges, file ); - } else { - NifStream( _unk_short, file ); - LinkAttr::ReadAttr( file, version ); - } - } - - void WriteAttr( ostream& file, unsigned int version ) const { - NifStream( _type, file ); - if ( _type == 0 ) { - NifStream( _center, file ); - WriteUInt( uint(ranges.size()), file ); - NifStream( ranges, file ); - } else { - NifStream( _unk_short, file ); - LinkAttr::WriteAttr( file, version ); - } - } - - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << " LOD Info Type: " << _type << endl; - - if ( _type == 0 ) { - out << " LOD Center: (" << _center.x << ", " << _center.y << ", " << _center.z << ")" << endl; - - out << uint(ranges.size()) << endl; - - for ( uint i = 0; i < ranges.size(); ++i ) { - out << " " << i + 1 << ") Near: " << ranges[i].near << " Far: " << ranges[i].far << endl; - } - } else { - out << "Unknown Short: " << _unk_short << endl - << "Range Group Link: " << LinkAttr::asString() << endl; - } - - return out.str(); - } - -private: - uint _type; - Vector3 _center; - vector<LODRange> ranges; - ushort _unk_short; -}; - - -class Unk292BytesAttr : public AAttr { -public: - Unk292BytesAttr( string const & name, IBlock * owner ) : AAttr( name, owner ) { - for ( int i = 0; i < 256; ++i ) { - data[i] = 0; - } - //memset( data, 0, 256 ); - } - ~Unk292BytesAttr() {} - AttrType GetType() const { return attr_unk292bytes; } - void ReadAttr( istream& in, unsigned int version ) { - in.read( (char*)data, 256 ); - } - void WriteAttr( ostream& out, unsigned int version ) const { - out.write( (char*)data, 265 ); - } - string asString() const { - stringstream out; - out.setf(ios::fixed, ios::floatfield); - out << setprecision(1); - - out << "Unknown Data (256 bytes):" << endl; - - //Display Data in Hex form - out << hex << setfill('0'); - for (int j = 0; j < 256; j++) { - out << uppercase << setw(2) << uint(data[j]); - if (j % 16 == 15 || j == 256 - 1) - out << endl; - else if (j % 16 == 7) - out << " "; - else if (j % 8 == 3) - out << " "; - else - out << " "; - } - out << dec << setfill(' '); - - //Display data as a string - out << "As String: "; - for (int j = 0; j < 256; j++ ) { - if ( data[j] == 0 ) { - out << endl; - } else if ( data[j] == 0xCD ) { - break; - } else { - out << data[j]; - } - } - - return out.str(); - } -protected: - byte data[256]; -};*/ - - -#endif diff --git a/NifExport/niflib/nif_math.cpp b/NifExport/niflib/nif_math.cpp deleted file mode 100755 index 28995d5..0000000 --- a/NifExport/niflib/nif_math.cpp +++ /dev/null @@ -1,538 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "nif_math.h" -#include <iomanip> -using namespace Niflib; - -//Constants - -const Matrix44 Matrix44::IDENTITY( 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f ); - -const Matrix33 Matrix33::IDENTITY( 1.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 1.0f ); - -const Matrix22 Matrix22::IDENTITY( 1.0f, 0.0f, - 0.0f, 1.0f ); - -/* - * Vector3 Methods - */ - -float Vector3::Magnitude() const { - return sqrt( x * x + y * y + z * z ); -} - -Vector3 Vector3::Normalized() const { - Vector3 v(*this); - float m = Magnitude(); - return Vector3( - x / m, //x - y / m, //y - z / m //z - ); -} - -Vector3 Vector3::operator+( const Vector3 & rh) const { - Vector3 v(*this); - v += rh; - return v; -} - -Vector3 & Vector3::operator+=( const Vector3 & rh ) { - x += rh.x; - y += rh.y; - z += rh.z; - - return *this; -} - -Vector3 Vector3::operator-( const Vector3 & rh) const { - Vector3 v(*this); - v -= rh; - return v; -} - -Vector3 & Vector3::operator-=( const Vector3 & rh ) { - x -= rh.x; - y -= rh.y; - z -= rh.z; - - return *this; -} - -Vector3 Vector3::operator*( const float & rh) const { - Vector3 v(*this); - v *= rh; - return v; -} - -Vector3 & Vector3::operator*=( const float & rh) { - x *= rh; - y *= rh; - z *= rh; - - return *this; -} - -Vector3 Vector3::operator/( const float & rh ) const { - Vector3 v(*this); - v /= rh; - return v; -} - -Vector3 & Vector3::operator/=( const float & rh ) { - x /= rh; - y /= rh; - z /= rh; - - return *this; -} - -bool Vector3::operator==( const Vector3 & rh) const { - if (rh.x == x && rh.y == y && rh.z == z) - return true; - else - return false; -} - -float Vector3::DotProduct( const Vector3 & rh) const { - return x * rh.x + y * rh.y + z * rh.z; -} - -Vector3 Vector3::CrossProduct( const Vector3 & rh) const { - return Vector3( - y * rh.z - z * rh.y, //x - z * rh.x - x * rh.z, //y - x * rh.y - y * rh.x //z - ); -} - -//Vector3 Vector3::operator*( const Matrix44 & rh) const { -// return rh * (*this); -//} -// -//Vector & Vector3::operator*=( const Matrix44 & rh) { -// *this = rh * (*this); -// return *this; -//} - -/* - * Matrix22 Methods - */ - -Matrix22::Matrix22() { - *this = Matrix22::IDENTITY; -} - -/* - * Matrix33 Methods - */ - -Matrix33::Matrix33() { - *this = Matrix33::IDENTITY; -} - -Quaternion Matrix33::AsQuaternion() { - Quaternion quat; - float tr, s, q[4]; - int i, j, k; - - int nxt[3] = {1, 2, 0}; - - Matrix33 & m = *this; - - // compute the trace of the matrix - tr = m[0][0] + m[1][1] + m[2][2]; - - // check if the trace is positive or negative - if (tr > 0.0) { - s = sqrt (tr + 1.0f); - quat.w = s / 2.0f; - s = 0.5f / s; - quat.x = (m[1][2] - m[2][1]) * s; - quat.y = (m[2][0] - m[0][2]) * s; - quat.z = (m[0][1] - m[1][0]) * s; - } - else { - // trace is negative - i = 0; - if ( m[1][1] > m[0][0]) - i = 1; - if ( m[2][2] > m[i][i] ) - i = 2; - j = nxt[i]; - k = nxt[j]; - - s = sqrt( ( m[i][i] - (m[j][j] + m[k][k]) ) + 1.0f ); - q[i] = s * 0.5f; - if (s != 0.0f) s = 0.5f / s; - q[3] = (m[j][k] - m[k][j]) * s; - q[j] = (m[i][j] + m[j][i]) * s; - q[k] = (m[i][k] + m[k][i]) * s; - quat.x = q[0]; - quat.y= q[1]; - quat.z = q[2]; - quat.w = q[3]; - } - - return quat; -} - -float Matrix33::Determinant() const { - return (*this)[0][0] * ( (*this)[1][1] * (*this)[2][2] - (*this)[1][2] * (*this)[2][1] ) - - (*this)[0][1] * ( (*this)[1][0] * (*this)[2][2] - (*this)[1][2] * (*this)[2][0] ) - + (*this)[0][2] * ( (*this)[1][0] * (*this)[2][1] - (*this)[1][1] * (*this)[2][0] ); -} - -Matrix33 Matrix33::operator*( const Matrix33 & m ) const -{ - Matrix33 m3; - for ( int r = 0; r < 3; r++ ){ - for ( int c = 0; c < 3; c++ ){ - m3[r][c] = (*this)[r][0]*m[0][c] + (*this)[r][1]*m[1][c] + (*this)[r][2]*m[2][c]; - } - } - return m3; -} - -/* - * Matrix44 Methods - */ - -Matrix44::Matrix44() { - *this = Matrix44::IDENTITY; -} - -Matrix44::Matrix44( const Vector3 & t, const Matrix33 & r, float scale ) { - //Set up a matrix with rotate and translate information - Matrix44 rt; - rt[0][0] = r[0][0]; rt[0][1] = r[0][1]; rt[0][2] = r[0][2]; rt[0][3] = 0.0f; - rt[1][0] = r[1][0]; rt[1][1] = r[1][1]; rt[1][2] = r[1][2]; rt[1][3] = 0.0f; - rt[2][0] = r[2][0]; rt[2][1] = r[2][1]; rt[2][2] = r[2][2]; rt[2][3] = 0.0f; - rt[3][0] = t.x; rt[3][1] = t.y; rt[3][2] = t.z; rt[3][3] = 1.0f; - - //Set up another matrix with the scale information - Matrix44 s; - s[0][0] = scale; s[0][1] = 0.0f; s[0][2] = 0.0f; s[0][3] = 0.0f; - s[1][0] = 0.0f; s[1][1] = scale; s[1][2] = 0.0f; s[1][3] = 0.0f; - s[2][0] = 0.0f; s[2][1] = 0.0f; s[2][2] = scale; s[2][3] = 0.0f; - s[3][0] = 0.0f; s[3][1] = 0.0f; s[3][2] = 0.0f; s[3][3] = 1.0f; - - //Multiply the two for the combined transform - *this = s * rt; -} - -Matrix33 Matrix44::GetRotation() const { - const Matrix44 & t = *this; - - Matrix33 m( t[0][0], t[0][1], t[0][2], - t[1][0], t[1][1], t[1][2], - t[2][0], t[2][1], t[2][2] - ); - - //--Extract Scale from first 3 rows--// - float scale[3]; - for (int r = 0; r < 3; ++r) { - //Get scale for this row - scale[r] = Vector3( m[r][0], m[r][1], m[r][2] ).Magnitude(); - - //Normalize the row by dividing each factor by scale - m[r][0] /= scale[r]; - m[r][1] /= scale[r]; - m[r][2] /= scale[r]; - } - - //Return result - return m; -} - -Vector3 Matrix44::GetScale() const { - const Matrix44 & m = *this; - float scale[3]; - for (int r = 0; r < 3; ++r) { - //Get scale for this row - scale[r] = Vector3( m[r][0], m[r][1], m[r][2] ).Magnitude(); - } - return Vector3( scale[0], scale[1], scale[2] ); -} - - -Vector3 Matrix44::GetTranslation() const { - const Matrix44 & m = *this; - return Vector3( m[3][0], m[3][1], m[3][2] ); -} - -Matrix44 Matrix44::operator*( const Matrix44 & rh ) const { - return Matrix44(*this) *= rh; -} -Matrix44 & Matrix44::operator*=( const Matrix44 & rh ) { - Matrix44 r; - Matrix44 & lh = *this; - float t; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - t = 0.0f; - for (int k = 0; k < 4; k++) { - t += lh[i][k] * rh[k][j]; - } - r[i][j] = t; - } - } - - *this = r; - return *this; -} - -Matrix44 Matrix44::operator*( float rh ) const { - return Matrix44(*this) *= rh; -} - -Matrix44 & Matrix44::operator*=( float rh ) { - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - (*this)[i][j] *= rh; - } - } - return *this; -} - -Vector3 Matrix44::operator*( const Vector3 & rh ) const { - const Matrix44 & t = *this; - Vector3 v; - //Multiply, ignoring w - v.x = rh.x * t[0][0] + rh.y * t[1][0] + rh.z * t[2][0] + t[3][0]; - v.y = rh.x * t[0][1] + rh.y * t[1][1] + rh.z * t[2][1] + t[3][1]; - v.z = rh.x * t[0][2] + rh.y * t[1][2] + rh.z * t[2][2] + t[3][2]; - //answer[3] = rh[0] * t(0,3) + rh[1] * t(1,3) + rh[2] * t(2,3) + t(3,3); - - return v; -} - -Matrix44 Matrix44::operator+( const Matrix44 & rh ) const { - return Matrix44(*this) += rh; -} - -Matrix44 & Matrix44::operator+=( const Matrix44 & rh ) { - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - (*this)[i][j] += rh[i][j]; - } - } - return *this; -} - -Matrix44 & Matrix44::operator=( const Matrix44 & rh ) { - memcpy(rows, rh.rows, sizeof(Float4) * 4); - return *this; -} - -bool Matrix44::operator==( const Matrix44 & rh ) const { - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - if ( (*this)[i][j] != rh[i][j] ) - return false; - } - } - return true; -} - -Matrix44 Matrix44::Transpose() const { - const Matrix44 & t = *this; - return Matrix44( t[0][0], t[0][1], t[0][2], t[0][3], - t[1][0], t[1][1], t[1][2], t[1][3], - t[2][0], t[2][1], t[2][2], t[2][3], - t[3][0], t[3][1], t[3][2], t[3][3] ); -} - -Matrix33 Matrix44::Submatrix( int skip_r, int skip_c ) const { - Matrix33 sub; - int i = 0, j = 0; - for (int r = 0; r < 4; r++) { - if (r == skip_r) - continue; - for (int c = 0; c < 4; c++) { - if (c == skip_c) - continue; - sub[i][j] = (*this)[r][c]; - j++; - } - i++; - j = 0; - } - return sub; -} - -float Matrix44::Adjoint( int skip_r, int skip_c ) const { - Matrix33 sub = Submatrix( skip_r, skip_c ); - return pow(-1.0f, float(skip_r + skip_c)) * sub.Determinant(); -} - -Matrix44 Matrix44::Inverse() const { - Matrix44 result; - - float det = Determinant(); - for (int r = 0; r < 4; r++) { - for (int c = 0; c < 4; c++) { - result[c][r] = Adjoint(r, c) / det; - } - } - - return result; -} - -float Matrix44::Determinant() const { - const Matrix44 & t = *this; - return t[0][0] * Submatrix(0, 0).Determinant() - - t[0][1] * Submatrix(0, 1).Determinant() - + t[0][2] * Submatrix(0, 2).Determinant() - - t[0][3] * Submatrix(0, 3).Determinant(); -} - -void Matrix44::Decompose( Vector3 & translate, Matrix33 & rotation, Float3 & scale ) const { - translate = Vector3( (*this)[3][0], (*this)[3][1], (*this)[3][2] ); - Matrix33 rotT; - for ( int i = 0; i < 3; i++ ){ - for ( int j = 0; j < 3; j++ ){ - rotation[j][i] = (*this)[i][j]; - rotT[i][j] = (*this)[i][j]; - } - } - Matrix33 mtx = rotation * rotT; - scale = Float3( sqrt(mtx[0][0]), sqrt(mtx[1][1]), sqrt(mtx[2][2]) ); - for ( int i = 0; i < 3; i++ ){ - for ( int j = 0; j < 3; j++ ){ - rotation[i][j] /= scale[i]; - } - } -} -/* - * Quaternion Methods - */ - -Float3 Quaternion::AsEulerYawPitchRoll() { - float yaw, pitch, roll; - - if ( x*y + z*w == 0.5 ) { - //North Pole - yaw = 2 * atan2(x,w); - pitch = asin(2*x*y + 2*z*w); - roll = 0.0f; - } - else if ( x*y + z*w == -0.5 ) { - //South Pole - yaw = -2 * atan2(x,w); - pitch = asin(2*x*y + 2*z*w); - roll = 0.0f; - } - else { - yaw = atan2(2*y*w-2*x*z , 1 - 2*y*y - 2*z*z); - pitch = asin(2*x*y + 2*z*w); - roll = atan2(2*x*w-2*y*z , 1 - 2*x*x - 2*z*z); - } - - return Float3( yaw, pitch, roll ); -} - -Matrix33 Quaternion::AsMatrix() { - Matrix33 m; - - float w2 = w * w; - float x2 = x * x; - float y2 = y * y; - float z2 = z * z; - - m[0][0] = w2 + x2- y2 - z2; - m[0][1] = 2.0f*x*y - 2.0f*w*z; - m[0][2] = 2.0f*x*z + 2.0f*w*y; - - m[1][0] = 2.0f*x*y + 2.0f*w*z; - m[1][1] = w2 - x2 + y*y - z2; - m[1][2] = 2.0f*y*z - 2.0f*w*x; - - m[2][0] = 2.0f*x*z - 2.0f*w*y; - m[2][1] = 2.0f*y*z + 2.0f*w*x; - m[2][2] = w2 - x2 - y2 + z2; - - return m; - - //out << endl - // << " |" << setw(8) << m[0][0] << "," << setw(8) << m[0][1] << "," << setw(8) << m[0][2] << " |" << endl - // << " |" << setw(8) << m[1][0] << "," << setw(8) << m[1][1] << "," << setw(8) << m[1][2] << " |" << endl - // << " |" << setw(8) << m[2][0] << "," << setw(8) << m[2][1] << "," << setw(8) << m[2][2] << " |" << endl; - - //float pi = 3.141592653589793f; - //out << " Euler Angles:" << endl - // << " X: " << atan2( m[1][2], m[2][2] ) / pi * 180.0 << endl - // << " Y: " << asin( -m[0][2] ) / pi * 180.0 << endl - // << " Z: " << atan2( m[0][1], m[0][0] ) / pi * 180.0 << endl; -} - -/* - * ostream functions for printing with cout - */ -namespace Niflib { -ostream & operator<<( ostream & out, TexCoord const & val ) { - return out << "(" << setw(6) << val.u << "," << setw(6) << val.v << ")"; -} - -ostream & operator<<( ostream & out, Triangle const & val ) { - return out << "{" << setw(6) << val.v1 << "," << setw(6) << val.v2 << "," << setw(6) << val.v3 << "}"; -} - -ostream & operator<<( ostream & out, Vector3 const & val ) { - return out << "(" << setw(6) << val.x << "," << setw(6) << val.y << "," << setw(6) << val.z << ")"; -} - -ostream & operator<<( ostream & out, Float2 const & val ) { - return out << "{" << setw(6) << val.data[0] << "," << setw(6) << val.data[1] << "}"; -} - -ostream & operator<<( ostream & out, Matrix22 const & val ) { - out << endl - << " |" << setw(6) << val[0][0] << "," << setw(6) << val[0][1] << " |" << endl - << " |" << setw(6) << val[1][0] << "," << setw(6) << val[1][1] << " |"; - return out; -} - -ostream & operator<<( ostream & out, Float3 const & val ) { - return out << "{" << setw(6) << val.data[0] << "," << setw(6) << val.data[1] << "," << setw(6) << val.data[2] << "}"; -} - -ostream & operator<<( ostream & out, Matrix33 const & val ) { - out << endl - << " |" << setw(6) << val[0][0] << "," << setw(6) << val[0][1] << "," << setw(6) << val[0][2] << " |" << endl - << " |" << setw(6) << val[1][0] << "," << setw(6) << val[1][1] << "," << setw(6) << val[1][2] << " |" << endl - << " |" << setw(6) << val[2][0] << "," << setw(6) << val[2][1] << "," << setw(6) << val[2][2] << " |"; - return out; -} - -ostream & operator<<( ostream & out, Float4 const & val ) { - return out << "{" << setw(6) << val.data[0] << "," << setw(6) << val.data[1] << "," << setw(6) << val.data[2] << "," << setw(6) << val.data[3] << "}"; -} - -ostream & operator<<( ostream & out, Matrix44 const & val ) { - out << endl - << " |" << setw(6) << val[0][0] << "," << setw(6) << val[0][1] << "," << setw(6) << val[0][2] << "," << setw(6) << val[0][3] << " |" << endl - << " |" << setw(6) << val[1][0] << "," << setw(6) << val[1][1] << "," << setw(6) << val[1][2] << "," << setw(6) << val[1][3] << " |" << endl - << " |" << setw(6) << val[2][0] << "," << setw(6) << val[2][1] << "," << setw(6) << val[2][2] << "," << setw(6) << val[2][3] << " |" << endl - << " |" << setw(6) << val[3][0] << "," << setw(6) << val[3][1] << "," << setw(6) << val[3][2] << "," << setw(6) << val[3][3] << " |"; - return out; -} - -ostream & operator<<( ostream & out, Color3 const & val ) { - return out << "{R:" << setw(6) << val.r << " G:" << setw(6) << val.g << " B:" << setw(6) << val.b << "}"; -} - -ostream & operator<<( ostream & out, Color4 const & val ) { - return out << "{R:" << setw(6) << val.r << " G:" << setw(6) << val.g << " B:" << setw(6) << val.b << " A:" << setw(6) << val.a << "}"; -} - -ostream & operator<<( ostream & out, Quaternion const & val ) { - return out << "[" << setw(6) << val.w << ",(" << setw(6) << val.x << "," << setw(6) << val.y << "," << setw(6) << val.z << ")]"; -} -} diff --git a/NifExport/niflib/nif_math.h b/NifExport/niflib/nif_math.h deleted file mode 100755 index 3811d18..0000000 --- a/NifExport/niflib/nif_math.h +++ /dev/null @@ -1,891 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef NIF_MATH_H -#define NIF_MATH_H - -#include <cmath> -#include <iostream> -#include <stdexcept> -#include "dll_export.h" - -using namespace std; -namespace Niflib { - -#ifndef PI -#define PI 3.14159265358979323846f //Probably more accurate than a float can be, but it will just be rounded off anyway -#endif - -//Forward declarations -struct TexCoord; -struct Triangle; -struct Vector3; -struct Color3; -struct Color4; -struct Quaternion; -struct Float2; -struct Matrix22; -struct Float3; -struct Matrix33; -struct Float4; -struct Matrix44; - -/*! Stores 2D texture coordinates – two floating point variables, u and v. */ -struct NIFLIB_API TexCoord { - float u; /*!< The U value in this coordinate pair. */ - float v; /*!< The V value in this coordinate pair. */ - - /*! Default constructor */ - TexCoord() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param u The value to set U to. - * \param v The value to set V to. - */ - TexCoord(float u, float v) { - this->u = u; - this->v = v; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param u The value to set U to. - * \param v The value to set V to. - */ - void Set(float u, float v) { - this->u = u; - this->v = v; - } -}; - -/*! Represents a triangle face formed between three vertices referenced by number */ -struct NIFLIB_API Triangle { - short v1; /*!< The index of the first vertex. */ - short v2; /*!< The index of the second vertex. */ - short v3; /*!< The index of the third vertex. */ - - /*! Default constructor */ - Triangle() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param v1 The index of the first vertex. - * \param v2 The index of the second vertex. - * \param v3 The index of the third vertex. - */ - Triangle(short v1, short v2, short v3) { - this->v1 = v1; - this->v2 = v2; - this->v3 = v3; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param v1 The index of the first vertex. - * \param v2 The index of the second vertex. - * \param v3 The index of the third vertex. - */ - void Set(short v1, short v2, short v3) { - this->v1 = v1; - this->v2 = v2; - this->v3 = v3; - } - - /*! The bracket operator makes it possible to use this structure like a C++ array. - * \param n The index into the data array. Should be 0, 1, or 2. - * \return The value at the given array index by reference so it can be read or set via the bracket operator. - */ - short & operator[](int n) { - switch (n) { - case 0: return v1; break; - case 1: return v2; break; - case 2: return v3; break; - default: throw std::out_of_range("Index out of range for Triangle"); - }; - } - short operator[](int n) const { - switch (n) { - case 0: return v1; break; - case 1: return v2; break; - case 2: return v3; break; - default: throw std::out_of_range("Index out of range for Triangle"); - }; - } -}; - -/*!Represents a position or direction in 3D space*/ -struct NIFLIB_API Vector3 { - float x; /*!< The X component of this vector. */ - float y; /*!< The Y component of this vector. */ - float z; /*!< The Z component of this vector. */ - - /*!Default constructor.*/ - Vector3() { x = y = z = 0.0f; } - - /*! This constructor can be used to set all values in this structure during initialization - * \param x The value to set X to. - * \param y The value to set Y to. - * \param z The value to set Z to. - */ - Vector3(float x, float y, float z) { - this->x = x; - this->y = y; - this->z = z; - } - - /*! This constructor can be used to initialize this Vector3 with another Vector3 - * \param v The Vector3 to construct this one from - */ - Vector3( const Vector3 & v) { x = v.x; y = v.y; z = v.z; } - - /*! Destructor */ - ~Vector3() {} - - /*! This function can be used to set all values in the structure at the same time. - * \param x The value to set X to. - * \param y The value to set Y to. - * \param z The value to set Z to. - */ - void Set(float x, float y, float z) { - this->x = x; - this->y = y; - this->z = z; - } - - /* This function calculates the magnitude of this vector - * \return the magnitude of the vector; its length. - */ - float Magnitude() const; - - /* This function returns a normalization of this vector. A vecctor pointing in the same - * direction but with a magnitude, or length, of 1. - */ - Vector3 Normalized() const; - - /* Allows the addition of vectors. Each component, x, y, y, is added with - * the same component of the other vector. - * \return The result of the addition. - */ - Vector3 operator+( const Vector3 & rh ) const; - - /* Adds the two vectors and then sets the result to the left-hand vector. - * \return This vector is returned. - */ - Vector3 & operator+=( const Vector3 & rh ); - - /* Allows the subtraction of vectors. Each component, x, y, y, is subtracted from - * the same component of the other vector. - * \return The result of the subtraction. - */ - Vector3 operator-( const Vector3 & rh ) const; - - /* This operator subtracts the two vectors and then sets the result to the left-hand vector. - * \return This vector is returned. - */ - Vector3 & operator-=( const Vector3 & rh); - - /* Allows scaler multiplication, that is multipying all components of the - * vector, x, y and z, by the same number. - * \return The result of the multiplication. - */ - Vector3 operator*( const float & rh) const; //Scalar Multiply - - /* Multipies a vector by a scalar and then sets the result to the left-hand vector. - * \return This vector is returned. - */ - Vector3 & operator*=( const float & rh ); - - /* Allows scaler division, that is dividing all components of the - * vector, x, y and z, by the same number. - * \return The result of the division. - */ - Vector3 operator/( const float & rh ) const; - - /* Divides a vector by a scalar and then sets the result to the left-hand vector. - * \return This vector is returned. - */ - Vector3 & operator/=( const float & rh ); - - /* Sets the components of this Vector3 to those of another Vector3 - * \return This vector is returned. - */ - Vector3 & operator=( const Vector3 & v ) { x = v.x; y = v.y; z = v.z; return *this; } - - /* Tests the equality of two Vector3 structures. Vectors are considered equal if all - * three components are equal. - */ - bool operator==( const Vector3 & rh ) const; - - /* Computes the dot product of two vectors; the angle between two vectors. - * \param rh The vector to perform the dot product with - * \return The angle in radians between this vector and the one given - */ - float DotProduct( const Vector3 & rh ) const; - - /* Computes the cross product of two vectors; a vector perpendicular to both of them. - * \param The vector to perform the cross product with - * \return A vector perpendicular to this vector and the one given - */ - Vector3 CrossProduct( const Vector3 & rh) const; //Cross Product - - - ///* Multiplies this Vector with a 4x4 matrix - // * \param The 4x4 matrix to multiply this vector with. - // * \return The new vector resulting from the multiplication. - // */ - //Vector3 operator*( const Matrix44 & rh ) const; - - ///* Multiplies this Vector with a 4x4 matrix and sets the result to itself - // * \param The 4x4 matrix to multiply this vector with. - // * \return This vector is returned. - // */ - //Vector3 & operator*=( const Matrix44 & rh ); - - friend ostream & operator<<( ostream & out, const Vector3 & rh ); -}; - -/* Stores two floating point numbers. Used as a row of a Matrix22 */ -struct NIFLIB_API Float2 { - float data[2]; /*!< The two floating point numbers stored as an array. */ - - /*! The bracket operator makes it possible to use this structure like a C++ array. - * \param n The index into the data array. Should be 0 or 1. - * \return The value at the given array index by reference so it can be read or set via the bracket operator. - */ - float & operator[](int n) { - return data[n]; - } - float operator[](int n) const { - return data[n]; - } - - /*! Default constructor. */ - Float2() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param f1 The value to set the first floating point number to. - * \param f2 The value to set the second floating point number to. - */ - Float2( float f1, float f2 ) { - data[0] = f1; - data[1] = f2; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param f1 The value to set the first floating point number to. - * \param f2 The value to set the second floating point number to. - */ - void Set( float f1, float f2 ) { - data[0] = f1; - data[1] = f2; - } - - //Python Operator Overloads - float __getitem__(int n) { - if (n > 1 || n < 0) - throw std::out_of_range("Index out of range for MatrixRow3"); - return data[n]; - } - void __setitem__(int n, float value) { - if (n > 1 || n < 0) - throw std::out_of_range("Index out of range for MatrixRow3"); - data[n] = value; - } -}; - -/*! Stores a 2 by 2 matrix used for bump maps. */ -struct Matrix22 { - /*! The 2x2 identity matrix */ - static const Matrix22 IDENTITY; - - Float2 rows[2]; /*!< The two rows of Float2 structures which hold two floating point numbers each. */ - - /*! The bracket operator makes it possible to use this structure like a 2x2 C++ array. - * \param n The index into the row array. Should be 0 or 1. - * \return The Float2 structure for the given row index by reference so it can be read or set via the bracket operator. - */ - NIFLIB_API Float2 & operator[](int n) { - return rows[n]; - } - NIFLIB_API const Float2 & operator[](int n) const { - return rows[n]; - } - - /*! Default Constructor */ - NIFLIB_API Matrix22(); - - /*! This constructor can be used to set all values in this matrix during initialization - * \param m11 The value to set at row 1, column 1. - * \param m12 The value to set at row 1, column 2. - * \param m21 The value to set at row 2, column 1. - * \param m22 The value to set at row 2, column 2. - */ - NIFLIB_API Matrix22( - float m11, float m12, - float m21, float m22 - ) { - rows[0][0] = m11; rows[0][1] = m12; - rows[1][0] = m21; rows[1][1] = m22; - } - - /*! This function can be used to set all values in this matrix at the same time. - * \param m11 The value to set at row 1, column 1. - * \param m12 The value to set at row 1, column 2. - * \param m21 The value to set at row 2, column 1. - * \param m22 The value to set at row 2, column 2. - */ - NIFLIB_API void Set( - float m11, float m12, - float m21, float m22 - ) { - rows[0][0] = m11; rows[0][1] = m12; - rows[1][0] = m21; rows[1][1] = m22; - } - - //Python Operator Overloads - NIFLIB_API Float2 & __getitem__(int n) { - if (n > 1 || n < 0) - throw std::out_of_range("Index out of range for MatrixRow3"); - return rows[n]; - } -}; - -/* Stores three floating point numbers. Used as a row of a Matrix33 and to store the data in attr_vector3 and attr_color3 type attributes. */ -struct NIFLIB_API Float3 { - float data[3]; /*!< The three floating point numbers stored as an array. */ - - /*! The bracket operator makes it possible to use this structure like a C++ array. - * \param n The index into the data array. Should be 0, 1, or 2. - * \return The value at the given array index by reference so it can be read or set via the bracket operator. - */ - float & operator[](int n) { - return data[n]; - } - float operator[](int n) const { - return data[n]; - } - - /*!Default constructor.*/ - Float3() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param f1 The value to set the first floating point number to. - * \param f2 The value to set the second floating point number to. - * \param f3 The value to set the third floating point number to. - */ - Float3( float f1, float f2, float f3 ) { - data[0] = f1; - data[1] = f2; - data[2] = f3; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param f1 The value to set the first floating point number to. - * \param f2 The value to set the second floating point number to. - * \param f3 The value to set the third floating point number to. - */ - void Set( float f1, float f2, float f3 ) { - data[0] = f1; - data[1] = f2; - data[2] = f3; - } - - //Python Operator Overloads - float __getitem__(int n) { - if (n > 2 || n < 0) - throw std::out_of_range("Index out of range for Float3"); - return data[n]; - } - void __setitem__(int n, float value) { - if (n > 2 || n < 0) - throw std::out_of_range("Index out of range for Float3"); - data[n] = value; - } -}; - -/*! Stores a 3 by 3 matrix used for rotation. */ -struct Matrix33 { - /*! The 3x3 identity matrix */ - static const Matrix33 IDENTITY; - - Float3 rows[3]; /*!< The three rows of Float3 structures which hold three floating point numbers each. */ - - /*! The bracket operator makes it possible to use this structure like a 3x3 C++ array. - * \param n The index into the row array. Should be 0, 1, or 2. - * \return The Float3 structure for the given row index by reference so it can be read or set via the bracket operator. - */ - NIFLIB_API Float3 & operator[](int n) { - return rows[n]; - } - NIFLIB_API const Float3 & operator[](int n) const { - return rows[n]; - } - - /*! Default constructor. Initializes matrix to identity. */ - NIFLIB_API Matrix33(); - - /*! This constructor can be used to set all values in this matrix during initialization - * \param m11 The value to set at row 1, column 1. - * \param m12 The value to set at row 1, column 2. - * \param m13 The value to set at row 1, column 3. - * \param m21 The value to set at row 2, column 1. - * \param m22 The value to set at row 2, column 2. - * \param m23 The value to set at row 2, column 3. - * \param m31 The value to set at row 3, column 1. - * \param m32 The value to set at row 3, column 2. - * \param m33 The value to set at row 3, column 3. - */ - NIFLIB_API Matrix33( - float m11, float m12, float m13, - float m21, float m22, float m23, - float m31, float m32, float m33 - ) { - rows[0][0] = m11; rows[0][1] = m12; rows[0][2] = m13; - rows[1][0] = m21; rows[1][1] = m22; rows[1][2] = m23; - rows[2][0] = m31; rows[2][1] = m32; rows[2][2] = m33; - } - - /*! This function can be used to set all values in this matrix at the same time. - * \param m11 The value to set at row 1, column 1. - * \param m12 The value to set at row 1, column 2. - * \param m13 The value to set at row 1, column 3. - * \param m21 The value to set at row 2, column 1. - * \param m22 The value to set at row 2, column 2. - * \param m23 The value to set at row 2, column 3. - * \param m31 The value to set at row 3, column 1. - * \param m32 The value to set at row 3, column 2. - * \param m33 The value to set at row 3, column 3. - */ - NIFLIB_API void Set( - float m11, float m12, float m13, - float m21, float m22, float m23, - float m31, float m32, float m33 - ) { - rows[0][0] = m11; rows[0][1] = m12; rows[0][2] = m13; - rows[1][0] = m21; rows[1][1] = m22; rows[1][2] = m23; - rows[2][0] = m31; rows[2][1] = m32; rows[2][2] = m33; - } - - /*! Returns a quaternion representation of the rotation stored in this matrix. - * \return A quaternion with an equivalent rotation to the one stored in this matrix. - */ - NIFLIB_API Quaternion AsQuaternion(); - - /*! Calculates the determinant of this matrix. - * \return The determinant of this matrix. - */ - NIFLIB_API float Determinant() const; - - //Undocumented - NIFLIB_API void AsFloatArr( float out[3][3] ) { - out[0][0] = rows[0][0]; out[0][1] = rows[0][1]; out[0][2] = rows[0][2]; - out[1][0] = rows[1][0]; out[1][1] = rows[1][1]; out[1][2] = rows[1][2]; - out[2][0] = rows[2][0]; out[2][1] = rows[2][1]; out[2][2] = rows[2][2]; - } - - NIFLIB_API Matrix33 operator*( const Matrix33 & m ) const; - - //Python Operator Overloads - NIFLIB_API Float3 & __getitem__(int n) { - if (n > 2 || n < 0) - throw std::out_of_range("Index out of range for MatrixRow3"); - return rows[n]; - } -}; - -/* Stores four floating point numbers. Used as a row of a Matrix44. */ -struct NIFLIB_API Float4 { - float data[4]; /*!< The four floating point numbers stored as an array. */ - - /*! The bracket operator makes it possible to use this structure like a C++ array. - * \param n The index into the data array. Should be 0, 1, 2, or 3. - * \return The value at the given array index by reference so it can be read or set via the bracket operator. - */ - float & operator[](int n) { - return data[n]; - } - float operator[](int n) const { - return data[n]; - } - - /*! Default Constructor.*/ - Float4() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param f1 The value to set the first floating point number to. - * \param f2 The value to set the second floating point number to. - * \param f3 The value to set the third floating point number to. - * \param f4 The value to set the fourth floating point number to. - */ - Float4( float f1, float f2, float f3, float f4 ) { - data[0] = f1; - data[1] = f2; - data[3] = f3; - data[4] = f4; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param f1 The value to set the first floating point number to. - * \param f2 The value to set the second floating point number to. - * \param f3 The value to set the third floating point number to. - * \param f4 The value to set the fourth floating point number to. - */ - void Set( float f1, float f2, float f3, float f4 ) { - data[0] = f1; - data[1] = f2; - data[3] = f3; - data[4] = f4; - } - - //Python Operator Overloads - float __getitem__(int n) { - if (n > 3 || n < 0) - throw std::out_of_range("Index out of range for Float4"); - return data[n]; - } - void __setitem__(int n, float value) { - if (n > 3 || n < 0) - throw std::out_of_range("Index out of range for Float4"); - data[n] = value; - } -}; - -/*! Stores a 4 by 4 matrix used for combined transformations. */ -struct Matrix44 { - /*! The 4x4 identity matrix */ - static const Matrix44 IDENTITY; - - Float4 rows[4]; /*!< The three rows of Float3 structures which hold three floating point numbers each. */ - - /*! The bracket operator makes it possible to use this structure like a 4x4 C++ array. - * \param n The index into the row array. Should be 0, 1, 2, or 3. - * \return The Float4 structure for the given row index by reference so it can be read or set via the bracket operator. - */ - NIFLIB_API Float4 & operator[](int n) { - return rows[n]; - } - NIFLIB_API Float4 const & operator[](int n) const { - return rows[n]; - } - - /*! Default constructor. Initializes Matrix to Identity. */ - NIFLIB_API Matrix44(); - - /*! Copy constructor. Initializes Matrix to another Matrix44. - * \param The matrix to initialize this one to. - */ - NIFLIB_API Matrix44( const Matrix44 & m ) { memcpy(rows, m.rows, sizeof(Float4) * 4); } - - /*! This constructor can be used to set all values in this matrix during initialization - * \param m11 The value to set at row 1, column 1. - * \param m12 The value to set at row 1, column 2. - * \param m13 The value to set at row 1, column 3. - * \param m14 The value to set at row 1, column 4. - * \param m21 The value to set at row 2, column 1. - * \param m22 The value to set at row 2, column 2. - * \param m23 The value to set at row 2, column 3. - * \param m24 The value to set at row 2, column 4. - * \param m31 The value to set at row 3, column 1. - * \param m32 The value to set at row 3, column 2. - * \param m33 The value to set at row 3, column 3. - * \param m34 The value to set at row 3, column 4. - * \param m41 The value to set at row 4, column 1. - * \param m42 The value to set at row 4, column 2. - * \param m43 The value to set at row 4, column 3. - * \param m44 The value to set at row 4, column 4. - */ - NIFLIB_API Matrix44( - float m11, float m12, float m13, float m14, - float m21, float m22, float m23, float m24, - float m31, float m32, float m33, float m34, - float m41, float m42, float m43, float m44 - ) { - rows[0][0] = m11; rows[0][1] = m12; rows[0][2] = m13; rows[0][3] = m14; - rows[1][0] = m21; rows[1][1] = m22; rows[1][2] = m23; rows[1][3] = m24; - rows[2][0] = m31; rows[2][1] = m32; rows[2][2] = m33; rows[2][3] = m34; - rows[3][0] = m41; rows[3][1] = m42; rows[3][2] = m43; rows[3][3] = m44; - } - - /*! This constructor allows a 4x4 transform matrix to be initalized from a - * translate vector, a 3x3 rotation matrix, and a scale factor. - * \param translate The translation vector that specifies the new x, y, and z coordinates. - * \param rotation The 3x3 rotation matrix. - * \param scale The scale factor. - */ - NIFLIB_API Matrix44( const Vector3 & translate, const Matrix33 & rotation, float scale ); - - /*! This function can be used to set all values in this matrix at the same time. - * \param m11 The value to set at row 1, column 1. - * \param m12 The value to set at row 1, column 2. - * \param m13 The value to set at row 1, column 3. - * \param m14 The value to set at row 1, column 4. - * \param m21 The value to set at row 2, column 1. - * \param m22 The value to set at row 2, column 2. - * \param m23 The value to set at row 2, column 3. - * \param m24 The value to set at row 2, column 4. - * \param m31 The value to set at row 3, column 1. - * \param m32 The value to set at row 3, column 2. - * \param m33 The value to set at row 3, column 3. - * \param m34 The value to set at row 3, column 4. - * \param m41 The value to set at row 4, column 1. - * \param m42 The value to set at row 4, column 2. - * \param m43 The value to set at row 4, column 3. - * \param m44 The value to set at row 4, column 4. - */ - void Set( - float m11, float m12, float m13, float m14, - float m21, float m22, float m23, float m24, - float m31, float m32, float m33, float m34, - float m41, float m42, float m43, float m44 - ) { - rows[0][0] = m11; rows[0][1] = m12; rows[0][2] = m13; rows[0][3] = m14; - rows[1][0] = m21; rows[1][1] = m22; rows[1][2] = m23; rows[1][3] = m24; - rows[2][0] = m31; rows[2][1] = m32; rows[2][2] = m33; rows[2][3] = m34; - rows[3][0] = m41; rows[3][1] = m42; rows[3][2] = m43; rows[3][3] = m44; - } - - /* Multiplies this matrix by another. - * \param rh The matrix to multiply this one with. - * \return The result of the multiplication. - */ - NIFLIB_API Matrix44 operator*( const Matrix44 & rh ) const; - - /* Multiplies this matrix by another and sets the result to itself. - * \param rh The matrix to multiply this one with. - * \return This matrix is returned. - */ - NIFLIB_API Matrix44 & operator*=( const Matrix44 & rh ); - - /* Multiplies this matrix by a scalar value. - * \param rh The scalar value to multiply each component of this matrix by. - * \return The result of the multiplication. - */ - NIFLIB_API Matrix44 operator*( float rh ) const; - - /* Multiplies this matrix by a scalar value and sets the resutl to itself. - * \param rh The scalar value to multiply each component of this matrix by. - * \return This matrix is returned. - */ - NIFLIB_API Matrix44 & operator*=( float rh ); - - /* Multiplies this matrix by a vector with x, y, and z components. - * \param rh The vector to multiply this matrix with. - * \return The result of the multiplication. - */ - NIFLIB_API Vector3 operator*( const Vector3 & rh ) const; - - /* Adds this matrix to another. - * \param rh The matrix to be added to this one. - * \return The result of the addition. - */ - NIFLIB_API Matrix44 operator+( const Matrix44 & rh ) const; - - /* Adds this matrix to another and sets the result to itself. - * \param rh The matrix to be added to this one. - * \return This matrix is returned. - */ - NIFLIB_API Matrix44 & operator+=( const Matrix44 & rh ); - - /* Sets the values of this matrix to those of the given matrix. - * \param rh The matrix to copy values from. - * \return This matrix is returned. - */ - NIFLIB_API Matrix44 & operator=( const Matrix44 & rh ); - - /* Compares two 4x4 matricies. They are considered equal if all components are equal. - * \param rh The matrix to compare this one with. - * \return true if the matricies are equal, false otherwise. - */ - NIFLIB_API bool operator==( const Matrix44 & rh ) const; - - /* Allows the contents of the matrix to be printed to an ostream. - * \param lh The ostream to insert the text into. - * \param rh The matrix to insert into the stream. - * \return The given ostream is returned. - */ - NIFLIB_API friend ostream & operator<<( ostream & lh, const Matrix44 & rh ); - - /*! Calculates the transpose of this matrix. - * \return The transpose of this matrix. - */ - NIFLIB_API Matrix44 Transpose() const; - - /*! Calculates the determinant of this matrix. - * \return The determinant of this matrix. - */ - NIFLIB_API float Determinant() const; - - /*! Calculates the inverse of this matrix. - * \return The inverse of this matrix. - */ - NIFLIB_API Matrix44 Inverse() const; - - /*! Returns a 3x3 submatrix of this matrix created by skipping the indicated row and column. - * \param skip_r The row to skip. Must be a value between 0 and 3. - * \param skip_c The colum to skip. Must be a value between 0 and 3. - * \return The 3x3 submatrix obtained by skipping the indicated row and column. - */ - NIFLIB_API Matrix33 Submatrix( int skip_r, int skip_c ) const; - - /*! Calculates the adjunct of this matrix created by skipping the indicated row and column. - * \param skip_r The row to skip. Must be a value between 0 and 3. - * \param skip_c The colum to skip. Must be a value between 0 and 3. - * \return The adjunct obtained by skipping the indicated row and column. - */ - NIFLIB_API float Adjoint( int skip_r, int skip_c ) const; - - NIFLIB_API Matrix33 GetRotation() const; - NIFLIB_API Vector3 GetScale() const; - NIFLIB_API Vector3 GetTranslation() const; - - //undocumented, may be removed - NIFLIB_API void AsFloatArr( float out[4][4] ) { - out[0][0] = rows[0][0]; out[0][1] = rows[0][1]; out[0][2] = rows[0][2]; out[0][3] = rows[0][3]; - out[1][0] = rows[1][0]; out[1][1] = rows[1][1]; out[1][2] = rows[1][2]; out[1][3] = rows[1][3]; - out[2][0] = rows[2][0]; out[2][1] = rows[2][1]; out[2][2] = rows[2][2]; out[2][3] = rows[2][3]; - out[3][0] = rows[3][0]; out[3][1] = rows[3][1]; out[3][2] = rows[3][2]; out[3][3] = rows[3][3]; - } - - // undocumented - NIFLIB_API void Decompose( Vector3 & translate, Matrix33 & rotation, Float3 & scale ) const; - - //Python Operator Overloads - NIFLIB_API Float4 & __getitem__(int n) { - if (n > 3 || n < 0) - throw std::out_of_range("Index out of range for Matrix44"); - return rows[n]; - } -}; - -/*! Stores a color along with alpha translucency */ -struct NIFLIB_API Color3 { - float r; /*!< The red component of this color. Should be between 0.0f and 1.0f. */ - float g; /*!< The green component of this color. Should be between 0.0f and 1.0f. */ - float b; /*!< The blue component of this color. Should be between 0.0f and 1.0f. */ - - /*! Default constructor */ - Color3() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param r The value to set the red component of this color to. Should be between 0.0f and 1.0f. - * \param g The value to set the green component of this color to. Should be between 0.0f and 1.0f. - * \param b The value to set the blue component of this color to. Should be between 0.0f and 1.0f. - * \param a The value to set the alpha translucency component of this color to. Should be between 0.0f and 1.0f. - */ - Color3(float r, float g, float b) { - this->r = r; - this->g = g; - this->b = b; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param r The value to set the red component of this color to. Should be between 0.0f and 1.0f. - * \param g The value to set the green component of this color to. Should be between 0.0f and 1.0f. - * \param b The value to set the blue component of this color to. Should be between 0.0f and 1.0f. - * \param a The value to set the alpha translucency component of this color to. Should be between 0.0f and 1.0f. - */ - void Set(float r, float g, float b) { - this->r = r; - this->g = g; - this->b = b; - } -}; - -/*! Stores a color along with alpha translucency */ -struct NIFLIB_API Color4 { - float r; /*!< The red component of this color. Should be between 0.0f and 1.0f. */ - float g; /*!< The green component of this color. Should be between 0.0f and 1.0f. */ - float b; /*!< The blue component of this color. Should be between 0.0f and 1.0f. */ - float a; /*!< The alpha translucency component of this color. Should be between 0.0f and 1.0f. */ - - /*! Default constructor */ - Color4() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param r The value to set the red component of this color to. Should be between 0.0f and 1.0f. - * \param g The value to set the green component of this color to. Should be between 0.0f and 1.0f. - * \param b The value to set the blue component of this color to. Should be between 0.0f and 1.0f. - * \param a The value to set the alpha translucency component of this color to. Should be between 0.0f and 1.0f. - */ - Color4(float r, float g, float b, float a = 1.0f) { - this->r = r; - this->g = g; - this->b = b; - this->a = a; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param r The value to set the red component of this color to. Should be between 0.0f and 1.0f. - * \param g The value to set the green component of this color to. Should be between 0.0f and 1.0f. - * \param b The value to set the blue component of this color to. Should be between 0.0f and 1.0f. - * \param a The value to set the alpha translucency component of this color to. Should be between 0.0f and 1.0f. - */ - void Set(float r, float g, float b, float a = 1.0f) { - this->r = r; - this->g = g; - this->b = b; - this->a = a; - } -}; - -/*! Represents a quaternion - a 4D extention of complex numbers used as an alternitive to matrices to represent rotation.*/ -struct NIFLIB_API Quaternion { - float w; /*!< The W scalar component of this Quaternion. */ - float x; /*!< The X vector component of this Quaternion. */ - float y; /*!< The Y vector component of this Quaternion. */ - float z; /*!< The Z vector component of this Quaternion. */ - - /*! Default constructor. */ - Quaternion() {} - - /*! This constructor can be used to set all values in this structure during initialization - * \param w The value to set the W scalar component of this quaternion to. - * \param x The value to set the X vector component of this quaternion to. - * \param y The value to set the Y vector component of this quaternion to. - * \param z The value to set the Z vector component of this quaternion to. - */ - Quaternion(float w, float x, float y, float z) { - this->w = w; - this->x = x; - this->y = y; - this->z = z; - } - - /*! This function can be used to set all values in the structure at the same time. - * \param w The value to set the W scalar component of this quaternion to. - * \param x The value to set the X vector component of this quaternion to. - * \param y The value to set the Y vector component of this quaternion to. - * \param z The value to set the Z vector component of this quaternion to. - */ - void Set(float w, float x, float y, float z) { - this->w = w; - this->x = x; - this->y = y; - this->z = z; - } - - /*! This function returns a 3x3 matrix representation of the rotation stored in this quaternion. - * \return a Matrix33 structure with an equivalent rotation to this quaternion. - */ - Matrix33 AsMatrix(); - - /*! This function returns a Euler Angle representation of the rotation stored in this quaternion. - * The angles returned correspond to yaw, pitch, and roll and are in radiens. - * \return a Float3 structure with the first value containing the yaw, the second the pitch, - * and the third the roll. The values are in radians. - */ - Float3 AsEulerYawPitchRoll(); -}; - -//--ostream functions for printing with cout--// - -ostream & operator<<( ostream & out, TexCoord const & val ); -ostream & operator<<( ostream & out, Triangle const & val ); -ostream & operator<<( ostream & out, Float2 const & val ); -ostream & operator<<( ostream & out, Matrix22 const & val ); -ostream & operator<<( ostream & out, Float3 const & val ); -ostream & operator<<( ostream & out, Matrix33 const & val ); -ostream & operator<<( ostream & out, Float4 const & val ); -ostream & operator<<( ostream & out, Color3 const & val ); -ostream & operator<<( ostream & out, Color4 const & val ); -ostream & operator<<( ostream & out, Quaternion const & val ); - -} -#endif diff --git a/NifExport/niflib/niflib.cpp b/NifExport/niflib/niflib.cpp deleted file mode 100755 index 593d256..0000000 --- a/NifExport/niflib/niflib.cpp +++ /dev/null @@ -1,959 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -//#define DEBUG // this will produce lots of output -//#define PRINT_OBJECT_NAMES -//#define PRINT_OBJECT_CONTENTS -//#define DEBUG_LINK_PHASE - -#include "niflib.h" -#include "obj/NiAVObject.h" -#include "obj/NiNode.h" -#include "obj/NiTextKeyExtraData.h" -#include "gen/header.h" -namespace Niflib { - -//Stores the mapping between block names and factory function pointers to create them -typedef IBlock * (*blk_factory_func)(); -bool global_block_map_init = false; -map<string, blk_factory_func> global_block_map; - -//Utility Functions -void EnumerateObjects( NiObjectRef const & root, map<Type*,uint> & type_map, map<NiObjectRef, uint> & link_map ); -//void BuildUpBindPositions( const NiAVObjectRef & root ); -NiObjectRef FindRoot( vector<NiObjectRef> const & blocks ); -void RegisterBlockFactories (); -NiObjectRef GetObjectByType( const NiObjectRef & root, const Type & block_type ); - -//--Function Bodies--// -NiObjectRef CreateBlock( string block_type ) { - - //Initialize the global block list if it hasn't been done yet - if ( global_block_map_init == false ) { - RegisterBlockFactories(); - global_block_map_init = true; - } - - IBlock * block = NULL; - - map<string, blk_factory_func>::iterator it; - it = global_block_map.find(block_type); - - if ( it != global_block_map.end() ) { - //Requested type has been registered - block = it->second(); - } else { - //An unknown type has been encountered - return NULL; //Return null block_ref - //block = new UnknownBlock( block_type ); - } - - return NiObjectRef(block); -} - -//Reads the given file by file name and returns a reference to the root block -NiObjectRef ReadNifTree( string const & file_name ) { - //Read block list - cout << "File name: " << file_name << endl; - vector<NiObjectRef> blocks = ReadNifList( file_name ); - return FindRoot( blocks ); -} - -//Reads the given input stream and returns a reference to the root block -NiObjectRef ReadNifTree( istream & in ) { - //Read block list - vector<NiObjectRef> blocks = ReadNifList( in ); - return FindRoot( blocks ); -} - -NiObjectRef FindRoot( vector<NiObjectRef> const & blocks ) { - //--Look for a NiNode that has no parents--// - - //Find the first NiObjectNET derived object - NiAVObjectRef root; - for (uint i = 0; i < blocks.size(); ++i) { - root = DynamicCast<NiAVObject>(blocks[i]); - if ( root != NULL ) { - break; - } - } - - //Make sure a node was found, if not return first node - if ( root == NULL ) - return blocks[0]; - - //Move up the chain to the root node - while ( root->GetParent() != NULL ) { - root = StaticCast<NiAVObject>(root->GetParent()); - } - - return StaticCast<NiObject>(root); -} - -unsigned int CheckNifHeader( string const & file_name ) { - //--Open File--// - ifstream in( file_name.c_str(), ifstream::binary ); - - //--Read Header--// - char header_string[64]; - in.getline( header_string, 64 ); - string headerstr(header_string); - - // make sure this is a NIF file - if ( ( headerstr.substr(0, 22) != "NetImmerse File Format" ) - && ( headerstr.substr(0, 20) != "Gamebryo File Format" ) ) - return VER_INVALID; - - // supported versions - if ( headerstr == "NetImmerse File Format, Version 4.0.0.2" ) return VER_4_0_0_2; - if ( headerstr == "NetImmerse File Format, Version 4.1.0.12" ) return VER_4_1_0_12; - if ( headerstr == "NetImmerse File Format, Version 4.2.0.2" ) return VER_4_2_0_2; - if ( headerstr == "NetImmerse File Format, Version 4.2.1.0" ) return VER_4_2_1_0; - if ( headerstr == "NetImmerse File Format, Version 4.2.2.0" ) return VER_4_2_2_0; - if ( headerstr == "NetImmerse File Format, Version 10.0.1.0" ) return VER_10_0_1_0; - if ( headerstr == "Gamebryo File Format, Version 10.1.0.0" ) return VER_10_1_0_0; - if ( headerstr == "Gamebryo File Format, Version 10.2.0.0" ) return VER_10_2_0_0; - if ( headerstr == "Gamebryo File Format, Version 20.0.0.4" ) return VER_20_0_0_4; - if ( headerstr == "Gamebryo File Format, Version 20.0.0.5" ) return VER_20_0_0_5; - - // anything else: unsupported - return VER_UNSUPPORTED; -} - -//Reads the given file by file name and returns a vector of block references -vector<NiObjectRef> ReadNifList( string const & file_name ) { - - //--Open File--// - ifstream in( file_name.c_str(), ifstream::binary ); - - return ReadNifList( in ); -} - -//Reads the given input stream and returns a vector of block references -vector<NiObjectRef> ReadNifList( istream & in ) { - - //--Read Header--// - Header header; - - //Read header. - header.Read( in ); - -// char header_string[64]; -// in.getline( header_string, 64 ); -// string headerstr(header_string); -// -// // make sure this is a NIF file -// if ( ( headerstr.substr(0, 22) != "NetImmerse File Format" ) -// && ( headerstr.substr(0, 20) != "Gamebryo File Format" ) ) -// throw runtime_error("Not a NIF file."); -// -// // detect old versions -// if ( ( headerstr == "NetImmerse File Format, Version 3.1" ) -// || ( headerstr == "NetImmerse File Format, Version 3.03" ) -// || ( headerstr == "NetImmerse File Format, Version 3.0" ) -// || ( headerstr == "NetImmerse File Format, Version 2.3" ) ) -// throw runtime_error("Unsupported: " + headerstr); -// -// uint version = ReadUInt( in ); -// -// //There is an unknown Byte here from version 20.0.0.4 on -// byte endianType; -// if ( version >= VER_20_0_0_4 ) { -// endianType = ReadByte( in ); -// } -// -// //There is an Unknown Int here from version 10.1.0.0 on -// uint userVersion = 0; -// if ( version >= VER_10_1_0_0 ) { -// userVersion = ReadUInt( in ); -// } -// -// uint numBlocks = ReadUInt( in ); -// -// if ( userVersion != 0 ) { -// uint len; -// ReadUInt( in ); -// len = ReadByte( in ); -// for (uint i = 0; i < len; i++) ReadByte( in ); -// len = ReadByte( in ); -// for (uint i = 0; i < len; i++) ReadByte( in ); -// len = ReadByte( in ); -// for (uint i = 0; i < len; i++) ReadByte( in ); -// } -// -// vector<string> blockTypes; -// vector<short> blockTypeIndex; -// //New header data exists from version 5.0.0.1 on -// if ( version >= 0x05000001 ) { -// short numBlockTypes = ReadUShort( in ); -// blockTypes.resize(numBlockTypes); -// for ( uint i = 0; i < blockTypes.size(); ++i ) { -// blockTypes[i] = ReadString( in ); -// } -// -// blockTypeIndex.resize(numBlocks); -// for ( uint i = 0; i < blockTypeIndex.size(); ++i ) { -// blockTypeIndex[i] = ReadUShort( in ); -// } -// -// uint unknownInt2 = -// ReadUInt( in ); -// -// //Output -//#ifdef DEBUG -// cout << endl << endl -// << "====[ " << "File Header ]====" << endl -// << "Header: " << header_string << endl -// << "Version: " << version << endl -// << "Endian Type: " << endianType << endl -// << "User Version: " << userVersion << endl -// << "Number of Blocks: " << numBlocks << endl -// << "Block Types: " << uint(blockTypes.size()) << endl; -// -// for ( uint i = 0; i < blockTypes.size(); ++i ) { -// cout << " " << i << ": " << blockTypes[i] << endl; -// } -// -// cout << "Block Type Indices: " << numBlocks << endl; -// for ( uint i = 0; i < blockTypeIndex.size(); ++i ) { -// cout << " " << i + 1 << ": " << blockTypeIndex[i] << "(" << blockTypes[blockTypeIndex[i]] << ")" << endl; -// } -// -// cout << "Unknown Int 2: " << unknownInt2 << endl; -//#endif -// } else { -//#ifdef DEBUG -// //Output -// cout << endl << endl -// << "====[ " << "File Header ]====" << endl -// << "Header: " << header_string << endl -// << "Version: " << version << endl -// << "Number of Blocks: " << numBlocks << endl; -//#endif -// } -// -// //TODO: Actually read the user_version from the right place -// uint user_version = 0; - - //--Read Blocks--// - size_t numBlocks = header.numBlocks; - vector<NiObjectRef> blocks( numBlocks ); //List to hold the blocks - list<uint> link_stack; //List to add link values to as they're read in from the file - string objectType; - for (uint i = 0; i < numBlocks; i++) { - - //Check for EOF - //if (in.eof() ) { - // throw runtime_error("End of file reached prematurely. This NIF may be corrupt or improperly supported."); - //} - - //There are two ways to read blocks, one before version 5.0.0.1 and one after that - if ( header.version >= 0x05000001 ) { - //From version 5.0.0.1 to version 10.0.1.0 there is a zero byte at the begining of each block - - if ( header.version <= VER_10_1_0_0 ) { - uint checkValue = ReadUInt( in ); - if ( checkValue != 0 ) { - //Throw an exception if it's not zero - cout << "ERROR! Bad object position. Invalid check value\a" << endl; - cout << "====[ " << "Object " << i << " | " << blocks[i - 1]->GetType().GetTypeName() << " ]====" << endl; - cout << blocks[i - 1]->asString(); - throw runtime_error("Read failue - Bad object position"); - } - } - - // Find which block type this is by using the header arrays - objectType = header.blockTypes[ header.blockTypeIndex[i] ]; - } else { - // Find which block type this is by reading the string at this location - uint objectTypeLength = ReadUInt( in ); - if (objectTypeLength > 30 || objectTypeLength < 6) { - cout << "ERROR! Bad object position. Invalid Type Name Length: " << objectTypeLength << "\a" << endl; - cout << "====[ " << "Object " << i - 1 << " | " << blocks[i - 1]->GetType().GetTypeName() << " ]====" << endl; - cout << blocks[i - 1]->asString(); - throw runtime_error("Read failue - Bad object position"); - } - char* charobjectType = new char[objectTypeLength + 1]; - in.read( charobjectType, objectTypeLength ); - charobjectType[objectTypeLength] = 0; - objectType = string(charobjectType); - delete [] charobjectType; - if ( (objectType[0] != 'N' || objectType[1] != 'i') && (objectType[0] != 'R' || objectType[1] != 'o') && (objectType[0] != 'A' || objectType[1] != 'v')) { - cout << "ERROR! Bad object position. Invalid Type Name: " << objectType << "\a" << endl; - cout << "====[ " << "Object " << i - 1 << " | " << blocks[i - 1]->GetType().GetTypeName() << " ]====" << endl; - cout << blocks[i - 1]->asString(); - throw runtime_error("Read failue - Bad object position"); - } - } - -#ifdef PRINT_OBJECT_NAMES - cout << endl << i << ": " << objectType; -#endif - - //Create Block of the type that was found - blocks[i] = CreateBlock(objectType); - - //Check for an unknown block type - if ( blocks[i] == NULL ) { - //For version 5.0.0.1 and up, throw an exception - there's nothing we can do - //if ( version >= 0x05000001 ) { - stringstream str; - str << "Unknown object type encountered during file read: " << objectType; - throw runtime_error( str.str() ); - //} else { - //We can skip over this block in older versions - //blocks[i] = new UnknownBlock(objectType); - //} - } - - //blocks[i]->SetBlockNum(i); - blocks[i]->Read( in, link_stack, header.version, header.userVersion ); -#ifdef PRINT_OBJECT_CONTENTS - cout << endl << blocks[i]->asString() << endl; -#endif - } - - //cout << endl; - - //--Read Footer--// - uint unknownCount = ReadUInt( in ); - for (uint i=0; i < unknownCount; i++) ReadUInt( in ); // throw away - //Output - //cout << "====[ NiFooter ]====" << endl << - // "Unknown Count: " << Hex(unknownCount) << endl; - - ReadByte( in ); // this should fail, and trigger the in.eof() flag - if ( ! in.eof() ) - throw runtime_error("End of file not reached. This NIF may be corrupt or improperly supported."); - -#ifdef DEBUG_LINK_PHASE - cout << "Link Stack:" << endl; - list<uint>::iterator it; - for ( it = link_stack.begin(); it != link_stack.end(); ++it ) { - cout << *it << endl; - } -#endif - -#ifdef DEBUG_LINK_PHASE - cout << "Fixing Links:" << endl; -#endif - //--Now that all blocks are read, go back and fix the links--// - for (uint i = 0; i < blocks.size(); ++i) { -#ifdef DEBUG_LINK_PHASE - cout << i << ": " << blocks[i] << endl; -#endif - //Fix links & other pre-processing - blocks[i]->FixLinks( blocks, link_stack, header.version, header.userVersion ); - } - - - - ////TODO: Make this an optional step? - ////Build up the bind pose matricies into their world-space equivalents - //NiAVObjectRef av_root = DynamicCast<NiAVObject>( FindRoot(blocks) ); - //if ( av_root != NULL ) { - // BuildUpBindPositions( av_root ); - //} - - //Send all skeleton roots to bind position - for (uint i = 0; i < blocks.size(); ++i) { - NiNodeRef node = DynamicCast<NiNode>(blocks[i]); - if ( node != NULL && node->IsSkeletonRoot() ) { - node->GoToSkeletonBindPosition(); - } - } - - //TODO: Evaluate this and see if it can be moved to NiTriBasedGeom::FixLinks() - //// Re-position any TriShapes with a SkinInstance - //for (uint i = 0; i < blocks.size(); ++i) { - // - // attr_ref si_attr = blocks[i]->GetAttr("Skin Instance"); - // if ( si_attr.is_null() == true ) { - // continue; - // } - - // NiObjectRef si_blk = si_attr->asLink(); - - // if ( si_blk.is_null() == true ) { - // continue; - // } - - // NiObjectRef sd_blk = si_blk->GetAttr("Data")->asLink(); - - // if ( sd_blk.is_null() == true ) { - // continue; - // } - - // ISkinDataInternal * skin_data; - // skin_data = (ISkinDataInternal *)sd_blk->QueryInterface( SkinDataInternal ); - // if ( skin_data != NULL ) { - // skin_data->RepositionTriShape( blocks[i] ); - // } - - // //cout << i + 1 << ": " << blocks[i] << endl; - //} - - //Return completed block list - return blocks; -} - -// Writes a valid Nif File given a file name, a pointer to the root block of a file tree -void WriteNifTree( string const & file_name, NiObjectRef const & root_block, unsigned int version, unsigned int user_version ) { - //Open output file - ofstream out( file_name.c_str(), ofstream::binary ); - - WriteNifTree( out, root_block, version, user_version ); - - //Close file - out.close(); -} - -// Writes a valid Nif File given an ostream, a pointer to the root block of a file tree -void WriteNifTree( ostream & out, NiObjectRef const & root, unsigned int version, unsigned int user_version ) { - // Walk tree, resetting all block numbers - //int block_count = ResetBlockNums( 0, root_block ); - - //Enumerate all objects in tree - map<Type*,uint> type_map; - map<NiObjectRef, uint> link_map; - - //cout << "Enumerating Objects..." << endl; - EnumerateObjects( root, type_map, link_map ); - - //cout << "Building vectors for reverse look-up..." << endl; - //Build vectors for reverse look-up - vector<NiObjectRef> objects(link_map.size()); - for ( map<NiObjectRef, uint>::iterator it = link_map.begin(); it != link_map.end(); ++it ) { - //cout << "Objects[" << it->second << "] = " << it->first << endl; - objects[it->second] = it->first; - } -/* - uint i; - for (i=0; i<objects.size(); i++) - { - if (objects[i]->GetType()==bhkRigidBodyT::TypeConst() || - objects[i]->GetType()==bhkRigidBody::TypeConst()) - { - NiObjectRef tmp = objects[i]; - objects[i] = objects[i+1]; - objects[i+1] = tmp; - i++; - } - } -*/ - - vector<const Type*> types(type_map.size()); - for ( map<Type*, uint>::iterator it = type_map.begin(); it != type_map.end(); ++it ) { - types[it->second] = it->first; - } - - //cout << "Writing Header..." << endl; - - //--Write Header--// - // Version 10.0.1.0 is the last known to use the name NetImmerse - stringstream header_string; - if ( version <= VER_10_0_1_0 ) { - header_string << "NetImmerse File Format, Version "; - } else { - header_string << "Gamebryo File Format, Version "; - } - char * byte_ver = (char*)&version; - int int_ver[4] = { byte_ver[3], byte_ver[2], byte_ver[1], byte_ver[0] }; - - header_string << int_ver[0] << "." << int_ver[1] << "." << int_ver[2] << "." << int_ver[3]; - - out << header_string.str(); - WriteByte( 10, out ); // Unknown Byte = 10 - WriteUInt( version, out ); - - // Endian type byte - if ( version >= VER_20_0_0_4 ) { - WriteByte( 1, out ); - } - - // User version - if ( version >= VER_10_1_0_0 ) { - WriteUInt( user_version, out ); - } - - WriteUInt( uint(objects.size()), out ); //Number of objects - - if ( user_version != 0 ) { - // unknown int 3 - WriteUInt( user_version, out ); - // Creator? - ShortString s; - s.str = "NifExport"; - NifStream(s, out); - // Export Type? - s.str = "Default"; - NifStream(s, out); - // Export Script? - s.str = "Default"; - NifStream(s, out); - } - - //New header data exists from version 5.0.0.1 on - if ( version >= 0x05000001 ) { - WriteUShort( ushort(type_map.size()), out ); - - //Write Type Names - for ( uint i = 0; i < types.size(); ++i ) { - WriteString( types[i]->GetTypeName(), out ); - - } - - //Write type number of each block - for ( uint i = 0; i < objects.size(); ++i ) { - WriteUShort( type_map[(Type*)&(objects[i]->GetType())], out ); - - } - - //Unknown Int 2 - WriteUInt( 0, out ); - } - - //cout << "Writing objects..." << endl; - - //--Write Objects--// - for (uint i = 0; i < objects.size(); ++i) { - - if (version < 0x05000001) { - //cout << i << ": " << objects[i]->GetType().GetTypeName() << endl; - //Write Block Type - WriteString( objects[i]->GetType().GetTypeName() , out ); - } else if (version >= 0x05000001 && version <= VER_10_1_0_0 ) { - WriteUInt( 0, out ); - } - - objects[i]->Write( out, link_map, version, user_version ); - } - - //cout << "Writing footer.." << endl; - - //--Write Footer--// - WriteUInt( 1, out ); // Unknown Int = 1 (usually) - WriteUInt( 0, out ); // Unknown Int = 0 (usually) -} - -void EnumerateObjects( NiObjectRef const & root, map<Type*,uint> & type_map, map<NiObjectRef, uint> & link_map ) { - //Ensure that this object has not already been visited - if ( link_map.find( root ) != link_map.end() ) { - //This object has already been visited. Return. - return; - } - - //Add this object type to the map if it isn't there already - if ( type_map.find( (Type*)&(root->GetType()) ) == type_map.end() ) { - //The type has not yet been registered, so register it - //cout << "Types[" << uint(type_map.size()) << "] = " << root->GetType().GetTypeName() << endl; - type_map[ (Type*)&(root->GetType()) ] = uint(type_map.size()); - } - - Type *t = (Type*)&(root->GetType()); - if (t->GetTypeName() == "bhkRigidBodyT" || - t->GetTypeName() == "bhkRigidBody") - { - //Call this function on all links of this object - list<NiObjectRef> links = root->GetRefs(); - for ( list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) { - if ( *it != NULL ) { - EnumerateObjects( *it, type_map, link_map ); - } - } - - //Add object to link map - link_map[root] = uint(link_map.size()); - } else - { - //Add object to link map - link_map[root] = uint(link_map.size()); - - //Call this function on all links of this object - list<NiObjectRef> links = root->GetRefs(); - for ( list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) { - if ( *it != NULL ) { - EnumerateObjects( *it, type_map, link_map ); - } - } - } -} - -//void BuildUpBindPositions( const NiAVObjectRef & root ) { -// -// //Get parent if there is one -// NiNodeRef par = root->GetParent(); -// if ( par != NULL ) { -// //There is a node parent -// -// //Post-multipy the block's bind matrix with the parent's bind matrix -// Matrix44 result = root->GetWorldBindPos() * par->GetWorldBindPos(); -// -// //Store result back to block bind position -// root->SetWorldBindPos( result ); -// } -// -// //If this is a NiNode, call this function for all child AVObjects -// NiNodeRef node = DynamicCast<NiNode>(root); -// if ( node != NULL ) { -// vector<NiAVObjectRef> children = node->GetChildren(); -// for (vector<NiAVObjectRef>::iterator it = children.begin(); it != children.end(); ++it) { -// if ( *it != NULL ) { -// BuildUpBindPositions( *it ); -// } -// } -// } -//} - -//TODO: Should this be returning an object of a derived type too? -// Searches for the first object in the hierarchy of type. -NiObjectRef GetObjectByType( const NiObjectRef & root, const Type & type ) { - if ( root->IsSameType( type ) ) { - return root; - } - - list<NiObjectRef> links = root->GetRefs(); - for (list <NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it) { - // Can no longer guarantee that some objects won't be visited twice. Oh well. - NiObjectRef result = GetObjectByType( *it, type ); - if ( result != NULL ) { - return result; - } - }; - - return NULL; // return null reference -}; - -//TODO: Should this be returning all objects of a derived type too? -// Returns all in the in the tree of type. -list<NiObjectRef> GetAllObjectsByType( NiObjectRef const & root, const Type & type ) { - list<NiObjectRef> result; - if ( root->IsSameType(type) ) { - result.push_back( root ); - } - list<NiObjectRef> links = root->GetRefs(); - for (list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) { - // Can no longer guarantee that some objects won't be visited twice. Oh well. - list<NiObjectRef> childresult = GetAllObjectsByType( *it, type ); - result.merge( childresult ); - }; - return result; -}; - -//TODO: Is this function used anywhere? Does it need to be re-done? -//list<NiObjectRef> GetNifTree( NiObjectRef const & root_block ) { -// list<NiObjectRef> result; -// result.push_back( root_block ); -// list<NiObjectRef> links = root_block->GetRefs(); -// for (list<NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it ) { -// if ( it->is_null() == false && (*it)->GetParent() == root_block ) { -// list<NiObjectRef> childresult = GetNifTree( *it ); -// result.merge( childresult ); -// }; -// }; -// return result; -//}; - -//TODO: This was written by Amorilia. Figure out how to fix it. -/*! - * Helper function to split off animation from a nif tree. If no animation groups are defined, then both xnif_root and xkf_root will be null blocks. - * \param root_block The root block of the full tree. - * \param xnif_root The root block of the tree without animation. - * \param xkf_root The root block of the animation tree. - * \param kfm The KFM structure (if required by style). - * \param kf_type What type of keyframe tree to write (Morrowind style, DAoC style, ...). - */ -//void SplitNifTree( NiObjectRef const & root_block, NiObjectRef & xnif_root, NiObjectRef & xkf_root, Kfm & kfm, int kf_type ) { -// // Do we have animation groups (a NiTextKeyExtraData block)? -// // If so, create XNif and XKf trees. -// NiObjectRef txtkey_block = GetObjectByType( root_block, NiTextKeyExtraData::TypeConst() ); -// if ( txtkey_block != NULL ) { -// if ( kf_type == KF_MW ) { -// // Construct the XNif file... -// // We are lazy. (TODO: clone & remove keyframe controllers & keyframe data) -// xnif_root = root_block; -// -// // Now the XKf file... -// // Create xkf root header. -// xkf_root = CreateBlock("NiSequenceStreamHelper"); -// -// // Add a copy of the NiTextKeyExtraData block to the XKf header. -// NiObjectRef xkf_txtkey_block = CreateBlock("NiTextKeyExtraData"); -// //TODO: Have Amorilia fix this -// //xkf_root["Extra Data"] = xkf_txtkey_block; -// -// /*ITextKeyExtraData const *itxtkey_block = QueryTextKeyExtraData(txtkey_block); -// ITextKeyExtraData *ixkf_txtkey_block = QueryTextKeyExtraData(xkf_txtkey_block); -// ixkf_txtkey_block->SetKeys(itxtkey_block->GetKeys());*/ -// -// // Append NiNodes with a NiKeyFrameController as NiStringExtraData blocks. -// list<NiObjectRef> nodes = GetAllObjectsByType( root_block, NiNode::TypeConst() ); -// for ( list<NiObjectRef>::iterator it = nodes.begin(); it != nodes.end(); ) { -// //TODO: Have Amorilia Fix this -// /*if ( (*it)->GetAttr("Controller")->asLink().is_null() || (*it)->GetAttr("Controller")->asLink()->GetBlockType() != "NiKeyframeController" ) -// it = nodes.erase( it ); -// else -// it++;*/ -// }; -// -// NiObjectRef last_block = xkf_txtkey_block; -// for ( list<NiObjectRef>::const_iterator it = nodes.begin(); it != nodes.end(); ++it ) { -// NiObjectRef nodextra = CreateBlock("NiStringExtraData"); -// //TODO: Implement NiStringEtraData along with functions/member variables to cover these data items -// //nodextra["String Data"] = (*it)["Name"]->asString(); -// //last_block["Next Extra Data"] = nodextra; -// last_block = nodextra; -// }; -// -// // Add controllers & controller data. -// last_block = xkf_root; -// for ( list<NiObjectRef>::const_iterator it = nodes.begin(); it != nodes.end(); ++it ) { -// //TODO: Implement NiTimeController class functions/variables -// //NiObjectRef controller = (*it)->GetAttr("Controller")->asLink(); -// //NiObjectRef xkf_controller = CreateBlock("NiKeyframeController"); -// //xkf_controller["Flags"] = controller["Flags"]->asInt(); -// //xkf_controller["Frequency"] = controller["Frequency"]->asFloat(); -// //xkf_controller["Phase"] = controller["Phase"]->asFloat(); -// //xkf_controller["Start Time"] = controller["Start Time"]->asFloat(); -// //xkf_controller["Stop Time"] = controller["Stop Time"]->asFloat(); -// // -// //NiObjectRef xkf_data = CreateBlock("NiKeyframeData"); -// //xkf_controller["Data"] = xkf_data; -// //IKeyframeData const *ikfdata = QueryKeyframeData(controller["Data"]->asLink()); -// //IKeyframeData *ixkfdata = QueryKeyframeData(xkf_data); -// //ixkfdata->SetRotateType(ikfdata->GetRotateType()); -// //ixkfdata->SetTranslateType(ikfdata->GetTranslateType()); -// //ixkfdata->SetScaleType(ikfdata->GetScaleType()); -// //ixkfdata->SetRotateKeys(ikfdata->GetRotateKeys()); -// //ixkfdata->SetTranslateKeys(ikfdata->GetTranslateKeys()); -// //ixkfdata->SetScaleKeys(ikfdata->GetScaleKeys()); -// -// //if ( last_block == xkf_root ) { -// // if ( ! last_block["Controller"]->asLink().is_null() ) -// // throw runtime_error("Cannot create .kf file for multicontrolled nodes."); // not sure 'bout this one... -// // last_block["Controller"] = xkf_controller; -// //} else { -// // if ( ! last_block["Next Controller"]->asLink().is_null() ) -// // throw runtime_error("Cannot create .kf file for multicontrolled nodes."); // not sure 'bout this one... -// // last_block["Next Controller"] = xkf_controller; -// //}; -// //last_block = xkf_controller; -// //// note: targets are automatically calculated, we don't need to reset them -// }; -// } else // TODO other games -// throw runtime_error("Not yet implemented."); -// } else { -// // no animation groups: nothing to do -// xnif_root = NULL; -// xkf_root = NULL; -// }; -//} - -//TODO: This was written by Amorilia. Figure out how to fix it. -///*! -// * Helper function to split an animation tree into multiple animation trees (one per animation group) and a kfm block. -// * \param root_block The root block of the full tree. -// * \param kf Vector of root blocks of the new animation trees. -// */ -//void SplitKfTree( NiObjectRef const & root_block, vector<NiObjectRef> & kf ) { -// throw runtime_error("Not yet implemented."); -//}; - -//TODO: This was written by Amorilia. Figure out how to fix it. -//void WriteFileGroup( string const & file_name, NiObjectRef const & root_block, unsigned int version, unsigned int export_files, unsigned int kf_type ) { -// // Get base filename. -// uint file_name_slash = uint(file_name.rfind("\\") + 1); -// string file_name_path = file_name.substr(0, file_name_slash); -// string file_name_base = file_name.substr(file_name_slash, file_name.length()); -// uint file_name_dot = uint(file_name_base.rfind(".")); -// file_name_base = file_name_base.substr(0, file_name_dot); -// -// // Deal with the simple case first -// if ( export_files == EXPORT_NIF ) -// WriteNifTree( file_name_path + file_name_base + ".nif", root_block, version ); // simply export the NIF file! -// // Now consider all other cases -// else if ( kf_type == KF_MW ) { -// if ( export_files == EXPORT_NIF_KF ) { -// // for Morrowind we must also write the full NIF file -// WriteNifTree( file_name_path + file_name_base + ".nif", root_block, version ); // simply export the NIF file! -// NiObjectRef xnif_root; -// NiObjectRef xkf_root; -// Kfm kfm; // dummy -// SplitNifTree( root_block, xnif_root, xkf_root, kfm, KF_MW ); -// if ( xnif_root != NULL ) { -// WriteNifTree( file_name_path + "x" + file_name_base + ".nif", xnif_root, version ); -// WriteNifTree( file_name_path + "x" + file_name_base + ".kf", xkf_root, version ); -// }; -// } else -// throw runtime_error("Invalid export option."); -// } else -// throw runtime_error("Not yet implemented."); -//}; - - -//Returns the total number of blocks in memory -unsigned int BlocksInMemory() { - return NiObject::NumObjectsInMemory(); -} - -void MapParentNodeNames( map<string,NiAVObjectRef> & name_map, NiNodeRef & par ) { - - - //Add the par node to the map, and then call this function for each of its children - name_map[par->GetName()] = StaticCast<NiAVObject>(par); - - - vector<NiAVObjectRef> links = par->GetChildren(); - for (vector<NiAVObjectRef>::iterator it = links.begin(); it != links.end(); ++it) { - NiNodeRef child_node = DynamicCast<NiNode>(*it); - if ( child_node != NULL ) { - MapParentNodeNames( name_map, child_node ); - }; - }; -} - -void ReassignTreeCrossRefs( map<string,NiAVObjectRef> & name_map, NiAVObjectRef par ) { - //TODO: Decide how cross refs are going to work - ////Reassign any cross references on this block - //((ABlock*)par.get_block())->ReassignCrossRefs( name_map ); - - //list<NiObjectRef> links = par->GetRefs(); - //for (list <NiObjectRef>::iterator it = links.begin(); it != links.end(); ++it) { - // // if the link is not null, and if the child's first parent is root_block - // // (this makes sure we only check every child once, even if it is shared by multiple parents), - // // then look for a match in the tree starting from the child. - // if ( it->is_null() == false && (*it)->GetParent() == par ) { - // ReassignTreeCrossRefs( name_map, *it ); - // }; - //}; -} - -//This function will merge two scene graphs by attatching new objects to the correct position -//on the existing scene graph. In other words, it deals only with adding new nodes, not altering -//existing nodes by changing their data or attatched properties -void MergeSceneGraph( map<string,NiAVObjectRef> & name_map, const NiNodeRef & root, NiAVObjectRef par ) { - //Check if this block's name exists in the block map - string name = par->GetName(); - - if ( name_map.find(name) != name_map.end() ) { - //This block already exists in the original file, so continue on to its children, if it is a NiNode - - NiNodeRef par_node = DynamicCast<NiNode>(par); - if ( par_node != NULL ) { - vector<NiAVObjectRef> children = par_node->GetChildren(); - for ( vector<NiAVObjectRef>::iterator it = children.begin(); it != children.end(); ++it ) { - if ( (*it) != NULL ) { - MergeSceneGraph( name_map, root, *it ); - }; - }; - } - return; - } - - //This block has a new name and either it has no parent or its parent has a name that is - // in the list. Attatch it to the block with the same name as its parent - //all child blocks will follow along. - NiNodeRef par_par = par->GetParent(); - - if ( par_par == NULL) { - //This block has a new name and no parents. That means it is the root block - //of a disimilar Nif file. - - //Check whether we have a NiNode ( a node that might have children) or not. - NiNodeRef par_node = DynamicCast<NiNode>(par); - if ( par_node == NULL ) { - //This is not a NiNode class, so simply add it as a new child of the - //target root node - root->AddChild( par ); - - //cout << "Added link to " << par << " in " << root << " block."; - } else { - //This is a NiNode class, so merge its child list with that of the root - vector<NiAVObjectRef> children = par_node->GetChildren(); - for ( uint i = 0; i < children.size(); ++i ) { - root->AddChild( children[i] ); - } - } - } else { - //This block has a new name and has a parent with a name that already exists. - //Attatch it to the block in the target tree that matches the name of its - //parent - - //TODO: Implement children - ////Remove this block from its old parent - //par_par->GetAttr("Children")->RemoveLinks( par ); - - //Get the block to attatch to - NiObjectRef attatch = DynamicCast<NiObject>(name_map[par_par->GetName()]); - - //TODO: Implement children - ////Add this block as new child - //attatch->GetAttr("Children")->AddLink( par ); - ////cout << "Added link to " << par << " in " << attatch << " block."; - } -} - -void MergeNifTrees( NiNodeRef target, NiAVObjectRef right, unsigned int version ) { - //For now assume that both are normal Nif trees just to verify that it works - - //Make a clone of the tree to add - stringstream tmp; - //WriteNifTree( tmp, right, version ); - tmp.seekg( 0, ios_base::beg ); - NiAVObjectRef new_tree = right;// ReadNifTree( tmp ); TODO: Figure out why this doesn't work - - //Create a list of names in the target - map<string,NiAVObjectRef> name_map; - MapParentNodeNames( name_map, target ); - - //Reassign any cross references in the new tree to point to blocks in the - //target tree with the same names - ReassignTreeCrossRefs( name_map, new_tree ); - - //Use the name map to merge the Scene Graphs - MergeSceneGraph( name_map, target, new_tree ); -} - - -bool IsVersionSupported(unsigned int ver) { - switch (ver) - { - case VER_4_0_0_2: - case VER_4_1_0_12: - case VER_4_2_0_2: - case VER_4_2_1_0: - case VER_4_2_2_0: - case VER_10_0_1_0: - case VER_10_1_0_0: - case VER_10_2_0_0: - case VER_20_0_0_4: - case VER_20_0_0_5: - return true; - } - return false; -} - -unsigned int GetVersion(string version){ - unsigned int outver = 0; - string::size_type start = 0; - for(int offset = 3; offset >= 0 && start < version.length(); --offset) { - string::size_type end = version.find_first_of(".", start); - string::size_type len = (end == string.npos) ? end : end-start; - int num = 0; - stringstream sstr(version.substr(start, len)); - sstr >> num; - if (num > 0xFF) { - outver = VER_INVALID; - break; - } - outver |= (num << (offset * 8)); - if (len == string::npos) - break; - start = start + len + 1; - } - if (outver == 0) - outver = VER_INVALID; - return outver; -} - -} // namespace NifLib \ No newline at end of file diff --git a/NifExport/niflib/niflib.h b/NifExport/niflib/niflib.h deleted file mode 100755 index 083e140..0000000 --- a/NifExport/niflib/niflib.h +++ /dev/null @@ -1,587 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the NIF File Format Library and Tools - project nor the names of its contributors may be used to endorse - or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -#ifndef _NIFLIB_H_ -#define _NIFLIB_H_ - -//--Includes--// -#include <iostream> -#include <fstream> -#include <string> -#include <map> -#include <exception> -#include <stdexcept> -#include <algorithm> -#include <functional> -#include <numeric> -#include <vector> -#include <list> -#include <map> -#include "dll_export.h" -#include "nif_math.h" -#include "nif_versions.h" -#include "Ref.h" - -using namespace std; -namespace Niflib { - -//Classes used -class NiObject; -class NiNode; -class NiAVObject; -class NiControllerSequence; - -#ifndef NULL -#define NULL 0 /*!< Definition used to detect null pointers. */ -#endif - -//--Constants--// - -/*! Keyframe trees are game dependent, so here we define a few games. */ -enum NifGame { - KF_MW = 0, /*!< keyframe files: NiSequenceStreamHelper header, .kf extension */ - KF_DAOC = 1, /*!< keyframe files: NiNode header, .kfa extension */ - KF_CIV4 = 2 /*!< keyframe files: NiControllerSequence header, .kf extension */ -}; - -/*! Export options. */ -enum ExportOptions { - EXPORT_NIF = 0, /*!< NIF */ - EXPORT_NIF_KF = 1, /*!< NIF + single KF + KFM */ - EXPORT_NIF_KF_MULTI = 2, /*!< NIF + multiple KF + KFM */ - EXPORT_KF = 3, /*!< single KF */ - EXPORT_KF_MULTI = 4 /*!< multiple KF */ -}; - -//--Main Functions--// - -/*! - * Reads the header of the given file by file name and returns the NIF version. Call this - * function prior to calling ReadNifList or ReadNifTree, if you need to make sure that the NIF file is supported. - * \param file_name The name of the file to load, or the complete path if it is not in the working directory. - * \return The NIF version of the file, in hexadecimal format. If the file is not a NIF file, it returns VER_INVALID. If it is a NIF file, but its version is not supported by the library, it returns VER_UNSUPPORTED. - * - * <b>Example:</b> - * \code - * unsigned int ver = CheckNifHeader("test_in.nif"); - * if ( ver == VER_UNSUPPORTED ) cout << "unsupported" << endl; - * else if ( ver == VER_INVALID ) cout << "invalid" << endl; - * else { - * vector<NiObjectRef> blocks = ReadNifList( "test_in.nif" ); - * cout << blocks[0] << endl; - * }; - * - * \endcode - * - * <b>In Python:</b> - * \code - * ver = CheckNifHeader("test_in.nif") - * if ( ver == VER_UNSUPPORTED ): - * print "unsupported" - * elif ( ver == VER_INVALID ): - * print "invalid" - * else: - * blocks = ReadNifList( "test_in.nif" ) - * print blocks[0] - * \endcode - */ -NIFLIB_API unsigned int CheckNifHeader( string const & file_name ); - -/*! - * Reads the given file by file name and returns a vector of block references - * \param file_name The name of the file to load, or the complete path if it is not in the working directory. - * \return A vector of block references that point to all the blocks read from the Nif file. - * - * <b>Example:</b> - * \code - * NiObjectRef my_block = ReadNifList("test_in.nif"); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = ReadNifList("test_in.nif") - * \endcode - * - * \sa ReadNifTree, WriteNifTree - */ -NIFLIB_API vector< Ref<NiObject> > ReadNifList( string const & file_name ); - -/*! - * Reads the given input stream and returns a vector of block references - * \param stream The input stream to read NIF data from. - * \return A vector of block references that point to all the blocks read from the stream. - */ -NIFLIB_API vector< Ref<NiObject> > ReadNifList( istream & in ); - -/*! - * Reads the given file by file name and returns a reference to the root block. - * \param file_name The name of the file to load, or the complete path if it is not in the working directory. - * \return A block reference that points to the root of tree of data blocks contained in the NIF file. - * - * <b>Example:</b> - * \code - * NiObjectRef my_block = ReadNifTree("test_in.nif"); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = ReadNifTree("test_in.nif") - * \endcode - * - * \sa ReadNifList, WriteNifTree - */ -NIFLIB_API Ref<NiObject> ReadNifTree( string const & file_name ); - -/*! - * Reads the given input stream and returns a reference to the root block. - * \param stream The input stream to read NIF data from. - * \return A block reference that points to the root of the tree of data blocks contained in the NIF file. - */ -NIFLIB_API Ref<NiObject> ReadNifTree( istream & in ); - -/*! - * Creates a new NIF file of the given file name by crawling through the data tree starting with the root block given. - * \param file_name The desired file name for the new NIF file. The path is relative to the working directory unless a full path is specified. - * \param root The root block to start from when writing out the NIF file. All decedents of this block will be written to the file in tree-descending order. - * \param version The version of the NIF format to use when writing a file. Default is version 4.0.0.2. - * \param user_version Some companies implement special extentions to the format which can be specified here. - * - * <b>Example:</b> - * \code - * NiObjectRef my_block = ReadNifTree("test_in.nif"); - * WriteNifTree( "test_out.nif", my_block ); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = ReadNifTree("test_in.nif") - * WriteNifTree( "test_out.nif", my_block ) - * \endcode - * - * \sa ReadNifList, WriteNifTree - */ -NIFLIB_API void WriteNifTree( string const & file_name, Ref<NiObject> const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 ); - -/*! - * Writes a nif tree to an ostream starting at the given root block. - * \param stream The output stream to write the NIF data to. - * \param root The root block to start from when writing out the NIF data. All decedents of this block will be written to the stream in tree-descending order. - * \param version The version of the NIF format to use when writing a file. Default is version 4.0.0.2. - */ -NIFLIB_API void WriteNifTree( ostream & stream, Ref<NiObject> const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 ); - -/*! - * Writes a bunch of files given a base file name, and a pointer to the root block of the Nif file tree. - * \param file_name The desired file name for the base NIF file. This name serves as the basis for the names of any Kf files and Kfm files as well. The path is relative to the working directory unless a full path is specified. - * \param root The root block to start from when writing out the NIF file. - * \param version The version of the NIF format to use when writing a file. - * \param export_files What files to write: NIF, NIF + KF + KFM, NIF + KF's + KFM, KF only, KF's only - * \param kf_type The KF type (Morrowind style, DAoC style, CivIV style, ...) - */ -NIFLIB_API void WriteFileGroup( string const & file_name, Ref<NiObject> const & root, unsigned int version, ExportOptions export_files, NifGame kf_type ); - -/*! - * Creates a clone of an entire tree of objects. - * \param root The root block to start from when cloning the NIF data. All referenced objects will be included in the new tree. - * \param version The version of the NIF format to use when writing a file. Default is version 4.0.0.2. - * \param user_version The user version of the NIF format to use when writing a file. Default is user version 0. - * \return The root of the new cloned tree. - */ -NIFLIB_API Ref<NiObject> CloneNifTree( Ref<NiObject> const & root, unsigned int version = VER_4_0_0_2, unsigned int user_version = 0 ); - - -//TODO: Figure out how to fix this to work with the new system -/*! - * Merges two Nif trees into one. For standard Nif files, any blocks with the same name are merged. For Kf files, blocks are attatched to those that match the name specified in the KF root block. The data stored in a NIF file varies from version to version. Usually you are safe with the default option (the highest availiable version) but you may need to use an earlier version if you need to clone an obsolete piece of information. - * \param target The root block of the first Nif tree to merge. - * \param right The root block of the second Nif tree to merge. - * \param version The version of the nif format to use during the clone operation on the right-hand tree. The default is the highest version availiable. - */ -//NIFLIB_API void MergeNifTrees( NiNodeRef target, NiAVObjectRef right, unsigned int version = 0xFFFFFFFF ); -NIFLIB_API void MergeNifTrees( const Ref<NiNode> & target, const Ref<NiControllerSequence> & right, unsigned int version = 0xFFFFFFFF, unsigned int user_version = 0 ); - - -//// Returns list of all blocks in the tree rooted by root block. -//list<NiObjectRef> GetNifTree( NiObjectRef const & root_block ); - -////Returns the NIF spec version of a file, given a file name. -//string GetFileVersion(string file_name); - -/*! - * Creates a new block of the given type and returns a reference to it - * \param block_type – The type of block you want to create. This value is case sensitive and spelling is important. Ex. NiNode, NiTriShapeData, NiParticleSystemController, etc. - * \return This function will return a newly created block of the requested type. Beware, if the block type is unrecognized, this function will return a featureless block with whatever you sent it as the type. - * - * <b>Example:</b> - * \code - * NiObjectRef my_block = CreateBlock("NiNode"); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = CreateBlock("NiNode") - * \endcode - * - * sa BlocksInMemory - */ -NIFLIB_API Ref<NiObject> CreateBlock( string block_type ); - -/*! - * Returns whether the requested version is supported. - * \param version The version of the nif format to test for availablity. - * \return Whether the requested version is supported. - */ -NIFLIB_API bool IsVersionSupported(unsigned int ver); - -/*! - * Parses the version string and returns in the equivalent version as integer - * \param version The version of the nif format to parse. - * \return The version in integer format. Returns VER_INVALID for invalid version strings. - */ -NIFLIB_API unsigned int GetVersion(string version); - -//TODO: This is planned functionality but is unfinished -//struct ComplexVertex { -// ComplexVertex() : has_color(false), has_normal(false), vertex_index(0), normal_index(0), color_index(0) {} -// ~ComplexVertex(); -// bool has_color, has_normal; -// int vertex_index, color_index, normal_index; -// bool has_base_uv, has_glow_uv; -// int base_uv_index, glow_uv_index; -//} -// -//struct ComplexFace { -// vector<ComplexVertex> points; -// int base_map_index; -// int glow_map_index; -//}; -// -//class ComplexShape { -// void SetVertices( vector<Vector3> & vertices ); -// void SetUVs( vector<TexCoord> & uvs ); -// void SetColors( vector<Color4> & colors ); -// void SetNormals( vector<Vector3> & normals ); -// void SetBones( vector<blk_ref> & bones ); -// void SetFaces( list< vector< ComplexVertex > > & faces ); -// -// vector<Vector3> GetVertices(); -// vector<TexCoord> GetUVs(); -// vector<Color4> GetColors(); -// vector<Vector3> GetNormals(); -// vector<blk_ref> GetBones(); -// list< vector< ComplexVertex > > GetFaces(); -// -//private: -// vector<Vector3> _vertices; -// vector<Color4> _colors; -// vector<Vector3> _normals; -// list<ComplexFace> _faces; -// map<string, blk_ref> _materials; -// map<string, vector<TexCoord> > _uvs; -// map<blk_ref, map<int, float> > _bones; -//}; -// -//void ComplexShape::CombineTriShapes( list<blk_ref> & tri_shapes ) { -// //Clear all internal datea -// _vertices.clear(); -// _colors.clear(); -// _normals.clear(); -// _materials.clear(); -// _uvs.clear(); -// _faces.clear(); -// _bones.clear(); -// -// //Create a temporary spot to hold the triangle lists from each TriShape -// vector< vector<Triangle> > ts_faces; -// -// //Create lists to hold the lookup tables -// vector<int> tri_lookup, nor_lookup, col_lookup; -// map<string, vector<int> > mat_lookup, uv_lookup; -// -// //--Cycle through all the TriShapes, adding their data to the lists--// -// list<blk_ref>::iterator it; -// -// for (it = tri_shapes.begin(); it != tri_shapes.end(); ++it) { -// ITriShapeData * data = QueryTriShapeData(*it); -// -// //Vertices -// vector<Vector3> ts_verts = data->GetVertices(); -// _vertices.insert(_vertices.end(), ts_verts.begin(), ts_verts.end(); -// -// //Normals -// vector<Vector3> ts_norms = data->GetNormals(); -// _normals.insert(_normals.end(), ts_norms.begin(), ts_norms.end(); -// -// //Colors -// vector<Colors> ts_cols = data->GetColors(); -// _colors.insert(_colors.end(), ts_colors.begin(), ts_colors.end(); -// -// //Triangles -// ts_faces[i] = data->GetTriangles(); -// -// //UV Coords -// vector< vector<TexCoords> > uvs(data->GetUVSetCount()); -// for (int i = 0; i < data->GetUVSetCount(); ++i) { -// uvs[i] = data->GetUVSet(i); -// } -// -// //Associate UV Coord Data with proper map name -// blk_ref tx_prop = par["Properties"]->FindLink( "NiTexturingProperty"); -// if ( tx_prop.is_null() == false ) { -// int uv_set = 0; -// for (int i = 0; i < 7; ++i) { -// string attr_name, map; -// switch(i) { -// case 0: attr_name = "Base Texture"; map = "map1"; break; -// case 1: attr_name = "Dark Texture"; map = "dark"; break; -// case 2: attr_name = "Detail Texture"; map = "detail"; break; -// case 3: attr_name = "Gloss Texture"; map = "gloss"; break; -// case 4: attr_name = "Glow Texture"; map = "glow"; break; -// case 5: attr_name = "Bump Map Texture"; map = "bump"; break; -// case 6: attr_name = "Decal 0 Texture"; map = "decal0"; -// } -// -// if ( tx_prop[attr_name]->asTexDesc().isUsed == true ) { -// //How to merge all UVs? -// } -// -// } -// -// -// //blk_ref material = (*it)->GetAttr("Propreties")->FindLink("NiMaterialProperty"); -// //blk_ref skin_inst = (*it)->GetAttr("Skin Instance")->asLink(); -// //blk_ref skin_data; -// //vector<blk_ref> bones; -// //map<int, float> weights; -// //if ( skin_inst.is_null() == false ) { -// // skin_block = skin_inst->GetAttr("Data"); -// // if (skin_block.is_null() == false ) { -// // ISkinData * skin_data = QuerySkinData(skin_block); -// // weights = skin_data->GetWeights(); -// // bones = skin_data->GetBones(); -// // } -// //} -// -// } -//} - -//--USER GUIDE DOCUMENTATION--// - -/*! \mainpage Niflib Documentation -\section user_guide User Guide -- \ref intro_page -- \ref starting_out -*/ - -/////////////////////////////////////////////////////////////////////////////// - -/*! \page intro_page Introduction - -\section compile Compiling the Library - -Starting with version 0.5, Niflib creates a lib file that is too large to distribute directly, so to use it through C++ you must first compile it. If you need help to do this, there is information about it on our main website here: <a href="http://niftools.sourceforge.net/wiki/index.php/Niflib/Compile">Compiling Niflib</a>. - -A Python compile of the library will still be available for Windows, but for other platforms you will need to compile the library yourself. - -\section include Including the Library - -\subsection cpp C++ - -Once you have compiled Niflib, you will have a binary library file which you must reference from your project. If you’re using Visual Studio, you can add it as an “Additional Dependancy” within your project options. You can also include all the source code in your compile process if you do not want to use an intermediate library file. Finally, make sure the path to niflib.h is in your include search paths. - -\code -#include "niflib.h" -\endcode - -There are now separate include files for each object type in a NIF file. To include the NiNode object, for example, include the obj/NiNode.h file like so: - -\code -#include "obj/NiNode.h" -\endcode - -You will have one such line in your source code for each NIF object that your program needs access to. - -Niflib also wraps all its functions in the "Niflib" namespace. So, depending on your needs, you can either gain access to all Niflib symbols with a using directive like this: - -\code -using namespace Niflib; -\endcode - -Gain access to specific symbols but not others with specific using directives like this: - -\code -using Niflib::NiNodeRef; -using Niflib::NiObjectRef; -using Niflib::ReadNifTree; -\endcode - -Or simply prepend all of your Niflib symbols with "Niflib::" like this: - -\code -Niflib::NiObjectRef niObj = Niflib::ReadNifTree( "test.nif" ); -\endcode - -\subsection py Python - -If you are using the pre-compiled version of the Python SWIG wrapper for Windows, you should follow the instructions in the readme file that is included. Briefly, you will place the _niflib.dll and the niflib.py files in your Python 2.4 install location. If you want to compile them yourself you will need to get SWIG 1.3.25 or higher. There there are two build methods, Scons and a Visual Studio 2005 project, provided for this purpose. - -Once you have these files in the proper position in the Python directory, you can use the library in either of the two standard Python ways: - -\code -from niflib import * -\endcode -or -\code -import niflib -\endcode - -To save space, the examples assume that you have used the first method. Of course if you use the second, you will have to preface all function calls with niflib. For example, ReadNifTree() becomes niflib.ReadNifTree(). Currently the Python module includes all NIF objects and is not split into separate modules for each object like the C++ version, so you will only need a single import statement to get everything. - -\section exept Exceptions - -Niflib uses C++ exceptions rather than error return codes. These are a lot more convenient in that you don’t have to wrap every single function in an if-test, but not everyone understands what they are, so I thought I’d provide enough of an intro to get you along. C++ exceptions should be mapped to Python exceptions transparently, so this only applies to people using the library via C++. - -Very basically, if you want to check if Niflib function calls are failing, and why, wrap them in a try block like this: - -\code -try { - //Niflib Function Call - vector<NiObject> objects = ReadNifList( current_file ); -} -catch( exception & e ) { - cout << "Error: " << e.what() << endl; - return 0; -} -catch( ... ) { - cout << "Unknown Exception." << endl; - return 0; -} -\endcode - -The really nice thing about exceptions is that you can place all of your Niflib calls within one try block, and if any one of them fails, execution will jump to the catch block. The first block will catch any exception thrown explicitly by Niflib, and an error message can be extracted and printed. Other exceptions, such as from bugs in the library or errors it never occurred to us to test for, will go to the second block which is a catch-all statement that will end your program for any other reason. - -There are ways to recover from exceptions, but this should be enough to allow you to at least exit gracefully if a function signals an error. - -\section stl_temp STL & Templates - -Niflib makes quite a bit of use of the standard template library, and also includes some templates of its own. You should be familiar with the template syntax for defining variables (ex: template<type>) You should also be familiar with at least the following STL built-in types: string, vector, and list. These types map to Python types seamlessly (string, tuple, and tuple respectively), so no understanding of C++ is required for Python users. - -//<center>\ref starting_out "Next Section >>>"</center> - -*/ - -/////////////////////////////////////////////////////////////////////////////// - -/*! \page starting_out Starting Out with Niflib - -\section file_basics NIF File Basics - -NIF files are the result of the NetImmmerse/Gamebryo engine saving the current state of a scene graph. A scene graph is a tree of 3D transforms that has meshes and rendering instructions attached. Each object is a class which, when the file is saved, writes its contents to disk. So the NIF file is a listing of all the NIF classes, or objects, that are required to recreate a particular scene. - -The objects in a NIF file all inherit from the NiObject class and reference eachother in various ways. These relationships are reconstructed when the file is loaded from disk and can then be broken or redirected. The most important structure is formed by the scene graph objects. These objects inherit from the NiAVObject class and form the spacial structure of the scene represented by the NIF file. Each has a 3D transform that is relative to its parent. - -Attatched to the NiAVObject classes are various other sorts of objects that either contain the raw data used to render the scene, such as the verticies in NiTriBasedGeomData and the animation keyframes in NiKeyFrameData, or modify the way the scene is drawn in some other way such as objects inheriting from NiProperty and NiExtraData. - -Each object type has member functions which allow you to get and set data, adjust linkage to other objects, and some also include functions to perform useful calculations on the data. - -You do not access the classes directly, however. Niflib uses reference counting to determine when objects are destroyed, so you always access a class through a Ref smart pointer. This is a template which takes the class as its template argumetn, such as Ref<NiNode>. For each type of Ref a typedef has been provided in the form of [class name]Ref, so Ref<NiNode> has the typedef NiNodeRef, and this name can be used instead of the more unusual template syntax. When the last Ref smart pointer that points to a particular object is reassigned or goes out of scope, that object will take care of cleaning itself up automatically. - -Objects use Ref smart pointers internally as well, so you don’t have to worry about objects that are referenced by other objects destroying themselves unexpectedly. - - -\section rw_files Reading and Writing NIF Files - -To check whether a NIF file has a valid header, and to make sure that its version is supported, call the \ref CheckNifHeader function. There are two ways to read in a NIF file – as a list of objects in the order they appear in the file and as a single Ref pointing to the root of the scene graph tree from which all other objects can be found by following the links between objects. Most of the time you will probably want to use the tree method, as this is the only one eligible for writing. The list method is provided for uses such as Niflyze that need to retrieve all objects, regardless of whether we fully understand the links that keep them from destroying themselves. Un-supported blocks may not be included in the tree representation if no other blocks reference them. So most of the time, you’re going to want to call the \ref ReadNifTree function. - -That’s all there is to reading in a NIF file. If all goes well with the reading process (no exception was thrown), you will have at least one NIF object in memory – the root block of the tree. You can pass this same block to the \ref WriteNifTree function to create a new NIF file from the representation in memory. - -WARNING: Some features of the NIF format are still unsupported by Niflib, therefore in some cases the exported NIF may either be different from the original, or completely unusable. DO NOT OVERWRITE THE ORIGINAL NIF FILE. - -\section work_blk Working with NIF Objects - -New class objects don’t have to just come from loaded NIF files. To create an object block yourself, you can do so by using the C++ new keyword like so: - -\code -RefNiNode node = new NiNode; -\endcode - -It is recommended to always use smart pointers, rather than plain pointers, to ensure that your object is not destroyed before you realize it. So do NOT do this: - -\code -NiNode * node = new NiNode; -\endcode - -All NIF objects inherit from \ref NiObject so a good place to start would be understanding the methods of that class. - -You can access the member functions of any class through a Ref smart pointer of the right type by using the -> operator. In Python you will need to use the Ptr() function as an intermediary between a smart reference and the object that it holds, like so: - -\code -//C++ -niNode->GetChildren; - -#Python -niNode.Ptr().GetChildren() -\endcode - -If you have a Ref of one type, such as a generic NiObjectRef, and you want to know if the object it points to also inherits from the NiNode class, you use the \ref DynamicCast template function. To cast from a NiObjectRef to a NiNodeRef, you would do the following: - -\code -NiObjectRef root = ReadNifTree( “test.nif” ); -NiNodeRef node = DynamicCast<NiNode>( root ); -if ( node != NULL ) { - ... -\endcode - -Note the template syntax of the \ref DynamicCast function. In Python these tempates are mapped to functions named DynamicCastTo[object type]. For example, DynamicCastToNiNode. To use them you must use the \ref Ref::Ptr() function as they expect pointers rather than references. For example: - -\code -root = ReadNifTree( “test.nif” ); -node = DynamicCastToNiNode( root.Ptr() ); -if root != NULL: - ... -\endcode - -Notice also that you must always check the value returned by \ref DynamicCast. If the cast is not successful, i.e. the object is not a derived type of the one you’re trying to cast it to, the function will return NULL. - -Casting down the inheritance tree should be automatic in C++, but you can also explicitly call the \ref StaticCast function. You will need to use this function in Python to cast a Ref to the type expected by some member functions which take Ref arguments. - -One useful function of all NIF objects is the \ref NiObject::asString function. You can use it to get an English summary of the contents of that object. You can also call the \ref NiObject::GetIDString function to get a short read out that includes the memory address, type, and name, if any, of the object. - -You will probably also want to know the type of a block at some point. You can retrieve this with the \ref NiObject::GetType function. This returns a reference to the Type value that uniquly identifies this class. You can get its name by calling the \ref Type::GetTypeName function. - -<center>\ref intro_page "<< Previous Section"</center> - -*/ - -} -#endif diff --git a/NifExport/niflib/niflib.sln b/NifExport/niflib/niflib.sln deleted file mode 100755 index 9c92c6f..0000000 --- a/NifExport/niflib/niflib.sln +++ /dev/null @@ -1,22 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NIFlib", "niflib.vcproj", "{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release - DLL|Win32 = Release - DLL|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug|Win32.ActiveCfg = Debug|Win32 - {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug|Win32.Build.0 = Debug|Win32 - {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - DLL|Win32.ActiveCfg = Release - DLL|Win32 - {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - DLL|Win32.Build.0 = Release - DLL|Win32 - {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release|Win32.ActiveCfg = Release|Win32 - {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/NifExport/niflib/niflib.vcproj b/NifExport/niflib/niflib.vcproj deleted file mode 100755 index 990656f..0000000 --- a/NifExport/niflib/niflib.vcproj +++ /dev/null @@ -1,1881 +0,0 @@ -<?xml version="1.0" encoding = "Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="7.00" - Name="NIFlib" - ProjectGUID="{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}" - Keyword="Win32Proj"> - <Platforms> - <Platform - Name="Win32"/> - </Platforms> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="$(ProjectDir)../Debug" - IntermediateDirectory="$(ProjectDir)../Debug" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/Zm1000" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="0" - PrecompiledHeaderThrough="" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile=".\debug\niflibd.lib" - IgnoreAllDefaultLibraries="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory=".\Release" - IntermediateDirectory=".\Release" - ConfigurationType="4" - UseOfMFC="0" - CharacterSet="0" - WholeProgramOptimization="TRUE"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/FI"$(ProjectDir)pch.h" /Zm1000" - Optimization="0" - WholeProgramOptimization="FALSE" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - PrecompiledHeaderThrough="" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile=".\Release\niflib.lib" - IgnoreAllDefaultLibraries="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - <Configuration - Name="PyNiflib|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="0" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - <Configuration - Name="Release - DLL|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - CharacterSet="2" - WholeProgramOptimization="TRUE"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/FI"pch.h"" - Optimization="3" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;BUILDING_NIFLIB_DLL;USE_NIFLIB_DLL" - RuntimeLibrary="2" - UsePrecompiledHeader="2" - PrecompiledHeaderThrough="pch.h" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLinkerTool" - OutputFile="..\bin\niflib.dll"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - <Tool - Name="VCWebDeploymentTool"/> - </Configuration> - <Configuration - Name="Debug - PCH|Win32" - OutputDirectory="$(SolutionDir)$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/FI"$(ProjectDir)pch.h"" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="2" - PrecompiledHeaderThrough="$(ProjectDir)pch.h" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile="$(ProjectDir)../bin/niflibd.lib"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - <Configuration - Name="Debug - Max 6|Win32" - OutputDirectory="Debug - Max 6" - IntermediateDirectory="Debug - Max 6" - ConfigurationType="4" - CharacterSet="2"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/Zm1000" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="TRUE" - BasicRuntimeChecks="3" - RuntimeLibrary="3" - EnableFunctionLevelLinking="TRUE" - UsePrecompiledHeader="0" - PrecompiledHeaderThrough="" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile=".\debug\niflibd.lib" - IgnoreAllDefaultLibraries="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - <Configuration - Name="Release - Max 6|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - UseOfMFC="0" - CharacterSet="0" - WholeProgramOptimization="TRUE"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/FI"$(ProjectDir)pch.h" /Zm1000" - Optimization="0" - WholeProgramOptimization="FALSE" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - PrecompiledHeaderThrough="" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile=".\Release\niflib.lib" - IgnoreAllDefaultLibraries="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - <Configuration - Name="Release - Max 7|Win32" - OutputDirectory="Release" - IntermediateDirectory="Release" - ConfigurationType="4" - UseOfMFC="0" - CharacterSet="0" - WholeProgramOptimization="TRUE"> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/FI"$(ProjectDir)pch.h" /Zm1000" - Optimization="0" - WholeProgramOptimization="FALSE" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="2" - UsePrecompiledHeader="0" - PrecompiledHeaderThrough="" - WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> - <Tool - Name="VCCustomBuildTool"/> - <Tool - Name="VCLibrarianTool" - OutputFile=".\Release\niflib.lib" - IgnoreAllDefaultLibraries="TRUE"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> - <Tool - Name="VCPreBuildEventTool"/> - <Tool - Name="VCPreLinkEventTool"/> - <Tool - Name="VCResourceCompilerTool"/> - <Tool - Name="VCWebServiceProxyGeneratorTool"/> - </Configuration> - </Configurations> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\NIF_IO.cpp"> - </File> - <File - RelativePath=".\Type.cpp"> - </File> - <File - RelativePath=".\nif_math.cpp"> - </File> - <File - RelativePath=".\niflib.cpp"> - </File> - <File - RelativePath=".\pch.cpp"> - <FileConfiguration - Name="Debug|Win32" - ExcludedFromBuild="TRUE"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release - DLL|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug - PCH|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Debug - Max 6|Win32" - ExcludedFromBuild="TRUE"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="0"/> - </FileConfiguration> - <FileConfiguration - Name="Release - Max 6|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release - Max 7|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - </File> - <Filter - Name="obj"> - <File - RelativePath=".\obj\ABoneLODController.cpp"> - </File> - <File - RelativePath=".\obj\AKeyedData.cpp"> - </File> - <File - RelativePath=".\obj\APSysCtlr.cpp"> - </File> - <File - RelativePath=".\obj\APSysData.cpp"> - </File> - <File - RelativePath=".\obj\AParticleModifier.cpp"> - </File> - <File - RelativePath=".\obj\AbhkConstraint.cpp"> - </File> - <File - RelativePath=".\obj\AbhkRagdollConstraint.cpp"> - </File> - <File - RelativePath=".\obj\AbhkShapeCollection.cpp"> - </File> - <File - RelativePath=".\obj\AvoidNode.cpp"> - </File> - <File - RelativePath=".\obj\BSBound.cpp"> - </File> - <File - RelativePath=".\obj\BSFurnitureMarker.cpp"> - </File> - <File - RelativePath=".\obj\BSKeyframeController.cpp"> - </File> - <File - RelativePath=".\obj\BSPSysArrayEmitter.cpp"> - </File> - <File - RelativePath=".\obj\BSParentVelocityModifier.cpp"> - </File> - <File - RelativePath=".\obj\BSXFlags.cpp"> - </File> - <File - RelativePath=".\obj\FxButton.cpp"> - </File> - <File - RelativePath=".\obj\FxRadioButton.cpp"> - </File> - <File - RelativePath=".\obj\FxWidget.cpp"> - </File> - <File - RelativePath=".\obj\NiAVObject.cpp"> - </File> - <File - RelativePath=".\obj\NiAlphaController.cpp"> - </File> - <File - RelativePath=".\obj\NiAlphaProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiAmbientLight.cpp"> - </File> - <File - RelativePath=".\obj\NiAutoNormalParticles.cpp"> - </File> - <File - RelativePath=".\obj\NiAutoNormalParticlesData.cpp"> - </File> - <File - RelativePath=".\obj\NiBSAnimationNode.cpp"> - </File> - <File - RelativePath=".\obj\NiBSBoneLODController.cpp"> - </File> - <File - RelativePath=".\obj\NiBSPArrayController.cpp"> - </File> - <File - RelativePath=".\obj\NiBSParticleNode.cpp"> - </File> - <File - RelativePath=".\obj\NiBSplineBasisData.cpp"> - </File> - <File - RelativePath=".\obj\NiBSplineCompFloatInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBSplineCompPoint3Interpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBSplineCompTransformInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBSplineData.cpp"> - </File> - <File - RelativePath=".\obj\NiBSplineInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBillboardNode.cpp"> - </File> - <File - RelativePath=".\obj\NiBinaryExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiBlendBoolInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBlendFloatInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBlendInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBlendPoint3Interpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBlendTransformInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBoneLODController.cpp"> - </File> - <File - RelativePath=".\obj\NiBoolData.cpp"> - </File> - <File - RelativePath=".\obj\NiBoolInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBoolTimelineInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiBooleanExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiCamera.cpp"> - </File> - <File - RelativePath=".\obj\NiCollisionData.cpp"> - </File> - <File - RelativePath=".\obj\NiCollisionObject.cpp"> - </File> - <File - RelativePath=".\obj\NiColorData.cpp"> - </File> - <File - RelativePath=".\obj\NiColorExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiControllerManager.cpp"> - </File> - <File - RelativePath=".\obj\NiControllerSequence.cpp"> - </File> - <File - RelativePath=".\obj\NiDefaultAVObjectPalette.cpp"> - </File> - <File - RelativePath=".\obj\NiDirectionalLight.cpp"> - </File> - <File - RelativePath=".\obj\NiDitherProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiDynamicEffect.cpp"> - </File> - <File - RelativePath=".\obj\NiExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiFlipController.cpp"> - </File> - <File - RelativePath=".\obj\NiFloatData.cpp"> - </File> - <File - RelativePath=".\obj\NiFloatExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiFloatExtraDataController.cpp"> - </File> - <File - RelativePath=".\obj\NiFloatInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiFloatsExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiFogProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiGeomMorpherController.cpp"> - </File> - <File - RelativePath=".\obj\NiGravity.cpp"> - </File> - <File - RelativePath=".\obj\NiIntegerExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiIntegersExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiKeyframeController.cpp"> - </File> - <File - RelativePath=".\obj\NiKeyframeData.cpp"> - </File> - <File - RelativePath=".\obj\NiLODNode.cpp"> - </File> - <File - RelativePath=".\obj\NiLight.cpp"> - </File> - <File - RelativePath=".\obj\NiLightColorController.cpp"> - </File> - <File - RelativePath=".\obj\NiLightDimmerController.cpp"> - </File> - <File - RelativePath=".\obj\NiLookAtController.cpp"> - </File> - <File - RelativePath=".\obj\NiLookAtInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiMaterialColorController.cpp"> - </File> - <File - RelativePath=".\obj\NiMaterialProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiMeshPSysData.cpp"> - </File> - <File - RelativePath=".\obj\NiMeshParticleSystem.cpp"> - </File> - <File - RelativePath=".\obj\NiMorphData.cpp"> - </File> - <File - RelativePath=".\obj\NiMultiTargetTransformController.cpp"> - </File> - <File - RelativePath=".\obj\NiNode.cpp"> - </File> - <File - RelativePath=".\obj\NiObject.cpp"> - </File> - <File - RelativePath=".\obj\NiObjectNET.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysAgeDeathModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysBombModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysBoundUpdateModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysBoxEmitter.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysColliderManager.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysColorModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysCylinderEmitter.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysData.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysDragModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitter.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterCtlrData.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterDeclinationCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterDeclinationVarCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterInitialRadiusCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterLifeSpanCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterSpeedCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysGravityModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysGravityStrengthCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysGrowFadeModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysMeshEmitter.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysMeshUpdateModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysModifierActiveCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysPlanarCollider.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysPositionModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysResetOnLoopCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysRotationModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysSpawnModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysSphereEmitter.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysUpdateCtlr.cpp"> - </File> - <File - RelativePath=".\obj\NiPSysVolumeEmitter.cpp"> - </File> - <File - RelativePath=".\obj\NiPalette.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleBomb.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleColorModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleGrowFade.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleMeshModifier.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleMeshes.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleMeshesData.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleRotation.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleSystem.cpp"> - </File> - <File - RelativePath=".\obj\NiParticleSystemController.cpp"> - </File> - <File - RelativePath=".\obj\NiParticles.cpp"> - </File> - <File - RelativePath=".\obj\NiParticlesData.cpp"> - </File> - <File - RelativePath=".\obj\NiPathController.cpp"> - </File> - <File - RelativePath=".\obj\NiPathInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiPixelData.cpp"> - </File> - <File - RelativePath=".\obj\NiPlanarCollider.cpp"> - </File> - <File - RelativePath=".\obj\NiPoint3Interpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiPointLight.cpp"> - </File> - <File - RelativePath=".\obj\NiPosData.cpp"> - </File> - <File - RelativePath=".\obj\NiProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiRangeLODData.cpp"> - </File> - <File - RelativePath=".\obj\NiRotatingParticles.cpp"> - </File> - <File - RelativePath=".\obj\NiRotatingParticlesData.cpp"> - </File> - <File - RelativePath=".\obj\NiScreenLODData.cpp"> - </File> - <File - RelativePath=".\obj\NiSequenceStreamHelper.cpp"> - </File> - <File - RelativePath=".\obj\NiShadeProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiSingleInterpolatorController.cpp"> - </File> - <File - RelativePath=".\obj\NiSkinData.cpp"> - </File> - <File - RelativePath=".\obj\NiSkinInstance.cpp"> - </File> - <File - RelativePath=".\obj\NiSkinPartition.cpp"> - </File> - <File - RelativePath=".\obj\NiSourceTexture.cpp"> - </File> - <File - RelativePath=".\obj\NiSpecularProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiSphericalCollider.cpp"> - </File> - <File - RelativePath=".\obj\NiSpotLight.cpp"> - </File> - <File - RelativePath=".\obj\NiStencilProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiStringExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiStringPalette.cpp"> - </File> - <File - RelativePath=".\obj\NiStringsExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiTextKeyExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiTextureEffect.cpp"> - </File> - <File - RelativePath=".\obj\NiTextureTransformController.cpp"> - </File> - <File - RelativePath=".\obj\NiTexturingProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiTimeController.cpp"> - </File> - <File - RelativePath=".\obj\NiTransformController.cpp"> - </File> - <File - RelativePath=".\obj\NiTransformData.cpp"> - </File> - <File - RelativePath=".\obj\NiTransformInterpolator.cpp"> - </File> - <File - RelativePath=".\obj\NiTriBasedGeom.cpp"> - </File> - <File - RelativePath=".\obj\NiTriBasedGeomData.cpp"> - </File> - <File - RelativePath=".\obj\NiTriShape.cpp"> - </File> - <File - RelativePath=".\obj\NiTriShapeData.cpp"> - </File> - <File - RelativePath=".\obj\NiTriStrips.cpp"> - </File> - <File - RelativePath=".\obj\NiTriStripsData.cpp"> - </File> - <File - RelativePath=".\obj\NiUVController.cpp"> - </File> - <File - RelativePath=".\obj\NiUVData.cpp"> - </File> - <File - RelativePath=".\obj\NiVectorExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiVertWeightsExtraData.cpp"> - </File> - <File - RelativePath=".\obj\NiVertexColorProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiVisController.cpp"> - </File> - <File - RelativePath=".\obj\NiVisData.cpp"> - </File> - <File - RelativePath=".\obj\NiWireframeProperty.cpp"> - </File> - <File - RelativePath=".\obj\NiZBufferProperty.cpp"> - </File> - <File - RelativePath=".\obj\RootCollisionNode.cpp"> - </File> - <File - RelativePath=".\obj\bhkBlendCollisionObject.cpp"> - </File> - <File - RelativePath=".\obj\bhkBlendController.cpp"> - </File> - <File - RelativePath=".\obj\bhkBoxShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkCapsuleShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkCollisionObject.cpp"> - </File> - <File - RelativePath=".\obj\bhkConvexShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkConvexTransformShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkConvexVerticesShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkEntity.cpp"> - </File> - <File - RelativePath=".\obj\bhkHingeConstraint.cpp"> - </File> - <File - RelativePath=".\obj\bhkLimitedHingeConstraint.cpp"> - </File> - <File - RelativePath=".\obj\bhkListShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkMalleableConstraint.cpp"> - </File> - <File - RelativePath=".\obj\bhkMoppBvTreeShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkMultiSphereShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkNiTriStripsShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkPackedNiTriStripsShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkPrismaticConstraint.cpp"> - </File> - <File - RelativePath=".\obj\bhkRagdollConstraint.cpp"> - </File> - <File - RelativePath=".\obj\bhkRefObject.cpp"> - </File> - <File - RelativePath=".\obj\bhkRigidBody.cpp"> - </File> - <File - RelativePath=".\obj\bhkRigidBodyT.cpp"> - </File> - <File - RelativePath=".\obj\bhkSPCollisionObject.cpp"> - </File> - <File - RelativePath=".\obj\bhkSerializable.cpp"> - </File> - <File - RelativePath=".\obj\bhkShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkSimpleShapePhantom.cpp"> - </File> - <File - RelativePath=".\obj\bhkSphereRepShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkSphereShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkStiffSpringConstraint.cpp"> - </File> - <File - RelativePath=".\obj\bhkTransformShape.cpp"> - </File> - <File - RelativePath=".\obj\bhkWorldObject.cpp"> - </File> - <File - RelativePath=".\obj\hkPackedNiTriStripsData.cpp"> - </File> - </Filter> - <Filter - Name="gen"> - <File - RelativePath=".\gen\AVObject.cpp"> - </File> - <File - RelativePath=".\gen\BoundingBox.cpp"> - </File> - <File - RelativePath=".\gen\ByteArray.cpp"> - </File> - <File - RelativePath=".\gen\ControllerLink.cpp"> - </File> - <File - RelativePath=".\gen\Footer.cpp"> - </File> - <File - RelativePath=".\gen\FurniturePosition.cpp"> - </File> - <File - RelativePath=".\gen\Header.cpp"> - </File> - <File - RelativePath=".\gen\LODRange.cpp"> - </File> - <File - RelativePath=".\gen\LimitedHingeDescriptor.cpp"> - </File> - <File - RelativePath=".\gen\MatchGroup.cpp"> - </File> - <File - RelativePath=".\gen\MipMap.cpp"> - </File> - <File - RelativePath=".\gen\Morph.cpp"> - </File> - <File - RelativePath=".\gen\NodeGroup.cpp"> - </File> - <File - RelativePath=".\gen\Particle.cpp"> - </File> - <File - RelativePath=".\gen\QuaternionXYZW.cpp"> - </File> - <File - RelativePath=".\gen\RagDollDescriptor.cpp"> - </File> - <File - RelativePath=".\gen\ShaderTexDesc.cpp"> - </File> - <File - RelativePath=".\gen\SkinData.cpp"> - </File> - <File - RelativePath=".\gen\SkinPartition.cpp"> - </File> - <File - RelativePath=".\gen\SkinShape.cpp"> - </File> - <File - RelativePath=".\gen\SkinShapeGroup.cpp"> - </File> - <File - RelativePath=".\gen\SkinWeight.cpp"> - </File> - <File - RelativePath=".\gen\StringPalette.cpp"> - </File> - <File - RelativePath=".\gen\TBC.cpp"> - </File> - <File - RelativePath=".\gen\TexDesc.cpp"> - </File> - <File - RelativePath=".\gen\TexSource.cpp"> - </File> - <File - RelativePath=".\gen\hkTriangle.cpp"> - </File> - <File - RelativePath=".\gen\obj_factories.cpp"> - </File> - <File - RelativePath=".\gen\obj_impl.cpp"> - </File> - </Filter> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> - <File - RelativePath=".\NIF_IO.h"> - </File> - <File - RelativePath=".\Ref.h"> - </File> - <File - RelativePath=".\Type.h"> - </File> - <File - RelativePath=".\dll_export.h"> - </File> - <File - RelativePath=".\nif_math.h"> - </File> - <File - RelativePath=".\niflib.h"> - </File> - <File - RelativePath=".\pch.h"> - </File> - <Filter - Name="obj"> - <File - RelativePath=".\obj\ABoneLODController.h"> - </File> - <File - RelativePath=".\obj\AKeyedData.h"> - </File> - <File - RelativePath=".\obj\APSysCtlr.h"> - </File> - <File - RelativePath=".\obj\APSysData.h"> - </File> - <File - RelativePath=".\obj\AParticleModifier.h"> - </File> - <File - RelativePath=".\obj\AbhkConstraint.h"> - </File> - <File - RelativePath=".\obj\AbhkRagdollConstraint.h"> - </File> - <File - RelativePath=".\obj\AbhkShapeCollection.h"> - </File> - <File - RelativePath=".\obj\AvoidNode.h"> - </File> - <File - RelativePath=".\obj\BSBound.h"> - </File> - <File - RelativePath=".\obj\BSFurnitureMarker.h"> - </File> - <File - RelativePath=".\obj\BSKeyframeController.h"> - </File> - <File - RelativePath=".\obj\BSPSysArrayEmitter.h"> - </File> - <File - RelativePath=".\obj\BSParentVelocityModifier.h"> - </File> - <File - RelativePath=".\obj\BSXFlags.h"> - </File> - <File - RelativePath=".\obj\FxButton.h"> - </File> - <File - RelativePath=".\obj\FxRadioButton.h"> - </File> - <File - RelativePath=".\obj\FxWidget.h"> - </File> - <File - RelativePath=".\obj\NiAVObject.h"> - </File> - <File - RelativePath=".\obj\NiAlphaController.h"> - </File> - <File - RelativePath=".\obj\NiAlphaProperty.h"> - </File> - <File - RelativePath=".\obj\NiAmbientLight.h"> - </File> - <File - RelativePath=".\obj\NiAutoNormalParticles.h"> - </File> - <File - RelativePath=".\obj\NiAutoNormalParticlesData.h"> - </File> - <File - RelativePath=".\obj\NiBSAnimationNode.h"> - </File> - <File - RelativePath=".\obj\NiBSBoneLODController.h"> - </File> - <File - RelativePath=".\obj\NiBSPArrayController.h"> - </File> - <File - RelativePath=".\obj\NiBSParticleNode.h"> - </File> - <File - RelativePath=".\obj\NiBSplineBasisData.h"> - </File> - <File - RelativePath=".\obj\NiBSplineCompFloatInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBSplineCompPoint3Interpolator.h"> - </File> - <File - RelativePath=".\obj\NiBSplineCompTransformInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBSplineData.h"> - </File> - <File - RelativePath=".\obj\NiBSplineInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBillboardNode.h"> - </File> - <File - RelativePath=".\obj\NiBinaryExtraData.h"> - </File> - <File - RelativePath=".\obj\NiBlendBoolInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBlendFloatInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBlendInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBlendPoint3Interpolator.h"> - </File> - <File - RelativePath=".\obj\NiBlendTransformInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBoneLODController.h"> - </File> - <File - RelativePath=".\obj\NiBoolData.h"> - </File> - <File - RelativePath=".\obj\NiBoolInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBoolTimelineInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiBooleanExtraData.h"> - </File> - <File - RelativePath=".\obj\NiCamera.h"> - </File> - <File - RelativePath=".\obj\NiCollisionData.h"> - </File> - <File - RelativePath=".\obj\NiCollisionObject.h"> - </File> - <File - RelativePath=".\obj\NiColorData.h"> - </File> - <File - RelativePath=".\obj\NiColorExtraData.h"> - </File> - <File - RelativePath=".\obj\NiControllerManager.h"> - </File> - <File - RelativePath=".\obj\NiControllerSequence.h"> - </File> - <File - RelativePath=".\obj\NiDefaultAVObjectPalette.h"> - </File> - <File - RelativePath=".\obj\NiDirectionalLight.h"> - </File> - <File - RelativePath=".\obj\NiDitherProperty.h"> - </File> - <File - RelativePath=".\obj\NiDynamicEffect.h"> - </File> - <File - RelativePath=".\obj\NiExtraData.h"> - </File> - <File - RelativePath=".\obj\NiFlipController.h"> - </File> - <File - RelativePath=".\obj\NiFloatData.h"> - </File> - <File - RelativePath=".\obj\NiFloatExtraData.h"> - </File> - <File - RelativePath=".\obj\NiFloatExtraDataController.h"> - </File> - <File - RelativePath=".\obj\NiFloatInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiFloatsExtraData.h"> - </File> - <File - RelativePath=".\obj\NiFogProperty.h"> - </File> - <File - RelativePath=".\obj\NiGeomMorpherController.h"> - </File> - <File - RelativePath=".\obj\NiGravity.h"> - </File> - <File - RelativePath=".\obj\NiIntegerExtraData.h"> - </File> - <File - RelativePath=".\obj\NiIntegersExtraData.h"> - </File> - <File - RelativePath=".\obj\NiInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiKeyframeController.h"> - </File> - <File - RelativePath=".\obj\NiKeyframeData.h"> - </File> - <File - RelativePath=".\obj\NiLODNode.h"> - </File> - <File - RelativePath=".\obj\NiLight.h"> - </File> - <File - RelativePath=".\obj\NiLightColorController.h"> - </File> - <File - RelativePath=".\obj\NiLightDimmerController.h"> - </File> - <File - RelativePath=".\obj\NiLookAtController.h"> - </File> - <File - RelativePath=".\obj\NiLookAtInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiMaterialColorController.h"> - </File> - <File - RelativePath=".\obj\NiMaterialProperty.h"> - </File> - <File - RelativePath=".\obj\NiMeshPSysData.h"> - </File> - <File - RelativePath=".\obj\NiMeshParticleSystem.h"> - </File> - <File - RelativePath=".\obj\NiMorphData.h"> - </File> - <File - RelativePath=".\obj\NiMultiTargetTransformController.h"> - </File> - <File - RelativePath=".\obj\NiNode.h"> - </File> - <File - RelativePath=".\obj\NiObject.h"> - </File> - <File - RelativePath=".\obj\NiObjectNET.h"> - </File> - <File - RelativePath=".\obj\NiPSysAgeDeathModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysBombModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysBoundUpdateModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysBoxEmitter.h"> - </File> - <File - RelativePath=".\obj\NiPSysColliderManager.h"> - </File> - <File - RelativePath=".\obj\NiPSysColorModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysCylinderEmitter.h"> - </File> - <File - RelativePath=".\obj\NiPSysData.h"> - </File> - <File - RelativePath=".\obj\NiPSysDragModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitter.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterCtlrData.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterDeclinationCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterDeclinationVarCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterInitialRadiusCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterLifeSpanCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysEmitterSpeedCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysGravityModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysGravityStrengthCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysGrowFadeModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysMeshEmitter.h"> - </File> - <File - RelativePath=".\obj\NiPSysMeshUpdateModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysModifierActiveCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysPlanarCollider.h"> - </File> - <File - RelativePath=".\obj\NiPSysPositionModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysResetOnLoopCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysRotationModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysSpawnModifier.h"> - </File> - <File - RelativePath=".\obj\NiPSysSphereEmitter.h"> - </File> - <File - RelativePath=".\obj\NiPSysUpdateCtlr.h"> - </File> - <File - RelativePath=".\obj\NiPSysVolumeEmitter.h"> - </File> - <File - RelativePath=".\obj\NiPalette.h"> - </File> - <File - RelativePath=".\obj\NiParticleBomb.h"> - </File> - <File - RelativePath=".\obj\NiParticleColorModifier.h"> - </File> - <File - RelativePath=".\obj\NiParticleGrowFade.h"> - </File> - <File - RelativePath=".\obj\NiParticleMeshModifier.h"> - </File> - <File - RelativePath=".\obj\NiParticleMeshes.h"> - </File> - <File - RelativePath=".\obj\NiParticleMeshesData.h"> - </File> - <File - RelativePath=".\obj\NiParticleRotation.h"> - </File> - <File - RelativePath=".\obj\NiParticleSystem.h"> - </File> - <File - RelativePath=".\obj\NiParticleSystemController.h"> - </File> - <File - RelativePath=".\obj\NiParticles.h"> - </File> - <File - RelativePath=".\obj\NiParticlesData.h"> - </File> - <File - RelativePath=".\obj\NiPathController.h"> - </File> - <File - RelativePath=".\obj\NiPathInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiPixelData.h"> - </File> - <File - RelativePath=".\obj\NiPlanarCollider.h"> - </File> - <File - RelativePath=".\obj\NiPoint3Interpolator.h"> - </File> - <File - RelativePath=".\obj\NiPointLight.h"> - </File> - <File - RelativePath=".\obj\NiPosData.h"> - </File> - <File - RelativePath=".\obj\NiProperty.h"> - </File> - <File - RelativePath=".\obj\NiRangeLODData.h"> - </File> - <File - RelativePath=".\obj\NiRotatingParticles.h"> - </File> - <File - RelativePath=".\obj\NiRotatingParticlesData.h"> - </File> - <File - RelativePath=".\obj\NiScreenLODData.h"> - </File> - <File - RelativePath=".\obj\NiSequenceStreamHelper.h"> - </File> - <File - RelativePath=".\obj\NiShadeProperty.h"> - </File> - <File - RelativePath=".\obj\NiSingleInterpolatorController.h"> - </File> - <File - RelativePath=".\obj\NiSkinData.h"> - </File> - <File - RelativePath=".\obj\NiSkinInstance.h"> - </File> - <File - RelativePath=".\obj\NiSkinPartition.h"> - </File> - <File - RelativePath=".\obj\NiSourceTexture.h"> - </File> - <File - RelativePath=".\obj\NiSpecularProperty.h"> - </File> - <File - RelativePath=".\obj\NiSphericalCollider.h"> - </File> - <File - RelativePath=".\obj\NiSpotLight.h"> - </File> - <File - RelativePath=".\obj\NiStencilProperty.h"> - </File> - <File - RelativePath=".\obj\NiStringExtraData.h"> - </File> - <File - RelativePath=".\obj\NiStringPalette.h"> - </File> - <File - RelativePath=".\obj\NiStringsExtraData.h"> - </File> - <File - RelativePath=".\obj\NiTextKeyExtraData.h"> - </File> - <File - RelativePath=".\obj\NiTextureEffect.h"> - </File> - <File - RelativePath=".\obj\NiTextureTransformController.h"> - </File> - <File - RelativePath=".\obj\NiTexturingProperty.h"> - </File> - <File - RelativePath=".\obj\NiTimeController.h"> - </File> - <File - RelativePath=".\obj\NiTransformController.h"> - </File> - <File - RelativePath=".\obj\NiTransformData.h"> - </File> - <File - RelativePath=".\obj\NiTransformInterpolator.h"> - </File> - <File - RelativePath=".\obj\NiTriBasedGeom.h"> - </File> - <File - RelativePath=".\obj\NiTriBasedGeomData.h"> - </File> - <File - RelativePath=".\obj\NiTriShape.h"> - </File> - <File - RelativePath=".\obj\NiTriShapeData.h"> - </File> - <File - RelativePath=".\obj\NiTriStrips.h"> - </File> - <File - RelativePath=".\obj\NiTriStripsData.h"> - </File> - <File - RelativePath=".\obj\NiUVController.h"> - </File> - <File - RelativePath=".\obj\NiUVData.h"> - </File> - <File - RelativePath=".\obj\NiVectorExtraData.h"> - </File> - <File - RelativePath=".\obj\NiVertWeightsExtraData.h"> - </File> - <File - RelativePath=".\obj\NiVertexColorProperty.h"> - </File> - <File - RelativePath=".\obj\NiVisController.h"> - </File> - <File - RelativePath=".\obj\NiVisData.h"> - </File> - <File - RelativePath=".\obj\NiWireframeProperty.h"> - </File> - <File - RelativePath=".\obj\NiZBufferProperty.h"> - </File> - <File - RelativePath=".\obj\RootCollisionNode.h"> - </File> - <File - RelativePath=".\obj\bhkBlendCollisionObject.h"> - </File> - <File - RelativePath=".\obj\bhkBlendController.h"> - </File> - <File - RelativePath=".\obj\bhkBoxShape.h"> - </File> - <File - RelativePath=".\obj\bhkCapsuleShape.h"> - </File> - <File - RelativePath=".\obj\bhkCollisionObject.h"> - </File> - <File - RelativePath=".\obj\bhkConvexShape.h"> - </File> - <File - RelativePath=".\obj\bhkConvexTransformShape.h"> - </File> - <File - RelativePath=".\obj\bhkConvexVerticesShape.h"> - </File> - <File - RelativePath=".\obj\bhkEntity.h"> - </File> - <File - RelativePath=".\obj\bhkHingeConstraint.h"> - </File> - <File - RelativePath=".\obj\bhkLimitedHingeConstraint.h"> - </File> - <File - RelativePath=".\obj\bhkListShape.h"> - </File> - <File - RelativePath=".\obj\bhkMalleableConstraint.h"> - </File> - <File - RelativePath=".\obj\bhkMoppBvTreeShape.h"> - </File> - <File - RelativePath=".\obj\bhkMultiSphereShape.h"> - </File> - <File - RelativePath=".\obj\bhkNiTriStripsShape.h"> - </File> - <File - RelativePath=".\obj\bhkPackedNiTriStripsShape.h"> - </File> - <File - RelativePath=".\obj\bhkPrismaticConstraint.h"> - </File> - <File - RelativePath=".\obj\bhkRagdollConstraint.h"> - </File> - <File - RelativePath=".\obj\bhkRefObject.h"> - </File> - <File - RelativePath=".\obj\bhkRigidBody.h"> - </File> - <File - RelativePath=".\obj\bhkRigidBodyT.h"> - </File> - <File - RelativePath=".\obj\bhkSPCollisionObject.h"> - </File> - <File - RelativePath=".\obj\bhkSerializable.h"> - </File> - <File - RelativePath=".\obj\bhkShape.h"> - </File> - <File - RelativePath=".\obj\bhkSimpleShapePhantom.h"> - </File> - <File - RelativePath=".\obj\bhkSphereRepShape.h"> - </File> - <File - RelativePath=".\obj\bhkSphereShape.h"> - </File> - <File - RelativePath=".\obj\bhkStiffSpringConstraint.h"> - </File> - <File - RelativePath=".\obj\bhkTransformShape.h"> - </File> - <File - RelativePath=".\obj\bhkWorldObject.h"> - </File> - <File - RelativePath=".\obj\hkPackedNiTriStripsData.h"> - </File> - </Filter> - <Filter - Name="gen"> - <File - RelativePath=".\gen\AVObject.h"> - </File> - <File - RelativePath=".\gen\BoundingBox.h"> - </File> - <File - RelativePath=".\gen\ByteArray.h"> - </File> - <File - RelativePath=".\gen\ControllerLink.h"> - </File> - <File - RelativePath=".\gen\Footer.h"> - </File> - <File - RelativePath=".\gen\FurniturePosition.h"> - </File> - <File - RelativePath=".\gen\Header.h"> - </File> - <File - RelativePath=".\gen\KeyGroup.h"> - </File> - <File - RelativePath=".\gen\LODRange.h"> - </File> - <File - RelativePath=".\gen\LimitedHingeDescriptor.h"> - </File> - <File - RelativePath=".\gen\MatchGroup.h"> - </File> - <File - RelativePath=".\gen\MipMap.h"> - </File> - <File - RelativePath=".\gen\Morph.h"> - </File> - <File - RelativePath=".\gen\NodeGroup.h"> - </File> - <File - RelativePath=".\gen\Particle.h"> - </File> - <File - RelativePath=".\gen\QuaternionXYZW.h"> - </File> - <File - RelativePath=".\gen\RagDollDescriptor.h"> - </File> - <File - RelativePath=".\gen\RotationKeyArray.h"> - </File> - <File - RelativePath=".\gen\ShaderTexDesc.h"> - </File> - <File - RelativePath=".\gen\SkinData.h"> - </File> - <File - RelativePath=".\gen\SkinPartition.h"> - </File> - <File - RelativePath=".\gen\SkinShape.h"> - </File> - <File - RelativePath=".\gen\SkinShapeGroup.h"> - </File> - <File - RelativePath=".\gen\SkinWeight.h"> - </File> - <File - RelativePath=".\gen\StringPalette.h"> - </File> - <File - RelativePath=".\gen\TBC.h"> - </File> - <File - RelativePath=".\gen\TexDesc.h"> - </File> - <File - RelativePath=".\gen\TexSource.h"> - </File> - <File - RelativePath=".\gen\hkTriangle.h"> - </File> - <File - RelativePath=".\gen\obj_defines.h"> - </File> - </Filter> - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/NifExport/niflib/obj/ABoneLODController.cpp b/NifExport/niflib/obj/ABoneLODController.cpp deleted file mode 100755 index a2d55ae..0000000 --- a/NifExport/niflib/obj/ABoneLODController.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "ABoneLODController.h" -#include "../gen/NodeGroup.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type ABoneLODController::TYPE("ABoneLODController", &A_BONE_L_O_D_CONTROLLER_PARENT::TypeConst() ); - -ABoneLODController::ABoneLODController() A_BONE_L_O_D_CONTROLLER_CONSTRUCT {} - -ABoneLODController::~ABoneLODController() {} - -void ABoneLODController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_BONE_L_O_D_CONTROLLER_READ -} - -void ABoneLODController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - A_BONE_L_O_D_CONTROLLER_WRITE -} - -string ABoneLODController::asString( bool verbose ) const { - A_BONE_L_O_D_CONTROLLER_STRING -} - -void ABoneLODController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_BONE_L_O_D_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> ABoneLODController::GetRefs() const { - A_BONE_L_O_D_CONTROLLER_GETREFS -} - -const Type & ABoneLODController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/ABoneLODController.h b/NifExport/niflib/obj/ABoneLODController.h deleted file mode 100755 index 13d41dc..0000000 --- a/NifExport/niflib/obj/ABoneLODController.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _ABONELODCONTROLLER_H_ -#define _ABONELODCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../gen/NodeGroup.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class ABoneLODController; -typedef Ref<ABoneLODController> ABoneLODControllerRef; - -/*! - * ABoneLODController - Level of detail controller for bones? - */ - -class NIFLIB_API ABoneLODController : public A_BONE_L_O_D_CONTROLLER_PARENT { -public: - ABoneLODController(); - ~ABoneLODController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: This is not a priority but needs to be implemented eventually -protected: - A_BONE_L_O_D_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/AKeyedData.cpp b/NifExport/niflib/obj/AKeyedData.cpp deleted file mode 100755 index c85cfbf..0000000 --- a/NifExport/niflib/obj/AKeyedData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AKeyedData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type AKeyedData::TYPE("AKeyedData", &A_KEYED_DATA_PARENT::TypeConst() ); - -AKeyedData::AKeyedData() A_KEYED_DATA_CONSTRUCT {} - -AKeyedData::~AKeyedData() {} - -void AKeyedData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_KEYED_DATA_READ -} - -void AKeyedData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - A_KEYED_DATA_WRITE -} - -string AKeyedData::asString( bool verbose ) const { - A_KEYED_DATA_STRING -} - -void AKeyedData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_KEYED_DATA_FIXLINKS -} - -list<NiObjectRef> AKeyedData::GetRefs() const { - A_KEYED_DATA_GETREFS -} - -const Type & AKeyedData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/AKeyedData.h b/NifExport/niflib/obj/AKeyedData.h deleted file mode 100755 index f5de967..0000000 --- a/NifExport/niflib/obj/AKeyedData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _AKEYEDDATA_H_ -#define _AKEYEDDATA_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class AKeyedData; -typedef Ref<AKeyedData> AKeyedDataRef; - -/*! - * AKeyedData - Single items of data linked to particular key times. - */ - -class NIFLIB_API AKeyedData : public A_KEYED_DATA_PARENT { -public: - AKeyedData(); - ~AKeyedData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - A_KEYED_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/APSysCtlr.cpp b/NifExport/niflib/obj/APSysCtlr.cpp deleted file mode 100755 index a5874b1..0000000 --- a/NifExport/niflib/obj/APSysCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "APSysCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type APSysCtlr::TYPE("APSysCtlr", &A_P_SYS_CTLR_PARENT::TypeConst() ); - -APSysCtlr::APSysCtlr() A_P_SYS_CTLR_CONSTRUCT {} - -APSysCtlr::~APSysCtlr() {} - -void APSysCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_P_SYS_CTLR_READ -} - -void APSysCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - A_P_SYS_CTLR_WRITE -} - -string APSysCtlr::asString( bool verbose ) const { - A_P_SYS_CTLR_STRING -} - -void APSysCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_P_SYS_CTLR_FIXLINKS -} - -list<NiObjectRef> APSysCtlr::GetRefs() const { - A_P_SYS_CTLR_GETREFS -} - -const Type & APSysCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/APSysCtlr.h b/NifExport/niflib/obj/APSysCtlr.h deleted file mode 100755 index 428114f..0000000 --- a/NifExport/niflib/obj/APSysCtlr.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _APSYSCTLR_H_ -#define _APSYSCTLR_H_ - -#include "NiSingleInterpolatorController.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class APSysCtlr; -typedef Ref<APSysCtlr> APSysCtlrRef; - -/*! - * APSysCtlr - Unknown. - */ - -class NIFLIB_API APSysCtlr : public A_P_SYS_CTLR_PARENT { -public: - APSysCtlr(); - ~APSysCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - A_P_SYS_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/APSysData.cpp b/NifExport/niflib/obj/APSysData.cpp deleted file mode 100755 index d9f09ff..0000000 --- a/NifExport/niflib/obj/APSysData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "APSysData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type APSysData::TYPE("APSysData", &A_P_SYS_DATA_PARENT::TypeConst() ); - -APSysData::APSysData() A_P_SYS_DATA_CONSTRUCT {} - -APSysData::~APSysData() {} - -void APSysData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_P_SYS_DATA_READ -} - -void APSysData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - A_P_SYS_DATA_WRITE -} - -string APSysData::asString( bool verbose ) const { - A_P_SYS_DATA_STRING -} - -void APSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_P_SYS_DATA_FIXLINKS -} - -list<NiObjectRef> APSysData::GetRefs() const { - A_P_SYS_DATA_GETREFS -} - -const Type & APSysData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/APSysData.h b/NifExport/niflib/obj/APSysData.h deleted file mode 100755 index 5771777..0000000 --- a/NifExport/niflib/obj/APSysData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _APSYSDATA_H_ -#define _APSYSDATA_H_ - -#include "NiTriBasedGeomData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class APSysData; -typedef Ref<APSysData> APSysDataRef; - -/*! - * APSysData - Particle system data. Probably really NiPSysData. - */ - -class NIFLIB_API APSysData : public A_P_SYS_DATA_PARENT { -public: - APSysData(); - ~APSysData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - A_P_SYS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/AParticleModifier.cpp b/NifExport/niflib/obj/AParticleModifier.cpp deleted file mode 100755 index 7fa23b9..0000000 --- a/NifExport/niflib/obj/AParticleModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AParticleModifier.h" -#include "NiParticleSystemController.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type AParticleModifier::TYPE("AParticleModifier", &A_PARTICLE_MODIFIER_PARENT::TypeConst() ); - -AParticleModifier::AParticleModifier() A_PARTICLE_MODIFIER_CONSTRUCT {} - -AParticleModifier::~AParticleModifier() {} - -void AParticleModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_PARTICLE_MODIFIER_READ -} - -void AParticleModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - A_PARTICLE_MODIFIER_WRITE -} - -string AParticleModifier::asString( bool verbose ) const { - A_PARTICLE_MODIFIER_STRING -} - -void AParticleModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - A_PARTICLE_MODIFIER_FIXLINKS -} - -list<NiObjectRef> AParticleModifier::GetRefs() const { - A_PARTICLE_MODIFIER_GETREFS -} - -const Type & AParticleModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/AParticleModifier.h b/NifExport/niflib/obj/AParticleModifier.h deleted file mode 100755 index 4f0e8ec..0000000 --- a/NifExport/niflib/obj/AParticleModifier.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _APARTICLEMODIFIER_H_ -#define _APARTICLEMODIFIER_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiParticleSystemController; - -#include "../gen/obj_defines.h" - -class AParticleModifier; -typedef Ref<AParticleModifier> AParticleModifierRef; - -/*! - * AParticleModifier - A particle system modifier. - */ - -class NIFLIB_API AParticleModifier : public A_PARTICLE_MODIFIER_PARENT { -public: - AParticleModifier(); - ~AParticleModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - A_PARTICLE_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/AbhkConstraint.cpp b/NifExport/niflib/obj/AbhkConstraint.cpp deleted file mode 100755 index 9b0b72b..0000000 --- a/NifExport/niflib/obj/AbhkConstraint.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AbhkConstraint.h" -#include "bhkShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type AbhkConstraint::TYPE("AbhkConstraint", &ABHK_CONSTRAINT_PARENT::TypeConst() ); - -AbhkConstraint::AbhkConstraint() ABHK_CONSTRAINT_CONSTRUCT {} - -AbhkConstraint::~AbhkConstraint() {} - -void AbhkConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABHK_CONSTRAINT_READ -} - -void AbhkConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - ABHK_CONSTRAINT_WRITE -} - -string AbhkConstraint::asString( bool verbose ) const { - ABHK_CONSTRAINT_STRING -} - -void AbhkConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABHK_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> AbhkConstraint::GetRefs() const { - ABHK_CONSTRAINT_GETREFS -} - -const Type & AbhkConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/AbhkConstraint.h b/NifExport/niflib/obj/AbhkConstraint.h deleted file mode 100755 index 88349b6..0000000 --- a/NifExport/niflib/obj/AbhkConstraint.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _ABHKCONSTRAINT_H_ -#define _ABHKCONSTRAINT_H_ - -#include "bhkSerializable.h" -namespace Niflib { - -// Forward define of referenced blocks -class bhkShape; - -#include "../gen/obj_defines.h" - -class AbhkConstraint; -typedef Ref<AbhkConstraint> AbhkConstraintRef; - -/*! - * AbhkConstraint - Describes a physical constraint. - */ - -class NIFLIB_API AbhkConstraint : public ABHK_CONSTRAINT_PARENT { -public: - AbhkConstraint(); - ~AbhkConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - ABHK_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/AbhkRagdollConstraint.cpp b/NifExport/niflib/obj/AbhkRagdollConstraint.cpp deleted file mode 100755 index 3a5578e..0000000 --- a/NifExport/niflib/obj/AbhkRagdollConstraint.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AbhkRagdollConstraint.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type AbhkRagdollConstraint::TYPE("AbhkRagdollConstraint", &ABHK_RAGDOLL_CONSTRAINT_PARENT::TypeConst() ); - -AbhkRagdollConstraint::AbhkRagdollConstraint() ABHK_RAGDOLL_CONSTRAINT_CONSTRUCT {} - -AbhkRagdollConstraint::~AbhkRagdollConstraint() {} - -void AbhkRagdollConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABHK_RAGDOLL_CONSTRAINT_READ -} - -void AbhkRagdollConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - ABHK_RAGDOLL_CONSTRAINT_WRITE -} - -string AbhkRagdollConstraint::asString( bool verbose ) const { - ABHK_RAGDOLL_CONSTRAINT_STRING -} - -void AbhkRagdollConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABHK_RAGDOLL_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> AbhkRagdollConstraint::GetRefs() const { - ABHK_RAGDOLL_CONSTRAINT_GETREFS -} - -const Type & AbhkRagdollConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/AbhkRagdollConstraint.h b/NifExport/niflib/obj/AbhkRagdollConstraint.h deleted file mode 100755 index c81cc70..0000000 --- a/NifExport/niflib/obj/AbhkRagdollConstraint.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _ABHKRAGDOLLCONSTRAINT_H_ -#define _ABHKRAGDOLLCONSTRAINT_H_ - -#include "AbhkConstraint.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class AbhkRagdollConstraint; -typedef Ref<AbhkRagdollConstraint> AbhkRagdollConstraintRef; - -/*! - * AbhkRagdollConstraint - Ragdoll constraint. - */ - -class NIFLIB_API AbhkRagdollConstraint : public ABHK_RAGDOLL_CONSTRAINT_PARENT { -public: - AbhkRagdollConstraint(); - ~AbhkRagdollConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - ABHK_RAGDOLL_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/AbhkShapeCollection.cpp b/NifExport/niflib/obj/AbhkShapeCollection.cpp deleted file mode 100755 index 723ff37..0000000 --- a/NifExport/niflib/obj/AbhkShapeCollection.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AbhkShapeCollection.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type AbhkShapeCollection::TYPE("AbhkShapeCollection", &ABHK_SHAPE_COLLECTION_PARENT::TypeConst() ); - -AbhkShapeCollection::AbhkShapeCollection() ABHK_SHAPE_COLLECTION_CONSTRUCT {} - -AbhkShapeCollection::~AbhkShapeCollection() {} - -void AbhkShapeCollection::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABHK_SHAPE_COLLECTION_READ -} - -void AbhkShapeCollection::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - ABHK_SHAPE_COLLECTION_WRITE -} - -string AbhkShapeCollection::asString( bool verbose ) const { - ABHK_SHAPE_COLLECTION_STRING -} - -void AbhkShapeCollection::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ABHK_SHAPE_COLLECTION_FIXLINKS -} - -list<NiObjectRef> AbhkShapeCollection::GetRefs() const { - ABHK_SHAPE_COLLECTION_GETREFS -} - -const Type & AbhkShapeCollection::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/AbhkShapeCollection.h b/NifExport/niflib/obj/AbhkShapeCollection.h deleted file mode 100755 index b45f0a9..0000000 --- a/NifExport/niflib/obj/AbhkShapeCollection.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _ABHKSHAPECOLLECTION_H_ -#define _ABHKSHAPECOLLECTION_H_ - -#include "bhkShape.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class AbhkShapeCollection; -typedef Ref<AbhkShapeCollection> AbhkShapeCollectionRef; - -/*! - * AbhkShapeCollection - Havok data, not sure where to put in the - * hierarchy. - */ - -class NIFLIB_API AbhkShapeCollection : public ABHK_SHAPE_COLLECTION_PARENT { -public: - AbhkShapeCollection(); - ~AbhkShapeCollection(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - ABHK_SHAPE_COLLECTION_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/AvoidNode.cpp b/NifExport/niflib/obj/AvoidNode.cpp deleted file mode 100755 index 4ba8165..0000000 --- a/NifExport/niflib/obj/AvoidNode.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "AvoidNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type AvoidNode::TYPE("AvoidNode", &AVOID_NODE_PARENT::TypeConst() ); - -AvoidNode::AvoidNode() AVOID_NODE_CONSTRUCT {} - -AvoidNode::~AvoidNode() {} - -void AvoidNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AVOID_NODE_READ -} - -void AvoidNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - AVOID_NODE_WRITE -} - -string AvoidNode::asString( bool verbose ) const { - AVOID_NODE_STRING -} - -void AvoidNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - AVOID_NODE_FIXLINKS -} - -list<NiObjectRef> AvoidNode::GetRefs() const { - AVOID_NODE_GETREFS -} - -const Type & AvoidNode::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/AvoidNode.h b/NifExport/niflib/obj/AvoidNode.h deleted file mode 100755 index 908eb9b..0000000 --- a/NifExport/niflib/obj/AvoidNode.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _AVOIDNODE_H_ -#define _AVOIDNODE_H_ - -#include "NiNode.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class AvoidNode; -typedef Ref<AvoidNode> AvoidNodeRef; - -/*! - * AvoidNode - Morrowind specific? - */ - -class NIFLIB_API AvoidNode : public AVOID_NODE_PARENT { -public: - AvoidNode(); - ~AvoidNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - AVOID_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/BSBound.cpp b/NifExport/niflib/obj/BSBound.cpp deleted file mode 100755 index 4b3e2f8..0000000 --- a/NifExport/niflib/obj/BSBound.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BSBound.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type BSBound::TYPE("BSBound", &B_S_BOUND_PARENT::TypeConst() ); - -BSBound::BSBound() B_S_BOUND_CONSTRUCT {} - -BSBound::~BSBound() {} - -void BSBound::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_BOUND_READ -} - -void BSBound::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - B_S_BOUND_WRITE -} - -string BSBound::asString( bool verbose ) const { - B_S_BOUND_STRING -} - -void BSBound::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_BOUND_FIXLINKS -} - -list<NiObjectRef> BSBound::GetRefs() const { - B_S_BOUND_GETREFS -} - -const Type & BSBound::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/BSBound.h b/NifExport/niflib/obj/BSBound.h deleted file mode 100755 index 8c318e3..0000000 --- a/NifExport/niflib/obj/BSBound.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BSBOUND_H_ -#define _BSBOUND_H_ - -#include "NiExtraData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class BSBound; -typedef Ref<BSBound> BSBoundRef; - -/*! - * BSBound - Unknown. - */ - -class NIFLIB_API BSBound : public B_S_BOUND_PARENT { -public: - BSBound(); - ~BSBound(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - B_S_BOUND_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/BSFurnitureMarker.cpp b/NifExport/niflib/obj/BSFurnitureMarker.cpp deleted file mode 100755 index f0c4fd9..0000000 --- a/NifExport/niflib/obj/BSFurnitureMarker.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BSFurnitureMarker.h" -#include "../gen/FurniturePosition.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type BSFurnitureMarker::TYPE("BSFurnitureMarker", &B_S_FURNITURE_MARKER_PARENT::TypeConst() ); - -BSFurnitureMarker::BSFurnitureMarker() B_S_FURNITURE_MARKER_CONSTRUCT {} - -BSFurnitureMarker::~BSFurnitureMarker() {} - -void BSFurnitureMarker::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_FURNITURE_MARKER_READ -} - -void BSFurnitureMarker::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - B_S_FURNITURE_MARKER_WRITE -} - -string BSFurnitureMarker::asString( bool verbose ) const { - B_S_FURNITURE_MARKER_STRING -} - -void BSFurnitureMarker::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_FURNITURE_MARKER_FIXLINKS -} - -list<NiObjectRef> BSFurnitureMarker::GetRefs() const { - B_S_FURNITURE_MARKER_GETREFS -} - -const Type & BSFurnitureMarker::GetType() const { - return TYPE; -}; - -vector<FurniturePosition> BSFurnitureMarker::GetFurniturePositions() const { - return positions; -} - -void BSFurnitureMarker::SetFurniturePositions( const vector<FurniturePosition> & n ) { - numPositions = uint(n.size()); - positions = n; -} - diff --git a/NifExport/niflib/obj/BSFurnitureMarker.h b/NifExport/niflib/obj/BSFurnitureMarker.h deleted file mode 100755 index 1784abc..0000000 --- a/NifExport/niflib/obj/BSFurnitureMarker.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BSFURNITUREMARKER_H_ -#define _BSFURNITUREMARKER_H_ - -#include "NiExtraData.h" - -// Include structures -#include "../gen/FurniturePosition.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class BSFurnitureMarker; -typedef Ref<BSFurnitureMarker> BSFurnitureMarkerRef; - -/*! - * BSFurnitureMarker - Unknown. Marks furniture sitting positions? - */ - -class NIFLIB_API BSFurnitureMarker : public B_S_FURNITURE_MARKER_PARENT { -public: - BSFurnitureMarker(); - ~BSFurnitureMarker(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - vector<FurniturePosition> GetFurniturePositions() const; - void SetFurniturePositions( const vector<FurniturePosition> & n ); - -protected: - B_S_FURNITURE_MARKER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/BSKeyframeController.cpp b/NifExport/niflib/obj/BSKeyframeController.cpp deleted file mode 100755 index 0a88a4d..0000000 --- a/NifExport/niflib/obj/BSKeyframeController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BSKeyframeController.h" -#include "NiKeyframeData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type BSKeyframeController::TYPE("BSKeyframeController", &B_S_KEYFRAME_CONTROLLER_PARENT::TypeConst() ); - -BSKeyframeController::BSKeyframeController() B_S_KEYFRAME_CONTROLLER_CONSTRUCT {} - -BSKeyframeController::~BSKeyframeController() {} - -void BSKeyframeController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_KEYFRAME_CONTROLLER_READ -} - -void BSKeyframeController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - B_S_KEYFRAME_CONTROLLER_WRITE -} - -string BSKeyframeController::asString( bool verbose ) const { - B_S_KEYFRAME_CONTROLLER_STRING -} - -void BSKeyframeController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_KEYFRAME_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> BSKeyframeController::GetRefs() const { - B_S_KEYFRAME_CONTROLLER_GETREFS -} - -const Type & BSKeyframeController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/BSKeyframeController.h b/NifExport/niflib/obj/BSKeyframeController.h deleted file mode 100755 index 18781c5..0000000 --- a/NifExport/niflib/obj/BSKeyframeController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BSKEYFRAMECONTROLLER_H_ -#define _BSKEYFRAMECONTROLLER_H_ - -#include "NiKeyframeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiKeyframeData; - -#include "../gen/obj_defines.h" - -class BSKeyframeController; -typedef Ref<BSKeyframeController> BSKeyframeControllerRef; - -/*! - * BSKeyframeController - An extended keyframe controller. - */ - -class NIFLIB_API BSKeyframeController : public B_S_KEYFRAME_CONTROLLER_PARENT { -public: - BSKeyframeController(); - ~BSKeyframeController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - B_S_KEYFRAME_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/BSPSysArrayEmitter.cpp b/NifExport/niflib/obj/BSPSysArrayEmitter.cpp deleted file mode 100755 index e09b570..0000000 --- a/NifExport/niflib/obj/BSPSysArrayEmitter.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BSPSysArrayEmitter.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type BSPSysArrayEmitter::TYPE("BSPSysArrayEmitter", &B_S_P_SYS_ARRAY_EMITTER_PARENT::TypeConst() ); - -BSPSysArrayEmitter::BSPSysArrayEmitter() B_S_P_SYS_ARRAY_EMITTER_CONSTRUCT {} - -BSPSysArrayEmitter::~BSPSysArrayEmitter() {} - -void BSPSysArrayEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_P_SYS_ARRAY_EMITTER_READ -} - -void BSPSysArrayEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - B_S_P_SYS_ARRAY_EMITTER_WRITE -} - -string BSPSysArrayEmitter::asString( bool verbose ) const { - B_S_P_SYS_ARRAY_EMITTER_STRING -} - -void BSPSysArrayEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_P_SYS_ARRAY_EMITTER_FIXLINKS -} - -list<NiObjectRef> BSPSysArrayEmitter::GetRefs() const { - B_S_P_SYS_ARRAY_EMITTER_GETREFS -} - -const Type & BSPSysArrayEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/BSPSysArrayEmitter.h b/NifExport/niflib/obj/BSPSysArrayEmitter.h deleted file mode 100755 index be6cb4b..0000000 --- a/NifExport/niflib/obj/BSPSysArrayEmitter.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BSPSYSARRAYEMITTER_H_ -#define _BSPSYSARRAYEMITTER_H_ - -#include "NiPSysVolumeEmitter.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class BSPSysArrayEmitter; -typedef Ref<BSPSysArrayEmitter> BSPSysArrayEmitterRef; - -/*! - * BSPSysArrayEmitter - Unknown. - */ - -class NIFLIB_API BSPSysArrayEmitter : public B_S_P_SYS_ARRAY_EMITTER_PARENT { -public: - BSPSysArrayEmitter(); - ~BSPSysArrayEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - B_S_P_SYS_ARRAY_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/BSParentVelocityModifier.cpp b/NifExport/niflib/obj/BSParentVelocityModifier.cpp deleted file mode 100755 index 8a95f21..0000000 --- a/NifExport/niflib/obj/BSParentVelocityModifier.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BSParentVelocityModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type BSParentVelocityModifier::TYPE("BSParentVelocityModifier", &B_S_PARENT_VELOCITY_MODIFIER_PARENT::TypeConst() ); - -BSParentVelocityModifier::BSParentVelocityModifier() B_S_PARENT_VELOCITY_MODIFIER_CONSTRUCT {} - -BSParentVelocityModifier::~BSParentVelocityModifier() {} - -void BSParentVelocityModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_PARENT_VELOCITY_MODIFIER_READ -} - -void BSParentVelocityModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - B_S_PARENT_VELOCITY_MODIFIER_WRITE -} - -string BSParentVelocityModifier::asString( bool verbose ) const { - B_S_PARENT_VELOCITY_MODIFIER_STRING -} - -void BSParentVelocityModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_PARENT_VELOCITY_MODIFIER_FIXLINKS -} - -list<NiObjectRef> BSParentVelocityModifier::GetRefs() const { - B_S_PARENT_VELOCITY_MODIFIER_GETREFS -} - -const Type & BSParentVelocityModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/BSParentVelocityModifier.h b/NifExport/niflib/obj/BSParentVelocityModifier.h deleted file mode 100755 index 0fe839b..0000000 --- a/NifExport/niflib/obj/BSParentVelocityModifier.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BSPARENTVELOCITYMODIFIER_H_ -#define _BSPARENTVELOCITYMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class BSParentVelocityModifier; -typedef Ref<BSParentVelocityModifier> BSParentVelocityModifierRef; - -/*! - * BSParentVelocityModifier - Unknown. - */ - -class NIFLIB_API BSParentVelocityModifier : public B_S_PARENT_VELOCITY_MODIFIER_PARENT { -public: - BSParentVelocityModifier(); - ~BSParentVelocityModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - B_S_PARENT_VELOCITY_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/BSXFlags.cpp b/NifExport/niflib/obj/BSXFlags.cpp deleted file mode 100755 index a6a32bf..0000000 --- a/NifExport/niflib/obj/BSXFlags.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "BSXFlags.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type BSXFlags::TYPE("BSXFlags", &B_S_X_FLAGS_PARENT::TypeConst() ); - -BSXFlags::BSXFlags() B_S_X_FLAGS_CONSTRUCT {} - -BSXFlags::~BSXFlags() {} - -void BSXFlags::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_X_FLAGS_READ -} - -void BSXFlags::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - B_S_X_FLAGS_WRITE -} - -string BSXFlags::asString( bool verbose ) const { - B_S_X_FLAGS_STRING -} - -void BSXFlags::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - B_S_X_FLAGS_FIXLINKS -} - -list<NiObjectRef> BSXFlags::GetRefs() const { - B_S_X_FLAGS_GETREFS -} - -const Type & BSXFlags::GetType() const { - return TYPE; -}; - -uint BSXFlags::GetFlags() const { - return flags; -}; - -void BSXFlags::SetFlags( uint n ) { - flags = n; -}; diff --git a/NifExport/niflib/obj/BSXFlags.h b/NifExport/niflib/obj/BSXFlags.h deleted file mode 100755 index 7d0bebe..0000000 --- a/NifExport/niflib/obj/BSXFlags.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BSXFLAGS_H_ -#define _BSXFLAGS_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class BSXFlags; -typedef Ref<BSXFlags> BSXFlagsRef; - -/*! - * BSXFlags - Unknown. - */ - -class NIFLIB_API BSXFlags : public B_S_X_FLAGS_PARENT { -public: - BSXFlags(); - ~BSXFlags(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - uint GetFlags() const; - void SetFlags( uint n ); - -protected: - B_S_X_FLAGS_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/FxButton.cpp b/NifExport/niflib/obj/FxButton.cpp deleted file mode 100755 index 761bbc1..0000000 --- a/NifExport/niflib/obj/FxButton.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "FxButton.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type FxButton::TYPE("FxButton", &FX_BUTTON_PARENT::TypeConst() ); - -FxButton::FxButton() FX_BUTTON_CONSTRUCT {} - -FxButton::~FxButton() {} - -void FxButton::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FX_BUTTON_READ -} - -void FxButton::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - FX_BUTTON_WRITE -} - -string FxButton::asString( bool verbose ) const { - FX_BUTTON_STRING -} - -void FxButton::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FX_BUTTON_FIXLINKS -} - -list<NiObjectRef> FxButton::GetRefs() const { - FX_BUTTON_GETREFS -} - -const Type & FxButton::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/FxButton.h b/NifExport/niflib/obj/FxButton.h deleted file mode 100755 index 6759d48..0000000 --- a/NifExport/niflib/obj/FxButton.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _FXBUTTON_H_ -#define _FXBUTTON_H_ - -#include "FxWidget.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class FxButton; -typedef Ref<FxButton> FxButtonRef; - -/*! - * FxButton - Unknown. - */ - -class NIFLIB_API FxButton : public FX_BUTTON_PARENT { -public: - FxButton(); - ~FxButton(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - FX_BUTTON_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/FxRadioButton.cpp b/NifExport/niflib/obj/FxRadioButton.cpp deleted file mode 100755 index ff5cbeb..0000000 --- a/NifExport/niflib/obj/FxRadioButton.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "FxRadioButton.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type FxRadioButton::TYPE("FxRadioButton", &FX_RADIO_BUTTON_PARENT::TypeConst() ); - -FxRadioButton::FxRadioButton() FX_RADIO_BUTTON_CONSTRUCT {} - -FxRadioButton::~FxRadioButton() {} - -void FxRadioButton::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FX_RADIO_BUTTON_READ -} - -void FxRadioButton::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - FX_RADIO_BUTTON_WRITE -} - -string FxRadioButton::asString( bool verbose ) const { - FX_RADIO_BUTTON_STRING -} - -void FxRadioButton::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FX_RADIO_BUTTON_FIXLINKS -} - -list<NiObjectRef> FxRadioButton::GetRefs() const { - FX_RADIO_BUTTON_GETREFS -} - -const Type & FxRadioButton::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/FxRadioButton.h b/NifExport/niflib/obj/FxRadioButton.h deleted file mode 100755 index 82c1084..0000000 --- a/NifExport/niflib/obj/FxRadioButton.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _FXRADIOBUTTON_H_ -#define _FXRADIOBUTTON_H_ - -#include "FxWidget.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; - -#include "../gen/obj_defines.h" - -class FxRadioButton; -typedef Ref<FxRadioButton> FxRadioButtonRef; - -/*! - * FxRadioButton - Unknown. - */ - -class NIFLIB_API FxRadioButton : public FX_RADIO_BUTTON_PARENT { -public: - FxRadioButton(); - ~FxRadioButton(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - FX_RADIO_BUTTON_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/FxWidget.cpp b/NifExport/niflib/obj/FxWidget.cpp deleted file mode 100755 index a07b05b..0000000 --- a/NifExport/niflib/obj/FxWidget.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "FxWidget.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type FxWidget::TYPE("FxWidget", &FX_WIDGET_PARENT::TypeConst() ); - -FxWidget::FxWidget() FX_WIDGET_CONSTRUCT {} - -FxWidget::~FxWidget() {} - -void FxWidget::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FX_WIDGET_READ -} - -void FxWidget::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - FX_WIDGET_WRITE -} - -string FxWidget::asString( bool verbose ) const { - FX_WIDGET_STRING -} - -void FxWidget::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - FX_WIDGET_FIXLINKS -} - -list<NiObjectRef> FxWidget::GetRefs() const { - FX_WIDGET_GETREFS -} - -const Type & FxWidget::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/FxWidget.h b/NifExport/niflib/obj/FxWidget.h deleted file mode 100755 index 8808c1e..0000000 --- a/NifExport/niflib/obj/FxWidget.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _FXWIDGET_H_ -#define _FXWIDGET_H_ - -#include "NiNode.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class FxWidget; -typedef Ref<FxWidget> FxWidgetRef; - -/*! - * FxWidget - Firaxis-specific UI widgets? - */ - -class NIFLIB_API FxWidget : public FX_WIDGET_PARENT { -public: - FxWidget(); - ~FxWidget(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - FX_WIDGET_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAVObject.cpp b/NifExport/niflib/obj/NiAVObject.cpp deleted file mode 100755 index a4e31db..0000000 --- a/NifExport/niflib/obj/NiAVObject.cpp +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAVObject.h" -#include "NiNode.h" -#include "NiProperty.h" -#include "NiCollisionData.h" -#include "NiCollisionObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAVObject::TYPE("NiAVObject", &NI_A_V_OBJECT_PARENT::TypeConst() ); - -NiAVObject::NiAVObject() NI_A_V_OBJECT_CONSTRUCT, parent(NULL) {} - -NiAVObject::~NiAVObject() { - //Clear Properties - ClearProperties(); -} - -void NiAVObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_A_V_OBJECT_READ -} - -void NiAVObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_A_V_OBJECT_WRITE -} - -string NiAVObject::asString( bool verbose ) const { - NI_A_V_OBJECT_STRING -} - -void NiAVObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_A_V_OBJECT_FIXLINKS -} - -list<NiObjectRef> NiAVObject::GetRefs() const { - NI_A_V_OBJECT_GETREFS -} - -/*! - * This is a conveniance function that allows you to retrieve the full 4x4 matrix transform of a node. It accesses the "Rotation," "Translation," and "Scale" attributes and builds a complete 4x4 transformation matrix from them. - * \return A 4x4 transformation matrix built from the node's transform attributes. - * \sa INode::GetWorldTransform - */ -Matrix44 NiAVObject::GetLocalTransform() const { - return Matrix44( translation, rotation, scale ); -} -/*! - * This function will return a transform matrix that represents the location of this node in world space. In other words, it concatenates all parent transforms up to the root of the scene to give the ultimate combined transform from the origin for this node. - * \return The 4x4 world transform matrix of this node. - * \sa INode::GetLocalTransform - */ -Matrix44 NiAVObject::GetWorldTransform() const { - //Get Parent Transform if there is one - NiNodeRef par = GetParent(); - - if ( par != NULL ) { - //Multipy local matrix and parent world matrix for result - return GetLocalTransform() * par->GetWorldTransform(); - } - else { - //No parent transform, simply return local transform - return GetLocalTransform(); - } -} - -void NiAVObject::SetParent( NiNode * new_parent ) { - parent = new_parent; -} - -Ref<NiNode> NiAVObject::GetParent() const { - return parent; -} - -void NiAVObject::AddProperty( Ref<NiProperty> & obj ) { - properties.push_back( obj ); -} - -void NiAVObject::RemoveProperty( Ref<NiProperty> obj ) { - //Search property list for the one to remove - for ( vector< NiPropertyRef >::iterator it = properties.begin(); it != properties.end(); ) { - if ( *it == obj ) { - it = properties.erase( it ); - } else { - ++it; - } - } -} - -void NiAVObject::ClearProperties() { - properties.clear(); -} - -vector< Ref<NiProperty> > NiAVObject::GetProperties() const { - return properties; -} - -Ref<NiProperty> NiAVObject::GetPropertyByType( const Type & compare_to ) { - for ( uint i = 0; i < properties.size(); ++i ) { - if ( properties[i]->IsSameType( compare_to ) ) { - return properties[i]; - } - } - //No matching properties found, return NULL - return NULL; -} - -ushort NiAVObject::GetFlags() const { - return flags; -} - -void NiAVObject::SetFlags( ushort n ) { - flags = n; -} - -Matrix33 NiAVObject::GetLocalRotation() const { - return rotation; -} - -void NiAVObject::SetLocalRotation( const Matrix33 & n ) { - rotation = n; -} - -Vector3 NiAVObject::GetLocalTranslation() const { - return translation; -} - -void NiAVObject::SetLocalTranslation( const Vector3 & n ) { - translation = n; -} - -float NiAVObject::GetLocalScale() const { - return scale; -} - -void NiAVObject::SetLocalScale( float n ) { - scale = n; -} - -Vector3 NiAVObject::GetVelocity() const { - return velocity; -} - -void NiAVObject::SetVelocity( const Vector3 & n ) { - velocity = n; -} - -void NiAVObject::SetCollisionObject(Ref<NiCollisionObject> &obj) -{ - collisionObject = obj; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiAVObject.cpp.bak b/NifExport/niflib/obj/NiAVObject.cpp.bak deleted file mode 100755 index 05f266a..0000000 --- a/NifExport/niflib/obj/NiAVObject.cpp.bak +++ /dev/null @@ -1,152 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAVObject.h" -#include "NiNode.h" -#include "NiProperty.h" -#include "NiCollisionData.h" -#include "NiCollisionObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAVObject::TYPE("NiAVObject", &NI_A_V_OBJECT_PARENT::TypeConst() ); - -NiAVObject::NiAVObject() NI_A_V_OBJECT_CONSTRUCT, parent(NULL) {} - -NiAVObject::~NiAVObject() { - //Clear Properties - ClearProperties(); -} - -void NiAVObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_A_V_OBJECT_READ -} - -void NiAVObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_A_V_OBJECT_WRITE -} - -string NiAVObject::asString( bool verbose ) const { - NI_A_V_OBJECT_STRING -} - -void NiAVObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_A_V_OBJECT_FIXLINKS -} - -list<NiObjectRef> NiAVObject::GetRefs() const { - NI_A_V_OBJECT_GETREFS -} - -/*! - * This is a conveniance function that allows you to retrieve the full 4x4 matrix transform of a node. It accesses the "Rotation," "Translation," and "Scale" attributes and builds a complete 4x4 transformation matrix from them. - * \return A 4x4 transformation matrix built from the node's transform attributes. - * \sa INode::GetWorldTransform - */ -Matrix44 NiAVObject::GetLocalTransform() const { - return Matrix44( translation, rotation, scale ); -} -/*! - * This function will return a transform matrix that represents the location of this node in world space. In other words, it concatenates all parent transforms up to the root of the scene to give the ultimate combined transform from the origin for this node. - * \return The 4x4 world transform matrix of this node. - * \sa INode::GetLocalTransform - */ -Matrix44 NiAVObject::GetWorldTransform() const { - //Get Parent Transform if there is one - NiNodeRef par = GetParent(); - - if ( par != NULL ) { - //Multipy local matrix and parent world matrix for result - return GetLocalTransform() * par->GetWorldTransform(); - } - else { - //No parent transform, simply return local transform - return GetLocalTransform(); - } -} - -void NiAVObject::SetParent( NiNode * new_parent ) { - parent = new_parent; -} - -Ref<NiNode> NiAVObject::GetParent() const { - return parent; -} - -void NiAVObject::AddProperty( Ref<NiProperty> & obj ) { - properties.push_back( obj ); -} - -void NiAVObject::RemoveProperty( Ref<NiProperty> obj ) { - //Search property list for the one to remove - for ( vector< NiPropertyRef >::iterator it = properties.begin(); it != properties.end(); ) { - if ( *it == obj ) { - it = properties.erase( it ); - } else { - ++it; - } - } -} - -void NiAVObject::ClearProperties() { - properties.clear(); -} - -vector< Ref<NiProperty> > NiAVObject::GetProperties() const { - return properties; -} - -Ref<NiProperty> NiAVObject::GetPropertyByType( const Type & compare_to ) { - for ( uint i = 0; i < properties.size(); ++i ) { - if ( properties[i]->IsSameType( compare_to ) ) { - return properties[i]; - } - } - //No matching properties found, return NULL - return NULL; -} - -ushort NiAVObject::GetFlags() const { - return flags; -} - -void NiAVObject::SetFlags( ushort n ) { - flags = n; -} - -Matrix33 NiAVObject::GetLocalRotation() const { - return rotation; -} - -void NiAVObject::SetLocalRotation( const Matrix33 & n ) { - rotation = n; -} - -Vector3 NiAVObject::GetLocalTranslation() const { - return translation; -} - -void NiAVObject::SetLocalTranslation( const Vector3 & n ) { - translation = n; -} - -float NiAVObject::GetLocalScale() const { - return scale; -} - -void NiAVObject::SetLocalScale( float n ) { - scale = n; -} - -Vector3 NiAVObject::GetVelocity() const { - return velocity; -} - -void NiAVObject::SetVelocity( const Vector3 & n ) { - velocity = n; -} - -void NiAVObject::SetCollisionObject(const Ref<NiCollisionObject > &obj) -{ - collisionData = obj; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiAVObject.h b/NifExport/niflib/obj/NiAVObject.h deleted file mode 100755 index 884406b..0000000 --- a/NifExport/niflib/obj/NiAVObject.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIAVOBJECT_H_ -#define _NIAVOBJECT_H_ - -// Includes -#include "../gen/BoundingBox.h" -#include "../gen/obj_defines.h" -#include NI_A_V_OBJECT_INCLUDE -namespace Niflib { - -// Forward define of referenced blocks -class NiProperty; -class NiCollisionData; -class NiCollisionObject; -class NiNode; - - -/* - * NiAVObject - An audio/video object? Part of the scene graph and has a position in 3D. - */ - -class NiAVObject; -typedef Ref<NiAVObject> NiAVObjectRef; - -class NIFLIB_API NiAVObject : public NI_A_V_OBJECT_PARENT { -public: - NiAVObject(); - ~NiAVObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual const Type & GetType() const { return TYPE; }; - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - - //TODO: Bounding Box. What to do with newer files that have a link? Wrap this in a function and translate? - - /*! - * This is a conveniance function that allows you to retrieve the full 4x4 matrix transform of a node. It accesses the "Rotation," "Translation," and "Scale" attributes and builds a complete 4x4 transformation matrix from them. - * \return A 4x4 transformation matrix built from the node's transform attributes. - * \sa INode::GetWorldTransform - */ - Matrix44 GetLocalTransform() const; - - /*! - * This function will return a transform matrix that represents the location of this node in world space. In other words, it concatenates all parent transforms up to the root of the scene to give the ultimate combined transform from the origin for this node. - * \return The 4x4 world transform matrix of this node. - * \sa INode::GetLocalTransform - */ - Matrix44 GetWorldTransform() const; - - /*! Meant to be called by NiNode during the addition of new children. Should not be called directly. */ - void SetParent( NiNode * new_parent ); - - Ref<NiNode> GetParent() const; - - void AddProperty( Ref<NiProperty> & obj ); - void RemoveProperty( Ref<NiProperty> obj ); - void ClearProperties(); - vector< Ref<NiProperty> > GetProperties() const; - Ref<NiProperty> GetPropertyByType( const Type & compare_to ); - - ushort GetFlags() const; - void SetFlags( ushort n ); - - Matrix33 GetLocalRotation() const; - void SetLocalRotation( const Matrix33 & n ); - - Vector3 GetLocalTranslation() const; - void SetLocalTranslation( const Vector3 & n ); - - float GetLocalScale() const; - void SetLocalScale( float n ); - - Vector3 GetVelocity() const; - void SetVelocity( const Vector3 & n ); - - void SetCollisionObject(Ref<NiCollisionObject> &); - -protected: - NiNode * parent; - NI_A_V_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAVObject.h.bak b/NifExport/niflib/obj/NiAVObject.h.bak deleted file mode 100755 index 5120d24..0000000 --- a/NifExport/niflib/obj/NiAVObject.h.bak +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIAVOBJECT_H_ -#define _NIAVOBJECT_H_ - -// Includes -#include "../gen/BoundingBox.h" -#include "../gen/obj_defines.h" -#include NI_A_V_OBJECT_INCLUDE -namespace Niflib { - -// Forward define of referenced blocks -class NiProperty; -class NiCollisionData; -class NiCollisionObject; -class NiNode; - - -/* - * NiAVObject - An audio/video object? Part of the scene graph and has a position in 3D. - */ - -class NiAVObject; -typedef Ref<NiAVObject> NiAVObjectRef; - -class NIFLIB_API NiAVObject : public NI_A_V_OBJECT_PARENT { -public: - NiAVObject(); - ~NiAVObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual const Type & GetType() const { return TYPE; }; - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - - //TODO: Bounding Box. What to do with newer files that have a link? Wrap this in a function and translate? - - /*! - * This is a conveniance function that allows you to retrieve the full 4x4 matrix transform of a node. It accesses the "Rotation," "Translation," and "Scale" attributes and builds a complete 4x4 transformation matrix from them. - * \return A 4x4 transformation matrix built from the node's transform attributes. - * \sa INode::GetWorldTransform - */ - Matrix44 GetLocalTransform() const; - - /*! - * This function will return a transform matrix that represents the location of this node in world space. In other words, it concatenates all parent transforms up to the root of the scene to give the ultimate combined transform from the origin for this node. - * \return The 4x4 world transform matrix of this node. - * \sa INode::GetLocalTransform - */ - Matrix44 GetWorldTransform() const; - - /*! Meant to be called by NiNode during the addition of new children. Should not be called directly. */ - void SetParent( NiNode * new_parent ); - - Ref<NiNode> GetParent() const; - - void AddProperty( Ref<NiProperty> & obj ); - void RemoveProperty( Ref<NiProperty> obj ); - void ClearProperties(); - vector< Ref<NiProperty> > GetProperties() const; - Ref<NiProperty> GetPropertyByType( const Type & compare_to ); - - ushort GetFlags() const; - void SetFlags( ushort n ); - - Matrix33 GetLocalRotation() const; - void SetLocalRotation( const Matrix33 & n ); - - Vector3 GetLocalTranslation() const; - void SetLocalTranslation( const Vector3 & n ); - - float GetLocalScale() const; - void SetLocalScale( float n ); - - Vector3 GetVelocity() const; - void SetVelocity( const Vector3 & n ); - - void SetCollisionObject(const Ref<NiCollisionObject > &); - -protected: - NiNode * parent; - NI_A_V_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAlphaController.cpp b/NifExport/niflib/obj/NiAlphaController.cpp deleted file mode 100755 index b05637d..0000000 --- a/NifExport/niflib/obj/NiAlphaController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAlphaController.h" -#include "NiFloatData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAlphaController::TYPE("NiAlphaController", &NI_ALPHA_CONTROLLER_PARENT::TypeConst() ); - -NiAlphaController::NiAlphaController() NI_ALPHA_CONTROLLER_CONSTRUCT {} - -NiAlphaController::~NiAlphaController() {} - -void NiAlphaController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ALPHA_CONTROLLER_READ -} - -void NiAlphaController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_ALPHA_CONTROLLER_WRITE -} - -string NiAlphaController::asString( bool verbose ) const { - NI_ALPHA_CONTROLLER_STRING -} - -void NiAlphaController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ALPHA_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiAlphaController::GetRefs() const { - NI_ALPHA_CONTROLLER_GETREFS -} - -const Type & NiAlphaController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiAlphaController.h b/NifExport/niflib/obj/NiAlphaController.h deleted file mode 100755 index 0f9ac26..0000000 --- a/NifExport/niflib/obj/NiAlphaController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIALPHACONTROLLER_H_ -#define _NIALPHACONTROLLER_H_ - -#include "NiSingleInterpolatorController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiFloatData; - -#include "../gen/obj_defines.h" - -class NiAlphaController; -typedef Ref<NiAlphaController> NiAlphaControllerRef; - -/*! - * NiAlphaController - Time controller for transparency. - */ - -class NIFLIB_API NiAlphaController : public NI_ALPHA_CONTROLLER_PARENT { -public: - NiAlphaController(); - ~NiAlphaController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_ALPHA_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAlphaProperty.cpp b/NifExport/niflib/obj/NiAlphaProperty.cpp deleted file mode 100755 index b8b3c72..0000000 --- a/NifExport/niflib/obj/NiAlphaProperty.cpp +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAlphaProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAlphaProperty::TYPE("NiAlphaProperty", &NI_ALPHA_PROPERTY_PARENT::TypeConst() ); - -NiAlphaProperty::NiAlphaProperty() NI_ALPHA_PROPERTY_CONSTRUCT {} - -NiAlphaProperty::~NiAlphaProperty() {} - -void NiAlphaProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ALPHA_PROPERTY_READ -} - -void NiAlphaProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_ALPHA_PROPERTY_WRITE -} - -string NiAlphaProperty::asString( bool verbose ) const { - NI_ALPHA_PROPERTY_STRING -} - -void NiAlphaProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ALPHA_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiAlphaProperty::GetRefs() const { - NI_ALPHA_PROPERTY_GETREFS -} - -const Type & NiAlphaProperty::GetType() const { - return TYPE; -}; - -ushort NiAlphaProperty::GetFlags() const { - return flags; -} - -void NiAlphaProperty::SetFlags( ushort n ) { - flags = n; -} - -byte NiAlphaProperty::GetAlphaTestThreshold() const { - return threshold; -} - -void NiAlphaProperty::SetAlphaTestThreshold( byte n ) { - threshold = n; -} - -#define NIFLIB_GET_FLAG(value, shift, mask) \ - (( value >> shift ) & mask) - -#define NIFLIB_MASK_FLAG(flag, value, shift, mask) \ - ((flag ^ ~(mask << shift)) | ((value & mask) << shift)) - -NiAlphaProperty::BlendMode NiAlphaProperty::GetSourceBlendMode() const { - return (NiAlphaProperty::BlendMode)NIFLIB_GET_FLAG(flags, 1, 0x0f); -} - -void NiAlphaProperty::SetSourceBlendMode(BlendMode value) { - flags = NIFLIB_MASK_FLAG(flags, value, 1, 0x0f); -} - -NiAlphaProperty::BlendMode NiAlphaProperty::GetDestBlendMode() const { - return (NiAlphaProperty::BlendMode)(( flags >> 5 ) & 0x0f); -} - -void NiAlphaProperty::SetDestBlendMode(BlendMode value) { - flags = NIFLIB_MASK_FLAG(flags, value, 5, 0x0f); -} - -NiAlphaProperty::TestMode NiAlphaProperty::GetTestMode() const { - return (NiAlphaProperty::TestMode)NIFLIB_GET_FLAG(flags, 10, 0x7); -} - -void NiAlphaProperty::SetTestMode(TestMode value) { - flags = NIFLIB_MASK_FLAG(flags, value, 10, 0x7); -} - -bool NiAlphaProperty::GetAlphaBlend() const { - return NIFLIB_GET_FLAG(flags, 0, 0x1) ? true : false; -} - -void NiAlphaProperty::SetAlphaBlend(bool value) { - flags = NIFLIB_MASK_FLAG(flags, value?1:0, 0, 0x1); -} - -bool NiAlphaProperty::GetAlphaTest() const { - return NIFLIB_GET_FLAG(flags, 9, 0x1) ? true : false; -} - -void NiAlphaProperty::SetAlphaTest(bool value) { - flags = NIFLIB_MASK_FLAG(flags, value?1:0, 9, 0x1); -} - -bool NiAlphaProperty::GetAlphaSort() const { - return NIFLIB_GET_FLAG(flags, 13, 0x1) ? false : true; -} -void NiAlphaProperty::SetAlphaSort(bool value) { - flags = NIFLIB_MASK_FLAG(flags, value?0:1, 13, 0x1); -} diff --git a/NifExport/niflib/obj/NiAlphaProperty.h b/NifExport/niflib/obj/NiAlphaProperty.h deleted file mode 100755 index 6780ede..0000000 --- a/NifExport/niflib/obj/NiAlphaProperty.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIALPHAPROPERTY_H_ -#define _NIALPHAPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiAlphaProperty; -typedef Ref<NiAlphaProperty> NiAlphaPropertyRef; - -/*! - * NiAlphaProperty - Transparency. Flags 0x00ED. - */ - -class NIFLIB_API NiAlphaProperty : public NI_ALPHA_PROPERTY_PARENT { -public: - NiAlphaProperty(); - ~NiAlphaProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - enum BlendMode - { - BM_ONE = 0x00, - BM_ZERO = 0x01, - BM_SRC_COLOR = 0x02, - BM_ONE_MINUS_SRC_COLOR = 0x03, - BM_DST_COLOR = 0x04, - BM_ONE_MINUS_DST_COLOR = 0x05, - BM_SRC_ALPHA = 0x06, - BM_ONE_MINUS_SRC_ALPHA = 0x07, - BM_DST_ALPHA = 0x08, - BM_ONE_MINUS_DST_ALPHA = 0x08, - BM_SRC_ALPHA_SATURATE = 0x09, - }; - - enum TestMode - { - TM_ALWAYS = 0x00, - TM_LESS = 0x01, - TM_EQUAL = 0x02, - TM_LEQUAL = 0x03, - TM_GREATER = 0x04, - TM_NOTEQUAL = 0x05, - TM_GEQUAL = 0x06, - TM_NEVER = 0x07, - }; - - BlendMode GetSourceBlendMode() const; - void SetSourceBlendMode(BlendMode value); - - BlendMode GetDestBlendMode() const; - void SetDestBlendMode(BlendMode value); - - TestMode GetTestMode() const; - void SetTestMode(TestMode value); - - bool GetAlphaBlend() const; - void SetAlphaBlend(bool value); - - bool GetAlphaTest() const; - void SetAlphaTest(bool value); - - bool GetAlphaSort() const; - void SetAlphaSort(bool value); - - ushort GetFlags() const; - void SetFlags( ushort n ); - - byte GetAlphaTestThreshold() const; - void SetAlphaTestThreshold( byte n ); -protected: - NI_ALPHA_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAmbientLight.cpp b/NifExport/niflib/obj/NiAmbientLight.cpp deleted file mode 100755 index af9ff5a..0000000 --- a/NifExport/niflib/obj/NiAmbientLight.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAmbientLight.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAmbientLight::TYPE("NiAmbientLight", &NI_AMBIENT_LIGHT_PARENT::TypeConst() ); - -NiAmbientLight::NiAmbientLight() NI_AMBIENT_LIGHT_CONSTRUCT {} - -NiAmbientLight::~NiAmbientLight() {} - -void NiAmbientLight::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_AMBIENT_LIGHT_READ -} - -void NiAmbientLight::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_AMBIENT_LIGHT_WRITE -} - -string NiAmbientLight::asString( bool verbose ) const { - NI_AMBIENT_LIGHT_STRING -} - -void NiAmbientLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_AMBIENT_LIGHT_FIXLINKS -} - -list<NiObjectRef> NiAmbientLight::GetRefs() const { - NI_AMBIENT_LIGHT_GETREFS -} - -const Type & NiAmbientLight::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiAmbientLight.h b/NifExport/niflib/obj/NiAmbientLight.h deleted file mode 100755 index 7cbbd5f..0000000 --- a/NifExport/niflib/obj/NiAmbientLight.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIAMBIENTLIGHT_H_ -#define _NIAMBIENTLIGHT_H_ - -#include "NiLight.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiAmbientLight; -typedef Ref<NiAmbientLight> NiAmbientLightRef; - -/*! - * NiAmbientLight - Ambient light source. - */ - -class NIFLIB_API NiAmbientLight : public NI_AMBIENT_LIGHT_PARENT { -public: - NiAmbientLight(); - ~NiAmbientLight(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_AMBIENT_LIGHT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAutoNormalParticles.cpp b/NifExport/niflib/obj/NiAutoNormalParticles.cpp deleted file mode 100755 index d1c2582..0000000 --- a/NifExport/niflib/obj/NiAutoNormalParticles.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAutoNormalParticles.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAutoNormalParticles::TYPE("NiAutoNormalParticles", &NI_AUTO_NORMAL_PARTICLES_PARENT::TypeConst() ); - -NiAutoNormalParticles::NiAutoNormalParticles() NI_AUTO_NORMAL_PARTICLES_CONSTRUCT {} - -NiAutoNormalParticles::~NiAutoNormalParticles() {} - -void NiAutoNormalParticles::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_AUTO_NORMAL_PARTICLES_READ -} - -void NiAutoNormalParticles::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_AUTO_NORMAL_PARTICLES_WRITE -} - -string NiAutoNormalParticles::asString( bool verbose ) const { - NI_AUTO_NORMAL_PARTICLES_STRING -} - -void NiAutoNormalParticles::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_AUTO_NORMAL_PARTICLES_FIXLINKS -} - -list<NiObjectRef> NiAutoNormalParticles::GetRefs() const { - NI_AUTO_NORMAL_PARTICLES_GETREFS -} - -const Type & NiAutoNormalParticles::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiAutoNormalParticles.h b/NifExport/niflib/obj/NiAutoNormalParticles.h deleted file mode 100755 index d5d1806..0000000 --- a/NifExport/niflib/obj/NiAutoNormalParticles.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIAUTONORMALPARTICLES_H_ -#define _NIAUTONORMALPARTICLES_H_ - -#include "NiParticles.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiAutoNormalParticles; -typedef Ref<NiAutoNormalParticles> NiAutoNormalParticlesRef; - -/*! - * NiAutoNormalParticles - Unknown. - */ - -class NIFLIB_API NiAutoNormalParticles : public NI_AUTO_NORMAL_PARTICLES_PARENT { -public: - NiAutoNormalParticles(); - ~NiAutoNormalParticles(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_AUTO_NORMAL_PARTICLES_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiAutoNormalParticlesData.cpp b/NifExport/niflib/obj/NiAutoNormalParticlesData.cpp deleted file mode 100755 index cd79523..0000000 --- a/NifExport/niflib/obj/NiAutoNormalParticlesData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiAutoNormalParticlesData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiAutoNormalParticlesData::TYPE("NiAutoNormalParticlesData", &NI_AUTO_NORMAL_PARTICLES_DATA_PARENT::TypeConst() ); - -NiAutoNormalParticlesData::NiAutoNormalParticlesData() NI_AUTO_NORMAL_PARTICLES_DATA_CONSTRUCT {} - -NiAutoNormalParticlesData::~NiAutoNormalParticlesData() {} - -void NiAutoNormalParticlesData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_AUTO_NORMAL_PARTICLES_DATA_READ -} - -void NiAutoNormalParticlesData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_AUTO_NORMAL_PARTICLES_DATA_WRITE -} - -string NiAutoNormalParticlesData::asString( bool verbose ) const { - NI_AUTO_NORMAL_PARTICLES_DATA_STRING -} - -void NiAutoNormalParticlesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_AUTO_NORMAL_PARTICLES_DATA_FIXLINKS -} - -list<NiObjectRef> NiAutoNormalParticlesData::GetRefs() const { - NI_AUTO_NORMAL_PARTICLES_DATA_GETREFS -} - -const Type & NiAutoNormalParticlesData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiAutoNormalParticlesData.h b/NifExport/niflib/obj/NiAutoNormalParticlesData.h deleted file mode 100755 index ef93fe2..0000000 --- a/NifExport/niflib/obj/NiAutoNormalParticlesData.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIAUTONORMALPARTICLESDATA_H_ -#define _NIAUTONORMALPARTICLESDATA_H_ - -#include "NiTriBasedGeomData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiAutoNormalParticlesData; -typedef Ref<NiAutoNormalParticlesData> NiAutoNormalParticlesDataRef; - -/*! - * NiAutoNormalParticlesData - Particle system data block (with automatic - * normals?). - */ - -class NIFLIB_API NiAutoNormalParticlesData : public NI_AUTO_NORMAL_PARTICLES_DATA_PARENT { -public: - NiAutoNormalParticlesData(); - ~NiAutoNormalParticlesData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_AUTO_NORMAL_PARTICLES_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSAnimationNode.cpp b/NifExport/niflib/obj/NiBSAnimationNode.cpp deleted file mode 100755 index 815a96d..0000000 --- a/NifExport/niflib/obj/NiBSAnimationNode.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSAnimationNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSAnimationNode::TYPE("NiBSAnimationNode", &NI_B_S_ANIMATION_NODE_PARENT::TypeConst() ); - -NiBSAnimationNode::NiBSAnimationNode() NI_B_S_ANIMATION_NODE_CONSTRUCT {} - -NiBSAnimationNode::~NiBSAnimationNode() {} - -void NiBSAnimationNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_ANIMATION_NODE_READ -} - -void NiBSAnimationNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_S_ANIMATION_NODE_WRITE -} - -string NiBSAnimationNode::asString( bool verbose ) const { - NI_B_S_ANIMATION_NODE_STRING -} - -void NiBSAnimationNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_ANIMATION_NODE_FIXLINKS -} - -list<NiObjectRef> NiBSAnimationNode::GetRefs() const { - NI_B_S_ANIMATION_NODE_GETREFS -} - -const Type & NiBSAnimationNode::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSAnimationNode.h b/NifExport/niflib/obj/NiBSAnimationNode.h deleted file mode 100755 index 46be0bf..0000000 --- a/NifExport/niflib/obj/NiBSAnimationNode.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSANIMATIONNODE_H_ -#define _NIBSANIMATIONNODE_H_ - -#include "NiNode.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSAnimationNode; -typedef Ref<NiBSAnimationNode> NiBSAnimationNodeRef; - -/*! - * NiBSAnimationNode - Bethesda-specific extension of Node with animation - * properties stored in the flags. - */ - -class NIFLIB_API NiBSAnimationNode : public NI_B_S_ANIMATION_NODE_PARENT { -public: - NiBSAnimationNode(); - ~NiBSAnimationNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_S_ANIMATION_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSBoneLODController.cpp b/NifExport/niflib/obj/NiBSBoneLODController.cpp deleted file mode 100755 index 7a95326..0000000 --- a/NifExport/niflib/obj/NiBSBoneLODController.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSBoneLODController.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSBoneLODController::TYPE("NiBSBoneLODController", &NI_B_S_BONE_L_O_D_CONTROLLER_PARENT::TypeConst() ); - -NiBSBoneLODController::NiBSBoneLODController() NI_B_S_BONE_L_O_D_CONTROLLER_CONSTRUCT {} - -NiBSBoneLODController::~NiBSBoneLODController() {} - -void NiBSBoneLODController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_BONE_L_O_D_CONTROLLER_READ -} - -void NiBSBoneLODController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_S_BONE_L_O_D_CONTROLLER_WRITE -} - -string NiBSBoneLODController::asString( bool verbose ) const { - NI_B_S_BONE_L_O_D_CONTROLLER_STRING -} - -void NiBSBoneLODController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_BONE_L_O_D_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiBSBoneLODController::GetRefs() const { - NI_B_S_BONE_L_O_D_CONTROLLER_GETREFS -} - -const Type & NiBSBoneLODController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSBoneLODController.h b/NifExport/niflib/obj/NiBSBoneLODController.h deleted file mode 100755 index a9e77fd..0000000 --- a/NifExport/niflib/obj/NiBSBoneLODController.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSBONELODCONTROLLER_H_ -#define _NIBSBONELODCONTROLLER_H_ - -#include "ABoneLODController.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSBoneLODController; -typedef Ref<NiBSBoneLODController> NiBSBoneLODControllerRef; - -/*! - * NiBSBoneLODController - A simple LOD controller for bones. - */ - -class NIFLIB_API NiBSBoneLODController : public NI_B_S_BONE_L_O_D_CONTROLLER_PARENT { -public: - NiBSBoneLODController(); - ~NiBSBoneLODController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_S_BONE_L_O_D_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSPArrayController.cpp b/NifExport/niflib/obj/NiBSPArrayController.cpp deleted file mode 100755 index a1a2df7..0000000 --- a/NifExport/niflib/obj/NiBSPArrayController.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSPArrayController.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSPArrayController::TYPE("NiBSPArrayController", &NI_B_S_P_ARRAY_CONTROLLER_PARENT::TypeConst() ); - -NiBSPArrayController::NiBSPArrayController() NI_B_S_P_ARRAY_CONTROLLER_CONSTRUCT {} - -NiBSPArrayController::~NiBSPArrayController() {} - -void NiBSPArrayController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_P_ARRAY_CONTROLLER_READ -} - -void NiBSPArrayController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_S_P_ARRAY_CONTROLLER_WRITE -} - -string NiBSPArrayController::asString( bool verbose ) const { - NI_B_S_P_ARRAY_CONTROLLER_STRING -} - -void NiBSPArrayController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_P_ARRAY_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiBSPArrayController::GetRefs() const { - NI_B_S_P_ARRAY_CONTROLLER_GETREFS -} - -const Type & NiBSPArrayController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSPArrayController.h b/NifExport/niflib/obj/NiBSPArrayController.h deleted file mode 100755 index 21f06db..0000000 --- a/NifExport/niflib/obj/NiBSPArrayController.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPARRAYCONTROLLER_H_ -#define _NIBSPARRAYCONTROLLER_H_ - -#include "NiParticleSystemController.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSPArrayController; -typedef Ref<NiBSPArrayController> NiBSPArrayControllerRef; - -/*! - * NiBSPArrayController - A particle system controller, used by BS in - * conjunction with NiBSParticleNode. - */ - -class NIFLIB_API NiBSPArrayController : public NI_B_S_P_ARRAY_CONTROLLER_PARENT { -public: - NiBSPArrayController(); - ~NiBSPArrayController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_S_P_ARRAY_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSParticleNode.cpp b/NifExport/niflib/obj/NiBSParticleNode.cpp deleted file mode 100755 index 319711c..0000000 --- a/NifExport/niflib/obj/NiBSParticleNode.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSParticleNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSParticleNode::TYPE("NiBSParticleNode", &NI_B_S_PARTICLE_NODE_PARENT::TypeConst() ); - -NiBSParticleNode::NiBSParticleNode() NI_B_S_PARTICLE_NODE_CONSTRUCT {} - -NiBSParticleNode::~NiBSParticleNode() {} - -void NiBSParticleNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_PARTICLE_NODE_READ -} - -void NiBSParticleNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_S_PARTICLE_NODE_WRITE -} - -string NiBSParticleNode::asString( bool verbose ) const { - NI_B_S_PARTICLE_NODE_STRING -} - -void NiBSParticleNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_S_PARTICLE_NODE_FIXLINKS -} - -list<NiObjectRef> NiBSParticleNode::GetRefs() const { - NI_B_S_PARTICLE_NODE_GETREFS -} - -const Type & NiBSParticleNode::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSParticleNode.h b/NifExport/niflib/obj/NiBSParticleNode.h deleted file mode 100755 index f59b29b..0000000 --- a/NifExport/niflib/obj/NiBSParticleNode.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPARTICLENODE_H_ -#define _NIBSPARTICLENODE_H_ - -#include "NiNode.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSParticleNode; -typedef Ref<NiBSParticleNode> NiBSParticleNodeRef; - -/*! - * NiBSParticleNode - Unknown. - */ - -class NIFLIB_API NiBSParticleNode : public NI_B_S_PARTICLE_NODE_PARENT { -public: - NiBSParticleNode(); - ~NiBSParticleNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_S_PARTICLE_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSplineBasisData.cpp b/NifExport/niflib/obj/NiBSplineBasisData.cpp deleted file mode 100755 index d3af49c..0000000 --- a/NifExport/niflib/obj/NiBSplineBasisData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSplineBasisData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSplineBasisData::TYPE("NiBSplineBasisData", &NI_B_SPLINE_BASIS_DATA_PARENT::TypeConst() ); - -NiBSplineBasisData::NiBSplineBasisData() NI_B_SPLINE_BASIS_DATA_CONSTRUCT {} - -NiBSplineBasisData::~NiBSplineBasisData() {} - -void NiBSplineBasisData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_BASIS_DATA_READ -} - -void NiBSplineBasisData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_SPLINE_BASIS_DATA_WRITE -} - -string NiBSplineBasisData::asString( bool verbose ) const { - NI_B_SPLINE_BASIS_DATA_STRING -} - -void NiBSplineBasisData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_BASIS_DATA_FIXLINKS -} - -list<NiObjectRef> NiBSplineBasisData::GetRefs() const { - NI_B_SPLINE_BASIS_DATA_GETREFS -} - -const Type & NiBSplineBasisData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSplineBasisData.h b/NifExport/niflib/obj/NiBSplineBasisData.h deleted file mode 100755 index ee99bff..0000000 --- a/NifExport/niflib/obj/NiBSplineBasisData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPLINEBASISDATA_H_ -#define _NIBSPLINEBASISDATA_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSplineBasisData; -typedef Ref<NiBSplineBasisData> NiBSplineBasisDataRef; - -/*! - * NiBSplineBasisData - Unknown. - */ - -class NIFLIB_API NiBSplineBasisData : public NI_B_SPLINE_BASIS_DATA_PARENT { -public: - NiBSplineBasisData(); - ~NiBSplineBasisData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_SPLINE_BASIS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSplineCompFloatInterpolator.cpp b/NifExport/niflib/obj/NiBSplineCompFloatInterpolator.cpp deleted file mode 100755 index abe1fa6..0000000 --- a/NifExport/niflib/obj/NiBSplineCompFloatInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSplineCompFloatInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSplineCompFloatInterpolator::TYPE("NiBSplineCompFloatInterpolator", &NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_PARENT::TypeConst() ); - -NiBSplineCompFloatInterpolator::NiBSplineCompFloatInterpolator() NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_CONSTRUCT {} - -NiBSplineCompFloatInterpolator::~NiBSplineCompFloatInterpolator() {} - -void NiBSplineCompFloatInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_READ -} - -void NiBSplineCompFloatInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_WRITE -} - -string NiBSplineCompFloatInterpolator::asString( bool verbose ) const { - NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_STRING -} - -void NiBSplineCompFloatInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBSplineCompFloatInterpolator::GetRefs() const { - NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_GETREFS -} - -const Type & NiBSplineCompFloatInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSplineCompFloatInterpolator.h b/NifExport/niflib/obj/NiBSplineCompFloatInterpolator.h deleted file mode 100755 index 0308d7f..0000000 --- a/NifExport/niflib/obj/NiBSplineCompFloatInterpolator.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPLINECOMPFLOATINTERPOLATOR_H_ -#define _NIBSPLINECOMPFLOATINTERPOLATOR_H_ - -#include "NiBSplineInterpolator.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSplineCompFloatInterpolator; -typedef Ref<NiBSplineCompFloatInterpolator> NiBSplineCompFloatInterpolatorRef; - -/*! - * NiBSplineCompFloatInterpolator - Unknown. - */ - -class NIFLIB_API NiBSplineCompFloatInterpolator : public NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_PARENT { -public: - NiBSplineCompFloatInterpolator(); - ~NiBSplineCompFloatInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_SPLINE_COMP_FLOAT_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.cpp b/NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.cpp deleted file mode 100755 index 8306991..0000000 --- a/NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSplineCompPoint3Interpolator.h" -#include "NiBSplineData.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSplineCompPoint3Interpolator::TYPE("NiBSplineCompPoint3Interpolator", &NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_PARENT::TypeConst() ); - -NiBSplineCompPoint3Interpolator::NiBSplineCompPoint3Interpolator() NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_CONSTRUCT {} - -NiBSplineCompPoint3Interpolator::~NiBSplineCompPoint3Interpolator() {} - -void NiBSplineCompPoint3Interpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_READ -} - -void NiBSplineCompPoint3Interpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_WRITE -} - -string NiBSplineCompPoint3Interpolator::asString( bool verbose ) const { - NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_STRING -} - -void NiBSplineCompPoint3Interpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBSplineCompPoint3Interpolator::GetRefs() const { - NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_GETREFS -} - -const Type & NiBSplineCompPoint3Interpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.h b/NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.h deleted file mode 100755 index 0c45a30..0000000 --- a/NifExport/niflib/obj/NiBSplineCompPoint3Interpolator.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPLINECOMPPOINT3INTERPOLATOR_H_ -#define _NIBSPLINECOMPPOINT3INTERPOLATOR_H_ - -#include "NiBSplineInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiBSplineData; -class NiObject; - -#include "../gen/obj_defines.h" - -class NiBSplineCompPoint3Interpolator; -typedef Ref<NiBSplineCompPoint3Interpolator> NiBSplineCompPoint3InterpolatorRef; - -/*! - * NiBSplineCompPoint3Interpolator - Unknown. - */ - -class NIFLIB_API NiBSplineCompPoint3Interpolator : public NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_PARENT { -public: - NiBSplineCompPoint3Interpolator(); - ~NiBSplineCompPoint3Interpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_SPLINE_COMP_POINT3_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSplineCompTransformInterpolator.cpp b/NifExport/niflib/obj/NiBSplineCompTransformInterpolator.cpp deleted file mode 100755 index 89ad7c0..0000000 --- a/NifExport/niflib/obj/NiBSplineCompTransformInterpolator.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSplineCompTransformInterpolator.h" -#include "NiBSplineData.h" -#include "NiBSplineBasisData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSplineCompTransformInterpolator::TYPE("NiBSplineCompTransformInterpolator", &NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_PARENT::TypeConst() ); - -NiBSplineCompTransformInterpolator::NiBSplineCompTransformInterpolator() NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_CONSTRUCT {} - -NiBSplineCompTransformInterpolator::~NiBSplineCompTransformInterpolator() {} - -void NiBSplineCompTransformInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_READ -} - -void NiBSplineCompTransformInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_WRITE -} - -string NiBSplineCompTransformInterpolator::asString( bool verbose ) const { - NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_STRING -} - -void NiBSplineCompTransformInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBSplineCompTransformInterpolator::GetRefs() const { - NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_GETREFS -} - -const Type & NiBSplineCompTransformInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSplineCompTransformInterpolator.h b/NifExport/niflib/obj/NiBSplineCompTransformInterpolator.h deleted file mode 100755 index a39de11..0000000 --- a/NifExport/niflib/obj/NiBSplineCompTransformInterpolator.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPLINECOMPTRANSFORMINTERPOLATOR_H_ -#define _NIBSPLINECOMPTRANSFORMINTERPOLATOR_H_ - -#include "NiBSplineInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiBSplineData; -class NiBSplineBasisData; - -#include "../gen/obj_defines.h" - -class NiBSplineCompTransformInterpolator; -typedef Ref<NiBSplineCompTransformInterpolator> NiBSplineCompTransformInterpolatorRef; - -/*! - * NiBSplineCompTransformInterpolator - Unknown. - */ - -class NIFLIB_API NiBSplineCompTransformInterpolator : public NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_PARENT { -public: - NiBSplineCompTransformInterpolator(); - ~NiBSplineCompTransformInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_SPLINE_COMP_TRANSFORM_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSplineData.cpp b/NifExport/niflib/obj/NiBSplineData.cpp deleted file mode 100755 index 9f6decd..0000000 --- a/NifExport/niflib/obj/NiBSplineData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSplineData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSplineData::TYPE("NiBSplineData", &NI_B_SPLINE_DATA_PARENT::TypeConst() ); - -NiBSplineData::NiBSplineData() NI_B_SPLINE_DATA_CONSTRUCT {} - -NiBSplineData::~NiBSplineData() {} - -void NiBSplineData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_DATA_READ -} - -void NiBSplineData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_SPLINE_DATA_WRITE -} - -string NiBSplineData::asString( bool verbose ) const { - NI_B_SPLINE_DATA_STRING -} - -void NiBSplineData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_DATA_FIXLINKS -} - -list<NiObjectRef> NiBSplineData::GetRefs() const { - NI_B_SPLINE_DATA_GETREFS -} - -const Type & NiBSplineData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSplineData.h b/NifExport/niflib/obj/NiBSplineData.h deleted file mode 100755 index 1d8bfa4..0000000 --- a/NifExport/niflib/obj/NiBSplineData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPLINEDATA_H_ -#define _NIBSPLINEDATA_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBSplineData; -typedef Ref<NiBSplineData> NiBSplineDataRef; - -/*! - * NiBSplineData - Unknown. - */ - -class NIFLIB_API NiBSplineData : public NI_B_SPLINE_DATA_PARENT { -public: - NiBSplineData(); - ~NiBSplineData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_SPLINE_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBSplineInterpolator.cpp b/NifExport/niflib/obj/NiBSplineInterpolator.cpp deleted file mode 100755 index 029c419..0000000 --- a/NifExport/niflib/obj/NiBSplineInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBSplineInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBSplineInterpolator::TYPE("NiBSplineInterpolator", &NI_B_SPLINE_INTERPOLATOR_PARENT::TypeConst() ); - -NiBSplineInterpolator::NiBSplineInterpolator() NI_B_SPLINE_INTERPOLATOR_CONSTRUCT {} - -NiBSplineInterpolator::~NiBSplineInterpolator() {} - -void NiBSplineInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_INTERPOLATOR_READ -} - -void NiBSplineInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_B_SPLINE_INTERPOLATOR_WRITE -} - -string NiBSplineInterpolator::asString( bool verbose ) const { - NI_B_SPLINE_INTERPOLATOR_STRING -} - -void NiBSplineInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_B_SPLINE_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBSplineInterpolator::GetRefs() const { - NI_B_SPLINE_INTERPOLATOR_GETREFS -} - -const Type & NiBSplineInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBSplineInterpolator.h b/NifExport/niflib/obj/NiBSplineInterpolator.h deleted file mode 100755 index 523ffa5..0000000 --- a/NifExport/niflib/obj/NiBSplineInterpolator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBSPLINEINTERPOLATOR_H_ -#define _NIBSPLINEINTERPOLATOR_H_ - -#include "NiInterpolator.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiBSplineInterpolator; -typedef Ref<NiBSplineInterpolator> NiBSplineInterpolatorRef; - -/*! - * NiBSplineInterpolator - A B-spline (component?) interpolator. - */ - -class NIFLIB_API NiBSplineInterpolator : public NI_B_SPLINE_INTERPOLATOR_PARENT { -public: - NiBSplineInterpolator(); - ~NiBSplineInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_B_SPLINE_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBillboardNode.cpp b/NifExport/niflib/obj/NiBillboardNode.cpp deleted file mode 100755 index 860aec5..0000000 --- a/NifExport/niflib/obj/NiBillboardNode.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBillboardNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBillboardNode::TYPE("NiBillboardNode", &NI_BILLBOARD_NODE_PARENT::TypeConst() ); - -NiBillboardNode::NiBillboardNode() NI_BILLBOARD_NODE_CONSTRUCT {} - -NiBillboardNode::~NiBillboardNode() {} - -void NiBillboardNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BILLBOARD_NODE_READ -} - -void NiBillboardNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BILLBOARD_NODE_WRITE -} - -string NiBillboardNode::asString( bool verbose ) const { - NI_BILLBOARD_NODE_STRING -} - -void NiBillboardNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BILLBOARD_NODE_FIXLINKS -} - -list<NiObjectRef> NiBillboardNode::GetRefs() const { - NI_BILLBOARD_NODE_GETREFS -} - -const Type & NiBillboardNode::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBillboardNode.h b/NifExport/niflib/obj/NiBillboardNode.h deleted file mode 100755 index ddda835..0000000 --- a/NifExport/niflib/obj/NiBillboardNode.h +++ /dev/null @@ -1,43 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBILLBOARDNODE_H_ -#define _NIBILLBOARDNODE_H_ - -#include "NiNode.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiBillboardNode; -typedef Ref<NiBillboardNode> NiBillboardNodeRef; - -/*! - * NiBillboardNode - These nodes will always be rotated to face the - * camera creating a billboard effect for any attached objects. - */ - -class NIFLIB_API NiBillboardNode : public NI_BILLBOARD_NODE_PARENT { -public: - NiBillboardNode(); - ~NiBillboardNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BILLBOARD_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBinaryExtraData.cpp b/NifExport/niflib/obj/NiBinaryExtraData.cpp deleted file mode 100755 index 3ac3982..0000000 --- a/NifExport/niflib/obj/NiBinaryExtraData.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBinaryExtraData.h" -#include "../gen/ByteArray.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBinaryExtraData::TYPE("NiBinaryExtraData", &NI_BINARY_EXTRA_DATA_PARENT::TypeConst() ); - -NiBinaryExtraData::NiBinaryExtraData() NI_BINARY_EXTRA_DATA_CONSTRUCT {} - -NiBinaryExtraData::~NiBinaryExtraData() {} - -void NiBinaryExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BINARY_EXTRA_DATA_READ -} - -void NiBinaryExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BINARY_EXTRA_DATA_WRITE -} - -string NiBinaryExtraData::asString( bool verbose ) const { - NI_BINARY_EXTRA_DATA_STRING -} - -void NiBinaryExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BINARY_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiBinaryExtraData::GetRefs() const { - NI_BINARY_EXTRA_DATA_GETREFS -} - -const Type & NiBinaryExtraData::GetType() const { - return TYPE; -}; - - -vector<byte> NiBinaryExtraData::GetData() const { - return binaryData.data; -}; - -void NiBinaryExtraData::SetData( const vector<byte> & n ) { - binaryData.dataSize = uint(n.size()); - binaryData.data = n; -}; \ No newline at end of file diff --git a/NifExport/niflib/obj/NiBinaryExtraData.h b/NifExport/niflib/obj/NiBinaryExtraData.h deleted file mode 100755 index d941b6e..0000000 --- a/NifExport/niflib/obj/NiBinaryExtraData.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBINARYEXTRADATA_H_ -#define _NIBINARYEXTRADATA_H_ - -#include "NiExtraData.h" -// Include structures -#include "../gen/ByteArray.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBinaryExtraData; -typedef Ref<NiBinaryExtraData> NiBinaryExtraDataRef; - -/*! - * NiBinaryExtraData - Binary extra data block. Used to store normals and - * binormals in Oblivion. - */ - -class NIFLIB_API NiBinaryExtraData : public NI_BINARY_EXTRA_DATA_PARENT { -public: - NiBinaryExtraData(); - ~NiBinaryExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - vector<byte> GetData() const; - void SetData( const vector<byte> & n ); - -protected: - NI_BINARY_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBlendBoolInterpolator.cpp b/NifExport/niflib/obj/NiBlendBoolInterpolator.cpp deleted file mode 100755 index 3d5c9dd..0000000 --- a/NifExport/niflib/obj/NiBlendBoolInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBlendBoolInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBlendBoolInterpolator::TYPE("NiBlendBoolInterpolator", &NI_BLEND_BOOL_INTERPOLATOR_PARENT::TypeConst() ); - -NiBlendBoolInterpolator::NiBlendBoolInterpolator() NI_BLEND_BOOL_INTERPOLATOR_CONSTRUCT {} - -NiBlendBoolInterpolator::~NiBlendBoolInterpolator() {} - -void NiBlendBoolInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_BOOL_INTERPOLATOR_READ -} - -void NiBlendBoolInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BLEND_BOOL_INTERPOLATOR_WRITE -} - -string NiBlendBoolInterpolator::asString( bool verbose ) const { - NI_BLEND_BOOL_INTERPOLATOR_STRING -} - -void NiBlendBoolInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_BOOL_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBlendBoolInterpolator::GetRefs() const { - NI_BLEND_BOOL_INTERPOLATOR_GETREFS -} - -const Type & NiBlendBoolInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBlendBoolInterpolator.h b/NifExport/niflib/obj/NiBlendBoolInterpolator.h deleted file mode 100755 index 96472fa..0000000 --- a/NifExport/niflib/obj/NiBlendBoolInterpolator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBLENDBOOLINTERPOLATOR_H_ -#define _NIBLENDBOOLINTERPOLATOR_H_ - -#include "NiBlendInterpolator.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiBlendBoolInterpolator; -typedef Ref<NiBlendBoolInterpolator> NiBlendBoolInterpolatorRef; - -/*! - * NiBlendBoolInterpolator - An interpolator for a bool. - */ - -class NIFLIB_API NiBlendBoolInterpolator : public NI_BLEND_BOOL_INTERPOLATOR_PARENT { -public: - NiBlendBoolInterpolator(); - ~NiBlendBoolInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BLEND_BOOL_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBlendFloatInterpolator.cpp b/NifExport/niflib/obj/NiBlendFloatInterpolator.cpp deleted file mode 100755 index c59b1d0..0000000 --- a/NifExport/niflib/obj/NiBlendFloatInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBlendFloatInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBlendFloatInterpolator::TYPE("NiBlendFloatInterpolator", &NI_BLEND_FLOAT_INTERPOLATOR_PARENT::TypeConst() ); - -NiBlendFloatInterpolator::NiBlendFloatInterpolator() NI_BLEND_FLOAT_INTERPOLATOR_CONSTRUCT {} - -NiBlendFloatInterpolator::~NiBlendFloatInterpolator() {} - -void NiBlendFloatInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_FLOAT_INTERPOLATOR_READ -} - -void NiBlendFloatInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BLEND_FLOAT_INTERPOLATOR_WRITE -} - -string NiBlendFloatInterpolator::asString( bool verbose ) const { - NI_BLEND_FLOAT_INTERPOLATOR_STRING -} - -void NiBlendFloatInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_FLOAT_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBlendFloatInterpolator::GetRefs() const { - NI_BLEND_FLOAT_INTERPOLATOR_GETREFS -} - -const Type & NiBlendFloatInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBlendFloatInterpolator.h b/NifExport/niflib/obj/NiBlendFloatInterpolator.h deleted file mode 100755 index 9ad6919..0000000 --- a/NifExport/niflib/obj/NiBlendFloatInterpolator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBLENDFLOATINTERPOLATOR_H_ -#define _NIBLENDFLOATINTERPOLATOR_H_ - -#include "NiBlendInterpolator.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiBlendFloatInterpolator; -typedef Ref<NiBlendFloatInterpolator> NiBlendFloatInterpolatorRef; - -/*! - * NiBlendFloatInterpolator - An interpolator for a float. - */ - -class NIFLIB_API NiBlendFloatInterpolator : public NI_BLEND_FLOAT_INTERPOLATOR_PARENT { -public: - NiBlendFloatInterpolator(); - ~NiBlendFloatInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BLEND_FLOAT_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBlendInterpolator.cpp b/NifExport/niflib/obj/NiBlendInterpolator.cpp deleted file mode 100755 index 38a796f..0000000 --- a/NifExport/niflib/obj/NiBlendInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBlendInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBlendInterpolator::TYPE("NiBlendInterpolator", &NI_BLEND_INTERPOLATOR_PARENT::TypeConst() ); - -NiBlendInterpolator::NiBlendInterpolator() NI_BLEND_INTERPOLATOR_CONSTRUCT {} - -NiBlendInterpolator::~NiBlendInterpolator() {} - -void NiBlendInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_INTERPOLATOR_READ -} - -void NiBlendInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BLEND_INTERPOLATOR_WRITE -} - -string NiBlendInterpolator::asString( bool verbose ) const { - NI_BLEND_INTERPOLATOR_STRING -} - -void NiBlendInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBlendInterpolator::GetRefs() const { - NI_BLEND_INTERPOLATOR_GETREFS -} - -const Type & NiBlendInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBlendInterpolator.h b/NifExport/niflib/obj/NiBlendInterpolator.h deleted file mode 100755 index e7d08a4..0000000 --- a/NifExport/niflib/obj/NiBlendInterpolator.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBLENDINTERPOLATOR_H_ -#define _NIBLENDINTERPOLATOR_H_ - -#include "NiInterpolator.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBlendInterpolator; -typedef Ref<NiBlendInterpolator> NiBlendInterpolatorRef; - -/*! - * NiBlendInterpolator - An extended type of interpolater. - */ - -class NIFLIB_API NiBlendInterpolator : public NI_BLEND_INTERPOLATOR_PARENT { -public: - NiBlendInterpolator(); - ~NiBlendInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BLEND_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBlendPoint3Interpolator.cpp b/NifExport/niflib/obj/NiBlendPoint3Interpolator.cpp deleted file mode 100755 index 4b506d8..0000000 --- a/NifExport/niflib/obj/NiBlendPoint3Interpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBlendPoint3Interpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBlendPoint3Interpolator::TYPE("NiBlendPoint3Interpolator", &NI_BLEND_POINT3_INTERPOLATOR_PARENT::TypeConst() ); - -NiBlendPoint3Interpolator::NiBlendPoint3Interpolator() NI_BLEND_POINT3_INTERPOLATOR_CONSTRUCT {} - -NiBlendPoint3Interpolator::~NiBlendPoint3Interpolator() {} - -void NiBlendPoint3Interpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_POINT3_INTERPOLATOR_READ -} - -void NiBlendPoint3Interpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BLEND_POINT3_INTERPOLATOR_WRITE -} - -string NiBlendPoint3Interpolator::asString( bool verbose ) const { - NI_BLEND_POINT3_INTERPOLATOR_STRING -} - -void NiBlendPoint3Interpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_POINT3_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBlendPoint3Interpolator::GetRefs() const { - NI_BLEND_POINT3_INTERPOLATOR_GETREFS -} - -const Type & NiBlendPoint3Interpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBlendPoint3Interpolator.h b/NifExport/niflib/obj/NiBlendPoint3Interpolator.h deleted file mode 100755 index 68f88f0..0000000 --- a/NifExport/niflib/obj/NiBlendPoint3Interpolator.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBLENDPOINT3INTERPOLATOR_H_ -#define _NIBLENDPOINT3INTERPOLATOR_H_ - -#include "NiBlendInterpolator.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiBlendPoint3Interpolator; -typedef Ref<NiBlendPoint3Interpolator> NiBlendPoint3InterpolatorRef; - -/*! - * NiBlendPoint3Interpolator - Interpolates a point? - */ - -class NIFLIB_API NiBlendPoint3Interpolator : public NI_BLEND_POINT3_INTERPOLATOR_PARENT { -public: - NiBlendPoint3Interpolator(); - ~NiBlendPoint3Interpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BLEND_POINT3_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBlendTransformInterpolator.cpp b/NifExport/niflib/obj/NiBlendTransformInterpolator.cpp deleted file mode 100755 index 888e6fb..0000000 --- a/NifExport/niflib/obj/NiBlendTransformInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBlendTransformInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBlendTransformInterpolator::TYPE("NiBlendTransformInterpolator", &NI_BLEND_TRANSFORM_INTERPOLATOR_PARENT::TypeConst() ); - -NiBlendTransformInterpolator::NiBlendTransformInterpolator() NI_BLEND_TRANSFORM_INTERPOLATOR_CONSTRUCT {} - -NiBlendTransformInterpolator::~NiBlendTransformInterpolator() {} - -void NiBlendTransformInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_TRANSFORM_INTERPOLATOR_READ -} - -void NiBlendTransformInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BLEND_TRANSFORM_INTERPOLATOR_WRITE -} - -string NiBlendTransformInterpolator::asString( bool verbose ) const { - NI_BLEND_TRANSFORM_INTERPOLATOR_STRING -} - -void NiBlendTransformInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BLEND_TRANSFORM_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBlendTransformInterpolator::GetRefs() const { - NI_BLEND_TRANSFORM_INTERPOLATOR_GETREFS -} - -const Type & NiBlendTransformInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBlendTransformInterpolator.h b/NifExport/niflib/obj/NiBlendTransformInterpolator.h deleted file mode 100755 index 6915e53..0000000 --- a/NifExport/niflib/obj/NiBlendTransformInterpolator.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBLENDTRANSFORMINTERPOLATOR_H_ -#define _NIBLENDTRANSFORMINTERPOLATOR_H_ - -#include "NiBlendInterpolator.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBlendTransformInterpolator; -typedef Ref<NiBlendTransformInterpolator> NiBlendTransformInterpolatorRef; - -/*! - * NiBlendTransformInterpolator - Unknown. - */ - -class NIFLIB_API NiBlendTransformInterpolator : public NI_BLEND_TRANSFORM_INTERPOLATOR_PARENT { -public: - NiBlendTransformInterpolator(); - ~NiBlendTransformInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BLEND_TRANSFORM_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBoneLODController.cpp b/NifExport/niflib/obj/NiBoneLODController.cpp deleted file mode 100755 index 8f25c4d..0000000 --- a/NifExport/niflib/obj/NiBoneLODController.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBoneLODController.h" -#include "../gen/SkinShapeGroup.h" -#include "../gen/SkinShape.h" -#include "NiTriShape.h" -#include "NiSkinInstance.h" -#include "NiTriShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBoneLODController::TYPE("NiBoneLODController", &NI_BONE_L_O_D_CONTROLLER_PARENT::TypeConst() ); - -NiBoneLODController::NiBoneLODController() NI_BONE_L_O_D_CONTROLLER_CONSTRUCT {} - -NiBoneLODController::~NiBoneLODController() {} - -void NiBoneLODController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BONE_L_O_D_CONTROLLER_READ -} - -void NiBoneLODController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BONE_L_O_D_CONTROLLER_WRITE -} - -string NiBoneLODController::asString( bool verbose ) const { - NI_BONE_L_O_D_CONTROLLER_STRING -} - -void NiBoneLODController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BONE_L_O_D_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiBoneLODController::GetRefs() const { - NI_BONE_L_O_D_CONTROLLER_GETREFS -} - -const Type & NiBoneLODController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBoneLODController.h b/NifExport/niflib/obj/NiBoneLODController.h deleted file mode 100755 index 8c8fdc9..0000000 --- a/NifExport/niflib/obj/NiBoneLODController.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBONELODCONTROLLER_H_ -#define _NIBONELODCONTROLLER_H_ - -#include "ABoneLODController.h" - -// Include structures -#include "../gen/SkinShapeGroup.h" -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTriShape; - -#include "../gen/obj_defines.h" - -class NiBoneLODController; -typedef Ref<NiBoneLODController> NiBoneLODControllerRef; - -/*! - * NiBoneLODController - A LOD controller for bones? - */ - -class NIFLIB_API NiBoneLODController : public NI_BONE_L_O_D_CONTROLLER_PARENT { -public: - NiBoneLODController(); - ~NiBoneLODController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BONE_L_O_D_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBoolData.cpp b/NifExport/niflib/obj/NiBoolData.cpp deleted file mode 100755 index 3696e62..0000000 --- a/NifExport/niflib/obj/NiBoolData.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBoolData.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBoolData::TYPE("NiBoolData", &NI_BOOL_DATA_PARENT::TypeConst() ); - -NiBoolData::NiBoolData() NI_BOOL_DATA_CONSTRUCT {} - -NiBoolData::~NiBoolData() {} - -void NiBoolData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOL_DATA_READ -} - -void NiBoolData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BOOL_DATA_WRITE -} - -string NiBoolData::asString( bool verbose ) const { - NI_BOOL_DATA_STRING -} - -void NiBoolData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOL_DATA_FIXLINKS -} - -list<NiObjectRef> NiBoolData::GetRefs() const { - NI_BOOL_DATA_GETREFS -} - -const Type & NiBoolData::GetType() const { - return TYPE; -}; - -KeyType NiBoolData::GetKeyType() const { - return data.interpolation; -} - -void NiBoolData::SetKeyType( KeyType t ) { - data.interpolation= t; -} - -vector< Key<unsigned char> > NiBoolData::GetKeys() const { - return data.keys; -} - -void NiBoolData::SetKeys( vector< Key<unsigned char> > const & keys ) { - data.keys = keys; -} diff --git a/NifExport/niflib/obj/NiBoolData.h b/NifExport/niflib/obj/NiBoolData.h deleted file mode 100755 index 20a5cd4..0000000 --- a/NifExport/niflib/obj/NiBoolData.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBOOLDATA_H_ -#define _NIBOOLDATA_H_ - -#include "AKeyedData.h" -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiBoolData; -typedef Ref<NiBoolData> NiBoolDataRef; - -/*! - * NiBoolData - Timed boolean data. - */ - -class NIFLIB_API NiBoolData : public NI_BOOL_DATA_PARENT { -public: - NiBoolData(); - ~NiBoolData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the type of boolean interpolation being used. - * \return The boolean key type specifing the type of interpolation being used. - * \sa NiBoolData::SetKeyType - */ - KeyType GetKeyType() const; - - /*! Sets the type of boolean interpolation being used. Does not affect existing key data. - * \param t The new boolean key type specifing the type of interpolation to be used. - * \sa NiBoolData::GetKeyType - */ - void SetKeyType( KeyType t ); - - /*! Retrieves the boolean key data. - * \return A vector containing Key<unsigned char> data which specify boolean values over time. - * \sa NiBoolData::SetKeys, Key - */ - vector< Key<unsigned char> > GetKeys() const; - - /*! Sets the boolean key data. - * \param keys A vector containing new Key<unsigned char> data which will replace any existing data. - * \sa NiBoolData::GetKeys, Key - */ - void SetKeys( vector< Key<unsigned char> > const & keys ); - -protected: - NI_BOOL_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBoolInterpolator.cpp b/NifExport/niflib/obj/NiBoolInterpolator.cpp deleted file mode 100755 index faad436..0000000 --- a/NifExport/niflib/obj/NiBoolInterpolator.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBoolInterpolator.h" -#include "NiBoolData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBoolInterpolator::TYPE("NiBoolInterpolator", &NI_BOOL_INTERPOLATOR_PARENT::TypeConst() ); - -NiBoolInterpolator::NiBoolInterpolator() NI_BOOL_INTERPOLATOR_CONSTRUCT {} - -NiBoolInterpolator::~NiBoolInterpolator() {} - -void NiBoolInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOL_INTERPOLATOR_READ -} - -void NiBoolInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BOOL_INTERPOLATOR_WRITE -} - -string NiBoolInterpolator::asString( bool verbose ) const { - NI_BOOL_INTERPOLATOR_STRING -} - -void NiBoolInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOL_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBoolInterpolator::GetRefs() const { - NI_BOOL_INTERPOLATOR_GETREFS -} - -const Type & NiBoolInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBoolInterpolator.h b/NifExport/niflib/obj/NiBoolInterpolator.h deleted file mode 100755 index cfb4ffc..0000000 --- a/NifExport/niflib/obj/NiBoolInterpolator.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBOOLINTERPOLATOR_H_ -#define _NIBOOLINTERPOLATOR_H_ - -#include "NiInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiBoolData; - -#include "../gen/obj_defines.h" - -class NiBoolInterpolator; -typedef Ref<NiBoolInterpolator> NiBoolInterpolatorRef; - -/*! - * NiBoolInterpolator - Unknown. - */ - -class NIFLIB_API NiBoolInterpolator : public NI_BOOL_INTERPOLATOR_PARENT { -public: - NiBoolInterpolator(); - ~NiBoolInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BOOL_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBoolTimelineInterpolator.cpp b/NifExport/niflib/obj/NiBoolTimelineInterpolator.cpp deleted file mode 100755 index eba08a8..0000000 --- a/NifExport/niflib/obj/NiBoolTimelineInterpolator.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBoolTimelineInterpolator.h" -#include "NiBoolData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBoolTimelineInterpolator::TYPE("NiBoolTimelineInterpolator", &NI_BOOL_TIMELINE_INTERPOLATOR_PARENT::TypeConst() ); - -NiBoolTimelineInterpolator::NiBoolTimelineInterpolator() NI_BOOL_TIMELINE_INTERPOLATOR_CONSTRUCT {} - -NiBoolTimelineInterpolator::~NiBoolTimelineInterpolator() {} - -void NiBoolTimelineInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOL_TIMELINE_INTERPOLATOR_READ -} - -void NiBoolTimelineInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BOOL_TIMELINE_INTERPOLATOR_WRITE -} - -string NiBoolTimelineInterpolator::asString( bool verbose ) const { - NI_BOOL_TIMELINE_INTERPOLATOR_STRING -} - -void NiBoolTimelineInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOL_TIMELINE_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiBoolTimelineInterpolator::GetRefs() const { - NI_BOOL_TIMELINE_INTERPOLATOR_GETREFS -} - -const Type & NiBoolTimelineInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiBoolTimelineInterpolator.h b/NifExport/niflib/obj/NiBoolTimelineInterpolator.h deleted file mode 100755 index 6a42e47..0000000 --- a/NifExport/niflib/obj/NiBoolTimelineInterpolator.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBOOLTIMELINEINTERPOLATOR_H_ -#define _NIBOOLTIMELINEINTERPOLATOR_H_ - -#include "NiInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiBoolData; - -#include "../gen/obj_defines.h" - -class NiBoolTimelineInterpolator; -typedef Ref<NiBoolTimelineInterpolator> NiBoolTimelineInterpolatorRef; - -/*! - * NiBoolTimelineInterpolator - Unknown. - */ - -class NIFLIB_API NiBoolTimelineInterpolator : public NI_BOOL_TIMELINE_INTERPOLATOR_PARENT { -public: - NiBoolTimelineInterpolator(); - ~NiBoolTimelineInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_BOOL_TIMELINE_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiBooleanExtraData.cpp b/NifExport/niflib/obj/NiBooleanExtraData.cpp deleted file mode 100755 index 6dc9654..0000000 --- a/NifExport/niflib/obj/NiBooleanExtraData.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiBooleanExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiBooleanExtraData::TYPE("NiBooleanExtraData", &NI_BOOLEAN_EXTRA_DATA_PARENT::TypeConst() ); - -NiBooleanExtraData::NiBooleanExtraData() NI_BOOLEAN_EXTRA_DATA_CONSTRUCT {} - -NiBooleanExtraData::~NiBooleanExtraData() {} - -void NiBooleanExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOLEAN_EXTRA_DATA_READ -} - -void NiBooleanExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_BOOLEAN_EXTRA_DATA_WRITE -} - -string NiBooleanExtraData::asString( bool verbose ) const { - NI_BOOLEAN_EXTRA_DATA_STRING -} - -void NiBooleanExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_BOOLEAN_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiBooleanExtraData::GetRefs() const { - NI_BOOLEAN_EXTRA_DATA_GETREFS -} - -const Type & NiBooleanExtraData::GetType() const { - return TYPE; -}; - -bool NiBooleanExtraData::GetData() const { - return (booleanData != 0); -} - -void NiBooleanExtraData::SetData( bool n ) { - booleanData = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiBooleanExtraData.h b/NifExport/niflib/obj/NiBooleanExtraData.h deleted file mode 100755 index 26c23a1..0000000 --- a/NifExport/niflib/obj/NiBooleanExtraData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIBOOLEANEXTRADATA_H_ -#define _NIBOOLEANEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiBooleanExtraData; -typedef Ref<NiBooleanExtraData> NiBooleanExtraDataRef; - -/*! - * NiBooleanExtraData - Boolean extra data. - */ - -class NIFLIB_API NiBooleanExtraData : public NI_BOOLEAN_EXTRA_DATA_PARENT { -public: - NiBooleanExtraData(); - ~NiBooleanExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - bool GetData() const; - void SetData( bool n ); - -protected: - NI_BOOLEAN_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiCamera.cpp b/NifExport/niflib/obj/NiCamera.cpp deleted file mode 100755 index 3779470..0000000 --- a/NifExport/niflib/obj/NiCamera.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiCamera.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiCamera::TYPE("NiCamera", &NI_CAMERA_PARENT::TypeConst() ); - -NiCamera::NiCamera() NI_CAMERA_CONSTRUCT {} - -NiCamera::~NiCamera() {} - -void NiCamera::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_CAMERA_READ -} - -void NiCamera::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_CAMERA_WRITE -} - -string NiCamera::asString( bool verbose ) const { - NI_CAMERA_STRING -} - -void NiCamera::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_CAMERA_FIXLINKS -} - -list<NiObjectRef> NiCamera::GetRefs() const { - NI_CAMERA_GETREFS -} - -const Type & NiCamera::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiCamera.h b/NifExport/niflib/obj/NiCamera.h deleted file mode 100755 index fa44ef4..0000000 --- a/NifExport/niflib/obj/NiCamera.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICAMERA_H_ -#define _NICAMERA_H_ - -#include "NiAVObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; - -#include "../gen/obj_defines.h" - -class NiCamera; -typedef Ref<NiCamera> NiCameraRef; - -/*! - * NiCamera - Camera object. - */ - -class NIFLIB_API NiCamera : public NI_CAMERA_PARENT { -public: - NiCamera(); - ~NiCamera(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_CAMERA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiCollisionData.cpp b/NifExport/niflib/obj/NiCollisionData.cpp deleted file mode 100755 index 23743da..0000000 --- a/NifExport/niflib/obj/NiCollisionData.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiCollisionData.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiCollisionData::TYPE("NiCollisionData", &NI_COLLISION_DATA_PARENT::TypeConst() ); - -NiCollisionData::NiCollisionData() NI_COLLISION_DATA_CONSTRUCT {} - -NiCollisionData::~NiCollisionData() {} - -void NiCollisionData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLLISION_DATA_READ -} - -void NiCollisionData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_COLLISION_DATA_WRITE -} - -string NiCollisionData::asString( bool verbose ) const { - NI_COLLISION_DATA_STRING -} - -void NiCollisionData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLLISION_DATA_FIXLINKS -} - -list<NiObjectRef> NiCollisionData::GetRefs() const { - NI_COLLISION_DATA_GETREFS -} - -const Type & NiCollisionData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiCollisionData.h b/NifExport/niflib/obj/NiCollisionData.h deleted file mode 100755 index 808f78c..0000000 --- a/NifExport/niflib/obj/NiCollisionData.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICOLLISIONDATA_H_ -#define _NICOLLISIONDATA_H_ - -#include "NiObject.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiCollisionData; -typedef Ref<NiCollisionData> NiCollisionDataRef; - -/*! - * NiCollisionData - Collision box. - */ - -class NIFLIB_API NiCollisionData : public NI_COLLISION_DATA_PARENT { -public: - NiCollisionData(); - ~NiCollisionData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_COLLISION_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiCollisionObject.cpp b/NifExport/niflib/obj/NiCollisionObject.cpp deleted file mode 100755 index a925bc7..0000000 --- a/NifExport/niflib/obj/NiCollisionObject.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiCollisionObject.h" -#include "NiAVObject.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiCollisionObject::TYPE("NiCollisionObject", &NI_COLLISION_OBJECT_PARENT::TypeConst() ); - -NiCollisionObject::NiCollisionObject() NI_COLLISION_OBJECT_CONSTRUCT {} - -NiCollisionObject::~NiCollisionObject() {} - -void NiCollisionObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLLISION_OBJECT_READ -} - -void NiCollisionObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_COLLISION_OBJECT_WRITE -} - -string NiCollisionObject::asString( bool verbose ) const { - NI_COLLISION_OBJECT_STRING -} - -void NiCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLLISION_OBJECT_FIXLINKS -} - -list<NiObjectRef> NiCollisionObject::GetRefs() const { - NI_COLLISION_OBJECT_GETREFS -} - -void NiCollisionObject::SetParent(NiAVObject *obj) -{ - parent = obj; -} - -void NiCollisionObject::SetBody(const Ref<NiObject> &obj) -{ - body = obj; -} - -const Type & NiCollisionObject::GetType() const { - return TYPE; -}; - -NiAVObject * NiCollisionObject::Parent() const { return NULL; } diff --git a/NifExport/niflib/obj/NiCollisionObject.cpp.bak b/NifExport/niflib/obj/NiCollisionObject.cpp.bak deleted file mode 100755 index c4dfd86..0000000 --- a/NifExport/niflib/obj/NiCollisionObject.cpp.bak +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiCollisionObject.h" -#include "NiAVObject.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiCollisionObject::TYPE("NiCollisionObject", &NI_COLLISION_OBJECT_PARENT::TypeConst() ); - -NiCollisionObject::NiCollisionObject() NI_COLLISION_OBJECT_CONSTRUCT {} - -NiCollisionObject::~NiCollisionObject() {} - -void NiCollisionObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLLISION_OBJECT_READ -} - -void NiCollisionObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_COLLISION_OBJECT_WRITE -} - -string NiCollisionObject::asString( bool verbose ) const { - NI_COLLISION_OBJECT_STRING -} - -void NiCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLLISION_OBJECT_FIXLINKS -} - -list<NiObjectRef> NiCollisionObject::GetRefs() const { - NI_COLLISION_OBJECT_GETREFS -} - -void NiCollisionObject::setBody(const Ref<NiObject> &obj) -{ - body = obj; -} - -const Type & NiCollisionObject::GetType() const { - return TYPE; -}; - -NiAVObject * NiCollisionObject::Parent() const { return NULL; } diff --git a/NifExport/niflib/obj/NiCollisionObject.h b/NifExport/niflib/obj/NiCollisionObject.h deleted file mode 100755 index 7931d6c..0000000 --- a/NifExport/niflib/obj/NiCollisionObject.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICOLLISIONOBJECT_H_ -#define _NICOLLISIONOBJECT_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; -class NiObject; - -#include "../gen/obj_defines.h" - -class NiCollisionObject; -typedef Ref<NiCollisionObject> NiCollisionObjectRef; - -/*! - * NiCollisionObject - Unknown. - */ - -class NIFLIB_API NiCollisionObject : public NI_COLLISION_OBJECT_PARENT { -public: - NiCollisionObject(); - ~NiCollisionObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetParent(NiAVObject *); - void SetBody(const Ref<NiObject> &); - -protected: - NiAVObject * NiCollisionObject::Parent() const; - NI_COLLISION_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiCollisionObject.h.bak b/NifExport/niflib/obj/NiCollisionObject.h.bak deleted file mode 100755 index cc445f4..0000000 --- a/NifExport/niflib/obj/NiCollisionObject.h.bak +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICOLLISIONOBJECT_H_ -#define _NICOLLISIONOBJECT_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; -class NiObject; - -#include "../gen/obj_defines.h" - -class NiCollisionObject; -typedef Ref<NiCollisionObject> NiCollisionObjectRef; - -/*! - * NiCollisionObject - Unknown. - */ - -class NIFLIB_API NiCollisionObject : public NI_COLLISION_OBJECT_PARENT { -public: - NiCollisionObject(); - ~NiCollisionObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void setBody(const Ref<NiObject> &body); - -protected: - NiAVObject * NiCollisionObject::Parent() const; - NI_COLLISION_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiColorData.cpp b/NifExport/niflib/obj/NiColorData.cpp deleted file mode 100755 index 9dd50fc..0000000 --- a/NifExport/niflib/obj/NiColorData.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiColorData.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiColorData::TYPE("NiColorData", &NI_COLOR_DATA_PARENT::TypeConst() ); - -NiColorData::NiColorData() NI_COLOR_DATA_CONSTRUCT {} - -NiColorData::~NiColorData() {} - -void NiColorData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLOR_DATA_READ -} - -void NiColorData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_COLOR_DATA_WRITE -} - -string NiColorData::asString( bool verbose ) const { - NI_COLOR_DATA_STRING -} - -void NiColorData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLOR_DATA_FIXLINKS -} - -list<NiObjectRef> NiColorData::GetRefs() const { - NI_COLOR_DATA_GETREFS -} - -const Type & NiColorData::GetType() const { - return TYPE; -}; - -KeyType NiColorData::GetKeyType() const { - return data.interpolation; -} - -void NiColorData::SetKeyType( KeyType t ) { - data.interpolation = t; -} - -vector< Key<Color4> > NiColorData::GetKeys() const { - return data.keys; -} - -void NiColorData::SetKeys( vector< Key<Color4> > const & keys ) { - data.keys = keys; -} - diff --git a/NifExport/niflib/obj/NiColorData.h b/NifExport/niflib/obj/NiColorData.h deleted file mode 100755 index 26c1dde..0000000 --- a/NifExport/niflib/obj/NiColorData.h +++ /dev/null @@ -1,66 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICOLORDATA_H_ -#define _NICOLORDATA_H_ - -#include "AKeyedData.h" -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiColorData; -typedef Ref<NiColorData> NiColorDataRef; - -/*! - * NiColorData - Color data for material color controller. - */ - -class NIFLIB_API NiColorData : public NI_COLOR_DATA_PARENT { -public: - NiColorData(); - ~NiColorData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the type of color interpolation being used. - * \return The color key type specifing the type of interpolation being used. - * \sa NiColorData::SetKeyType - */ - KeyType GetKeyType() const; - - /*! Sets the type of color interpolation being used. Does not affect existing key data. - * \param t The new color key type specifing the type of interpolation to be used. - * \sa NiColorData::GetKeyType - */ - void SetKeyType( KeyType t ); - - /*! Retrieves the color key data. - * \return A vector containing Key<Color4> data which specify color over time. - * \sa NiColorData::SetKeys, Key - */ - vector< Key<Color4> > GetKeys() const; - - /*! Sets the color key data. - * \param keys A vector containing new Key<Color4> data which will replace any existing data. - * \sa NiColorData::GetKeys, Key - */ - void SetKeys( vector< Key<Color4> > const & keys ); -protected: - NI_COLOR_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiColorExtraData.cpp b/NifExport/niflib/obj/NiColorExtraData.cpp deleted file mode 100755 index 96de744..0000000 --- a/NifExport/niflib/obj/NiColorExtraData.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiColorExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiColorExtraData::TYPE("NiColorExtraData", &NI_COLOR_EXTRA_DATA_PARENT::TypeConst() ); - -NiColorExtraData::NiColorExtraData() NI_COLOR_EXTRA_DATA_CONSTRUCT {} - -NiColorExtraData::~NiColorExtraData() {} - -void NiColorExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLOR_EXTRA_DATA_READ -} - -void NiColorExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_COLOR_EXTRA_DATA_WRITE -} - -string NiColorExtraData::asString( bool verbose ) const { - NI_COLOR_EXTRA_DATA_STRING -} - -void NiColorExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_COLOR_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiColorExtraData::GetRefs() const { - NI_COLOR_EXTRA_DATA_GETREFS -} - -const Type & NiColorExtraData::GetType() const { - return TYPE; -}; - -Color4 NiColorExtraData::GetData() const { - return data; -} - -void NiColorExtraData::SetData( const Color4 & n ) { - data = n; -} diff --git a/NifExport/niflib/obj/NiColorExtraData.h b/NifExport/niflib/obj/NiColorExtraData.h deleted file mode 100755 index 32864d8..0000000 --- a/NifExport/niflib/obj/NiColorExtraData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICOLOREXTRADATA_H_ -#define _NICOLOREXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiColorExtraData; -typedef Ref<NiColorExtraData> NiColorExtraDataRef; - -/*! - * NiColorExtraData - Unknown. - */ - -class NIFLIB_API NiColorExtraData : public NI_COLOR_EXTRA_DATA_PARENT { -public: - NiColorExtraData(); - ~NiColorExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - Color4 GetData() const; - void SetData( const Color4 & n ); - -protected: - NI_COLOR_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiControllerManager.cpp b/NifExport/niflib/obj/NiControllerManager.cpp deleted file mode 100755 index c2304cc..0000000 --- a/NifExport/niflib/obj/NiControllerManager.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiControllerManager.h" -#include "NiControllerSequence.h" -#include "NiDefaultAVObjectPalette.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiControllerManager::TYPE("NiControllerManager", &NI_CONTROLLER_MANAGER_PARENT::TypeConst() ); - -NiControllerManager::NiControllerManager() NI_CONTROLLER_MANAGER_CONSTRUCT {} - -NiControllerManager::~NiControllerManager() {} - -void NiControllerManager::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_CONTROLLER_MANAGER_READ -} - -void NiControllerManager::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_CONTROLLER_MANAGER_WRITE -} - -string NiControllerManager::asString( bool verbose ) const { - NI_CONTROLLER_MANAGER_STRING -} - -void NiControllerManager::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_CONTROLLER_MANAGER_FIXLINKS -} - -list<NiObjectRef> NiControllerManager::GetRefs() const { - NI_CONTROLLER_MANAGER_GETREFS -} - -const Type & NiControllerManager::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiControllerManager.h b/NifExport/niflib/obj/NiControllerManager.h deleted file mode 100755 index 1fb91e6..0000000 --- a/NifExport/niflib/obj/NiControllerManager.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICONTROLLERMANAGER_H_ -#define _NICONTROLLERMANAGER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiControllerSequence; -class NiDefaultAVObjectPalette; - -#include "../gen/obj_defines.h" - -class NiControllerManager; -typedef Ref<NiControllerManager> NiControllerManagerRef; - -/*! - * NiControllerManager - Unknown. Root of all controllers? - */ - -class NIFLIB_API NiControllerManager : public NI_CONTROLLER_MANAGER_PARENT { -public: - NiControllerManager(); - ~NiControllerManager(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: This is not a priority but needs to be implemented eventually -protected: - NI_CONTROLLER_MANAGER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiControllerSequence.cpp b/NifExport/niflib/obj/NiControllerSequence.cpp deleted file mode 100755 index af01e0b..0000000 --- a/NifExport/niflib/obj/NiControllerSequence.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiControllerSequence.h" -#include "../gen/ControllerLink.h" -#include "NiInterpolator.h" -#include "NiObject.h" -#include "NiStringPalette.h" -#include "../gen/ControllerLink.h" -#include "NiInterpolator.h" -#include "NiObject.h" -#include "NiStringPalette.h" -#include "NiTextKeyExtraData.h" -#include "NiControllerManager.h" -#include "NiStringPalette.h" -#include "NiTimeController.h" -#include "NiSingleInterpolatorController.h" -#include "NiObjectNET.h" -#include "NiProperty.h" -#include "NiStringPalette.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiControllerSequence::TYPE("NiControllerSequence", &NI_CONTROLLER_SEQUENCE_PARENT::TypeConst() ); - -NiControllerSequence::NiControllerSequence() NI_CONTROLLER_SEQUENCE_CONSTRUCT {} - -NiControllerSequence::~NiControllerSequence() {} - -void NiControllerSequence::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_CONTROLLER_SEQUENCE_READ -} - -void NiControllerSequence::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_CONTROLLER_SEQUENCE_WRITE -} - -string NiControllerSequence::asString( bool verbose ) const { - NI_CONTROLLER_SEQUENCE_STRING -} - -void NiControllerSequence::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_CONTROLLER_SEQUENCE_FIXLINKS -} - -list<NiObjectRef> NiControllerSequence::GetRefs() const { - NI_CONTROLLER_SEQUENCE_GETREFS -} - -const Type & NiControllerSequence::GetType() const { - return TYPE; -}; - -NiControllerManager * NiControllerSequence::Parent() const { return NULL; } - -void NiControllerSequence::SetTextKey( const Ref<NiTextKeyExtraData> & txt_key ) { - //Set new name - textKeysName = txt_key->GetName(); - textKeys = txt_key; -} - -void NiControllerSequence::AddController( const Ref<NiTimeController> & obj ) { - //Make sure the link isn't null - if ( obj == NULL ) { - throw runtime_error("Attempted to add a null controller to NiControllerSequence block."); - } - - NiObjectNETRef target = obj->GetTarget(); - if ( target == NULL ) { - throw runtime_error("Controller must have a target to be added to a NiControllerSequence."); - } - - //Make a new ControllerLink and fill out necessary data - ControllerLink cl; - cl.controller = obj; - cl.targetName = target->GetName(); - cl.nodeName = target->GetName(); - - NiPropertyRef prop = DynamicCast<NiProperty>(target); - if ( prop != NULL ) { - cl.propertyType = prop->GetType().GetTypeName(); - } - - cl.controllerType = obj->GetType().GetTypeName(); - - //Add finished ControllerLink to list - controlledBlocks.push_back( cl ); -} - -void NiControllerSequence::AddInterpolator( const Ref<NiSingleInterpolatorController> & obj, byte priority ) { - //Make sure the link isn't null - if ( obj == NULL ) { - throw runtime_error("Attempted to add a null controller to NiControllerSequence block."); - } - - NiInterpolatorRef interp = obj->GetInterpolator(); - if ( interp == NULL ) { - throw runtime_error("Controller must have an interpolator attached to be added to a NiControllerSequence with the AddInterpolator function."); - } - - NiObjectNETRef target = obj->GetTarget(); - if ( target == NULL ) { - throw runtime_error("Controller must have a target to be added to a NiControllerSequence."); - } - - //If there are existing ControllerLinks, use the same StringPalette they're using - NiStringPaletteRef str_pal; - if ( controlledBlocks.size() > 0 ) { - str_pal = controlledBlocks[0].stringPalette; - } else { - //No existing ones, so make a new one - str_pal = new NiStringPalette; - } - - //Make a new ControllerLink and fill out necessary data - ControllerLink cl; - - cl.interpolator = interp; - cl.priority_ = priority; - cl.nodeNameOffset = str_pal->AddSubStr( target->GetName() ); - - NiPropertyRef prop = DynamicCast<NiProperty>(target); - if ( prop != NULL ) { - cl.propertyTypeOffset = str_pal->AddSubStr( prop->GetType().GetTypeName() ); - } - - cl.controllerTypeOffset = str_pal->AddSubStr( obj->GetType().GetTypeName() ); - - //Add finished ControllerLink to list - controlledBlocks.push_back( cl ); -} - -void NiControllerSequence::ClearControllerData() { - - throw runtime_error("The AddInterpolator function cannot be implemented until prolems in the XML are solved."); - - //Clear list - controlledBlocks.clear(); -} - -vector<ControllerLink> NiControllerSequence::GetControllerData() const { - return controlledBlocks; -} - -Ref<NiTextKeyExtraData> NiControllerSequence::GetTextKeyExtraData() const { - return textKeys; -} - diff --git a/NifExport/niflib/obj/NiControllerSequence.h b/NifExport/niflib/obj/NiControllerSequence.h deleted file mode 100755 index dfd1ce7..0000000 --- a/NifExport/niflib/obj/NiControllerSequence.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NICONTROLLERSEQUENCE_H_ -#define _NICONTROLLERSEQUENCE_H_ - -#include "NiObject.h" -// Include structures -#include "../gen/ControllerLink.h" -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTextKeyExtraData; -class NiControllerManager; -class NiStringPalette; -class NiTimeController; -class NiSingleInterpolatorController; - -#include "../gen/obj_defines.h" - -class NiControllerSequence; -typedef Ref<NiControllerSequence> NiControllerSequenceRef; - -/*! - * NiControllerSequence - Root node in .kf files (version 10.0.1.0 and - * up). - */ - -class NIFLIB_API NiControllerSequence : public NI_CONTROLLER_SEQUENCE_PARENT { -public: - NiControllerSequence(); - ~NiControllerSequence(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Sets the name and block reference to the NiTextKeyExtraData block which will be used by this controller sequence to specify the keyframe labels or "notes." - * \param new_name The name of the NiTextKeyExtraData block to use. - * \param txt_key A reference to the NiTextKeyExtraData object to use. - * \sa NiTextKeyExtraData - */ - void SetTextKey( const Ref<NiTextKeyExtraData> & txt_key ); - - /*! Attatches a controler to this KF file for a KF file of version 10.2.0.0 or below. Versions above this use interpolators. - * \param obj A reference to the new NiTimeController to attach. - * \sa NiControllerSequence::ClearChildren, NiControllersequence::AddInterpolator - */ - void AddController( const Ref<NiTimeController> & obj ); - - /*! Attatches an interpolator to this KF file for a KF file of version greater than 10.2.0.0. Versions below this use controllers. - * \param obj A reference to the new controller which has an interpolator to attach. - * \param priority Used only in Oblivion to set the priority of one controller over another when the two are merged. - * \sa NiControllerSequence::ClearChildren, NiControllerSequence::AddController - */ - void AddInterpolator( const Ref<NiSingleInterpolatorController> & obj, byte priority = 0 ); - - /*! Removes all controllers and interpolators from this Kf file root object. - * \sa NiControllerSequence::AddController, NiControllersequence::AddInterpolator - */ - void ClearControllerData(); - - /*! Retrieves the data for the controllers or interpolators which are attached to this controller sequence. - * \return A vector containing the data for all controllers. - * \sa NiControllerSequence::AddController, NiControllersequence::AddInterpolator, ClearKfChildren - */ - vector<ControllerLink> GetControllerData() const; - - Ref<NiTextKeyExtraData> GetTextKeyExtraData() const; - -protected: - NiControllerManager * NiControllerSequence::Parent() const; - NI_CONTROLLER_SEQUENCE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiDefaultAVObjectPalette.cpp b/NifExport/niflib/obj/NiDefaultAVObjectPalette.cpp deleted file mode 100755 index 8d0679f..0000000 --- a/NifExport/niflib/obj/NiDefaultAVObjectPalette.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiDefaultAVObjectPalette.h" -#include "../gen/AVObject.h" -#include "NiAVObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiDefaultAVObjectPalette::TYPE("NiDefaultAVObjectPalette", &NI_DEFAULT_A_V_OBJECT_PALETTE_PARENT::TypeConst() ); - -NiDefaultAVObjectPalette::NiDefaultAVObjectPalette() NI_DEFAULT_A_V_OBJECT_PALETTE_CONSTRUCT {} - -NiDefaultAVObjectPalette::~NiDefaultAVObjectPalette() {} - -void NiDefaultAVObjectPalette::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DEFAULT_A_V_OBJECT_PALETTE_READ -} - -void NiDefaultAVObjectPalette::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_DEFAULT_A_V_OBJECT_PALETTE_WRITE -} - -string NiDefaultAVObjectPalette::asString( bool verbose ) const { - NI_DEFAULT_A_V_OBJECT_PALETTE_STRING -} - -void NiDefaultAVObjectPalette::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DEFAULT_A_V_OBJECT_PALETTE_FIXLINKS -} - -list<NiObjectRef> NiDefaultAVObjectPalette::GetRefs() const { - NI_DEFAULT_A_V_OBJECT_PALETTE_GETREFS -} - -const Type & NiDefaultAVObjectPalette::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiDefaultAVObjectPalette.h b/NifExport/niflib/obj/NiDefaultAVObjectPalette.h deleted file mode 100755 index 1d72351..0000000 --- a/NifExport/niflib/obj/NiDefaultAVObjectPalette.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIDEFAULTAVOBJECTPALETTE_H_ -#define _NIDEFAULTAVOBJECTPALETTE_H_ - -#include "NiObject.h" - -// Include structures -#include "../gen/AVObject.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiDefaultAVObjectPalette; -typedef Ref<NiDefaultAVObjectPalette> NiDefaultAVObjectPaletteRef; - -/*! - * NiDefaultAVObjectPalette - Unknown. Refers to a list of objects. Used - * by NiControllerManager. - */ - -class NIFLIB_API NiDefaultAVObjectPalette : public NI_DEFAULT_A_V_OBJECT_PALETTE_PARENT { -public: - NiDefaultAVObjectPalette(); - ~NiDefaultAVObjectPalette(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_DEFAULT_A_V_OBJECT_PALETTE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiDirectionalLight.cpp b/NifExport/niflib/obj/NiDirectionalLight.cpp deleted file mode 100755 index bf142a3..0000000 --- a/NifExport/niflib/obj/NiDirectionalLight.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiDirectionalLight.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiDirectionalLight::TYPE("NiDirectionalLight", &NI_DIRECTIONAL_LIGHT_PARENT::TypeConst() ); - -NiDirectionalLight::NiDirectionalLight() NI_DIRECTIONAL_LIGHT_CONSTRUCT {} - -NiDirectionalLight::~NiDirectionalLight() {} - -void NiDirectionalLight::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DIRECTIONAL_LIGHT_READ -} - -void NiDirectionalLight::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_DIRECTIONAL_LIGHT_WRITE -} - -string NiDirectionalLight::asString( bool verbose ) const { - NI_DIRECTIONAL_LIGHT_STRING -} - -void NiDirectionalLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DIRECTIONAL_LIGHT_FIXLINKS -} - -list<NiObjectRef> NiDirectionalLight::GetRefs() const { - NI_DIRECTIONAL_LIGHT_GETREFS -} - -const Type & NiDirectionalLight::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiDirectionalLight.h b/NifExport/niflib/obj/NiDirectionalLight.h deleted file mode 100755 index 7dca6fe..0000000 --- a/NifExport/niflib/obj/NiDirectionalLight.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIDIRECTIONALLIGHT_H_ -#define _NIDIRECTIONALLIGHT_H_ - -#include "NiLight.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiDirectionalLight; -typedef Ref<NiDirectionalLight> NiDirectionalLightRef; - -/*! - * NiDirectionalLight - Directional light source. - */ - -class NIFLIB_API NiDirectionalLight : public NI_DIRECTIONAL_LIGHT_PARENT { -public: - NiDirectionalLight(); - ~NiDirectionalLight(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_DIRECTIONAL_LIGHT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiDitherProperty.cpp b/NifExport/niflib/obj/NiDitherProperty.cpp deleted file mode 100755 index f916c6b..0000000 --- a/NifExport/niflib/obj/NiDitherProperty.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiDitherProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiDitherProperty::TYPE("NiDitherProperty", &NI_DITHER_PROPERTY_PARENT::TypeConst() ); - -NiDitherProperty::NiDitherProperty() NI_DITHER_PROPERTY_CONSTRUCT {} - -NiDitherProperty::~NiDitherProperty() {} - -void NiDitherProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DITHER_PROPERTY_READ -} - -void NiDitherProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_DITHER_PROPERTY_WRITE -} - -string NiDitherProperty::asString( bool verbose ) const { - NI_DITHER_PROPERTY_STRING -} - -void NiDitherProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DITHER_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiDitherProperty::GetRefs() const { - NI_DITHER_PROPERTY_GETREFS -} - -const Type & NiDitherProperty::GetType() const { - return TYPE; -}; - -ushort NiDitherProperty::GetFlags() const { - return flags; -} - -void NiDitherProperty::SetFlags( ushort n ) { - flags = n; -} - diff --git a/NifExport/niflib/obj/NiDitherProperty.h b/NifExport/niflib/obj/NiDitherProperty.h deleted file mode 100755 index 550cce5..0000000 --- a/NifExport/niflib/obj/NiDitherProperty.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIDITHERPROPERTY_H_ -#define _NIDITHERPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiDitherProperty; -typedef Ref<NiDitherProperty> NiDitherPropertyRef; - -/*! - * NiDitherProperty - Unknown. - */ - -class NIFLIB_API NiDitherProperty : public NI_DITHER_PROPERTY_PARENT { -public: - NiDitherProperty(); - ~NiDitherProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags( ushort n ); - -protected: - NI_DITHER_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiDynamicEffect.cpp b/NifExport/niflib/obj/NiDynamicEffect.cpp deleted file mode 100755 index 0c44a32..0000000 --- a/NifExport/niflib/obj/NiDynamicEffect.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiDynamicEffect.h" -#include "NiAVObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiDynamicEffect::TYPE("NiDynamicEffect", &NI_DYNAMIC_EFFECT_PARENT::TypeConst() ); - -NiDynamicEffect::NiDynamicEffect() NI_DYNAMIC_EFFECT_CONSTRUCT {} - -NiDynamicEffect::~NiDynamicEffect() {} - -void NiDynamicEffect::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DYNAMIC_EFFECT_READ -} - -void NiDynamicEffect::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_DYNAMIC_EFFECT_WRITE -} - -string NiDynamicEffect::asString( bool verbose ) const { - NI_DYNAMIC_EFFECT_STRING -} - -void NiDynamicEffect::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_DYNAMIC_EFFECT_FIXLINKS -} - -list<NiObjectRef> NiDynamicEffect::GetRefs() const { - NI_DYNAMIC_EFFECT_GETREFS -} - -const Type & NiDynamicEffect::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiDynamicEffect.h b/NifExport/niflib/obj/NiDynamicEffect.h deleted file mode 100755 index 5b4cdd1..0000000 --- a/NifExport/niflib/obj/NiDynamicEffect.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIDYNAMICEFFECT_H_ -#define _NIDYNAMICEFFECT_H_ - -#include "NiAVObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; - -#include "../gen/obj_defines.h" - -class NiDynamicEffect; -typedef Ref<NiDynamicEffect> NiDynamicEffectRef; - -/*! - * NiDynamicEffect - A dynamic effect such as a light or environment map. - */ - -class NIFLIB_API NiDynamicEffect : public NI_DYNAMIC_EFFECT_PARENT { -public: - NiDynamicEffect(); - ~NiDynamicEffect(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_DYNAMIC_EFFECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiExtraData.cpp b/NifExport/niflib/obj/NiExtraData.cpp deleted file mode 100755 index 9ba79c2..0000000 --- a/NifExport/niflib/obj/NiExtraData.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiExtraData::TYPE("NiExtraData", &NI_EXTRA_DATA_PARENT::TypeConst() ); - -NiExtraData::NiExtraData() NI_EXTRA_DATA_CONSTRUCT {} - -NiExtraData::~NiExtraData() {} - -void NiExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_EXTRA_DATA_READ -} - -void NiExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_EXTRA_DATA_WRITE -} - -string NiExtraData::asString( bool verbose ) const { - NI_EXTRA_DATA_STRING -} - -void NiExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiExtraData::GetRefs() const { - NI_EXTRA_DATA_GETREFS -} - -const Type & NiExtraData::GetType() const { - return TYPE; -}; - -string NiExtraData::GetName() { - return name; -} - -void NiExtraData::SetName( const string & new_name ) { - name = new_name; -} - -/*! Used to format a human readable string that includes the type of the object */ -string NiExtraData::GetIDString() { - stringstream out; - out << NiObject::GetIDString() << " {" << name << "}"; - return out.str(); -} - -NiExtraDataRef NiExtraData::GetNextExtraData() const { - return nextExtraData; -} - -void NiExtraData::SetNextExtraData( const NiExtraDataRef & obj ) { - nextExtraData = obj; -} diff --git a/NifExport/niflib/obj/NiExtraData.h b/NifExport/niflib/obj/NiExtraData.h deleted file mode 100755 index 1c26ea7..0000000 --- a/NifExport/niflib/obj/NiExtraData.h +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIEXTRADATA_H_ -#define _NIEXTRADATA_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiExtraData; -typedef Ref<NiExtraData> NiExtraDataRef; - -/*! - * NiExtraData - A generic extra data block. - */ - -class NIFLIB_API NiExtraData : public NI_EXTRA_DATA_PARENT { -public: - NiExtraData(); - ~NiExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Returns a reference to the next extra data used in early version NIF - * files which store extra data in a linked list. This function should - * only be called by NiObjectNET as it is not always meaningful. - * \return A reference to the next extra data in early version NIF files. May not always be meaningful. - */ - NiExtraDataRef GetNextExtraData() const; - - /*! Sets the next extra data in early version NIF files which store extra - * data in a linked list. This function should only be called by - * NiObjectNET. - * \param obj A reference to the object to set as the one after this in the chain. - */ - void SetNextExtraData( const NiExtraDataRef & obj ); - - /*! Retrieve the name of this NiExtraData object. Names are only stored - * in later version NIF files so this may not be necessary depending on - * the target version. - * \return The name of this NiExtraData object. - */ - string GetName(); - - /*! Sets the name of this NiExtraData object. Will only be written to later - * version NIF files. - * \param new_name The new name for this NiExtraData object. - */ - void SetName( const string & new_name ); - - /*! - * Formats a human readable string that includes the type of the object - * \return A string in the form: address(type) {name} - */ - virtual string GetIDString(); - -protected: - NI_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFlipController.cpp b/NifExport/niflib/obj/NiFlipController.cpp deleted file mode 100755 index a752354..0000000 --- a/NifExport/niflib/obj/NiFlipController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFlipController.h" -#include "NiSourceTexture.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFlipController::TYPE("NiFlipController", &NI_FLIP_CONTROLLER_PARENT::TypeConst() ); - -NiFlipController::NiFlipController() NI_FLIP_CONTROLLER_CONSTRUCT {} - -NiFlipController::~NiFlipController() {} - -void NiFlipController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLIP_CONTROLLER_READ -} - -void NiFlipController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FLIP_CONTROLLER_WRITE -} - -string NiFlipController::asString( bool verbose ) const { - NI_FLIP_CONTROLLER_STRING -} - -void NiFlipController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLIP_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiFlipController::GetRefs() const { - NI_FLIP_CONTROLLER_GETREFS -} - -const Type & NiFlipController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiFlipController.h b/NifExport/niflib/obj/NiFlipController.h deleted file mode 100755 index 676fc30..0000000 --- a/NifExport/niflib/obj/NiFlipController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFLIPCONTROLLER_H_ -#define _NIFLIPCONTROLLER_H_ - -#include "NiSingleInterpolatorController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiSourceTexture; - -#include "../gen/obj_defines.h" - -class NiFlipController; -typedef Ref<NiFlipController> NiFlipControllerRef; - -/*! - * NiFlipController - Texture flipping controller. - */ - -class NIFLIB_API NiFlipController : public NI_FLIP_CONTROLLER_PARENT { -public: - NiFlipController(); - ~NiFlipController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_FLIP_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFloatData.cpp b/NifExport/niflib/obj/NiFloatData.cpp deleted file mode 100755 index 1794575..0000000 --- a/NifExport/niflib/obj/NiFloatData.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFloatData.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFloatData::TYPE("NiFloatData", &NI_FLOAT_DATA_PARENT::TypeConst() ); - -NiFloatData::NiFloatData() NI_FLOAT_DATA_CONSTRUCT {} - -NiFloatData::~NiFloatData() {} - -void NiFloatData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_DATA_READ -} - -void NiFloatData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FLOAT_DATA_WRITE -} - -string NiFloatData::asString( bool verbose ) const { - NI_FLOAT_DATA_STRING -} - -void NiFloatData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_DATA_FIXLINKS -} - -list<NiObjectRef> NiFloatData::GetRefs() const { - NI_FLOAT_DATA_GETREFS -} - -const Type & NiFloatData::GetType() const { - return TYPE; -}; - -KeyType NiFloatData::GetKeyType() const { - return data.interpolation; -} - -void NiFloatData::SetKeyType( KeyType t ) { - data.interpolation = t; -} - -vector< Key<float> > NiFloatData::GetKeys() const { - return data.keys; -} - -void NiFloatData::SetKeys( vector< Key<float> > const & keys ) { - data.keys = keys; -} - - diff --git a/NifExport/niflib/obj/NiFloatData.h b/NifExport/niflib/obj/NiFloatData.h deleted file mode 100755 index fe8833a..0000000 --- a/NifExport/niflib/obj/NiFloatData.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFLOATDATA_H_ -#define _NIFLOATDATA_H_ - -#include "AKeyedData.h" -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiFloatData; -typedef Ref<NiFloatData> NiFloatDataRef; - -/*! - * NiFloatData - Possibly the 1D position along a 3D path. - */ - -class NIFLIB_API NiFloatData : public NI_FLOAT_DATA_PARENT { -public: - NiFloatData(); - ~NiFloatData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the type of float interpolation being used. - * \return The float key type specifing the type of interpolation being used. - * \sa NiFloatData::SetKeyType - */ - KeyType GetKeyType() const; - - /*! Sets the type of float interpolation being used. Does not affect existing key data. - * \param t The new float key type specifing the type of interpolation to be used. - * \sa NiFloatData::GetKeyType - */ - void SetKeyType( KeyType t ); - - /*! Retrieves the float key data. - * \return A vector containing Key<float> data which specify float values over time. - * \sa NiFloatData::SetKeys, Key - */ - vector< Key<float> > GetKeys() const; - - /*! Sets the float key data. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa NiFloatData::GetKeys, Key - */ - void SetKeys( vector< Key<float> > const & keys ); - -protected: - NI_FLOAT_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFloatExtraData.cpp b/NifExport/niflib/obj/NiFloatExtraData.cpp deleted file mode 100755 index adee501..0000000 --- a/NifExport/niflib/obj/NiFloatExtraData.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFloatExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFloatExtraData::TYPE("NiFloatExtraData", &NI_FLOAT_EXTRA_DATA_PARENT::TypeConst() ); - -NiFloatExtraData::NiFloatExtraData() NI_FLOAT_EXTRA_DATA_CONSTRUCT {} - -NiFloatExtraData::~NiFloatExtraData() {} - -void NiFloatExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_EXTRA_DATA_READ -} - -void NiFloatExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FLOAT_EXTRA_DATA_WRITE -} - -string NiFloatExtraData::asString( bool verbose ) const { - NI_FLOAT_EXTRA_DATA_STRING -} - -void NiFloatExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiFloatExtraData::GetRefs() const { - NI_FLOAT_EXTRA_DATA_GETREFS -} - -const Type & NiFloatExtraData::GetType() const { - return TYPE; -}; - -float NiFloatExtraData::GetData() const { - return floatData; -} - -void NiFloatExtraData::SetData( float n ) { - floatData = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiFloatExtraData.h b/NifExport/niflib/obj/NiFloatExtraData.h deleted file mode 100755 index 1369c7e..0000000 --- a/NifExport/niflib/obj/NiFloatExtraData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFLOATEXTRADATA_H_ -#define _NIFLOATEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiFloatExtraData; -typedef Ref<NiFloatExtraData> NiFloatExtraDataRef; - -/*! - * NiFloatExtraData - Float extra data. - */ - -class NIFLIB_API NiFloatExtraData : public NI_FLOAT_EXTRA_DATA_PARENT { -public: - NiFloatExtraData(); - ~NiFloatExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - float GetData() const; - void SetData( float n ); - -protected: - NI_FLOAT_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFloatExtraDataController.cpp b/NifExport/niflib/obj/NiFloatExtraDataController.cpp deleted file mode 100755 index 7334224..0000000 --- a/NifExport/niflib/obj/NiFloatExtraDataController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFloatExtraDataController.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFloatExtraDataController::TYPE("NiFloatExtraDataController", &NI_FLOAT_EXTRA_DATA_CONTROLLER_PARENT::TypeConst() ); - -NiFloatExtraDataController::NiFloatExtraDataController() NI_FLOAT_EXTRA_DATA_CONTROLLER_CONSTRUCT {} - -NiFloatExtraDataController::~NiFloatExtraDataController() {} - -void NiFloatExtraDataController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_EXTRA_DATA_CONTROLLER_READ -} - -void NiFloatExtraDataController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FLOAT_EXTRA_DATA_CONTROLLER_WRITE -} - -string NiFloatExtraDataController::asString( bool verbose ) const { - NI_FLOAT_EXTRA_DATA_CONTROLLER_STRING -} - -void NiFloatExtraDataController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_EXTRA_DATA_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiFloatExtraDataController::GetRefs() const { - NI_FLOAT_EXTRA_DATA_CONTROLLER_GETREFS -} - -const Type & NiFloatExtraDataController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiFloatExtraDataController.h b/NifExport/niflib/obj/NiFloatExtraDataController.h deleted file mode 100755 index d1a9aa9..0000000 --- a/NifExport/niflib/obj/NiFloatExtraDataController.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFLOATEXTRADATACONTROLLER_H_ -#define _NIFLOATEXTRADATACONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; - -#include "../gen/obj_defines.h" - -class NiFloatExtraDataController; -typedef Ref<NiFloatExtraDataController> NiFloatExtraDataControllerRef; - -/*! - * NiFloatExtraDataController - Unknown. - */ - -class NIFLIB_API NiFloatExtraDataController : public NI_FLOAT_EXTRA_DATA_CONTROLLER_PARENT { -public: - NiFloatExtraDataController(); - ~NiFloatExtraDataController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: The function of all data is currently unknown. -protected: - NI_FLOAT_EXTRA_DATA_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFloatInterpolator.cpp b/NifExport/niflib/obj/NiFloatInterpolator.cpp deleted file mode 100755 index 7cf7f0a..0000000 --- a/NifExport/niflib/obj/NiFloatInterpolator.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFloatInterpolator.h" -#include "NiFloatData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFloatInterpolator::TYPE("NiFloatInterpolator", &NI_FLOAT_INTERPOLATOR_PARENT::TypeConst() ); - -NiFloatInterpolator::NiFloatInterpolator() NI_FLOAT_INTERPOLATOR_CONSTRUCT {} - -NiFloatInterpolator::~NiFloatInterpolator() {} - -void NiFloatInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_INTERPOLATOR_READ -} - -void NiFloatInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FLOAT_INTERPOLATOR_WRITE -} - -string NiFloatInterpolator::asString( bool verbose ) const { - NI_FLOAT_INTERPOLATOR_STRING -} - -void NiFloatInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOAT_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiFloatInterpolator::GetRefs() const { - NI_FLOAT_INTERPOLATOR_GETREFS -} - -const Type & NiFloatInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiFloatInterpolator.h b/NifExport/niflib/obj/NiFloatInterpolator.h deleted file mode 100755 index 7d82a5f..0000000 --- a/NifExport/niflib/obj/NiFloatInterpolator.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFLOATINTERPOLATOR_H_ -#define _NIFLOATINTERPOLATOR_H_ - -#include "NiInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiFloatData; - -#include "../gen/obj_defines.h" - -class NiFloatInterpolator; -typedef Ref<NiFloatInterpolator> NiFloatInterpolatorRef; - -/*! - * NiFloatInterpolator - Unknown. - */ - -class NIFLIB_API NiFloatInterpolator : public NI_FLOAT_INTERPOLATOR_PARENT { -public: - NiFloatInterpolator(); - ~NiFloatInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_FLOAT_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFloatsExtraData.cpp b/NifExport/niflib/obj/NiFloatsExtraData.cpp deleted file mode 100755 index 4d2c808..0000000 --- a/NifExport/niflib/obj/NiFloatsExtraData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFloatsExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFloatsExtraData::TYPE("NiFloatsExtraData", &NI_FLOATS_EXTRA_DATA_PARENT::TypeConst() ); - -NiFloatsExtraData::NiFloatsExtraData() NI_FLOATS_EXTRA_DATA_CONSTRUCT {} - -NiFloatsExtraData::~NiFloatsExtraData() {} - -void NiFloatsExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOATS_EXTRA_DATA_READ -} - -void NiFloatsExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FLOATS_EXTRA_DATA_WRITE -} - -string NiFloatsExtraData::asString( bool verbose ) const { - NI_FLOATS_EXTRA_DATA_STRING -} - -void NiFloatsExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FLOATS_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiFloatsExtraData::GetRefs() const { - NI_FLOATS_EXTRA_DATA_GETREFS -} - -const Type & NiFloatsExtraData::GetType() const { - return TYPE; -}; - -vector<float> NiFloatsExtraData::GetData() const { - return data; -} - -void NiFloatsExtraData::SetData( const vector<float> & n ) { - numFloats = uint(n.size()); - data = n; -} diff --git a/NifExport/niflib/obj/NiFloatsExtraData.h b/NifExport/niflib/obj/NiFloatsExtraData.h deleted file mode 100755 index b1276ee..0000000 --- a/NifExport/niflib/obj/NiFloatsExtraData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFLOATSEXTRADATA_H_ -#define _NIFLOATSEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiFloatsExtraData; -typedef Ref<NiFloatsExtraData> NiFloatsExtraDataRef; - -/*! - * NiFloatsExtraData - Unknown. - */ - -class NIFLIB_API NiFloatsExtraData : public NI_FLOATS_EXTRA_DATA_PARENT { -public: - NiFloatsExtraData(); - ~NiFloatsExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - vector<float> GetData() const; - void SetData( const vector<float> & n ); - -protected: - NI_FLOATS_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiFogProperty.cpp b/NifExport/niflib/obj/NiFogProperty.cpp deleted file mode 100755 index a93c4cd..0000000 --- a/NifExport/niflib/obj/NiFogProperty.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiFogProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiFogProperty::TYPE("NiFogProperty", &NI_FOG_PROPERTY_PARENT::TypeConst() ); - -NiFogProperty::NiFogProperty() NI_FOG_PROPERTY_CONSTRUCT {} - -NiFogProperty::~NiFogProperty() {} - -void NiFogProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FOG_PROPERTY_READ -} - -void NiFogProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_FOG_PROPERTY_WRITE -} - -string NiFogProperty::asString( bool verbose ) const { - NI_FOG_PROPERTY_STRING -} - -void NiFogProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_FOG_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiFogProperty::GetRefs() const { - NI_FOG_PROPERTY_GETREFS -} - -const Type & NiFogProperty::GetType() const { - return TYPE; -}; - - -ushort NiFogProperty::GetFlags() const { - return flags; -} - -void NiFogProperty::SetFlags( ushort n ) { - flags = n; -} - -float NiFogProperty::GetFogDepth() const { - return fogDepth; -} - -void NiFogProperty::SetFogDepth(float value) { - fogDepth = value; -} - -Color3 NiFogProperty::GetFogColor() const { - return fogColor; -} - -void NiFogProperty::SetFogColor(Color3 value) { - fogColor = value; -} diff --git a/NifExport/niflib/obj/NiFogProperty.h b/NifExport/niflib/obj/NiFogProperty.h deleted file mode 100755 index 47ee0d0..0000000 --- a/NifExport/niflib/obj/NiFogProperty.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIFOGPROPERTY_H_ -#define _NIFOGPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiFogProperty; -typedef Ref<NiFogProperty> NiFogPropertyRef; - -/*! - * NiFogProperty - Describes... fog? - */ - -class NIFLIB_API NiFogProperty : public NI_FOG_PROPERTY_PARENT { -public: - NiFogProperty(); - ~NiFogProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags( ushort n ); - - float GetFogDepth() const; - void SetFogDepth(float value); - - Color3 GetFogColor() const; - void SetFogColor(Color3 value); - -protected: - NI_FOG_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiGeomMorpherController.cpp b/NifExport/niflib/obj/NiGeomMorpherController.cpp deleted file mode 100755 index 740c260..0000000 --- a/NifExport/niflib/obj/NiGeomMorpherController.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiGeomMorpherController.h" -#include "NiMorphData.h" -#include "NiInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiGeomMorpherController::TYPE("NiGeomMorpherController", &NI_GEOM_MORPHER_CONTROLLER_PARENT::TypeConst() ); - -NiGeomMorpherController::NiGeomMorpherController() NI_GEOM_MORPHER_CONTROLLER_CONSTRUCT {} - -NiGeomMorpherController::~NiGeomMorpherController() {} - -void NiGeomMorpherController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_GEOM_MORPHER_CONTROLLER_READ -} - -void NiGeomMorpherController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_GEOM_MORPHER_CONTROLLER_WRITE -} - -string NiGeomMorpherController::asString( bool verbose ) const { - NI_GEOM_MORPHER_CONTROLLER_STRING -} - -void NiGeomMorpherController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_GEOM_MORPHER_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiGeomMorpherController::GetRefs() const { - NI_GEOM_MORPHER_CONTROLLER_GETREFS -} - -const Type & NiGeomMorpherController::GetType() const { - return TYPE; -}; - -vector< Ref<NiInterpolator> > NiGeomMorpherController::GetInterpolators() const { - return interpolators; -} - -void NiGeomMorpherController::SetInterpolators( const vector< Ref<NiInterpolator> > & n ) { - numInterpolators = uint(n.size()); - interpolators = n; -} - -Ref<NiMorphData> NiGeomMorpherController::GetData() const { - return data; -} - -void NiGeomMorpherController::SetData( const Ref<NiMorphData> & n ) { - data = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiGeomMorpherController.h b/NifExport/niflib/obj/NiGeomMorpherController.h deleted file mode 100755 index 503f49d..0000000 --- a/NifExport/niflib/obj/NiGeomMorpherController.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIGEOMMORPHERCONTROLLER_H_ -#define _NIGEOMMORPHERCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiMorphData; -class NiInterpolator; - -#include "../gen/obj_defines.h" - -class NiGeomMorpherController; -typedef Ref<NiGeomMorpherController> NiGeomMorpherControllerRef; - -/*! - * NiGeomMorpherController - Time controller for geometry morphing. - */ - -class NIFLIB_API NiGeomMorpherController : public NI_GEOM_MORPHER_CONTROLLER_PARENT { -public: - NiGeomMorpherController(); - ~NiGeomMorpherController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: lots of unknown data in this object - vector< Ref<NiInterpolator> > GetInterpolators() const; - void SetInterpolators( const vector< Ref<NiInterpolator> > & n ); - - Ref<NiMorphData> GetData() const; - void SetData( const Ref<NiMorphData> & n ); -protected: - NI_GEOM_MORPHER_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiGravity.cpp b/NifExport/niflib/obj/NiGravity.cpp deleted file mode 100755 index 491fae8..0000000 --- a/NifExport/niflib/obj/NiGravity.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiGravity.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiGravity::TYPE("NiGravity", &NI_GRAVITY_PARENT::TypeConst() ); - -NiGravity::NiGravity() NI_GRAVITY_CONSTRUCT {} - -NiGravity::~NiGravity() {} - -void NiGravity::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_GRAVITY_READ -} - -void NiGravity::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_GRAVITY_WRITE -} - -string NiGravity::asString( bool verbose ) const { - NI_GRAVITY_STRING -} - -void NiGravity::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_GRAVITY_FIXLINKS -} - -list<NiObjectRef> NiGravity::GetRefs() const { - NI_GRAVITY_GETREFS -} - -const Type & NiGravity::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiGravity.h b/NifExport/niflib/obj/NiGravity.h deleted file mode 100755 index 190a175..0000000 --- a/NifExport/niflib/obj/NiGravity.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIGRAVITY_H_ -#define _NIGRAVITY_H_ - -#include "AParticleModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiGravity; -typedef Ref<NiGravity> NiGravityRef; - -/*! - * NiGravity - A particle modifier; applies a gravitational field on the - * particles. - */ - -class NIFLIB_API NiGravity : public NI_GRAVITY_PARENT { -public: - NiGravity(); - ~NiGravity(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; -protected: - NI_GRAVITY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiIntegerExtraData.cpp b/NifExport/niflib/obj/NiIntegerExtraData.cpp deleted file mode 100755 index 7876cc1..0000000 --- a/NifExport/niflib/obj/NiIntegerExtraData.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiIntegerExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiIntegerExtraData::TYPE("NiIntegerExtraData", &NI_INTEGER_EXTRA_DATA_PARENT::TypeConst() ); - -NiIntegerExtraData::NiIntegerExtraData() NI_INTEGER_EXTRA_DATA_CONSTRUCT {} - -NiIntegerExtraData::~NiIntegerExtraData() {} - -void NiIntegerExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_INTEGER_EXTRA_DATA_READ -} - -void NiIntegerExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_INTEGER_EXTRA_DATA_WRITE -} - -string NiIntegerExtraData::asString( bool verbose ) const { - NI_INTEGER_EXTRA_DATA_STRING -} - -void NiIntegerExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_INTEGER_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiIntegerExtraData::GetRefs() const { - NI_INTEGER_EXTRA_DATA_GETREFS -} - -const Type & NiIntegerExtraData::GetType() const { - return TYPE; -}; - -uint NiIntegerExtraData::GetData() const { - return integerData; -} - -void NiIntegerExtraData::SetData( uint n ) { - integerData = n; -} diff --git a/NifExport/niflib/obj/NiIntegerExtraData.h b/NifExport/niflib/obj/NiIntegerExtraData.h deleted file mode 100755 index 5489096..0000000 --- a/NifExport/niflib/obj/NiIntegerExtraData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIINTEGEREXTRADATA_H_ -#define _NIINTEGEREXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiIntegerExtraData; -typedef Ref<NiIntegerExtraData> NiIntegerExtraDataRef; - -/*! - * NiIntegerExtraData - Extra integer data. - */ - -class NIFLIB_API NiIntegerExtraData : public NI_INTEGER_EXTRA_DATA_PARENT { -public: - NiIntegerExtraData(); - ~NiIntegerExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - uint GetData() const; - void SetData( uint n ); - -protected: - NI_INTEGER_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiIntegersExtraData.cpp b/NifExport/niflib/obj/NiIntegersExtraData.cpp deleted file mode 100755 index 555d0eb..0000000 --- a/NifExport/niflib/obj/NiIntegersExtraData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiIntegersExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiIntegersExtraData::TYPE("NiIntegersExtraData", &NI_INTEGERS_EXTRA_DATA_PARENT::TypeConst() ); - -NiIntegersExtraData::NiIntegersExtraData() NI_INTEGERS_EXTRA_DATA_CONSTRUCT {} - -NiIntegersExtraData::~NiIntegersExtraData() {} - -void NiIntegersExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_INTEGERS_EXTRA_DATA_READ -} - -void NiIntegersExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_INTEGERS_EXTRA_DATA_WRITE -} - -string NiIntegersExtraData::asString( bool verbose ) const { - NI_INTEGERS_EXTRA_DATA_STRING -} - -void NiIntegersExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_INTEGERS_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiIntegersExtraData::GetRefs() const { - NI_INTEGERS_EXTRA_DATA_GETREFS -} - -const Type & NiIntegersExtraData::GetType() const { - return TYPE; -}; - -vector<uint> NiIntegersExtraData::GetData() const { - return data; -}; - -void NiIntegersExtraData::SetData( const vector<uint> & n ) { - numIntegers = uint( n.size() ); - data = n; -}; \ No newline at end of file diff --git a/NifExport/niflib/obj/NiIntegersExtraData.h b/NifExport/niflib/obj/NiIntegersExtraData.h deleted file mode 100755 index 1a2cb6d..0000000 --- a/NifExport/niflib/obj/NiIntegersExtraData.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIINTEGERSEXTRADATA_H_ -#define _NIINTEGERSEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiIntegersExtraData; -typedef Ref<NiIntegersExtraData> NiIntegersExtraDataRef; - -/*! - * NiIntegersExtraData - Integers data. - */ - -class NIFLIB_API NiIntegersExtraData : public NI_INTEGERS_EXTRA_DATA_PARENT { -public: - NiIntegersExtraData(); - ~NiIntegersExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! - * Integers. - */ - vector<uint > GetData() const; - void SetData( const vector<uint >& value ); - -protected: - NI_INTEGERS_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiInterpolator.cpp b/NifExport/niflib/obj/NiInterpolator.cpp deleted file mode 100755 index a8cf80b..0000000 --- a/NifExport/niflib/obj/NiInterpolator.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiInterpolator::TYPE("NiInterpolator", &NI_INTERPOLATOR_PARENT::TypeConst() ); - -NiInterpolator::NiInterpolator() NI_INTERPOLATOR_CONSTRUCT {} - -NiInterpolator::~NiInterpolator() {} - -void NiInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_INTERPOLATOR_READ -} - -void NiInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_INTERPOLATOR_WRITE -} - -string NiInterpolator::asString( bool verbose ) const { - NI_INTERPOLATOR_STRING -} - -void NiInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiInterpolator::GetRefs() const { - NI_INTERPOLATOR_GETREFS -} - -const Type & NiInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiInterpolator.h b/NifExport/niflib/obj/NiInterpolator.h deleted file mode 100755 index b4ffd76..0000000 --- a/NifExport/niflib/obj/NiInterpolator.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIINTERPOLATOR_H_ -#define _NIINTERPOLATOR_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiInterpolator; -typedef Ref<NiInterpolator> NiInterpolatorRef; - -/*! - * NiInterpolator - Interpolator blocks - function unknown. - */ - -class NIFLIB_API NiInterpolator : public NI_INTERPOLATOR_PARENT { -public: - NiInterpolator(); - ~NiInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiKeyframeController.cpp b/NifExport/niflib/obj/NiKeyframeController.cpp deleted file mode 100755 index d079e6e..0000000 --- a/NifExport/niflib/obj/NiKeyframeController.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiKeyframeController.h" -#include "NiKeyframeData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiKeyframeController::TYPE("NiKeyframeController", &NI_KEYFRAME_CONTROLLER_PARENT::TypeConst() ); - -NiKeyframeController::NiKeyframeController() NI_KEYFRAME_CONTROLLER_CONSTRUCT {} - -NiKeyframeController::~NiKeyframeController() {} - -void NiKeyframeController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_KEYFRAME_CONTROLLER_READ -} - -void NiKeyframeController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_KEYFRAME_CONTROLLER_WRITE -} - -string NiKeyframeController::asString( bool verbose ) const { - NI_KEYFRAME_CONTROLLER_STRING -} - -void NiKeyframeController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_KEYFRAME_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiKeyframeController::GetRefs() const { - NI_KEYFRAME_CONTROLLER_GETREFS -} - -const Type & NiKeyframeController::GetType() const { - return TYPE; -}; - -Ref<NiKeyframeData> NiKeyframeController::GetData() const { - return data; -} - -void NiKeyframeController::SetData( const Ref<NiKeyframeData> & n ) { - data = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiKeyframeController.h b/NifExport/niflib/obj/NiKeyframeController.h deleted file mode 100755 index a0a8bd3..0000000 --- a/NifExport/niflib/obj/NiKeyframeController.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIKEYFRAMECONTROLLER_H_ -#define _NIKEYFRAMECONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiKeyframeData; - -#include "../gen/obj_defines.h" - -class NiKeyframeController; -typedef Ref<NiKeyframeController> NiKeyframeControllerRef; - -/*! - * NiKeyframeController - A time controller block for animation key - * frames. - */ - -class NIFLIB_API NiKeyframeController : public NI_KEYFRAME_CONTROLLER_PARENT { -public: - NiKeyframeController(); - ~NiKeyframeController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - Ref<NiKeyframeData> GetData() const; - void SetData( const Ref<NiKeyframeData> & n ); - -protected: - NI_KEYFRAME_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiKeyframeData.cpp b/NifExport/niflib/obj/NiKeyframeData.cpp deleted file mode 100755 index c042799..0000000 --- a/NifExport/niflib/obj/NiKeyframeData.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiKeyframeData.h" -#include "../gen/KeyGroup.h" -#include "../gen/KeyGroup.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiKeyframeData::TYPE("NiKeyframeData", &NI_KEYFRAME_DATA_PARENT::TypeConst() ); - -NiKeyframeData::NiKeyframeData() NI_KEYFRAME_DATA_CONSTRUCT {} - -NiKeyframeData::~NiKeyframeData() {} - -void NiKeyframeData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_KEYFRAME_DATA_READ -} - -void NiKeyframeData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_KEYFRAME_DATA_WRITE -} - -string NiKeyframeData::asString( bool verbose ) const { - NI_KEYFRAME_DATA_STRING -} - -void NiKeyframeData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_KEYFRAME_DATA_FIXLINKS -} - -list<NiObjectRef> NiKeyframeData::GetRefs() const { - NI_KEYFRAME_DATA_GETREFS -} - -const Type & NiKeyframeData::GetType() const { - return TYPE; -}; - -KeyType NiKeyframeData::GetRotateType() const { - return rotationType; -} - -void NiKeyframeData::SetRotateType( KeyType t ) { - rotationType = t; -} - -vector< Key<Quaternion> > NiKeyframeData::GetQuatRotateKeys() const { - return quaternionKeys; -} - -void NiKeyframeData::SetQuatRotateKeys( const vector< Key<Quaternion> > & keys ) { - quaternionKeys = keys; -} - -KeyType NiKeyframeData::GetXRotateType() const { - return xyzRotations[0].interpolation; -} - -void NiKeyframeData::SetXRotateType( KeyType t ) { - xyzRotations[0].interpolation = t; -} - -vector< Key<float> > NiKeyframeData::GetXRotateKeys() const { - return xyzRotations[0].keys; -} - -void NiKeyframeData::SetXRotateKeys( const vector< Key<float> > & keys ) { - xyzRotations[0].keys = keys; -} - -KeyType NiKeyframeData::GetYRotateType() const { - return xyzRotations[1].interpolation; -} - -void NiKeyframeData::SetYRotateType( KeyType t ) { - xyzRotations[1].interpolation = t; -} - -vector< Key<float> > NiKeyframeData::GetYRotateKeys() const { - return xyzRotations[1].keys; -} - -void NiKeyframeData::SetYRotateKeys( const vector< Key<float> > & keys ) { - xyzRotations[1].keys = keys; -} - -KeyType NiKeyframeData::GetZRotateType() const { - return xyzRotations[2].interpolation; -} - -void NiKeyframeData::SetZRotateType( KeyType t ) { - xyzRotations[2].interpolation = t; -} - -vector< Key<float> > NiKeyframeData::GetZRotateKeys() const { - return xyzRotations[2].keys; -} - -void NiKeyframeData::SetZRotateKeys( const vector< Key<float> > & keys ) { - xyzRotations[2].keys = keys; -} - -KeyType NiKeyframeData::GetTranslateType() const { - return translations.interpolation; -} - -void NiKeyframeData::SetTranslateType( KeyType t ) { - translations.interpolation = t; -} - -vector< Key<Vector3> > NiKeyframeData::GetTranslateKeys() const { - return translations.keys; -} - -void NiKeyframeData::SetTranslateKeys( vector< Key<Vector3> > const & keys ) { - translations.keys = keys; -} - -KeyType NiKeyframeData::GetScaleType() const { - return scales.interpolation; -} - -void NiKeyframeData::SetScaleType( KeyType t ) { - scales.interpolation = t; -} - -vector< Key<float> > NiKeyframeData::GetScaleKeys() const { - return scales.keys; -} - -void NiKeyframeData::SetScaleKeys( vector< Key<float> > const & keys ) { - scales.keys = keys; -} diff --git a/NifExport/niflib/obj/NiKeyframeData.h b/NifExport/niflib/obj/NiKeyframeData.h deleted file mode 100755 index 403b785..0000000 --- a/NifExport/niflib/obj/NiKeyframeData.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIKEYFRAMEDATA_H_ -#define _NIKEYFRAMEDATA_H_ - -#include "AKeyedData.h" -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiKeyframeData; -typedef Ref<NiKeyframeData> NiKeyframeDataRef; - -/*! - * NiKeyframeData - Keyframes for mesh animation. - */ - -class NIFLIB_API NiKeyframeData : public NI_KEYFRAME_DATA_PARENT { -public: - NiKeyframeData(); - ~NiKeyframeData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //--Rotate--// - - /*! Retrieves the type of rotation interpolation being used. - * \return The rotation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetRotateType - */ - KeyType GetRotateType() const; - - /*! Sets the type of rotation interpolation being used. Does not affect existing key data. - * \param t The new rotation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetRotateType - */ - void SetRotateType( KeyType t ); - - /*! Retrieves the quaternion rotation key data. - * \return A vector containing Key<Quaternion> data which specify rotation over time. - * \sa IKeyframeData::SetQuatRotateKeys, Key - */ - vector< Key<Quaternion> > GetQuatRotateKeys() const; - - /*! Sets the quaternion rotation key data. - * \param keys A vector containing new Key<Quaternion> data which will replace any existing data. - * \sa IKeyframeData::GetQuatRotateKeys, Key - */ - void SetQuatRotateKeys( const vector< Key<Quaternion> > & keys ); - - /*! Retrieves the type of x-rotation interpolation being used. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \return The x-rotation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetXRotateType - */ - KeyType GetXRotateType() const; - - /*! Sets the type of x-rotation interpolation being used. Does not affect existing key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \param t The new x-rotation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetXRotateType - */ - void SetXRotateType( KeyType t ); - - /*! Retrieves the x-rotation key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \return A vector containing Key<float> data which specify rotation over time in the x axis. - * \sa IKeyframeData::SetXRotateKeys, Key - */ - vector< Key<float> > GetXRotateKeys() const; - - /*! Sets the x-rotation key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa IKeyframeData::GetXRotateKeys, Key - */ - void SetXRotateKeys( const vector< Key<float> > & keys ); - - /*! Retrieves the type of y-rotation interpolation being used. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \return The y-rotation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetYRotateType - */ - KeyType GetYRotateType() const; - - /*! Sets the type of y-rotation interpolation being used. Does not affect existing key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \param t The new y-rotation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetYRotateType - */ - void SetYRotateType( KeyType t ); - - /*! Retrieves the y-rotation key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \return A vector containing Key<float> data which specify rotation over time in the y axis. - * \sa IKeyframeData::SetXRotateKeys, Key - */ - vector< Key<float> > GetYRotateKeys() const; - - /*! Sets the y-rotation key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEY. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa IKeyframeData::GetXRotateKeys, Key - */ - void SetYRotateKeys( const vector< Key<float> > & keys ); - - /*! Retrieves the type of z-rotation interpolation being used. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEZ. - * \return The z-rotation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetZRotateType - */ - KeyType GetZRotateType() const; - - /*! Sets the type of z-rotation interpolation being used. Does not affect existing key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEZ. - * \param t The new z-rotation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetZRotateType - */ - void SetZRotateType( KeyType t ); - - /*! Retrieves the z-rotation key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEZ. - * \return A vector containing Key<float> data which specify rotation over time in the z axis. - * \sa IKeyframeData::SetXRotateKeys, Key - */ - vector< Key<float> > GetZRotateKeys() const; - - /*! Sets the z-rotation key data. XYZ data is only used if rotation type is set to XYZ_ROTATION_KEZ. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa IKeyframeData::GetXRotateKeys, Key - */ - void SetZRotateKeys( const vector< Key<float> > & keys ); - - //--Translate--// - - /*! Retrieves the type of translation interpolation being used. - * \return The translation key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetTranslateType - */ - KeyType GetTranslateType() const; - - /*! Sets the type of translation interpolation being used. Does not affect existing key data. - * \param t The new translation key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetTranslateType - */ - void SetTranslateType( KeyType t ); - - /*! Retrieves the translation key data. - * \return A vector containing Key<Vector3> data which specify translation over time. - * \sa IKeyframeData::SetTranslateKeys, Key - */ - vector< Key<Vector3> > GetTranslateKeys() const; - - /*! Sets the translation key data. - * \param keys A vector containing new Key<Vector3> data which will replace any existing data. - * \sa IKeyframeData::GetTranslateKeys, Key - */ - void SetTranslateKeys( vector< Key<Vector3> > const & keys ); - - //--Scale--// - - /*! Retrieves the type of scale interpolation being used. - * \return The scale key type specifing the type of interpolation being used. - * \sa IKeyframeData::SetTranslateType - */ - KeyType GetScaleType() const; - - /*! Sets the type of scale interpolation being used. Does not affect existing key data. - * \param t The new scale key type specifing the type of interpolation to be used. - * \sa IKeyframeData::GetScaleType - */ - void SetScaleType( KeyType t ); - - /*! Retrieves the scale key data. - * \return A vector containing Key<float> data which specify scale over time. - * \sa IKeyframeData::SetScaleKeys, Key - */ - vector< Key<float> > GetScaleKeys() const; - - /*! Sets the scale key data. - * \param keys A vector containing new Key<float> data which will replace any existing data. - * \sa IKeyframeData::GetScaleKeys, Key - */ - void SetScaleKeys( vector< Key<float> > const & keys ); - -protected: - NI_KEYFRAME_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiLODNode.cpp b/NifExport/niflib/obj/NiLODNode.cpp deleted file mode 100755 index 31ce01b..0000000 --- a/NifExport/niflib/obj/NiLODNode.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiLODNode.h" -#include "../gen/LODRange.h" -#include "NiRangeLODData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiLODNode::TYPE("NiLODNode", &NI_L_O_D_NODE_PARENT::TypeConst() ); - -NiLODNode::NiLODNode() NI_L_O_D_NODE_CONSTRUCT {} - -NiLODNode::~NiLODNode() {} - -void NiLODNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_L_O_D_NODE_READ -} - -void NiLODNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_L_O_D_NODE_WRITE -} - -string NiLODNode::asString( bool verbose ) const { - NI_L_O_D_NODE_STRING -} - -void NiLODNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_L_O_D_NODE_FIXLINKS -} - -list<NiObjectRef> NiLODNode::GetRefs() const { - NI_L_O_D_NODE_GETREFS -} - -const Type & NiLODNode::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiLODNode.h b/NifExport/niflib/obj/NiLODNode.h deleted file mode 100755 index bdca695..0000000 --- a/NifExport/niflib/obj/NiLODNode.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NILODNODE_H_ -#define _NILODNODE_H_ - -#include "NiNode.h" - -// Include structures -#include "../gen/LODRange.h" -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiRangeLODData; - -#include "../gen/obj_defines.h" - -class NiLODNode; -typedef Ref<NiLODNode> NiLODNodeRef; - -/*! - * NiLODNode - Level of detail selector. Links to different levels of - * detail of the same model, used to switch a geometry at a specified - * distance. - */ - -class NIFLIB_API NiLODNode : public NI_L_O_D_NODE_PARENT { -public: - NiLODNode(); - ~NiLODNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_L_O_D_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiLight.cpp b/NifExport/niflib/obj/NiLight.cpp deleted file mode 100755 index 012fe66..0000000 --- a/NifExport/niflib/obj/NiLight.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiLight.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiLight::TYPE("NiLight", &NI_LIGHT_PARENT::TypeConst() ); - -NiLight::NiLight() NI_LIGHT_CONSTRUCT {} - -NiLight::~NiLight() {} - -void NiLight::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LIGHT_READ -} - -void NiLight::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_LIGHT_WRITE -} - -string NiLight::asString( bool verbose ) const { - NI_LIGHT_STRING -} - -void NiLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LIGHT_FIXLINKS -} - -list<NiObjectRef> NiLight::GetRefs() const { - NI_LIGHT_GETREFS -} - -const Type & NiLight::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiLight.h b/NifExport/niflib/obj/NiLight.h deleted file mode 100755 index 49da5ba..0000000 --- a/NifExport/niflib/obj/NiLight.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NILIGHT_H_ -#define _NILIGHT_H_ - -#include "NiDynamicEffect.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiLight; -typedef Ref<NiLight> NiLightRef; - -/*! - * NiLight - Light source. - */ - -class NIFLIB_API NiLight : public NI_LIGHT_PARENT { -public: - NiLight(); - ~NiLight(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_LIGHT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiLightColorController.cpp b/NifExport/niflib/obj/NiLightColorController.cpp deleted file mode 100755 index 891c474..0000000 --- a/NifExport/niflib/obj/NiLightColorController.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiLightColorController.h" -#include "NiPosData.h" -#include "NiPoint3Interpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiLightColorController::TYPE("NiLightColorController", &NI_LIGHT_COLOR_CONTROLLER_PARENT::TypeConst() ); - -NiLightColorController::NiLightColorController() NI_LIGHT_COLOR_CONTROLLER_CONSTRUCT {} - -NiLightColorController::~NiLightColorController() {} - -void NiLightColorController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LIGHT_COLOR_CONTROLLER_READ -} - -void NiLightColorController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_LIGHT_COLOR_CONTROLLER_WRITE -} - -string NiLightColorController::asString( bool verbose ) const { - NI_LIGHT_COLOR_CONTROLLER_STRING -} - -void NiLightColorController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LIGHT_COLOR_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiLightColorController::GetRefs() const { - NI_LIGHT_COLOR_CONTROLLER_GETREFS -} - -const Type & NiLightColorController::GetType() const { - return TYPE; -}; - -Ref<NiPoint3Interpolator> NiLightColorController::GetInterpolator() const { - return interpolator; -} - -void NiLightColorController::SetInterpolator( const Ref<NiPoint3Interpolator> & n ) { - interpolator = n; -} - -Ref<NiPosData> NiLightColorController::GetData() const { - return data; -} - -void NiLightColorController::SetData( const Ref<NiPosData> & n ) { - data = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiLightColorController.h b/NifExport/niflib/obj/NiLightColorController.h deleted file mode 100755 index 151ca96..0000000 --- a/NifExport/niflib/obj/NiLightColorController.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NILIGHTCOLORCONTROLLER_H_ -#define _NILIGHTCOLORCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPosData; -class NiPoint3Interpolator; - -#include "../gen/obj_defines.h" - -class NiLightColorController; -typedef Ref<NiLightColorController> NiLightColorControllerRef; - -/*! - * NiLightColorController - Light color animation controller. - */ - -class NIFLIB_API NiLightColorController : public NI_LIGHT_COLOR_CONTROLLER_PARENT { -public: - NiLightColorController(); - ~NiLightColorController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - //TODO: There is an item of unknown data in this class - - Ref<NiPoint3Interpolator> GetInterpolator() const; - void SetInterpolator( const Ref<NiPoint3Interpolator> & n ); - - Ref<NiPosData> GetData() const; - void SetData( const Ref<NiPosData> & n ); - -protected: - NI_LIGHT_COLOR_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiLightDimmerController.cpp b/NifExport/niflib/obj/NiLightDimmerController.cpp deleted file mode 100755 index b6bbf7e..0000000 --- a/NifExport/niflib/obj/NiLightDimmerController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiLightDimmerController.h" -#include "NiInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiLightDimmerController::TYPE("NiLightDimmerController", &NI_LIGHT_DIMMER_CONTROLLER_PARENT::TypeConst() ); - -NiLightDimmerController::NiLightDimmerController() NI_LIGHT_DIMMER_CONTROLLER_CONSTRUCT {} - -NiLightDimmerController::~NiLightDimmerController() {} - -void NiLightDimmerController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LIGHT_DIMMER_CONTROLLER_READ -} - -void NiLightDimmerController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_LIGHT_DIMMER_CONTROLLER_WRITE -} - -string NiLightDimmerController::asString( bool verbose ) const { - NI_LIGHT_DIMMER_CONTROLLER_STRING -} - -void NiLightDimmerController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LIGHT_DIMMER_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiLightDimmerController::GetRefs() const { - NI_LIGHT_DIMMER_CONTROLLER_GETREFS -} - -const Type & NiLightDimmerController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiLightDimmerController.h b/NifExport/niflib/obj/NiLightDimmerController.h deleted file mode 100755 index 5c352c0..0000000 --- a/NifExport/niflib/obj/NiLightDimmerController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NILIGHTDIMMERCONTROLLER_H_ -#define _NILIGHTDIMMERCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiInterpolator; - -#include "../gen/obj_defines.h" - -class NiLightDimmerController; -typedef Ref<NiLightDimmerController> NiLightDimmerControllerRef; - -/*! - * NiLightDimmerController - Unknown controller. - */ - -class NIFLIB_API NiLightDimmerController : public NI_LIGHT_DIMMER_CONTROLLER_PARENT { -public: - NiLightDimmerController(); - ~NiLightDimmerController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_LIGHT_DIMMER_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiLookAtController.cpp b/NifExport/niflib/obj/NiLookAtController.cpp deleted file mode 100755 index 81cc4d7..0000000 --- a/NifExport/niflib/obj/NiLookAtController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiLookAtController.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiLookAtController::TYPE("NiLookAtController", &NI_LOOK_AT_CONTROLLER_PARENT::TypeConst() ); - -NiLookAtController::NiLookAtController() NI_LOOK_AT_CONTROLLER_CONSTRUCT {} - -NiLookAtController::~NiLookAtController() {} - -void NiLookAtController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LOOK_AT_CONTROLLER_READ -} - -void NiLookAtController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_LOOK_AT_CONTROLLER_WRITE -} - -string NiLookAtController::asString( bool verbose ) const { - NI_LOOK_AT_CONTROLLER_STRING -} - -void NiLookAtController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LOOK_AT_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiLookAtController::GetRefs() const { - NI_LOOK_AT_CONTROLLER_GETREFS -} - -const Type & NiLookAtController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiLookAtController.h b/NifExport/niflib/obj/NiLookAtController.h deleted file mode 100755 index 0e4bd62..0000000 --- a/NifExport/niflib/obj/NiLookAtController.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NILOOKATCONTROLLER_H_ -#define _NILOOKATCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiLookAtController; -typedef Ref<NiLookAtController> NiLookAtControllerRef; - -/*! - * NiLookAtController - Unknown. Start time is 3.4e+38 and stop time is - * -3.4e+38. - */ - -class NIFLIB_API NiLookAtController : public NI_LOOK_AT_CONTROLLER_PARENT { -public: - NiLookAtController(); - ~NiLookAtController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_LOOK_AT_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiLookAtInterpolator.cpp b/NifExport/niflib/obj/NiLookAtInterpolator.cpp deleted file mode 100755 index 06d2662..0000000 --- a/NifExport/niflib/obj/NiLookAtInterpolator.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiLookAtInterpolator.h" -#include "NiNode.h" -#include "NiPoint3Interpolator.h" -#include "NiFloatInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiLookAtInterpolator::TYPE("NiLookAtInterpolator", &NI_LOOK_AT_INTERPOLATOR_PARENT::TypeConst() ); - -NiLookAtInterpolator::NiLookAtInterpolator() NI_LOOK_AT_INTERPOLATOR_CONSTRUCT {} - -NiLookAtInterpolator::~NiLookAtInterpolator() {} - -void NiLookAtInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LOOK_AT_INTERPOLATOR_READ -} - -void NiLookAtInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_LOOK_AT_INTERPOLATOR_WRITE -} - -string NiLookAtInterpolator::asString( bool verbose ) const { - NI_LOOK_AT_INTERPOLATOR_STRING -} - -void NiLookAtInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_LOOK_AT_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiLookAtInterpolator::GetRefs() const { - NI_LOOK_AT_INTERPOLATOR_GETREFS -} - -const Type & NiLookAtInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiLookAtInterpolator.h b/NifExport/niflib/obj/NiLookAtInterpolator.h deleted file mode 100755 index ff502ea..0000000 --- a/NifExport/niflib/obj/NiLookAtInterpolator.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NILOOKATINTERPOLATOR_H_ -#define _NILOOKATINTERPOLATOR_H_ - -#include "NiInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; -class NiPoint3Interpolator; -class NiFloatInterpolator; - -#include "../gen/obj_defines.h" - -class NiLookAtInterpolator; -typedef Ref<NiLookAtInterpolator> NiLookAtInterpolatorRef; - -/*! - * NiLookAtInterpolator - Unknown. - */ - -class NIFLIB_API NiLookAtInterpolator : public NI_LOOK_AT_INTERPOLATOR_PARENT { -public: - NiLookAtInterpolator(); - ~NiLookAtInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_LOOK_AT_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiMaterialColorController.cpp b/NifExport/niflib/obj/NiMaterialColorController.cpp deleted file mode 100755 index 67c0027..0000000 --- a/NifExport/niflib/obj/NiMaterialColorController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiMaterialColorController.h" -#include "NiPosData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiMaterialColorController::TYPE("NiMaterialColorController", &NI_MATERIAL_COLOR_CONTROLLER_PARENT::TypeConst() ); - -NiMaterialColorController::NiMaterialColorController() NI_MATERIAL_COLOR_CONTROLLER_CONSTRUCT {} - -NiMaterialColorController::~NiMaterialColorController() {} - -void NiMaterialColorController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MATERIAL_COLOR_CONTROLLER_READ -} - -void NiMaterialColorController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_MATERIAL_COLOR_CONTROLLER_WRITE -} - -string NiMaterialColorController::asString( bool verbose ) const { - NI_MATERIAL_COLOR_CONTROLLER_STRING -} - -void NiMaterialColorController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MATERIAL_COLOR_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiMaterialColorController::GetRefs() const { - NI_MATERIAL_COLOR_CONTROLLER_GETREFS -} - -const Type & NiMaterialColorController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiMaterialColorController.h b/NifExport/niflib/obj/NiMaterialColorController.h deleted file mode 100755 index 99fcd03..0000000 --- a/NifExport/niflib/obj/NiMaterialColorController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIMATERIALCOLORCONTROLLER_H_ -#define _NIMATERIALCOLORCONTROLLER_H_ - -#include "NiSingleInterpolatorController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPosData; - -#include "../gen/obj_defines.h" - -class NiMaterialColorController; -typedef Ref<NiMaterialColorController> NiMaterialColorControllerRef; - -/*! - * NiMaterialColorController - Time controller for material color. - */ - -class NIFLIB_API NiMaterialColorController : public NI_MATERIAL_COLOR_CONTROLLER_PARENT { -public: - NiMaterialColorController(); - ~NiMaterialColorController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_MATERIAL_COLOR_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiMaterialProperty.cpp b/NifExport/niflib/obj/NiMaterialProperty.cpp deleted file mode 100755 index 96d3ab4..0000000 --- a/NifExport/niflib/obj/NiMaterialProperty.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiMaterialProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiMaterialProperty::TYPE("NiMaterialProperty", &NI_MATERIAL_PROPERTY_PARENT::TypeConst() ); - -NiMaterialProperty::NiMaterialProperty() NI_MATERIAL_PROPERTY_CONSTRUCT {} - -NiMaterialProperty::~NiMaterialProperty() {} - -void NiMaterialProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MATERIAL_PROPERTY_READ -} - -void NiMaterialProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_MATERIAL_PROPERTY_WRITE -} - -string NiMaterialProperty::asString( bool verbose ) const { - NI_MATERIAL_PROPERTY_STRING -} - -void NiMaterialProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MATERIAL_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiMaterialProperty::GetRefs() const { - NI_MATERIAL_PROPERTY_GETREFS -} - -const Type & NiMaterialProperty::GetType() const { - return TYPE; -}; - -ushort NiMaterialProperty::GetFlags() const { - return flags; -} - -void NiMaterialProperty::SetFlags( ushort n ) { - flags = n; -} - -float NiMaterialProperty::GetTransparency() const { - return alpha; -} - -void NiMaterialProperty::SetTransparency( float n ) { - alpha = n; -} - -float NiMaterialProperty::GetGlossiness() const { - return glossiness; -} - -void NiMaterialProperty::SetGlossiness( float n ) { - glossiness = n; -} - -Color3 NiMaterialProperty::GetAmbientColor() const { - return ambientColor; -} - -void NiMaterialProperty::SetAmbientColor( const Color3 & n ) { - ambientColor = n; -} - -Color3 NiMaterialProperty::GetDiffuseColor() const { - return diffuseColor; -} - -void NiMaterialProperty::SetDiffuseColor( const Color3 & n ) { - diffuseColor = n; -} - -Color3 NiMaterialProperty::GetEmissiveColor() const { - return emissiveColor; -} - -void NiMaterialProperty::SetEmissiveColor( const Color3 & n ) { - emissiveColor = n; -} - -Color3 NiMaterialProperty::GetSpecularColor() const { - return specularColor; -} - -void NiMaterialProperty::SetSpecularColor( const Color3 & n ) { - specularColor = n; -} diff --git a/NifExport/niflib/obj/NiMaterialProperty.h b/NifExport/niflib/obj/NiMaterialProperty.h deleted file mode 100755 index 0ca66c1..0000000 --- a/NifExport/niflib/obj/NiMaterialProperty.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIMATERIALPROPERTY_H_ -#define _NIMATERIALPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiMaterialProperty; -typedef Ref<NiMaterialProperty> NiMaterialPropertyRef; - -/*! - * NiMaterialProperty - Describes the material shading properties. - */ - -class NIFLIB_API NiMaterialProperty : public NI_MATERIAL_PROPERTY_PARENT { -public: - NiMaterialProperty(); - ~NiMaterialProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags( ushort n ); - - float GetTransparency() const; - void SetTransparency( float n ); - - float GetGlossiness() const; - void SetGlossiness( float n ); - - Color3 GetAmbientColor() const; - void SetAmbientColor( const Color3 & n ); - - Color3 GetDiffuseColor() const; - void SetDiffuseColor( const Color3 & n ); - - Color3 GetEmissiveColor() const; - void SetEmissiveColor( const Color3 & n ); - - Color3 GetSpecularColor() const; - void SetSpecularColor( const Color3 & n ); - - -protected: - NI_MATERIAL_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiMeshPSysData.cpp b/NifExport/niflib/obj/NiMeshPSysData.cpp deleted file mode 100755 index e907c48..0000000 --- a/NifExport/niflib/obj/NiMeshPSysData.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiMeshPSysData.h" -#include "NiPSysModifier.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiMeshPSysData::TYPE("NiMeshPSysData", &NI_MESH_P_SYS_DATA_PARENT::TypeConst() ); - -NiMeshPSysData::NiMeshPSysData() NI_MESH_P_SYS_DATA_CONSTRUCT {} - -NiMeshPSysData::~NiMeshPSysData() {} - -void NiMeshPSysData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MESH_P_SYS_DATA_READ -} - -void NiMeshPSysData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_MESH_P_SYS_DATA_WRITE -} - -string NiMeshPSysData::asString( bool verbose ) const { - NI_MESH_P_SYS_DATA_STRING -} - -void NiMeshPSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MESH_P_SYS_DATA_FIXLINKS -} - -list<NiObjectRef> NiMeshPSysData::GetRefs() const { - NI_MESH_P_SYS_DATA_GETREFS -} - -const Type & NiMeshPSysData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiMeshPSysData.h b/NifExport/niflib/obj/NiMeshPSysData.h deleted file mode 100755 index 9d0e14f..0000000 --- a/NifExport/niflib/obj/NiMeshPSysData.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIMESHPSYSDATA_H_ -#define _NIMESHPSYSDATA_H_ - -#include "APSysData.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPSysModifier; -class NiNode; - -#include "../gen/obj_defines.h" - -class NiMeshPSysData; -typedef Ref<NiMeshPSysData> NiMeshPSysDataRef; - -/*! - * NiMeshPSysData - Particle meshes data. - */ - -class NIFLIB_API NiMeshPSysData : public NI_MESH_P_SYS_DATA_PARENT { -public: - NiMeshPSysData(); - ~NiMeshPSysData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_MESH_P_SYS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiMeshParticleSystem.cpp b/NifExport/niflib/obj/NiMeshParticleSystem.cpp deleted file mode 100755 index 25862bc..0000000 --- a/NifExport/niflib/obj/NiMeshParticleSystem.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiMeshParticleSystem.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiMeshParticleSystem::TYPE("NiMeshParticleSystem", &NI_MESH_PARTICLE_SYSTEM_PARENT::TypeConst() ); - -NiMeshParticleSystem::NiMeshParticleSystem() NI_MESH_PARTICLE_SYSTEM_CONSTRUCT {} - -NiMeshParticleSystem::~NiMeshParticleSystem() {} - -void NiMeshParticleSystem::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MESH_PARTICLE_SYSTEM_READ -} - -void NiMeshParticleSystem::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_MESH_PARTICLE_SYSTEM_WRITE -} - -string NiMeshParticleSystem::asString( bool verbose ) const { - NI_MESH_PARTICLE_SYSTEM_STRING -} - -void NiMeshParticleSystem::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MESH_PARTICLE_SYSTEM_FIXLINKS -} - -list<NiObjectRef> NiMeshParticleSystem::GetRefs() const { - NI_MESH_PARTICLE_SYSTEM_GETREFS -} - -const Type & NiMeshParticleSystem::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiMeshParticleSystem.h b/NifExport/niflib/obj/NiMeshParticleSystem.h deleted file mode 100755 index 230bab7..0000000 --- a/NifExport/niflib/obj/NiMeshParticleSystem.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIMESHPARTICLESYSTEM_H_ -#define _NIMESHPARTICLESYSTEM_H_ - -#include "NiParticleSystem.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiMeshParticleSystem; -typedef Ref<NiMeshParticleSystem> NiMeshParticleSystemRef; - -/*! - * NiMeshParticleSystem - Particle system. - */ - -class NIFLIB_API NiMeshParticleSystem : public NI_MESH_PARTICLE_SYSTEM_PARENT { -public: - NiMeshParticleSystem(); - ~NiMeshParticleSystem(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_MESH_PARTICLE_SYSTEM_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiMorphData.cpp b/NifExport/niflib/obj/NiMorphData.cpp deleted file mode 100755 index 4a762dd..0000000 --- a/NifExport/niflib/obj/NiMorphData.cpp +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiMorphData.h" -#include "../gen/Morph.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiMorphData::TYPE("NiMorphData", &NI_MORPH_DATA_PARENT::TypeConst() ); - -NiMorphData::NiMorphData() NI_MORPH_DATA_CONSTRUCT {} - -NiMorphData::~NiMorphData() {} - -void NiMorphData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MORPH_DATA_READ -} - -void NiMorphData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_MORPH_DATA_WRITE -} - -string NiMorphData::asString( bool verbose ) const { - NI_MORPH_DATA_STRING -} - -void NiMorphData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MORPH_DATA_FIXLINKS -} - -list<NiObjectRef> NiMorphData::GetRefs() const { - NI_MORPH_DATA_GETREFS -} - -const Type & NiMorphData::GetType() const { - return TYPE; -}; - -int NiMorphData::GetVertexCount() const { - - return numVertices; -} - -void NiMorphData::SetVertexCount( int n ) { - numVertices = n; - for ( uint i = 0; i < morphs.size(); ++i ) { - morphs[i].vectors.resize( n ); - } -} - -int NiMorphData::GetMorphCount() const { - return int(morphs.size()); -} - -void NiMorphData::SetMorphCount( int n ) { - uint old_size = uint(morphs.size()); - morphs.resize( n ); - - //Make sure any new vertex groups are the right size - for (uint i = old_size; i < morphs.size(); ++i ) { - morphs[i].vectors.resize( numVertices ); - } -} - -KeyType NiMorphData::GetMorphKeyType( int n ) const { - return morphs[n].morphInterpolation; -} - -void NiMorphData::SetMorphKeyType( int n, KeyType t ) { - morphs[n].morphInterpolation = t; -} - -vector< Key<float> > NiMorphData::GetMorphKeys( int n ) const { - return morphs[n].morphKeys; -} - -void NiMorphData::SetMorphKeys( int n, vector< Key<float> > const & keys ) { - morphs[n].morphKeys = keys; -} - -vector<Vector3> NiMorphData::GetMorphVerts( int n) const { - return morphs[n].vectors; -} - -void NiMorphData::SetMorphVerts( int n, const vector<Vector3> & in ) { - // Make sure the size of the incoming vector equal vertCount - if ( in.size() != numVertices ) - throw runtime_error("Input array size must equal Vertex Count. Call SetVertexCount() to resize."); - - //It's the right size, so go ahead and set it - morphs[n].vectors = in; -} diff --git a/NifExport/niflib/obj/NiMorphData.h b/NifExport/niflib/obj/NiMorphData.h deleted file mode 100755 index 32f4fa7..0000000 --- a/NifExport/niflib/obj/NiMorphData.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIMORPHDATA_H_ -#define _NIMORPHDATA_H_ - -#include "NiObject.h" -// Include structures -#include "../gen/Morph.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiMorphData; -typedef Ref<NiMorphData> NiMorphDataRef; - -/*! - * NiMorphData - Geometry morphing data. - */ - -class NIFLIB_API NiMorphData : public NI_MORPH_DATA_PARENT { -public: - NiMorphData(); - ~NiMorphData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the number of verticies used in the morph targets. This must be the same as the number of verticies in the base mesh that the morph controller for which this block stores data is attatched. This is not done automatically by Niflib. - * \return The number of vertices used in the morph target meshes. - * \sa NiMorphData::SetVertexCount - */ - int GetVertexCount() const; - - /*! Sets the number of verticies used in the morph targets. This must be the same as the number of verticies in the base mesh that the morph controller for which this block stores data is attatched. This is not done automatically by Niflib. If the new size is smaller, vertices at the ends of the morph targets will be lost. - * \param n The new size of the morph target's vertex arrays. - * \sa NiMorphData::GetVertexCount - */ - void SetVertexCount( int n ); - - /*! Retrieves the number of morph targets used by this morph controller data. - * \return The number of morph targets used by this morph controller data. - * \sa NiMorphData::SetMorphCount - */ - int GetMorphCount() const; - - /*! Resizes the morph target array used by this morph controller data. If the new size is smaller, morph targets at the end of the array and all associated data will be lost. - * \param n The new size of the morph target array. - * \sa NiMorphData::GetMorphCount - */ - void SetMorphCount( int n ); - - /*! Retrieves the type of morph interpolation being used by a specific morph target. - * \param n The index of the morph to get the interpolation key type from. A zero-based positive value which must be less than that returned by IMoprhData::GetMorphCount. - * \return The morph key type specifing the type of interpolation being used by the specified morph target. - * \sa NiMorphData::SetMorphKeyType - */ - KeyType GetMorphKeyType( int n ) const; - - /*! Sets the type of morph interpolation being used by a specific morph target. Does not affect existing key data. - * \param n The index of the morph to get the interpolation key type from. A zero-based positive value which must be less than that returned by IMoprhData::GetMorphCount. - * \param t The new morph key type specifing the type of interpolation to be used by the specified morph target. - * \sa NiMorphData::GetMorphKeyType - */ - void SetMorphKeyType( int n, KeyType t ); - - /*! Retrieves the morph key data for a specified morph target. - * \return A vector containing Key<float> data which specify the influence of this morph target over time. - * \sa NiMorphData::SetMorphKeys, Key - */ - vector< Key<float> > GetMorphKeys( int n ) const; - - /*! Sets the morph key data. - * \param n The index of the morph target to set the keys for. - * \param keys A vector containing new Key<float> data which will replace any existing data for this morph target. - * \sa NiMorphData::GetMorphKeys, Key - */ - void SetMorphKeys( int n, vector< Key<float> > const & keys ); - - /*! Retrieves the vertex data from the specified morph target - * \param n The index of the morph target to retrieve vertex data for. This is a zero-based index whoes value that must be less than that returned by NiMorphData::GetMorphCount. - * \return A vector containing the vertices used by this morph target. The size will be equal to the value returned by NiMorphData::GetVertexCount. - * \sa NiMorphData::SetMorphVerts - */ - vector<Vector3> GetMorphVerts( int n) const; - - /*! Sets the vertex data for a specified morph target - * \param n The index of the morph target to set vertex data for. This is a zero-based index whoes value that must be less than that returned by NiMorphData::GetMorphCount. - * \param in A vector containing the new vertices to be used by this morph target. The size will be equal to the value returned by NiMorphData::GetVertexCount. - * \sa NiMorphData::SetMorphVerts - */ - void SetMorphVerts( int n, const vector<Vector3> & in ); - -protected: - NI_MORPH_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiMultiTargetTransformController.cpp b/NifExport/niflib/obj/NiMultiTargetTransformController.cpp deleted file mode 100755 index ba57b9c..0000000 --- a/NifExport/niflib/obj/NiMultiTargetTransformController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiMultiTargetTransformController.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiMultiTargetTransformController::TYPE("NiMultiTargetTransformController", &NI_MULTI_TARGET_TRANSFORM_CONTROLLER_PARENT::TypeConst() ); - -NiMultiTargetTransformController::NiMultiTargetTransformController() NI_MULTI_TARGET_TRANSFORM_CONTROLLER_CONSTRUCT {} - -NiMultiTargetTransformController::~NiMultiTargetTransformController() {} - -void NiMultiTargetTransformController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MULTI_TARGET_TRANSFORM_CONTROLLER_READ -} - -void NiMultiTargetTransformController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_MULTI_TARGET_TRANSFORM_CONTROLLER_WRITE -} - -string NiMultiTargetTransformController::asString( bool verbose ) const { - NI_MULTI_TARGET_TRANSFORM_CONTROLLER_STRING -} - -void NiMultiTargetTransformController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_MULTI_TARGET_TRANSFORM_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiMultiTargetTransformController::GetRefs() const { - NI_MULTI_TARGET_TRANSFORM_CONTROLLER_GETREFS -} - -const Type & NiMultiTargetTransformController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiMultiTargetTransformController.h b/NifExport/niflib/obj/NiMultiTargetTransformController.h deleted file mode 100755 index 69e5ccb..0000000 --- a/NifExport/niflib/obj/NiMultiTargetTransformController.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIMULTITARGETTRANSFORMCONTROLLER_H_ -#define _NIMULTITARGETTRANSFORMCONTROLLER_H_ - -#include "NiTimeController.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiMultiTargetTransformController; -typedef Ref<NiMultiTargetTransformController> NiMultiTargetTransformControllerRef; - -/*! - * NiMultiTargetTransformController - Unknown. - */ - -class NIFLIB_API NiMultiTargetTransformController : public NI_MULTI_TARGET_TRANSFORM_CONTROLLER_PARENT { -public: - NiMultiTargetTransformController(); - ~NiMultiTargetTransformController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_MULTI_TARGET_TRANSFORM_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiNode.cpp b/NifExport/niflib/obj/NiNode.cpp deleted file mode 100755 index 1b0bfad..0000000 --- a/NifExport/niflib/obj/NiNode.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiNode.h" -#include "NiAVObject.h" -#include "NiDynamicEffect.h" -#include "NiSkinInstance.h" -#include "NiSkinData.h" -#include "NiTriBasedGeom.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiNode::TYPE("NiNode", &NI_NODE_PARENT::TypeConst() ); - -NiNode::NiNode() NI_NODE_CONSTRUCT {} - -NiNode::~NiNode() { - //Clear Children - ClearChildren(); - - //Unbind any attached skins - for ( list<NiSkinInstance*>::iterator it = skins.begin(); it != skins.end(); ++it ) { - (*it)->SkeletonLost(); - } -} - -void NiNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_NODE_READ -} - -void NiNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_NODE_WRITE -} - -string NiNode::asString( bool verbose ) const { - NI_NODE_STRING -} - -void NiNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_NODE_FIXLINKS - //Connect children to their parents and remove any NULL ones - for ( vector< NiAVObjectRef >::iterator it = children.begin(); it != children.end(); ) { - if ( *it == NULL) { - it = children.erase( it ); - } else { - (*it)->SetParent(this); - ++it; - } - } -} - -list<NiObjectRef> NiNode::GetRefs() const { - NI_NODE_GETREFS -} - -const Type & NiNode::GetType() const { - return TYPE; -}; - -void NiNode::AddChild( Ref<NiAVObject> obj ) { - if ( obj->GetParent() != NULL ) { - throw runtime_error( "You have attempted to add a child to a NiNode which already is the child of another NiNode." ); - } - obj->SetParent( this ); - children.push_back( obj ); -} - -void NiNode::RemoveChild( Ref<NiAVObject> obj ) { - //Search child list for the one to remove - for ( vector< NiAVObjectRef >::iterator it = children.begin(); it != children.end(); ) { - if ( *it == obj ) { - //Ensure that this child is not a skin influence - NiNodeRef niNode = DynamicCast<NiNode>((*it)); - if ( niNode != NULL && niNode->IsSkinInfluence() == true ) { - throw runtime_error("You cannot remove a node child that is a skin influence. Detatch the skin first."); - } - (*it)->SetParent(NULL); - it = children.erase( it ); - } else { - ++it; - } - } -} - -void NiNode::ClearChildren() { - for ( vector< NiAVObjectRef >::iterator it = children.begin(); it != children.end(); ++it) { - if (*it) (*it)->SetParent(NULL); - } - children.clear(); -} - -vector< Ref<NiAVObject> > NiNode::GetChildren() const { - return children; -} - - -void NiNode::AddEffect( Ref<NiDynamicEffect> obj ) { - obj->SetParent( this ); - effects.push_back( obj ); -} - -void NiNode::RemoveEffect( Ref<NiDynamicEffect> obj ) { - //Search Effect list for the one to remove - for ( vector< NiDynamicEffectRef >::iterator it = effects.begin(); it != effects.end(); ) { - if ( *it == obj ) { - (*it)->SetParent(NULL); - it = effects.erase( it ); - } else { - ++it; - } - } -} - -void NiNode::ClearEffects() { - for ( vector< NiDynamicEffectRef >::iterator it = effects.begin(); it != effects.end(); ++it) { - if (*it) (*it)->SetParent(NULL); - } - effects.clear(); -} - -vector< Ref<NiDynamicEffect> > NiNode::GetEffects() const { - return effects; -} - -bool NiNode::IsSkeletonRoot() const { - return ( skins.size() > 0 ); -} - -bool NiNode::IsSkinInfluence() const { - return ((flags & 8) == 0); -} - -void NiNode::AddSkin( NiSkinInstance * skin_inst ) { - skins.push_back( skin_inst ); -} - -void NiNode::RemoveSkin( NiSkinInstance * skin_inst ) { - //Unflag any bones that were part of this skin instance - vector<NiNodeRef> bones = skin_inst->GetBones(); - for ( uint i = 0; i < bones.size(); ++i ) { - bones[i]->SetSkinFlag(false); - } - - //Remove the reference - skins.remove( skin_inst); - - //Ensure that any multiply referenced bone nodes still - //have their skin flag set - for ( list<NiSkinInstance*>::iterator it = skins.begin(); it != skins.end(); ++it ) { - bones = (*it)->GetBones(); - for ( uint i = 0; i < bones.size(); ++i ) { - bones[i]->SetSkinFlag(true); - } - } -} - -void NiNode::SetSkinFlag( bool n ) { - if ( IsSkinInfluence() == n ) { - //Already set to the requested value - return; - } else { - //Requested value is different, flip bit - flags ^= 8; - } -} - -void NiNode::GoToSkeletonBindPosition() { - //map<NiNodeRef, Matrix44> world_positions; - - //Loop through all attached skins, straightening the skeleton on each - for ( list<NiSkinInstance*>::iterator it = skins.begin(); it != skins.end(); ++it ) { - //Get Bone list and Skin Data - vector<NiNodeRef> bones = (*it)->GetBones(); - NiSkinDataRef skin_data = (*it)->GetSkinData(); - - if ( skin_data == NULL ) { - //There's no skin data for this skin instance; skip it. - continue; - } - - //Get bone data from NiSkinData class - vector<SkinData> bone_data = skin_data->GetBoneData(); - - //Make sure the counts match - if ( bones.size() != bone_data.size() ) { - throw runtime_error( "Bone counts in NiSkinInstance and attached NiSkinData must match" ); - } - - //Loop through all bones influencing this skin - for ( uint i = 0; i < bones.size(); ++i ) { - //Get current offset Matrix for this bone - //Matrix44 parent_offset( bone_data[i].translation, - // bone_data[i].rotation, - // bone_data[i].scale ); - Matrix44 parent_offset( - bone_data[i].rotation[0][0], bone_data[i].rotation[0][1], bone_data[i].rotation[0][2], 0.0f, - bone_data[i].rotation[1][0], bone_data[i].rotation[1][1], bone_data[i].rotation[1][2], 0.0f, - bone_data[i].rotation[2][0], bone_data[i].rotation[2][1], bone_data[i].rotation[2][2], 0.0f, - bone_data[i].translation.x, bone_data[i].translation.y, bone_data[i].translation.z, 1.0f - ); - - //Loop through all bones again, checking for any that have this bone as a parent - for ( uint j = 0; j < bones.size(); ++j ) { - if ( bones[j]->GetParent() == bones[i] ) { - //cout << "Bone " << bones[j] << " has bone " << bones[i] << " as parent." << endl; - //Node 2 has node 1 as a parent - - //Get child offset Matrix33 - /*Matrix44 child_offset( bone_data[j].translation, - bone_data[j].rotation, - bone_data[j].scale );*/ - Matrix44 child_offset( - bone_data[j].rotation[0][0], bone_data[j].rotation[0][1], bone_data[j].rotation[0][2], 0.0f, - bone_data[j].rotation[1][0], bone_data[j].rotation[1][1], bone_data[j].rotation[1][2], 0.0f, - bone_data[j].rotation[2][0], bone_data[j].rotation[2][1], bone_data[j].rotation[2][2], 0.0f, - bone_data[j].translation.x, bone_data[j].translation.y, bone_data[j].translation.z, 1.0f - ); - - //Do calculation to get correct bone postion in relation to parent - //Matrix44 inverse_co = child_offset.Inverse(); - //world_positions[bones[j]] = inverse_co * parent_offset; - Matrix44 inverse_co = child_offset.Inverse(); - Matrix44 child_pos = inverse_co * parent_offset; - - //bones[j]->SetWorldBindPos( child_pos ); - bones[j]->SetLocalRotation( child_pos.GetRotation() ); - bones[j]->SetLocalScale( 1.0f ); - bones[j]->SetLocalTranslation( child_pos.GetTranslation() ); - - //cout << "Matrix: " << cout << "Translation: " << world_positions[bones[j]] << endl; - //cout << "Translation: " << world_positions[bones[j]].GetTranslation() << endl; - //cout << "Rotation: " << world_positions[bones[j]].GetRotation() << endl; - //cout << "Scale: " << world_positions[bones[j]].GetScale() << endl; - } - } - } - } - - //Search for any NiTriBasedGeom classes lower in the scene graph and - //reposition them - RepositionGeom(this); -} - -void NiNode::RepositionGeom( NiAVObjectRef root ) { - //Check if this is a NiTriBasedGeom - NiTriBasedGeomRef geom = DynamicCast<NiTriBasedGeom>(root); - - if ( geom != NULL ) { - //This is a NiTriBasedGeom class - //Get NiSkinInstance and NiSkinData - - NiSkinInstanceRef skin_inst = geom->GetSkinInstance(); - - if ( skin_inst == NULL ) { - return; - } - - NiSkinDataRef skin_data = skin_inst->GetSkinData(); - - if ( skin_data == NULL ) { - return; - } - - //Get bone info - vector<NiNodeRef> bones = skin_inst->GetBones(); - vector<SkinData> bone_data = skin_data->GetBoneData(); - - //Make sure the counts match - if ( bones.size() != bone_data.size() ) { - throw runtime_error( "Bone counts in NiSkinInstance and attached NiSkinData must match" ); - } - - //There must be at least one bone to do anything - if ( bones.size() == 0 ) { - return; - } - - //Use first bone (arbitrary choice) - Matrix44 offset_mat( - bone_data[0].rotation[0][0], bone_data[0].rotation[0][1], bone_data[0].rotation[0][2], 0.0f, - bone_data[0].rotation[1][0], bone_data[0].rotation[1][1], bone_data[0].rotation[1][2], 0.0f, - bone_data[0].rotation[2][0], bone_data[0].rotation[2][1], bone_data[0].rotation[2][2], 0.0f, - bone_data[0].translation.x, bone_data[0].translation.y, bone_data[0].translation.z, 1.0f - ); - - //Get built up rotations to the root of the skeleton from this bone - Matrix44 bone_mat = bones[0]->GetWorldTransform(); - - Matrix44 world_mat = offset_mat * bone_mat; - - Matrix44 result_mat = world_mat * geom->GetParent()->GetWorldTransform().Inverse(); - - //--Set TriShape Local Position to Result--// - geom->SetLocalRotation( result_mat.GetRotation() ); - geom->SetLocalTranslation( result_mat.GetTranslation() ); - geom->SetLocalScale( 1.0f ); - - //TODO: Calculate the correct adjustment for the NiSkinData overall matrix - //due to this change - - return; - } - - //Check if this is a NiNode - NiNodeRef node = DynamicCast<NiNode>(root); - - if ( node != NULL ) { - //This is a NiNode, call this function on all children - vector<NiAVObjectRef> children = node->GetChildren(); - for ( uint i = 0; i < children.size(); ++i ) { - RepositionGeom( children[i] ); - } - } -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiNode.h b/NifExport/niflib/obj/NiNode.h deleted file mode 100755 index ef282a8..0000000 --- a/NifExport/niflib/obj/NiNode.h +++ /dev/null @@ -1,96 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NINODE_H_ -#define _NINODE_H_ - -#include "NiAVObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; -class NiDynamicEffect; - -#include "../gen/obj_defines.h" - -class NiNode; -class NiAVObject; -class NiSkinInstance; -typedef Ref<NiNode> NiNodeRef; - -/*! - * NiNode - Generic node block for grouping. - */ - -class NIFLIB_API NiNode : public NI_NODE_PARENT { -public: - NiNode(); - ~NiNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void AddChild( Ref<NiAVObject> obj ); - void RemoveChild( Ref<NiAVObject> obj ); - void ClearChildren(); - vector< Ref<NiAVObject> > GetChildren() const; -#ifdef USE_NIFLIB_TEMPLATE_HELPERS - template <typename ChildEquivalence> - inline void SortChildren(ChildEquivalence pred) { - std::stable_sort(children.begin(), children.end(), pred); - } -#endif - - void AddEffect( Ref<NiDynamicEffect> effect ); - void RemoveEffect( Ref<NiDynamicEffect> effect ); - void ClearEffects(); - vector< Ref<NiDynamicEffect> > GetEffects() const; - - /*! Checks if this node has any skins attached. */ - bool IsSkeletonRoot() const; - - /*! Checks if this node influences the vertices in any skins. */ - bool IsSkinInfluence() const; - - /*! Causes all children's transforms to be changed so that all the skin - * pieces line up without any vertex transformations. - */ - void GoToSkeletonBindPosition(); - - /*! - * Should only be called by NiTriBasedGeom - * Adds a new SkinInstance to the specified mesh. - * The bones must be below this node in the scene graph tree - */ - void AddSkin( NiSkinInstance * skin_inst ); - - /*! - * Should only be called by NiTriBasedGeom - * Detaches the skin associated with a child mesh. - */ - void RemoveSkin( NiSkinInstance * skin_inst ); - - /*! Should not be called directly */ - void SetSkinFlag( bool n ); - -private: - void NiNode::RepositionGeom( NiAVObjectRef root ); -protected: - list<NiSkinInstance*> skins; - NI_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiObject.cpp b/NifExport/niflib/obj/NiObject.cpp deleted file mode 100755 index 5a39243..0000000 --- a/NifExport/niflib/obj/NiObject.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiObject::TYPE("NiObject", NULL ); - -//Static to track total number of objects in memory. Initialize to zero. -unsigned int NiObject::objectsInMemory = 0; - -NiObject::NiObject() : _ref_count(0) {} -NiObject::~NiObject() {} - -bool NiObject::IsSameType( const Type & compare_to) const { - return GetType().IsSameType( compare_to ); -} - -bool NiObject::IsSameType( const NiObject * object ) const { - return GetType().IsSameType( object->GetType() ); -} - -bool NiObject::IsDerivedType( const Type & compare_to) const { - return GetType().IsDerivedType( compare_to ); -} - -bool NiObject::IsDerivedType( const NiObject * object ) const { - return GetType().IsDerivedType( object->GetType() ); -} - -void NiObject::AddRef() const { - ++_ref_count; -} - -void NiObject::SubtractRef() const { - if ( --_ref_count == 0 ) { - delete this; - } -} - -void NiObject::RemoveCrossRef( NiObject * block_to_remove ) {} -void NiObject::IncCrossRef( NiObject * block ) {} -void NiObject::DecCrossRef( NiObject* block ) {} -void NiObject::ReassignCrossRefs( const map<string,NiObjectRef> & name_map ) {} - -unsigned int NiObject::NumObjectsInMemory() { - return objectsInMemory; -} - -//These should be pure virtual eventually -string NiObject::asString( bool verbose ) const { - return string(); -} - -list<NiObjectRef> NiObject::GetRefs() const { - return list<NiObjectRef>(); -} - -/*! Used to format a human readable string that includes the type of the object */ -string NiObject::GetIDString() { - stringstream out; - out << this << "(" << this->GetType().GetTypeName() << ")"; - return out.str(); -} - -NiObjectRef NiObject::Clone( unsigned int version ) { - throw runtime_error("Cloning not yet implemented."); -}; diff --git a/NifExport/niflib/obj/NiObject.h b/NifExport/niflib/obj/NiObject.h deleted file mode 100755 index 2298994..0000000 --- a/NifExport/niflib/obj/NiObject.h +++ /dev/null @@ -1,226 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIOBJECT_H_ -#define _NIOBJECT_H_ - -#include <iostream> -#include <fstream> -#include <iomanip> -#include <sstream> -#include <string> -#include <list> -#include <map> -#include <vector> -#include "../NIF_IO.h" -#include "../Ref.h" -#include "../Type.h" -#include "../gen/obj_defines.h" -namespace Niflib { - -using namespace std; - - - -/** - * NiObject - Base Object class from which all other objects derive - */ - -class NiObject; -typedef Ref<NiObject> NiObjectRef; -typedef Ref<NiObject> blk_ref; //Temporary to make old code compile -typedef NiObject IBlock; - -class NiObject { -public: - NIFLIB_API NiObject(); - NIFLIB_API virtual ~NiObject(); - //Run-Time Type Information - NIFLIB_API static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - - /*! - * Used to determine an object's type. These type strings are the same as the class names of the blocks in the <a href = "http://niftools.sourceforge.net/docsys/">NIF File Format Browser</a>. - * \return A string containing the type of the object. Ex. NiNode, NiTriShapeData, NiParticleSystemController, etc. - * - * <b>Example:</b> - * \code - * blk_ref my_block = ReadNifTree("test_in.nif"); - * cout << my_block->GetType(); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = ReadNifTree("test_in.nif") - * print block.GetType() - * \endcode - * - * \sa CreateBlock - */ - NIFLIB_API virtual const Type & GetType() const { return TYPE; }; - - NIFLIB_API bool IsSameType( const Type & compare_to ) const; - NIFLIB_API bool IsSameType( const NiObject * object ) const; - NIFLIB_API bool IsDerivedType (const Type & compare_to ) const; - NIFLIB_API bool IsDerivedType( const NiObject * objct ) const; - - //Streaming Functions - NIFLIB_HIDDEN virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {} - NIFLIB_HIDDEN virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const {} - NIFLIB_HIDDEN virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) {} - - //Reference Counting - NIFLIB_API void AddRef() const; //Should not be called directly - NIFLIB_API void SubtractRef() const; //Should not be called directly - NIFLIB_API unsigned int GetNumRefs() { return _ref_count; } - - /*! Returns A new block that contains all the same data that this block does, but occupies a different part of memory. The data stored in a NIF file varies from version to version. Usually you are safe with the default option (the highest availiable version) but you may need to use an earlier version if you need to clone an obsolete piece of information. - * \param version The version number to use in the memory streaming operation. Default is the highest version availiable. - * \return A cloned copy of this block as a new block. - * \sa CreateBlock - */ - NIFLIB_API NiObjectRef Clone( unsigned int version = 0xFFFFFFFF ); - - /*! - * Summarizes the information contained in this block in English. - * \param verbose Determines whether or not detailed information about large areas of data will be printed out. - * \return A string containing a summary of the information within the block in English. This is the function that Niflyze calls to generate its analysis, so the output is the same. - * - * <b>Example:</b> - * \code - * blk_ref my_block = ReadNifTree("test_in.nif"); - * cout << my_block->asString(); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = ReadNifTree("test_in.nif") - * print block.asString() - * \endcode - * - * \sa IAttr::asString, SetVerboseMode - */ - NIFLIB_API virtual string asString( bool verbose = false ) const; - - /*! - * Formats a human readable string that includes the type of the object - * \return A string in the form: address(type) - */ - NIFLIB_API virtual string GetIDString(); - - /*! - * Used to retrieve all blocks that the current block is linked to through <i>all</i> attributes. - * \return A list of references to blocks that this attribute links its owner block to. - * - * <b>Example:</b> - * \code - * blk_ref my_block = ReadNifTree("test_in.nif"); - * list<blk_ref> attr_list = my_block->GetRefs(); - * \endcode - * - * <b>In Python:</b> - * \code - * my_block = ReadNifTree("test_in.nif") - * attr_list = my_block.GetRefs() - * \endcode - */ - NIFLIB_API virtual list<NiObjectRef> GetRefs() const; - - // Python Operator Overloads - NIFLIB_API string __str__() const { - return asString(); - }; - - NIFLIB_API virtual void RemoveCrossRef( NiObject * block_to_remove ); - - NIFLIB_API void IncCrossRef( NiObject * block ); - NIFLIB_API void DecCrossRef( NiObject* block ); - NIFLIB_API virtual void ReassignCrossRefs( const map<string,NiObjectRef> & name_map ); - - NIFLIB_API static unsigned int NumObjectsInMemory(); -private: - mutable unsigned int _ref_count; - list<NiObject*> _cross_refs; - static unsigned int objectsInMemory; - STANDARD_INTERNAL_METHODS -}; - - -/* - * Casting Templates - */ - -template <class T> Ref<T> StaticCast( NiObject * object ) { - return (T*)object; -} - -template <class T> Ref<const T> StaticCast (const NiObject * object) { - return (const T*)object; -} - -template <class T> Ref<T> DynamicCast( NiObject * object ) { - if ( object->IsDerivedType(T::TypeConst()) ) { - return (T*)object; - } else { - return NULL; - } -} - -template <class T> Ref<const T> DynamicCast( const NiObject * object ) { - if ( object->IsDerivedType(T::TypeConst()) ) { - return (const T*)object; - } else { - return NULL; - } -} -#ifdef USE_NIFLIB_TEMPLATE_HELPERS -template <typename T, typename U> Ref<T> StaticCast( Ref<U>& object ) { - return object; -} - -template <typename T, typename U> Ref<T> DynamicCast( Ref<U>& object ) { - return object; -} - -template <typename T, typename U> Ref<T> StaticCast( const Ref<U>& object ) { - return Ref<T>(object); -} - -template <typename T, typename U> Ref<T> DynamicCast( const Ref<U>& object ) { - return Ref<T>(object); -} - -/*! - * Dynamically cast from a collection of objects to another collection - * \param objs A collection of object references to be dynamically casted to the specified type. - * \return A collection of objects that support the requested type. - */ -template <typename U, typename T> -inline vector<Ref<U> > DynamicCast( vector<Ref<T> > const & objs ) { - vector<Ref<U> > retval; - for (vector<Ref<T> >::const_iterator itr = objs.begin(), end = objs.end(); itr != end; ++itr) { - Ref<U> obj = DynamicCast<U>(*itr); - if (obj) retval.insert(retval.end(), obj); - } - return retval; -} - -/*! -* Dynamically cast from a collection of objects to another collection -* \param objs A collection of object references to be dynamically casted to the specified type. -* \return A collection of objects that support the requested type. -*/ -template <typename U, typename T> -inline list<Ref<U> > DynamicCast( list<Ref<T> > const & objs ) { - list<Ref<U> > retval; - for (list<Ref<T> >::const_iterator itr = objs.begin(), end = objs.end(); itr != end; ++itr) { - Ref<U> obj = DynamicCast<U>(*itr); - if (obj) retval.insert(retval.end(), obj); - } - return retval; -} -#endif -} -#endif diff --git a/NifExport/niflib/obj/NiObjectNET.cpp b/NifExport/niflib/obj/NiObjectNET.cpp deleted file mode 100755 index cef9866..0000000 --- a/NifExport/niflib/obj/NiObjectNET.cpp +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiObjectNET.h" -#include "NiExtraData.h" -#include "NiTimeController.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiObjectNET::TYPE("NiObjectNET", &NI_OBJECT_N_E_T_PARENT::TypeConst() ); - -NiObjectNET::NiObjectNET() NI_OBJECT_N_E_T_CONSTRUCT {} - -NiObjectNET::~NiObjectNET() { - //Clear Lists - ClearExtraData(); - ClearControllers(); -} - -void NiObjectNET::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_OBJECT_N_E_T_READ -} - -void NiObjectNET::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_OBJECT_N_E_T_WRITE -} - -string NiObjectNET::asString( bool verbose ) const { - NI_OBJECT_N_E_T_STRING -} - -void NiObjectNET::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_OBJECT_N_E_T_FIXLINKS -} - -list<NiObjectRef> NiObjectNET::GetRefs() const { - NI_OBJECT_N_E_T_GETREFS -} - -string NiObjectNET::GetName() { - return name; -} - -void NiObjectNET::SetName( const string & new_name ) { - name = new_name; -} - -/*! Used to format a human readable string that includes the type of the object */ -string NiObjectNET::GetIDString() { - stringstream out; - out << NiObject::GetIDString() << " {" << name << "}"; - return out.str(); -} - -void NiObjectNET::AddExtraData( Ref<NiExtraData> & obj, uint version ) { - if ( version >= VER_10_0_1_0 ) { - //In later versions, extra data is just stored in a vector - extraDataList.push_back( obj ); - } else { - //In earlier versions, extra data is a singly linked list - //Insert at begining of list - obj->SetNextExtraData( extraData); - extraData = obj; - } -} - -void NiObjectNET::RemoveExtraData( Ref<NiExtraData> obj ) { - //Search both types of extra data list for the one to remove - for ( vector< NiExtraDataRef >::iterator it = extraDataList.begin(); it != extraDataList.end(); ) { - if ( *it == obj ) { - it = extraDataList.erase( it ); - } else { - ++it; - } - } - - NiExtraDataRef * extra = &extraData; - while ( (*extra) != NULL ) { - if ( (*extra) == obj ) { - //Cut this reference out of the list - (*extra) = (*extra)->GetNextExtraData(); - } else { - //Advance to the next extra data - extra = &((*extra)->GetNextExtraData()); - } - } -} - -void NiObjectNET::ShiftExtraData( uint version ) { - //Shift any extra data references that are stored in a way that doesn't match - //the requested version to the way that does - if ( version >= VER_10_0_1_0 ) { - //In later versions, extra data is just stored in a vector - //Empty the linked list into the vector - - NiExtraDataRef extra = extraData; - while ( extra != NULL ) { - extraDataList.push_back( extra ); - extra = extra->GetNextExtraData(); - extraDataList.back()->SetNextExtraData(NULL); - } - extraData = NULL; - } else { - //In earlier versions, extra data is a singly linked list - //Insert at begining of list - //Empty the list into the linked list - for ( vector< NiExtraDataRef >::iterator it = extraDataList.begin(); it != extraDataList.end(); ) { - (*it)->SetNextExtraData( extraData ); - extraData = (*it); - } - extraDataList.clear(); - } -} - -void NiObjectNET::ClearExtraData() { - extraDataList.clear(); - extraData = NULL; -} - -list< Ref<NiExtraData> > NiObjectNET::GetExtraData() const { - list< Ref<NiExtraData> > extras; - for ( vector< NiExtraDataRef >::const_iterator it = extraDataList.begin(); it != extraDataList.end(); ) { - extras.push_back( *it ); - } - - NiExtraDataRef extra = extraData; - while ( extra != NULL ) { - extras.push_back( extra ); - extra = extra->GetNextExtraData(); - } - - return extras; -} - -void NiObjectNET::AddController( Ref<NiTimeController> & obj ) { - //Insert at begining of list - obj->SetTarget( this ); - obj->SetNextController( controller ); - controller = obj; -} - -void NiObjectNET::RemoveController( Ref<NiTimeController> obj ) { - NiTimeControllerRef * cont = &controller; - while ( (*cont) != NULL ) { - if ( (*cont) == obj ) { - //Cut this reference out of the list - (*cont)->SetTarget( NULL ); - (*cont) = (*cont)->GetNextController(); - } else { - //Advance to the next controller - cont = &((*cont)->GetNextController()); - } - } -} -void NiObjectNET::ClearControllers() { - NiTimeControllerRef * cont = &controller; - while ( (*cont) != NULL ) { - (*cont)->SetTarget(NULL); - (*cont) = (*cont)->GetNextController(); - } -} - -list< Ref<NiTimeController> > NiObjectNET::GetControllers() const { - list< Ref<NiTimeController> > conts; - - NiTimeControllerRef cont = controller; - while ( cont != NULL ) { - conts.push_back( cont ); - cont = cont->GetNextController(); - } - - return conts; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiObjectNET.h b/NifExport/niflib/obj/NiObjectNET.h deleted file mode 100755 index b1e2e5d..0000000 --- a/NifExport/niflib/obj/NiObjectNET.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIOBJECTNET_H_ -#define _NIOBJECTNET_H_ - -#include "NiObject.h" - -#include NI_OBJECT_N_E_T_INCLUDE -namespace Niflib { - -// Forward define of referenced blocks -class NiExtraData; -class NiTimeController; - -#include "../gen/obj_defines.h" - -class NiObjectNET; -class NiExtraData; -class NiTimeController; - -/* - * NiObjectNET - An object that has a name. Can have extra data and controllers attatched. - */ -typedef Ref<NiObjectNET> NiObjectNETRef; - -class NIFLIB_API NiObjectNET : public NI_OBJECT_N_E_T_PARENT { -public: - NiObjectNET(); - ~NiObjectNET(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual const Type & GetType() const { return TYPE; }; - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - - string GetName(); - void SetName( const string & new_name ); - /*! - * Formats a human readable string that includes the type of the object - * \return A string in the form: address(type) {name} - */ - virtual string GetIDString(); - - void AddExtraData( Ref<NiExtraData> & obj, uint version = VER_10_0_1_0 ); - void RemoveExtraData( Ref<NiExtraData> obj ); - void ShiftExtraData( uint version = VER_10_0_1_0 ); - void ClearExtraData(); - list< Ref<NiExtraData> > GetExtraData() const; - - void AddController( Ref<NiTimeController> & obj ); - void RemoveController( Ref<NiTimeController> obj ); - void ClearControllers(); - list< Ref<NiTimeController> > GetControllers() const; - - //TODO: pointer to first NiTimeController type. Need functions to add/remove. -private: - NI_OBJECT_N_E_T_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysAgeDeathModifier.cpp b/NifExport/niflib/obj/NiPSysAgeDeathModifier.cpp deleted file mode 100755 index fb08054..0000000 --- a/NifExport/niflib/obj/NiPSysAgeDeathModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysAgeDeathModifier.h" -#include "NiPSysSpawnModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysAgeDeathModifier::TYPE("NiPSysAgeDeathModifier", &NI_P_SYS_AGE_DEATH_MODIFIER_PARENT::TypeConst() ); - -NiPSysAgeDeathModifier::NiPSysAgeDeathModifier() NI_P_SYS_AGE_DEATH_MODIFIER_CONSTRUCT {} - -NiPSysAgeDeathModifier::~NiPSysAgeDeathModifier() {} - -void NiPSysAgeDeathModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_AGE_DEATH_MODIFIER_READ -} - -void NiPSysAgeDeathModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_AGE_DEATH_MODIFIER_WRITE -} - -string NiPSysAgeDeathModifier::asString( bool verbose ) const { - NI_P_SYS_AGE_DEATH_MODIFIER_STRING -} - -void NiPSysAgeDeathModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_AGE_DEATH_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysAgeDeathModifier::GetRefs() const { - NI_P_SYS_AGE_DEATH_MODIFIER_GETREFS -} - -const Type & NiPSysAgeDeathModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysAgeDeathModifier.h b/NifExport/niflib/obj/NiPSysAgeDeathModifier.h deleted file mode 100755 index af71a02..0000000 --- a/NifExport/niflib/obj/NiPSysAgeDeathModifier.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSAGEDEATHMODIFIER_H_ -#define _NIPSYSAGEDEATHMODIFIER_H_ - -#include "NiPSysModifier.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPSysSpawnModifier; - -#include "../gen/obj_defines.h" - -class NiPSysAgeDeathModifier; -typedef Ref<NiPSysAgeDeathModifier> NiPSysAgeDeathModifierRef; - -/*! - * NiPSysAgeDeathModifier - Unknown particle modifier. - */ - -class NIFLIB_API NiPSysAgeDeathModifier : public NI_P_SYS_AGE_DEATH_MODIFIER_PARENT { -public: - NiPSysAgeDeathModifier(); - ~NiPSysAgeDeathModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_AGE_DEATH_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysBombModifier.cpp b/NifExport/niflib/obj/NiPSysBombModifier.cpp deleted file mode 100755 index 42343ad..0000000 --- a/NifExport/niflib/obj/NiPSysBombModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysBombModifier.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysBombModifier::TYPE("NiPSysBombModifier", &NI_P_SYS_BOMB_MODIFIER_PARENT::TypeConst() ); - -NiPSysBombModifier::NiPSysBombModifier() NI_P_SYS_BOMB_MODIFIER_CONSTRUCT {} - -NiPSysBombModifier::~NiPSysBombModifier() {} - -void NiPSysBombModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_BOMB_MODIFIER_READ -} - -void NiPSysBombModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_BOMB_MODIFIER_WRITE -} - -string NiPSysBombModifier::asString( bool verbose ) const { - NI_P_SYS_BOMB_MODIFIER_STRING -} - -void NiPSysBombModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_BOMB_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysBombModifier::GetRefs() const { - NI_P_SYS_BOMB_MODIFIER_GETREFS -} - -const Type & NiPSysBombModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysBombModifier.h b/NifExport/niflib/obj/NiPSysBombModifier.h deleted file mode 100755 index 1999540..0000000 --- a/NifExport/niflib/obj/NiPSysBombModifier.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSBOMBMODIFIER_H_ -#define _NIPSYSBOMBMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiPSysBombModifier; -typedef Ref<NiPSysBombModifier> NiPSysBombModifierRef; - -/*! - * NiPSysBombModifier - Unknown. - */ - -class NIFLIB_API NiPSysBombModifier : public NI_P_SYS_BOMB_MODIFIER_PARENT { -public: - NiPSysBombModifier(); - ~NiPSysBombModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_BOMB_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysBoundUpdateModifier.cpp b/NifExport/niflib/obj/NiPSysBoundUpdateModifier.cpp deleted file mode 100755 index 94177a6..0000000 --- a/NifExport/niflib/obj/NiPSysBoundUpdateModifier.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysBoundUpdateModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysBoundUpdateModifier::TYPE("NiPSysBoundUpdateModifier", &NI_P_SYS_BOUND_UPDATE_MODIFIER_PARENT::TypeConst() ); - -NiPSysBoundUpdateModifier::NiPSysBoundUpdateModifier() NI_P_SYS_BOUND_UPDATE_MODIFIER_CONSTRUCT {} - -NiPSysBoundUpdateModifier::~NiPSysBoundUpdateModifier() {} - -void NiPSysBoundUpdateModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_BOUND_UPDATE_MODIFIER_READ -} - -void NiPSysBoundUpdateModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_BOUND_UPDATE_MODIFIER_WRITE -} - -string NiPSysBoundUpdateModifier::asString( bool verbose ) const { - NI_P_SYS_BOUND_UPDATE_MODIFIER_STRING -} - -void NiPSysBoundUpdateModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_BOUND_UPDATE_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysBoundUpdateModifier::GetRefs() const { - NI_P_SYS_BOUND_UPDATE_MODIFIER_GETREFS -} - -const Type & NiPSysBoundUpdateModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysBoundUpdateModifier.h b/NifExport/niflib/obj/NiPSysBoundUpdateModifier.h deleted file mode 100755 index f85fbc1..0000000 --- a/NifExport/niflib/obj/NiPSysBoundUpdateModifier.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSBOUNDUPDATEMODIFIER_H_ -#define _NIPSYSBOUNDUPDATEMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysBoundUpdateModifier; -typedef Ref<NiPSysBoundUpdateModifier> NiPSysBoundUpdateModifierRef; - -/*! - * NiPSysBoundUpdateModifier - Unknown particle system modifier. - */ - -class NIFLIB_API NiPSysBoundUpdateModifier : public NI_P_SYS_BOUND_UPDATE_MODIFIER_PARENT { -public: - NiPSysBoundUpdateModifier(); - ~NiPSysBoundUpdateModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_BOUND_UPDATE_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysBoxEmitter.cpp b/NifExport/niflib/obj/NiPSysBoxEmitter.cpp deleted file mode 100755 index a0ad435..0000000 --- a/NifExport/niflib/obj/NiPSysBoxEmitter.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysBoxEmitter.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysBoxEmitter::TYPE("NiPSysBoxEmitter", &NI_P_SYS_BOX_EMITTER_PARENT::TypeConst() ); - -NiPSysBoxEmitter::NiPSysBoxEmitter() NI_P_SYS_BOX_EMITTER_CONSTRUCT {} - -NiPSysBoxEmitter::~NiPSysBoxEmitter() {} - -void NiPSysBoxEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_BOX_EMITTER_READ -} - -void NiPSysBoxEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_BOX_EMITTER_WRITE -} - -string NiPSysBoxEmitter::asString( bool verbose ) const { - NI_P_SYS_BOX_EMITTER_STRING -} - -void NiPSysBoxEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_BOX_EMITTER_FIXLINKS -} - -list<NiObjectRef> NiPSysBoxEmitter::GetRefs() const { - NI_P_SYS_BOX_EMITTER_GETREFS -} - -const Type & NiPSysBoxEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysBoxEmitter.h b/NifExport/niflib/obj/NiPSysBoxEmitter.h deleted file mode 100755 index 02c5bc6..0000000 --- a/NifExport/niflib/obj/NiPSysBoxEmitter.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSBOXEMITTER_H_ -#define _NIPSYSBOXEMITTER_H_ - -#include "NiPSysVolumeEmitter.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysBoxEmitter; -typedef Ref<NiPSysBoxEmitter> NiPSysBoxEmitterRef; - -/*! - * NiPSysBoxEmitter - Unknown particle modifier. - */ - -class NIFLIB_API NiPSysBoxEmitter : public NI_P_SYS_BOX_EMITTER_PARENT { -public: - NiPSysBoxEmitter(); - ~NiPSysBoxEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_BOX_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysColliderManager.cpp b/NifExport/niflib/obj/NiPSysColliderManager.cpp deleted file mode 100755 index 335a1c8..0000000 --- a/NifExport/niflib/obj/NiPSysColliderManager.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysColliderManager.h" -#include "NiPSysPlanarCollider.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysColliderManager::TYPE("NiPSysColliderManager", &NI_P_SYS_COLLIDER_MANAGER_PARENT::TypeConst() ); - -NiPSysColliderManager::NiPSysColliderManager() NI_P_SYS_COLLIDER_MANAGER_CONSTRUCT {} - -NiPSysColliderManager::~NiPSysColliderManager() {} - -void NiPSysColliderManager::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_COLLIDER_MANAGER_READ -} - -void NiPSysColliderManager::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_COLLIDER_MANAGER_WRITE -} - -string NiPSysColliderManager::asString( bool verbose ) const { - NI_P_SYS_COLLIDER_MANAGER_STRING -} - -void NiPSysColliderManager::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_COLLIDER_MANAGER_FIXLINKS -} - -list<NiObjectRef> NiPSysColliderManager::GetRefs() const { - NI_P_SYS_COLLIDER_MANAGER_GETREFS -} - -const Type & NiPSysColliderManager::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysColliderManager.h b/NifExport/niflib/obj/NiPSysColliderManager.h deleted file mode 100755 index 0d42698..0000000 --- a/NifExport/niflib/obj/NiPSysColliderManager.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSCOLLIDERMANAGER_H_ -#define _NIPSYSCOLLIDERMANAGER_H_ - -#include "NiPSysModifier.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPSysPlanarCollider; - -#include "../gen/obj_defines.h" - -class NiPSysColliderManager; -typedef Ref<NiPSysColliderManager> NiPSysColliderManagerRef; - -/*! - * NiPSysColliderManager - Unknown. - */ - -class NIFLIB_API NiPSysColliderManager : public NI_P_SYS_COLLIDER_MANAGER_PARENT { -public: - NiPSysColliderManager(); - ~NiPSysColliderManager(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_COLLIDER_MANAGER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysColorModifier.cpp b/NifExport/niflib/obj/NiPSysColorModifier.cpp deleted file mode 100755 index 433a0c3..0000000 --- a/NifExport/niflib/obj/NiPSysColorModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysColorModifier.h" -#include "NiColorData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysColorModifier::TYPE("NiPSysColorModifier", &NI_P_SYS_COLOR_MODIFIER_PARENT::TypeConst() ); - -NiPSysColorModifier::NiPSysColorModifier() NI_P_SYS_COLOR_MODIFIER_CONSTRUCT {} - -NiPSysColorModifier::~NiPSysColorModifier() {} - -void NiPSysColorModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_COLOR_MODIFIER_READ -} - -void NiPSysColorModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_COLOR_MODIFIER_WRITE -} - -string NiPSysColorModifier::asString( bool verbose ) const { - NI_P_SYS_COLOR_MODIFIER_STRING -} - -void NiPSysColorModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_COLOR_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysColorModifier::GetRefs() const { - NI_P_SYS_COLOR_MODIFIER_GETREFS -} - -const Type & NiPSysColorModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysColorModifier.h b/NifExport/niflib/obj/NiPSysColorModifier.h deleted file mode 100755 index 2cd8218..0000000 --- a/NifExport/niflib/obj/NiPSysColorModifier.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSCOLORMODIFIER_H_ -#define _NIPSYSCOLORMODIFIER_H_ - -#include "NiPSysModifier.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiColorData; - -#include "../gen/obj_defines.h" - -class NiPSysColorModifier; -typedef Ref<NiPSysColorModifier> NiPSysColorModifierRef; - -/*! - * NiPSysColorModifier - Unknown particle modifier. - */ - -class NIFLIB_API NiPSysColorModifier : public NI_P_SYS_COLOR_MODIFIER_PARENT { -public: - NiPSysColorModifier(); - ~NiPSysColorModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_COLOR_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysCylinderEmitter.cpp b/NifExport/niflib/obj/NiPSysCylinderEmitter.cpp deleted file mode 100755 index 5b690b7..0000000 --- a/NifExport/niflib/obj/NiPSysCylinderEmitter.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysCylinderEmitter.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysCylinderEmitter::TYPE("NiPSysCylinderEmitter", &NI_P_SYS_CYLINDER_EMITTER_PARENT::TypeConst() ); - -NiPSysCylinderEmitter::NiPSysCylinderEmitter() NI_P_SYS_CYLINDER_EMITTER_CONSTRUCT {} - -NiPSysCylinderEmitter::~NiPSysCylinderEmitter() {} - -void NiPSysCylinderEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_CYLINDER_EMITTER_READ -} - -void NiPSysCylinderEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_CYLINDER_EMITTER_WRITE -} - -string NiPSysCylinderEmitter::asString( bool verbose ) const { - NI_P_SYS_CYLINDER_EMITTER_STRING -} - -void NiPSysCylinderEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_CYLINDER_EMITTER_FIXLINKS -} - -list<NiObjectRef> NiPSysCylinderEmitter::GetRefs() const { - NI_P_SYS_CYLINDER_EMITTER_GETREFS -} - -const Type & NiPSysCylinderEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysCylinderEmitter.h b/NifExport/niflib/obj/NiPSysCylinderEmitter.h deleted file mode 100755 index 2b8d562..0000000 --- a/NifExport/niflib/obj/NiPSysCylinderEmitter.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSCYLINDEREMITTER_H_ -#define _NIPSYSCYLINDEREMITTER_H_ - -#include "NiPSysVolumeEmitter.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysCylinderEmitter; -typedef Ref<NiPSysCylinderEmitter> NiPSysCylinderEmitterRef; - -/*! - * NiPSysCylinderEmitter - Unknown. - */ - -class NIFLIB_API NiPSysCylinderEmitter : public NI_P_SYS_CYLINDER_EMITTER_PARENT { -public: - NiPSysCylinderEmitter(); - ~NiPSysCylinderEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_CYLINDER_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysData.cpp b/NifExport/niflib/obj/NiPSysData.cpp deleted file mode 100755 index f862cee..0000000 --- a/NifExport/niflib/obj/NiPSysData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysData::TYPE("NiPSysData", &NI_P_SYS_DATA_PARENT::TypeConst() ); - -NiPSysData::NiPSysData() NI_P_SYS_DATA_CONSTRUCT {} - -NiPSysData::~NiPSysData() {} - -void NiPSysData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_DATA_READ -} - -void NiPSysData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_DATA_WRITE -} - -string NiPSysData::asString( bool verbose ) const { - NI_P_SYS_DATA_STRING -} - -void NiPSysData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_DATA_FIXLINKS -} - -list<NiObjectRef> NiPSysData::GetRefs() const { - NI_P_SYS_DATA_GETREFS -} - -const Type & NiPSysData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysData.h b/NifExport/niflib/obj/NiPSysData.h deleted file mode 100755 index 538b296..0000000 --- a/NifExport/niflib/obj/NiPSysData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSDATA_H_ -#define _NIPSYSDATA_H_ - -#include "APSysData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysData; -typedef Ref<NiPSysData> NiPSysDataRef; - -/*! - * NiPSysData - Particle system data. - */ - -class NIFLIB_API NiPSysData : public NI_P_SYS_DATA_PARENT { -public: - NiPSysData(); - ~NiPSysData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysDragModifier.cpp b/NifExport/niflib/obj/NiPSysDragModifier.cpp deleted file mode 100755 index 35c7785..0000000 --- a/NifExport/niflib/obj/NiPSysDragModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysDragModifier.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysDragModifier::TYPE("NiPSysDragModifier", &NI_P_SYS_DRAG_MODIFIER_PARENT::TypeConst() ); - -NiPSysDragModifier::NiPSysDragModifier() NI_P_SYS_DRAG_MODIFIER_CONSTRUCT {} - -NiPSysDragModifier::~NiPSysDragModifier() {} - -void NiPSysDragModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_DRAG_MODIFIER_READ -} - -void NiPSysDragModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_DRAG_MODIFIER_WRITE -} - -string NiPSysDragModifier::asString( bool verbose ) const { - NI_P_SYS_DRAG_MODIFIER_STRING -} - -void NiPSysDragModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_DRAG_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysDragModifier::GetRefs() const { - NI_P_SYS_DRAG_MODIFIER_GETREFS -} - -const Type & NiPSysDragModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysDragModifier.h b/NifExport/niflib/obj/NiPSysDragModifier.h deleted file mode 100755 index c85d0be..0000000 --- a/NifExport/niflib/obj/NiPSysDragModifier.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSDRAGMODIFIER_H_ -#define _NIPSYSDRAGMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; - -#include "../gen/obj_defines.h" - -class NiPSysDragModifier; -typedef Ref<NiPSysDragModifier> NiPSysDragModifierRef; - -/*! - * NiPSysDragModifier - Unknown. - */ - -class NIFLIB_API NiPSysDragModifier : public NI_P_SYS_DRAG_MODIFIER_PARENT { -public: - NiPSysDragModifier(); - ~NiPSysDragModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_DRAG_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitter.cpp b/NifExport/niflib/obj/NiPSysEmitter.cpp deleted file mode 100755 index 714c00b..0000000 --- a/NifExport/niflib/obj/NiPSysEmitter.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitter.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitter::TYPE("NiPSysEmitter", &NI_P_SYS_EMITTER_PARENT::TypeConst() ); - -NiPSysEmitter::NiPSysEmitter() NI_P_SYS_EMITTER_CONSTRUCT {} - -NiPSysEmitter::~NiPSysEmitter() {} - -void NiPSysEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_READ -} - -void NiPSysEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_WRITE -} - -string NiPSysEmitter::asString( bool verbose ) const { - NI_P_SYS_EMITTER_STRING -} - -void NiPSysEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitter::GetRefs() const { - NI_P_SYS_EMITTER_GETREFS -} - -const Type & NiPSysEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitter.h b/NifExport/niflib/obj/NiPSysEmitter.h deleted file mode 100755 index 28a1b79..0000000 --- a/NifExport/niflib/obj/NiPSysEmitter.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTER_H_ -#define _NIPSYSEMITTER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysEmitter; -typedef Ref<NiPSysEmitter> NiPSysEmitterRef; - -/*! - * NiPSysEmitter - A particle emitter modifier? - */ - -class NIFLIB_API NiPSysEmitter : public NI_P_SYS_EMITTER_PARENT { -public: - NiPSysEmitter(); - ~NiPSysEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterCtlr.cpp b/NifExport/niflib/obj/NiPSysEmitterCtlr.cpp deleted file mode 100755 index cd00d8d..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterCtlr.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterCtlr.h" -#include "NiPSysEmitterCtlrData.h" -#include "NiInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterCtlr::TYPE("NiPSysEmitterCtlr", &NI_P_SYS_EMITTER_CTLR_PARENT::TypeConst() ); - -NiPSysEmitterCtlr::NiPSysEmitterCtlr() NI_P_SYS_EMITTER_CTLR_CONSTRUCT {} - -NiPSysEmitterCtlr::~NiPSysEmitterCtlr() {} - -void NiPSysEmitterCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_CTLR_READ -} - -void NiPSysEmitterCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_CTLR_WRITE -} - -string NiPSysEmitterCtlr::asString( bool verbose ) const { - NI_P_SYS_EMITTER_CTLR_STRING -} - -void NiPSysEmitterCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterCtlr::GetRefs() const { - NI_P_SYS_EMITTER_CTLR_GETREFS -} - -const Type & NiPSysEmitterCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterCtlr.h b/NifExport/niflib/obj/NiPSysEmitterCtlr.h deleted file mode 100755 index 5f1b4d0..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterCtlr.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERCTLR_H_ -#define _NIPSYSEMITTERCTLR_H_ - -#include "APSysCtlr.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPSysEmitterCtlrData; -class NiInterpolator; - -#include "../gen/obj_defines.h" - -class NiPSysEmitterCtlr; -typedef Ref<NiPSysEmitterCtlr> NiPSysEmitterCtlrRef; - -/*! - * NiPSysEmitterCtlr - Particle system emitter controller. - */ - -class NIFLIB_API NiPSysEmitterCtlr : public NI_P_SYS_EMITTER_CTLR_PARENT { -public: - NiPSysEmitterCtlr(); - ~NiPSysEmitterCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterCtlrData.cpp b/NifExport/niflib/obj/NiPSysEmitterCtlrData.cpp deleted file mode 100755 index 24980e2..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterCtlrData.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterCtlrData.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterCtlrData::TYPE("NiPSysEmitterCtlrData", &NI_P_SYS_EMITTER_CTLR_DATA_PARENT::TypeConst() ); - -NiPSysEmitterCtlrData::NiPSysEmitterCtlrData() NI_P_SYS_EMITTER_CTLR_DATA_CONSTRUCT {} - -NiPSysEmitterCtlrData::~NiPSysEmitterCtlrData() {} - -void NiPSysEmitterCtlrData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_CTLR_DATA_READ -} - -void NiPSysEmitterCtlrData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_CTLR_DATA_WRITE -} - -string NiPSysEmitterCtlrData::asString( bool verbose ) const { - NI_P_SYS_EMITTER_CTLR_DATA_STRING -} - -void NiPSysEmitterCtlrData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_CTLR_DATA_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterCtlrData::GetRefs() const { - NI_P_SYS_EMITTER_CTLR_DATA_GETREFS -} - -const Type & NiPSysEmitterCtlrData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterCtlrData.h b/NifExport/niflib/obj/NiPSysEmitterCtlrData.h deleted file mode 100755 index b3f4e97..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterCtlrData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERCTLRDATA_H_ -#define _NIPSYSEMITTERCTLRDATA_H_ - -#include "NiObject.h" - -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysEmitterCtlrData; -typedef Ref<NiPSysEmitterCtlrData> NiPSysEmitterCtlrDataRef; - -/*! - * NiPSysEmitterCtlrData - Particle system emitter controller data. - */ - -class NIFLIB_API NiPSysEmitterCtlrData : public NI_P_SYS_EMITTER_CTLR_DATA_PARENT { -public: - NiPSysEmitterCtlrData(); - ~NiPSysEmitterCtlrData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_CTLR_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.cpp b/NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.cpp deleted file mode 100755 index 1228b6e..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterDeclinationCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterDeclinationCtlr::TYPE("NiPSysEmitterDeclinationCtlr", &NI_P_SYS_EMITTER_DECLINATION_CTLR_PARENT::TypeConst() ); - -NiPSysEmitterDeclinationCtlr::NiPSysEmitterDeclinationCtlr() NI_P_SYS_EMITTER_DECLINATION_CTLR_CONSTRUCT {} - -NiPSysEmitterDeclinationCtlr::~NiPSysEmitterDeclinationCtlr() {} - -void NiPSysEmitterDeclinationCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_DECLINATION_CTLR_READ -} - -void NiPSysEmitterDeclinationCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_DECLINATION_CTLR_WRITE -} - -string NiPSysEmitterDeclinationCtlr::asString( bool verbose ) const { - NI_P_SYS_EMITTER_DECLINATION_CTLR_STRING -} - -void NiPSysEmitterDeclinationCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_DECLINATION_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterDeclinationCtlr::GetRefs() const { - NI_P_SYS_EMITTER_DECLINATION_CTLR_GETREFS -} - -const Type & NiPSysEmitterDeclinationCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.h b/NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.h deleted file mode 100755 index 7b663a0..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterDeclinationCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERDECLINATIONCTLR_H_ -#define _NIPSYSEMITTERDECLINATIONCTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysEmitterDeclinationCtlr; -typedef Ref<NiPSysEmitterDeclinationCtlr> NiPSysEmitterDeclinationCtlrRef; - -/*! - * NiPSysEmitterDeclinationCtlr - Unknown. - */ - -class NIFLIB_API NiPSysEmitterDeclinationCtlr : public NI_P_SYS_EMITTER_DECLINATION_CTLR_PARENT { -public: - NiPSysEmitterDeclinationCtlr(); - ~NiPSysEmitterDeclinationCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_DECLINATION_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.cpp b/NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.cpp deleted file mode 100755 index 0a2fac8..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterDeclinationVarCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterDeclinationVarCtlr::TYPE("NiPSysEmitterDeclinationVarCtlr", &NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_PARENT::TypeConst() ); - -NiPSysEmitterDeclinationVarCtlr::NiPSysEmitterDeclinationVarCtlr() NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_CONSTRUCT {} - -NiPSysEmitterDeclinationVarCtlr::~NiPSysEmitterDeclinationVarCtlr() {} - -void NiPSysEmitterDeclinationVarCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_READ -} - -void NiPSysEmitterDeclinationVarCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_WRITE -} - -string NiPSysEmitterDeclinationVarCtlr::asString( bool verbose ) const { - NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_STRING -} - -void NiPSysEmitterDeclinationVarCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterDeclinationVarCtlr::GetRefs() const { - NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_GETREFS -} - -const Type & NiPSysEmitterDeclinationVarCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.h b/NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.h deleted file mode 100755 index a9d77d3..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterDeclinationVarCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERDECLINATIONVARCTLR_H_ -#define _NIPSYSEMITTERDECLINATIONVARCTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysEmitterDeclinationVarCtlr; -typedef Ref<NiPSysEmitterDeclinationVarCtlr> NiPSysEmitterDeclinationVarCtlrRef; - -/*! - * NiPSysEmitterDeclinationVarCtlr - Unknown. - */ - -class NIFLIB_API NiPSysEmitterDeclinationVarCtlr : public NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_PARENT { -public: - NiPSysEmitterDeclinationVarCtlr(); - ~NiPSysEmitterDeclinationVarCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_DECLINATION_VAR_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.cpp b/NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.cpp deleted file mode 100755 index 216e039..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterInitialRadiusCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterInitialRadiusCtlr::TYPE("NiPSysEmitterInitialRadiusCtlr", &NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_PARENT::TypeConst() ); - -NiPSysEmitterInitialRadiusCtlr::NiPSysEmitterInitialRadiusCtlr() NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_CONSTRUCT {} - -NiPSysEmitterInitialRadiusCtlr::~NiPSysEmitterInitialRadiusCtlr() {} - -void NiPSysEmitterInitialRadiusCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_READ -} - -void NiPSysEmitterInitialRadiusCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_WRITE -} - -string NiPSysEmitterInitialRadiusCtlr::asString( bool verbose ) const { - NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_STRING -} - -void NiPSysEmitterInitialRadiusCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterInitialRadiusCtlr::GetRefs() const { - NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_GETREFS -} - -const Type & NiPSysEmitterInitialRadiusCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.h b/NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.h deleted file mode 100755 index 691108c..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterInitialRadiusCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERINITIALRADIUSCTLR_H_ -#define _NIPSYSEMITTERINITIALRADIUSCTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysEmitterInitialRadiusCtlr; -typedef Ref<NiPSysEmitterInitialRadiusCtlr> NiPSysEmitterInitialRadiusCtlrRef; - -/*! - * NiPSysEmitterInitialRadiusCtlr - Unknown. - */ - -class NIFLIB_API NiPSysEmitterInitialRadiusCtlr : public NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_PARENT { -public: - NiPSysEmitterInitialRadiusCtlr(); - ~NiPSysEmitterInitialRadiusCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_INITIAL_RADIUS_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.cpp b/NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.cpp deleted file mode 100755 index baa85cf..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterLifeSpanCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterLifeSpanCtlr::TYPE("NiPSysEmitterLifeSpanCtlr", &NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_PARENT::TypeConst() ); - -NiPSysEmitterLifeSpanCtlr::NiPSysEmitterLifeSpanCtlr() NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_CONSTRUCT {} - -NiPSysEmitterLifeSpanCtlr::~NiPSysEmitterLifeSpanCtlr() {} - -void NiPSysEmitterLifeSpanCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_READ -} - -void NiPSysEmitterLifeSpanCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_WRITE -} - -string NiPSysEmitterLifeSpanCtlr::asString( bool verbose ) const { - NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_STRING -} - -void NiPSysEmitterLifeSpanCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterLifeSpanCtlr::GetRefs() const { - NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_GETREFS -} - -const Type & NiPSysEmitterLifeSpanCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.h b/NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.h deleted file mode 100755 index e238b64..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterLifeSpanCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERLIFESPANCTLR_H_ -#define _NIPSYSEMITTERLIFESPANCTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysEmitterLifeSpanCtlr; -typedef Ref<NiPSysEmitterLifeSpanCtlr> NiPSysEmitterLifeSpanCtlrRef; - -/*! - * NiPSysEmitterLifeSpanCtlr - Unknown. - */ - -class NIFLIB_API NiPSysEmitterLifeSpanCtlr : public NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_PARENT { -public: - NiPSysEmitterLifeSpanCtlr(); - ~NiPSysEmitterLifeSpanCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_LIFE_SPAN_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.cpp b/NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.cpp deleted file mode 100755 index af2281b..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysEmitterSpeedCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysEmitterSpeedCtlr::TYPE("NiPSysEmitterSpeedCtlr", &NI_P_SYS_EMITTER_SPEED_CTLR_PARENT::TypeConst() ); - -NiPSysEmitterSpeedCtlr::NiPSysEmitterSpeedCtlr() NI_P_SYS_EMITTER_SPEED_CTLR_CONSTRUCT {} - -NiPSysEmitterSpeedCtlr::~NiPSysEmitterSpeedCtlr() {} - -void NiPSysEmitterSpeedCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_SPEED_CTLR_READ -} - -void NiPSysEmitterSpeedCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_EMITTER_SPEED_CTLR_WRITE -} - -string NiPSysEmitterSpeedCtlr::asString( bool verbose ) const { - NI_P_SYS_EMITTER_SPEED_CTLR_STRING -} - -void NiPSysEmitterSpeedCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_EMITTER_SPEED_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysEmitterSpeedCtlr::GetRefs() const { - NI_P_SYS_EMITTER_SPEED_CTLR_GETREFS -} - -const Type & NiPSysEmitterSpeedCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.h b/NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.h deleted file mode 100755 index 888799e..0000000 --- a/NifExport/niflib/obj/NiPSysEmitterSpeedCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSEMITTERSPEEDCTLR_H_ -#define _NIPSYSEMITTERSPEEDCTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysEmitterSpeedCtlr; -typedef Ref<NiPSysEmitterSpeedCtlr> NiPSysEmitterSpeedCtlrRef; - -/*! - * NiPSysEmitterSpeedCtlr - Unknown. - */ - -class NIFLIB_API NiPSysEmitterSpeedCtlr : public NI_P_SYS_EMITTER_SPEED_CTLR_PARENT { -public: - NiPSysEmitterSpeedCtlr(); - ~NiPSysEmitterSpeedCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_EMITTER_SPEED_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysGravityModifier.cpp b/NifExport/niflib/obj/NiPSysGravityModifier.cpp deleted file mode 100755 index cf49784..0000000 --- a/NifExport/niflib/obj/NiPSysGravityModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysGravityModifier.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysGravityModifier::TYPE("NiPSysGravityModifier", &NI_P_SYS_GRAVITY_MODIFIER_PARENT::TypeConst() ); - -NiPSysGravityModifier::NiPSysGravityModifier() NI_P_SYS_GRAVITY_MODIFIER_CONSTRUCT {} - -NiPSysGravityModifier::~NiPSysGravityModifier() {} - -void NiPSysGravityModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_GRAVITY_MODIFIER_READ -} - -void NiPSysGravityModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_GRAVITY_MODIFIER_WRITE -} - -string NiPSysGravityModifier::asString( bool verbose ) const { - NI_P_SYS_GRAVITY_MODIFIER_STRING -} - -void NiPSysGravityModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_GRAVITY_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysGravityModifier::GetRefs() const { - NI_P_SYS_GRAVITY_MODIFIER_GETREFS -} - -const Type & NiPSysGravityModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysGravityModifier.h b/NifExport/niflib/obj/NiPSysGravityModifier.h deleted file mode 100755 index faa9238..0000000 --- a/NifExport/niflib/obj/NiPSysGravityModifier.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSGRAVITYMODIFIER_H_ -#define _NIPSYSGRAVITYMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiPSysGravityModifier; -typedef Ref<NiPSysGravityModifier> NiPSysGravityModifierRef; - -/*! - * NiPSysGravityModifier - Unknown particle system modifier. - */ - -class NIFLIB_API NiPSysGravityModifier : public NI_P_SYS_GRAVITY_MODIFIER_PARENT { -public: - NiPSysGravityModifier(); - ~NiPSysGravityModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_GRAVITY_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysGravityStrengthCtlr.cpp b/NifExport/niflib/obj/NiPSysGravityStrengthCtlr.cpp deleted file mode 100755 index b0f827f..0000000 --- a/NifExport/niflib/obj/NiPSysGravityStrengthCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysGravityStrengthCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysGravityStrengthCtlr::TYPE("NiPSysGravityStrengthCtlr", &NI_P_SYS_GRAVITY_STRENGTH_CTLR_PARENT::TypeConst() ); - -NiPSysGravityStrengthCtlr::NiPSysGravityStrengthCtlr() NI_P_SYS_GRAVITY_STRENGTH_CTLR_CONSTRUCT {} - -NiPSysGravityStrengthCtlr::~NiPSysGravityStrengthCtlr() {} - -void NiPSysGravityStrengthCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_GRAVITY_STRENGTH_CTLR_READ -} - -void NiPSysGravityStrengthCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_GRAVITY_STRENGTH_CTLR_WRITE -} - -string NiPSysGravityStrengthCtlr::asString( bool verbose ) const { - NI_P_SYS_GRAVITY_STRENGTH_CTLR_STRING -} - -void NiPSysGravityStrengthCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_GRAVITY_STRENGTH_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysGravityStrengthCtlr::GetRefs() const { - NI_P_SYS_GRAVITY_STRENGTH_CTLR_GETREFS -} - -const Type & NiPSysGravityStrengthCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysGravityStrengthCtlr.h b/NifExport/niflib/obj/NiPSysGravityStrengthCtlr.h deleted file mode 100755 index 91b9472..0000000 --- a/NifExport/niflib/obj/NiPSysGravityStrengthCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSGRAVITYSTRENGTHCTLR_H_ -#define _NIPSYSGRAVITYSTRENGTHCTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysGravityStrengthCtlr; -typedef Ref<NiPSysGravityStrengthCtlr> NiPSysGravityStrengthCtlrRef; - -/*! - * NiPSysGravityStrengthCtlr - Unknown. - */ - -class NIFLIB_API NiPSysGravityStrengthCtlr : public NI_P_SYS_GRAVITY_STRENGTH_CTLR_PARENT { -public: - NiPSysGravityStrengthCtlr(); - ~NiPSysGravityStrengthCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_GRAVITY_STRENGTH_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysGrowFadeModifier.cpp b/NifExport/niflib/obj/NiPSysGrowFadeModifier.cpp deleted file mode 100755 index 056aec1..0000000 --- a/NifExport/niflib/obj/NiPSysGrowFadeModifier.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysGrowFadeModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysGrowFadeModifier::TYPE("NiPSysGrowFadeModifier", &NI_P_SYS_GROW_FADE_MODIFIER_PARENT::TypeConst() ); - -NiPSysGrowFadeModifier::NiPSysGrowFadeModifier() NI_P_SYS_GROW_FADE_MODIFIER_CONSTRUCT {} - -NiPSysGrowFadeModifier::~NiPSysGrowFadeModifier() {} - -void NiPSysGrowFadeModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_GROW_FADE_MODIFIER_READ -} - -void NiPSysGrowFadeModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_GROW_FADE_MODIFIER_WRITE -} - -string NiPSysGrowFadeModifier::asString( bool verbose ) const { - NI_P_SYS_GROW_FADE_MODIFIER_STRING -} - -void NiPSysGrowFadeModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_GROW_FADE_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysGrowFadeModifier::GetRefs() const { - NI_P_SYS_GROW_FADE_MODIFIER_GETREFS -} - -const Type & NiPSysGrowFadeModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysGrowFadeModifier.h b/NifExport/niflib/obj/NiPSysGrowFadeModifier.h deleted file mode 100755 index f738498..0000000 --- a/NifExport/niflib/obj/NiPSysGrowFadeModifier.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSGROWFADEMODIFIER_H_ -#define _NIPSYSGROWFADEMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysGrowFadeModifier; -typedef Ref<NiPSysGrowFadeModifier> NiPSysGrowFadeModifierRef; - -/*! - * NiPSysGrowFadeModifier - Unknown particle system modifier. - */ - -class NIFLIB_API NiPSysGrowFadeModifier : public NI_P_SYS_GROW_FADE_MODIFIER_PARENT { -public: - NiPSysGrowFadeModifier(); - ~NiPSysGrowFadeModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_GROW_FADE_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysMeshEmitter.cpp b/NifExport/niflib/obj/NiPSysMeshEmitter.cpp deleted file mode 100755 index 8db935b..0000000 --- a/NifExport/niflib/obj/NiPSysMeshEmitter.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysMeshEmitter.h" -#include "NiTriBasedGeom.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysMeshEmitter::TYPE("NiPSysMeshEmitter", &NI_P_SYS_MESH_EMITTER_PARENT::TypeConst() ); - -NiPSysMeshEmitter::NiPSysMeshEmitter() NI_P_SYS_MESH_EMITTER_CONSTRUCT {} - -NiPSysMeshEmitter::~NiPSysMeshEmitter() {} - -void NiPSysMeshEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MESH_EMITTER_READ -} - -void NiPSysMeshEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_MESH_EMITTER_WRITE -} - -string NiPSysMeshEmitter::asString( bool verbose ) const { - NI_P_SYS_MESH_EMITTER_STRING -} - -void NiPSysMeshEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MESH_EMITTER_FIXLINKS -} - -list<NiObjectRef> NiPSysMeshEmitter::GetRefs() const { - NI_P_SYS_MESH_EMITTER_GETREFS -} - -const Type & NiPSysMeshEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysMeshEmitter.h b/NifExport/niflib/obj/NiPSysMeshEmitter.h deleted file mode 100755 index e576aab..0000000 --- a/NifExport/niflib/obj/NiPSysMeshEmitter.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSMESHEMITTER_H_ -#define _NIPSYSMESHEMITTER_H_ - -#include "NiPSysEmitter.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTriBasedGeom; - -#include "../gen/obj_defines.h" - -class NiPSysMeshEmitter; -typedef Ref<NiPSysMeshEmitter> NiPSysMeshEmitterRef; - -/*! - * NiPSysMeshEmitter - Unknown. - */ - -class NIFLIB_API NiPSysMeshEmitter : public NI_P_SYS_MESH_EMITTER_PARENT { -public: - NiPSysMeshEmitter(); - ~NiPSysMeshEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_MESH_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysMeshUpdateModifier.cpp b/NifExport/niflib/obj/NiPSysMeshUpdateModifier.cpp deleted file mode 100755 index 08f9cb1..0000000 --- a/NifExport/niflib/obj/NiPSysMeshUpdateModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysMeshUpdateModifier.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysMeshUpdateModifier::TYPE("NiPSysMeshUpdateModifier", &NI_P_SYS_MESH_UPDATE_MODIFIER_PARENT::TypeConst() ); - -NiPSysMeshUpdateModifier::NiPSysMeshUpdateModifier() NI_P_SYS_MESH_UPDATE_MODIFIER_CONSTRUCT {} - -NiPSysMeshUpdateModifier::~NiPSysMeshUpdateModifier() {} - -void NiPSysMeshUpdateModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MESH_UPDATE_MODIFIER_READ -} - -void NiPSysMeshUpdateModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_MESH_UPDATE_MODIFIER_WRITE -} - -string NiPSysMeshUpdateModifier::asString( bool verbose ) const { - NI_P_SYS_MESH_UPDATE_MODIFIER_STRING -} - -void NiPSysMeshUpdateModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MESH_UPDATE_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysMeshUpdateModifier::GetRefs() const { - NI_P_SYS_MESH_UPDATE_MODIFIER_GETREFS -} - -const Type & NiPSysMeshUpdateModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysMeshUpdateModifier.h b/NifExport/niflib/obj/NiPSysMeshUpdateModifier.h deleted file mode 100755 index 975c818..0000000 --- a/NifExport/niflib/obj/NiPSysMeshUpdateModifier.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSMESHUPDATEMODIFIER_H_ -#define _NIPSYSMESHUPDATEMODIFIER_H_ - -#include "NiPSysModifier.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiPSysMeshUpdateModifier; -typedef Ref<NiPSysMeshUpdateModifier> NiPSysMeshUpdateModifierRef; - -/*! - * NiPSysMeshUpdateModifier - Unknown. - */ - -class NIFLIB_API NiPSysMeshUpdateModifier : public NI_P_SYS_MESH_UPDATE_MODIFIER_PARENT { -public: - NiPSysMeshUpdateModifier(); - ~NiPSysMeshUpdateModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_MESH_UPDATE_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysModifier.cpp b/NifExport/niflib/obj/NiPSysModifier.cpp deleted file mode 100755 index afe39a2..0000000 --- a/NifExport/niflib/obj/NiPSysModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysModifier.h" -#include "NiParticleSystem.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysModifier::TYPE("NiPSysModifier", &NI_P_SYS_MODIFIER_PARENT::TypeConst() ); - -NiPSysModifier::NiPSysModifier() NI_P_SYS_MODIFIER_CONSTRUCT {} - -NiPSysModifier::~NiPSysModifier() {} - -void NiPSysModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MODIFIER_READ -} - -void NiPSysModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_MODIFIER_WRITE -} - -string NiPSysModifier::asString( bool verbose ) const { - NI_P_SYS_MODIFIER_STRING -} - -void NiPSysModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysModifier::GetRefs() const { - NI_P_SYS_MODIFIER_GETREFS -} - -const Type & NiPSysModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysModifier.h b/NifExport/niflib/obj/NiPSysModifier.h deleted file mode 100755 index a3108d1..0000000 --- a/NifExport/niflib/obj/NiPSysModifier.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSMODIFIER_H_ -#define _NIPSYSMODIFIER_H_ - -#include "NiObject.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiParticleSystem; - -#include "../gen/obj_defines.h" - -class NiPSysModifier; -typedef Ref<NiPSysModifier> NiPSysModifierRef; - -/*! - * NiPSysModifier - Generic particle system modifier block. - */ - -class NIFLIB_API NiPSysModifier : public NI_P_SYS_MODIFIER_PARENT { -public: - NiPSysModifier(); - ~NiPSysModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysModifierActiveCtlr.cpp b/NifExport/niflib/obj/NiPSysModifierActiveCtlr.cpp deleted file mode 100755 index e62d482..0000000 --- a/NifExport/niflib/obj/NiPSysModifierActiveCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysModifierActiveCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysModifierActiveCtlr::TYPE("NiPSysModifierActiveCtlr", &NI_P_SYS_MODIFIER_ACTIVE_CTLR_PARENT::TypeConst() ); - -NiPSysModifierActiveCtlr::NiPSysModifierActiveCtlr() NI_P_SYS_MODIFIER_ACTIVE_CTLR_CONSTRUCT {} - -NiPSysModifierActiveCtlr::~NiPSysModifierActiveCtlr() {} - -void NiPSysModifierActiveCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MODIFIER_ACTIVE_CTLR_READ -} - -void NiPSysModifierActiveCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_MODIFIER_ACTIVE_CTLR_WRITE -} - -string NiPSysModifierActiveCtlr::asString( bool verbose ) const { - NI_P_SYS_MODIFIER_ACTIVE_CTLR_STRING -} - -void NiPSysModifierActiveCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_MODIFIER_ACTIVE_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysModifierActiveCtlr::GetRefs() const { - NI_P_SYS_MODIFIER_ACTIVE_CTLR_GETREFS -} - -const Type & NiPSysModifierActiveCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysModifierActiveCtlr.h b/NifExport/niflib/obj/NiPSysModifierActiveCtlr.h deleted file mode 100755 index ffae138..0000000 --- a/NifExport/niflib/obj/NiPSysModifierActiveCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSMODIFIERACTIVECTLR_H_ -#define _NIPSYSMODIFIERACTIVECTLR_H_ - -#include "APSysCtlr.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysModifierActiveCtlr; -typedef Ref<NiPSysModifierActiveCtlr> NiPSysModifierActiveCtlrRef; - -/*! - * NiPSysModifierActiveCtlr - Unknown. - */ - -class NIFLIB_API NiPSysModifierActiveCtlr : public NI_P_SYS_MODIFIER_ACTIVE_CTLR_PARENT { -public: - NiPSysModifierActiveCtlr(); - ~NiPSysModifierActiveCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_MODIFIER_ACTIVE_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysPlanarCollider.cpp b/NifExport/niflib/obj/NiPSysPlanarCollider.cpp deleted file mode 100755 index 89b71dc..0000000 --- a/NifExport/niflib/obj/NiPSysPlanarCollider.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysPlanarCollider.h" -#include "NiPSysSpawnModifier.h" -#include "NiObject.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysPlanarCollider::TYPE("NiPSysPlanarCollider", &NI_P_SYS_PLANAR_COLLIDER_PARENT::TypeConst() ); - -NiPSysPlanarCollider::NiPSysPlanarCollider() NI_P_SYS_PLANAR_COLLIDER_CONSTRUCT {} - -NiPSysPlanarCollider::~NiPSysPlanarCollider() {} - -void NiPSysPlanarCollider::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_PLANAR_COLLIDER_READ -} - -void NiPSysPlanarCollider::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_PLANAR_COLLIDER_WRITE -} - -string NiPSysPlanarCollider::asString( bool verbose ) const { - NI_P_SYS_PLANAR_COLLIDER_STRING -} - -void NiPSysPlanarCollider::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_PLANAR_COLLIDER_FIXLINKS -} - -list<NiObjectRef> NiPSysPlanarCollider::GetRefs() const { - NI_P_SYS_PLANAR_COLLIDER_GETREFS -} - -const Type & NiPSysPlanarCollider::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysPlanarCollider.h b/NifExport/niflib/obj/NiPSysPlanarCollider.h deleted file mode 100755 index 04fc744..0000000 --- a/NifExport/niflib/obj/NiPSysPlanarCollider.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSPLANARCOLLIDER_H_ -#define _NIPSYSPLANARCOLLIDER_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPSysSpawnModifier; -class NiObject; -class NiNode; - -#include "../gen/obj_defines.h" - -class NiPSysPlanarCollider; -typedef Ref<NiPSysPlanarCollider> NiPSysPlanarColliderRef; - -/*! - * NiPSysPlanarCollider - Unknown. - */ - -class NIFLIB_API NiPSysPlanarCollider : public NI_P_SYS_PLANAR_COLLIDER_PARENT { -public: - NiPSysPlanarCollider(); - ~NiPSysPlanarCollider(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_PLANAR_COLLIDER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysPositionModifier.cpp b/NifExport/niflib/obj/NiPSysPositionModifier.cpp deleted file mode 100755 index f45aea3..0000000 --- a/NifExport/niflib/obj/NiPSysPositionModifier.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysPositionModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysPositionModifier::TYPE("NiPSysPositionModifier", &NI_P_SYS_POSITION_MODIFIER_PARENT::TypeConst() ); - -NiPSysPositionModifier::NiPSysPositionModifier() NI_P_SYS_POSITION_MODIFIER_CONSTRUCT {} - -NiPSysPositionModifier::~NiPSysPositionModifier() {} - -void NiPSysPositionModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_POSITION_MODIFIER_READ -} - -void NiPSysPositionModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_POSITION_MODIFIER_WRITE -} - -string NiPSysPositionModifier::asString( bool verbose ) const { - NI_P_SYS_POSITION_MODIFIER_STRING -} - -void NiPSysPositionModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_POSITION_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysPositionModifier::GetRefs() const { - NI_P_SYS_POSITION_MODIFIER_GETREFS -} - -const Type & NiPSysPositionModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysPositionModifier.h b/NifExport/niflib/obj/NiPSysPositionModifier.h deleted file mode 100755 index d57e265..0000000 --- a/NifExport/niflib/obj/NiPSysPositionModifier.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSPOSITIONMODIFIER_H_ -#define _NIPSYSPOSITIONMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysPositionModifier; -typedef Ref<NiPSysPositionModifier> NiPSysPositionModifierRef; - -/*! - * NiPSysPositionModifier - Unknown particle system modifier. - */ - -class NIFLIB_API NiPSysPositionModifier : public NI_P_SYS_POSITION_MODIFIER_PARENT { -public: - NiPSysPositionModifier(); - ~NiPSysPositionModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_POSITION_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysResetOnLoopCtlr.cpp b/NifExport/niflib/obj/NiPSysResetOnLoopCtlr.cpp deleted file mode 100755 index 6880c46..0000000 --- a/NifExport/niflib/obj/NiPSysResetOnLoopCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysResetOnLoopCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysResetOnLoopCtlr::TYPE("NiPSysResetOnLoopCtlr", &NI_P_SYS_RESET_ON_LOOP_CTLR_PARENT::TypeConst() ); - -NiPSysResetOnLoopCtlr::NiPSysResetOnLoopCtlr() NI_P_SYS_RESET_ON_LOOP_CTLR_CONSTRUCT {} - -NiPSysResetOnLoopCtlr::~NiPSysResetOnLoopCtlr() {} - -void NiPSysResetOnLoopCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_RESET_ON_LOOP_CTLR_READ -} - -void NiPSysResetOnLoopCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_RESET_ON_LOOP_CTLR_WRITE -} - -string NiPSysResetOnLoopCtlr::asString( bool verbose ) const { - NI_P_SYS_RESET_ON_LOOP_CTLR_STRING -} - -void NiPSysResetOnLoopCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_RESET_ON_LOOP_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysResetOnLoopCtlr::GetRefs() const { - NI_P_SYS_RESET_ON_LOOP_CTLR_GETREFS -} - -const Type & NiPSysResetOnLoopCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysResetOnLoopCtlr.h b/NifExport/niflib/obj/NiPSysResetOnLoopCtlr.h deleted file mode 100755 index 101f1a3..0000000 --- a/NifExport/niflib/obj/NiPSysResetOnLoopCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSRESETONLOOPCTLR_H_ -#define _NIPSYSRESETONLOOPCTLR_H_ - -#include "NiTimeController.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysResetOnLoopCtlr; -typedef Ref<NiPSysResetOnLoopCtlr> NiPSysResetOnLoopCtlrRef; - -/*! - * NiPSysResetOnLoopCtlr - Unknown. - */ - -class NIFLIB_API NiPSysResetOnLoopCtlr : public NI_P_SYS_RESET_ON_LOOP_CTLR_PARENT { -public: - NiPSysResetOnLoopCtlr(); - ~NiPSysResetOnLoopCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_RESET_ON_LOOP_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysRotationModifier.cpp b/NifExport/niflib/obj/NiPSysRotationModifier.cpp deleted file mode 100755 index 5c3b9d0..0000000 --- a/NifExport/niflib/obj/NiPSysRotationModifier.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysRotationModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysRotationModifier::TYPE("NiPSysRotationModifier", &NI_P_SYS_ROTATION_MODIFIER_PARENT::TypeConst() ); - -NiPSysRotationModifier::NiPSysRotationModifier() NI_P_SYS_ROTATION_MODIFIER_CONSTRUCT {} - -NiPSysRotationModifier::~NiPSysRotationModifier() {} - -void NiPSysRotationModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_ROTATION_MODIFIER_READ -} - -void NiPSysRotationModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_ROTATION_MODIFIER_WRITE -} - -string NiPSysRotationModifier::asString( bool verbose ) const { - NI_P_SYS_ROTATION_MODIFIER_STRING -} - -void NiPSysRotationModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_ROTATION_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysRotationModifier::GetRefs() const { - NI_P_SYS_ROTATION_MODIFIER_GETREFS -} - -const Type & NiPSysRotationModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysRotationModifier.h b/NifExport/niflib/obj/NiPSysRotationModifier.h deleted file mode 100755 index c7af7d9..0000000 --- a/NifExport/niflib/obj/NiPSysRotationModifier.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSROTATIONMODIFIER_H_ -#define _NIPSYSROTATIONMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysRotationModifier; -typedef Ref<NiPSysRotationModifier> NiPSysRotationModifierRef; - -/*! - * NiPSysRotationModifier - Unknown particle system modifier. - */ - -class NIFLIB_API NiPSysRotationModifier : public NI_P_SYS_ROTATION_MODIFIER_PARENT { -public: - NiPSysRotationModifier(); - ~NiPSysRotationModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_ROTATION_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysSpawnModifier.cpp b/NifExport/niflib/obj/NiPSysSpawnModifier.cpp deleted file mode 100755 index b6f762f..0000000 --- a/NifExport/niflib/obj/NiPSysSpawnModifier.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysSpawnModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysSpawnModifier::TYPE("NiPSysSpawnModifier", &NI_P_SYS_SPAWN_MODIFIER_PARENT::TypeConst() ); - -NiPSysSpawnModifier::NiPSysSpawnModifier() NI_P_SYS_SPAWN_MODIFIER_CONSTRUCT {} - -NiPSysSpawnModifier::~NiPSysSpawnModifier() {} - -void NiPSysSpawnModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_SPAWN_MODIFIER_READ -} - -void NiPSysSpawnModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_SPAWN_MODIFIER_WRITE -} - -string NiPSysSpawnModifier::asString( bool verbose ) const { - NI_P_SYS_SPAWN_MODIFIER_STRING -} - -void NiPSysSpawnModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_SPAWN_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiPSysSpawnModifier::GetRefs() const { - NI_P_SYS_SPAWN_MODIFIER_GETREFS -} - -const Type & NiPSysSpawnModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysSpawnModifier.h b/NifExport/niflib/obj/NiPSysSpawnModifier.h deleted file mode 100755 index b72592d..0000000 --- a/NifExport/niflib/obj/NiPSysSpawnModifier.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSSPAWNMODIFIER_H_ -#define _NIPSYSSPAWNMODIFIER_H_ - -#include "NiPSysModifier.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysSpawnModifier; -typedef Ref<NiPSysSpawnModifier> NiPSysSpawnModifierRef; - -/*! - * NiPSysSpawnModifier - Unknown particle modifier. - */ - -class NIFLIB_API NiPSysSpawnModifier : public NI_P_SYS_SPAWN_MODIFIER_PARENT { -public: - NiPSysSpawnModifier(); - ~NiPSysSpawnModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_SPAWN_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysSphereEmitter.cpp b/NifExport/niflib/obj/NiPSysSphereEmitter.cpp deleted file mode 100755 index 30e2913..0000000 --- a/NifExport/niflib/obj/NiPSysSphereEmitter.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysSphereEmitter.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysSphereEmitter::TYPE("NiPSysSphereEmitter", &NI_P_SYS_SPHERE_EMITTER_PARENT::TypeConst() ); - -NiPSysSphereEmitter::NiPSysSphereEmitter() NI_P_SYS_SPHERE_EMITTER_CONSTRUCT {} - -NiPSysSphereEmitter::~NiPSysSphereEmitter() {} - -void NiPSysSphereEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_SPHERE_EMITTER_READ -} - -void NiPSysSphereEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_SPHERE_EMITTER_WRITE -} - -string NiPSysSphereEmitter::asString( bool verbose ) const { - NI_P_SYS_SPHERE_EMITTER_STRING -} - -void NiPSysSphereEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_SPHERE_EMITTER_FIXLINKS -} - -list<NiObjectRef> NiPSysSphereEmitter::GetRefs() const { - NI_P_SYS_SPHERE_EMITTER_GETREFS -} - -const Type & NiPSysSphereEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysSphereEmitter.h b/NifExport/niflib/obj/NiPSysSphereEmitter.h deleted file mode 100755 index 037275a..0000000 --- a/NifExport/niflib/obj/NiPSysSphereEmitter.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSSPHEREEMITTER_H_ -#define _NIPSYSSPHEREEMITTER_H_ - -#include "NiPSysVolumeEmitter.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPSysSphereEmitter; -typedef Ref<NiPSysSphereEmitter> NiPSysSphereEmitterRef; - -/*! - * NiPSysSphereEmitter - Unknown. - */ - -class NIFLIB_API NiPSysSphereEmitter : public NI_P_SYS_SPHERE_EMITTER_PARENT { -public: - NiPSysSphereEmitter(); - ~NiPSysSphereEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_SPHERE_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysUpdateCtlr.cpp b/NifExport/niflib/obj/NiPSysUpdateCtlr.cpp deleted file mode 100755 index 09140e4..0000000 --- a/NifExport/niflib/obj/NiPSysUpdateCtlr.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysUpdateCtlr.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysUpdateCtlr::TYPE("NiPSysUpdateCtlr", &NI_P_SYS_UPDATE_CTLR_PARENT::TypeConst() ); - -NiPSysUpdateCtlr::NiPSysUpdateCtlr() NI_P_SYS_UPDATE_CTLR_CONSTRUCT {} - -NiPSysUpdateCtlr::~NiPSysUpdateCtlr() {} - -void NiPSysUpdateCtlr::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_UPDATE_CTLR_READ -} - -void NiPSysUpdateCtlr::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_UPDATE_CTLR_WRITE -} - -string NiPSysUpdateCtlr::asString( bool verbose ) const { - NI_P_SYS_UPDATE_CTLR_STRING -} - -void NiPSysUpdateCtlr::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_UPDATE_CTLR_FIXLINKS -} - -list<NiObjectRef> NiPSysUpdateCtlr::GetRefs() const { - NI_P_SYS_UPDATE_CTLR_GETREFS -} - -const Type & NiPSysUpdateCtlr::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysUpdateCtlr.h b/NifExport/niflib/obj/NiPSysUpdateCtlr.h deleted file mode 100755 index 037bf13..0000000 --- a/NifExport/niflib/obj/NiPSysUpdateCtlr.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSUPDATECTLR_H_ -#define _NIPSYSUPDATECTLR_H_ - -#include "NiTimeController.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPSysUpdateCtlr; -typedef Ref<NiPSysUpdateCtlr> NiPSysUpdateCtlrRef; - -/*! - * NiPSysUpdateCtlr - Particle system controller, used for ???. - */ - -class NIFLIB_API NiPSysUpdateCtlr : public NI_P_SYS_UPDATE_CTLR_PARENT { -public: - NiPSysUpdateCtlr(); - ~NiPSysUpdateCtlr(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_UPDATE_CTLR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPSysVolumeEmitter.cpp b/NifExport/niflib/obj/NiPSysVolumeEmitter.cpp deleted file mode 100755 index d791054..0000000 --- a/NifExport/niflib/obj/NiPSysVolumeEmitter.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPSysVolumeEmitter.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPSysVolumeEmitter::TYPE("NiPSysVolumeEmitter", &NI_P_SYS_VOLUME_EMITTER_PARENT::TypeConst() ); - -NiPSysVolumeEmitter::NiPSysVolumeEmitter() NI_P_SYS_VOLUME_EMITTER_CONSTRUCT {} - -NiPSysVolumeEmitter::~NiPSysVolumeEmitter() {} - -void NiPSysVolumeEmitter::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_VOLUME_EMITTER_READ -} - -void NiPSysVolumeEmitter::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_P_SYS_VOLUME_EMITTER_WRITE -} - -string NiPSysVolumeEmitter::asString( bool verbose ) const { - NI_P_SYS_VOLUME_EMITTER_STRING -} - -void NiPSysVolumeEmitter::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_P_SYS_VOLUME_EMITTER_FIXLINKS -} - -list<NiObjectRef> NiPSysVolumeEmitter::GetRefs() const { - NI_P_SYS_VOLUME_EMITTER_GETREFS -} - -const Type & NiPSysVolumeEmitter::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPSysVolumeEmitter.h b/NifExport/niflib/obj/NiPSysVolumeEmitter.h deleted file mode 100755 index a706945..0000000 --- a/NifExport/niflib/obj/NiPSysVolumeEmitter.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPSYSVOLUMEEMITTER_H_ -#define _NIPSYSVOLUMEEMITTER_H_ - -#include "NiPSysEmitter.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiNode; - -#include "../gen/obj_defines.h" - -class NiPSysVolumeEmitter; -typedef Ref<NiPSysVolumeEmitter> NiPSysVolumeEmitterRef; - -/*! - * NiPSysVolumeEmitter - An emitter that emits meshes? - */ - -class NIFLIB_API NiPSysVolumeEmitter : public NI_P_SYS_VOLUME_EMITTER_PARENT { -public: - NiPSysVolumeEmitter(); - ~NiPSysVolumeEmitter(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_P_SYS_VOLUME_EMITTER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPalette.cpp b/NifExport/niflib/obj/NiPalette.cpp deleted file mode 100755 index 8d22a81..0000000 --- a/NifExport/niflib/obj/NiPalette.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPalette.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPalette::TYPE("NiPalette", &NI_PALETTE_PARENT::TypeConst() ); - -NiPalette::NiPalette() NI_PALETTE_CONSTRUCT {} - -NiPalette::~NiPalette() {} - -void NiPalette::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PALETTE_READ -} - -void NiPalette::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PALETTE_WRITE -} - -string NiPalette::asString( bool verbose ) const { - NI_PALETTE_STRING -} - -void NiPalette::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PALETTE_FIXLINKS -} - -list<NiObjectRef> NiPalette::GetRefs() const { - NI_PALETTE_GETREFS -} - -const Type & NiPalette::GetType() const { - return TYPE; -}; - -vector<Color4> NiPalette::GetPalette() const { - vector<Color4> color_pal(256); - - for ( uint i = 0; i < 256; ++i ) { - - color_pal[i].r = float(palette[i][0]) / 255.0f; - color_pal[i].g = float(palette[i][1]) / 255.0f; - color_pal[i].b = float(palette[i][2]) / 255.0f; - color_pal[i].a = float(palette[i][3]) / 255.0f; - } - - return color_pal; -} - -void NiPalette::SetPalette( const vector<Color4> & new_pal ) { - if ( new_pal.size() != 256 ) { - throw runtime_error( "Palette size must be 256" ); - } - - for ( uint i = 0; i < 256; ++i ) { - palette[i][0] = int( new_pal[i].r * 255.0f ); - palette[i][1] = int( new_pal[i].g * 255.0f ); - palette[i][2] = int( new_pal[i].b * 255.0f ); - palette[i][3] = int( new_pal[i].a * 255.0f ); - } -} diff --git a/NifExport/niflib/obj/NiPalette.h b/NifExport/niflib/obj/NiPalette.h deleted file mode 100755 index 9ababc3..0000000 --- a/NifExport/niflib/obj/NiPalette.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPALETTE_H_ -#define _NIPALETTE_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPalette; -typedef Ref<NiPalette> NiPaletteRef; - -/*! - * NiPalette - A color palette. - */ - -class NIFLIB_API NiPalette : public NI_PALETTE_PARENT { -public: - NiPalette(); - ~NiPalette(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the palette data from this palette block. - * \return A vector containing the the colors stored in the palette. - * \sa NiPalette::SetPalette - */ - vector<Color4> GetPalette() const; - - /*! Sets the palette data for this palette block. - * \param new_pal A vector containing the the new colors to be stored in the palette. - * \sa NiPalette::GetPalette - */ - void SetPalette( const vector<Color4> & new_pal ); -protected: - NI_PALETTE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleBomb.cpp b/NifExport/niflib/obj/NiParticleBomb.cpp deleted file mode 100755 index 41eab7f..0000000 --- a/NifExport/niflib/obj/NiParticleBomb.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleBomb.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleBomb::TYPE("NiParticleBomb", &NI_PARTICLE_BOMB_PARENT::TypeConst() ); - -NiParticleBomb::NiParticleBomb() NI_PARTICLE_BOMB_CONSTRUCT {} - -NiParticleBomb::~NiParticleBomb() {} - -void NiParticleBomb::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_BOMB_READ -} - -void NiParticleBomb::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_BOMB_WRITE -} - -string NiParticleBomb::asString( bool verbose ) const { - NI_PARTICLE_BOMB_STRING -} - -void NiParticleBomb::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_BOMB_FIXLINKS -} - -list<NiObjectRef> NiParticleBomb::GetRefs() const { - NI_PARTICLE_BOMB_GETREFS -} - -const Type & NiParticleBomb::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleBomb.h b/NifExport/niflib/obj/NiParticleBomb.h deleted file mode 100755 index 804c16b..0000000 --- a/NifExport/niflib/obj/NiParticleBomb.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLEBOMB_H_ -#define _NIPARTICLEBOMB_H_ - -#include "AParticleModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiParticleBomb; -typedef Ref<NiParticleBomb> NiParticleBombRef; - -/*! - * NiParticleBomb - A particle modifier. - */ - -class NIFLIB_API NiParticleBomb : public NI_PARTICLE_BOMB_PARENT { -public: - NiParticleBomb(); - ~NiParticleBomb(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_BOMB_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleColorModifier.cpp b/NifExport/niflib/obj/NiParticleColorModifier.cpp deleted file mode 100755 index 3ffda74..0000000 --- a/NifExport/niflib/obj/NiParticleColorModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleColorModifier.h" -#include "NiColorData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleColorModifier::TYPE("NiParticleColorModifier", &NI_PARTICLE_COLOR_MODIFIER_PARENT::TypeConst() ); - -NiParticleColorModifier::NiParticleColorModifier() NI_PARTICLE_COLOR_MODIFIER_CONSTRUCT {} - -NiParticleColorModifier::~NiParticleColorModifier() {} - -void NiParticleColorModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_COLOR_MODIFIER_READ -} - -void NiParticleColorModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_COLOR_MODIFIER_WRITE -} - -string NiParticleColorModifier::asString( bool verbose ) const { - NI_PARTICLE_COLOR_MODIFIER_STRING -} - -void NiParticleColorModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_COLOR_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiParticleColorModifier::GetRefs() const { - NI_PARTICLE_COLOR_MODIFIER_GETREFS -} - -const Type & NiParticleColorModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleColorModifier.h b/NifExport/niflib/obj/NiParticleColorModifier.h deleted file mode 100755 index ba06ed9..0000000 --- a/NifExport/niflib/obj/NiParticleColorModifier.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLECOLORMODIFIER_H_ -#define _NIPARTICLECOLORMODIFIER_H_ - -#include "AParticleModifier.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiColorData; - -#include "../gen/obj_defines.h" - -class NiParticleColorModifier; -typedef Ref<NiParticleColorModifier> NiParticleColorModifierRef; - -/*! - * NiParticleColorModifier - Unknown. - */ - -class NIFLIB_API NiParticleColorModifier : public NI_PARTICLE_COLOR_MODIFIER_PARENT { -public: - NiParticleColorModifier(); - ~NiParticleColorModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_COLOR_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleGrowFade.cpp b/NifExport/niflib/obj/NiParticleGrowFade.cpp deleted file mode 100755 index 0b8be02..0000000 --- a/NifExport/niflib/obj/NiParticleGrowFade.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleGrowFade.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleGrowFade::TYPE("NiParticleGrowFade", &NI_PARTICLE_GROW_FADE_PARENT::TypeConst() ); - -NiParticleGrowFade::NiParticleGrowFade() NI_PARTICLE_GROW_FADE_CONSTRUCT {} - -NiParticleGrowFade::~NiParticleGrowFade() {} - -void NiParticleGrowFade::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_GROW_FADE_READ -} - -void NiParticleGrowFade::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_GROW_FADE_WRITE -} - -string NiParticleGrowFade::asString( bool verbose ) const { - NI_PARTICLE_GROW_FADE_STRING -} - -void NiParticleGrowFade::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_GROW_FADE_FIXLINKS -} - -list<NiObjectRef> NiParticleGrowFade::GetRefs() const { - NI_PARTICLE_GROW_FADE_GETREFS -} - -const Type & NiParticleGrowFade::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleGrowFade.h b/NifExport/niflib/obj/NiParticleGrowFade.h deleted file mode 100755 index fe70404..0000000 --- a/NifExport/niflib/obj/NiParticleGrowFade.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLEGROWFADE_H_ -#define _NIPARTICLEGROWFADE_H_ - -#include "AParticleModifier.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiParticleGrowFade; -typedef Ref<NiParticleGrowFade> NiParticleGrowFadeRef; - -/*! - * NiParticleGrowFade - This particle system modifier controls the - * particle size. If it is present the particles start with size 0.0 . - * Then they grow to their original size and stay there until they fade - * to zero size again at the end of their lifetime cycle. - */ - -class NIFLIB_API NiParticleGrowFade : public NI_PARTICLE_GROW_FADE_PARENT { -public: - NiParticleGrowFade(); - ~NiParticleGrowFade(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_GROW_FADE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleMeshModifier.cpp b/NifExport/niflib/obj/NiParticleMeshModifier.cpp deleted file mode 100755 index 49f3089..0000000 --- a/NifExport/niflib/obj/NiParticleMeshModifier.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleMeshModifier.h" -#include "NiAVObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleMeshModifier::TYPE("NiParticleMeshModifier", &NI_PARTICLE_MESH_MODIFIER_PARENT::TypeConst() ); - -NiParticleMeshModifier::NiParticleMeshModifier() NI_PARTICLE_MESH_MODIFIER_CONSTRUCT {} - -NiParticleMeshModifier::~NiParticleMeshModifier() {} - -void NiParticleMeshModifier::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_MESH_MODIFIER_READ -} - -void NiParticleMeshModifier::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_MESH_MODIFIER_WRITE -} - -string NiParticleMeshModifier::asString( bool verbose ) const { - NI_PARTICLE_MESH_MODIFIER_STRING -} - -void NiParticleMeshModifier::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_MESH_MODIFIER_FIXLINKS -} - -list<NiObjectRef> NiParticleMeshModifier::GetRefs() const { - NI_PARTICLE_MESH_MODIFIER_GETREFS -} - -const Type & NiParticleMeshModifier::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleMeshModifier.h b/NifExport/niflib/obj/NiParticleMeshModifier.h deleted file mode 100755 index a839328..0000000 --- a/NifExport/niflib/obj/NiParticleMeshModifier.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLEMESHMODIFIER_H_ -#define _NIPARTICLEMESHMODIFIER_H_ - -#include "AParticleModifier.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; - -#include "../gen/obj_defines.h" - -class NiParticleMeshModifier; -typedef Ref<NiParticleMeshModifier> NiParticleMeshModifierRef; - -/*! - * NiParticleMeshModifier - Unknown. - */ - -class NIFLIB_API NiParticleMeshModifier : public NI_PARTICLE_MESH_MODIFIER_PARENT { -public: - NiParticleMeshModifier(); - ~NiParticleMeshModifier(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_MESH_MODIFIER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleMeshes.cpp b/NifExport/niflib/obj/NiParticleMeshes.cpp deleted file mode 100755 index c721155..0000000 --- a/NifExport/niflib/obj/NiParticleMeshes.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleMeshes.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleMeshes::TYPE("NiParticleMeshes", &NI_PARTICLE_MESHES_PARENT::TypeConst() ); - -NiParticleMeshes::NiParticleMeshes() NI_PARTICLE_MESHES_CONSTRUCT {} - -NiParticleMeshes::~NiParticleMeshes() {} - -void NiParticleMeshes::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_MESHES_READ -} - -void NiParticleMeshes::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_MESHES_WRITE -} - -string NiParticleMeshes::asString( bool verbose ) const { - NI_PARTICLE_MESHES_STRING -} - -void NiParticleMeshes::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_MESHES_FIXLINKS -} - -list<NiObjectRef> NiParticleMeshes::GetRefs() const { - NI_PARTICLE_MESHES_GETREFS -} - -const Type & NiParticleMeshes::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleMeshes.h b/NifExport/niflib/obj/NiParticleMeshes.h deleted file mode 100755 index 2e6f1b7..0000000 --- a/NifExport/niflib/obj/NiParticleMeshes.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLEMESHES_H_ -#define _NIPARTICLEMESHES_H_ - -#include "NiParticles.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiParticleMeshes; -typedef Ref<NiParticleMeshes> NiParticleMeshesRef; - -/*! - * NiParticleMeshes - Mesh particle node? - */ - -class NIFLIB_API NiParticleMeshes : public NI_PARTICLE_MESHES_PARENT { -public: - NiParticleMeshes(); - ~NiParticleMeshes(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_MESHES_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleMeshesData.cpp b/NifExport/niflib/obj/NiParticleMeshesData.cpp deleted file mode 100755 index 147d11a..0000000 --- a/NifExport/niflib/obj/NiParticleMeshesData.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleMeshesData.h" -#include "NiAVObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleMeshesData::TYPE("NiParticleMeshesData", &NI_PARTICLE_MESHES_DATA_PARENT::TypeConst() ); - -NiParticleMeshesData::NiParticleMeshesData() NI_PARTICLE_MESHES_DATA_CONSTRUCT {} - -NiParticleMeshesData::~NiParticleMeshesData() {} - -void NiParticleMeshesData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_MESHES_DATA_READ -} - -void NiParticleMeshesData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_MESHES_DATA_WRITE -} - -string NiParticleMeshesData::asString( bool verbose ) const { - NI_PARTICLE_MESHES_DATA_STRING -} - -void NiParticleMeshesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_MESHES_DATA_FIXLINKS -} - -list<NiObjectRef> NiParticleMeshesData::GetRefs() const { - NI_PARTICLE_MESHES_DATA_GETREFS -} - -const Type & NiParticleMeshesData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleMeshesData.h b/NifExport/niflib/obj/NiParticleMeshesData.h deleted file mode 100755 index 17708a4..0000000 --- a/NifExport/niflib/obj/NiParticleMeshesData.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLEMESHESDATA_H_ -#define _NIPARTICLEMESHESDATA_H_ - -#include "NiParticlesData.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiAVObject; - -#include "../gen/obj_defines.h" - -class NiParticleMeshesData; -typedef Ref<NiParticleMeshesData> NiParticleMeshesDataRef; - -/*! - * NiParticleMeshesData - Particle meshes data. - */ - -class NIFLIB_API NiParticleMeshesData : public NI_PARTICLE_MESHES_DATA_PARENT { -public: - NiParticleMeshesData(); - ~NiParticleMeshesData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_MESHES_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleRotation.cpp b/NifExport/niflib/obj/NiParticleRotation.cpp deleted file mode 100755 index 04e8e10..0000000 --- a/NifExport/niflib/obj/NiParticleRotation.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleRotation.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleRotation::TYPE("NiParticleRotation", &NI_PARTICLE_ROTATION_PARENT::TypeConst() ); - -NiParticleRotation::NiParticleRotation() NI_PARTICLE_ROTATION_CONSTRUCT {} - -NiParticleRotation::~NiParticleRotation() {} - -void NiParticleRotation::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_ROTATION_READ -} - -void NiParticleRotation::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_ROTATION_WRITE -} - -string NiParticleRotation::asString( bool verbose ) const { - NI_PARTICLE_ROTATION_STRING -} - -void NiParticleRotation::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_ROTATION_FIXLINKS -} - -list<NiObjectRef> NiParticleRotation::GetRefs() const { - NI_PARTICLE_ROTATION_GETREFS -} - -const Type & NiParticleRotation::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleRotation.h b/NifExport/niflib/obj/NiParticleRotation.h deleted file mode 100755 index b0f7a3f..0000000 --- a/NifExport/niflib/obj/NiParticleRotation.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLEROTATION_H_ -#define _NIPARTICLEROTATION_H_ - -#include "AParticleModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiParticleRotation; -typedef Ref<NiParticleRotation> NiParticleRotationRef; - -/*! - * NiParticleRotation - Unknown. - */ - -class NIFLIB_API NiParticleRotation : public NI_PARTICLE_ROTATION_PARENT { -public: - NiParticleRotation(); - ~NiParticleRotation(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_ROTATION_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleSystem.cpp b/NifExport/niflib/obj/NiParticleSystem.cpp deleted file mode 100755 index 9221021..0000000 --- a/NifExport/niflib/obj/NiParticleSystem.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleSystem.h" -#include "NiPSysModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleSystem::TYPE("NiParticleSystem", &NI_PARTICLE_SYSTEM_PARENT::TypeConst() ); - -NiParticleSystem::NiParticleSystem() NI_PARTICLE_SYSTEM_CONSTRUCT {} - -NiParticleSystem::~NiParticleSystem() {} - -void NiParticleSystem::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_SYSTEM_READ -} - -void NiParticleSystem::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_SYSTEM_WRITE -} - -string NiParticleSystem::asString( bool verbose ) const { - NI_PARTICLE_SYSTEM_STRING -} - -void NiParticleSystem::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_SYSTEM_FIXLINKS -} - -list<NiObjectRef> NiParticleSystem::GetRefs() const { - NI_PARTICLE_SYSTEM_GETREFS -} - -const Type & NiParticleSystem::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleSystem.h b/NifExport/niflib/obj/NiParticleSystem.h deleted file mode 100755 index cf0f71e..0000000 --- a/NifExport/niflib/obj/NiParticleSystem.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLESYSTEM_H_ -#define _NIPARTICLESYSTEM_H_ - -#include "NiParticles.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPSysModifier; - -#include "../gen/obj_defines.h" - -class NiParticleSystem; -typedef Ref<NiParticleSystem> NiParticleSystemRef; - -/*! - * NiParticleSystem - A particle system. - */ - -class NIFLIB_API NiParticleSystem : public NI_PARTICLE_SYSTEM_PARENT { -public: - NiParticleSystem(); - ~NiParticleSystem(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLE_SYSTEM_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticleSystemController.cpp b/NifExport/niflib/obj/NiParticleSystemController.cpp deleted file mode 100755 index 40c7542..0000000 --- a/NifExport/niflib/obj/NiParticleSystemController.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticleSystemController.h" -#include "../gen/Particle.h" -#include "NiObject.h" -#include "AParticleModifier.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticleSystemController::TYPE("NiParticleSystemController", &NI_PARTICLE_SYSTEM_CONTROLLER_PARENT::TypeConst() ); - -NiParticleSystemController::NiParticleSystemController() NI_PARTICLE_SYSTEM_CONTROLLER_CONSTRUCT {} - -NiParticleSystemController::~NiParticleSystemController() {} - -void NiParticleSystemController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_SYSTEM_CONTROLLER_READ -} - -void NiParticleSystemController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLE_SYSTEM_CONTROLLER_WRITE -} - -string NiParticleSystemController::asString( bool verbose ) const { - NI_PARTICLE_SYSTEM_CONTROLLER_STRING -} - -void NiParticleSystemController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLE_SYSTEM_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiParticleSystemController::GetRefs() const { - NI_PARTICLE_SYSTEM_CONTROLLER_GETREFS -} - -const Type & NiParticleSystemController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticleSystemController.h b/NifExport/niflib/obj/NiParticleSystemController.h deleted file mode 100755 index c0febfd..0000000 --- a/NifExport/niflib/obj/NiParticleSystemController.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLESYSTEMCONTROLLER_H_ -#define _NIPARTICLESYSTEMCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -#include "../gen/Particle.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; -class AParticleModifier; - -#include "../gen/obj_defines.h" - -class NiParticleSystemController; -typedef Ref<NiParticleSystemController> NiParticleSystemControllerRef; - -/*! - * NiParticleSystemController - A generic particle system time controller - * block. - */ - -class NIFLIB_API NiParticleSystemController : public NI_PARTICLE_SYSTEM_CONTROLLER_PARENT { -public: - NiParticleSystemController(); - ~NiParticleSystemController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - //TODO: This controller is not a priority and it has a lot of unknown data. -protected: - NI_PARTICLE_SYSTEM_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticles.cpp b/NifExport/niflib/obj/NiParticles.cpp deleted file mode 100755 index ad540b6..0000000 --- a/NifExport/niflib/obj/NiParticles.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticles.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticles::TYPE("NiParticles", &NI_PARTICLES_PARENT::TypeConst() ); - -NiParticles::NiParticles() NI_PARTICLES_CONSTRUCT {} - -NiParticles::~NiParticles() {} - -void NiParticles::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLES_READ -} - -void NiParticles::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLES_WRITE -} - -string NiParticles::asString( bool verbose ) const { - NI_PARTICLES_STRING -} - -void NiParticles::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLES_FIXLINKS -} - -list<NiObjectRef> NiParticles::GetRefs() const { - NI_PARTICLES_GETREFS -} - -const Type & NiParticles::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticles.h b/NifExport/niflib/obj/NiParticles.h deleted file mode 100755 index 37cf037..0000000 --- a/NifExport/niflib/obj/NiParticles.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLES_H_ -#define _NIPARTICLES_H_ - -#include "NiTriBasedGeom.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiParticles; -typedef Ref<NiParticles> NiParticlesRef; - -/*! - * NiParticles - Generic particle system node. - */ - -class NIFLIB_API NiParticles : public NI_PARTICLES_PARENT { -public: - NiParticles(); - ~NiParticles(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLES_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiParticlesData.cpp b/NifExport/niflib/obj/NiParticlesData.cpp deleted file mode 100755 index a64ef8d..0000000 --- a/NifExport/niflib/obj/NiParticlesData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiParticlesData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiParticlesData::TYPE("NiParticlesData", &NI_PARTICLES_DATA_PARENT::TypeConst() ); - -NiParticlesData::NiParticlesData() NI_PARTICLES_DATA_CONSTRUCT {} - -NiParticlesData::~NiParticlesData() {} - -void NiParticlesData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLES_DATA_READ -} - -void NiParticlesData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PARTICLES_DATA_WRITE -} - -string NiParticlesData::asString( bool verbose ) const { - NI_PARTICLES_DATA_STRING -} - -void NiParticlesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PARTICLES_DATA_FIXLINKS -} - -list<NiObjectRef> NiParticlesData::GetRefs() const { - NI_PARTICLES_DATA_GETREFS -} - -const Type & NiParticlesData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiParticlesData.h b/NifExport/niflib/obj/NiParticlesData.h deleted file mode 100755 index 0a776b4..0000000 --- a/NifExport/niflib/obj/NiParticlesData.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPARTICLESDATA_H_ -#define _NIPARTICLESDATA_H_ - -#include "NiAutoNormalParticlesData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiParticlesData; -typedef Ref<NiParticlesData> NiParticlesDataRef; - -/*! - * NiParticlesData - Generic rotating particles data block. - */ - -class NIFLIB_API NiParticlesData : public NI_PARTICLES_DATA_PARENT { -public: - NiParticlesData(); - ~NiParticlesData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PARTICLES_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPathController.cpp b/NifExport/niflib/obj/NiPathController.cpp deleted file mode 100755 index 3d41547..0000000 --- a/NifExport/niflib/obj/NiPathController.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPathController.h" -#include "NiPosData.h" -#include "NiFloatData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPathController::TYPE("NiPathController", &NI_PATH_CONTROLLER_PARENT::TypeConst() ); - -NiPathController::NiPathController() NI_PATH_CONTROLLER_CONSTRUCT {} - -NiPathController::~NiPathController() {} - -void NiPathController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PATH_CONTROLLER_READ -} - -void NiPathController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PATH_CONTROLLER_WRITE -} - -string NiPathController::asString( bool verbose ) const { - NI_PATH_CONTROLLER_STRING -} - -void NiPathController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PATH_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiPathController::GetRefs() const { - NI_PATH_CONTROLLER_GETREFS -} - -const Type & NiPathController::GetType() const { - return TYPE; -}; - -Ref<NiFloatData> NiPathController::GetFloatData() const { - return floatData; -} - -void NiPathController::SetFloatData( const Ref<NiFloatData> & n ) { - floatData = n; -} - -Ref<NiPosData> NiPathController::GetPosData() const { - return posData; -} - -void NiPathController::SetPosData( const Ref<NiPosData> & n ) { - posData = n; -} diff --git a/NifExport/niflib/obj/NiPathController.h b/NifExport/niflib/obj/NiPathController.h deleted file mode 100755 index ab738ca..0000000 --- a/NifExport/niflib/obj/NiPathController.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPATHCONTROLLER_H_ -#define _NIPATHCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPosData; -class NiFloatData; - -#include "../gen/obj_defines.h" - -class NiPathController; -typedef Ref<NiPathController> NiPathControllerRef; - -/*! - * NiPathController - Time controller for a path. - */ - -class NIFLIB_API NiPathController : public NI_PATH_CONTROLLER_PARENT { -public: - NiPathController(); - ~NiPathController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: This class has a lot of unknown data - Ref<NiFloatData> GetFloatData() const; - void SetFloatData( const Ref<NiFloatData> & n ); - - Ref<NiPosData> GetPosData() const; - void SetPosData( const Ref<NiPosData> & n ); -protected: - NI_PATH_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPathInterpolator.cpp b/NifExport/niflib/obj/NiPathInterpolator.cpp deleted file mode 100755 index 152371d..0000000 --- a/NifExport/niflib/obj/NiPathInterpolator.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPathInterpolator.h" -#include "NiPosData.h" -#include "NiFloatData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPathInterpolator::TYPE("NiPathInterpolator", &NI_PATH_INTERPOLATOR_PARENT::TypeConst() ); - -NiPathInterpolator::NiPathInterpolator() NI_PATH_INTERPOLATOR_CONSTRUCT {} - -NiPathInterpolator::~NiPathInterpolator() {} - -void NiPathInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PATH_INTERPOLATOR_READ -} - -void NiPathInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PATH_INTERPOLATOR_WRITE -} - -string NiPathInterpolator::asString( bool verbose ) const { - NI_PATH_INTERPOLATOR_STRING -} - -void NiPathInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PATH_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiPathInterpolator::GetRefs() const { - NI_PATH_INTERPOLATOR_GETREFS -} - -const Type & NiPathInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPathInterpolator.h b/NifExport/niflib/obj/NiPathInterpolator.h deleted file mode 100755 index 3afde88..0000000 --- a/NifExport/niflib/obj/NiPathInterpolator.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPATHINTERPOLATOR_H_ -#define _NIPATHINTERPOLATOR_H_ - -#include "NiBlendInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPosData; -class NiFloatData; - -#include "../gen/obj_defines.h" - -class NiPathInterpolator; -typedef Ref<NiPathInterpolator> NiPathInterpolatorRef; - -/*! - * NiPathInterpolator - Unknown interpolator. - */ - -class NIFLIB_API NiPathInterpolator : public NI_PATH_INTERPOLATOR_PARENT { -public: - NiPathInterpolator(); - ~NiPathInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PATH_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPixelData.cpp b/NifExport/niflib/obj/NiPixelData.cpp deleted file mode 100755 index cae427a..0000000 --- a/NifExport/niflib/obj/NiPixelData.cpp +++ /dev/null @@ -1,351 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPixelData.h" -#include "../gen/MipMap.h" -#include "../gen/ByteArray.h" -#include "NiPalette.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPixelData::TYPE("NiPixelData", &NI_PIXEL_DATA_PARENT::TypeConst() ); - -NiPixelData::NiPixelData() NI_PIXEL_DATA_CONSTRUCT {} - -NiPixelData::~NiPixelData() {} - -void NiPixelData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PIXEL_DATA_READ -} - -void NiPixelData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PIXEL_DATA_WRITE -} - -string NiPixelData::asString( bool verbose ) const { - NI_PIXEL_DATA_STRING -} - -void NiPixelData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PIXEL_DATA_FIXLINKS -} - -list<NiObjectRef> NiPixelData::GetRefs() const { - NI_PIXEL_DATA_GETREFS -} - -const Type & NiPixelData::GetType() const { - return TYPE; -}; - -int NiPixelData::GetHeight() const { - if ( mipmaps.size() == 0 ) { - return 0; - } else { - return mipmaps[0].height; - } -} - -int NiPixelData::GetWidth() const { - if (mipmaps.size() == 0 ) { - return 0; - } else { - return mipmaps[0].width; - } -} - -PixelFormat NiPixelData::GetPixelFormat() const { - return pixelFormat; -} - -void NiPixelData::Reset( int new_width, int new_height, PixelFormat px_fmt ) { - //Ensure that texture dimentions are powers of two - if ( (new_height & (new_height-1)) != 0 ) { - throw runtime_error("Texture height must be a power of two. 1, 2, 4, 8, 16, 32, 64, 256, 512, etc."); - } - - if ( (new_width & (new_width-1)) != 0 ) { - throw runtime_error("Texture width must be a power of two. 1, 2, 4, 8, 16, 32, 64, 256, 512, etc."); - } - - //Delete any data that was previously held - pixelData.data.clear(); - //if ( pixelData.data != NULL ) { - // delete [] pixelData.data; - // pixelData.data = NULL; - // pixelData.dataSize = 0; - //} - - //pixelData.dataSize = 0; - mipmaps.resize(1); - - - //Set up first mipmap - mipmaps[0].width = new_width; - mipmaps[0].height = new_height; - mipmaps[0].offset = 0; - - //Set up pixel format fields - pixelFormat = px_fmt; - switch(pixelFormat) { - case PX_FMT_RGB8: - redMask = 0x000000FF; - greenMask = 0x0000FF00; - blueMask = 0x00FF0000; - alphaMask = 0x00000000; - bitsPerPixel = 24; - unknown8Bytes[0] = 96; - unknown8Bytes[1] = 8; - unknown8Bytes[2] = 130; - unknown8Bytes[3] = 0; - unknown8Bytes[4] = 0; - unknown8Bytes[5] = 65; - unknown8Bytes[6] = 0; - unknown8Bytes[7] = 0; - break; - case PX_FMT_RGBA8 : - redMask = 0x000000FF; - greenMask = 0x0000FF00; - blueMask = 0x00FF0000; - alphaMask = 0xFF000000; - bitsPerPixel = 32; - unknown8Bytes[0] = 129; - unknown8Bytes[1] = 8; - unknown8Bytes[2] = 130; - unknown8Bytes[3] = 32; - unknown8Bytes[4] = 0; - unknown8Bytes[5] = 65; - unknown8Bytes[6] = 12; - unknown8Bytes[7] = 0; - break; - case PX_FMT_PAL8 : - redMask = 0x00000000; - blueMask = 0x00000000; - greenMask = 0x00000000; - alphaMask = 0x00000000; - bitsPerPixel = 8; - unknown8Bytes[0] = 34; - unknown8Bytes[1] = 0; - unknown8Bytes[2] = 0; - unknown8Bytes[3] = 32; - unknown8Bytes[4] = 0; - unknown8Bytes[5] = 65; - unknown8Bytes[6] = 12; - unknown8Bytes[7] = 0; - break; - //[4,0,0,0,0,0,0,0] if 0 (?) bits per pixel - default: - throw runtime_error("The pixel type you have requested is not currently supported."); - } -} - -vector<Color4> NiPixelData::GetColors() const { - vector<Color4> pixels; - - if ( mipmaps.size() == 0 ) { - //Return empty vector - return pixels; - } - - //Pack the pixel data from the first mipmap into a vector of - //Color4 based on the pixel format. - pixels.resize( mipmaps[0].width * mipmaps[0].height ); - switch(pixelFormat) { - case PX_FMT_RGB8: - for ( uint i = 0; i < pixels.size(); ++i ) { - pixels[i].r = float(pixelData.data[i * 3]) / 255.0f; - pixels[i].g = float(pixelData.data[i * 3 + 1]) / 255.0f; - pixels[i].b = float(pixelData.data[i * 3 + 2]) / 255.0f; - pixels[i].a = 1.0f; - } - break; - case PX_FMT_RGBA8: - for ( uint i = 0; i < pixels.size(); ++i ) { - pixels[i].r = float(pixelData.data[i * 4]) / 255.0f; - pixels[i].g = float(pixelData.data[i * 4 + 1]) / 255.0f; - pixels[i].b = float(pixelData.data[i * 4 + 2]) / 255.0f; - pixels[i].a = float(pixelData.data[i * 4 + 3]) / 255.0f; - } - break; - default: - throw runtime_error("The GetColors function only supports the PX_FMT_RGB8 and PX_FMT_RGBA8 pixel formats."); - } - -#ifdef IM_DEBUG - - imdebug("rgba b=32f rs=2 w=%d h=%d %p", mipmaps[0].width, mipmaps[0].height, &pixels[0] ); - //delete [] img; - cout << "Showing image returned by GetColors function." << endl; - cin.get(); -#endif - - return pixels; -} - -void NiPixelData::SetColors( const vector<Color4> & new_pixels, bool generate_mipmaps ) { - //Ensure that compatible pixel format is being used - if ( pixelFormat != PX_FMT_RGB8 && pixelFormat != PX_FMT_RGBA8 ) { - throw runtime_error("The SetColors function only supports the PX_FMT_RGB8 and PX_FMT_RGBA8 pixel formats."); - } - - //Ensure that there is size information in the mipmaps - if ( mipmaps.size() == 0 ) { - throw runtime_error("The size informatoin has not been set. Call the IPixelData::Reset() function first."); - } - - //Ensure that the right number of pixels for the dimentions set have been passed - if ( new_pixels.size() != mipmaps[0].height * mipmaps[0].width ) { - throw runtime_error("You must pass one color for every pixel in the image. There should be height * width colors."); - } - - uint size = 0; - mipmaps.resize(1); - size = (mipmaps[0].height * mipmaps[0].width * bitsPerPixel) / 8; - - //Deal with multiple mipmaps - if ( generate_mipmaps == true ) { - MipMap m; - m.height = mipmaps[0].height; - m.width = mipmaps[0].width; - - size = (mipmaps[0].height * mipmaps[0].width * bitsPerPixel) / 8; - - while ( m.width != 1 && m.height != 1 ) { - ////cout << "Width: " << m.width << " Height: " << m.height << " Offset: " << m.offset << endl; - m.width /= 2; - m.height /= 2; - m.offset = size; - - size += (m.height * m.width * bitsPerPixel) / 8; - - mipmaps.push_back(m); - } - } - - //Allocate space to store mipmaps - //if ( pixelData.data != NULL ) { - // delete [] pixelData.data; - //} - - //pixelData.dataSize = size * bitsPerPixel / 8; - //pixelData.data = new byte[pixelData.dataSize]; - - pixelData.data.resize( size * bitsPerPixel / 8 ); - - //Copy pixels to Color4 C array - Color4 * tmp_image = new Color4[new_pixels.size()]; - - for (uint i = 0; i < new_pixels.size(); ++i ) { - tmp_image[i] = new_pixels[i]; - } - - //Pack pixel data - for (uint i = 0; i < mipmaps.size(); ++i ) { - cout << "Width: " << mipmaps[i].width << " Height: " << mipmaps[i].height << " Offset: " << mipmaps[i].offset << endl; - - if ( i > 0 ) { - //Allocate space to store re-sized image. - Color4 * resized = new Color4[ mipmaps[i].width * mipmaps[i].height ]; - - //Visit every other pixel in each row and column of the previous image - for ( uint w = 0; w < mipmaps[i-1].width; w+=2 ) { - for ( uint h = 0; h < mipmaps[i-1].height; h+=2 ) { - //cout << "w: " << w << " h: " << h << endl; - Color4 & av = resized[(h/2) * mipmaps[i].width + (w/2)]; - - //Start with the value of the current pixel - av = tmp_image[h * mipmaps[i-1].width + w]; - float num_colors = 1.0f; - - //Only process the pixel above if height is > 1 - if ( h > 1 ) { - Color4 & px = tmp_image[(h+1) * mipmaps[i-1].width + w]; - av.r += px.r; - av.g += px.g; - av.b += px.b; - av.a += px.a; - num_colors += 1.0f; - } - - //Only process the pixel to the right if width > 1 - if (w > 1 ) { - Color4 & px = tmp_image[h * mipmaps[i-1].width + (w+1)]; - av.r += px.r; - av.g += px.g; - av.b += px.b; - av.a += px.a; - num_colors += 1.0f; - } - - //Only process the pixel to the upper right if both width and height are > 1 - if ( w > 1 && h >> 1 ) { - Color4 & px = tmp_image[(h+1) * mipmaps[i-1].width + (w+1)]; - av.r += px.r; - av.g += px.g; - av.b += px.b; - av.a += px.a; - num_colors += 1.0f; - } - - //Calculate average - av.r /= num_colors; - av.g /= num_colors; - av.b /= num_colors; - av.a /= num_colors; - } - } - //Resize is complete, set result to tmp_image - - //delete old tmp_image data - delete [] tmp_image; - - //Adjust pointer values - tmp_image = resized; - resized = NULL; - } - - //Data is ready to be packed into the byes of this mipmap - - #ifdef IM_DEBUG - cout << "Showing mipmap size " << mipmaps[i].width << " x " << mipmaps[i].height << "." << endl; - imdebug("rgba b=32f w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &tmp_image[0] ); - cin.get(); - #endif - - //Start at offset - byte * map = &pixelData.data[mipmaps[i].offset]; - - switch(pixelFormat) { - case PX_FMT_RGB8: - for ( uint j = 0; j < mipmaps[i].width * mipmaps[i].height; ++j ) { - map[j * 3] = int( tmp_image[j].r * 255.0f ); - map[j * 3 + 1] = int( tmp_image[j].g * 255.0f ); - map[j * 3 + 2] = int( tmp_image[j].b * 255.0f ); - } - - //#ifdef IM_DEBUG - // cout << "Showing mipmap after being packed - size " << mipmaps[i].width << " x " << mipmaps[i].height << "." << endl; - // imdebug("rgb w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &map[0] ); - // cin.get(); - //#endif - break; - case PX_FMT_RGBA8: - for ( uint j = 0; j < mipmaps[i].width * mipmaps[i].height; ++j ) { - map[j * 4] = int( tmp_image[j].r * 255.0f ); - map[j * 4 + 1] = int( tmp_image[j].g * 255.0f ); - map[j * 4 + 2] = int( tmp_image[j].b * 255.0f ); - map[j * 4 + 3] = int( tmp_image[j].a * 255.0f ); - } - - //#ifdef IM_DEBUG - // cout << "Showing mipmap after being packed - size " << mipmaps[i].width << " x " << mipmaps[i].height << "." << endl; - // imdebug("rgba w=%d h=%d %p", mipmaps[i].width, mipmaps[i].height, &map[0] ); - // cin.get(); - //#endif - break; - case PX_FMT_PAL8: - throw runtime_error("The SetColors function only supports the PX_FMT_RGB8 and PX_FMT_RGBA8 pixel formats."); - break; - } - } -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiPixelData.h b/NifExport/niflib/obj/NiPixelData.h deleted file mode 100755 index 91f7854..0000000 --- a/NifExport/niflib/obj/NiPixelData.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPIXELDATA_H_ -#define _NIPIXELDATA_H_ - -#include "NiObject.h" -// Include structures -#include "../Ref.h" -#include "../gen/MipMap.h" -#include "../gen/ByteArray.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPalette; - -#include "../gen/obj_defines.h" - -class NiPixelData; -typedef Ref<NiPixelData> NiPixelDataRef; - -/*! - * NiPixelData - A texture. - */ - -class NIFLIB_API NiPixelData : public NI_PIXEL_DATA_PARENT { -public: - NiPixelData(); - ~NiPixelData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the height of the texture image stored in this block. - * \return The height of the texture image stored in this block. - * \sa NiPixelData::GetWidth, NiPixelData::GetPixelFormat - */ - int GetHeight() const; - - /*! Retrieves the width of the texture image stored in this block. - * \return The width of the texture image stored in this block. - * \sa NiPixelData::GetHeight, NiPixelData::GetPixelFormat - */ - int GetWidth() const; - - /*! Retrieves the pixel format of the texture image stored in this block. - * \return The pixel format of the texture image stored in this block. - * \sa NiPixelData::GetWidth, NiPixelData::GetHeight - */ - PixelFormat GetPixelFormat() const; - - /*! Deletes all image data and sets a new size and format in preparation for new data to be provided. - * \param new_width The width of the new texture image. - * \param new_height The height of the new texture image. - * \param px_fmt The pixel format of the new texture image. - * \sa NiPixelData::GetWidth, NiPixelData::GetHeight - */ - void Reset( int new_width, int new_height, PixelFormat px_fmt ); - - /*! Retrieves the the pixels of the texture image stored in this block. This function does not work on palettized textures. - * \return A vector containing the colors of each pixel in the texture image stored in this block, one row after another starting from the bottom of the image. The width of the image must be used to interpret them correctly. - * \sa NiPixelData::SetColors, NiPixelData::GetWidth - */ - vector<Color4> GetColors() const; - - /*! Sets the the pixels of the texture image stored in this block and optionally generates mipmaps. This function does not work for palettized textures. - * \param new_pixels A vector containing the colors of each new pixel to be set in the texture image stored in this block, one row after another starting from the botom of the image. - * \param generate_mipmaps If true, mipmaps will be generated for the new image and stored in the file. - * \sa NiPixelData::GetColors, NiPixelData::GetWidth - */ - void SetColors( const vector<Color4> & new_pixels, bool generate_mipmaps ); - -protected: - NI_PIXEL_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPlanarCollider.cpp b/NifExport/niflib/obj/NiPlanarCollider.cpp deleted file mode 100755 index 760dd92..0000000 --- a/NifExport/niflib/obj/NiPlanarCollider.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPlanarCollider.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPlanarCollider::TYPE("NiPlanarCollider", &NI_PLANAR_COLLIDER_PARENT::TypeConst() ); - -NiPlanarCollider::NiPlanarCollider() NI_PLANAR_COLLIDER_CONSTRUCT {} - -NiPlanarCollider::~NiPlanarCollider() {} - -void NiPlanarCollider::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PLANAR_COLLIDER_READ -} - -void NiPlanarCollider::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PLANAR_COLLIDER_WRITE -} - -string NiPlanarCollider::asString( bool verbose ) const { - NI_PLANAR_COLLIDER_STRING -} - -void NiPlanarCollider::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PLANAR_COLLIDER_FIXLINKS -} - -list<NiObjectRef> NiPlanarCollider::GetRefs() const { - NI_PLANAR_COLLIDER_GETREFS -} - -const Type & NiPlanarCollider::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPlanarCollider.h b/NifExport/niflib/obj/NiPlanarCollider.h deleted file mode 100755 index a2392b3..0000000 --- a/NifExport/niflib/obj/NiPlanarCollider.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPLANARCOLLIDER_H_ -#define _NIPLANARCOLLIDER_H_ - -#include "AParticleModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPlanarCollider; -typedef Ref<NiPlanarCollider> NiPlanarColliderRef; - -/*! - * NiPlanarCollider - Unknown. - */ - -class NIFLIB_API NiPlanarCollider : public NI_PLANAR_COLLIDER_PARENT { -public: - NiPlanarCollider(); - ~NiPlanarCollider(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PLANAR_COLLIDER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPoint3Interpolator.cpp b/NifExport/niflib/obj/NiPoint3Interpolator.cpp deleted file mode 100755 index 8a11d98..0000000 --- a/NifExport/niflib/obj/NiPoint3Interpolator.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPoint3Interpolator.h" -#include "NiPosData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPoint3Interpolator::TYPE("NiPoint3Interpolator", &NI_POINT3_INTERPOLATOR_PARENT::TypeConst() ); - -NiPoint3Interpolator::NiPoint3Interpolator() NI_POINT3_INTERPOLATOR_CONSTRUCT {} - -NiPoint3Interpolator::~NiPoint3Interpolator() {} - -void NiPoint3Interpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_POINT3_INTERPOLATOR_READ -} - -void NiPoint3Interpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_POINT3_INTERPOLATOR_WRITE -} - -string NiPoint3Interpolator::asString( bool verbose ) const { - NI_POINT3_INTERPOLATOR_STRING -} - -void NiPoint3Interpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_POINT3_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiPoint3Interpolator::GetRefs() const { - NI_POINT3_INTERPOLATOR_GETREFS -} - -const Type & NiPoint3Interpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPoint3Interpolator.h b/NifExport/niflib/obj/NiPoint3Interpolator.h deleted file mode 100755 index ebd20e6..0000000 --- a/NifExport/niflib/obj/NiPoint3Interpolator.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPOINT3INTERPOLATOR_H_ -#define _NIPOINT3INTERPOLATOR_H_ - -#include "NiInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiPosData; - -#include "../gen/obj_defines.h" - -class NiPoint3Interpolator; -typedef Ref<NiPoint3Interpolator> NiPoint3InterpolatorRef; - -/*! - * NiPoint3Interpolator - Unknown. - */ - -class NIFLIB_API NiPoint3Interpolator : public NI_POINT3_INTERPOLATOR_PARENT { -public: - NiPoint3Interpolator(); - ~NiPoint3Interpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_POINT3_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPointLight.cpp b/NifExport/niflib/obj/NiPointLight.cpp deleted file mode 100755 index b411748..0000000 --- a/NifExport/niflib/obj/NiPointLight.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPointLight.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPointLight::TYPE("NiPointLight", &NI_POINT_LIGHT_PARENT::TypeConst() ); - -NiPointLight::NiPointLight() NI_POINT_LIGHT_CONSTRUCT {} - -NiPointLight::~NiPointLight() {} - -void NiPointLight::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_POINT_LIGHT_READ -} - -void NiPointLight::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_POINT_LIGHT_WRITE -} - -string NiPointLight::asString( bool verbose ) const { - NI_POINT_LIGHT_STRING -} - -void NiPointLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_POINT_LIGHT_FIXLINKS -} - -list<NiObjectRef> NiPointLight::GetRefs() const { - NI_POINT_LIGHT_GETREFS -} - -const Type & NiPointLight::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiPointLight.h b/NifExport/niflib/obj/NiPointLight.h deleted file mode 100755 index ca14a10..0000000 --- a/NifExport/niflib/obj/NiPointLight.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPOINTLIGHT_H_ -#define _NIPOINTLIGHT_H_ - -#include "NiLight.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiPointLight; -typedef Ref<NiPointLight> NiPointLightRef; - -/*! - * NiPointLight - A point light. - */ - -class NIFLIB_API NiPointLight : public NI_POINT_LIGHT_PARENT { -public: - NiPointLight(); - ~NiPointLight(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_POINT_LIGHT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiPosData.cpp b/NifExport/niflib/obj/NiPosData.cpp deleted file mode 100755 index 6a8776d..0000000 --- a/NifExport/niflib/obj/NiPosData.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiPosData.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiPosData::TYPE("NiPosData", &NI_POS_DATA_PARENT::TypeConst() ); - -NiPosData::NiPosData() NI_POS_DATA_CONSTRUCT {} - -NiPosData::~NiPosData() {} - -void NiPosData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_POS_DATA_READ -} - -void NiPosData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_POS_DATA_WRITE -} - -string NiPosData::asString( bool verbose ) const { - NI_POS_DATA_STRING -} - -void NiPosData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_POS_DATA_FIXLINKS -} - -list<NiObjectRef> NiPosData::GetRefs() const { - NI_POS_DATA_GETREFS -} - -const Type & NiPosData::GetType() const { - return TYPE; -}; - -KeyType NiPosData::GetKeyType() const { - return data.interpolation; -} - -void NiPosData::SetKeyType( KeyType t ) { - data.interpolation = t; -} - -vector< Key<Vector3> > NiPosData::GetKeys() const { - return data.keys; -} - -void NiPosData::SetKeys( vector< Key<Vector3> > const & keys ) { - data.keys = keys; -} - diff --git a/NifExport/niflib/obj/NiPosData.h b/NifExport/niflib/obj/NiPosData.h deleted file mode 100755 index 98cd846..0000000 --- a/NifExport/niflib/obj/NiPosData.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPOSDATA_H_ -#define _NIPOSDATA_H_ - -#include "AKeyedData.h" -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiPosData; -typedef Ref<NiPosData> NiPosDataRef; - -/*! - * NiPosData - Position data. - */ - -class NIFLIB_API NiPosData : public NI_POS_DATA_PARENT { -public: - NiPosData(); - ~NiPosData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the type of position interpolation being used. - * \return The position key type specifing the type of interpolation being used. - * \sa NiPosData::SetKeyType - */ - KeyType GetKeyType() const; - - /*! Sets the type of position interpolation being used. Does not affect existing key data. - * \param t The new position key type specifing the type of interpolation to be used. - * \sa NiPosData::GetKeyType - */ - void SetKeyType( KeyType t ); - - /*! Retrieves the position key data. - * \return A vector containing Key<Vector3> data which specify position over time. - * \sa NiPosData::SetKeys, Key - */ - vector< Key<Vector3> > GetKeys() const; - - /*! Sets the position key data. - * \param keys A vector containing new Key<Vector3> data which will replace any existing data. - * \sa NIPosData::GetKeys, Key - */ - void SetKeys( vector< Key<Vector3> > const & keys ); - -protected: - NI_POS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiProperty.cpp b/NifExport/niflib/obj/NiProperty.cpp deleted file mode 100755 index 89c10f3..0000000 --- a/NifExport/niflib/obj/NiProperty.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiProperty::TYPE("NiProperty", &NI_PROPERTY_PARENT::TypeConst() ); - -NiProperty::NiProperty() NI_PROPERTY_CONSTRUCT {} - -NiProperty::~NiProperty() {} - -void NiProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PROPERTY_READ -} - -void NiProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_PROPERTY_WRITE -} - -string NiProperty::asString( bool verbose ) const { - NI_PROPERTY_STRING -} - -void NiProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiProperty::GetRefs() const { - NI_PROPERTY_GETREFS -} - -const Type & NiProperty::GetType() const { - return TYPE; -}; - - diff --git a/NifExport/niflib/obj/NiProperty.h b/NifExport/niflib/obj/NiProperty.h deleted file mode 100755 index 7a24dc7..0000000 --- a/NifExport/niflib/obj/NiProperty.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIPROPERTY_H_ -#define _NIPROPERTY_H_ - -#include "NiObjectNET.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiProperty; -typedef Ref<NiProperty> NiPropertyRef; - -/*! - * NiProperty - A generic property block. - */ - -class NIFLIB_API NiProperty : public NI_PROPERTY_PARENT { -public: - NiProperty(); - ~NiProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiRangeLODData.cpp b/NifExport/niflib/obj/NiRangeLODData.cpp deleted file mode 100755 index 6fcbd96..0000000 --- a/NifExport/niflib/obj/NiRangeLODData.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiRangeLODData.h" -#include "../gen/LODRange.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiRangeLODData::TYPE("NiRangeLODData", &NI_RANGE_L_O_D_DATA_PARENT::TypeConst() ); - -NiRangeLODData::NiRangeLODData() NI_RANGE_L_O_D_DATA_CONSTRUCT {} - -NiRangeLODData::~NiRangeLODData() {} - -void NiRangeLODData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_RANGE_L_O_D_DATA_READ -} - -void NiRangeLODData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_RANGE_L_O_D_DATA_WRITE -} - -string NiRangeLODData::asString( bool verbose ) const { - NI_RANGE_L_O_D_DATA_STRING -} - -void NiRangeLODData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_RANGE_L_O_D_DATA_FIXLINKS -} - -list<NiObjectRef> NiRangeLODData::GetRefs() const { - NI_RANGE_L_O_D_DATA_GETREFS -} - -const Type & NiRangeLODData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiRangeLODData.h b/NifExport/niflib/obj/NiRangeLODData.h deleted file mode 100755 index 1462533..0000000 --- a/NifExport/niflib/obj/NiRangeLODData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIRANGELODDATA_H_ -#define _NIRANGELODDATA_H_ - -#include "NiObject.h" - -// Include structures -#include "../gen/LODRange.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiRangeLODData; -typedef Ref<NiRangeLODData> NiRangeLODDataRef; - -/*! - * NiRangeLODData - Describes levels of detail. - */ - -class NIFLIB_API NiRangeLODData : public NI_RANGE_L_O_D_DATA_PARENT { -public: - NiRangeLODData(); - ~NiRangeLODData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_RANGE_L_O_D_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiRotatingParticles.cpp b/NifExport/niflib/obj/NiRotatingParticles.cpp deleted file mode 100755 index 53b6777..0000000 --- a/NifExport/niflib/obj/NiRotatingParticles.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiRotatingParticles.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiRotatingParticles::TYPE("NiRotatingParticles", &NI_ROTATING_PARTICLES_PARENT::TypeConst() ); - -NiRotatingParticles::NiRotatingParticles() NI_ROTATING_PARTICLES_CONSTRUCT {} - -NiRotatingParticles::~NiRotatingParticles() {} - -void NiRotatingParticles::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ROTATING_PARTICLES_READ -} - -void NiRotatingParticles::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_ROTATING_PARTICLES_WRITE -} - -string NiRotatingParticles::asString( bool verbose ) const { - NI_ROTATING_PARTICLES_STRING -} - -void NiRotatingParticles::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ROTATING_PARTICLES_FIXLINKS -} - -list<NiObjectRef> NiRotatingParticles::GetRefs() const { - NI_ROTATING_PARTICLES_GETREFS -} - -const Type & NiRotatingParticles::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiRotatingParticles.h b/NifExport/niflib/obj/NiRotatingParticles.h deleted file mode 100755 index f340c74..0000000 --- a/NifExport/niflib/obj/NiRotatingParticles.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIROTATINGPARTICLES_H_ -#define _NIROTATINGPARTICLES_H_ - -#include "NiParticles.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiRotatingParticles; -typedef Ref<NiRotatingParticles> NiRotatingParticlesRef; - -/*! - * NiRotatingParticles - Unknown. - */ - -class NIFLIB_API NiRotatingParticles : public NI_ROTATING_PARTICLES_PARENT { -public: - NiRotatingParticles(); - ~NiRotatingParticles(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_ROTATING_PARTICLES_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiRotatingParticlesData.cpp b/NifExport/niflib/obj/NiRotatingParticlesData.cpp deleted file mode 100755 index 2e2374b..0000000 --- a/NifExport/niflib/obj/NiRotatingParticlesData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiRotatingParticlesData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiRotatingParticlesData::TYPE("NiRotatingParticlesData", &NI_ROTATING_PARTICLES_DATA_PARENT::TypeConst() ); - -NiRotatingParticlesData::NiRotatingParticlesData() NI_ROTATING_PARTICLES_DATA_CONSTRUCT {} - -NiRotatingParticlesData::~NiRotatingParticlesData() {} - -void NiRotatingParticlesData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ROTATING_PARTICLES_DATA_READ -} - -void NiRotatingParticlesData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_ROTATING_PARTICLES_DATA_WRITE -} - -string NiRotatingParticlesData::asString( bool verbose ) const { - NI_ROTATING_PARTICLES_DATA_STRING -} - -void NiRotatingParticlesData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_ROTATING_PARTICLES_DATA_FIXLINKS -} - -list<NiObjectRef> NiRotatingParticlesData::GetRefs() const { - NI_ROTATING_PARTICLES_DATA_GETREFS -} - -const Type & NiRotatingParticlesData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiRotatingParticlesData.h b/NifExport/niflib/obj/NiRotatingParticlesData.h deleted file mode 100755 index affbb41..0000000 --- a/NifExport/niflib/obj/NiRotatingParticlesData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIROTATINGPARTICLESDATA_H_ -#define _NIROTATINGPARTICLESDATA_H_ - -#include "NiParticlesData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiRotatingParticlesData; -typedef Ref<NiRotatingParticlesData> NiRotatingParticlesDataRef; - -/*! - * NiRotatingParticlesData - Rotating particles data block. - */ - -class NIFLIB_API NiRotatingParticlesData : public NI_ROTATING_PARTICLES_DATA_PARENT { -public: - NiRotatingParticlesData(); - ~NiRotatingParticlesData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_ROTATING_PARTICLES_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiScreenLODData.cpp b/NifExport/niflib/obj/NiScreenLODData.cpp deleted file mode 100755 index 779ac16..0000000 --- a/NifExport/niflib/obj/NiScreenLODData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiScreenLODData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiScreenLODData::TYPE("NiScreenLODData", &NI_SCREEN_L_O_D_DATA_PARENT::TypeConst() ); - -NiScreenLODData::NiScreenLODData() NI_SCREEN_L_O_D_DATA_CONSTRUCT {} - -NiScreenLODData::~NiScreenLODData() {} - -void NiScreenLODData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SCREEN_L_O_D_DATA_READ -} - -void NiScreenLODData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SCREEN_L_O_D_DATA_WRITE -} - -string NiScreenLODData::asString( bool verbose ) const { - NI_SCREEN_L_O_D_DATA_STRING -} - -void NiScreenLODData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SCREEN_L_O_D_DATA_FIXLINKS -} - -list<NiObjectRef> NiScreenLODData::GetRefs() const { - NI_SCREEN_L_O_D_DATA_GETREFS -} - -const Type & NiScreenLODData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiScreenLODData.h b/NifExport/niflib/obj/NiScreenLODData.h deleted file mode 100755 index fdef053..0000000 --- a/NifExport/niflib/obj/NiScreenLODData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISCREENLODDATA_H_ -#define _NISCREENLODDATA_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiScreenLODData; -typedef Ref<NiScreenLODData> NiScreenLODDataRef; - -/*! - * NiScreenLODData - Unknown. - */ - -class NIFLIB_API NiScreenLODData : public NI_SCREEN_L_O_D_DATA_PARENT { -public: - NiScreenLODData(); - ~NiScreenLODData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_SCREEN_L_O_D_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSequenceStreamHelper.cpp b/NifExport/niflib/obj/NiSequenceStreamHelper.cpp deleted file mode 100755 index eba62af..0000000 --- a/NifExport/niflib/obj/NiSequenceStreamHelper.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSequenceStreamHelper.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSequenceStreamHelper::TYPE("NiSequenceStreamHelper", &NI_SEQUENCE_STREAM_HELPER_PARENT::TypeConst() ); - -NiSequenceStreamHelper::NiSequenceStreamHelper() NI_SEQUENCE_STREAM_HELPER_CONSTRUCT {} - -NiSequenceStreamHelper::~NiSequenceStreamHelper() {} - -void NiSequenceStreamHelper::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SEQUENCE_STREAM_HELPER_READ -} - -void NiSequenceStreamHelper::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SEQUENCE_STREAM_HELPER_WRITE -} - -string NiSequenceStreamHelper::asString( bool verbose ) const { - NI_SEQUENCE_STREAM_HELPER_STRING -} - -void NiSequenceStreamHelper::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SEQUENCE_STREAM_HELPER_FIXLINKS -} - -list<NiObjectRef> NiSequenceStreamHelper::GetRefs() const { - NI_SEQUENCE_STREAM_HELPER_GETREFS -} - -const Type & NiSequenceStreamHelper::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiSequenceStreamHelper.h b/NifExport/niflib/obj/NiSequenceStreamHelper.h deleted file mode 100755 index 6b985f0..0000000 --- a/NifExport/niflib/obj/NiSequenceStreamHelper.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISEQUENCESTREAMHELPER_H_ -#define _NISEQUENCESTREAMHELPER_H_ - -#include "NiObjectNET.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiSequenceStreamHelper; -typedef Ref<NiSequenceStreamHelper> NiSequenceStreamHelperRef; - -/*! - * NiSequenceStreamHelper - Keyframe animation root node, in .kf files. - */ - -class NIFLIB_API NiSequenceStreamHelper : public NI_SEQUENCE_STREAM_HELPER_PARENT { -public: - NiSequenceStreamHelper(); - ~NiSequenceStreamHelper(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_SEQUENCE_STREAM_HELPER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiShadeProperty.cpp b/NifExport/niflib/obj/NiShadeProperty.cpp deleted file mode 100755 index 314a53a..0000000 --- a/NifExport/niflib/obj/NiShadeProperty.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiShadeProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiShadeProperty::TYPE("NiShadeProperty", &NI_SHADE_PROPERTY_PARENT::TypeConst() ); - -NiShadeProperty::NiShadeProperty() NI_SHADE_PROPERTY_CONSTRUCT {} - -NiShadeProperty::~NiShadeProperty() {} - -void NiShadeProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SHADE_PROPERTY_READ -} - -void NiShadeProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SHADE_PROPERTY_WRITE -} - -string NiShadeProperty::asString( bool verbose ) const { - NI_SHADE_PROPERTY_STRING -} - -void NiShadeProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SHADE_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiShadeProperty::GetRefs() const { - NI_SHADE_PROPERTY_GETREFS -} - -const Type & NiShadeProperty::GetType() const { - return TYPE; -}; - -ushort NiShadeProperty::GetFlags() const { - return flags; -} - -void NiShadeProperty::SetFlags( ushort n ) { - flags = n; -} diff --git a/NifExport/niflib/obj/NiShadeProperty.h b/NifExport/niflib/obj/NiShadeProperty.h deleted file mode 100755 index cec3e2a..0000000 --- a/NifExport/niflib/obj/NiShadeProperty.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISHADEPROPERTY_H_ -#define _NISHADEPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiShadeProperty; -typedef Ref<NiShadeProperty> NiShadePropertyRef; - -/*! - * NiShadeProperty - Determines whether flat shading or smooth shading is - * used on a shape. - */ - -class NIFLIB_API NiShadeProperty : public NI_SHADE_PROPERTY_PARENT { -public: - NiShadeProperty(); - ~NiShadeProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags( ushort n ); - -protected: - NI_SHADE_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSingleInterpolatorController.cpp b/NifExport/niflib/obj/NiSingleInterpolatorController.cpp deleted file mode 100755 index 5280f10..0000000 --- a/NifExport/niflib/obj/NiSingleInterpolatorController.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSingleInterpolatorController.h" -#include "NiInterpolator.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSingleInterpolatorController::TYPE("NiSingleInterpolatorController", &NI_SINGLE_INTERPOLATOR_CONTROLLER_PARENT::TypeConst() ); - -NiSingleInterpolatorController::NiSingleInterpolatorController() NI_SINGLE_INTERPOLATOR_CONTROLLER_CONSTRUCT {} - -NiSingleInterpolatorController::~NiSingleInterpolatorController() {} - -void NiSingleInterpolatorController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SINGLE_INTERPOLATOR_CONTROLLER_READ -} - -void NiSingleInterpolatorController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SINGLE_INTERPOLATOR_CONTROLLER_WRITE -} - -string NiSingleInterpolatorController::asString( bool verbose ) const { - NI_SINGLE_INTERPOLATOR_CONTROLLER_STRING -} - -void NiSingleInterpolatorController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SINGLE_INTERPOLATOR_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiSingleInterpolatorController::GetRefs() const { - NI_SINGLE_INTERPOLATOR_CONTROLLER_GETREFS -} - -const Type & NiSingleInterpolatorController::GetType() const { - return TYPE; -}; - -Ref<NiInterpolator> NiSingleInterpolatorController::GetInterpolator() const { - return interpolator; -} - -void NiSingleInterpolatorController::SetInterpolator( const Ref<NiInterpolator> & n ) { - interpolator = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiSingleInterpolatorController.h b/NifExport/niflib/obj/NiSingleInterpolatorController.h deleted file mode 100755 index d9c272a..0000000 --- a/NifExport/niflib/obj/NiSingleInterpolatorController.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISINGLEINTERPOLATORCONTROLLER_H_ -#define _NISINGLEINTERPOLATORCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiInterpolator; - -#include "../gen/obj_defines.h" - -class NiSingleInterpolatorController; -typedef Ref<NiSingleInterpolatorController> NiSingleInterpolatorControllerRef; - -/*! - * NiSingleInterpolatorController - A controller referring to an - * interpolator. - */ - -class NIFLIB_API NiSingleInterpolatorController : public NI_SINGLE_INTERPOLATOR_CONTROLLER_PARENT { -public: - NiSingleInterpolatorController(); - ~NiSingleInterpolatorController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - Ref<NiInterpolator> GetInterpolator() const; - void SetInterpolator( const Ref<NiInterpolator> & n ); -protected: - NI_SINGLE_INTERPOLATOR_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSkinData.cpp b/NifExport/niflib/obj/NiSkinData.cpp deleted file mode 100755 index fa252e0..0000000 --- a/NifExport/niflib/obj/NiSkinData.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSkinData.h" -#include "../gen/SkinData.h" -#include "../gen/SkinWeight.h" -#include "NiSkinPartition.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSkinData::TYPE("NiSkinData", &NI_SKIN_DATA_PARENT::TypeConst() ); - -NiSkinData::NiSkinData() NI_SKIN_DATA_CONSTRUCT {} - -NiSkinData::~NiSkinData() {} - -void NiSkinData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SKIN_DATA_READ -} - -void NiSkinData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SKIN_DATA_WRITE -} - -string NiSkinData::asString( bool verbose ) const { - NI_SKIN_DATA_STRING -} - -void NiSkinData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SKIN_DATA_FIXLINKS -} - -list<NiObjectRef> NiSkinData::GetRefs() const { - NI_SKIN_DATA_GETREFS -} - -const Type & NiSkinData::GetType() const { - return TYPE; -}; - -void NiSkinData::SetBoneData( const vector<SkinData> & n ) { - boneList = n; -} - -vector<SkinData> NiSkinData::GetBoneData() const { - return boneList; -} - -void NiSkinData::SetOverallTransform( const Matrix44 & n ) { - translation = n.GetTranslation(); - rotation = n.GetRotation(); - Vector3 s = n.GetScale(); - scale = s.x + s.y + s.z / 3.0f; -} - -Matrix44 NiSkinData::GetOverallTransform() const { - return Matrix44( translation, rotation, scale ); -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiSkinData.h b/NifExport/niflib/obj/NiSkinData.h deleted file mode 100755 index b08f3d1..0000000 --- a/NifExport/niflib/obj/NiSkinData.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISKINDATA_H_ -#define _NISKINDATA_H_ - -#include "NiObject.h" -// Include structures -#include "../Ref.h" -#include "../gen/SkinData.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiSkinPartition; - -#include "../gen/obj_defines.h" - -class NiSkinData; -typedef Ref<NiSkinData> NiSkinDataRef; - -/*! - * NiSkinData - Skinning data. - */ - -class NIFLIB_API NiSkinData : public NI_SKIN_DATA_PARENT { -public: - NiSkinData(); - ~NiSkinData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetOverallTransform( const Matrix44 & n ); - Matrix44 GetOverallTransform() const; - - void SetBoneData( const vector<SkinData> & n ); - vector<SkinData> GetBoneData() const; -protected: - NI_SKIN_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSkinInstance.cpp b/NifExport/niflib/obj/NiSkinInstance.cpp deleted file mode 100755 index ed28673..0000000 --- a/NifExport/niflib/obj/NiSkinInstance.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSkinInstance.h" -#include "NiNode.h" -#include "NiSkinData.h" -#include "NiSkinPartition.h" -#include "NiNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSkinInstance::TYPE("NiSkinInstance", &NI_SKIN_INSTANCE_PARENT::TypeConst() ); - -NiSkinInstance::NiSkinInstance() NI_SKIN_INSTANCE_CONSTRUCT {} - -NiSkinInstance::~NiSkinInstance() {} - -void NiSkinInstance::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SKIN_INSTANCE_READ -} - -void NiSkinInstance::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SKIN_INSTANCE_WRITE -} - -string NiSkinInstance::asString( bool verbose ) const { - NI_SKIN_INSTANCE_STRING -} - -void NiSkinInstance::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SKIN_INSTANCE_FIXLINKS - - //Inform newly fixed skeleton root of attachment - if ( skeletonRoot != NULL ) { - skeletonRoot->AddSkin( this ); - } -} - -list<NiObjectRef> NiSkinInstance::GetRefs() const { - NI_SKIN_INSTANCE_GETREFS -} - -const Type & NiSkinInstance::GetType() const { - return TYPE; -}; - -vector< Ref<NiNode> > NiSkinInstance::GetBones() const { - vector<NiNodeRef> ref_bones( bones.size() ); - for (uint i = 0; i < bones.size(); ++i ) { - ref_bones[i] = bones[i]; - } - return ref_bones; -} - -void NiSkinInstance::Bind( Ref<NiNode> skeleton_root, vector< Ref<NiNode> > bone_nodes ) { - //Ensure skin is not aleady bound - if ( bones.size() != 0 ) { - throw runtime_error("You have attempted to re-bind a skin that is already bound. Unbind it first."); - } - - //Ensure that all bones are below the skeleton root node on the scene graph - for ( uint i = 0; i < bone_nodes.size(); ++i ) { - bool is_decended = false; - NiNodeRef node = bone_nodes[i]; - while ( node != NULL ) { - if ( node == skeleton_root ) { - is_decended = true; - break; - } - node = node->GetParent(); - } - if ( is_decended == false ) { - throw runtime_error( "All bones must be lower than the skeleton root in the scene graph." ); - } - } - - //Add the bones to the internal list - bones.resize( bone_nodes.size() ); - for ( uint i = 0; i < bone_nodes.size(); ++i ) { - bones[i] = bone_nodes[i]; - } - - //Flag any bones that are part of this skin instance - for ( uint i = 0; i < bones.size(); ++i ) { - bones[i]->SetSkinFlag(true); - } - - //Store skeleton root and inform it of this attachment - skeletonRoot = skeleton_root; - skeletonRoot->AddSkin( this ); -}; - -void NiSkinInstance::Unbind() { - //Inform Skeleton Root of detatchment and clear it. - skeletonRoot->RemoveSkin( this ); - skeletonRoot = NULL; - - //Clear bone list - bones.clear(); - - //Destroy skin data - data = NULL; - skinPartition = NULL; -} - -void NiSkinInstance::CalcHardwareSkinningData () { - -} - -Ref<NiSkinData> NiSkinInstance::GetSkinData() const { - return data; -} - -void NiSkinInstance::SetSkinData( const Ref<NiSkinData> & n ) { - data = n; -} - -Ref<NiSkinPartition> NiSkinInstance::GetSkinPartition() const { - return skinPartition; -} - -void NiSkinInstance::SetSkinPartition( const Ref<NiSkinPartition> & n ) { - skinPartition = n; -} - -void NiSkinInstance::SkeletonLost() { - skeletonRoot = NULL; - - //Clear bone list - bones.clear(); - - //Destroy skin data - data = NULL; - skinPartition = NULL; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiSkinInstance.h b/NifExport/niflib/obj/NiSkinInstance.h deleted file mode 100755 index 7f98793..0000000 --- a/NifExport/niflib/obj/NiSkinInstance.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISKININSTANCE_H_ -#define _NISKININSTANCE_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiSkinData; -class NiSkinPartition; -class NiNode; - -#include "../gen/obj_defines.h" - -class NiSkinInstance; -typedef Ref<NiSkinInstance> NiSkinInstanceRef; - -/*! - * NiSkinInstance - Skinning instance. - */ - -class NIFLIB_API NiSkinInstance : public NI_SKIN_INSTANCE_PARENT { -public: - NiSkinInstance(); - ~NiSkinInstance(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - vector< Ref<NiNode> > GetBones() const; - - /*! - * Binds any geometry that uses this skin instance to a list of bones. - * The bones must have a common ancestor in the scenegraph. This becomes - * the skeleton root. - */ - void Bind( Ref<NiNode> skeleton_root, vector< Ref<NiNode> > bone_nodes ); - - /*! - * Detatches this skin instance from any bones it was previously bound to. - */ - void Unbind(); - - /*! - * Calculates a NiSkinPartition and attaches it to both pointers, the one - * used in later versions in this class, and the one in the attached - * NiSkinData class. This way it will be written regardless of the - * version. SkinData must be set before this can be calculated. - */ - void CalcHardwareSkinningData (); - - Ref<NiSkinData> GetSkinData() const; - void SetSkinData( const Ref<NiSkinData> & n ); - - Ref<NiSkinPartition> GetSkinPartition() const; - void SetSkinPartition( const Ref<NiSkinPartition> & n ); - - /*! - * Called by skeleton root NiNode when it self destructs to inform this skin - * instance that the skeleton has been lost. Should not be called directly. - */ - void SkeletonLost(); - -protected: - NI_SKIN_INSTANCE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSkinPartition.cpp b/NifExport/niflib/obj/NiSkinPartition.cpp deleted file mode 100755 index 58e9daf..0000000 --- a/NifExport/niflib/obj/NiSkinPartition.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSkinPartition.h" -#include "../gen/SkinPartition.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSkinPartition::TYPE("NiSkinPartition", &NI_SKIN_PARTITION_PARENT::TypeConst() ); - -NiSkinPartition::NiSkinPartition() NI_SKIN_PARTITION_CONSTRUCT {} - -NiSkinPartition::~NiSkinPartition() {} - -void NiSkinPartition::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SKIN_PARTITION_READ -} - -void NiSkinPartition::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SKIN_PARTITION_WRITE -} - -string NiSkinPartition::asString( bool verbose ) const { - NI_SKIN_PARTITION_STRING -} - -void NiSkinPartition::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SKIN_PARTITION_FIXLINKS -} - -list<NiObjectRef> NiSkinPartition::GetRefs() const { - NI_SKIN_PARTITION_GETREFS -} - -const Type & NiSkinPartition::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiSkinPartition.h b/NifExport/niflib/obj/NiSkinPartition.h deleted file mode 100755 index e78de6b..0000000 --- a/NifExport/niflib/obj/NiSkinPartition.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISKINPARTITION_H_ -#define _NISKINPARTITION_H_ - -#include "NiObject.h" - -// Include structures -#include "../gen/SkinPartition.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiSkinPartition; -typedef Ref<NiSkinPartition> NiSkinPartitionRef; - -/*! - * NiSkinPartition - Skinning data, optimized for hardware skinning. The - * mesh is partitioned in submeshes such that each vertex of a submesh is - * influenced only by a limited and fixed number of bones. - */ - -class NIFLIB_API NiSkinPartition : public NI_SKIN_PARTITION_PARENT { -public: - NiSkinPartition(); - ~NiSkinPartition(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_SKIN_PARTITION_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSourceTexture.cpp b/NifExport/niflib/obj/NiSourceTexture.cpp deleted file mode 100755 index e2b0a69..0000000 --- a/NifExport/niflib/obj/NiSourceTexture.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSourceTexture.h" -#include "NiObject.h" -#include "NiPixelData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSourceTexture::TYPE("NiSourceTexture", &NI_SOURCE_TEXTURE_PARENT::TypeConst() ); - -NiSourceTexture::NiSourceTexture() NI_SOURCE_TEXTURE_CONSTRUCT {} - -NiSourceTexture::~NiSourceTexture() {} - -void NiSourceTexture::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SOURCE_TEXTURE_READ -} - -void NiSourceTexture::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SOURCE_TEXTURE_WRITE -} - -string NiSourceTexture::asString( bool verbose ) const { - NI_SOURCE_TEXTURE_STRING -} - -void NiSourceTexture::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SOURCE_TEXTURE_FIXLINKS -} - -list<NiObjectRef> NiSourceTexture::GetRefs() const { - NI_SOURCE_TEXTURE_GETREFS -} - -const Type & NiSourceTexture::GetType() const { - return TYPE; -}; - -bool NiSourceTexture::IsTextureExternal () { - return ( useExternal != 0 ); -} - -void NiSourceTexture::SetExternalTexture( string file_name, const Ref<NiObject> & unk_link ) { - useExternal = 1; - pixelData = NULL; - this->originalFileName_.clear(); - - fileName = file_name; - unknownLink = unk_link; -} - - -void NiSourceTexture::SetInternalTexture( byte unk_byte, string original_file_name, const Ref<NiPixelData> & pixel_data ) { - useExternal = 0; - fileName.clear(); - - //TODO: Fix name problem with Unknown Byte in XML - unknownByte = unk_byte; - originalFileName_ = original_file_name; - pixelData = pixel_data; -} - -string NiSourceTexture::GetExternalFileName() const { - return fileName; -} - -Ref<NiObject> NiSourceTexture::GetExternalUnknownLink() const { - return unknownLink; -} - -byte NiSourceTexture::GetInternalUnknownByte() const { - return unknownByte; -} - -string NiSourceTexture::GetInternalOriginalFileName() const { - return originalFileName_; -} - -Ref<NiPixelData> NiSourceTexture::GetInternalPixelData() const { - return pixelData; -} - -PixelLayout NiSourceTexture::GetPixelLayout() const { - return pixelLayout; -} - -void NiSourceTexture::SetPixelLayout( PixelLayout n ) { - pixelLayout = n; -} - -MipMapFormat NiSourceTexture::GetMipMapFormat() const { - return useMipmaps; -} - -void NiSourceTexture::SetMipMapFormat( MipMapFormat n ) { - useMipmaps = n; -} - -AlphaFormat NiSourceTexture::GetAlphaFormat() const { - return alphaFormat; -} - -void NiSourceTexture::SetAlphaFormat( AlphaFormat n ) { - alphaFormat = n; -} - -//TODO: Fix name problem with Unknown Byte in XML -//byte NiSourceTexture::GetUnknownByte2() const; -//SNiSourceTexture::etUnknownByte2( byte n ); -// -//byte NiSourceTexture::GetUnknownByte3() const; -//NiSourceTexture::SetUnknownByte3( byte n ); \ No newline at end of file diff --git a/NifExport/niflib/obj/NiSourceTexture.h b/NifExport/niflib/obj/NiSourceTexture.h deleted file mode 100755 index 004cc68..0000000 --- a/NifExport/niflib/obj/NiSourceTexture.h +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISOURCETEXTURE_H_ -#define _NISOURCETEXTURE_H_ - -#include "NiObjectNET.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; -class NiPixelData; - -#include "../gen/obj_defines.h" - -class NiSourceTexture; -typedef Ref<NiSourceTexture> NiSourceTextureRef; - -/*! - * NiSourceTexture - Describes texture source and properties. - */ - -class NIFLIB_API NiSourceTexture : public NI_SOURCE_TEXTURE_PARENT { -public: - NiSourceTexture(); - ~NiSourceTexture(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - bool IsTextureExternal (); - - void SetExternalTexture( string file_name, const Ref<NiObject> & unk_link ); - - void SetInternalTexture( byte unk_byte, string original_file_name, const Ref<NiPixelData> & pixel_data ); - - string GetExternalFileName() const; - Ref<NiObject> GetExternalUnknownLink() const; - - byte GetInternalUnknownByte() const; - string GetInternalOriginalFileName() const; - Ref<NiPixelData> GetInternalPixelData() const; - - PixelLayout GetPixelLayout() const; - void SetPixelLayout( PixelLayout n ); - - MipMapFormat GetMipMapFormat() const; - void SetMipMapFormat( MipMapFormat n ); - - AlphaFormat GetAlphaFormat() const; - void SetAlphaFormat( AlphaFormat n ); - - //TODO: Fix name problem with Unknown Byte in XML - //byte GetUnknownByte2() const; - //SetUnknownByte2( byte n ); - - //byte GetUnknownByte3() const; - //SetUnknownByte3( byte n ); -protected: - NI_SOURCE_TEXTURE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSpecularProperty.cpp b/NifExport/niflib/obj/NiSpecularProperty.cpp deleted file mode 100755 index c101f70..0000000 --- a/NifExport/niflib/obj/NiSpecularProperty.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSpecularProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSpecularProperty::TYPE("NiSpecularProperty", &NI_SPECULAR_PROPERTY_PARENT::TypeConst() ); - -NiSpecularProperty::NiSpecularProperty() NI_SPECULAR_PROPERTY_CONSTRUCT {} - -NiSpecularProperty::~NiSpecularProperty() {} - -void NiSpecularProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SPECULAR_PROPERTY_READ -} - -void NiSpecularProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SPECULAR_PROPERTY_WRITE -} - -string NiSpecularProperty::asString( bool verbose ) const { - NI_SPECULAR_PROPERTY_STRING -} - -void NiSpecularProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SPECULAR_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiSpecularProperty::GetRefs() const { - NI_SPECULAR_PROPERTY_GETREFS -} - -const Type & NiSpecularProperty::GetType() const { - return TYPE; -}; - -ushort NiSpecularProperty::GetFlags() const { - return flags; -} - -void NiSpecularProperty::SetFlags( ushort n ) { - flags = n; -} diff --git a/NifExport/niflib/obj/NiSpecularProperty.h b/NifExport/niflib/obj/NiSpecularProperty.h deleted file mode 100755 index 7152e0a..0000000 --- a/NifExport/niflib/obj/NiSpecularProperty.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISPECULARPROPERTY_H_ -#define _NISPECULARPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiSpecularProperty; -typedef Ref<NiSpecularProperty> NiSpecularPropertyRef; - -/*! - * NiSpecularProperty - Gives specularity to a shape. Flags 0x0001. - */ - -class NIFLIB_API NiSpecularProperty : public NI_SPECULAR_PROPERTY_PARENT { -public: - NiSpecularProperty(); - ~NiSpecularProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags( ushort n ); - -protected: - NI_SPECULAR_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSphericalCollider.cpp b/NifExport/niflib/obj/NiSphericalCollider.cpp deleted file mode 100755 index be7cb33..0000000 --- a/NifExport/niflib/obj/NiSphericalCollider.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSphericalCollider.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSphericalCollider::TYPE("NiSphericalCollider", &NI_SPHERICAL_COLLIDER_PARENT::TypeConst() ); - -NiSphericalCollider::NiSphericalCollider() NI_SPHERICAL_COLLIDER_CONSTRUCT {} - -NiSphericalCollider::~NiSphericalCollider() {} - -void NiSphericalCollider::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SPHERICAL_COLLIDER_READ -} - -void NiSphericalCollider::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SPHERICAL_COLLIDER_WRITE -} - -string NiSphericalCollider::asString( bool verbose ) const { - NI_SPHERICAL_COLLIDER_STRING -} - -void NiSphericalCollider::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SPHERICAL_COLLIDER_FIXLINKS -} - -list<NiObjectRef> NiSphericalCollider::GetRefs() const { - NI_SPHERICAL_COLLIDER_GETREFS -} - -const Type & NiSphericalCollider::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiSphericalCollider.h b/NifExport/niflib/obj/NiSphericalCollider.h deleted file mode 100755 index 03f8a90..0000000 --- a/NifExport/niflib/obj/NiSphericalCollider.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISPHERICALCOLLIDER_H_ -#define _NISPHERICALCOLLIDER_H_ - -#include "AParticleModifier.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiSphericalCollider; -typedef Ref<NiSphericalCollider> NiSphericalColliderRef; - -/*! - * NiSphericalCollider - Unknown. - */ - -class NIFLIB_API NiSphericalCollider : public NI_SPHERICAL_COLLIDER_PARENT { -public: - NiSphericalCollider(); - ~NiSphericalCollider(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_SPHERICAL_COLLIDER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiSpotLight.cpp b/NifExport/niflib/obj/NiSpotLight.cpp deleted file mode 100755 index d0a5740..0000000 --- a/NifExport/niflib/obj/NiSpotLight.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiSpotLight.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiSpotLight::TYPE("NiSpotLight", &NI_SPOT_LIGHT_PARENT::TypeConst() ); - -NiSpotLight::NiSpotLight() NI_SPOT_LIGHT_CONSTRUCT {} - -NiSpotLight::~NiSpotLight() {} - -void NiSpotLight::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SPOT_LIGHT_READ -} - -void NiSpotLight::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_SPOT_LIGHT_WRITE -} - -string NiSpotLight::asString( bool verbose ) const { - NI_SPOT_LIGHT_STRING -} - -void NiSpotLight::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_SPOT_LIGHT_FIXLINKS -} - -list<NiObjectRef> NiSpotLight::GetRefs() const { - NI_SPOT_LIGHT_GETREFS -} - -const Type & NiSpotLight::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiSpotLight.h b/NifExport/niflib/obj/NiSpotLight.h deleted file mode 100755 index 00b47d2..0000000 --- a/NifExport/niflib/obj/NiSpotLight.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISPOTLIGHT_H_ -#define _NISPOTLIGHT_H_ - -#include "NiPointLight.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiSpotLight; -typedef Ref<NiSpotLight> NiSpotLightRef; - -/*! - * NiSpotLight - A spot. - */ - -class NIFLIB_API NiSpotLight : public NI_SPOT_LIGHT_PARENT { -public: - NiSpotLight(); - ~NiSpotLight(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_SPOT_LIGHT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiStencilProperty.cpp b/NifExport/niflib/obj/NiStencilProperty.cpp deleted file mode 100755 index 876122f..0000000 --- a/NifExport/niflib/obj/NiStencilProperty.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiStencilProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiStencilProperty::TYPE("NiStencilProperty", &NI_STENCIL_PROPERTY_PARENT::TypeConst() ); - -NiStencilProperty::NiStencilProperty() NI_STENCIL_PROPERTY_CONSTRUCT {} - -NiStencilProperty::~NiStencilProperty() {} - -void NiStencilProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STENCIL_PROPERTY_READ -} - -void NiStencilProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_STENCIL_PROPERTY_WRITE -} - -string NiStencilProperty::asString( bool verbose ) const { - NI_STENCIL_PROPERTY_STRING -} - -void NiStencilProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STENCIL_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiStencilProperty::GetRefs() const { - NI_STENCIL_PROPERTY_GETREFS -} - -const Type & NiStencilProperty::GetType() const { - return TYPE; -}; - -ushort NiStencilProperty::GetFlags() const { - return flags; -} - -void NiStencilProperty::SetFlags(ushort value) { - flags = value; -} - -bool NiStencilProperty::GetStencilEnabled() const { - return stencilEnabled; -} - -void NiStencilProperty::SetStencilEnabled(bool value) { - stencilEnabled = value; -} - -uint NiStencilProperty::GetStencilFunction() const { - return stencilFunction; -} - -void NiStencilProperty::SetStencilFunction(uint value) { - stencilFunction = value; -} - -uint NiStencilProperty::GetStencilRef() const { - return stencilRef; -} - -void NiStencilProperty::SetStencilRef(uint value) { - stencilRef = value; -} - -uint NiStencilProperty::GetStencilMask() const { - return stencilMask; -} - -void NiStencilProperty::SetStencilMask(uint value) { - stencilMask = value; -} - -uint NiStencilProperty::GetFailAction() const { - return failAction; -} - -void NiStencilProperty::SetFailAction(uint value) { - failAction = value; -} - -uint NiStencilProperty::GetZFailAction() const { - return zFailAction; -} - -void NiStencilProperty::SetZFailAction(uint value) { - zFailAction = value; -} - -uint NiStencilProperty::GetPassAction() const { - return passAction; -} - -void NiStencilProperty::SetPassAction(uint value) { - passAction = value; -} - -uint NiStencilProperty::GetDrawMode() const { - return drawMode; -} - -void NiStencilProperty::SetDrawMode(uint value) { - drawMode = value; -} diff --git a/NifExport/niflib/obj/NiStencilProperty.h b/NifExport/niflib/obj/NiStencilProperty.h deleted file mode 100755 index a0af351..0000000 --- a/NifExport/niflib/obj/NiStencilProperty.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISTENCILPROPERTY_H_ -#define _NISTENCILPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiStencilProperty; -typedef Ref<NiStencilProperty> NiStencilPropertyRef; - -/*! - * NiStencilProperty - Allows control of stencil testing. - */ - -class NIFLIB_API NiStencilProperty : public NI_STENCIL_PROPERTY_PARENT { -public: - NiStencilProperty(); - ~NiStencilProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags(ushort value); - - bool GetStencilEnabled() const; - void SetStencilEnabled(bool value); - - uint GetStencilFunction() const; - void SetStencilFunction(uint value); - - uint GetStencilRef() const; - void SetStencilRef(uint value); - - uint GetStencilMask() const; - void SetStencilMask(uint value); - - uint GetFailAction() const; - void SetFailAction(uint value); - - uint GetZFailAction() const; - void SetZFailAction(uint value); - - uint GetPassAction() const; - void SetPassAction(uint value); - - uint GetDrawMode() const; - void SetDrawMode(uint value); - - -protected: - NI_STENCIL_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiStringExtraData.cpp b/NifExport/niflib/obj/NiStringExtraData.cpp deleted file mode 100755 index 71ef07a..0000000 --- a/NifExport/niflib/obj/NiStringExtraData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiStringExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiStringExtraData::TYPE("NiStringExtraData", &NI_STRING_EXTRA_DATA_PARENT::TypeConst() ); - -NiStringExtraData::NiStringExtraData() NI_STRING_EXTRA_DATA_CONSTRUCT {} - -NiStringExtraData::~NiStringExtraData() {} - -void NiStringExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STRING_EXTRA_DATA_READ -} - -void NiStringExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_STRING_EXTRA_DATA_WRITE -} - -string NiStringExtraData::asString( bool verbose ) const { - NI_STRING_EXTRA_DATA_STRING -} - -void NiStringExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STRING_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiStringExtraData::GetRefs() const { - NI_STRING_EXTRA_DATA_GETREFS -} - -const Type & NiStringExtraData::GetType() const { - return TYPE; -}; - -string NiStringExtraData::GetData() const { - return stringData; -} - -void NiStringExtraData::SetData( const string & n ) { - stringData = n; - bytesRemaining = uint(stringData.size()) + 4; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiStringExtraData.h b/NifExport/niflib/obj/NiStringExtraData.h deleted file mode 100755 index 6f379b2..0000000 --- a/NifExport/niflib/obj/NiStringExtraData.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISTRINGEXTRADATA_H_ -#define _NISTRINGEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiStringExtraData; -typedef Ref<NiStringExtraData> NiStringExtraDataRef; - -/*! - * NiStringExtraData - Apparently commands for an optimizer instructing - * it to keep things it would normally discard. Also refers to NiNode - * blocks (through their name) in animation .kf files. - */ - -class NIFLIB_API NiStringExtraData : public NI_STRING_EXTRA_DATA_PARENT { -public: - NiStringExtraData(); - ~NiStringExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - string GetData() const; - void SetData( const string & n ); - -protected: - NI_STRING_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiStringPalette.cpp b/NifExport/niflib/obj/NiStringPalette.cpp deleted file mode 100755 index a98ebd7..0000000 --- a/NifExport/niflib/obj/NiStringPalette.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiStringPalette.h" -#include "../gen/StringPalette.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiStringPalette::TYPE("NiStringPalette", &NI_STRING_PALETTE_PARENT::TypeConst() ); - -NiStringPalette::NiStringPalette() NI_STRING_PALETTE_CONSTRUCT {} - -NiStringPalette::~NiStringPalette() {} - -void NiStringPalette::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STRING_PALETTE_READ -} - -void NiStringPalette::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_STRING_PALETTE_WRITE -} - -string NiStringPalette::asString( bool verbose ) const { - NI_STRING_PALETTE_STRING -} - -void NiStringPalette::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STRING_PALETTE_FIXLINKS -} - -list<NiObjectRef> NiStringPalette::GetRefs() const { - NI_STRING_PALETTE_GETREFS -} - -const Type & NiStringPalette::GetType() const { - return TYPE; -}; - -string NiStringPalette::GetPaletteString() const { - return palette.palette; -} - -void NiStringPalette::SetPaletteString( const string & n ) { - palette.palette = n; -} - -string NiStringPalette::GetSubStr( short offset ) const { - string out; - - // -1 is a null offset - if ( offset == -1 ) { - return out; - } - - for ( uint i = offset; i < palette.palette.size(); ++i ) { - if ( palette.palette[i] == '\0' ) { - break; - } - out.push_back( palette.palette[i] ); - } - - return out; -} - -unsigned int NiStringPalette::AddSubStr( const string & n ) { - //Search for the string - uint offset = (uint)palette.palette.find( n ); - - //If string was not found, append it - if ( offset == 0xFFFFFFFF ) { - offset = (uint)palette.palette.size(); - palette.palette.append( n + '\0' ); - } - - //Return the offset where the string was found or appended - return offset; -} diff --git a/NifExport/niflib/obj/NiStringPalette.h b/NifExport/niflib/obj/NiStringPalette.h deleted file mode 100755 index 423ebad..0000000 --- a/NifExport/niflib/obj/NiStringPalette.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISTRINGPALETTE_H_ -#define _NISTRINGPALETTE_H_ - -#include "NiObject.h" - -// Include structures -#include "../gen/StringPalette.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiStringPalette; -typedef Ref<NiStringPalette> NiStringPaletteRef; - -/*! - * NiStringPalette - List of 0x00-seperated strings, which are names of - * controlled blocks and controller types. Used in .kf files in - * conjunction with NiControllerSequence. - */ - -class NIFLIB_API NiStringPalette : public NI_STRING_PALETTE_PARENT { -public: - NiStringPalette(); - ~NiStringPalette(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - string GetPaletteString() const; - void SetPaletteString( const string & n ); - string GetSubStr( short offset ) const; - unsigned int AddSubStr( const string & n ); - -protected: - NI_STRING_PALETTE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiStringsExtraData.cpp b/NifExport/niflib/obj/NiStringsExtraData.cpp deleted file mode 100755 index 4bca391..0000000 --- a/NifExport/niflib/obj/NiStringsExtraData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiStringsExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiStringsExtraData::TYPE("NiStringsExtraData", &NI_STRINGS_EXTRA_DATA_PARENT::TypeConst() ); - -NiStringsExtraData::NiStringsExtraData() NI_STRINGS_EXTRA_DATA_CONSTRUCT {} - -NiStringsExtraData::~NiStringsExtraData() {} - -void NiStringsExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STRINGS_EXTRA_DATA_READ -} - -void NiStringsExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_STRINGS_EXTRA_DATA_WRITE -} - -string NiStringsExtraData::asString( bool verbose ) const { - NI_STRINGS_EXTRA_DATA_STRING -} - -void NiStringsExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_STRINGS_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiStringsExtraData::GetRefs() const { - NI_STRINGS_EXTRA_DATA_GETREFS -} - -const Type & NiStringsExtraData::GetType() const { - return TYPE; -}; - -vector<string> NiStringsExtraData::GetData() const { - return data; -}; - -void NiStringsExtraData::SetData( const vector<string> & n ) { - numStrings = uint(n.size()); - data = n; -}; \ No newline at end of file diff --git a/NifExport/niflib/obj/NiStringsExtraData.h b/NifExport/niflib/obj/NiStringsExtraData.h deleted file mode 100755 index 07131e1..0000000 --- a/NifExport/niflib/obj/NiStringsExtraData.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NISTRINGSEXTRADATA_H_ -#define _NISTRINGSEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiStringsExtraData; -typedef Ref<NiStringsExtraData> NiStringsExtraDataRef; - -/*! - * NiStringsExtraData - List of strings; for example, a list of all bone - * names. - */ - -class NIFLIB_API NiStringsExtraData : public NI_STRINGS_EXTRA_DATA_PARENT { -public: - NiStringsExtraData(); - ~NiStringsExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - vector<string> GetData() const; - void SetData( const vector<string> & n ); - -protected: - NI_STRINGS_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTextKeyExtraData.cpp b/NifExport/niflib/obj/NiTextKeyExtraData.cpp deleted file mode 100755 index 1330e89..0000000 --- a/NifExport/niflib/obj/NiTextKeyExtraData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTextKeyExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTextKeyExtraData::TYPE("NiTextKeyExtraData", &NI_TEXT_KEY_EXTRA_DATA_PARENT::TypeConst() ); - -NiTextKeyExtraData::NiTextKeyExtraData() NI_TEXT_KEY_EXTRA_DATA_CONSTRUCT {} - -NiTextKeyExtraData::~NiTextKeyExtraData() {} - -void NiTextKeyExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXT_KEY_EXTRA_DATA_READ -} - -void NiTextKeyExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TEXT_KEY_EXTRA_DATA_WRITE -} - -string NiTextKeyExtraData::asString( bool verbose ) const { - NI_TEXT_KEY_EXTRA_DATA_STRING -} - -void NiTextKeyExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXT_KEY_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiTextKeyExtraData::GetRefs() const { - NI_TEXT_KEY_EXTRA_DATA_GETREFS -} - -const Type & NiTextKeyExtraData::GetType() const { - return TYPE; -}; - -vector< Key<string> > NiTextKeyExtraData::GetKeys() const { - return textKeys; -} - -void NiTextKeyExtraData::SetKeys( vector< Key<string> > const & keys ) { - textKeys = keys; -} - diff --git a/NifExport/niflib/obj/NiTextKeyExtraData.h b/NifExport/niflib/obj/NiTextKeyExtraData.h deleted file mode 100755 index 69c309d..0000000 --- a/NifExport/niflib/obj/NiTextKeyExtraData.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITEXTKEYEXTRADATA_H_ -#define _NITEXTKEYEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTextKeyExtraData; -typedef Ref<NiTextKeyExtraData> NiTextKeyExtraDataRef; - -/*! - * NiTextKeyExtraData - Extra data, used to name different animation - * sequences. - */ - -class NIFLIB_API NiTextKeyExtraData : public NI_TEXT_KEY_EXTRA_DATA_PARENT { -public: - NiTextKeyExtraData(); - ~NiTextKeyExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - const Type & GetType() const; - - /*! Retrieves the text note key data. - * \return A vector containing Key<string> data which specify text note over time. - * \sa NiKeyframeData::SetKeys, Key - */ - vector< Key<string> > GetKeys() const; - - /*! Sets the text note key data. - * \param keys A vector containing new Key<string> data which will replace any existing data. - * \sa NiKeyframeData::GetKeys, Key - */ - void SetKeys( vector< Key<string> > const & keys ); - - //TODO: There is an unknown member in this class - -protected: - NI_TEXT_KEY_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTextureEffect.cpp b/NifExport/niflib/obj/NiTextureEffect.cpp deleted file mode 100755 index 89700ab..0000000 --- a/NifExport/niflib/obj/NiTextureEffect.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTextureEffect.h" -#include "NiSourceTexture.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTextureEffect::TYPE("NiTextureEffect", &NI_TEXTURE_EFFECT_PARENT::TypeConst() ); - -NiTextureEffect::NiTextureEffect() NI_TEXTURE_EFFECT_CONSTRUCT {} - -NiTextureEffect::~NiTextureEffect() {} - -void NiTextureEffect::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXTURE_EFFECT_READ -} - -void NiTextureEffect::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TEXTURE_EFFECT_WRITE -} - -string NiTextureEffect::asString( bool verbose ) const { - NI_TEXTURE_EFFECT_STRING -} - -void NiTextureEffect::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXTURE_EFFECT_FIXLINKS -} - -list<NiObjectRef> NiTextureEffect::GetRefs() const { - NI_TEXTURE_EFFECT_GETREFS -} - -const Type & NiTextureEffect::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTextureEffect.h b/NifExport/niflib/obj/NiTextureEffect.h deleted file mode 100755 index a9e3909..0000000 --- a/NifExport/niflib/obj/NiTextureEffect.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITEXTUREEFFECT_H_ -#define _NITEXTUREEFFECT_H_ - -#include "NiDynamicEffect.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiSourceTexture; - -#include "../gen/obj_defines.h" - -class NiTextureEffect; -typedef Ref<NiTextureEffect> NiTextureEffectRef; - -/*! - * NiTextureEffect - Enables environment mapping. Should be in both the - * children list and effects list of the NiTriShape block. For Morrowind: - * the bump map can be used to bump the environment map (note that the - * bump map is ignored if no NiTextureEffect block is present). - */ - -class NIFLIB_API NiTextureEffect : public NI_TEXTURE_EFFECT_PARENT { -public: - NiTextureEffect(); - ~NiTextureEffect(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TEXTURE_EFFECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTextureTransformController.cpp b/NifExport/niflib/obj/NiTextureTransformController.cpp deleted file mode 100755 index 9e29d01..0000000 --- a/NifExport/niflib/obj/NiTextureTransformController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTextureTransformController.h" -#include "NiFloatData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTextureTransformController::TYPE("NiTextureTransformController", &NI_TEXTURE_TRANSFORM_CONTROLLER_PARENT::TypeConst() ); - -NiTextureTransformController::NiTextureTransformController() NI_TEXTURE_TRANSFORM_CONTROLLER_CONSTRUCT {} - -NiTextureTransformController::~NiTextureTransformController() {} - -void NiTextureTransformController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXTURE_TRANSFORM_CONTROLLER_READ -} - -void NiTextureTransformController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TEXTURE_TRANSFORM_CONTROLLER_WRITE -} - -string NiTextureTransformController::asString( bool verbose ) const { - NI_TEXTURE_TRANSFORM_CONTROLLER_STRING -} - -void NiTextureTransformController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXTURE_TRANSFORM_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiTextureTransformController::GetRefs() const { - NI_TEXTURE_TRANSFORM_CONTROLLER_GETREFS -} - -const Type & NiTextureTransformController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTextureTransformController.h b/NifExport/niflib/obj/NiTextureTransformController.h deleted file mode 100755 index dd6c722..0000000 --- a/NifExport/niflib/obj/NiTextureTransformController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITEXTURETRANSFORMCONTROLLER_H_ -#define _NITEXTURETRANSFORMCONTROLLER_H_ - -#include "NiSingleInterpolatorController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiFloatData; - -#include "../gen/obj_defines.h" - -class NiTextureTransformController; -typedef Ref<NiTextureTransformController> NiTextureTransformControllerRef; - -/*! - * NiTextureTransformController - Texture transformation controller. - */ - -class NIFLIB_API NiTextureTransformController : public NI_TEXTURE_TRANSFORM_CONTROLLER_PARENT { -public: - NiTextureTransformController(); - ~NiTextureTransformController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TEXTURE_TRANSFORM_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTexturingProperty.cpp b/NifExport/niflib/obj/NiTexturingProperty.cpp deleted file mode 100755 index 1c5c03f..0000000 --- a/NifExport/niflib/obj/NiTexturingProperty.cpp +++ /dev/null @@ -1,264 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTexturingProperty.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -#include "../gen/ShaderTexDesc.h" -#include "../gen/TexDesc.h" -#include "NiSourceTexture.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTexturingProperty::TYPE("NiTexturingProperty", &NI_TEXTURING_PROPERTY_PARENT::TypeConst() ); - -NiTexturingProperty::NiTexturingProperty() NI_TEXTURING_PROPERTY_CONSTRUCT {} - -NiTexturingProperty::~NiTexturingProperty() {} - -void NiTexturingProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXTURING_PROPERTY_READ -} - -void NiTexturingProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TEXTURING_PROPERTY_WRITE -} - -string NiTexturingProperty::asString( bool verbose ) const { - NI_TEXTURING_PROPERTY_STRING -} - -void NiTexturingProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TEXTURING_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiTexturingProperty::GetRefs() const { - NI_TEXTURING_PROPERTY_GETREFS -} - -const Type & NiTexturingProperty::GetType() const { - return TYPE; -}; - -ApplyMode NiTexturingProperty::GetApplyMode() const { - return applyMode; -} - -void NiTexturingProperty::SetApplyMode( ApplyMode new_val ) { - applyMode = new_val; -} - -int NiTexturingProperty::GetTextureCount() const { - //TODO: Create a built in type for this array of textures so it can be a real array again? - int count = 0; - if ( hasBaseTexture ) { count++; } - if ( hasBumpMapTexture ) { count++; } - if ( hasDarkTexture ) { count++; } - if ( hasDecal0Texture ) { count++; } - if ( hasDecal1Texture ) { count++; } - if ( hasDetailTexture ) { count++; } - if ( hasGlossTexture ) { count++; } - if ( hasGlowTexture ) { count++; } - return count; -} - -int NiTexturingProperty::GetShaderTextureCount() const { - return int(shaderTextures.size()); -} - -TexDesc NiTexturingProperty::GetTexture( int n ) const { - //TODO: Create a built in type for this array of textures so it can be a real array again? - //Copy the values to the right texture - switch (n) { - case BASE_MAP: - return baseTexture; - case DARK_MAP: - return darkTexture; - case DETAIL_MAP: - return detailTexture; - case GLOSS_MAP: - return glossTexture; - case GLOW_MAP: - return glowTexture; - case BUMP_MAP: - return bumpMapTexture; - case DECAL_0_MAP: - return decal0Texture; - case DECAL_1_MAP: - return decal1Texture; - }; - - //If we get here, an invalid texture was requested. - throw runtime_error("Invalid texture requested."); -} - -TexDesc NiTexturingProperty::GetShaderTexture( int n ) const { - return shaderTextures[n].textureData; -} - -float NiTexturingProperty::GetLumaOffset() const { - return bumpMapLumaOffset; -} - -void NiTexturingProperty::SetLumaOffset( float new_val ) { - bumpMapLumaOffset = new_val; -} - -float NiTexturingProperty::GetLumaScale() const { - return bumpMapLumaScale; -} - -void NiTexturingProperty::SetLumaScale( float new_val ) { - bumpMapLumaScale = new_val; -} - -Matrix22 NiTexturingProperty::GetBumpMapMatrix() const { - return bumpMapMatrix; -} - -void NiTexturingProperty::SetBumpMapMatrix( Matrix22 & new_val ) { - bumpMapMatrix = new_val; -} - -void NiTexturingProperty::SetTextureCount( int new_count ) { - - if ( new_count < int(textureCount) ) { - for ( int i = int(textureCount); i > new_count; --i ) { - ClearTexture(i); - } - } -} - -void NiTexturingProperty::SetShaderTextureCount( int new_count ) { - //Resize array - shaderTextures.resize( new_count ); -} - -void NiTexturingProperty::SetTexture( int n, TexDesc & new_val ) { - //Make sure index is not out of range - - if ( n < 0 || n > int(textureCount) ) { - throw runtime_error("SetTexture - Index out of range. Call SetTextureCount to resize."); - } - - //TODO: Create a built in type for this array of textures so it can be a real array again? - //Copy the values to the right texture - switch (n) { - case BASE_MAP: - hasBaseTexture = true; - baseTexture = new_val; - break; - case DARK_MAP: - hasDarkTexture = true; - darkTexture = new_val; - break; - case DETAIL_MAP: - hasDetailTexture = true; - detailTexture = new_val; - break; - case GLOSS_MAP: - hasGlossTexture = true; - glossTexture = new_val; - break; - case GLOW_MAP: - hasGlowTexture = true; - glowTexture = new_val; - break; - case BUMP_MAP: - hasBumpMapTexture = true; - bumpMapTexture = new_val; - break; - case DECAL_0_MAP: - hasDecal0Texture = true; - decal0Texture = new_val; - break; - case DECAL_1_MAP: - hasDecal1Texture = true; - decal1Texture = new_val; - break; - }; -} - -void NiTexturingProperty::SetShaderTexture( int n, TexDesc & new_val ) { - //Make sure index is not out of range - if ( n < 0 || n > int(shaderTextures.size()) ) { - throw runtime_error("SetShaderTexture - Index out of range. Call SetShaderTextureCount to resize."); - } - - //Copy the values - shaderTextures[n].textureData = new_val; -} - -bool NiTexturingProperty::HasTexture( int n ) const { - switch (n) { - case BASE_MAP: - return hasBaseTexture; - case DARK_MAP: - return hasDarkTexture; - case DETAIL_MAP: - return hasDetailTexture; - case GLOSS_MAP: - return hasGlossTexture; - case GLOW_MAP: - return hasGlowTexture; - case BUMP_MAP: - return hasBumpMapTexture; - case DECAL_0_MAP: - return hasDecal0Texture; - case DECAL_1_MAP: - return hasDecal1Texture; - default: - throw("You have specified an invalid texture type."); - }; -} - -void NiTexturingProperty::ClearTexture( int n ) { - switch (n) { - case BASE_MAP: - hasBaseTexture = false; - baseTexture.source = NULL; - break; - case DARK_MAP: - hasDarkTexture = false; - darkTexture.source = NULL; - break; - case DETAIL_MAP: - hasDetailTexture = false; - detailTexture.source = NULL; - break; - case GLOSS_MAP: - hasGlossTexture = false; - glossTexture.source = NULL; - break; - case GLOW_MAP: - hasGlowTexture = false; - glowTexture.source = NULL; - break; - case BUMP_MAP: - hasBumpMapTexture = false; - bumpMapTexture.source = NULL; - break; - case DECAL_0_MAP: - hasDecal0Texture = false; - decal0Texture.source = NULL; - break; - case DECAL_1_MAP: - hasDecal1Texture = false; - decal1Texture.source = NULL; - break; - }; -} diff --git a/NifExport/niflib/obj/NiTexturingProperty.h b/NifExport/niflib/obj/NiTexturingProperty.h deleted file mode 100755 index 21e75be..0000000 --- a/NifExport/niflib/obj/NiTexturingProperty.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NiTexturingProperty_H_ -#define _NiTexturingProperty_H_ - -#include "NiProperty.h" -// Include structures -#include "../gen/TexDesc.h" -#include "../gen/ShaderTexDesc.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTexturingProperty; -typedef Ref<NiTexturingProperty> NiTexturingPropertyRef; - -/*! - * NiTexturingProperty - Describes an object's textures. - */ - -class NIFLIB_API NiTexturingProperty : public NI_TEXTURING_PROPERTY_PARENT { -public: - NiTexturingProperty(); - ~NiTexturingProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! Retrieves the number of texture slots defined by this texturing propery. Texture slots may or may not actually contain textures, but each slot has a different meaning so the way a texture is used is dependant upon which slot it is in. - * \return The number of texture slots defined by this texturing property. - * \sa NiTexturingProperty::SetTextureCount - */ - int GetTextureCount() const; - - /*! Sets the number of texture slots defined by this texturing propery. Known valid values are 7 and 8. - * \param new_count The new size of the texture slot array. - * \sa NiTexturingProperty::GetTextureCount - */ - void SetTextureCount( int new_count ); - - /*! Retrieves the number of extra texture slots defined by this texturing propery. These only exist in later Nif versions and their function is unknown. - * \return The number of extra texture slots defined by this texturing property. - * \sa NiTexturingProperty::SetExtraTextureCount - */ - int GetShaderTextureCount() const; - - /*! Sets the number of extra texture slots defined by this texturing propery. Often zero. - * \param new_count The new size of the extra texture slot array. - * \sa NiTexturingProperty::GetExtraTextureCount - */ - void SetShaderTextureCount( int new_count ); - - /*! Retrieves the current apply mode for this texturing propery. This enum value affects the way the textures will be drawn. - * \return The current apply mode for this texturing property. - * \sa NiTexturingProperty::SetApplyMode - */ - ApplyMode GetApplyMode() const; - - /*! Sets the current apply mode for this texturing propery. This enum value affects the way the textures will be drawn. - * \param new_val The new apply mode for this texturing property. - * \sa NiTexturingProperty::GetApplyMode - */ - void SetApplyMode( ApplyMode new_val ); - - /*! Retrieves the texture desription structure that describes a texture by slot number. The TexType enum is provided to make it easy to select the texture slot with the specific qualities that you want. - * \param n The slot number of the texture to get the texture description of. This is a positive zero based index that must be less than the value returned by NiTexturingProperty::GetTextureCount. - * \sa NiTexturingProperty::SetTexture, TexType - */ - TexDesc GetTexture( int n ) const; - - /*! Checks whether a particular texture type is being used - * \param n The slot number of the texture to check. This is a positive zero based index that must be less than the value returned by NiTexturingProperty::GetTextureCount. - * \return true if the texture in this slot is used, false otherwise. - */ - bool HasTexture( int n ) const; - - /*! Clears a specific texture slot. - * \param n The slot number of the texture to clear. This is a positive zero based index that must be less than the value returned by NiTexturingProperty::GetTextureCount. - */ - void ClearTexture( int n ); - - /*! Sets a new description for the texture in the given slot number. The TexType enum is provided to make it easy to select the texture slot with the specific qualities that you want. - * \param n The slot number of the texture to set the texture description of. This is a positive zero based index that must be less than the value returned by NiTexturingProperty::GetTextureCount. - * \param new_val Thew new texture descriptoin for the texture at the given slot number. - * \sa NiTexturingProperty::GetTexture, TexType - */ - void SetTexture( int n, TexDesc & new_val ); - - /*! Retrieves the texture desription structure that describes an extra texture by slot number. These only exist in the later Nif versions and their function is unknown. - * \param n The slot number of the extra texture to get the texture description of. This is a positive zero based index that must be less than the value returned by NiTexturingProperty::GetExtraTextureCount. - * \sa NiTexturingProperty::SetExtraTexture - */ - TexDesc GetShaderTexture( int n ) const; - - /*! Sets a new description for the texture in the given slot number. These only exist in the later Nif versions and their function is unknown. - * \param n The slot number of the extra texture to set the texture description of. This is a positive zero based index that must be less than the value returned by NiTexturingProperty::GetTextureCount. - * \param new_val Thew new texture descriptoin for the extra texture at the given slot number. - * \sa NiTexturingProperty::GetTexture, TexType - */ - void SetShaderTexture( int n, TexDesc & new_val ); - - /*! Retrieves the bump map luma offset. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \return The bump map luma offset. - * \sa NiTexturingProperty::SetLumaOffset - */ - float GetLumaOffset() const; - - /*! Sets the bump map luma offset. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \param new_val The new bump map luma offset. - * \sa NiTexturingProperty::GetLumaOffset - */ - void SetLumaOffset( float new_val ); - - /*! Retrieves the bump map luma scale. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \return The bump map luma scale. - * \sa NiTexturingProperty::SetLumaScale - */ - float GetLumaScale() const; - - /*! Sets the bump map luma scale. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \param new_val The new bump map luma scale. - * \sa NiTexturingProperty::GetLumaScale - */ - void SetLumaScale( float new_val ); - - /*! Retrieves the bump map matrix. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \return the bump map matrix. - * \sa NiTexturingProperty::SetBumpMapMatrix - */ - Matrix22 GetBumpMapMatrix() const; - - /*! Sets the bump map matrix. This is only relevant if a texture is defined in the BUMP_MAP texture slot. The function of this is unknown. - * \param new_val The new bump map matrix. - * \sa NiTexturingProperty::GetBumpMapMatrix - */ - void SetBumpMapMatrix( Matrix22 & new_val ); - -protected: - NI_TEXTURING_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTimeController.cpp b/NifExport/niflib/obj/NiTimeController.cpp deleted file mode 100755 index b3380dd..0000000 --- a/NifExport/niflib/obj/NiTimeController.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTimeController.h" -#include "NiObjectNET.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTimeController::TYPE("NiTimeController", &NI_TIME_CONTROLLER_PARENT::TypeConst() ); - -NiTimeController::NiTimeController() NI_TIME_CONTROLLER_CONSTRUCT {} - -NiTimeController::~NiTimeController() {} - -void NiTimeController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TIME_CONTROLLER_READ -} - -void NiTimeController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TIME_CONTROLLER_WRITE -} - -string NiTimeController::asString( bool verbose ) const { - NI_TIME_CONTROLLER_STRING -} - -void NiTimeController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TIME_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiTimeController::GetRefs() const { - NI_TIME_CONTROLLER_GETREFS -} - -const Type & NiTimeController::GetType() const { - return TYPE; -}; - -NiTimeControllerRef NiTimeController::GetNextController() const { - return nextController; -} - -void NiTimeController::SetNextController( const NiTimeControllerRef & obj ) { - nextController = obj; -} - -void NiTimeController::SetTarget( NiObjectNET * new_target ) { - target = new_target; -} - -Ref<NiObjectNET> NiTimeController::GetTarget() { - return target; -} - -ushort NiTimeController::GetFlags() const { - return flags; -} - -void NiTimeController::SetFlags( ushort n ) { - flags = n; -} - -float NiTimeController::GetFrequency() const { - return frequency; -} - -void NiTimeController::SetFrequency( float n ) { - frequency = n; -} - -float NiTimeController::GetPhase() const { - return phase; -} - -void NiTimeController::SetPhase( float n ) { - phase = n; -} - -float NiTimeController::GetStartTime() const { - return startTime; -} - -void NiTimeController::SetStartTime( float n ) { - startTime = n; -} - -float NiTimeController::GetStopTime() const { - return stopTime; -} - -void NiTimeController::SetStopTime( float n ) { - stopTime = n; -} diff --git a/NifExport/niflib/obj/NiTimeController.h b/NifExport/niflib/obj/NiTimeController.h deleted file mode 100755 index b4c8386..0000000 --- a/NifExport/niflib/obj/NiTimeController.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITIMECONTROLLER_H_ -#define _NITIMECONTROLLER_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { -class NiObject; - -#include "../gen/obj_defines.h" - -class NiTimeController; -class NiObjectNET; -typedef Ref<NiTimeController> NiTimeControllerRef; - -/*! - * NiTimeController - A generic time controller block. - */ - -class NIFLIB_API NiTimeController : public NI_TIME_CONTROLLER_PARENT { -public: - NiTimeController(); - ~NiTimeController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - /*! - * Returns a reference to the next controller in a linked list. - * This function should only be called by NiObjectNET. - * \return A reference to the next controller in the linked list. - */ - NiTimeControllerRef GetNextController() const; - - /*! - * Sets the next controller in a linked list. - * This function should only be called by NiObjectNET. - * \param obj A reference to the object to set as the one after this in the chain. - */ - void SetNextController( const NiTimeControllerRef & obj ); - - /*! - * This function should only be called by NiObjectNET. It sets the target of - * this controller when it is attatched to the NiObjectNET class. */ - void SetTarget( NiObjectNET * new_target ); - - /*! - * This function returns the current target NiObjectNET, if any, that this controller - * is acting on. - * \return A reference to the current target of this controller. - */ - Ref<NiObjectNET> GetTarget(); - - ushort GetFlags() const; - void SetFlags( ushort n ); - - float GetFrequency() const; - void SetFrequency( float n ); - - float GetPhase() const; - void SetPhase( float n ); - - float GetStartTime() const; - void SetStartTime( float n ); - - float GetStopTime() const; - void SetStopTime( float n ); -protected: - NI_TIME_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTransformController.cpp b/NifExport/niflib/obj/NiTransformController.cpp deleted file mode 100755 index 873bf33..0000000 --- a/NifExport/niflib/obj/NiTransformController.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTransformController.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTransformController::TYPE("NiTransformController", &NI_TRANSFORM_CONTROLLER_PARENT::TypeConst() ); - -NiTransformController::NiTransformController() NI_TRANSFORM_CONTROLLER_CONSTRUCT {} - -NiTransformController::~NiTransformController() {} - -void NiTransformController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRANSFORM_CONTROLLER_READ -} - -void NiTransformController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRANSFORM_CONTROLLER_WRITE -} - -string NiTransformController::asString( bool verbose ) const { - NI_TRANSFORM_CONTROLLER_STRING -} - -void NiTransformController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRANSFORM_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiTransformController::GetRefs() const { - NI_TRANSFORM_CONTROLLER_GETREFS -} - -const Type & NiTransformController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTransformController.h b/NifExport/niflib/obj/NiTransformController.h deleted file mode 100755 index ffe96b0..0000000 --- a/NifExport/niflib/obj/NiTransformController.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRANSFORMCONTROLLER_H_ -#define _NITRANSFORMCONTROLLER_H_ - -#include "NiSingleInterpolatorController.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTransformController; -typedef Ref<NiTransformController> NiTransformControllerRef; - -/*! - * NiTransformController - NiTransformController replaces the - * NiKeyframeController. - */ - -class NIFLIB_API NiTransformController : public NI_TRANSFORM_CONTROLLER_PARENT { -public: - NiTransformController(); - ~NiTransformController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TRANSFORM_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTransformData.cpp b/NifExport/niflib/obj/NiTransformData.cpp deleted file mode 100755 index a0d20af..0000000 --- a/NifExport/niflib/obj/NiTransformData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTransformData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTransformData::TYPE("NiTransformData", &NI_TRANSFORM_DATA_PARENT::TypeConst() ); - -NiTransformData::NiTransformData() NI_TRANSFORM_DATA_CONSTRUCT {} - -NiTransformData::~NiTransformData() {} - -void NiTransformData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRANSFORM_DATA_READ -} - -void NiTransformData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRANSFORM_DATA_WRITE -} - -string NiTransformData::asString( bool verbose ) const { - NI_TRANSFORM_DATA_STRING -} - -void NiTransformData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRANSFORM_DATA_FIXLINKS -} - -list<NiObjectRef> NiTransformData::GetRefs() const { - NI_TRANSFORM_DATA_GETREFS -} - -const Type & NiTransformData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTransformData.h b/NifExport/niflib/obj/NiTransformData.h deleted file mode 100755 index 59570cf..0000000 --- a/NifExport/niflib/obj/NiTransformData.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRANSFORMDATA_H_ -#define _NITRANSFORMDATA_H_ - -#include "NiKeyframeData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTransformData; -typedef Ref<NiTransformData> NiTransformDataRef; - -/*! - * NiTransformData - Mesh animation keyframe data. - */ - -class NIFLIB_API NiTransformData : public NI_TRANSFORM_DATA_PARENT { -public: - NiTransformData(); - ~NiTransformData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TRANSFORM_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTransformInterpolator.cpp b/NifExport/niflib/obj/NiTransformInterpolator.cpp deleted file mode 100755 index 5ca0076..0000000 --- a/NifExport/niflib/obj/NiTransformInterpolator.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTransformInterpolator.h" -#include "NiTransformData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTransformInterpolator::TYPE("NiTransformInterpolator", &NI_TRANSFORM_INTERPOLATOR_PARENT::TypeConst() ); - -NiTransformInterpolator::NiTransformInterpolator() NI_TRANSFORM_INTERPOLATOR_CONSTRUCT {} - -NiTransformInterpolator::~NiTransformInterpolator() {} - -void NiTransformInterpolator::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRANSFORM_INTERPOLATOR_READ -} - -void NiTransformInterpolator::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRANSFORM_INTERPOLATOR_WRITE -} - -string NiTransformInterpolator::asString( bool verbose ) const { - NI_TRANSFORM_INTERPOLATOR_STRING -} - -void NiTransformInterpolator::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRANSFORM_INTERPOLATOR_FIXLINKS -} - -list<NiObjectRef> NiTransformInterpolator::GetRefs() const { - NI_TRANSFORM_INTERPOLATOR_GETREFS -} - -const Type & NiTransformInterpolator::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTransformInterpolator.h b/NifExport/niflib/obj/NiTransformInterpolator.h deleted file mode 100755 index 746207a..0000000 --- a/NifExport/niflib/obj/NiTransformInterpolator.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRANSFORMINTERPOLATOR_H_ -#define _NITRANSFORMINTERPOLATOR_H_ - -#include "NiInterpolator.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTransformData; - -#include "../gen/obj_defines.h" - -class NiTransformInterpolator; -typedef Ref<NiTransformInterpolator> NiTransformInterpolatorRef; - -/*! - * NiTransformInterpolator - Unknown. - */ - -class NIFLIB_API NiTransformInterpolator : public NI_TRANSFORM_INTERPOLATOR_PARENT { -public: - NiTransformInterpolator(); - ~NiTransformInterpolator(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TRANSFORM_INTERPOLATOR_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTriBasedGeom.cpp b/NifExport/niflib/obj/NiTriBasedGeom.cpp deleted file mode 100755 index b31a87a..0000000 --- a/NifExport/niflib/obj/NiTriBasedGeom.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTriBasedGeom.h" -#include "NiTriBasedGeomData.h" -#include "NiSkinInstance.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTriBasedGeom::TYPE("NiTriBasedGeom", &NI_TRI_BASED_GEOM_PARENT::TypeConst() ); - -NiTriBasedGeom::NiTriBasedGeom() NI_TRI_BASED_GEOM_CONSTRUCT {} - -NiTriBasedGeom::~NiTriBasedGeom() {} - -void NiTriBasedGeom::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_BASED_GEOM_READ -} - -void NiTriBasedGeom::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRI_BASED_GEOM_WRITE -} - -string NiTriBasedGeom::asString( bool verbose ) const { - NI_TRI_BASED_GEOM_STRING -} - -void NiTriBasedGeom::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_BASED_GEOM_FIXLINKS -} - -list<NiObjectRef> NiTriBasedGeom::GetRefs() const { - NI_TRI_BASED_GEOM_GETREFS -} - -const Type & NiTriBasedGeom::GetType() const { - return TYPE; -}; - -Ref<NiTriBasedGeomData> NiTriBasedGeom::GetData() const { - return data; -} - -void NiTriBasedGeom::SetData( const Ref<NiTriBasedGeomData> & n ) { - data = n; -} - -Ref<NiObject> NiTriBasedGeom::GetUnknownLink() const { - return unknownLink; -} - -void NiTriBasedGeom::SetUnknownLink( const Ref<NiObject> & n ) { - unknownLink = n; -} - -string NiTriBasedGeom::GetShader() const { - return shaderName; -} - -void NiTriBasedGeom::SetShader( const string & n ) { - //Check if name is blank, if so clear shader - if ( n.size() == 0 ) { - hasShader = false; - shaderName.clear(); - } else { - shaderName = n; - } -} - -void NiTriBasedGeom::SetSkinInstance( Ref<NiSkinInstance> & n ) { - skinInstance = n; -} - -Ref<NiSkinInstance> NiTriBasedGeom::GetSkinInstance() const { - return skinInstance; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiTriBasedGeom.h b/NifExport/niflib/obj/NiTriBasedGeom.h deleted file mode 100755 index 5a94c1f..0000000 --- a/NifExport/niflib/obj/NiTriBasedGeom.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRIBASEDGEOM_H_ -#define _NITRIBASEDGEOM_H_ - -#include "NiAVObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTriBasedGeomData; -class NiSkinInstance; -class NiObject; - -#include "../gen/obj_defines.h" - -class NiTriBasedGeom; -typedef Ref<NiTriBasedGeom> NiTriBasedGeomRef; - -/*! - * NiTriBasedGeom - Describes a mesh, built from triangles. - */ - -class NIFLIB_API NiTriBasedGeom : public NI_TRI_BASED_GEOM_PARENT { -public: - NiTriBasedGeom(); - ~NiTriBasedGeom(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: Handle attatchment of SkinInstance with new skinning API - - Ref<NiTriBasedGeomData> GetData() const; - void SetData( const Ref<NiTriBasedGeomData> & n ); - - Ref<NiObject> GetUnknownLink() const; - void SetUnknownLink( const Ref<NiObject> & n ); - - string GetShader() const; - void SetShader( const string & n ); - - void SetSkinInstance( Ref<NiSkinInstance> & n ); - Ref<NiSkinInstance> GetSkinInstance() const; - -protected: - NI_TRI_BASED_GEOM_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTriBasedGeomData.cpp b/NifExport/niflib/obj/NiTriBasedGeomData.cpp deleted file mode 100755 index 4fb0a72..0000000 --- a/NifExport/niflib/obj/NiTriBasedGeomData.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTriBasedGeomData.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTriBasedGeomData::TYPE("NiTriBasedGeomData", &NI_TRI_BASED_GEOM_DATA_PARENT::TypeConst() ); - -NiTriBasedGeomData::NiTriBasedGeomData() NI_TRI_BASED_GEOM_DATA_CONSTRUCT {} - -NiTriBasedGeomData::~NiTriBasedGeomData() {} - -void NiTriBasedGeomData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_BASED_GEOM_DATA_READ -} - -void NiTriBasedGeomData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRI_BASED_GEOM_DATA_WRITE -} - -string NiTriBasedGeomData::asString( bool verbose ) const { - NI_TRI_BASED_GEOM_DATA_STRING -} - -void NiTriBasedGeomData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_BASED_GEOM_DATA_FIXLINKS -} - -list<NiObjectRef> NiTriBasedGeomData::GetRefs() const { - NI_TRI_BASED_GEOM_DATA_GETREFS -} - -const Type & NiTriBasedGeomData::GetType() const { - return TYPE; -}; - -void NiTriBasedGeomData::SetUVSetCount(int n) { - uvSets.resize(n); - hasUv = ( vertexColors.size() != 0 ); -} - -//--Setters--// -void NiTriBasedGeomData::SetVertices( const vector<Vector3> & in ) { - vertices = in; - hasVertices = ( vertices.size() != 0 ); - - //Clear out all other data as it is now based on old vertex information - normals.clear(); - hasNormals = false; - vertexColors.clear(); - this->hasVertexColors = false; - for (uint i = 0; i < uvSets.size(); ++i ) { - uvSets[i].clear(); - } - - //If any vertices were given, calculate the new center and radius - //Check if there are no vertices - if ( vertices.size() == 0 ) { - center.Set(0.0f, 0.0f, 0.0f); - radius = 0.0f; - return; - } - - //Set lows and highs to first vertex - Vector3 lows = vertices[0]; - Vector3 highs = vertices[0]; - - //Iterate through the rest of the vertices, adjusting the stored values - //if a vertex with lower or higher values is found - for (vector<Vector3>::const_iterator i = vertices.begin()+1; i != vertices.end(); ++i ) { - if ( i->x > highs.x ) highs.x = i->x; - else if ( i->x < lows.x ) lows.x = i->x; - - if ( i->y > highs.y ) highs.y = i->y; - else if ( i->y < lows.y ) lows.y = i->y; - - if ( i->z > highs.z ) highs.z = i->z; - else if ( i->z < lows.z ) lows.z = i->z; - } - - //Now we know the extent of the shape, so the center will be the average of the lows and highs. - center.x = (highs.x + lows.x) / 2.0f; - center.y = (highs.y + lows.y) / 2.0f; - center.z = (highs.z + lows.z) / 2.0f; - - //The radius will be the largest distance from the center - Vector3 diff; - float dist2(0.0f), maxdist2(0.0f); - for (vector<Vector3>::const_iterator i = vertices.begin(); i != vertices.end(); ++i ) { - diff = center; - diff.x -= i->x; - diff.y -= i->y; - diff.z -= i->z; - dist2 = diff.x * diff.x + diff.y * diff.y + diff.z * diff.z; - if ( dist2 > maxdist2 ) maxdist2 = dist2; - }; - radius = sqrt(maxdist2); -} - -void NiTriBasedGeomData::SetNormals( const vector<Vector3> & in ) { - if (in.size() != vertices.size() && in.size() != 0 ) - throw runtime_error("Vector size must equal Vertex Count or zero."); - normals = in; - hasNormals = ( normals.size() != 0 ); -} - -void NiTriBasedGeomData::SetVertexColors( const vector<Color4> & in ) { - if (in.size() != vertices.size() && in.size() != 0 ) - throw runtime_error("Vector size must equal Vertex Count or zero."); - vertexColors = in; - hasVertexColors = ( vertexColors.size() != 0 ); -} - -void NiTriBasedGeomData::SetUVSet( int index, const vector<TexCoord> & in ) { - if (in.size() != vertices.size()) - throw runtime_error("Vector size must equal Vertex Count."); - uvSets[index] = in; -} - -/*! Returns the 3D center of the mesh. - * \return The center of this mesh. - */ -Vector3 NiTriBasedGeomData::GetCenter() const { - return center; -} - -/*! Returns the radius of the mesh. That is the distance from the center to - * the farthest point from the center. - * \return The radius of this mesh. - */ -float NiTriBasedGeomData::GetRadius() const { - return radius; -} diff --git a/NifExport/niflib/obj/NiTriBasedGeomData.h b/NifExport/niflib/obj/NiTriBasedGeomData.h deleted file mode 100755 index 686b291..0000000 --- a/NifExport/niflib/obj/NiTriBasedGeomData.h +++ /dev/null @@ -1,138 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRIBASEDGEOMDATA_H_ -#define _NITRIBASEDGEOMDATA_H_ - -#include "NiObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; - -#include "../gen/obj_defines.h" - -class NiTriBasedGeomData; -typedef Ref<NiTriBasedGeomData> NiTriBasedGeomDataRef; - -/*! - * NiTriBasedGeomData - Mesh data: vertices, vertex normals, etc. - */ - -class NIFLIB_API NiTriBasedGeomData : public NI_TRI_BASED_GEOM_DATA_PARENT { -public: - NiTriBasedGeomData(); - ~NiTriBasedGeomData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //--Counts--// - - /*! Returns the number of verticies that make up this mesh. This is also the number of normals, colors, and UV coordinates if these are used. - * \return The number of vertices that make up this mesh. - * \sa IShapeData::SetVertexCount - */ - int GetVertexCount() const { return int(vertices.size()); } - - /*! Returns the number of texture coordinate sets used by this mesh. For each UV set, there is a pair of texture coordinates for every vertex in the mesh. Each set corresponds to a texture entry in the NiTexturingPropery block. - * \return The number of texture cooridnate sets used by this mesh. Can be zero. - * \sa IShapeData::SetUVSetCount, ITexturingProperty - */ - short GetUVSetCount() const { return short(uvSets.size()); } - - /*! Changes the number of UV sets used by this mesh. If the new size is smaller, data at the end of the array will be lost. Otherwise it will be retained. The number of UV sets must correspond with the number of textures defined in the corresponding NiTexturingProperty block. - * \param n The new size of the uv set array. - * \sa IShapeData::GetUVSetCount, ITexturingProperty - */ - void SetUVSetCount(int n); - - //--Getters--// - - /*! Returns the 3D center of the mesh. - * \return The center of this mesh. - */ - Vector3 GetCenter() const; - - /*! Returns the radius of the mesh. That is the distance from the center to - * the farthest point from the center. - * \return The radius of this mesh. - */ - float GetRadius() const; - - /*! Returns the triangle faces that make up this mesh. - * \return A vector containing the triangle faces that make up this mesh. - * \sa ITriShapeData::SetTriangles - */ - virtual vector<Triangle> GetTriangles() const { return vector<Triangle>(); } //TODO: Make this pure virtual? - - /*! Used to retrive the vertices used by this mesh. The size of the vector will be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \return A vector cntaining the vertices used by this mesh. - * \sa IShapeData::SetVertices, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<Vector3> GetVertices() const { return vertices; } - - /*! Used to retrive the normals used by this mesh. The size of the vector will either be zero if no normals are used, or be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \return A vector cntaining the normals used by this mesh, if any. - * \sa IShapeData::SetNormals, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<Vector3> GetNormals() const { return normals; } - - /*! Used to retrive the vertex colors used by this mesh. The size of the vector will either be zero if no vertex colors are used, or be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \return A vector cntaining the vertex colors used by this mesh, if any. - * \sa IShapeData::SetVertexColors, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<Color4> GetColors() const { return vertexColors; } - - /*! Used to retrive the texture coordinates from one of the texture sets used by this mesh. The function will throw an exception if a texture set index that does not exist is specified. The size of the vector will be the same as the vertex count retrieved with the IShapeData::GetVertexCount function. - * \param index The index of the texture coordinate set to retrieve the texture coordinates from. This index is zero based and must be a positive number smaller than that returned by the IShapeData::GetUVSetCount function. If there are no texture coordinate sets, this function will throw an exception. - * \return A vector cntaining the the texture coordinates used by the requested texture coordinate set. - * \sa IShapeData::SetUVSet, IShapeData::GetUVSetCount, IShapeData::SetUVSetCount, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - vector<TexCoord> GetUVSet( int index ) const { return uvSets[index]; } - -//--Setters--// - - /*! Used to set the vertex data used by this mesh. Calling this function will clear all other data in this object. - * \param in A vector containing the vertices to replace those in the mesh with. Note that there is no way to set vertices one at a time, they must be sent in one batch. - * \sa IShapeData::GetVertices, IShapeData::GetVertexCount - */ - virtual void SetVertices( const vector<Vector3> & in ); - - /*! Used to set the normal data used by this mesh. The size of the vector must either be zero, or the same as the vertex count retrieved with the IShapeData::GetVertexCount function or the function will throw an exception. - * \param in A vector containing the normals to replace those in the mesh with. Note that there is no way to set normals one at a time, they must be sent in one batch. Use an empty vector to signify that this mesh will not be using normals. - * \sa IShapeData::GetNormals, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetNormals( const vector<Vector3> & in ); - - /*! Used to set the vertex color data used by this mesh. The size of the vector must either be zero, or the same as the vertex count retrieved with the IShapeData::GetVertexCount function or the function will throw an exception. - * \param in A vector containing the vertex colors to replace those in the mesh with. Note that there is no way to set vertex colors one at a time, they must be sent in one batch. Use an empty vector to signify that this mesh will not be using vertex colors. - * \sa IShapeData::GetColors, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetVertexColors( const vector<Color4> & in ); - - /*! Used to set the texture coordinate data from one of the texture sets used by this mesh. The function will throw an exception if a texture set index that does not exist is specified. The size of the vector must be the same as the vertex count retrieved with the IShapeData::GetVertexCount function, or the function will throw an exception. - * \param index The index of the texture coordinate set to retrieve the texture coordinates from. This index is zero based and must be a positive number smaller than that returned by the IShapeData::GetUVSetCount function. If there are no texture coordinate sets, this function will throw an exception. - * \param in A vector containing the the new texture coordinates to replace those in the requested texture coordinate set. - * \sa IShapeData::GetUVSet, IShapeData::GetUVSetCount, IShapeData::SetUVSetCount, IShapeData::GetVertexCount, IShapeData::SetVertexCount. - */ - void SetUVSet( int index, const vector<TexCoord> & in ); - -protected: - NI_TRI_BASED_GEOM_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTriShape.cpp b/NifExport/niflib/obj/NiTriShape.cpp deleted file mode 100755 index 534dc1b..0000000 --- a/NifExport/niflib/obj/NiTriShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTriShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTriShape::TYPE("NiTriShape", &NI_TRI_SHAPE_PARENT::TypeConst() ); - -NiTriShape::NiTriShape() NI_TRI_SHAPE_CONSTRUCT {} - -NiTriShape::~NiTriShape() {} - -void NiTriShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_SHAPE_READ -} - -void NiTriShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRI_SHAPE_WRITE -} - -string NiTriShape::asString( bool verbose ) const { - NI_TRI_SHAPE_STRING -} - -void NiTriShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_SHAPE_FIXLINKS -} - -list<NiObjectRef> NiTriShape::GetRefs() const { - NI_TRI_SHAPE_GETREFS -} - -const Type & NiTriShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTriShape.h b/NifExport/niflib/obj/NiTriShape.h deleted file mode 100755 index 59ed973..0000000 --- a/NifExport/niflib/obj/NiTriShape.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRISHAPE_H_ -#define _NITRISHAPE_H_ - -#include "NiTriBasedGeom.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTriShape; -typedef Ref<NiTriShape> NiTriShapeRef; - -/*! - * NiTriShape - A shape node that refers to singular triangle data. - */ - -class NIFLIB_API NiTriShape : public NI_TRI_SHAPE_PARENT { -public: - NiTriShape(); - ~NiTriShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TRI_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTriShapeData.cpp b/NifExport/niflib/obj/NiTriShapeData.cpp deleted file mode 100755 index 5071c47..0000000 --- a/NifExport/niflib/obj/NiTriShapeData.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTriShapeData.h" -#include "../gen/MatchGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTriShapeData::TYPE("NiTriShapeData", &NI_TRI_SHAPE_DATA_PARENT::TypeConst() ); - -NiTriShapeData::NiTriShapeData() NI_TRI_SHAPE_DATA_CONSTRUCT {} - -NiTriShapeData::~NiTriShapeData() {} - -void NiTriShapeData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_SHAPE_DATA_READ -} - -void NiTriShapeData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRI_SHAPE_DATA_WRITE -} - -string NiTriShapeData::asString( bool verbose ) const { - NI_TRI_SHAPE_DATA_STRING -} - -void NiTriShapeData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_SHAPE_DATA_FIXLINKS -} - -list<NiObjectRef> NiTriShapeData::GetRefs() const { - NI_TRI_SHAPE_DATA_GETREFS -} - -const Type & NiTriShapeData::GetType() const { - return TYPE; -}; - -void NiTriShapeData::SetVertices( const vector<Vector3> & in ) { - //Take normal action - NiTriBasedGeomData::SetVertices( in ); - - //Also, clear match detection data - matchGroups.clear(); -} - -void NiTriShapeData::DoMatchDetection() { - matchGroups.resize( vertices.size() ); - - for ( uint i = 0; i < matchGroups.size(); ++i ){ - // Find all vertices that match this one. - for ( ushort j = 0; j < vertices.size(); ++j ) { - if ( vertices[i] == vertices[j] ) { - matchGroups[i].vertexIndices.push_back(j); - } - } - } -} - -bool NiTriShapeData::HasMatchData() { - return ( matchGroups.size() > 0 ); -} - -vector<Triangle> NiTriShapeData::GetTriangles() const { - return triangles; -} - -void NiTriShapeData::SetTriangles( const vector<Triangle> & in ) { - if ( in.size() > 65535 || in.size() < 0 ) { - throw runtime_error("Invalid Triangle Count: must be between 0 and 65535."); - } - - triangles = in; - - hasTriangles = ( triangles.size() != 0 ); - - //Set number of trianble points to the number of triangles times 3 - numTrianglePoints = uint(triangles.size()) * 3; -} - diff --git a/NifExport/niflib/obj/NiTriShapeData.h b/NifExport/niflib/obj/NiTriShapeData.h deleted file mode 100755 index 2fbe11f..0000000 --- a/NifExport/niflib/obj/NiTriShapeData.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRISHAPEDATA_H_ -#define _NITRISHAPEDATA_H_ - -#include "NiTriBasedGeomData.h" -// Include structures -#include "../gen/MatchGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTriShapeData; -typedef Ref<NiTriShapeData> NiTriShapeDataRef; - -/*! - * NiTriShapeData - Holds mesh data using a list of singular triangles. - */ - -class NIFLIB_API NiTriShapeData : public NI_TRI_SHAPE_DATA_PARENT { -public: - NiTriShapeData(); - ~NiTriShapeData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; -public: - - //--Match Detection--// - - //Re-implemented only to casue match detection data to be cleared - //when vertices are updated. - virtual void SetVertices( const vector<Vector3> & in ); - - /*! This function generates match detection data based on the current - * vertex list. The function of this data is unknown and appears to be - * optional. The data contains a list of all the vertices that have - * identical positions are stored in the file. If the vertex data is - * updated, match detection data will be cleared. - * \sa NiTriShapeData::HasMatchData - */ - void DoMatchDetection(); - - /*! Used to determine whether current match detection data has been previously - * generated. - * \return true if there is current match data, false otherwise. - * \sa NiTriShapeData::DoMatchDetection - */ - bool HasMatchData(); - - //--Getters--// - - /*! Returns the triangle faces that make up this mesh. - * \return A vector containing the triangle faces that make up this mesh. - * \sa ITriShapeData::SetTriangles - */ - virtual vector<Triangle> GetTriangles() const; - - //--Setters--// - - /*! Replaces the triangle face data in this mesh with new data. - * \param in A vector containing the new face data. Maximum size is 65,535. - * \sa ITriShapeData::GetTriangles - */ - void SetTriangles( const vector<Triangle> & in ); -protected: - NI_TRI_SHAPE_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTriStrips.cpp b/NifExport/niflib/obj/NiTriStrips.cpp deleted file mode 100755 index 7f1be51..0000000 --- a/NifExport/niflib/obj/NiTriStrips.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTriStrips.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTriStrips::TYPE("NiTriStrips", &NI_TRI_STRIPS_PARENT::TypeConst() ); - -NiTriStrips::NiTriStrips() NI_TRI_STRIPS_CONSTRUCT {} - -NiTriStrips::~NiTriStrips() {} - -void NiTriStrips::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_STRIPS_READ -} - -void NiTriStrips::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRI_STRIPS_WRITE -} - -string NiTriStrips::asString( bool verbose ) const { - NI_TRI_STRIPS_STRING -} - -void NiTriStrips::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_STRIPS_FIXLINKS -} - -list<NiObjectRef> NiTriStrips::GetRefs() const { - NI_TRI_STRIPS_GETREFS -} - -const Type & NiTriStrips::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiTriStrips.h b/NifExport/niflib/obj/NiTriStrips.h deleted file mode 100755 index 881327a..0000000 --- a/NifExport/niflib/obj/NiTriStrips.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRISTRIPS_H_ -#define _NITRISTRIPS_H_ - -#include "NiTriBasedGeom.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTriStrips; -typedef Ref<NiTriStrips> NiTriStripsRef; - -/*! - * NiTriStrips - A shape node that refers to data organized into strips - * of triangles - */ - -class NIFLIB_API NiTriStrips : public NI_TRI_STRIPS_PARENT { -public: - NiTriStrips(); - ~NiTriStrips(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_TRI_STRIPS_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiTriStripsData.cpp b/NifExport/niflib/obj/NiTriStripsData.cpp deleted file mode 100755 index d9a5070..0000000 --- a/NifExport/niflib/obj/NiTriStripsData.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiTriStripsData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiTriStripsData::TYPE("NiTriStripsData", &NI_TRI_STRIPS_DATA_PARENT::TypeConst() ); - -NiTriStripsData::NiTriStripsData() NI_TRI_STRIPS_DATA_CONSTRUCT {} - -NiTriStripsData::~NiTriStripsData() {} - -void NiTriStripsData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_STRIPS_DATA_READ -} - -void NiTriStripsData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_TRI_STRIPS_DATA_WRITE -} - -string NiTriStripsData::asString( bool verbose ) const { - NI_TRI_STRIPS_DATA_STRING -} - -void NiTriStripsData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_TRI_STRIPS_DATA_FIXLINKS -} - -list<NiObjectRef> NiTriStripsData::GetRefs() const { - NI_TRI_STRIPS_DATA_GETREFS -} - -const Type & NiTriStripsData::GetType() const { - return TYPE; -}; - -ushort NiTriStripsData::GetStripCount() const { - return ushort(points.size()); -} - -void NiTriStripsData::SetStripCount(int n) { - stripLengths.resize( n ); - points.resize( n ); - - //Recalculate Triangle Count - numTriangles = CalcTriangleCount(); -} - -//Getters -vector<ushort> NiTriStripsData::GetStrip( int index ) const { - return points[index]; -} - -vector<Triangle> NiTriStripsData::GetTriangles() const { - - //Create a vector to hold the triangles - vector<Triangle> triangles( numTriangles ); - int n = 0; // Current triangle - - //Cycle through all strips - vector< vector<ushort> >::const_iterator it; - for (it = points.begin(); it != points.end(); ++it ) { - //The first three values in the strip are the first triangle - triangles[n].Set( (*it)[0], (*it)[1], (*it)[2] ); - - //Move to the next triangle - ++n; - - //The remaining triangles use the previous two indices as their first two indices. - for( uint i = 3; i < it->size(); ++i ) { - //Odd numbered triangles need to be reversed to keep the vertices in counter-clockwise order - if ( i % 2 == 0 ) { - //cout << (*it)[i - 2] << ", " << (*it)[i - 1] << ", " << (*it)[i] << endl; - triangles[n].Set( (*it)[i - 2], (*it)[i - 1], (*it)[i] ); - } else { - //cout << (*it)[i] << ", " << (*it)[i - 1] << ", " << (*it)[i - 2] << endl; - triangles[n].Set( (*it)[i], (*it)[i - 1], (*it)[i - 2] ); - } - - //Move to the next triangle - ++n; - } - } - - return triangles; -} - -//Setter -void NiTriStripsData::SetStrip( int index, const vector<ushort> & in ) { - - if (in.size() > 0) - hasPoints = true; - - points[index] = in; - - //Recalculate Triangle Count - numTriangles = CalcTriangleCount(); -} - -ushort NiTriStripsData::CalcTriangleCount() const { - - //Calculate number of triangles - //Sum of length of each strip - 2 - ushort numTriangles = 0; - for ( uint i = 0; i < points.size(); ++i ) { - numTriangles += ushort(points[i].size() - 2); - } - - return numTriangles; -} - diff --git a/NifExport/niflib/obj/NiTriStripsData.h b/NifExport/niflib/obj/NiTriStripsData.h deleted file mode 100755 index 76f33a9..0000000 --- a/NifExport/niflib/obj/NiTriStripsData.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NITRISTRIPSDATA_H_ -#define _NITRISTRIPSDATA_H_ - -#include "NiTriBasedGeomData.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiTriStripsData; -typedef Ref<NiTriStripsData> NiTriStripsDataRef; - -/*! - * NiTriStripsData - Holds mesh data using strips of triangles. - */ - -class NIFLIB_API NiTriStripsData : public NI_TRI_STRIPS_DATA_PARENT { -public: - NiTriStripsData(); - ~NiTriStripsData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //--Counts--// - - /*! Used to get the number of triangle strips that this mesh is divided into. - * \return The number of triangle strips used by this mesh. - * \sa NiTriStripData::SetStripCount - */ - ushort GetStripCount() const; - - /*! Used to resize the triangle strips array. If the new size is smaller, strips at the end of the array will be deleted. - * \param n The new size of the triangle strips array. - * \sa NiTriStripData::GetStripCount - */ - void SetStripCount(int n); - - //--Getters--// - - /*! Used to retrieve all the triangles from a specific triangle strip. - * \param index The index of the triangle strip to retrieve the triangles from. This is a zero-based index which must be a positive number less than that returned by NiTriStripsData::GetStripCount. - * \return A vector containing all the triangle faces from the triangle strip specified by index. - * \sa NiTriStripData::SetStrip, NiTriStripData::GetTriangles - */ - vector<ushort> GetStrip( int index ) const; - - /*! This is a conveniance function which returns all triangle faces in all triangle strips that make up this mesh. It is similar to the ITriShapeData::GetTriangles function. - * \return A vector containing all the triangle faces from all the triangle strips that make up this mesh. - * \sa NiTriStripData::GetTriangles, NiTriStripData::GetStrip, NiTriStripData::SetStrip - */ - vector<Triangle> GetTriangles() const; - - //--Setter--/ - - /*! Used to set the triangle face data in a specific triangle strip. - * \param index The index of the triangle strip to set the face data for. This is a zero-based index which must be a positive number less than that returned by NiTriStripsData::GetStripCount. - * \param in The vertex indices that make up this strip, in standard OpenGL triangle strip order. - * \sa NiTriStripData::GetStrip, NiTriStripData::GetTriangles - */ - void SetStrip( int index, const vector<ushort> & in ); - -private: - ushort CalcTriangleCount() const; - -protected: - NI_TRI_STRIPS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiUVController.cpp b/NifExport/niflib/obj/NiUVController.cpp deleted file mode 100755 index 26fab00..0000000 --- a/NifExport/niflib/obj/NiUVController.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiUVController.h" -#include "NiUVData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiUVController::TYPE("NiUVController", &NI_U_V_CONTROLLER_PARENT::TypeConst() ); - -NiUVController::NiUVController() NI_U_V_CONTROLLER_CONSTRUCT {} - -NiUVController::~NiUVController() {} - -void NiUVController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_U_V_CONTROLLER_READ -} - -void NiUVController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_U_V_CONTROLLER_WRITE -} - -string NiUVController::asString( bool verbose ) const { - NI_U_V_CONTROLLER_STRING -} - -void NiUVController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_U_V_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiUVController::GetRefs() const { - NI_U_V_CONTROLLER_GETREFS -} - -const Type & NiUVController::GetType() const { - return TYPE; -}; - -Ref<NiUVData> NiUVController::GetData() const { - return data; -} - -void NiUVController::SetData( const Ref<NiUVData> & n ) { - data = n; -} \ No newline at end of file diff --git a/NifExport/niflib/obj/NiUVController.h b/NifExport/niflib/obj/NiUVController.h deleted file mode 100755 index 3f2f868..0000000 --- a/NifExport/niflib/obj/NiUVController.h +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIUVCONTROLLER_H_ -#define _NIUVCONTROLLER_H_ - -#include "NiTimeController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiUVData; - -#include "../gen/obj_defines.h" - -class NiUVController; -typedef Ref<NiUVController> NiUVControllerRef; - -/*! - * NiUVController - Time controller for texture coordinates. - */ - -class NIFLIB_API NiUVController : public NI_U_V_CONTROLLER_PARENT { -public: - NiUVController(); - ~NiUVController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - //TODO: This class has an unknown member - Ref<NiUVData> GetData() const; - void SetData( const Ref<NiUVData> & n ); - -protected: - NI_U_V_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiUVData.cpp b/NifExport/niflib/obj/NiUVData.cpp deleted file mode 100755 index d12497b..0000000 --- a/NifExport/niflib/obj/NiUVData.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiUVData.h" -#include "../gen/KeyGroup.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiUVData::TYPE("NiUVData", &NI_U_V_DATA_PARENT::TypeConst() ); - -NiUVData::NiUVData() NI_U_V_DATA_CONSTRUCT {} - -NiUVData::~NiUVData() {} - -void NiUVData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_U_V_DATA_READ -} - -void NiUVData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_U_V_DATA_WRITE -} - -string NiUVData::asString( bool verbose ) const { - NI_U_V_DATA_STRING -} - -void NiUVData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_U_V_DATA_FIXLINKS -} - -list<NiObjectRef> NiUVData::GetRefs() const { - NI_U_V_DATA_GETREFS -} - -const Type & NiUVData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiUVData.h b/NifExport/niflib/obj/NiUVData.h deleted file mode 100755 index 7861801..0000000 --- a/NifExport/niflib/obj/NiUVData.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIUVDATA_H_ -#define _NIUVDATA_H_ - -#include "NiObject.h" - -// Include structures -#include "../gen/KeyGroup.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class NiUVData; -typedef Ref<NiUVData> NiUVDataRef; - -/*! - * NiUVData - Texture coordinate data. - */ - -class NIFLIB_API NiUVData : public NI_U_V_DATA_PARENT { -public: - NiUVData(); - ~NiUVData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_U_V_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiVectorExtraData.cpp b/NifExport/niflib/obj/NiVectorExtraData.cpp deleted file mode 100755 index c93a0d1..0000000 --- a/NifExport/niflib/obj/NiVectorExtraData.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiVectorExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiVectorExtraData::TYPE("NiVectorExtraData", &NI_VECTOR_EXTRA_DATA_PARENT::TypeConst() ); - -NiVectorExtraData::NiVectorExtraData() NI_VECTOR_EXTRA_DATA_CONSTRUCT {} - -NiVectorExtraData::~NiVectorExtraData() {} - -void NiVectorExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VECTOR_EXTRA_DATA_READ -} - -void NiVectorExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_VECTOR_EXTRA_DATA_WRITE -} - -string NiVectorExtraData::asString( bool verbose ) const { - NI_VECTOR_EXTRA_DATA_STRING -} - -void NiVectorExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VECTOR_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiVectorExtraData::GetRefs() const { - NI_VECTOR_EXTRA_DATA_GETREFS -} - -const Type & NiVectorExtraData::GetType() const { - return TYPE; -}; - -Vector3 NiVectorExtraData::GetData() const { - return vectorData; -}; - -void NiVectorExtraData::SetData( const Vector3 & n ) { - vectorData = n; -}; - diff --git a/NifExport/niflib/obj/NiVectorExtraData.h b/NifExport/niflib/obj/NiVectorExtraData.h deleted file mode 100755 index a68b8cd..0000000 --- a/NifExport/niflib/obj/NiVectorExtraData.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIVECTOREXTRADATA_H_ -#define _NIVECTOREXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiVectorExtraData; -typedef Ref<NiVectorExtraData> NiVectorExtraDataRef; - -/*! - * NiVectorExtraData - Extra vector data. - */ - -class NIFLIB_API NiVectorExtraData : public NI_VECTOR_EXTRA_DATA_PARENT { -public: - NiVectorExtraData(); - ~NiVectorExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - Vector3 GetData() const; - void SetData( const Vector3 & n ); - - //TODO: There is an unknown member in this class -protected: - NI_VECTOR_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiVertWeightsExtraData.cpp b/NifExport/niflib/obj/NiVertWeightsExtraData.cpp deleted file mode 100755 index 315a56f..0000000 --- a/NifExport/niflib/obj/NiVertWeightsExtraData.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiVertWeightsExtraData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiVertWeightsExtraData::TYPE("NiVertWeightsExtraData", &NI_VERT_WEIGHTS_EXTRA_DATA_PARENT::TypeConst() ); - -NiVertWeightsExtraData::NiVertWeightsExtraData() NI_VERT_WEIGHTS_EXTRA_DATA_CONSTRUCT {} - -NiVertWeightsExtraData::~NiVertWeightsExtraData() {} - -void NiVertWeightsExtraData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VERT_WEIGHTS_EXTRA_DATA_READ -} - -void NiVertWeightsExtraData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_VERT_WEIGHTS_EXTRA_DATA_WRITE -} - -string NiVertWeightsExtraData::asString( bool verbose ) const { - NI_VERT_WEIGHTS_EXTRA_DATA_STRING -} - -void NiVertWeightsExtraData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VERT_WEIGHTS_EXTRA_DATA_FIXLINKS -} - -list<NiObjectRef> NiVertWeightsExtraData::GetRefs() const { - NI_VERT_WEIGHTS_EXTRA_DATA_GETREFS -} - -const Type & NiVertWeightsExtraData::GetType() const { - return TYPE; -}; - -vector<float> NiVertWeightsExtraData::GetData() const { - return weight; -} - -void NiVertWeightsExtraData::SetData( const vector<float> & n ) { - numVertices = uint(n.size()); - numBytes = numVertices + 2; - weight = n; -} diff --git a/NifExport/niflib/obj/NiVertWeightsExtraData.h b/NifExport/niflib/obj/NiVertWeightsExtraData.h deleted file mode 100755 index e8bf768..0000000 --- a/NifExport/niflib/obj/NiVertWeightsExtraData.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIVERTWEIGHTSEXTRADATA_H_ -#define _NIVERTWEIGHTSEXTRADATA_H_ - -#include "NiExtraData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiVertWeightsExtraData; -typedef Ref<NiVertWeightsExtraData> NiVertWeightsExtraDataRef; - -/*! - * NiVertWeightsExtraData - Not used in skinning. Unsure of use - perhaps - * for morphing animation or gravity. - */ - -class NIFLIB_API NiVertWeightsExtraData : public NI_VERT_WEIGHTS_EXTRA_DATA_PARENT { -public: - NiVertWeightsExtraData(); - ~NiVertWeightsExtraData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - vector<float> GetData() const; - void SetData( const vector<float> & n ); - -protected: - NI_VERT_WEIGHTS_EXTRA_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiVertexColorProperty.cpp b/NifExport/niflib/obj/NiVertexColorProperty.cpp deleted file mode 100755 index 93f1fe1..0000000 --- a/NifExport/niflib/obj/NiVertexColorProperty.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiVertexColorProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiVertexColorProperty::TYPE("NiVertexColorProperty", &NI_VERTEX_COLOR_PROPERTY_PARENT::TypeConst() ); - -NiVertexColorProperty::NiVertexColorProperty() NI_VERTEX_COLOR_PROPERTY_CONSTRUCT {} - -NiVertexColorProperty::~NiVertexColorProperty() {} - -void NiVertexColorProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VERTEX_COLOR_PROPERTY_READ -} - -void NiVertexColorProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_VERTEX_COLOR_PROPERTY_WRITE -} - -string NiVertexColorProperty::asString( bool verbose ) const { - NI_VERTEX_COLOR_PROPERTY_STRING -} - -void NiVertexColorProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VERTEX_COLOR_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiVertexColorProperty::GetRefs() const { - NI_VERTEX_COLOR_PROPERTY_GETREFS -} - -const Type & NiVertexColorProperty::GetType() const { - return TYPE; -}; - -ushort NiVertexColorProperty::GetFlags() const { - return flags; -} - -void NiVertexColorProperty::SetFlags(ushort value) { - flags = value; -} - -VertMode NiVertexColorProperty::GetVertexMode() const { - return vertexMode; -} - -void NiVertexColorProperty::SetVertexMode(VertMode value) { - vertexMode = value; -} - -LightMode NiVertexColorProperty::GetLightingMode() const { - return lightingMode; -} - -void NiVertexColorProperty::SetLightingMode(LightMode value) { - lightingMode = value; -} diff --git a/NifExport/niflib/obj/NiVertexColorProperty.h b/NifExport/niflib/obj/NiVertexColorProperty.h deleted file mode 100755 index 8d8847f..0000000 --- a/NifExport/niflib/obj/NiVertexColorProperty.h +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIVERTEXCOLORPROPERTY_H_ -#define _NIVERTEXCOLORPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiVertexColorProperty; -typedef Ref<NiVertexColorProperty> NiVertexColorPropertyRef; - -/*! - * NiVertexColorProperty - Property of vertex colors. This block is - * referred to by the root block of the NIF file whenever some - * NiTriShapeData block has vertex colors with non-default settings; if - * not present, vertex colors have vertex_mode=2 and lighting_mode=1. - */ - -class NIFLIB_API NiVertexColorProperty : public NI_VERTEX_COLOR_PROPERTY_PARENT { -public: - NiVertexColorProperty(); - ~NiVertexColorProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags(ushort value); - - VertMode GetVertexMode() const; - void SetVertexMode(VertMode value); - - LightMode GetLightingMode() const; - void SetLightingMode(LightMode value); - -protected: - NI_VERTEX_COLOR_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiVisController.cpp b/NifExport/niflib/obj/NiVisController.cpp deleted file mode 100755 index 1c476b6..0000000 --- a/NifExport/niflib/obj/NiVisController.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiVisController.h" -#include "NiVisData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiVisController::TYPE("NiVisController", &NI_VIS_CONTROLLER_PARENT::TypeConst() ); - -NiVisController::NiVisController() NI_VIS_CONTROLLER_CONSTRUCT {} - -NiVisController::~NiVisController() {} - -void NiVisController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VIS_CONTROLLER_READ -} - -void NiVisController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_VIS_CONTROLLER_WRITE -} - -string NiVisController::asString( bool verbose ) const { - NI_VIS_CONTROLLER_STRING -} - -void NiVisController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VIS_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> NiVisController::GetRefs() const { - NI_VIS_CONTROLLER_GETREFS -} - -const Type & NiVisController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiVisController.h b/NifExport/niflib/obj/NiVisController.h deleted file mode 100755 index cf2d07d..0000000 --- a/NifExport/niflib/obj/NiVisController.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIVISCONTROLLER_H_ -#define _NIVISCONTROLLER_H_ - -#include "NiSingleInterpolatorController.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiVisData; - -#include "../gen/obj_defines.h" - -class NiVisController; -typedef Ref<NiVisController> NiVisControllerRef; - -/*! - * NiVisController - Time controller for visibility. - */ - -class NIFLIB_API NiVisController : public NI_VIS_CONTROLLER_PARENT { -public: - NiVisController(); - ~NiVisController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_VIS_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiVisData.cpp b/NifExport/niflib/obj/NiVisData.cpp deleted file mode 100755 index 0269926..0000000 --- a/NifExport/niflib/obj/NiVisData.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiVisData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiVisData::TYPE("NiVisData", &NI_VIS_DATA_PARENT::TypeConst() ); - -NiVisData::NiVisData() NI_VIS_DATA_CONSTRUCT {} - -NiVisData::~NiVisData() {} - -void NiVisData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VIS_DATA_READ -} - -void NiVisData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_VIS_DATA_WRITE -} - -string NiVisData::asString( bool verbose ) const { - NI_VIS_DATA_STRING -} - -void NiVisData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_VIS_DATA_FIXLINKS -} - -list<NiObjectRef> NiVisData::GetRefs() const { - NI_VIS_DATA_GETREFS -} - -const Type & NiVisData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/NiVisData.h b/NifExport/niflib/obj/NiVisData.h deleted file mode 100755 index 79b8a0c..0000000 --- a/NifExport/niflib/obj/NiVisData.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIVISDATA_H_ -#define _NIVISDATA_H_ - -#include "AKeyedData.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiVisData; -typedef Ref<NiVisData> NiVisDataRef; - -/*! - * NiVisData - Visibility data for a controller. - */ - -class NIFLIB_API NiVisData : public NI_VIS_DATA_PARENT { -public: - NiVisData(); - ~NiVisData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - NI_VIS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiWireframeProperty.cpp b/NifExport/niflib/obj/NiWireframeProperty.cpp deleted file mode 100755 index b546644..0000000 --- a/NifExport/niflib/obj/NiWireframeProperty.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiWireframeProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiWireframeProperty::TYPE("NiWireframeProperty", &NI_WIREFRAME_PROPERTY_PARENT::TypeConst() ); - -NiWireframeProperty::NiWireframeProperty() NI_WIREFRAME_PROPERTY_CONSTRUCT {} - -NiWireframeProperty::~NiWireframeProperty() {} - -void NiWireframeProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_WIREFRAME_PROPERTY_READ -} - -void NiWireframeProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_WIREFRAME_PROPERTY_WRITE -} - -string NiWireframeProperty::asString( bool verbose ) const { - NI_WIREFRAME_PROPERTY_STRING -} - -void NiWireframeProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_WIREFRAME_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiWireframeProperty::GetRefs() const { - NI_WIREFRAME_PROPERTY_GETREFS -} - -const Type & NiWireframeProperty::GetType() const { - return TYPE; -}; - -ushort NiWireframeProperty::GetFlags() const { - return flags; -} - -void NiWireframeProperty::SetFlags(ushort value) { - flags = value; -} - diff --git a/NifExport/niflib/obj/NiWireframeProperty.h b/NifExport/niflib/obj/NiWireframeProperty.h deleted file mode 100755 index 921ce33..0000000 --- a/NifExport/niflib/obj/NiWireframeProperty.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIWIREFRAMEPROPERTY_H_ -#define _NIWIREFRAMEPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiWireframeProperty; -typedef Ref<NiWireframeProperty> NiWireframePropertyRef; - -/*! - * NiWireframeProperty - Unknown. - */ - -class NIFLIB_API NiWireframeProperty : public NI_WIREFRAME_PROPERTY_PARENT { -public: - NiWireframeProperty(); - ~NiWireframeProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags( ushort n ); - -protected: - NI_WIREFRAME_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/NiZBufferProperty.cpp b/NifExport/niflib/obj/NiZBufferProperty.cpp deleted file mode 100755 index 5e55f19..0000000 --- a/NifExport/niflib/obj/NiZBufferProperty.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "NiZBufferProperty.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type NiZBufferProperty::TYPE("NiZBufferProperty", &NI_Z_BUFFER_PROPERTY_PARENT::TypeConst() ); - -NiZBufferProperty::NiZBufferProperty() NI_Z_BUFFER_PROPERTY_CONSTRUCT {} - -NiZBufferProperty::~NiZBufferProperty() {} - -void NiZBufferProperty::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_Z_BUFFER_PROPERTY_READ -} - -void NiZBufferProperty::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - NI_Z_BUFFER_PROPERTY_WRITE -} - -string NiZBufferProperty::asString( bool verbose ) const { - NI_Z_BUFFER_PROPERTY_STRING -} - -void NiZBufferProperty::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - NI_Z_BUFFER_PROPERTY_FIXLINKS -} - -list<NiObjectRef> NiZBufferProperty::GetRefs() const { - NI_Z_BUFFER_PROPERTY_GETREFS -} - -const Type & NiZBufferProperty::GetType() const { - return TYPE; -}; - -ushort NiZBufferProperty::GetFlags() const { - return flags; -} - -void NiZBufferProperty::SetFlags(ushort value) { - flags = value; -} - -uint NiZBufferProperty::GetFunction() const { - return function; -} - -void NiZBufferProperty::SetFunction(uint value) { - function = value; -} diff --git a/NifExport/niflib/obj/NiZBufferProperty.h b/NifExport/niflib/obj/NiZBufferProperty.h deleted file mode 100755 index 3db123d..0000000 --- a/NifExport/niflib/obj/NiZBufferProperty.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _NIZBUFFERPROPERTY_H_ -#define _NIZBUFFERPROPERTY_H_ - -#include "NiProperty.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class NiZBufferProperty; -typedef Ref<NiZBufferProperty> NiZBufferPropertyRef; - -/*! - * NiZBufferProperty - This Property controlls the Z buffer (OpenGL: - * depth buffer). - */ - -class NIFLIB_API NiZBufferProperty : public NI_Z_BUFFER_PROPERTY_PARENT { -public: - NiZBufferProperty(); - ~NiZBufferProperty(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - ushort GetFlags() const; - void SetFlags(ushort value); - - uint GetFunction() const; - void SetFunction(uint value); - -protected: - NI_Z_BUFFER_PROPERTY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/RootCollisionNode.cpp b/NifExport/niflib/obj/RootCollisionNode.cpp deleted file mode 100755 index c25f82a..0000000 --- a/NifExport/niflib/obj/RootCollisionNode.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "RootCollisionNode.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type RootCollisionNode::TYPE("RootCollisionNode", &ROOT_COLLISION_NODE_PARENT::TypeConst() ); - -RootCollisionNode::RootCollisionNode() ROOT_COLLISION_NODE_CONSTRUCT {} - -RootCollisionNode::~RootCollisionNode() {} - -void RootCollisionNode::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ROOT_COLLISION_NODE_READ -} - -void RootCollisionNode::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - ROOT_COLLISION_NODE_WRITE -} - -string RootCollisionNode::asString( bool verbose ) const { - ROOT_COLLISION_NODE_STRING -} - -void RootCollisionNode::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - ROOT_COLLISION_NODE_FIXLINKS -} - -list<NiObjectRef> RootCollisionNode::GetRefs() const { - ROOT_COLLISION_NODE_GETREFS -} - -const Type & RootCollisionNode::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/RootCollisionNode.h b/NifExport/niflib/obj/RootCollisionNode.h deleted file mode 100755 index b452ae3..0000000 --- a/NifExport/niflib/obj/RootCollisionNode.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _ROOTCOLLISIONNODE_H_ -#define _ROOTCOLLISIONNODE_H_ - -#include "NiNode.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class RootCollisionNode; -typedef Ref<RootCollisionNode> RootCollisionNodeRef; - -/*! - * RootCollisionNode - Morrowind-specific node for collision mesh. - */ - -class NIFLIB_API RootCollisionNode : public ROOT_COLLISION_NODE_PARENT { -public: - RootCollisionNode(); - ~RootCollisionNode(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - ROOT_COLLISION_NODE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkBlendCollisionObject.cpp b/NifExport/niflib/obj/bhkBlendCollisionObject.cpp deleted file mode 100755 index af9667a..0000000 --- a/NifExport/niflib/obj/bhkBlendCollisionObject.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkBlendCollisionObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkBlendCollisionObject::TYPE("bhkBlendCollisionObject", &BHK_BLEND_COLLISION_OBJECT_PARENT::TypeConst() ); - -bhkBlendCollisionObject::bhkBlendCollisionObject() BHK_BLEND_COLLISION_OBJECT_CONSTRUCT {} - -bhkBlendCollisionObject::~bhkBlendCollisionObject() {} - -void bhkBlendCollisionObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_BLEND_COLLISION_OBJECT_READ -} - -void bhkBlendCollisionObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_BLEND_COLLISION_OBJECT_WRITE -} - -string bhkBlendCollisionObject::asString( bool verbose ) const { - BHK_BLEND_COLLISION_OBJECT_STRING -} - -void bhkBlendCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_BLEND_COLLISION_OBJECT_FIXLINKS -} - -list<NiObjectRef> bhkBlendCollisionObject::GetRefs() const { - BHK_BLEND_COLLISION_OBJECT_GETREFS -} - -const Type & bhkBlendCollisionObject::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkBlendCollisionObject.h b/NifExport/niflib/obj/bhkBlendCollisionObject.h deleted file mode 100755 index aabb572..0000000 --- a/NifExport/niflib/obj/bhkBlendCollisionObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKBLENDCOLLISIONOBJECT_H_ -#define _BHKBLENDCOLLISIONOBJECT_H_ - -#include "NiCollisionObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkBlendCollisionObject; -typedef Ref<bhkBlendCollisionObject> bhkBlendCollisionObjectRef; - -/*! - * bhkBlendCollisionObject - Unknown. - */ - -class NIFLIB_API bhkBlendCollisionObject : public BHK_BLEND_COLLISION_OBJECT_PARENT { -public: - bhkBlendCollisionObject(); - ~bhkBlendCollisionObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_BLEND_COLLISION_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkBlendController.cpp b/NifExport/niflib/obj/bhkBlendController.cpp deleted file mode 100755 index 24f9802..0000000 --- a/NifExport/niflib/obj/bhkBlendController.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkBlendController.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkBlendController::TYPE("bhkBlendController", &BHK_BLEND_CONTROLLER_PARENT::TypeConst() ); - -bhkBlendController::bhkBlendController() BHK_BLEND_CONTROLLER_CONSTRUCT {} - -bhkBlendController::~bhkBlendController() {} - -void bhkBlendController::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_BLEND_CONTROLLER_READ -} - -void bhkBlendController::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_BLEND_CONTROLLER_WRITE -} - -string bhkBlendController::asString( bool verbose ) const { - BHK_BLEND_CONTROLLER_STRING -} - -void bhkBlendController::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_BLEND_CONTROLLER_FIXLINKS -} - -list<NiObjectRef> bhkBlendController::GetRefs() const { - BHK_BLEND_CONTROLLER_GETREFS -} - -const Type & bhkBlendController::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkBlendController.h b/NifExport/niflib/obj/bhkBlendController.h deleted file mode 100755 index b7d2fa8..0000000 --- a/NifExport/niflib/obj/bhkBlendController.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKBLENDCONTROLLER_H_ -#define _BHKBLENDCONTROLLER_H_ - -#include "NiTimeController.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkBlendController; -typedef Ref<bhkBlendController> bhkBlendControllerRef; - -/*! - * bhkBlendController - Unknown. Is apparently only used in skeleton.nif - * files. - */ - -class NIFLIB_API bhkBlendController : public BHK_BLEND_CONTROLLER_PARENT { -public: - bhkBlendController(); - ~bhkBlendController(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_BLEND_CONTROLLER_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkBoxShape.cpp b/NifExport/niflib/obj/bhkBoxShape.cpp deleted file mode 100755 index e325a8d..0000000 --- a/NifExport/niflib/obj/bhkBoxShape.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkBoxShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkBoxShape::TYPE("bhkBoxShape", &BHK_BOX_SHAPE_PARENT::TypeConst() ); - -bhkBoxShape::bhkBoxShape() BHK_BOX_SHAPE_CONSTRUCT {} - -bhkBoxShape::~bhkBoxShape() {} - -void bhkBoxShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_BOX_SHAPE_READ -} - -void bhkBoxShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_BOX_SHAPE_WRITE -} - -string bhkBoxShape::asString( bool verbose ) const { - BHK_BOX_SHAPE_STRING -} - -void bhkBoxShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_BOX_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkBoxShape::GetRefs() const { - BHK_BOX_SHAPE_GETREFS -} - -const Type & bhkBoxShape::GetType() const { - return TYPE; -}; - -void bhkBoxShape::SetDimensions(const Vector3 &v) { - dimensions = v; -} - diff --git a/NifExport/niflib/obj/bhkBoxShape.h b/NifExport/niflib/obj/bhkBoxShape.h deleted file mode 100755 index 238ab89..0000000 --- a/NifExport/niflib/obj/bhkBoxShape.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKBOXSHAPE_H_ -#define _BHKBOXSHAPE_H_ - -#include "bhkConvexShape.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class bhkBoxShape; -typedef Ref<bhkBoxShape> bhkBoxShapeRef; - -/*! - * bhkBoxShape - A box. - */ - -class NIFLIB_API bhkBoxShape : public BHK_BOX_SHAPE_PARENT { -public: - bhkBoxShape(); - ~bhkBoxShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetDimensions(const Vector3 &v); - -protected: - BHK_BOX_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkCapsuleShape.cpp b/NifExport/niflib/obj/bhkCapsuleShape.cpp deleted file mode 100755 index e40c01e..0000000 --- a/NifExport/niflib/obj/bhkCapsuleShape.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkCapsuleShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkCapsuleShape::TYPE("bhkCapsuleShape", &BHK_CAPSULE_SHAPE_PARENT::TypeConst() ); - -bhkCapsuleShape::bhkCapsuleShape() BHK_CAPSULE_SHAPE_CONSTRUCT {} - -bhkCapsuleShape::~bhkCapsuleShape() {} - -void bhkCapsuleShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CAPSULE_SHAPE_READ -} - -void bhkCapsuleShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_CAPSULE_SHAPE_WRITE -} - -string bhkCapsuleShape::asString( bool verbose ) const { - BHK_CAPSULE_SHAPE_STRING -} - -void bhkCapsuleShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CAPSULE_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkCapsuleShape::GetRefs() const { - BHK_CAPSULE_SHAPE_GETREFS -} - -const Type & bhkCapsuleShape::GetType() const { - return TYPE; -}; - -void bhkCapsuleShape::SetRadius(float f) { - radius = f; -} - -void bhkCapsuleShape::SetRadius1(float f) { - radius1 = f; -} - -void bhkCapsuleShape::SetRadius2(float f) { - radius2 = f; -} - -void bhkCapsuleShape::SetFirstPoint(const Vector3 &v) { - firstPoint = v; -} - -void bhkCapsuleShape::SetSecondPoint(const Vector3 &v) { - secondPoint = v; -} - - diff --git a/NifExport/niflib/obj/bhkCapsuleShape.h b/NifExport/niflib/obj/bhkCapsuleShape.h deleted file mode 100755 index 99e94bf..0000000 --- a/NifExport/niflib/obj/bhkCapsuleShape.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKCAPSULESHAPE_H_ -#define _BHKCAPSULESHAPE_H_ - -#include "bhkConvexShape.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class bhkCapsuleShape; -typedef Ref<bhkCapsuleShape> bhkCapsuleShapeRef; - -/*! - * bhkCapsuleShape - A capsule. - */ - -class NIFLIB_API bhkCapsuleShape : public BHK_CAPSULE_SHAPE_PARENT { -public: - bhkCapsuleShape(); - ~bhkCapsuleShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetRadius(float f); - void SetRadius1(float f); - void SetRadius2(float f); - - void SetFirstPoint(const Vector3 &v); - void SetSecondPoint(const Vector3 &v); - -protected: - BHK_CAPSULE_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkCollisionObject.cpp b/NifExport/niflib/obj/bhkCollisionObject.cpp deleted file mode 100755 index a4babe1..0000000 --- a/NifExport/niflib/obj/bhkCollisionObject.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkCollisionObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkCollisionObject::TYPE("bhkCollisionObject", &BHK_COLLISION_OBJECT_PARENT::TypeConst() ); - -bhkCollisionObject::bhkCollisionObject() BHK_COLLISION_OBJECT_CONSTRUCT {} - -bhkCollisionObject::~bhkCollisionObject() {} - -void bhkCollisionObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_COLLISION_OBJECT_READ -} - -void bhkCollisionObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_COLLISION_OBJECT_WRITE -} - -string bhkCollisionObject::asString( bool verbose ) const { - BHK_COLLISION_OBJECT_STRING -} - -void bhkCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_COLLISION_OBJECT_FIXLINKS -} - -list<NiObjectRef> bhkCollisionObject::GetRefs() const { -// BHK_COLLISION_OBJECT_GETREFS - list<NiObjectRef> refs = InternalGetRefs(); - refs.reverse(); - return refs; -} - -const Type & bhkCollisionObject::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkCollisionObject.h b/NifExport/niflib/obj/bhkCollisionObject.h deleted file mode 100755 index 58dcbfd..0000000 --- a/NifExport/niflib/obj/bhkCollisionObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKCOLLISIONOBJECT_H_ -#define _BHKCOLLISIONOBJECT_H_ - -#include "NiCollisionObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkCollisionObject; -typedef Ref<bhkCollisionObject> bhkCollisionObjectRef; - -/*! - * bhkCollisionObject - Unknown. - */ - -class NIFLIB_API bhkCollisionObject : public BHK_COLLISION_OBJECT_PARENT { -public: - bhkCollisionObject(); - ~bhkCollisionObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_COLLISION_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkConvexShape.cpp b/NifExport/niflib/obj/bhkConvexShape.cpp deleted file mode 100755 index 367a5c5..0000000 --- a/NifExport/niflib/obj/bhkConvexShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkConvexShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkConvexShape::TYPE("bhkConvexShape", &BHK_CONVEX_SHAPE_PARENT::TypeConst() ); - -bhkConvexShape::bhkConvexShape() BHK_CONVEX_SHAPE_CONSTRUCT {} - -bhkConvexShape::~bhkConvexShape() {} - -void bhkConvexShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CONVEX_SHAPE_READ -} - -void bhkConvexShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_CONVEX_SHAPE_WRITE -} - -string bhkConvexShape::asString( bool verbose ) const { - BHK_CONVEX_SHAPE_STRING -} - -void bhkConvexShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CONVEX_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkConvexShape::GetRefs() const { - BHK_CONVEX_SHAPE_GETREFS -} - -const Type & bhkConvexShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkConvexShape.h b/NifExport/niflib/obj/bhkConvexShape.h deleted file mode 100755 index dd9f70b..0000000 --- a/NifExport/niflib/obj/bhkConvexShape.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKCONVEXSHAPE_H_ -#define _BHKCONVEXSHAPE_H_ - -#include "bhkSphereRepShape.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkConvexShape; -typedef Ref<bhkConvexShape> bhkConvexShapeRef; - -/*! - * bhkConvexShape - A havok shape. - */ - -class NIFLIB_API bhkConvexShape : public BHK_CONVEX_SHAPE_PARENT { -public: - bhkConvexShape(); - ~bhkConvexShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_CONVEX_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkConvexTransformShape.cpp b/NifExport/niflib/obj/bhkConvexTransformShape.cpp deleted file mode 100755 index c5c26ff..0000000 --- a/NifExport/niflib/obj/bhkConvexTransformShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkConvexTransformShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkConvexTransformShape::TYPE("bhkConvexTransformShape", &BHK_CONVEX_TRANSFORM_SHAPE_PARENT::TypeConst() ); - -bhkConvexTransformShape::bhkConvexTransformShape() BHK_CONVEX_TRANSFORM_SHAPE_CONSTRUCT {} - -bhkConvexTransformShape::~bhkConvexTransformShape() {} - -void bhkConvexTransformShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CONVEX_TRANSFORM_SHAPE_READ -} - -void bhkConvexTransformShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_CONVEX_TRANSFORM_SHAPE_WRITE -} - -string bhkConvexTransformShape::asString( bool verbose ) const { - BHK_CONVEX_TRANSFORM_SHAPE_STRING -} - -void bhkConvexTransformShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CONVEX_TRANSFORM_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkConvexTransformShape::GetRefs() const { - BHK_CONVEX_TRANSFORM_SHAPE_GETREFS -} - -const Type & bhkConvexTransformShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkConvexTransformShape.h b/NifExport/niflib/obj/bhkConvexTransformShape.h deleted file mode 100755 index 0757161..0000000 --- a/NifExport/niflib/obj/bhkConvexTransformShape.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKCONVEXTRANSFORMSHAPE_H_ -#define _BHKCONVEXTRANSFORMSHAPE_H_ - -#include "bhkTransformShape.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkConvexTransformShape; -typedef Ref<bhkConvexTransformShape> bhkConvexTransformShapeRef; - -/*! - * bhkConvexTransformShape - A convex transformed shape? - */ - -class NIFLIB_API bhkConvexTransformShape : public BHK_CONVEX_TRANSFORM_SHAPE_PARENT { -public: - bhkConvexTransformShape(); - ~bhkConvexTransformShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_CONVEX_TRANSFORM_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkConvexVerticesShape.cpp b/NifExport/niflib/obj/bhkConvexVerticesShape.cpp deleted file mode 100755 index ad52851..0000000 --- a/NifExport/niflib/obj/bhkConvexVerticesShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkConvexVerticesShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkConvexVerticesShape::TYPE("bhkConvexVerticesShape", &BHK_CONVEX_VERTICES_SHAPE_PARENT::TypeConst() ); - -bhkConvexVerticesShape::bhkConvexVerticesShape() BHK_CONVEX_VERTICES_SHAPE_CONSTRUCT {} - -bhkConvexVerticesShape::~bhkConvexVerticesShape() {} - -void bhkConvexVerticesShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CONVEX_VERTICES_SHAPE_READ -} - -void bhkConvexVerticesShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_CONVEX_VERTICES_SHAPE_WRITE -} - -string bhkConvexVerticesShape::asString( bool verbose ) const { - BHK_CONVEX_VERTICES_SHAPE_STRING -} - -void bhkConvexVerticesShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_CONVEX_VERTICES_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkConvexVerticesShape::GetRefs() const { - BHK_CONVEX_VERTICES_SHAPE_GETREFS -} - -const Type & bhkConvexVerticesShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkConvexVerticesShape.h b/NifExport/niflib/obj/bhkConvexVerticesShape.h deleted file mode 100755 index 962a3a4..0000000 --- a/NifExport/niflib/obj/bhkConvexVerticesShape.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKCONVEXVERTICESSHAPE_H_ -#define _BHKCONVEXVERTICESSHAPE_H_ - -#include "bhkSphereRepShape.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkConvexVerticesShape; -typedef Ref<bhkConvexVerticesShape> bhkConvexVerticesShapeRef; - -/*! - * bhkConvexVerticesShape - A convex shape built from vertices? - */ - -class NIFLIB_API bhkConvexVerticesShape : public BHK_CONVEX_VERTICES_SHAPE_PARENT { -public: - bhkConvexVerticesShape(); - ~bhkConvexVerticesShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_CONVEX_VERTICES_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkEntity.cpp b/NifExport/niflib/obj/bhkEntity.cpp deleted file mode 100755 index 3f6740f..0000000 --- a/NifExport/niflib/obj/bhkEntity.cpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkEntity.h" -#include "bhkShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkEntity::TYPE("bhkEntity", &BHK_ENTITY_PARENT::TypeConst() ); - -bhkEntity::bhkEntity() BHK_ENTITY_CONSTRUCT {} - -bhkEntity::~bhkEntity() {} - -void bhkEntity::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_ENTITY_READ -} - -void bhkEntity::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_ENTITY_WRITE -} - -string bhkEntity::asString( bool verbose ) const { - BHK_ENTITY_STRING -} - -void bhkEntity::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_ENTITY_FIXLINKS -} - -list<NiObjectRef> bhkEntity::GetRefs() const { - BHK_ENTITY_GETREFS -} - -const Type & bhkEntity::GetType() const { - return TYPE; -}; - -void bhkEntity::SetShape(const Ref<bhkShape> &s) -{ - shape = s; -} - -void bhkEntity::SetLayer(int l) -{ - layer = l; -} diff --git a/NifExport/niflib/obj/bhkEntity.cpp.bak b/NifExport/niflib/obj/bhkEntity.cpp.bak deleted file mode 100755 index b2463e4..0000000 --- a/NifExport/niflib/obj/bhkEntity.cpp.bak +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkEntity.h" -#include "bhkShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkEntity::TYPE("bhkEntity", &BHK_ENTITY_PARENT::TypeConst() ); - -bhkEntity::bhkEntity() BHK_ENTITY_CONSTRUCT {} - -bhkEntity::~bhkEntity() {} - -void bhkEntity::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_ENTITY_READ -} - -void bhkEntity::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_ENTITY_WRITE -} - -string bhkEntity::asString( bool verbose ) const { - BHK_ENTITY_STRING -} - -void bhkEntity::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_ENTITY_FIXLINKS -} - -list<NiObjectRef> bhkEntity::GetRefs() const { - BHK_ENTITY_GETREFS -} - -const Type & bhkEntity::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkEntity.h b/NifExport/niflib/obj/bhkEntity.h deleted file mode 100755 index b672b7f..0000000 --- a/NifExport/niflib/obj/bhkEntity.h +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKENTITY_H_ -#define _BHKENTITY_H_ - -#include "bhkWorldObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class bhkShape; - -#include "../gen/obj_defines.h" - -class bhkEntity; -typedef Ref<bhkEntity> bhkEntityRef; - -/*! - * bhkEntity - A havok node, describes physical properties. - */ - -class NIFLIB_API bhkEntity : public BHK_ENTITY_PARENT { -public: - bhkEntity(); - ~bhkEntity(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetShape(const Ref<bhkShape> &); - void SetLayer(int layer); - -protected: - BHK_ENTITY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkEntity.h.bak b/NifExport/niflib/obj/bhkEntity.h.bak deleted file mode 100755 index 339d31d..0000000 --- a/NifExport/niflib/obj/bhkEntity.h.bak +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKENTITY_H_ -#define _BHKENTITY_H_ - -#include "bhkWorldObject.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class bhkShape; - -#include "../gen/obj_defines.h" - -class bhkEntity; -typedef Ref<bhkEntity> bhkEntityRef; - -/*! - * bhkEntity - A havok node, describes physical properties. - */ - -class NIFLIB_API bhkEntity : public BHK_ENTITY_PARENT { -public: - bhkEntity(); - ~bhkEntity(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_ENTITY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkHingeConstraint.cpp b/NifExport/niflib/obj/bhkHingeConstraint.cpp deleted file mode 100755 index f71b19d..0000000 --- a/NifExport/niflib/obj/bhkHingeConstraint.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkHingeConstraint.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkHingeConstraint::TYPE("bhkHingeConstraint", &BHK_HINGE_CONSTRAINT_PARENT::TypeConst() ); - -bhkHingeConstraint::bhkHingeConstraint() BHK_HINGE_CONSTRAINT_CONSTRUCT {} - -bhkHingeConstraint::~bhkHingeConstraint() {} - -void bhkHingeConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_HINGE_CONSTRAINT_READ -} - -void bhkHingeConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_HINGE_CONSTRAINT_WRITE -} - -string bhkHingeConstraint::asString( bool verbose ) const { - BHK_HINGE_CONSTRAINT_STRING -} - -void bhkHingeConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_HINGE_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> bhkHingeConstraint::GetRefs() const { - BHK_HINGE_CONSTRAINT_GETREFS -} - -const Type & bhkHingeConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkHingeConstraint.h b/NifExport/niflib/obj/bhkHingeConstraint.h deleted file mode 100755 index e55558b..0000000 --- a/NifExport/niflib/obj/bhkHingeConstraint.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKHINGECONSTRAINT_H_ -#define _BHKHINGECONSTRAINT_H_ - -#include "AbhkConstraint.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkHingeConstraint; -typedef Ref<bhkHingeConstraint> bhkHingeConstraintRef; - -/*! - * bhkHingeConstraint - A hinge constraint. - */ - -class NIFLIB_API bhkHingeConstraint : public BHK_HINGE_CONSTRAINT_PARENT { -public: - bhkHingeConstraint(); - ~bhkHingeConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_HINGE_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkLimitedHingeConstraint.cpp b/NifExport/niflib/obj/bhkLimitedHingeConstraint.cpp deleted file mode 100755 index 9795ffd..0000000 --- a/NifExport/niflib/obj/bhkLimitedHingeConstraint.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkLimitedHingeConstraint.h" -#include "../gen/LimitedHingeDescriptor.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkLimitedHingeConstraint::TYPE("bhkLimitedHingeConstraint", &BHK_LIMITED_HINGE_CONSTRAINT_PARENT::TypeConst() ); - -bhkLimitedHingeConstraint::bhkLimitedHingeConstraint() BHK_LIMITED_HINGE_CONSTRAINT_CONSTRUCT {} - -bhkLimitedHingeConstraint::~bhkLimitedHingeConstraint() {} - -void bhkLimitedHingeConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_LIMITED_HINGE_CONSTRAINT_READ -} - -void bhkLimitedHingeConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_LIMITED_HINGE_CONSTRAINT_WRITE -} - -string bhkLimitedHingeConstraint::asString( bool verbose ) const { - BHK_LIMITED_HINGE_CONSTRAINT_STRING -} - -void bhkLimitedHingeConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_LIMITED_HINGE_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> bhkLimitedHingeConstraint::GetRefs() const { - BHK_LIMITED_HINGE_CONSTRAINT_GETREFS -} - -const Type & bhkLimitedHingeConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkLimitedHingeConstraint.h b/NifExport/niflib/obj/bhkLimitedHingeConstraint.h deleted file mode 100755 index 050faaf..0000000 --- a/NifExport/niflib/obj/bhkLimitedHingeConstraint.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKLIMITEDHINGECONSTRAINT_H_ -#define _BHKLIMITEDHINGECONSTRAINT_H_ - -#include "AbhkConstraint.h" - -// Include structures -#include "../gen/LimitedHingeDescriptor.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class bhkLimitedHingeConstraint; -typedef Ref<bhkLimitedHingeConstraint> bhkLimitedHingeConstraintRef; - -/*! - * bhkLimitedHingeConstraint - Hinge constraint. - */ - -class NIFLIB_API bhkLimitedHingeConstraint : public BHK_LIMITED_HINGE_CONSTRAINT_PARENT { -public: - bhkLimitedHingeConstraint(); - ~bhkLimitedHingeConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_LIMITED_HINGE_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkListShape.cpp b/NifExport/niflib/obj/bhkListShape.cpp deleted file mode 100755 index d280f6a..0000000 --- a/NifExport/niflib/obj/bhkListShape.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkListShape.h" -#include "bhkShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkListShape::TYPE("bhkListShape", &BHK_LIST_SHAPE_PARENT::TypeConst() ); - -bhkListShape::bhkListShape() BHK_LIST_SHAPE_CONSTRUCT {} - -bhkListShape::~bhkListShape() {} - -void bhkListShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_LIST_SHAPE_READ -} - -void bhkListShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_LIST_SHAPE_WRITE -} - -string bhkListShape::asString( bool verbose ) const { - BHK_LIST_SHAPE_STRING -} - -void bhkListShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_LIST_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkListShape::GetRefs() const { - BHK_LIST_SHAPE_GETREFS -} - -const Type & bhkListShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkListShape.h b/NifExport/niflib/obj/bhkListShape.h deleted file mode 100755 index cf0f85f..0000000 --- a/NifExport/niflib/obj/bhkListShape.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKLISTSHAPE_H_ -#define _BHKLISTSHAPE_H_ - -#include "AbhkShapeCollection.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class bhkShape; - -#include "../gen/obj_defines.h" - -class bhkListShape; -typedef Ref<bhkListShape> bhkListShapeRef; - -/*! - * bhkListShape - A list of shapes. - */ - -class NIFLIB_API bhkListShape : public BHK_LIST_SHAPE_PARENT { -public: - bhkListShape(); - ~bhkListShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_LIST_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkMalleableConstraint.cpp b/NifExport/niflib/obj/bhkMalleableConstraint.cpp deleted file mode 100755 index 51eb0ef..0000000 --- a/NifExport/niflib/obj/bhkMalleableConstraint.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkMalleableConstraint.h" -#include "../gen/RagDollDescriptor.h" -#include "../gen/LimitedHingeDescriptor.h" -#include "NiObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkMalleableConstraint::TYPE("bhkMalleableConstraint", &BHK_MALLEABLE_CONSTRAINT_PARENT::TypeConst() ); - -bhkMalleableConstraint::bhkMalleableConstraint() BHK_MALLEABLE_CONSTRAINT_CONSTRUCT {} - -bhkMalleableConstraint::~bhkMalleableConstraint() {} - -void bhkMalleableConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_MALLEABLE_CONSTRAINT_READ -} - -void bhkMalleableConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_MALLEABLE_CONSTRAINT_WRITE -} - -string bhkMalleableConstraint::asString( bool verbose ) const { - BHK_MALLEABLE_CONSTRAINT_STRING -} - -void bhkMalleableConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_MALLEABLE_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> bhkMalleableConstraint::GetRefs() const { - BHK_MALLEABLE_CONSTRAINT_GETREFS -} - -const Type & bhkMalleableConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkMalleableConstraint.h b/NifExport/niflib/obj/bhkMalleableConstraint.h deleted file mode 100755 index af3b0bd..0000000 --- a/NifExport/niflib/obj/bhkMalleableConstraint.h +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKMALLEABLECONSTRAINT_H_ -#define _BHKMALLEABLECONSTRAINT_H_ - -#include "AbhkConstraint.h" - -// Include structures -#include "../Ref.h" -#include "../gen/RagDollDescriptor.h" -#include "../gen/LimitedHingeDescriptor.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiObject; - -#include "../gen/obj_defines.h" - -class bhkMalleableConstraint; -typedef Ref<bhkMalleableConstraint> bhkMalleableConstraintRef; - -/*! - * bhkMalleableConstraint - A malleable constraint. - */ - -class NIFLIB_API bhkMalleableConstraint : public BHK_MALLEABLE_CONSTRAINT_PARENT { -public: - bhkMalleableConstraint(); - ~bhkMalleableConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_MALLEABLE_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkMoppBvTreeShape.cpp b/NifExport/niflib/obj/bhkMoppBvTreeShape.cpp deleted file mode 100755 index 64c2c44..0000000 --- a/NifExport/niflib/obj/bhkMoppBvTreeShape.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkMoppBvTreeShape.h" -#include "bhkShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkMoppBvTreeShape::TYPE("bhkMoppBvTreeShape", &BHK_MOPP_BV_TREE_SHAPE_PARENT::TypeConst() ); - -bhkMoppBvTreeShape::bhkMoppBvTreeShape() BHK_MOPP_BV_TREE_SHAPE_CONSTRUCT {} - -bhkMoppBvTreeShape::~bhkMoppBvTreeShape() {} - -void bhkMoppBvTreeShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_MOPP_BV_TREE_SHAPE_READ -} - -void bhkMoppBvTreeShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_MOPP_BV_TREE_SHAPE_WRITE -} - -string bhkMoppBvTreeShape::asString( bool verbose ) const { - BHK_MOPP_BV_TREE_SHAPE_STRING -} - -void bhkMoppBvTreeShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_MOPP_BV_TREE_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkMoppBvTreeShape::GetRefs() const { - BHK_MOPP_BV_TREE_SHAPE_GETREFS -} - -const Type & bhkMoppBvTreeShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkMoppBvTreeShape.h b/NifExport/niflib/obj/bhkMoppBvTreeShape.h deleted file mode 100755 index e827533..0000000 --- a/NifExport/niflib/obj/bhkMoppBvTreeShape.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKMOPPBVTREESHAPE_H_ -#define _BHKMOPPBVTREESHAPE_H_ - -#include "bhkShape.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class bhkShape; - -#include "../gen/obj_defines.h" - -class bhkMoppBvTreeShape; -typedef Ref<bhkMoppBvTreeShape> bhkMoppBvTreeShapeRef; - -/*! - * bhkMoppBvTreeShape - Memory optimized partial polytope bounding volume - * tree shape (not an entity). - */ - -class NIFLIB_API bhkMoppBvTreeShape : public BHK_MOPP_BV_TREE_SHAPE_PARENT { -public: - bhkMoppBvTreeShape(); - ~bhkMoppBvTreeShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_MOPP_BV_TREE_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkMultiSphereShape.cpp b/NifExport/niflib/obj/bhkMultiSphereShape.cpp deleted file mode 100755 index ee9e7df..0000000 --- a/NifExport/niflib/obj/bhkMultiSphereShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkMultiSphereShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkMultiSphereShape::TYPE("bhkMultiSphereShape", &BHK_MULTI_SPHERE_SHAPE_PARENT::TypeConst() ); - -bhkMultiSphereShape::bhkMultiSphereShape() BHK_MULTI_SPHERE_SHAPE_CONSTRUCT {} - -bhkMultiSphereShape::~bhkMultiSphereShape() {} - -void bhkMultiSphereShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_MULTI_SPHERE_SHAPE_READ -} - -void bhkMultiSphereShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_MULTI_SPHERE_SHAPE_WRITE -} - -string bhkMultiSphereShape::asString( bool verbose ) const { - BHK_MULTI_SPHERE_SHAPE_STRING -} - -void bhkMultiSphereShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_MULTI_SPHERE_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkMultiSphereShape::GetRefs() const { - BHK_MULTI_SPHERE_SHAPE_GETREFS -} - -const Type & bhkMultiSphereShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkMultiSphereShape.h b/NifExport/niflib/obj/bhkMultiSphereShape.h deleted file mode 100755 index eb7f9cf..0000000 --- a/NifExport/niflib/obj/bhkMultiSphereShape.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKMULTISPHERESHAPE_H_ -#define _BHKMULTISPHERESHAPE_H_ - -#include "bhkSphereRepShape.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkMultiSphereShape; -typedef Ref<bhkMultiSphereShape> bhkMultiSphereShapeRef; - -/*! - * bhkMultiSphereShape - Unknown. - */ - -class NIFLIB_API bhkMultiSphereShape : public BHK_MULTI_SPHERE_SHAPE_PARENT { -public: - bhkMultiSphereShape(); - ~bhkMultiSphereShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_MULTI_SPHERE_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkNiTriStripsShape.cpp b/NifExport/niflib/obj/bhkNiTriStripsShape.cpp deleted file mode 100755 index c086f99..0000000 --- a/NifExport/niflib/obj/bhkNiTriStripsShape.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkNiTriStripsShape.h" -#include "NiTriStripsData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkNiTriStripsShape::TYPE("bhkNiTriStripsShape", &BHK_NI_TRI_STRIPS_SHAPE_PARENT::TypeConst() ); - -bhkNiTriStripsShape::bhkNiTriStripsShape() BHK_NI_TRI_STRIPS_SHAPE_CONSTRUCT {} - -bhkNiTriStripsShape::~bhkNiTriStripsShape() {} - -void bhkNiTriStripsShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_NI_TRI_STRIPS_SHAPE_READ -} - -void bhkNiTriStripsShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_NI_TRI_STRIPS_SHAPE_WRITE -} - -string bhkNiTriStripsShape::asString( bool verbose ) const { - BHK_NI_TRI_STRIPS_SHAPE_STRING -} - -void bhkNiTriStripsShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_NI_TRI_STRIPS_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkNiTriStripsShape::GetRefs() const { - BHK_NI_TRI_STRIPS_SHAPE_GETREFS -} - -const Type & bhkNiTriStripsShape::GetType() const { - return TYPE; -}; - -void bhkNiTriStripsShape::SetNumStripsData(int n) -{ - numStripsData = n; - stripsData.resize(n); -} - -void bhkNiTriStripsShape::SetStripsData(int i, Ref<NiTriStripsData> &strips) -{ - stripsData[i] = strips; -} -/* -void bhkNiTriStripsShape::SetUnknownFloats1(const array<float,2> &floats) -{ - unknownFloats1 = floats; -} - -void bhkNiTriStripsShape::SetUnknownFloats2(const array<float,3> &floats) -{ - unknownFloats2 = floats; -} - -void bhkNiTriStripsShape::SetUnknownInts1(const array<uint,5> &ints) -{ - unknownInts1 = ints; -} -*/ -void bhkNiTriStripsShape::SetUnknownInts2(const vector<uint> &ints) -{ - numUnknownInts2 = (uint)ints.size(); - unknownInts2 = ints; -} - diff --git a/NifExport/niflib/obj/bhkNiTriStripsShape.cpp.bak b/NifExport/niflib/obj/bhkNiTriStripsShape.cpp.bak deleted file mode 100755 index ece8003..0000000 --- a/NifExport/niflib/obj/bhkNiTriStripsShape.cpp.bak +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkNiTriStripsShape.h" -#include "NiTriStripsData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkNiTriStripsShape::TYPE("bhkNiTriStripsShape", &BHK_NI_TRI_STRIPS_SHAPE_PARENT::TypeConst() ); - -bhkNiTriStripsShape::bhkNiTriStripsShape() BHK_NI_TRI_STRIPS_SHAPE_CONSTRUCT {} - -bhkNiTriStripsShape::~bhkNiTriStripsShape() {} - -void bhkNiTriStripsShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_NI_TRI_STRIPS_SHAPE_READ -} - -void bhkNiTriStripsShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_NI_TRI_STRIPS_SHAPE_WRITE -} - -string bhkNiTriStripsShape::asString( bool verbose ) const { - BHK_NI_TRI_STRIPS_SHAPE_STRING -} - -void bhkNiTriStripsShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_NI_TRI_STRIPS_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkNiTriStripsShape::GetRefs() const { - BHK_NI_TRI_STRIPS_SHAPE_GETREFS -} - -const Type & bhkNiTriStripsShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkNiTriStripsShape.h b/NifExport/niflib/obj/bhkNiTriStripsShape.h deleted file mode 100755 index 47892a4..0000000 --- a/NifExport/niflib/obj/bhkNiTriStripsShape.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKNITRISTRIPSSHAPE_H_ -#define _BHKNITRISTRIPSSHAPE_H_ - -#include "bhkSphereRepShape.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTriStripsData; - -#include "../gen/obj_defines.h" - -class bhkNiTriStripsShape; -typedef Ref<bhkNiTriStripsShape> bhkNiTriStripsShapeRef; - -/*! - * bhkNiTriStripsShape - A shape constructed from a bunch of strips. - */ - -class NIFLIB_API bhkNiTriStripsShape : public BHK_NI_TRI_STRIPS_SHAPE_PARENT { -public: - bhkNiTriStripsShape(); - ~bhkNiTriStripsShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -/* void SetUnknownFloats1(const array<float,2> &); - void SetUnknownFloats2(const array<float,3> &); - void SetUnknownInts1(const array<uint,5> &); -*/ - void SetUnknownInts2(const vector<uint> &); - - void SetNumStripsData(int i); - void SetStripsData(int i, Ref<NiTriStripsData> &); - -protected: - BHK_NI_TRI_STRIPS_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkNiTriStripsShape.h.bak b/NifExport/niflib/obj/bhkNiTriStripsShape.h.bak deleted file mode 100755 index f718e88..0000000 --- a/NifExport/niflib/obj/bhkNiTriStripsShape.h.bak +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKNITRISTRIPSSHAPE_H_ -#define _BHKNITRISTRIPSSHAPE_H_ - -#include "bhkSphereRepShape.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class NiTriStripsData; - -#include "../gen/obj_defines.h" - -class bhkNiTriStripsShape; -typedef Ref<bhkNiTriStripsShape> bhkNiTriStripsShapeRef; - -/*! - * bhkNiTriStripsShape - A shape constructed from a bunch of strips. - */ - -class NIFLIB_API bhkNiTriStripsShape : public BHK_NI_TRI_STRIPS_SHAPE_PARENT { -public: - bhkNiTriStripsShape(); - ~bhkNiTriStripsShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_NI_TRI_STRIPS_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkPackedNiTriStripsShape.cpp b/NifExport/niflib/obj/bhkPackedNiTriStripsShape.cpp deleted file mode 100755 index 7fb5a84..0000000 --- a/NifExport/niflib/obj/bhkPackedNiTriStripsShape.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkPackedNiTriStripsShape.h" -#include "hkPackedNiTriStripsData.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkPackedNiTriStripsShape::TYPE("bhkPackedNiTriStripsShape", &BHK_PACKED_NI_TRI_STRIPS_SHAPE_PARENT::TypeConst() ); - -bhkPackedNiTriStripsShape::bhkPackedNiTriStripsShape() BHK_PACKED_NI_TRI_STRIPS_SHAPE_CONSTRUCT {} - -bhkPackedNiTriStripsShape::~bhkPackedNiTriStripsShape() {} - -void bhkPackedNiTriStripsShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_PACKED_NI_TRI_STRIPS_SHAPE_READ -} - -void bhkPackedNiTriStripsShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_PACKED_NI_TRI_STRIPS_SHAPE_WRITE -} - -string bhkPackedNiTriStripsShape::asString( bool verbose ) const { - BHK_PACKED_NI_TRI_STRIPS_SHAPE_STRING -} - -void bhkPackedNiTriStripsShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_PACKED_NI_TRI_STRIPS_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkPackedNiTriStripsShape::GetRefs() const { - BHK_PACKED_NI_TRI_STRIPS_SHAPE_GETREFS -} - -const Type & bhkPackedNiTriStripsShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkPackedNiTriStripsShape.h b/NifExport/niflib/obj/bhkPackedNiTriStripsShape.h deleted file mode 100755 index be303c4..0000000 --- a/NifExport/niflib/obj/bhkPackedNiTriStripsShape.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKPACKEDNITRISTRIPSSHAPE_H_ -#define _BHKPACKEDNITRISTRIPSSHAPE_H_ - -#include "AbhkShapeCollection.h" - -// Include structures -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class hkPackedNiTriStripsData; - -#include "../gen/obj_defines.h" - -class bhkPackedNiTriStripsShape; -typedef Ref<bhkPackedNiTriStripsShape> bhkPackedNiTriStripsShapeRef; - -/*! - * bhkPackedNiTriStripsShape - A shape constructed from strips data. - */ - -class NIFLIB_API bhkPackedNiTriStripsShape : public BHK_PACKED_NI_TRI_STRIPS_SHAPE_PARENT { -public: - bhkPackedNiTriStripsShape(); - ~bhkPackedNiTriStripsShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_PACKED_NI_TRI_STRIPS_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkPrismaticConstraint.cpp b/NifExport/niflib/obj/bhkPrismaticConstraint.cpp deleted file mode 100755 index 4940436..0000000 --- a/NifExport/niflib/obj/bhkPrismaticConstraint.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkPrismaticConstraint.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkPrismaticConstraint::TYPE("bhkPrismaticConstraint", &BHK_PRISMATIC_CONSTRAINT_PARENT::TypeConst() ); - -bhkPrismaticConstraint::bhkPrismaticConstraint() BHK_PRISMATIC_CONSTRAINT_CONSTRUCT {} - -bhkPrismaticConstraint::~bhkPrismaticConstraint() {} - -void bhkPrismaticConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_PRISMATIC_CONSTRAINT_READ -} - -void bhkPrismaticConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_PRISMATIC_CONSTRAINT_WRITE -} - -string bhkPrismaticConstraint::asString( bool verbose ) const { - BHK_PRISMATIC_CONSTRAINT_STRING -} - -void bhkPrismaticConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_PRISMATIC_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> bhkPrismaticConstraint::GetRefs() const { - BHK_PRISMATIC_CONSTRAINT_GETREFS -} - -const Type & bhkPrismaticConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkPrismaticConstraint.h b/NifExport/niflib/obj/bhkPrismaticConstraint.h deleted file mode 100755 index 2b83db8..0000000 --- a/NifExport/niflib/obj/bhkPrismaticConstraint.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKPRISMATICCONSTRAINT_H_ -#define _BHKPRISMATICCONSTRAINT_H_ - -#include "AbhkConstraint.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkPrismaticConstraint; -typedef Ref<bhkPrismaticConstraint> bhkPrismaticConstraintRef; - -/*! - * bhkPrismaticConstraint - A prismatic constraint. - */ - -class NIFLIB_API bhkPrismaticConstraint : public BHK_PRISMATIC_CONSTRAINT_PARENT { -public: - bhkPrismaticConstraint(); - ~bhkPrismaticConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_PRISMATIC_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkRagdollConstraint.cpp b/NifExport/niflib/obj/bhkRagdollConstraint.cpp deleted file mode 100755 index 84becc3..0000000 --- a/NifExport/niflib/obj/bhkRagdollConstraint.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkRagdollConstraint.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkRagdollConstraint::TYPE("bhkRagdollConstraint", &BHK_RAGDOLL_CONSTRAINT_PARENT::TypeConst() ); - -bhkRagdollConstraint::bhkRagdollConstraint() BHK_RAGDOLL_CONSTRAINT_CONSTRUCT {} - -bhkRagdollConstraint::~bhkRagdollConstraint() {} - -void bhkRagdollConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_RAGDOLL_CONSTRAINT_READ -} - -void bhkRagdollConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_RAGDOLL_CONSTRAINT_WRITE -} - -string bhkRagdollConstraint::asString( bool verbose ) const { - BHK_RAGDOLL_CONSTRAINT_STRING -} - -void bhkRagdollConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_RAGDOLL_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> bhkRagdollConstraint::GetRefs() const { - BHK_RAGDOLL_CONSTRAINT_GETREFS -} - -const Type & bhkRagdollConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkRagdollConstraint.h b/NifExport/niflib/obj/bhkRagdollConstraint.h deleted file mode 100755 index adf6c69..0000000 --- a/NifExport/niflib/obj/bhkRagdollConstraint.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKRAGDOLLCONSTRAINT_H_ -#define _BHKRAGDOLLCONSTRAINT_H_ - -#include "AbhkRagdollConstraint.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkRagdollConstraint; -typedef Ref<bhkRagdollConstraint> bhkRagdollConstraintRef; - -/*! - * bhkRagdollConstraint - Ragdoll constraint. - */ - -class NIFLIB_API bhkRagdollConstraint : public BHK_RAGDOLL_CONSTRAINT_PARENT { -public: - bhkRagdollConstraint(); - ~bhkRagdollConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_RAGDOLL_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkRefObject.cpp b/NifExport/niflib/obj/bhkRefObject.cpp deleted file mode 100755 index 7fde0c9..0000000 --- a/NifExport/niflib/obj/bhkRefObject.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkRefObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkRefObject::TYPE("bhkRefObject", &BHK_REF_OBJECT_PARENT::TypeConst() ); - -bhkRefObject::bhkRefObject() BHK_REF_OBJECT_CONSTRUCT {} - -bhkRefObject::~bhkRefObject() {} - -void bhkRefObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_REF_OBJECT_READ -} - -void bhkRefObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_REF_OBJECT_WRITE -} - -string bhkRefObject::asString( bool verbose ) const { - BHK_REF_OBJECT_STRING -} - -void bhkRefObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_REF_OBJECT_FIXLINKS -} - -list<NiObjectRef> bhkRefObject::GetRefs() const { - BHK_REF_OBJECT_GETREFS -} - -const Type & bhkRefObject::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkRefObject.h b/NifExport/niflib/obj/bhkRefObject.h deleted file mode 100755 index b128701..0000000 --- a/NifExport/niflib/obj/bhkRefObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKREFOBJECT_H_ -#define _BHKREFOBJECT_H_ - -#include "NiObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkRefObject; -typedef Ref<bhkRefObject> bhkRefObjectRef; - -/*! - * bhkRefObject - The base type of all Havok objects? - */ - -class NIFLIB_API bhkRefObject : public BHK_REF_OBJECT_PARENT { -public: - bhkRefObject(); - ~bhkRefObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_REF_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkRigidBody.cpp b/NifExport/niflib/obj/bhkRigidBody.cpp deleted file mode 100755 index ead467a..0000000 --- a/NifExport/niflib/obj/bhkRigidBody.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkRigidBody.h" -#include "../gen/QuaternionXYZW.h" -#include "AbhkConstraint.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkRigidBody::TYPE("bhkRigidBody", &BHK_RIGID_BODY_PARENT::TypeConst() ); - -bhkRigidBody::bhkRigidBody() BHK_RIGID_BODY_CONSTRUCT {} - -bhkRigidBody::~bhkRigidBody() {} - -void bhkRigidBody::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_RIGID_BODY_READ -} - -void bhkRigidBody::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_RIGID_BODY_WRITE -} - -string bhkRigidBody::asString( bool verbose ) const { - BHK_RIGID_BODY_STRING -} - -void bhkRigidBody::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_RIGID_BODY_FIXLINKS -} - -list<NiObjectRef> bhkRigidBody::GetRefs() const { - BHK_RIGID_BODY_GETREFS -} - -const Type & bhkRigidBody::GetType() const { - return TYPE; -}; - -void bhkRigidBody::SetTranslation(const Vector3 &v) -{ - translation = v; -} - -void bhkRigidBody::SetRotation(const QuaternionXYZW &q) -{ - rotation = q; -} - -void bhkRigidBody::SetLayerCopy(int l) -{ - layerCopy_ = l; -} - -void bhkRigidBody::SetCenter(const Vector3 &v) -{ - center = v; -} - -void bhkRigidBody::SetMass(float f) -{ - mass = f; -} - -void bhkRigidBody::SetLinearDamping(float f) -{ - linearDamping = f; -} - -void bhkRigidBody::SetAngularDamping(float f) -{ - angularDamping = f; -} - -void bhkRigidBody::SetFriction(float f) -{ - friction = f; -} - -void bhkRigidBody::SetRestitution(float f) -{ - restitution = f; -} - -void bhkRigidBody::SetMaxLinearVelocity(float f) -{ - maxLinearVelocity = f; -} - -void bhkRigidBody::SetMaxAngularVelocity(float f) -{ - maxAngularVelocity = f; -} - -void bhkRigidBody::SetPenetrationDepth(float f) -{ - penDepth = f; -} - -void bhkRigidBody::SetMotionSystem(int i) -{ - motionSystem_ = i; -} - -void bhkRigidBody::SetQualityType(int i) -{ - qualityType = i; -} diff --git a/NifExport/niflib/obj/bhkRigidBody.h b/NifExport/niflib/obj/bhkRigidBody.h deleted file mode 100755 index 2aa9e35..0000000 --- a/NifExport/niflib/obj/bhkRigidBody.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKRIGIDBODY_H_ -#define _BHKRIGIDBODY_H_ - -#include "bhkEntity.h" - -// Include structures -#include "../gen/QuaternionXYZW.h" -#include "../Ref.h" -namespace Niflib { - -// Forward define of referenced blocks -class AbhkConstraint; - -#include "../gen/obj_defines.h" - -class bhkRigidBody; -typedef Ref<bhkRigidBody> bhkRigidBodyRef; - -/*! - * bhkRigidBody - Describes physical properties of an object. - */ - -class NIFLIB_API bhkRigidBody : public BHK_RIGID_BODY_PARENT { -public: - bhkRigidBody(); - ~bhkRigidBody(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetTranslation(const Vector3 &v); - void SetRotation(const QuaternionXYZW &q); - void SetLayerCopy(int l); - void SetCenter(const Vector3 &v); - void SetMass(float f); - void SetLinearDamping(float f); - void SetAngularDamping(float f); - void SetFriction(float f); - void SetRestitution(float f); - void SetMaxLinearVelocity(float f); - void SetMaxAngularVelocity(float f); - void SetPenetrationDepth(float f); - void SetMotionSystem(int i); - void SetQualityType(int i); - -protected: - BHK_RIGID_BODY_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkRigidBodyT.cpp b/NifExport/niflib/obj/bhkRigidBodyT.cpp deleted file mode 100755 index 3304a08..0000000 --- a/NifExport/niflib/obj/bhkRigidBodyT.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkRigidBodyT.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkRigidBodyT::TYPE("bhkRigidBodyT", &BHK_RIGID_BODY_T_PARENT::TypeConst() ); - -bhkRigidBodyT::bhkRigidBodyT() BHK_RIGID_BODY_T_CONSTRUCT {} - -bhkRigidBodyT::~bhkRigidBodyT() {} - -void bhkRigidBodyT::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_RIGID_BODY_T_READ -} - -void bhkRigidBodyT::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_RIGID_BODY_T_WRITE -} - -string bhkRigidBodyT::asString( bool verbose ) const { - BHK_RIGID_BODY_T_STRING -} - -void bhkRigidBodyT::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_RIGID_BODY_T_FIXLINKS -} - -list<NiObjectRef> bhkRigidBodyT::GetRefs() const { - BHK_RIGID_BODY_T_GETREFS -} - -const Type & bhkRigidBodyT::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkRigidBodyT.h b/NifExport/niflib/obj/bhkRigidBodyT.h deleted file mode 100755 index cb3f2d2..0000000 --- a/NifExport/niflib/obj/bhkRigidBodyT.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKRIGIDBODYT_H_ -#define _BHKRIGIDBODYT_H_ - -#include "bhkRigidBody.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkRigidBodyT; -typedef Ref<bhkRigidBodyT> bhkRigidBodyTRef; - -/*! - * bhkRigidBodyT - Unknown. - */ - -class NIFLIB_API bhkRigidBodyT : public BHK_RIGID_BODY_T_PARENT { -public: - bhkRigidBodyT(); - ~bhkRigidBodyT(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_RIGID_BODY_T_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkSPCollisionObject.cpp b/NifExport/niflib/obj/bhkSPCollisionObject.cpp deleted file mode 100755 index 205e46c..0000000 --- a/NifExport/niflib/obj/bhkSPCollisionObject.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkSPCollisionObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkSPCollisionObject::TYPE("bhkSPCollisionObject", &BHK_S_P_COLLISION_OBJECT_PARENT::TypeConst() ); - -bhkSPCollisionObject::bhkSPCollisionObject() BHK_S_P_COLLISION_OBJECT_CONSTRUCT {} - -bhkSPCollisionObject::~bhkSPCollisionObject() {} - -void bhkSPCollisionObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_S_P_COLLISION_OBJECT_READ -} - -void bhkSPCollisionObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_S_P_COLLISION_OBJECT_WRITE -} - -string bhkSPCollisionObject::asString( bool verbose ) const { - BHK_S_P_COLLISION_OBJECT_STRING -} - -void bhkSPCollisionObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_S_P_COLLISION_OBJECT_FIXLINKS -} - -list<NiObjectRef> bhkSPCollisionObject::GetRefs() const { - BHK_S_P_COLLISION_OBJECT_GETREFS -} - -const Type & bhkSPCollisionObject::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkSPCollisionObject.h b/NifExport/niflib/obj/bhkSPCollisionObject.h deleted file mode 100755 index a65450c..0000000 --- a/NifExport/niflib/obj/bhkSPCollisionObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSPCOLLISIONOBJECT_H_ -#define _BHKSPCOLLISIONOBJECT_H_ - -#include "NiCollisionObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkSPCollisionObject; -typedef Ref<bhkSPCollisionObject> bhkSPCollisionObjectRef; - -/*! - * bhkSPCollisionObject - Unknown. - */ - -class NIFLIB_API bhkSPCollisionObject : public BHK_S_P_COLLISION_OBJECT_PARENT { -public: - bhkSPCollisionObject(); - ~bhkSPCollisionObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_S_P_COLLISION_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkSerializable.cpp b/NifExport/niflib/obj/bhkSerializable.cpp deleted file mode 100755 index b8287c7..0000000 --- a/NifExport/niflib/obj/bhkSerializable.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkSerializable.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkSerializable::TYPE("bhkSerializable", &BHK_SERIALIZABLE_PARENT::TypeConst() ); - -bhkSerializable::bhkSerializable() BHK_SERIALIZABLE_CONSTRUCT {} - -bhkSerializable::~bhkSerializable() {} - -void bhkSerializable::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SERIALIZABLE_READ -} - -void bhkSerializable::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_SERIALIZABLE_WRITE -} - -string bhkSerializable::asString( bool verbose ) const { - BHK_SERIALIZABLE_STRING -} - -void bhkSerializable::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SERIALIZABLE_FIXLINKS -} - -list<NiObjectRef> bhkSerializable::GetRefs() const { - BHK_SERIALIZABLE_GETREFS -} - -const Type & bhkSerializable::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkSerializable.h b/NifExport/niflib/obj/bhkSerializable.h deleted file mode 100755 index ca3d227..0000000 --- a/NifExport/niflib/obj/bhkSerializable.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSERIALIZABLE_H_ -#define _BHKSERIALIZABLE_H_ - -#include "bhkRefObject.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkSerializable; -typedef Ref<bhkSerializable> bhkSerializableRef; - -/*! - * bhkSerializable - Havok objects that can be saved and loaded from - * disk? - */ - -class NIFLIB_API bhkSerializable : public BHK_SERIALIZABLE_PARENT { -public: - bhkSerializable(); - ~bhkSerializable(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_SERIALIZABLE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkShape.cpp b/NifExport/niflib/obj/bhkShape.cpp deleted file mode 100755 index 58f3e53..0000000 --- a/NifExport/niflib/obj/bhkShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkShape::TYPE("bhkShape", &BHK_SHAPE_PARENT::TypeConst() ); - -bhkShape::bhkShape() BHK_SHAPE_CONSTRUCT {} - -bhkShape::~bhkShape() {} - -void bhkShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SHAPE_READ -} - -void bhkShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_SHAPE_WRITE -} - -string bhkShape::asString( bool verbose ) const { - BHK_SHAPE_STRING -} - -void bhkShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkShape::GetRefs() const { - BHK_SHAPE_GETREFS -} - -const Type & bhkShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkShape.h b/NifExport/niflib/obj/bhkShape.h deleted file mode 100755 index d41cc1f..0000000 --- a/NifExport/niflib/obj/bhkShape.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSHAPE_H_ -#define _BHKSHAPE_H_ - -#include "bhkSerializable.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkShape; -typedef Ref<bhkShape> bhkShapeRef; - -/*! - * bhkShape - A Havok Shape? - */ - -class NIFLIB_API bhkShape : public BHK_SHAPE_PARENT { -public: - bhkShape(); - ~bhkShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkSimpleShapePhantom.cpp b/NifExport/niflib/obj/bhkSimpleShapePhantom.cpp deleted file mode 100755 index 6d3c326..0000000 --- a/NifExport/niflib/obj/bhkSimpleShapePhantom.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkSimpleShapePhantom.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkSimpleShapePhantom::TYPE("bhkSimpleShapePhantom", &BHK_SIMPLE_SHAPE_PHANTOM_PARENT::TypeConst() ); - -bhkSimpleShapePhantom::bhkSimpleShapePhantom() BHK_SIMPLE_SHAPE_PHANTOM_CONSTRUCT {} - -bhkSimpleShapePhantom::~bhkSimpleShapePhantom() {} - -void bhkSimpleShapePhantom::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SIMPLE_SHAPE_PHANTOM_READ -} - -void bhkSimpleShapePhantom::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_SIMPLE_SHAPE_PHANTOM_WRITE -} - -string bhkSimpleShapePhantom::asString( bool verbose ) const { - BHK_SIMPLE_SHAPE_PHANTOM_STRING -} - -void bhkSimpleShapePhantom::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SIMPLE_SHAPE_PHANTOM_FIXLINKS -} - -list<NiObjectRef> bhkSimpleShapePhantom::GetRefs() const { - BHK_SIMPLE_SHAPE_PHANTOM_GETREFS -} - -const Type & bhkSimpleShapePhantom::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkSimpleShapePhantom.h b/NifExport/niflib/obj/bhkSimpleShapePhantom.h deleted file mode 100755 index a21f051..0000000 --- a/NifExport/niflib/obj/bhkSimpleShapePhantom.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSIMPLESHAPEPHANTOM_H_ -#define _BHKSIMPLESHAPEPHANTOM_H_ - -#include "bhkEntity.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkSimpleShapePhantom; -typedef Ref<bhkSimpleShapePhantom> bhkSimpleShapePhantomRef; - -/*! - * bhkSimpleShapePhantom - Unknown shape. - */ - -class NIFLIB_API bhkSimpleShapePhantom : public BHK_SIMPLE_SHAPE_PHANTOM_PARENT { -public: - bhkSimpleShapePhantom(); - ~bhkSimpleShapePhantom(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_SIMPLE_SHAPE_PHANTOM_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkSphereRepShape.cpp b/NifExport/niflib/obj/bhkSphereRepShape.cpp deleted file mode 100755 index d6353be..0000000 --- a/NifExport/niflib/obj/bhkSphereRepShape.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkSphereRepShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkSphereRepShape::TYPE("bhkSphereRepShape", &BHK_SPHERE_REP_SHAPE_PARENT::TypeConst() ); - -bhkSphereRepShape::bhkSphereRepShape() BHK_SPHERE_REP_SHAPE_CONSTRUCT {} - -bhkSphereRepShape::~bhkSphereRepShape() {} - -void bhkSphereRepShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SPHERE_REP_SHAPE_READ -} - -void bhkSphereRepShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_SPHERE_REP_SHAPE_WRITE -} - -string bhkSphereRepShape::asString( bool verbose ) const { - BHK_SPHERE_REP_SHAPE_STRING -} - -void bhkSphereRepShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SPHERE_REP_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkSphereRepShape::GetRefs() const { - BHK_SPHERE_REP_SHAPE_GETREFS -} - -const Type & bhkSphereRepShape::GetType() const { - return TYPE; -}; - -void bhkSphereRepShape::SetMaterial(int m) -{ - material = m; -} diff --git a/NifExport/niflib/obj/bhkSphereRepShape.h b/NifExport/niflib/obj/bhkSphereRepShape.h deleted file mode 100755 index 5ccfdfc..0000000 --- a/NifExport/niflib/obj/bhkSphereRepShape.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSPHEREREPSHAPE_H_ -#define _BHKSPHEREREPSHAPE_H_ - -#include "bhkShape.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class bhkSphereRepShape; -typedef Ref<bhkSphereRepShape> bhkSphereRepShapeRef; - -/*! - * bhkSphereRepShape - A havok shape, perhaps with a bounding sphere for - * quick rejection in addition to more detailed shape data? - */ - -class NIFLIB_API bhkSphereRepShape : public BHK_SPHERE_REP_SHAPE_PARENT { -public: - bhkSphereRepShape(); - ~bhkSphereRepShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetMaterial(int m); - -protected: - BHK_SPHERE_REP_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkSphereShape.cpp b/NifExport/niflib/obj/bhkSphereShape.cpp deleted file mode 100755 index 9325778..0000000 --- a/NifExport/niflib/obj/bhkSphereShape.cpp +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkSphereShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkSphereShape::TYPE("bhkSphereShape", &BHK_SPHERE_SHAPE_PARENT::TypeConst() ); - -bhkSphereShape::bhkSphereShape() BHK_SPHERE_SHAPE_CONSTRUCT {} - -bhkSphereShape::~bhkSphereShape() {} - -void bhkSphereShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SPHERE_SHAPE_READ -} - -void bhkSphereShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_SPHERE_SHAPE_WRITE -} - -string bhkSphereShape::asString( bool verbose ) const { - BHK_SPHERE_SHAPE_STRING -} - -void bhkSphereShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_SPHERE_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkSphereShape::GetRefs() const { - BHK_SPHERE_SHAPE_GETREFS -} - -const Type & bhkSphereShape::GetType() const { - return TYPE; -}; - -void bhkSphereShape::SetRadius(float f) { - radius = f; -} - diff --git a/NifExport/niflib/obj/bhkSphereShape.h b/NifExport/niflib/obj/bhkSphereShape.h deleted file mode 100755 index 1cf1838..0000000 --- a/NifExport/niflib/obj/bhkSphereShape.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSPHERESHAPE_H_ -#define _BHKSPHERESHAPE_H_ - -#include "bhkConvexShape.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class bhkSphereShape; -typedef Ref<bhkSphereShape> bhkSphereShapeRef; - -/*! - * bhkSphereShape - A sphere. - */ - -class NIFLIB_API bhkSphereShape : public BHK_SPHERE_SHAPE_PARENT { -public: - bhkSphereShape(); - ~bhkSphereShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - - void SetRadius(float f); - -protected: - BHK_SPHERE_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkStiffSpringConstraint.cpp b/NifExport/niflib/obj/bhkStiffSpringConstraint.cpp deleted file mode 100755 index 4d8d02c..0000000 --- a/NifExport/niflib/obj/bhkStiffSpringConstraint.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkStiffSpringConstraint.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkStiffSpringConstraint::TYPE("bhkStiffSpringConstraint", &BHK_STIFF_SPRING_CONSTRAINT_PARENT::TypeConst() ); - -bhkStiffSpringConstraint::bhkStiffSpringConstraint() BHK_STIFF_SPRING_CONSTRAINT_CONSTRUCT {} - -bhkStiffSpringConstraint::~bhkStiffSpringConstraint() {} - -void bhkStiffSpringConstraint::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_STIFF_SPRING_CONSTRAINT_READ -} - -void bhkStiffSpringConstraint::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_STIFF_SPRING_CONSTRAINT_WRITE -} - -string bhkStiffSpringConstraint::asString( bool verbose ) const { - BHK_STIFF_SPRING_CONSTRAINT_STRING -} - -void bhkStiffSpringConstraint::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_STIFF_SPRING_CONSTRAINT_FIXLINKS -} - -list<NiObjectRef> bhkStiffSpringConstraint::GetRefs() const { - BHK_STIFF_SPRING_CONSTRAINT_GETREFS -} - -const Type & bhkStiffSpringConstraint::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkStiffSpringConstraint.h b/NifExport/niflib/obj/bhkStiffSpringConstraint.h deleted file mode 100755 index df32210..0000000 --- a/NifExport/niflib/obj/bhkStiffSpringConstraint.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKSTIFFSPRINGCONSTRAINT_H_ -#define _BHKSTIFFSPRINGCONSTRAINT_H_ - -#include "AbhkConstraint.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkStiffSpringConstraint; -typedef Ref<bhkStiffSpringConstraint> bhkStiffSpringConstraintRef; - -/*! - * bhkStiffSpringConstraint - A spring constraint. - */ - -class NIFLIB_API bhkStiffSpringConstraint : public BHK_STIFF_SPRING_CONSTRAINT_PARENT { -public: - bhkStiffSpringConstraint(); - ~bhkStiffSpringConstraint(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_STIFF_SPRING_CONSTRAINT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkTransformShape.cpp b/NifExport/niflib/obj/bhkTransformShape.cpp deleted file mode 100755 index c3086cb..0000000 --- a/NifExport/niflib/obj/bhkTransformShape.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkTransformShape.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkTransformShape::TYPE("bhkTransformShape", &BHK_TRANSFORM_SHAPE_PARENT::TypeConst() ); - -bhkTransformShape::bhkTransformShape() BHK_TRANSFORM_SHAPE_CONSTRUCT {} - -bhkTransformShape::~bhkTransformShape() {} - -void bhkTransformShape::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_TRANSFORM_SHAPE_READ -} - -void bhkTransformShape::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_TRANSFORM_SHAPE_WRITE -} - -string bhkTransformShape::asString( bool verbose ) const { - BHK_TRANSFORM_SHAPE_STRING -} - -void bhkTransformShape::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_TRANSFORM_SHAPE_FIXLINKS -} - -list<NiObjectRef> bhkTransformShape::GetRefs() const { - BHK_TRANSFORM_SHAPE_GETREFS -} - -const Type & bhkTransformShape::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkTransformShape.h b/NifExport/niflib/obj/bhkTransformShape.h deleted file mode 100755 index 9424b98..0000000 --- a/NifExport/niflib/obj/bhkTransformShape.h +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKTRANSFORMSHAPE_H_ -#define _BHKTRANSFORMSHAPE_H_ - -#include "bhkEntity.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class bhkTransformShape; -typedef Ref<bhkTransformShape> bhkTransformShapeRef; - -/*! - * bhkTransformShape - Transforms a shape. - */ - -class NIFLIB_API bhkTransformShape : public BHK_TRANSFORM_SHAPE_PARENT { -public: - bhkTransformShape(); - ~bhkTransformShape(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_TRANSFORM_SHAPE_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/bhkWorldObject.cpp b/NifExport/niflib/obj/bhkWorldObject.cpp deleted file mode 100755 index 199c511..0000000 --- a/NifExport/niflib/obj/bhkWorldObject.cpp +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "bhkWorldObject.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type bhkWorldObject::TYPE("bhkWorldObject", &BHK_WORLD_OBJECT_PARENT::TypeConst() ); - -bhkWorldObject::bhkWorldObject() BHK_WORLD_OBJECT_CONSTRUCT {} - -bhkWorldObject::~bhkWorldObject() {} - -void bhkWorldObject::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_WORLD_OBJECT_READ -} - -void bhkWorldObject::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - BHK_WORLD_OBJECT_WRITE -} - -string bhkWorldObject::asString( bool verbose ) const { - BHK_WORLD_OBJECT_STRING -} - -void bhkWorldObject::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - BHK_WORLD_OBJECT_FIXLINKS -} - -list<NiObjectRef> bhkWorldObject::GetRefs() const { - BHK_WORLD_OBJECT_GETREFS -} - -const Type & bhkWorldObject::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/bhkWorldObject.h b/NifExport/niflib/obj/bhkWorldObject.h deleted file mode 100755 index 6e344c3..0000000 --- a/NifExport/niflib/obj/bhkWorldObject.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _BHKWORLDOBJECT_H_ -#define _BHKWORLDOBJECT_H_ - -#include "bhkShape.h" -namespace Niflib { - -#include "../gen/obj_defines.h" - -class bhkWorldObject; -typedef Ref<bhkWorldObject> bhkWorldObjectRef; - -/*! - * bhkWorldObject - Havok objects that have a position in the world? - */ - -class NIFLIB_API bhkWorldObject : public BHK_WORLD_OBJECT_PARENT { -public: - bhkWorldObject(); - ~bhkWorldObject(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - BHK_WORLD_OBJECT_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/obj/hkPackedNiTriStripsData.cpp b/NifExport/niflib/obj/hkPackedNiTriStripsData.cpp deleted file mode 100755 index d6178b0..0000000 --- a/NifExport/niflib/obj/hkPackedNiTriStripsData.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#include "hkPackedNiTriStripsData.h" -#include "../gen/hkTriangle.h" -using namespace Niflib; - -//Definition of TYPE constant -const Type hkPackedNiTriStripsData::TYPE("hkPackedNiTriStripsData", &HK_PACKED_NI_TRI_STRIPS_DATA_PARENT::TypeConst() ); - -hkPackedNiTriStripsData::hkPackedNiTriStripsData() HK_PACKED_NI_TRI_STRIPS_DATA_CONSTRUCT {} - -hkPackedNiTriStripsData::~hkPackedNiTriStripsData() {} - -void hkPackedNiTriStripsData::Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - HK_PACKED_NI_TRI_STRIPS_DATA_READ -} - -void hkPackedNiTriStripsData::Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const { - HK_PACKED_NI_TRI_STRIPS_DATA_WRITE -} - -string hkPackedNiTriStripsData::asString( bool verbose ) const { - HK_PACKED_NI_TRI_STRIPS_DATA_STRING -} - -void hkPackedNiTriStripsData::FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ) { - HK_PACKED_NI_TRI_STRIPS_DATA_FIXLINKS -} - -list<NiObjectRef> hkPackedNiTriStripsData::GetRefs() const { - HK_PACKED_NI_TRI_STRIPS_DATA_GETREFS -} - -const Type & hkPackedNiTriStripsData::GetType() const { - return TYPE; -}; - diff --git a/NifExport/niflib/obj/hkPackedNiTriStripsData.h b/NifExport/niflib/obj/hkPackedNiTriStripsData.h deleted file mode 100755 index ea7013b..0000000 --- a/NifExport/niflib/obj/hkPackedNiTriStripsData.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. Please see niflib.h for licence. */ - -#ifndef _HKPACKEDNITRISTRIPSDATA_H_ -#define _HKPACKEDNITRISTRIPSDATA_H_ - -#include "AbhkShapeCollection.h" - -// Include structures -#include "../gen/hkTriangle.h" -namespace Niflib { - - -#include "../gen/obj_defines.h" - -class hkPackedNiTriStripsData; -typedef Ref<hkPackedNiTriStripsData> hkPackedNiTriStripsDataRef; - -/*! - * hkPackedNiTriStripsData - NiTriStripsData for havok data? - */ - -class NIFLIB_API hkPackedNiTriStripsData : public HK_PACKED_NI_TRI_STRIPS_DATA_PARENT { -public: - hkPackedNiTriStripsData(); - ~hkPackedNiTriStripsData(); - //Run-Time Type Information - static const Type & TypeConst() { return TYPE; } -private: - static const Type TYPE; -public: - virtual void Read( istream& in, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual void Write( ostream& out, map<NiObjectRef,uint> link_map, unsigned int version, unsigned int user_version ) const; - virtual string asString( bool verbose = false ) const; - virtual void FixLinks( const vector<NiObjectRef> & objects, list<uint> & link_stack, unsigned int version, unsigned int user_version ); - virtual list<NiObjectRef> GetRefs() const; - virtual const Type & GetType() const; - -protected: - HK_PACKED_NI_TRI_STRIPS_DATA_MEMBERS - STANDARD_INTERNAL_METHODS -}; - -} -#endif diff --git a/NifExport/niflib/pch.cpp b/NifExport/niflib/pch.cpp deleted file mode 100755 index 99a8091..0000000 --- a/NifExport/niflib/pch.cpp +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/NifExport/niflib/pch.h b/NifExport/niflib/pch.h deleted file mode 100755 index f2b1d84..0000000 --- a/NifExport/niflib/pch.h +++ /dev/null @@ -1,256 +0,0 @@ -//Headers to pre-compile - - - -#include "dll_export.h" -#include "NIF_IO.h" -#include "nif_math.h" -#include "niflib.h" -#include "Ref.h" -#include "Type.h" - -#include "gen/AVObject.h" -#include "gen/BoundingBox.h" -#include "gen/ByteArray.h" -#include "gen/ControllerLink.h" -#include "gen/Footer.h" -#include "gen/FurniturePosition.h" -#include "gen/Header.h" -#include "gen/hkTriangle.h" -#include "gen/KeyGroup.h" -#include "gen/LimitedHingeDescriptor.h" -#include "gen/LODRange.h" -#include "gen/MatchGroup.h" -#include "gen/MipMap.h" -#include "gen/Morph.h" -#include "gen/NodeGroup.h" -#include "gen/obj_defines.h" -#include "gen/Particle.h" -#include "gen/QuaternionXYZW.h" -#include "gen/RagDollDescriptor.h" -#include "gen/RotationKeyArray.h" -#include "gen/ShaderTexDesc.h" -#include "gen/SkinData.h" -#include "gen/SkinPartition.h" -#include "gen/SkinShape.h" -#include "gen/SkinShapeGroup.h" -#include "gen/SkinWeight.h" -#include "gen/StringPalette.h" -#include "gen/TBC.h" -#include "gen/TexDesc.h" -#include "gen/TexSource.h" - -//Only pre-compile generated headers -//#include "obj/AbhkConstraint.h" -//#include "obj/AbhkRagdollConstraint.h" -//#include "obj/AbhkShapeCollection.h" -//#include "obj/ABoneLODController.h" -//#include "obj/AKeyedData.h" -//#include "obj/AParticleModifier.h" -//#include "obj/APSysCtlr.h" -//#include "obj/APSysData.h" -//#include "obj/AvoidNode.h" -//#include "obj/bhkBlendCollisionObject.h" -//#include "obj/bhkBlendController.h" -//#include "obj/bhkBoxShape.h" -//#include "obj/bhkCapsuleShape.h" -//#include "obj/bhkCollisionObject.h" -//#include "obj/bhkConvexShape.h" -//#include "obj/bhkConvexTransformShape.h" -//#include "obj/bhkConvexVerticesShape.h" -//#include "obj/bhkEntity.h" -//#include "obj/bhkHingeConstraint.h" -//#include "obj/bhkLimitedHingeConstraint.h" -//#include "obj/bhkListShape.h" -//#include "obj/bhkMalleableConstraint.h" -//#include "obj/bhkMoppBvTreeShape.h" -//#include "obj/bhkMultiSphereShape.h" -//#include "obj/bhkNiTriStripsShape.h" -//#include "obj/bhkPackedNiTriStripsShape.h" -//#include "obj/bhkPrismaticConstraint.h" -//#include "obj/bhkRagdollConstraint.h" -//#include "obj/bhkRefObject.h" -//#include "obj/bhkRigidBody.h" -//#include "obj/bhkRigidBodyT.h" -//#include "obj/bhkSerializable.h" -//#include "obj/bhkShape.h" -//#include "obj/bhkSimpleShapePhantom.h" -//#include "obj/bhkSPCollisionObject.h" -//#include "obj/bhkSphereRepShape.h" -//#include "obj/bhkSphereShape.h" -//#include "obj/bhkStiffSpringConstraint.h" -//#include "obj/bhkTransformShape.h" -//#include "obj/bhkWorldObject.h" -//#include "obj/BSBound.h" -//#include "obj/BSFurnitureMarker.h" -//#include "obj/BSKeyframeController.h" -//#include "obj/BSParentVelocityModifier.h" -//#include "obj/BSPSysArrayEmitter.h" -//#include "obj/BSXFlags.h" -//#include "obj/FxButton.h" -//#include "obj/FxRadioButton.h" -//#include "obj/FxWidget.h" -//#include "obj/hkPackedNiTriStripsData.h" -//#include "obj/NiAlphaController.h" -//#include "obj/NiAlphaProperty.h" -//#include "obj/NiAmbientLight.h" -//#include "obj/NiAutoNormalParticles.h" -//#include "obj/NiAutoNormalParticlesData.h" -//#include "obj/NiAVObject.h" -//#include "obj/NiBillboardNode.h" -//#include "obj/NiBinaryExtraData.h" -//#include "obj/NiBlendBoolInterpolator.h" -//#include "obj/NiBlendFloatInterpolator.h" -//#include "obj/NiBlendInterpolator.h" -//#include "obj/NiBlendPoint3Interpolator.h" -//#include "obj/NiBlendTransformInterpolator.h" -//#include "obj/NiBoneLODController.h" -//#include "obj/NiBoolData.h" -//#include "obj/NiBooleanExtraData.h" -//#include "obj/NiBoolInterpolator.h" -//#include "obj/NiBoolTimelineInterpolator.h" -//#include "obj/NiBSAnimationNode.h" -//#include "obj/NiBSBoneLODController.h" -//#include "obj/NiBSPArrayController.h" -//#include "obj/NiBSParticleNode.h" -//#include "obj/NiBSplineBasisData.h" -//#include "obj/NiBSplineCompFloatInterpolator.h" -//#include "obj/NiBSplineCompPoint3Interpolator.h" -//#include "obj/NiBSplineCompTransformInterpolator.h" -//#include "obj/NiBSplineData.h" -//#include "obj/NiBSplineInterpolator.h" -//#include "obj/NiCamera.h" -//#include "obj/NiCollisionData.h" -//#include "obj/NiCollisionObject.h" -//#include "obj/NiColorData.h" -//#include "obj/NiColorExtraData.h" -//#include "obj/NiControllerManager.h" -//#include "obj/NiControllerSequence.h" -//#include "obj/NiDefaultAVObjectPalette.h" -//#include "obj/NiDirectionalLight.h" -//#include "obj/NiDitherProperty.h" -//#include "obj/NiDynamicEffect.h" -//#include "obj/NiExtraData.h" -//#include "obj/NiFlipController.h" -//#include "obj/NiFloatData.h" -//#include "obj/NiFloatExtraData.h" -//#include "obj/NiFloatExtraDataController.h" -//#include "obj/NiFloatInterpolator.h" -//#include "obj/NiFloatsExtraData.h" -//#include "obj/NiFogProperty.h" -//#include "obj/NiGeomMorpherController.h" -//#include "obj/NiGravity.h" -//#include "obj/NiIntegerExtraData.h" -//#include "obj/NiIntegersExtraData.h" -//#include "obj/NiInterpolator.h" -//#include "obj/NiKeyframeController.h" -//#include "obj/NiKeyframeData.h" -//#include "obj/NiLight.h" -//#include "obj/NiLightColorController.h" -//#include "obj/NiLightDimmerController.h" -//#include "obj/NiLODNode.h" -//#include "obj/NiLookAtController.h" -//#include "obj/NiLookAtInterpolator.h" -//#include "obj/NiMaterialColorController.h" -//#include "obj/NiMaterialProperty.h" -//#include "obj/NiMeshParticleSystem.h" -//#include "obj/NiMeshPSysData.h" -//#include "obj/NiMorphData.h" -//#include "obj/NiMultiTargetTransformController.h" -//#include "obj/NiNode.h" -//#include "obj/NiObject.h" -//#include "obj/NiObjectNET.h" -//#include "obj/NiPalette.h" -//#include "obj/NiParticleBomb.h" -//#include "obj/NiParticleColorModifier.h" -//#include "obj/NiParticleGrowFade.h" -//#include "obj/NiParticleMeshes.h" -//#include "obj/NiParticleMeshesData.h" -//#include "obj/NiParticleMeshModifier.h" -//#include "obj/NiParticleRotation.h" -//#include "obj/NiParticles.h" -//#include "obj/NiParticlesData.h" -//#include "obj/NiParticleSystem.h" -//#include "obj/NiParticleSystemController.h" -//#include "obj/NiPathController.h" -//#include "obj/NiPathInterpolator.h" -//#include "obj/NiPixelData.h" -//#include "obj/NiPlanarCollider.h" -//#include "obj/NiPoint3Interpolator.h" -//#include "obj/NiPointLight.h" -//#include "obj/NiPosData.h" -//#include "obj/NiProperty.h" -//#include "obj/NiPSysAgeDeathModifier.h" -//#include "obj/NiPSysBombModifier.h" -//#include "obj/NiPSysBoundUpdateModifier.h" -//#include "obj/NiPSysBoxEmitter.h" -//#include "obj/NiPSysColliderManager.h" -//#include "obj/NiPSysColorModifier.h" -//#include "obj/NiPSysCylinderEmitter.h" -//#include "obj/NiPSysData.h" -//#include "obj/NiPSysDragModifier.h" -//#include "obj/NiPSysEmitter.h" -//#include "obj/NiPSysEmitterCtlr.h" -//#include "obj/NiPSysEmitterCtlrData.h" -//#include "obj/NiPSysEmitterDeclinationCtlr.h" -//#include "obj/NiPSysEmitterDeclinationVarCtlr.h" -//#include "obj/NiPSysEmitterInitialRadiusCtlr.h" -//#include "obj/NiPSysEmitterLifeSpanCtlr.h" -//#include "obj/NiPSysEmitterSpeedCtlr.h" -//#include "obj/NiPSysGravityModifier.h" -//#include "obj/NiPSysGravityStrengthCtlr.h" -//#include "obj/NiPSysGrowFadeModifier.h" -//#include "obj/NiPSysMeshEmitter.h" -//#include "obj/NiPSysMeshUpdateModifier.h" -//#include "obj/NiPSysModifier.h" -//#include "obj/NiPSysModifierActiveCtlr.h" -//#include "obj/NiPSysPlanarCollider.h" -//#include "obj/NiPSysPositionModifier.h" -//#include "obj/NiPSysResetOnLoopCtlr.h" -//#include "obj/NiPSysRotationModifier.h" -//#include "obj/NiPSysSpawnModifier.h" -//#include "obj/NiPSysSphereEmitter.h" -//#include "obj/NiPSysUpdateCtlr.h" -//#include "obj/NiPSysVolumeEmitter.h" -//#include "obj/NiRangeLODData.h" -//#include "obj/NiRotatingParticles.h" -//#include "obj/NiRotatingParticlesData.h" -//#include "obj/NiScreenLODData.h" -//#include "obj/NiSequenceStreamHelper.h" -//#include "obj/NiShadeProperty.h" -//#include "obj/NiSingleInterpolatorController.h" -//#include "obj/NiSkinData.h" -//#include "obj/NiSkinInstance.h" -//#include "obj/NiSkinPartition.h" -//#include "obj/NiSourceTexture.h" -//#include "obj/NiSpecularProperty.h" -//#include "obj/NiSphericalCollider.h" -//#include "obj/NiSpotLight.h" -//#include "obj/NiStencilProperty.h" -//#include "obj/NiStringExtraData.h" -//#include "obj/NiStringPalette.h" -//#include "obj/NiStringsExtraData.h" -//#include "obj/NiTextKeyExtraData.h" -//#include "obj/NiTextureEffect.h" -//#include "obj/NiTextureTransformController.h" -//#include "obj/NiTexturingProperty.h" -//#include "obj/NiTimeController.h" -//#include "obj/NiTransformController.h" -//#include "obj/NiTransformData.h" -//#include "obj/NiTransformInterpolator.h" -//#include "obj/NiTriBasedGeom.h" -//#include "obj/NiTriBasedGeomData.h" -//#include "obj/NiTriShape.h" -//#include "obj/NiTriShapeData.h" -//#include "obj/NiTriStrips.h" -//#include "obj/NiTriStripsData.h" -//#include "obj/NiUVController.h" -//#include "obj/NiUVData.h" -//#include "obj/NiVectorExtraData.h" -//#include "obj/NiVertexColorProperty.h" -//#include "obj/NiVertWeightsExtraData.h" -//#include "obj/NiVisController.h" -//#include "obj/NiVisData.h" -//#include "obj/NiWireframeProperty.h" -//#include "obj/NiZBufferProperty.h" -//#include "obj/RootCollisionNode.h" \ No newline at end of file diff --git a/NifExport/niflib/py_niflib.vcproj b/NifExport/niflib/py_niflib.vcproj deleted file mode 100755 index 0d53633..0000000 --- a/NifExport/niflib/py_niflib.vcproj +++ /dev/null @@ -1,398 +0,0 @@ -<?xml version="1.0" encoding="Windows-1252"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="8.00" - Name="PyNiflib" - ProjectGUID="{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}" - RootNamespace="PyNiflib" - Keyword="Win32Proj" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory="../Debug" - IntermediateDirectory="../Debug" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="true" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalDependencies="niflib.lib" - OutputFile="..\bin\_niflib.dll" - LinkIncremental="2" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/PyNiflib.pdb" - SubSystem="1" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory="..\Release" - IntermediateDirectory="..\Release" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - AdditionalOptions="/bigobj" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="0" - UsePrecompiledHeader="0" - WarningLevel="0" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="niflib.lib" - OutputFile="../bin/_niflib.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="PyNiflib|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="0" - UsePrecompiledHeader="0" - WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="../NIFlib/Release/NIFlib.lib" - OutputFile="$(OutDir)/_niflib.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release - DLL|Win32" - OutputDirectory="$(ConfigurationName)" - IntermediateDirectory="$(ConfigurationName)" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> - <Tool - Name="VCCLCompilerTool" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="0" - UsePrecompiledHeader="0" - WarningLevel="0" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="niflib.lib" - OutputFile="../bin/_niflib.dll" - LinkIncremental="1" - GenerateDebugInformation="true" - SubSystem="1" - OptimizeReferences="2" - EnableCOMDATFolding="2" - TargetMachine="1" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCWebDeploymentTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - <ProjectReference - ReferencedProjectIdentifier="{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}" - /> - </References> - <Files> - <Filter - Name="Source Files" - Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" - > - <File - RelativePath=".\py_wrap.cpp" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" - > - </Filter> - <Filter - Name="Resource Files" - Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" - > - <File - RelativePath=".\pyniflib.i" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCustomBuildTool" - Description="Running SWIG..." - CommandLine="swig -c++ -python -outdir "..\bin" -o py_wrap.cpp pyniflib.i
" - AdditionalDependencies="" - Outputs="py_wrap.cpp" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCustomBuildTool" - Description="Running SWIG..." - CommandLine="swig -c++ -python -outdir "..\bin" -o py_wrap.cpp pyniflib.i
" - AdditionalDependencies="niflib.h" - Outputs="py_wrap.cpp" - /> - </FileConfiguration> - <FileConfiguration - Name="Release - DLL|Win32" - > - <Tool - Name="VCCustomBuildTool" - Description="Running SWIG..." - CommandLine="swig -c++ -python -outdir "..\bin" -o py_wrap.cpp pyniflib.i
" - AdditionalDependencies="niflib.h" - Outputs="py_wrap.cpp" - /> - </FileConfiguration> - </File> - </Filter> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/NifExport/niflib/pyniflib.i b/NifExport/niflib/pyniflib.i deleted file mode 100755 index e6d7772..0000000 --- a/NifExport/niflib/pyniflib.i +++ /dev/null @@ -1,1257 +0,0 @@ -// Swig module description file for a C dynamic library source file -// Generate with: swig -c++ -python -o py_wrap.cpp pyniflib.i - -/* Copyright (c) 2006, NIF File Format Library and Tools -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - * Neither the name of the NIF File Format Library and Tools - project nor the names of its contributors may be used to endorse - or promote products derived from this software without specific - prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. */ - -%module niflib -%include "stl.i" -%include "std_map.i" -%include "exception.i" -%include "std_list.i" -%include "typemaps.i" - -// enable string assignment in structure member functions -%typemap(in) std::string* ($*1_ltype tempstr) { - char * temps; int templ; - if (PyString_AsStringAndSize($input, &temps, &templ)) return NULL; - tempstr = $*1_ltype(temps, templ); - $1 = &tempstr; -} -%typemap(out) std::string* "$result = PyString_FromStringAndSize($1->data(), $1->length());"; - -// we need a version of SWIG that has SWIG_CATCH_STDEXCEPT support -#if SWIG_VERSION >= 0x010322 -%exception { - try { - $action - } - SWIG_CATCH_STDEXCEPT // catch std::exception - catch (...) { - SWIG_exception(SWIG_UnknownError, "Unknown exception"); - } -} -#endif - -// we need to define this because the wrapper gets confused about NIFLIB_API'd functions otherwise -#define NIFLIB_API -#define NIFLIB_HIDDEN - -//Ignore the const versions of these functions -%ignore DynamicCast( const NiObject * object ); -%ignore StaticCast (const NiObject * object); - -//Do not use smart pointer support as it doubles the size of the library -//and makes it take twice as long to be imported -%ignore Ref::operator->; -%ignore Ref::operator=; - -// we need this to get all the defines in there -%include "gen/obj_defines.h" -%{ - #include "niflib.h" - #include "Ref.h" - #include "Type.h" - #include "nif_math.h" - #include "obj/NiObject.h" - #include "obj/AKeyedData.h" - #include "obj/AParticleModifier.h" - #include "obj/bhkRefObject.h" - #include "obj/bhkSerializable.h" - #include "obj/AbhkConstraint.h" - #include "obj/AbhkRagdollConstraint.h" - #include "obj/bhkShape.h" - #include "obj/AbhkShapeCollection.h" - #include "obj/bhkSphereRepShape.h" - #include "obj/bhkConvexShape.h" - #include "obj/bhkWorldObject.h" - #include "obj/bhkEntity.h" - #include "obj/NiCollisionObject.h" - #include "obj/NiExtraData.h" - #include "obj/NiInterpolator.h" - #include "obj/NiBlendInterpolator.h" - #include "obj/NiBSplineInterpolator.h" - #include "obj/NiObjectNET.h" - #include "obj/NiAVObject.h" - #include "obj/NiDynamicEffect.h" - #include "obj/NiLight.h" - #include "obj/NiProperty.h" - #include "obj/NiPSysModifier.h" - #include "obj/NiPSysEmitter.h" - #include "obj/NiPSysVolumeEmitter.h" - #include "obj/NiTimeController.h" - #include "obj/ABoneLODController.h" - #include "obj/NiSingleInterpolatorController.h" - #include "obj/APSysCtlr.h" - #include "obj/NiTriBasedGeom.h" - #include "obj/NiTriBasedGeomData.h" - #include "obj/APSysData.h" - #include "obj/bhkBlendCollisionObject.h" - #include "obj/bhkBlendController.h" - #include "obj/bhkBoxShape.h" - #include "obj/bhkCapsuleShape.h" - #include "obj/bhkCollisionObject.h" - #include "obj/bhkConvexVerticesShape.h" - #include "obj/bhkHingeConstraint.h" - #include "obj/bhkLimitedHingeConstraint.h" - #include "obj/bhkListShape.h" - #include "obj/bhkMalleableConstraint.h" - #include "obj/bhkMoppBvTreeShape.h" - #include "obj/bhkMultiSphereShape.h" - #include "obj/bhkNiTriStripsShape.h" - #include "obj/bhkPackedNiTriStripsShape.h" - #include "obj/bhkPrismaticConstraint.h" - #include "obj/bhkRagdollConstraint.h" - #include "obj/bhkRigidBody.h" - #include "obj/bhkRigidBodyT.h" - #include "obj/bhkSimpleShapePhantom.h" - #include "obj/bhkSPCollisionObject.h" - #include "obj/bhkSphereShape.h" - #include "obj/bhkStiffSpringConstraint.h" - #include "obj/bhkTransformShape.h" - #include "obj/bhkConvexTransformShape.h" - #include "obj/BSBound.h" - #include "obj/BSFurnitureMarker.h" - #include "obj/BSParentVelocityModifier.h" - #include "obj/BSPSysArrayEmitter.h" - #include "obj/BSXFlags.h" - #include "obj/hkPackedNiTriStripsData.h" - #include "obj/NiAlphaController.h" - #include "obj/NiAlphaProperty.h" - #include "obj/NiAmbientLight.h" - #include "obj/NiAutoNormalParticlesData.h" - #include "obj/NiBinaryExtraData.h" - #include "obj/NiBlendBoolInterpolator.h" - #include "obj/NiBlendFloatInterpolator.h" - #include "obj/NiBlendPoint3Interpolator.h" - #include "obj/NiBlendTransformInterpolator.h" - #include "obj/NiBoneLODController.h" - #include "obj/NiBoolData.h" - #include "obj/NiBooleanExtraData.h" - #include "obj/NiBoolInterpolator.h" - #include "obj/NiBoolTimelineInterpolator.h" - #include "obj/NiBSBoneLODController.h" - #include "obj/NiBSplineBasisData.h" - #include "obj/NiBSplineCompFloatInterpolator.h" - #include "obj/NiBSplineCompPoint3Interpolator.h" - #include "obj/NiBSplineCompTransformInterpolator.h" - #include "obj/NiBSplineData.h" - #include "obj/NiCamera.h" - #include "obj/NiCollisionData.h" - #include "obj/NiColorData.h" - #include "obj/NiColorExtraData.h" - #include "obj/NiControllerManager.h" - #include "obj/NiControllerSequence.h" - #include "obj/NiDefaultAVObjectPalette.h" - #include "obj/NiDirectionalLight.h" - #include "obj/NiDitherProperty.h" - #include "obj/NiFlipController.h" - #include "obj/NiFloatData.h" - #include "obj/NiFloatExtraData.h" - #include "obj/NiFloatExtraDataController.h" - #include "obj/NiFloatInterpolator.h" - #include "obj/NiFloatsExtraData.h" - #include "obj/NiFogProperty.h" - #include "obj/NiGeomMorpherController.h" - #include "obj/NiGravity.h" - #include "obj/NiIntegerExtraData.h" - #include "obj/NiIntegersExtraData.h" - #include "obj/NiKeyframeController.h" - #include "obj/BSKeyframeController.h" - #include "obj/NiKeyframeData.h" - #include "obj/NiLightColorController.h" - #include "obj/NiLightDimmerController.h" - #include "obj/NiLookAtController.h" - #include "obj/NiLookAtInterpolator.h" - #include "obj/NiMaterialColorController.h" - #include "obj/NiMaterialProperty.h" - #include "obj/NiMeshPSysData.h" - #include "obj/NiMorphData.h" - #include "obj/NiMultiTargetTransformController.h" - #include "obj/NiNode.h" - #include "obj/AvoidNode.h" - #include "obj/FxWidget.h" - #include "obj/FxButton.h" - #include "obj/FxRadioButton.h" - #include "obj/NiBillboardNode.h" - #include "obj/NiBSAnimationNode.h" - #include "obj/NiBSParticleNode.h" - #include "obj/NiLODNode.h" - #include "obj/NiPalette.h" - #include "obj/NiParticleBomb.h" - #include "obj/NiParticleColorModifier.h" - #include "obj/NiParticleGrowFade.h" - #include "obj/NiParticleMeshModifier.h" - #include "obj/NiParticleRotation.h" - #include "obj/NiParticles.h" - #include "obj/NiAutoNormalParticles.h" - #include "obj/NiParticleMeshes.h" - #include "obj/NiParticlesData.h" - #include "obj/NiParticleMeshesData.h" - #include "obj/NiParticleSystem.h" - #include "obj/NiMeshParticleSystem.h" - #include "obj/NiParticleSystemController.h" - #include "obj/NiBSPArrayController.h" - #include "obj/NiPathController.h" - #include "obj/NiPathInterpolator.h" - #include "obj/NiPixelData.h" - #include "obj/NiPlanarCollider.h" - #include "obj/NiPoint3Interpolator.h" - #include "obj/NiPointLight.h" - #include "obj/NiPosData.h" - #include "obj/NiPSysAgeDeathModifier.h" - #include "obj/NiPSysBombModifier.h" - #include "obj/NiPSysBoundUpdateModifier.h" - #include "obj/NiPSysBoxEmitter.h" - #include "obj/NiPSysColliderManager.h" - #include "obj/NiPSysColorModifier.h" - #include "obj/NiPSysCylinderEmitter.h" - #include "obj/NiPSysData.h" - #include "obj/NiPSysDragModifier.h" - #include "obj/NiPSysEmitterCtlr.h" - #include "obj/NiPSysEmitterCtlrData.h" - #include "obj/NiPSysEmitterDeclinationCtlr.h" - #include "obj/NiPSysEmitterDeclinationVarCtlr.h" - #include "obj/NiPSysEmitterInitialRadiusCtlr.h" - #include "obj/NiPSysEmitterLifeSpanCtlr.h" - #include "obj/NiPSysEmitterSpeedCtlr.h" - #include "obj/NiPSysGravityModifier.h" - #include "obj/NiPSysGravityStrengthCtlr.h" - #include "obj/NiPSysGrowFadeModifier.h" - #include "obj/NiPSysMeshEmitter.h" - #include "obj/NiPSysMeshUpdateModifier.h" - #include "obj/NiPSysModifierActiveCtlr.h" - #include "obj/NiPSysPlanarCollider.h" - #include "obj/NiPSysPositionModifier.h" - #include "obj/NiPSysResetOnLoopCtlr.h" - #include "obj/NiPSysRotationModifier.h" - #include "obj/NiPSysSpawnModifier.h" - #include "obj/NiPSysSphereEmitter.h" - #include "obj/NiPSysUpdateCtlr.h" - #include "obj/NiRangeLODData.h" - #include "obj/NiRotatingParticles.h" - #include "obj/NiRotatingParticlesData.h" - #include "obj/NiScreenLODData.h" - #include "obj/NiSequenceStreamHelper.h" - #include "obj/NiShadeProperty.h" - #include "obj/NiSkinData.h" - #include "obj/NiSkinInstance.h" - #include "obj/NiSkinPartition.h" - #include "obj/NiSourceTexture.h" - #include "obj/NiSpecularProperty.h" - #include "obj/NiSphericalCollider.h" - #include "obj/NiSpotLight.h" - #include "obj/NiStencilProperty.h" - #include "obj/NiStringExtraData.h" - #include "obj/NiStringPalette.h" - #include "obj/NiStringsExtraData.h" - #include "obj/NiTextKeyExtraData.h" - #include "obj/NiTextureEffect.h" - #include "obj/NiTextureTransformController.h" - #include "obj/NiTexturingProperty.h" - #include "obj/NiTransformController.h" - #include "obj/NiTransformData.h" - #include "obj/NiTransformInterpolator.h" - #include "obj/NiTriShape.h" - #include "obj/NiTriShapeData.h" - #include "obj/NiTriStrips.h" - #include "obj/NiTriStripsData.h" - #include "obj/NiUVController.h" - #include "obj/NiUVData.h" - #include "obj/NiVectorExtraData.h" - #include "obj/NiVertexColorProperty.h" - #include "obj/NiVertWeightsExtraData.h" - #include "obj/NiVisController.h" - #include "obj/NiVisData.h" - #include "obj/NiWireframeProperty.h" - #include "obj/NiZBufferProperty.h" - #include "obj/RootCollisionNode.h" - #include "gen/ByteArray.h" - #include "gen/Footer.h" - #include "gen/LODRange.h" - #include "gen/MatchGroup.h" - #include "gen/MipMap.h" - #include "gen/NodeGroup.h" - #include "gen/QuaternionXYZW.h" - #include "gen/ShortString.h" - #include "gen/SkinShape.h" - #include "gen/SkinShapeGroup.h" - #include "gen/SkinWeight.h" - #include "gen/AVObject.h" - #include "gen/ControllerLink.h" - #include "gen/Header.h" - #include "gen/StringPalette.h" - #include "gen/TBC.h" - #include "gen/KeyGroup.h" - #include "gen/RotationKeyArray.h" - #include "gen/TexDesc.h" - #include "gen/ShaderTexDesc.h" - #include "gen/TexSource.h" - #include "gen/SkinPartition.h" - #include "gen/BoundingBox.h" - #include "gen/FurniturePosition.h" - #include "gen/hkTriangle.h" - #include "gen/Morph.h" - #include "gen/Particle.h" - #include "gen/SkinData.h" - #include "gen/RagDollDescriptor.h" - #include "gen/LimitedHingeDescriptor.h" -%} - - -// we need the definition of the template classes before we define the template Python names below -template <class T> -struct Key { - float time; - T data, forward_tangent, backward_tangent; - float tension, bias, continuity; -}; - -%ignore Key; -%template(vector_byte) std::vector<byte>; -%template(vector_ushort) std::vector<ushort>; -%template(vector_SkinShape) std::vector<SkinShape>; -%template(vector_string) std::vector<std::string>; -%template(vector_Triangle) std::vector<Triangle>; -%template(vector_Vector3) std::vector<Vector3>; -%template(vector_float) std::vector<float>; -%template(vector_SkinWeight) std::vector<SkinWeight>; -%template(vector_NodeGroup) std::vector<NodeGroup>; -%template(vector_Color4) std::vector<Color4>; -%template(vector_Float4) std::vector<Float4>; -%template(vector_uint) std::vector<uint>; -%template(vector_FurniturePosition) std::vector<FurniturePosition>; -%template(vector_hkTriangle) std::vector<hkTriangle>; -%template(vector_SkinShapeGroup) std::vector<SkinShapeGroup>; -%template(vector_ControllerLink) std::vector<ControllerLink>; -%template(vector_AVObject) std::vector<AVObject>; -%template(vector_Morph) std::vector<Morph>; -%template(vector_LODRange) std::vector<LODRange>; -%template(vector_Quaternion) std::vector<Quaternion>; -%template(vector_Particle) std::vector<Particle>; -%template(vector_MipMap) std::vector<MipMap>; -%template(vector_SkinData) std::vector<SkinData>; -%template(vector_SkinPartition) std::vector<SkinPartition>; -%template(vector_ShaderTexDesc) std::vector<ShaderTexDesc>; -%template(vector_MatchGroup) std::vector<MatchGroup>; -%template(pair_int_float) std::pair<int, float>; -%template(map_int_float) std::map<int, float>; - -%include "niflib.h" -%include "Ref.h" -%include "Type.h" -%include "nif_math.h" -%include "obj/NiObject.h" -%template(NiObjectRef) Ref<NiObject>; -%template(DynamicCastToNiObject) DynamicCast<NiObject>; -%template(StaticCastToNiObject) StaticCast<NiObject>; -%include "obj/AKeyedData.h" -%template(AKeyedDataRef) Ref<AKeyedData>; -%template(DynamicCastToAKeyedData) DynamicCast<AKeyedData>; -%template(StaticCastToAKeyedData) StaticCast<AKeyedData>; -%include "obj/AParticleModifier.h" -%template(AParticleModifierRef) Ref<AParticleModifier>; -%template(DynamicCastToAParticleModifier) DynamicCast<AParticleModifier>; -%template(StaticCastToAParticleModifier) StaticCast<AParticleModifier>; -%include "obj/bhkRefObject.h" -%template(bhkRefObjectRef) Ref<bhkRefObject>; -%template(DynamicCastTobhkRefObject) DynamicCast<bhkRefObject>; -%template(StaticCastTobhkRefObject) StaticCast<bhkRefObject>; -%include "obj/bhkSerializable.h" -%template(bhkSerializableRef) Ref<bhkSerializable>; -%template(DynamicCastTobhkSerializable) DynamicCast<bhkSerializable>; -%template(StaticCastTobhkSerializable) StaticCast<bhkSerializable>; -%include "obj/AbhkConstraint.h" -%template(AbhkConstraintRef) Ref<AbhkConstraint>; -%template(DynamicCastToAbhkConstraint) DynamicCast<AbhkConstraint>; -%template(StaticCastToAbhkConstraint) StaticCast<AbhkConstraint>; -%include "obj/AbhkRagdollConstraint.h" -%template(AbhkRagdollConstraintRef) Ref<AbhkRagdollConstraint>; -%template(DynamicCastToAbhkRagdollConstraint) DynamicCast<AbhkRagdollConstraint>; -%template(StaticCastToAbhkRagdollConstraint) StaticCast<AbhkRagdollConstraint>; -%include "obj/bhkShape.h" -%template(bhkShapeRef) Ref<bhkShape>; -%template(DynamicCastTobhkShape) DynamicCast<bhkShape>; -%template(StaticCastTobhkShape) StaticCast<bhkShape>; -%include "obj/AbhkShapeCollection.h" -%template(AbhkShapeCollectionRef) Ref<AbhkShapeCollection>; -%template(DynamicCastToAbhkShapeCollection) DynamicCast<AbhkShapeCollection>; -%template(StaticCastToAbhkShapeCollection) StaticCast<AbhkShapeCollection>; -%include "obj/bhkSphereRepShape.h" -%template(bhkSphereRepShapeRef) Ref<bhkSphereRepShape>; -%template(DynamicCastTobhkSphereRepShape) DynamicCast<bhkSphereRepShape>; -%template(StaticCastTobhkSphereRepShape) StaticCast<bhkSphereRepShape>; -%include "obj/bhkConvexShape.h" -%template(bhkConvexShapeRef) Ref<bhkConvexShape>; -%template(DynamicCastTobhkConvexShape) DynamicCast<bhkConvexShape>; -%template(StaticCastTobhkConvexShape) StaticCast<bhkConvexShape>; -%include "obj/bhkWorldObject.h" -%template(bhkWorldObjectRef) Ref<bhkWorldObject>; -%template(DynamicCastTobhkWorldObject) DynamicCast<bhkWorldObject>; -%template(StaticCastTobhkWorldObject) StaticCast<bhkWorldObject>; -%include "obj/bhkEntity.h" -%template(bhkEntityRef) Ref<bhkEntity>; -%template(DynamicCastTobhkEntity) DynamicCast<bhkEntity>; -%template(StaticCastTobhkEntity) StaticCast<bhkEntity>; -%include "obj/NiCollisionObject.h" -%template(NiCollisionObjectRef) Ref<NiCollisionObject>; -%template(DynamicCastToNiCollisionObject) DynamicCast<NiCollisionObject>; -%template(StaticCastToNiCollisionObject) StaticCast<NiCollisionObject>; -%include "obj/NiExtraData.h" -%template(NiExtraDataRef) Ref<NiExtraData>; -%template(DynamicCastToNiExtraData) DynamicCast<NiExtraData>; -%template(StaticCastToNiExtraData) StaticCast<NiExtraData>; -%include "obj/NiInterpolator.h" -%template(NiInterpolatorRef) Ref<NiInterpolator>; -%template(DynamicCastToNiInterpolator) DynamicCast<NiInterpolator>; -%template(StaticCastToNiInterpolator) StaticCast<NiInterpolator>; -%include "obj/NiBlendInterpolator.h" -%template(NiBlendInterpolatorRef) Ref<NiBlendInterpolator>; -%template(DynamicCastToNiBlendInterpolator) DynamicCast<NiBlendInterpolator>; -%template(StaticCastToNiBlendInterpolator) StaticCast<NiBlendInterpolator>; -%include "obj/NiBSplineInterpolator.h" -%template(NiBSplineInterpolatorRef) Ref<NiBSplineInterpolator>; -%template(DynamicCastToNiBSplineInterpolator) DynamicCast<NiBSplineInterpolator>; -%template(StaticCastToNiBSplineInterpolator) StaticCast<NiBSplineInterpolator>; -%include "obj/NiObjectNET.h" -%template(NiObjectNETRef) Ref<NiObjectNET>; -%template(DynamicCastToNiObjectNET) DynamicCast<NiObjectNET>; -%template(StaticCastToNiObjectNET) StaticCast<NiObjectNET>; -%include "obj/NiAVObject.h" -%template(NiAVObjectRef) Ref<NiAVObject>; -%template(DynamicCastToNiAVObject) DynamicCast<NiAVObject>; -%template(StaticCastToNiAVObject) StaticCast<NiAVObject>; -%include "obj/NiDynamicEffect.h" -%template(NiDynamicEffectRef) Ref<NiDynamicEffect>; -%template(DynamicCastToNiDynamicEffect) DynamicCast<NiDynamicEffect>; -%template(StaticCastToNiDynamicEffect) StaticCast<NiDynamicEffect>; -%include "obj/NiLight.h" -%template(NiLightRef) Ref<NiLight>; -%template(DynamicCastToNiLight) DynamicCast<NiLight>; -%template(StaticCastToNiLight) StaticCast<NiLight>; -%include "obj/NiProperty.h" -%template(NiPropertyRef) Ref<NiProperty>; -%template(DynamicCastToNiProperty) DynamicCast<NiProperty>; -%template(StaticCastToNiProperty) StaticCast<NiProperty>; -%include "obj/NiPSysModifier.h" -%template(NiPSysModifierRef) Ref<NiPSysModifier>; -%template(DynamicCastToNiPSysModifier) DynamicCast<NiPSysModifier>; -%template(StaticCastToNiPSysModifier) StaticCast<NiPSysModifier>; -%include "obj/NiPSysEmitter.h" -%template(NiPSysEmitterRef) Ref<NiPSysEmitter>; -%template(DynamicCastToNiPSysEmitter) DynamicCast<NiPSysEmitter>; -%template(StaticCastToNiPSysEmitter) StaticCast<NiPSysEmitter>; -%include "obj/NiPSysVolumeEmitter.h" -%template(NiPSysVolumeEmitterRef) Ref<NiPSysVolumeEmitter>; -%template(DynamicCastToNiPSysVolumeEmitter) DynamicCast<NiPSysVolumeEmitter>; -%template(StaticCastToNiPSysVolumeEmitter) StaticCast<NiPSysVolumeEmitter>; -%include "obj/NiTimeController.h" -%template(NiTimeControllerRef) Ref<NiTimeController>; -%template(DynamicCastToNiTimeController) DynamicCast<NiTimeController>; -%template(StaticCastToNiTimeController) StaticCast<NiTimeController>; -%include "obj/ABoneLODController.h" -%template(ABoneLODControllerRef) Ref<ABoneLODController>; -%template(DynamicCastToABoneLODController) DynamicCast<ABoneLODController>; -%template(StaticCastToABoneLODController) StaticCast<ABoneLODController>; -%include "obj/NiSingleInterpolatorController.h" -%template(NiSingleInterpolatorControllerRef) Ref<NiSingleInterpolatorController>; -%template(DynamicCastToNiSingleInterpolatorController) DynamicCast<NiSingleInterpolatorController>; -%template(StaticCastToNiSingleInterpolatorController) StaticCast<NiSingleInterpolatorController>; -%include "obj/APSysCtlr.h" -%template(APSysCtlrRef) Ref<APSysCtlr>; -%template(DynamicCastToAPSysCtlr) DynamicCast<APSysCtlr>; -%template(StaticCastToAPSysCtlr) StaticCast<APSysCtlr>; -%include "obj/NiTriBasedGeom.h" -%template(NiTriBasedGeomRef) Ref<NiTriBasedGeom>; -%template(DynamicCastToNiTriBasedGeom) DynamicCast<NiTriBasedGeom>; -%template(StaticCastToNiTriBasedGeom) StaticCast<NiTriBasedGeom>; -%include "obj/NiTriBasedGeomData.h" -%template(NiTriBasedGeomDataRef) Ref<NiTriBasedGeomData>; -%template(DynamicCastToNiTriBasedGeomData) DynamicCast<NiTriBasedGeomData>; -%template(StaticCastToNiTriBasedGeomData) StaticCast<NiTriBasedGeomData>; -%include "obj/APSysData.h" -%template(APSysDataRef) Ref<APSysData>; -%template(DynamicCastToAPSysData) DynamicCast<APSysData>; -%template(StaticCastToAPSysData) StaticCast<APSysData>; -%include "obj/bhkBlendCollisionObject.h" -%template(bhkBlendCollisionObjectRef) Ref<bhkBlendCollisionObject>; -%template(DynamicCastTobhkBlendCollisionObject) DynamicCast<bhkBlendCollisionObject>; -%template(StaticCastTobhkBlendCollisionObject) StaticCast<bhkBlendCollisionObject>; -%include "obj/bhkBlendController.h" -%template(bhkBlendControllerRef) Ref<bhkBlendController>; -%template(DynamicCastTobhkBlendController) DynamicCast<bhkBlendController>; -%template(StaticCastTobhkBlendController) StaticCast<bhkBlendController>; -%include "obj/bhkBoxShape.h" -%template(bhkBoxShapeRef) Ref<bhkBoxShape>; -%template(DynamicCastTobhkBoxShape) DynamicCast<bhkBoxShape>; -%template(StaticCastTobhkBoxShape) StaticCast<bhkBoxShape>; -%include "obj/bhkCapsuleShape.h" -%template(bhkCapsuleShapeRef) Ref<bhkCapsuleShape>; -%template(DynamicCastTobhkCapsuleShape) DynamicCast<bhkCapsuleShape>; -%template(StaticCastTobhkCapsuleShape) StaticCast<bhkCapsuleShape>; -%include "obj/bhkCollisionObject.h" -%template(bhkCollisionObjectRef) Ref<bhkCollisionObject>; -%template(DynamicCastTobhkCollisionObject) DynamicCast<bhkCollisionObject>; -%template(StaticCastTobhkCollisionObject) StaticCast<bhkCollisionObject>; -%include "obj/bhkConvexVerticesShape.h" -%template(bhkConvexVerticesShapeRef) Ref<bhkConvexVerticesShape>; -%template(DynamicCastTobhkConvexVerticesShape) DynamicCast<bhkConvexVerticesShape>; -%template(StaticCastTobhkConvexVerticesShape) StaticCast<bhkConvexVerticesShape>; -%include "obj/bhkHingeConstraint.h" -%template(bhkHingeConstraintRef) Ref<bhkHingeConstraint>; -%template(DynamicCastTobhkHingeConstraint) DynamicCast<bhkHingeConstraint>; -%template(StaticCastTobhkHingeConstraint) StaticCast<bhkHingeConstraint>; -%include "obj/bhkLimitedHingeConstraint.h" -%template(bhkLimitedHingeConstraintRef) Ref<bhkLimitedHingeConstraint>; -%template(DynamicCastTobhkLimitedHingeConstraint) DynamicCast<bhkLimitedHingeConstraint>; -%template(StaticCastTobhkLimitedHingeConstraint) StaticCast<bhkLimitedHingeConstraint>; -%include "obj/bhkListShape.h" -%template(bhkListShapeRef) Ref<bhkListShape>; -%template(DynamicCastTobhkListShape) DynamicCast<bhkListShape>; -%template(StaticCastTobhkListShape) StaticCast<bhkListShape>; -%include "obj/bhkMalleableConstraint.h" -%template(bhkMalleableConstraintRef) Ref<bhkMalleableConstraint>; -%template(DynamicCastTobhkMalleableConstraint) DynamicCast<bhkMalleableConstraint>; -%template(StaticCastTobhkMalleableConstraint) StaticCast<bhkMalleableConstraint>; -%include "obj/bhkMoppBvTreeShape.h" -%template(bhkMoppBvTreeShapeRef) Ref<bhkMoppBvTreeShape>; -%template(DynamicCastTobhkMoppBvTreeShape) DynamicCast<bhkMoppBvTreeShape>; -%template(StaticCastTobhkMoppBvTreeShape) StaticCast<bhkMoppBvTreeShape>; -%include "obj/bhkMultiSphereShape.h" -%template(bhkMultiSphereShapeRef) Ref<bhkMultiSphereShape>; -%template(DynamicCastTobhkMultiSphereShape) DynamicCast<bhkMultiSphereShape>; -%template(StaticCastTobhkMultiSphereShape) StaticCast<bhkMultiSphereShape>; -%include "obj/bhkNiTriStripsShape.h" -%template(bhkNiTriStripsShapeRef) Ref<bhkNiTriStripsShape>; -%template(DynamicCastTobhkNiTriStripsShape) DynamicCast<bhkNiTriStripsShape>; -%template(StaticCastTobhkNiTriStripsShape) StaticCast<bhkNiTriStripsShape>; -%include "obj/bhkPackedNiTriStripsShape.h" -%template(bhkPackedNiTriStripsShapeRef) Ref<bhkPackedNiTriStripsShape>; -%template(DynamicCastTobhkPackedNiTriStripsShape) DynamicCast<bhkPackedNiTriStripsShape>; -%template(StaticCastTobhkPackedNiTriStripsShape) StaticCast<bhkPackedNiTriStripsShape>; -%include "obj/bhkPrismaticConstraint.h" -%template(bhkPrismaticConstraintRef) Ref<bhkPrismaticConstraint>; -%template(DynamicCastTobhkPrismaticConstraint) DynamicCast<bhkPrismaticConstraint>; -%template(StaticCastTobhkPrismaticConstraint) StaticCast<bhkPrismaticConstraint>; -%include "obj/bhkRagdollConstraint.h" -%template(bhkRagdollConstraintRef) Ref<bhkRagdollConstraint>; -%template(DynamicCastTobhkRagdollConstraint) DynamicCast<bhkRagdollConstraint>; -%template(StaticCastTobhkRagdollConstraint) StaticCast<bhkRagdollConstraint>; -%include "obj/bhkRigidBody.h" -%template(bhkRigidBodyRef) Ref<bhkRigidBody>; -%template(DynamicCastTobhkRigidBody) DynamicCast<bhkRigidBody>; -%template(StaticCastTobhkRigidBody) StaticCast<bhkRigidBody>; -%include "obj/bhkRigidBodyT.h" -%template(bhkRigidBodyTRef) Ref<bhkRigidBodyT>; -%template(DynamicCastTobhkRigidBodyT) DynamicCast<bhkRigidBodyT>; -%template(StaticCastTobhkRigidBodyT) StaticCast<bhkRigidBodyT>; -%include "obj/bhkSimpleShapePhantom.h" -%template(bhkSimpleShapePhantomRef) Ref<bhkSimpleShapePhantom>; -%template(DynamicCastTobhkSimpleShapePhantom) DynamicCast<bhkSimpleShapePhantom>; -%template(StaticCastTobhkSimpleShapePhantom) StaticCast<bhkSimpleShapePhantom>; -%include "obj/bhkSPCollisionObject.h" -%template(bhkSPCollisionObjectRef) Ref<bhkSPCollisionObject>; -%template(DynamicCastTobhkSPCollisionObject) DynamicCast<bhkSPCollisionObject>; -%template(StaticCastTobhkSPCollisionObject) StaticCast<bhkSPCollisionObject>; -%include "obj/bhkSphereShape.h" -%template(bhkSphereShapeRef) Ref<bhkSphereShape>; -%template(DynamicCastTobhkSphereShape) DynamicCast<bhkSphereShape>; -%template(StaticCastTobhkSphereShape) StaticCast<bhkSphereShape>; -%include "obj/bhkStiffSpringConstraint.h" -%template(bhkStiffSpringConstraintRef) Ref<bhkStiffSpringConstraint>; -%template(DynamicCastTobhkStiffSpringConstraint) DynamicCast<bhkStiffSpringConstraint>; -%template(StaticCastTobhkStiffSpringConstraint) StaticCast<bhkStiffSpringConstraint>; -%include "obj/bhkTransformShape.h" -%template(bhkTransformShapeRef) Ref<bhkTransformShape>; -%template(DynamicCastTobhkTransformShape) DynamicCast<bhkTransformShape>; -%template(StaticCastTobhkTransformShape) StaticCast<bhkTransformShape>; -%include "obj/bhkConvexTransformShape.h" -%template(bhkConvexTransformShapeRef) Ref<bhkConvexTransformShape>; -%template(DynamicCastTobhkConvexTransformShape) DynamicCast<bhkConvexTransformShape>; -%template(StaticCastTobhkConvexTransformShape) StaticCast<bhkConvexTransformShape>; -%include "obj/BSBound.h" -%template(BSBoundRef) Ref<BSBound>; -%template(DynamicCastToBSBound) DynamicCast<BSBound>; -%template(StaticCastToBSBound) StaticCast<BSBound>; -%include "obj/BSFurnitureMarker.h" -%template(BSFurnitureMarkerRef) Ref<BSFurnitureMarker>; -%template(DynamicCastToBSFurnitureMarker) DynamicCast<BSFurnitureMarker>; -%template(StaticCastToBSFurnitureMarker) StaticCast<BSFurnitureMarker>; -%include "obj/BSParentVelocityModifier.h" -%template(BSParentVelocityModifierRef) Ref<BSParentVelocityModifier>; -%template(DynamicCastToBSParentVelocityModifier) DynamicCast<BSParentVelocityModifier>; -%template(StaticCastToBSParentVelocityModifier) StaticCast<BSParentVelocityModifier>; -%include "obj/BSPSysArrayEmitter.h" -%template(BSPSysArrayEmitterRef) Ref<BSPSysArrayEmitter>; -%template(DynamicCastToBSPSysArrayEmitter) DynamicCast<BSPSysArrayEmitter>; -%template(StaticCastToBSPSysArrayEmitter) StaticCast<BSPSysArrayEmitter>; -%include "obj/BSXFlags.h" -%template(BSXFlagsRef) Ref<BSXFlags>; -%template(DynamicCastToBSXFlags) DynamicCast<BSXFlags>; -%template(StaticCastToBSXFlags) StaticCast<BSXFlags>; -%include "obj/hkPackedNiTriStripsData.h" -%template(hkPackedNiTriStripsDataRef) Ref<hkPackedNiTriStripsData>; -%template(DynamicCastTohkPackedNiTriStripsData) DynamicCast<hkPackedNiTriStripsData>; -%template(StaticCastTohkPackedNiTriStripsData) StaticCast<hkPackedNiTriStripsData>; -%include "obj/NiAlphaController.h" -%template(NiAlphaControllerRef) Ref<NiAlphaController>; -%template(DynamicCastToNiAlphaController) DynamicCast<NiAlphaController>; -%template(StaticCastToNiAlphaController) StaticCast<NiAlphaController>; -%include "obj/NiAlphaProperty.h" -%template(NiAlphaPropertyRef) Ref<NiAlphaProperty>; -%template(DynamicCastToNiAlphaProperty) DynamicCast<NiAlphaProperty>; -%template(StaticCastToNiAlphaProperty) StaticCast<NiAlphaProperty>; -%include "obj/NiAmbientLight.h" -%template(NiAmbientLightRef) Ref<NiAmbientLight>; -%template(DynamicCastToNiAmbientLight) DynamicCast<NiAmbientLight>; -%template(StaticCastToNiAmbientLight) StaticCast<NiAmbientLight>; -%include "obj/NiAutoNormalParticlesData.h" -%template(NiAutoNormalParticlesDataRef) Ref<NiAutoNormalParticlesData>; -%template(DynamicCastToNiAutoNormalParticlesData) DynamicCast<NiAutoNormalParticlesData>; -%template(StaticCastToNiAutoNormalParticlesData) StaticCast<NiAutoNormalParticlesData>; -%include "obj/NiBinaryExtraData.h" -%template(NiBinaryExtraDataRef) Ref<NiBinaryExtraData>; -%template(DynamicCastToNiBinaryExtraData) DynamicCast<NiBinaryExtraData>; -%template(StaticCastToNiBinaryExtraData) StaticCast<NiBinaryExtraData>; -%include "obj/NiBlendBoolInterpolator.h" -%template(NiBlendBoolInterpolatorRef) Ref<NiBlendBoolInterpolator>; -%template(DynamicCastToNiBlendBoolInterpolator) DynamicCast<NiBlendBoolInterpolator>; -%template(StaticCastToNiBlendBoolInterpolator) StaticCast<NiBlendBoolInterpolator>; -%include "obj/NiBlendFloatInterpolator.h" -%template(NiBlendFloatInterpolatorRef) Ref<NiBlendFloatInterpolator>; -%template(DynamicCastToNiBlendFloatInterpolator) DynamicCast<NiBlendFloatInterpolator>; -%template(StaticCastToNiBlendFloatInterpolator) StaticCast<NiBlendFloatInterpolator>; -%include "obj/NiBlendPoint3Interpolator.h" -%template(NiBlendPoint3InterpolatorRef) Ref<NiBlendPoint3Interpolator>; -%template(DynamicCastToNiBlendPoint3Interpolator) DynamicCast<NiBlendPoint3Interpolator>; -%template(StaticCastToNiBlendPoint3Interpolator) StaticCast<NiBlendPoint3Interpolator>; -%include "obj/NiBlendTransformInterpolator.h" -%template(NiBlendTransformInterpolatorRef) Ref<NiBlendTransformInterpolator>; -%template(DynamicCastToNiBlendTransformInterpolator) DynamicCast<NiBlendTransformInterpolator>; -%template(StaticCastToNiBlendTransformInterpolator) StaticCast<NiBlendTransformInterpolator>; -%include "obj/NiBoneLODController.h" -%template(NiBoneLODControllerRef) Ref<NiBoneLODController>; -%template(DynamicCastToNiBoneLODController) DynamicCast<NiBoneLODController>; -%template(StaticCastToNiBoneLODController) StaticCast<NiBoneLODController>; -%include "obj/NiBoolData.h" -%template(NiBoolDataRef) Ref<NiBoolData>; -%template(DynamicCastToNiBoolData) DynamicCast<NiBoolData>; -%template(StaticCastToNiBoolData) StaticCast<NiBoolData>; -%include "obj/NiBooleanExtraData.h" -%template(NiBooleanExtraDataRef) Ref<NiBooleanExtraData>; -%template(DynamicCastToNiBooleanExtraData) DynamicCast<NiBooleanExtraData>; -%template(StaticCastToNiBooleanExtraData) StaticCast<NiBooleanExtraData>; -%include "obj/NiBoolInterpolator.h" -%template(NiBoolInterpolatorRef) Ref<NiBoolInterpolator>; -%template(DynamicCastToNiBoolInterpolator) DynamicCast<NiBoolInterpolator>; -%template(StaticCastToNiBoolInterpolator) StaticCast<NiBoolInterpolator>; -%include "obj/NiBoolTimelineInterpolator.h" -%template(NiBoolTimelineInterpolatorRef) Ref<NiBoolTimelineInterpolator>; -%template(DynamicCastToNiBoolTimelineInterpolator) DynamicCast<NiBoolTimelineInterpolator>; -%template(StaticCastToNiBoolTimelineInterpolator) StaticCast<NiBoolTimelineInterpolator>; -%include "obj/NiBSBoneLODController.h" -%template(NiBSBoneLODControllerRef) Ref<NiBSBoneLODController>; -%template(DynamicCastToNiBSBoneLODController) DynamicCast<NiBSBoneLODController>; -%template(StaticCastToNiBSBoneLODController) StaticCast<NiBSBoneLODController>; -%include "obj/NiBSplineBasisData.h" -%template(NiBSplineBasisDataRef) Ref<NiBSplineBasisData>; -%template(DynamicCastToNiBSplineBasisData) DynamicCast<NiBSplineBasisData>; -%template(StaticCastToNiBSplineBasisData) StaticCast<NiBSplineBasisData>; -%include "obj/NiBSplineCompFloatInterpolator.h" -%template(NiBSplineCompFloatInterpolatorRef) Ref<NiBSplineCompFloatInterpolator>; -%template(DynamicCastToNiBSplineCompFloatInterpolator) DynamicCast<NiBSplineCompFloatInterpolator>; -%template(StaticCastToNiBSplineCompFloatInterpolator) StaticCast<NiBSplineCompFloatInterpolator>; -%include "obj/NiBSplineCompPoint3Interpolator.h" -%template(NiBSplineCompPoint3InterpolatorRef) Ref<NiBSplineCompPoint3Interpolator>; -%template(DynamicCastToNiBSplineCompPoint3Interpolator) DynamicCast<NiBSplineCompPoint3Interpolator>; -%template(StaticCastToNiBSplineCompPoint3Interpolator) StaticCast<NiBSplineCompPoint3Interpolator>; -%include "obj/NiBSplineCompTransformInterpolator.h" -%template(NiBSplineCompTransformInterpolatorRef) Ref<NiBSplineCompTransformInterpolator>; -%template(DynamicCastToNiBSplineCompTransformInterpolator) DynamicCast<NiBSplineCompTransformInterpolator>; -%template(StaticCastToNiBSplineCompTransformInterpolator) StaticCast<NiBSplineCompTransformInterpolator>; -%include "obj/NiBSplineData.h" -%template(NiBSplineDataRef) Ref<NiBSplineData>; -%template(DynamicCastToNiBSplineData) DynamicCast<NiBSplineData>; -%template(StaticCastToNiBSplineData) StaticCast<NiBSplineData>; -%include "obj/NiCamera.h" -%template(NiCameraRef) Ref<NiCamera>; -%template(DynamicCastToNiCamera) DynamicCast<NiCamera>; -%template(StaticCastToNiCamera) StaticCast<NiCamera>; -%include "obj/NiCollisionData.h" -%template(NiCollisionDataRef) Ref<NiCollisionData>; -%template(DynamicCastToNiCollisionData) DynamicCast<NiCollisionData>; -%template(StaticCastToNiCollisionData) StaticCast<NiCollisionData>; -%include "obj/NiColorData.h" -%template(NiColorDataRef) Ref<NiColorData>; -%template(DynamicCastToNiColorData) DynamicCast<NiColorData>; -%template(StaticCastToNiColorData) StaticCast<NiColorData>; -%include "obj/NiColorExtraData.h" -%template(NiColorExtraDataRef) Ref<NiColorExtraData>; -%template(DynamicCastToNiColorExtraData) DynamicCast<NiColorExtraData>; -%template(StaticCastToNiColorExtraData) StaticCast<NiColorExtraData>; -%include "obj/NiControllerManager.h" -%template(NiControllerManagerRef) Ref<NiControllerManager>; -%template(DynamicCastToNiControllerManager) DynamicCast<NiControllerManager>; -%template(StaticCastToNiControllerManager) StaticCast<NiControllerManager>; -%include "obj/NiControllerSequence.h" -%template(NiControllerSequenceRef) Ref<NiControllerSequence>; -%template(DynamicCastToNiControllerSequence) DynamicCast<NiControllerSequence>; -%template(StaticCastToNiControllerSequence) StaticCast<NiControllerSequence>; -%include "obj/NiDefaultAVObjectPalette.h" -%template(NiDefaultAVObjectPaletteRef) Ref<NiDefaultAVObjectPalette>; -%template(DynamicCastToNiDefaultAVObjectPalette) DynamicCast<NiDefaultAVObjectPalette>; -%template(StaticCastToNiDefaultAVObjectPalette) StaticCast<NiDefaultAVObjectPalette>; -%include "obj/NiDirectionalLight.h" -%template(NiDirectionalLightRef) Ref<NiDirectionalLight>; -%template(DynamicCastToNiDirectionalLight) DynamicCast<NiDirectionalLight>; -%template(StaticCastToNiDirectionalLight) StaticCast<NiDirectionalLight>; -%include "obj/NiDitherProperty.h" -%template(NiDitherPropertyRef) Ref<NiDitherProperty>; -%template(DynamicCastToNiDitherProperty) DynamicCast<NiDitherProperty>; -%template(StaticCastToNiDitherProperty) StaticCast<NiDitherProperty>; -%include "obj/NiFlipController.h" -%template(NiFlipControllerRef) Ref<NiFlipController>; -%template(DynamicCastToNiFlipController) DynamicCast<NiFlipController>; -%template(StaticCastToNiFlipController) StaticCast<NiFlipController>; -%include "obj/NiFloatData.h" -%template(NiFloatDataRef) Ref<NiFloatData>; -%template(DynamicCastToNiFloatData) DynamicCast<NiFloatData>; -%template(StaticCastToNiFloatData) StaticCast<NiFloatData>; -%include "obj/NiFloatExtraData.h" -%template(NiFloatExtraDataRef) Ref<NiFloatExtraData>; -%template(DynamicCastToNiFloatExtraData) DynamicCast<NiFloatExtraData>; -%template(StaticCastToNiFloatExtraData) StaticCast<NiFloatExtraData>; -%include "obj/NiFloatExtraDataController.h" -%template(NiFloatExtraDataControllerRef) Ref<NiFloatExtraDataController>; -%template(DynamicCastToNiFloatExtraDataController) DynamicCast<NiFloatExtraDataController>; -%template(StaticCastToNiFloatExtraDataController) StaticCast<NiFloatExtraDataController>; -%include "obj/NiFloatInterpolator.h" -%template(NiFloatInterpolatorRef) Ref<NiFloatInterpolator>; -%template(DynamicCastToNiFloatInterpolator) DynamicCast<NiFloatInterpolator>; -%template(StaticCastToNiFloatInterpolator) StaticCast<NiFloatInterpolator>; -%include "obj/NiFloatsExtraData.h" -%template(NiFloatsExtraDataRef) Ref<NiFloatsExtraData>; -%template(DynamicCastToNiFloatsExtraData) DynamicCast<NiFloatsExtraData>; -%template(StaticCastToNiFloatsExtraData) StaticCast<NiFloatsExtraData>; -%include "obj/NiFogProperty.h" -%template(NiFogPropertyRef) Ref<NiFogProperty>; -%template(DynamicCastToNiFogProperty) DynamicCast<NiFogProperty>; -%template(StaticCastToNiFogProperty) StaticCast<NiFogProperty>; -%include "obj/NiGeomMorpherController.h" -%template(NiGeomMorpherControllerRef) Ref<NiGeomMorpherController>; -%template(DynamicCastToNiGeomMorpherController) DynamicCast<NiGeomMorpherController>; -%template(StaticCastToNiGeomMorpherController) StaticCast<NiGeomMorpherController>; -%include "obj/NiGravity.h" -%template(NiGravityRef) Ref<NiGravity>; -%template(DynamicCastToNiGravity) DynamicCast<NiGravity>; -%template(StaticCastToNiGravity) StaticCast<NiGravity>; -%include "obj/NiIntegerExtraData.h" -%template(NiIntegerExtraDataRef) Ref<NiIntegerExtraData>; -%template(DynamicCastToNiIntegerExtraData) DynamicCast<NiIntegerExtraData>; -%template(StaticCastToNiIntegerExtraData) StaticCast<NiIntegerExtraData>; -%include "obj/NiIntegersExtraData.h" -%template(NiIntegersExtraDataRef) Ref<NiIntegersExtraData>; -%template(DynamicCastToNiIntegersExtraData) DynamicCast<NiIntegersExtraData>; -%template(StaticCastToNiIntegersExtraData) StaticCast<NiIntegersExtraData>; -%include "obj/NiKeyframeController.h" -%template(NiKeyframeControllerRef) Ref<NiKeyframeController>; -%template(DynamicCastToNiKeyframeController) DynamicCast<NiKeyframeController>; -%template(StaticCastToNiKeyframeController) StaticCast<NiKeyframeController>; -%include "obj/BSKeyframeController.h" -%template(BSKeyframeControllerRef) Ref<BSKeyframeController>; -%template(DynamicCastToBSKeyframeController) DynamicCast<BSKeyframeController>; -%template(StaticCastToBSKeyframeController) StaticCast<BSKeyframeController>; -%include "obj/NiKeyframeData.h" -%template(NiKeyframeDataRef) Ref<NiKeyframeData>; -%template(DynamicCastToNiKeyframeData) DynamicCast<NiKeyframeData>; -%template(StaticCastToNiKeyframeData) StaticCast<NiKeyframeData>; -%include "obj/NiLightColorController.h" -%template(NiLightColorControllerRef) Ref<NiLightColorController>; -%template(DynamicCastToNiLightColorController) DynamicCast<NiLightColorController>; -%template(StaticCastToNiLightColorController) StaticCast<NiLightColorController>; -%include "obj/NiLightDimmerController.h" -%template(NiLightDimmerControllerRef) Ref<NiLightDimmerController>; -%template(DynamicCastToNiLightDimmerController) DynamicCast<NiLightDimmerController>; -%template(StaticCastToNiLightDimmerController) StaticCast<NiLightDimmerController>; -%include "obj/NiLookAtController.h" -%template(NiLookAtControllerRef) Ref<NiLookAtController>; -%template(DynamicCastToNiLookAtController) DynamicCast<NiLookAtController>; -%template(StaticCastToNiLookAtController) StaticCast<NiLookAtController>; -%include "obj/NiLookAtInterpolator.h" -%template(NiLookAtInterpolatorRef) Ref<NiLookAtInterpolator>; -%template(DynamicCastToNiLookAtInterpolator) DynamicCast<NiLookAtInterpolator>; -%template(StaticCastToNiLookAtInterpolator) StaticCast<NiLookAtInterpolator>; -%include "obj/NiMaterialColorController.h" -%template(NiMaterialColorControllerRef) Ref<NiMaterialColorController>; -%template(DynamicCastToNiMaterialColorController) DynamicCast<NiMaterialColorController>; -%template(StaticCastToNiMaterialColorController) StaticCast<NiMaterialColorController>; -%include "obj/NiMaterialProperty.h" -%template(NiMaterialPropertyRef) Ref<NiMaterialProperty>; -%template(DynamicCastToNiMaterialProperty) DynamicCast<NiMaterialProperty>; -%template(StaticCastToNiMaterialProperty) StaticCast<NiMaterialProperty>; -%include "obj/NiMeshPSysData.h" -%template(NiMeshPSysDataRef) Ref<NiMeshPSysData>; -%template(DynamicCastToNiMeshPSysData) DynamicCast<NiMeshPSysData>; -%template(StaticCastToNiMeshPSysData) StaticCast<NiMeshPSysData>; -%include "obj/NiMorphData.h" -%template(NiMorphDataRef) Ref<NiMorphData>; -%template(DynamicCastToNiMorphData) DynamicCast<NiMorphData>; -%template(StaticCastToNiMorphData) StaticCast<NiMorphData>; -%include "obj/NiMultiTargetTransformController.h" -%template(NiMultiTargetTransformControllerRef) Ref<NiMultiTargetTransformController>; -%template(DynamicCastToNiMultiTargetTransformController) DynamicCast<NiMultiTargetTransformController>; -%template(StaticCastToNiMultiTargetTransformController) StaticCast<NiMultiTargetTransformController>; -%include "obj/NiNode.h" -%template(NiNodeRef) Ref<NiNode>; -%template(DynamicCastToNiNode) DynamicCast<NiNode>; -%template(StaticCastToNiNode) StaticCast<NiNode>; -%include "obj/AvoidNode.h" -%template(AvoidNodeRef) Ref<AvoidNode>; -%template(DynamicCastToAvoidNode) DynamicCast<AvoidNode>; -%template(StaticCastToAvoidNode) StaticCast<AvoidNode>; -%include "obj/FxWidget.h" -%template(FxWidgetRef) Ref<FxWidget>; -%template(DynamicCastToFxWidget) DynamicCast<FxWidget>; -%template(StaticCastToFxWidget) StaticCast<FxWidget>; -%include "obj/FxButton.h" -%template(FxButtonRef) Ref<FxButton>; -%template(DynamicCastToFxButton) DynamicCast<FxButton>; -%template(StaticCastToFxButton) StaticCast<FxButton>; -%include "obj/FxRadioButton.h" -%template(FxRadioButtonRef) Ref<FxRadioButton>; -%template(DynamicCastToFxRadioButton) DynamicCast<FxRadioButton>; -%template(StaticCastToFxRadioButton) StaticCast<FxRadioButton>; -%include "obj/NiBillboardNode.h" -%template(NiBillboardNodeRef) Ref<NiBillboardNode>; -%template(DynamicCastToNiBillboardNode) DynamicCast<NiBillboardNode>; -%template(StaticCastToNiBillboardNode) StaticCast<NiBillboardNode>; -%include "obj/NiBSAnimationNode.h" -%template(NiBSAnimationNodeRef) Ref<NiBSAnimationNode>; -%template(DynamicCastToNiBSAnimationNode) DynamicCast<NiBSAnimationNode>; -%template(StaticCastToNiBSAnimationNode) StaticCast<NiBSAnimationNode>; -%include "obj/NiBSParticleNode.h" -%template(NiBSParticleNodeRef) Ref<NiBSParticleNode>; -%template(DynamicCastToNiBSParticleNode) DynamicCast<NiBSParticleNode>; -%template(StaticCastToNiBSParticleNode) StaticCast<NiBSParticleNode>; -%include "obj/NiLODNode.h" -%template(NiLODNodeRef) Ref<NiLODNode>; -%template(DynamicCastToNiLODNode) DynamicCast<NiLODNode>; -%template(StaticCastToNiLODNode) StaticCast<NiLODNode>; -%include "obj/NiPalette.h" -%template(NiPaletteRef) Ref<NiPalette>; -%template(DynamicCastToNiPalette) DynamicCast<NiPalette>; -%template(StaticCastToNiPalette) StaticCast<NiPalette>; -%include "obj/NiParticleBomb.h" -%template(NiParticleBombRef) Ref<NiParticleBomb>; -%template(DynamicCastToNiParticleBomb) DynamicCast<NiParticleBomb>; -%template(StaticCastToNiParticleBomb) StaticCast<NiParticleBomb>; -%include "obj/NiParticleColorModifier.h" -%template(NiParticleColorModifierRef) Ref<NiParticleColorModifier>; -%template(DynamicCastToNiParticleColorModifier) DynamicCast<NiParticleColorModifier>; -%template(StaticCastToNiParticleColorModifier) StaticCast<NiParticleColorModifier>; -%include "obj/NiParticleGrowFade.h" -%template(NiParticleGrowFadeRef) Ref<NiParticleGrowFade>; -%template(DynamicCastToNiParticleGrowFade) DynamicCast<NiParticleGrowFade>; -%template(StaticCastToNiParticleGrowFade) StaticCast<NiParticleGrowFade>; -%include "obj/NiParticleMeshModifier.h" -%template(NiParticleMeshModifierRef) Ref<NiParticleMeshModifier>; -%template(DynamicCastToNiParticleMeshModifier) DynamicCast<NiParticleMeshModifier>; -%template(StaticCastToNiParticleMeshModifier) StaticCast<NiParticleMeshModifier>; -%include "obj/NiParticleRotation.h" -%template(NiParticleRotationRef) Ref<NiParticleRotation>; -%template(DynamicCastToNiParticleRotation) DynamicCast<NiParticleRotation>; -%template(StaticCastToNiParticleRotation) StaticCast<NiParticleRotation>; -%include "obj/NiParticles.h" -%template(NiParticlesRef) Ref<NiParticles>; -%template(DynamicCastToNiParticles) DynamicCast<NiParticles>; -%template(StaticCastToNiParticles) StaticCast<NiParticles>; -%include "obj/NiAutoNormalParticles.h" -%template(NiAutoNormalParticlesRef) Ref<NiAutoNormalParticles>; -%template(DynamicCastToNiAutoNormalParticles) DynamicCast<NiAutoNormalParticles>; -%template(StaticCastToNiAutoNormalParticles) StaticCast<NiAutoNormalParticles>; -%include "obj/NiParticleMeshes.h" -%template(NiParticleMeshesRef) Ref<NiParticleMeshes>; -%template(DynamicCastToNiParticleMeshes) DynamicCast<NiParticleMeshes>; -%template(StaticCastToNiParticleMeshes) StaticCast<NiParticleMeshes>; -%include "obj/NiParticlesData.h" -%template(NiParticlesDataRef) Ref<NiParticlesData>; -%template(DynamicCastToNiParticlesData) DynamicCast<NiParticlesData>; -%template(StaticCastToNiParticlesData) StaticCast<NiParticlesData>; -%include "obj/NiParticleMeshesData.h" -%template(NiParticleMeshesDataRef) Ref<NiParticleMeshesData>; -%template(DynamicCastToNiParticleMeshesData) DynamicCast<NiParticleMeshesData>; -%template(StaticCastToNiParticleMeshesData) StaticCast<NiParticleMeshesData>; -%include "obj/NiParticleSystem.h" -%template(NiParticleSystemRef) Ref<NiParticleSystem>; -%template(DynamicCastToNiParticleSystem) DynamicCast<NiParticleSystem>; -%template(StaticCastToNiParticleSystem) StaticCast<NiParticleSystem>; -%include "obj/NiMeshParticleSystem.h" -%template(NiMeshParticleSystemRef) Ref<NiMeshParticleSystem>; -%template(DynamicCastToNiMeshParticleSystem) DynamicCast<NiMeshParticleSystem>; -%template(StaticCastToNiMeshParticleSystem) StaticCast<NiMeshParticleSystem>; -%include "obj/NiParticleSystemController.h" -%template(NiParticleSystemControllerRef) Ref<NiParticleSystemController>; -%template(DynamicCastToNiParticleSystemController) DynamicCast<NiParticleSystemController>; -%template(StaticCastToNiParticleSystemController) StaticCast<NiParticleSystemController>; -%include "obj/NiBSPArrayController.h" -%template(NiBSPArrayControllerRef) Ref<NiBSPArrayController>; -%template(DynamicCastToNiBSPArrayController) DynamicCast<NiBSPArrayController>; -%template(StaticCastToNiBSPArrayController) StaticCast<NiBSPArrayController>; -%include "obj/NiPathController.h" -%template(NiPathControllerRef) Ref<NiPathController>; -%template(DynamicCastToNiPathController) DynamicCast<NiPathController>; -%template(StaticCastToNiPathController) StaticCast<NiPathController>; -%include "obj/NiPathInterpolator.h" -%template(NiPathInterpolatorRef) Ref<NiPathInterpolator>; -%template(DynamicCastToNiPathInterpolator) DynamicCast<NiPathInterpolator>; -%template(StaticCastToNiPathInterpolator) StaticCast<NiPathInterpolator>; -%include "obj/NiPixelData.h" -%template(NiPixelDataRef) Ref<NiPixelData>; -%template(DynamicCastToNiPixelData) DynamicCast<NiPixelData>; -%template(StaticCastToNiPixelData) StaticCast<NiPixelData>; -%include "obj/NiPlanarCollider.h" -%template(NiPlanarColliderRef) Ref<NiPlanarCollider>; -%template(DynamicCastToNiPlanarCollider) DynamicCast<NiPlanarCollider>; -%template(StaticCastToNiPlanarCollider) StaticCast<NiPlanarCollider>; -%include "obj/NiPoint3Interpolator.h" -%template(NiPoint3InterpolatorRef) Ref<NiPoint3Interpolator>; -%template(DynamicCastToNiPoint3Interpolator) DynamicCast<NiPoint3Interpolator>; -%template(StaticCastToNiPoint3Interpolator) StaticCast<NiPoint3Interpolator>; -%include "obj/NiPointLight.h" -%template(NiPointLightRef) Ref<NiPointLight>; -%template(DynamicCastToNiPointLight) DynamicCast<NiPointLight>; -%template(StaticCastToNiPointLight) StaticCast<NiPointLight>; -%include "obj/NiPosData.h" -%template(NiPosDataRef) Ref<NiPosData>; -%template(DynamicCastToNiPosData) DynamicCast<NiPosData>; -%template(StaticCastToNiPosData) StaticCast<NiPosData>; -%include "obj/NiPSysAgeDeathModifier.h" -%template(NiPSysAgeDeathModifierRef) Ref<NiPSysAgeDeathModifier>; -%template(DynamicCastToNiPSysAgeDeathModifier) DynamicCast<NiPSysAgeDeathModifier>; -%template(StaticCastToNiPSysAgeDeathModifier) StaticCast<NiPSysAgeDeathModifier>; -%include "obj/NiPSysBombModifier.h" -%template(NiPSysBombModifierRef) Ref<NiPSysBombModifier>; -%template(DynamicCastToNiPSysBombModifier) DynamicCast<NiPSysBombModifier>; -%template(StaticCastToNiPSysBombModifier) StaticCast<NiPSysBombModifier>; -%include "obj/NiPSysBoundUpdateModifier.h" -%template(NiPSysBoundUpdateModifierRef) Ref<NiPSysBoundUpdateModifier>; -%template(DynamicCastToNiPSysBoundUpdateModifier) DynamicCast<NiPSysBoundUpdateModifier>; -%template(StaticCastToNiPSysBoundUpdateModifier) StaticCast<NiPSysBoundUpdateModifier>; -%include "obj/NiPSysBoxEmitter.h" -%template(NiPSysBoxEmitterRef) Ref<NiPSysBoxEmitter>; -%template(DynamicCastToNiPSysBoxEmitter) DynamicCast<NiPSysBoxEmitter>; -%template(StaticCastToNiPSysBoxEmitter) StaticCast<NiPSysBoxEmitter>; -%include "obj/NiPSysColliderManager.h" -%template(NiPSysColliderManagerRef) Ref<NiPSysColliderManager>; -%template(DynamicCastToNiPSysColliderManager) DynamicCast<NiPSysColliderManager>; -%template(StaticCastToNiPSysColliderManager) StaticCast<NiPSysColliderManager>; -%include "obj/NiPSysColorModifier.h" -%template(NiPSysColorModifierRef) Ref<NiPSysColorModifier>; -%template(DynamicCastToNiPSysColorModifier) DynamicCast<NiPSysColorModifier>; -%template(StaticCastToNiPSysColorModifier) StaticCast<NiPSysColorModifier>; -%include "obj/NiPSysCylinderEmitter.h" -%template(NiPSysCylinderEmitterRef) Ref<NiPSysCylinderEmitter>; -%template(DynamicCastToNiPSysCylinderEmitter) DynamicCast<NiPSysCylinderEmitter>; -%template(StaticCastToNiPSysCylinderEmitter) StaticCast<NiPSysCylinderEmitter>; -%include "obj/NiPSysData.h" -%template(NiPSysDataRef) Ref<NiPSysData>; -%template(DynamicCastToNiPSysData) DynamicCast<NiPSysData>; -%template(StaticCastToNiPSysData) StaticCast<NiPSysData>; -%include "obj/NiPSysDragModifier.h" -%template(NiPSysDragModifierRef) Ref<NiPSysDragModifier>; -%template(DynamicCastToNiPSysDragModifier) DynamicCast<NiPSysDragModifier>; -%template(StaticCastToNiPSysDragModifier) StaticCast<NiPSysDragModifier>; -%include "obj/NiPSysEmitterCtlr.h" -%template(NiPSysEmitterCtlrRef) Ref<NiPSysEmitterCtlr>; -%template(DynamicCastToNiPSysEmitterCtlr) DynamicCast<NiPSysEmitterCtlr>; -%template(StaticCastToNiPSysEmitterCtlr) StaticCast<NiPSysEmitterCtlr>; -%include "obj/NiPSysEmitterCtlrData.h" -%template(NiPSysEmitterCtlrDataRef) Ref<NiPSysEmitterCtlrData>; -%template(DynamicCastToNiPSysEmitterCtlrData) DynamicCast<NiPSysEmitterCtlrData>; -%template(StaticCastToNiPSysEmitterCtlrData) StaticCast<NiPSysEmitterCtlrData>; -%include "obj/NiPSysEmitterDeclinationCtlr.h" -%template(NiPSysEmitterDeclinationCtlrRef) Ref<NiPSysEmitterDeclinationCtlr>; -%template(DynamicCastToNiPSysEmitterDeclinationCtlr) DynamicCast<NiPSysEmitterDeclinationCtlr>; -%template(StaticCastToNiPSysEmitterDeclinationCtlr) StaticCast<NiPSysEmitterDeclinationCtlr>; -%include "obj/NiPSysEmitterDeclinationVarCtlr.h" -%template(NiPSysEmitterDeclinationVarCtlrRef) Ref<NiPSysEmitterDeclinationVarCtlr>; -%template(DynamicCastToNiPSysEmitterDeclinationVarCtlr) DynamicCast<NiPSysEmitterDeclinationVarCtlr>; -%template(StaticCastToNiPSysEmitterDeclinationVarCtlr) StaticCast<NiPSysEmitterDeclinationVarCtlr>; -%include "obj/NiPSysEmitterInitialRadiusCtlr.h" -%template(NiPSysEmitterInitialRadiusCtlrRef) Ref<NiPSysEmitterInitialRadiusCtlr>; -%template(DynamicCastToNiPSysEmitterInitialRadiusCtlr) DynamicCast<NiPSysEmitterInitialRadiusCtlr>; -%template(StaticCastToNiPSysEmitterInitialRadiusCtlr) StaticCast<NiPSysEmitterInitialRadiusCtlr>; -%include "obj/NiPSysEmitterLifeSpanCtlr.h" -%template(NiPSysEmitterLifeSpanCtlrRef) Ref<NiPSysEmitterLifeSpanCtlr>; -%template(DynamicCastToNiPSysEmitterLifeSpanCtlr) DynamicCast<NiPSysEmitterLifeSpanCtlr>; -%template(StaticCastToNiPSysEmitterLifeSpanCtlr) StaticCast<NiPSysEmitterLifeSpanCtlr>; -%include "obj/NiPSysEmitterSpeedCtlr.h" -%template(NiPSysEmitterSpeedCtlrRef) Ref<NiPSysEmitterSpeedCtlr>; -%template(DynamicCastToNiPSysEmitterSpeedCtlr) DynamicCast<NiPSysEmitterSpeedCtlr>; -%template(StaticCastToNiPSysEmitterSpeedCtlr) StaticCast<NiPSysEmitterSpeedCtlr>; -%include "obj/NiPSysGravityModifier.h" -%template(NiPSysGravityModifierRef) Ref<NiPSysGravityModifier>; -%template(DynamicCastToNiPSysGravityModifier) DynamicCast<NiPSysGravityModifier>; -%template(StaticCastToNiPSysGravityModifier) StaticCast<NiPSysGravityModifier>; -%include "obj/NiPSysGravityStrengthCtlr.h" -%template(NiPSysGravityStrengthCtlrRef) Ref<NiPSysGravityStrengthCtlr>; -%template(DynamicCastToNiPSysGravityStrengthCtlr) DynamicCast<NiPSysGravityStrengthCtlr>; -%template(StaticCastToNiPSysGravityStrengthCtlr) StaticCast<NiPSysGravityStrengthCtlr>; -%include "obj/NiPSysGrowFadeModifier.h" -%template(NiPSysGrowFadeModifierRef) Ref<NiPSysGrowFadeModifier>; -%template(DynamicCastToNiPSysGrowFadeModifier) DynamicCast<NiPSysGrowFadeModifier>; -%template(StaticCastToNiPSysGrowFadeModifier) StaticCast<NiPSysGrowFadeModifier>; -%include "obj/NiPSysMeshEmitter.h" -%template(NiPSysMeshEmitterRef) Ref<NiPSysMeshEmitter>; -%template(DynamicCastToNiPSysMeshEmitter) DynamicCast<NiPSysMeshEmitter>; -%template(StaticCastToNiPSysMeshEmitter) StaticCast<NiPSysMeshEmitter>; -%include "obj/NiPSysMeshUpdateModifier.h" -%template(NiPSysMeshUpdateModifierRef) Ref<NiPSysMeshUpdateModifier>; -%template(DynamicCastToNiPSysMeshUpdateModifier) DynamicCast<NiPSysMeshUpdateModifier>; -%template(StaticCastToNiPSysMeshUpdateModifier) StaticCast<NiPSysMeshUpdateModifier>; -%include "obj/NiPSysModifierActiveCtlr.h" -%template(NiPSysModifierActiveCtlrRef) Ref<NiPSysModifierActiveCtlr>; -%template(DynamicCastToNiPSysModifierActiveCtlr) DynamicCast<NiPSysModifierActiveCtlr>; -%template(StaticCastToNiPSysModifierActiveCtlr) StaticCast<NiPSysModifierActiveCtlr>; -%include "obj/NiPSysPlanarCollider.h" -%template(NiPSysPlanarColliderRef) Ref<NiPSysPlanarCollider>; -%template(DynamicCastToNiPSysPlanarCollider) DynamicCast<NiPSysPlanarCollider>; -%template(StaticCastToNiPSysPlanarCollider) StaticCast<NiPSysPlanarCollider>; -%include "obj/NiPSysPositionModifier.h" -%template(NiPSysPositionModifierRef) Ref<NiPSysPositionModifier>; -%template(DynamicCastToNiPSysPositionModifier) DynamicCast<NiPSysPositionModifier>; -%template(StaticCastToNiPSysPositionModifier) StaticCast<NiPSysPositionModifier>; -%include "obj/NiPSysResetOnLoopCtlr.h" -%template(NiPSysResetOnLoopCtlrRef) Ref<NiPSysResetOnLoopCtlr>; -%template(DynamicCastToNiPSysResetOnLoopCtlr) DynamicCast<NiPSysResetOnLoopCtlr>; -%template(StaticCastToNiPSysResetOnLoopCtlr) StaticCast<NiPSysResetOnLoopCtlr>; -%include "obj/NiPSysRotationModifier.h" -%template(NiPSysRotationModifierRef) Ref<NiPSysRotationModifier>; -%template(DynamicCastToNiPSysRotationModifier) DynamicCast<NiPSysRotationModifier>; -%template(StaticCastToNiPSysRotationModifier) StaticCast<NiPSysRotationModifier>; -%include "obj/NiPSysSpawnModifier.h" -%template(NiPSysSpawnModifierRef) Ref<NiPSysSpawnModifier>; -%template(DynamicCastToNiPSysSpawnModifier) DynamicCast<NiPSysSpawnModifier>; -%template(StaticCastToNiPSysSpawnModifier) StaticCast<NiPSysSpawnModifier>; -%include "obj/NiPSysSphereEmitter.h" -%template(NiPSysSphereEmitterRef) Ref<NiPSysSphereEmitter>; -%template(DynamicCastToNiPSysSphereEmitter) DynamicCast<NiPSysSphereEmitter>; -%template(StaticCastToNiPSysSphereEmitter) StaticCast<NiPSysSphereEmitter>; -%include "obj/NiPSysUpdateCtlr.h" -%template(NiPSysUpdateCtlrRef) Ref<NiPSysUpdateCtlr>; -%template(DynamicCastToNiPSysUpdateCtlr) DynamicCast<NiPSysUpdateCtlr>; -%template(StaticCastToNiPSysUpdateCtlr) StaticCast<NiPSysUpdateCtlr>; -%include "obj/NiRangeLODData.h" -%template(NiRangeLODDataRef) Ref<NiRangeLODData>; -%template(DynamicCastToNiRangeLODData) DynamicCast<NiRangeLODData>; -%template(StaticCastToNiRangeLODData) StaticCast<NiRangeLODData>; -%include "obj/NiRotatingParticles.h" -%template(NiRotatingParticlesRef) Ref<NiRotatingParticles>; -%template(DynamicCastToNiRotatingParticles) DynamicCast<NiRotatingParticles>; -%template(StaticCastToNiRotatingParticles) StaticCast<NiRotatingParticles>; -%include "obj/NiRotatingParticlesData.h" -%template(NiRotatingParticlesDataRef) Ref<NiRotatingParticlesData>; -%template(DynamicCastToNiRotatingParticlesData) DynamicCast<NiRotatingParticlesData>; -%template(StaticCastToNiRotatingParticlesData) StaticCast<NiRotatingParticlesData>; -%include "obj/NiScreenLODData.h" -%template(NiScreenLODDataRef) Ref<NiScreenLODData>; -%template(DynamicCastToNiScreenLODData) DynamicCast<NiScreenLODData>; -%template(StaticCastToNiScreenLODData) StaticCast<NiScreenLODData>; -%include "obj/NiSequenceStreamHelper.h" -%template(NiSequenceStreamHelperRef) Ref<NiSequenceStreamHelper>; -%template(DynamicCastToNiSequenceStreamHelper) DynamicCast<NiSequenceStreamHelper>; -%template(StaticCastToNiSequenceStreamHelper) StaticCast<NiSequenceStreamHelper>; -%include "obj/NiShadeProperty.h" -%template(NiShadePropertyRef) Ref<NiShadeProperty>; -%template(DynamicCastToNiShadeProperty) DynamicCast<NiShadeProperty>; -%template(StaticCastToNiShadeProperty) StaticCast<NiShadeProperty>; -%include "obj/NiSkinData.h" -%template(NiSkinDataRef) Ref<NiSkinData>; -%template(DynamicCastToNiSkinData) DynamicCast<NiSkinData>; -%template(StaticCastToNiSkinData) StaticCast<NiSkinData>; -%include "obj/NiSkinInstance.h" -%template(NiSkinInstanceRef) Ref<NiSkinInstance>; -%template(DynamicCastToNiSkinInstance) DynamicCast<NiSkinInstance>; -%template(StaticCastToNiSkinInstance) StaticCast<NiSkinInstance>; -%include "obj/NiSkinPartition.h" -%template(NiSkinPartitionRef) Ref<NiSkinPartition>; -%template(DynamicCastToNiSkinPartition) DynamicCast<NiSkinPartition>; -%template(StaticCastToNiSkinPartition) StaticCast<NiSkinPartition>; -%include "obj/NiSourceTexture.h" -%template(NiSourceTextureRef) Ref<NiSourceTexture>; -%template(DynamicCastToNiSourceTexture) DynamicCast<NiSourceTexture>; -%template(StaticCastToNiSourceTexture) StaticCast<NiSourceTexture>; -%include "obj/NiSpecularProperty.h" -%template(NiSpecularPropertyRef) Ref<NiSpecularProperty>; -%template(DynamicCastToNiSpecularProperty) DynamicCast<NiSpecularProperty>; -%template(StaticCastToNiSpecularProperty) StaticCast<NiSpecularProperty>; -%include "obj/NiSphericalCollider.h" -%template(NiSphericalColliderRef) Ref<NiSphericalCollider>; -%template(DynamicCastToNiSphericalCollider) DynamicCast<NiSphericalCollider>; -%template(StaticCastToNiSphericalCollider) StaticCast<NiSphericalCollider>; -%include "obj/NiSpotLight.h" -%template(NiSpotLightRef) Ref<NiSpotLight>; -%template(DynamicCastToNiSpotLight) DynamicCast<NiSpotLight>; -%template(StaticCastToNiSpotLight) StaticCast<NiSpotLight>; -%include "obj/NiStencilProperty.h" -%template(NiStencilPropertyRef) Ref<NiStencilProperty>; -%template(DynamicCastToNiStencilProperty) DynamicCast<NiStencilProperty>; -%template(StaticCastToNiStencilProperty) StaticCast<NiStencilProperty>; -%include "obj/NiStringExtraData.h" -%template(NiStringExtraDataRef) Ref<NiStringExtraData>; -%template(DynamicCastToNiStringExtraData) DynamicCast<NiStringExtraData>; -%template(StaticCastToNiStringExtraData) StaticCast<NiStringExtraData>; -%include "obj/NiStringPalette.h" -%template(NiStringPaletteRef) Ref<NiStringPalette>; -%template(DynamicCastToNiStringPalette) DynamicCast<NiStringPalette>; -%template(StaticCastToNiStringPalette) StaticCast<NiStringPalette>; -%include "obj/NiStringsExtraData.h" -%template(NiStringsExtraDataRef) Ref<NiStringsExtraData>; -%template(DynamicCastToNiStringsExtraData) DynamicCast<NiStringsExtraData>; -%template(StaticCastToNiStringsExtraData) StaticCast<NiStringsExtraData>; -%include "obj/NiTextKeyExtraData.h" -%template(NiTextKeyExtraDataRef) Ref<NiTextKeyExtraData>; -%template(DynamicCastToNiTextKeyExtraData) DynamicCast<NiTextKeyExtraData>; -%template(StaticCastToNiTextKeyExtraData) StaticCast<NiTextKeyExtraData>; -%include "obj/NiTextureEffect.h" -%template(NiTextureEffectRef) Ref<NiTextureEffect>; -%template(DynamicCastToNiTextureEffect) DynamicCast<NiTextureEffect>; -%template(StaticCastToNiTextureEffect) StaticCast<NiTextureEffect>; -%include "obj/NiTextureTransformController.h" -%template(NiTextureTransformControllerRef) Ref<NiTextureTransformController>; -%template(DynamicCastToNiTextureTransformController) DynamicCast<NiTextureTransformController>; -%template(StaticCastToNiTextureTransformController) StaticCast<NiTextureTransformController>; -%include "obj/NiTexturingProperty.h" -%template(NiTexturingPropertyRef) Ref<NiTexturingProperty>; -%template(DynamicCastToNiTexturingProperty) DynamicCast<NiTexturingProperty>; -%template(StaticCastToNiTexturingProperty) StaticCast<NiTexturingProperty>; -%include "obj/NiTransformController.h" -%template(NiTransformControllerRef) Ref<NiTransformController>; -%template(DynamicCastToNiTransformController) DynamicCast<NiTransformController>; -%template(StaticCastToNiTransformController) StaticCast<NiTransformController>; -%include "obj/NiTransformData.h" -%template(NiTransformDataRef) Ref<NiTransformData>; -%template(DynamicCastToNiTransformData) DynamicCast<NiTransformData>; -%template(StaticCastToNiTransformData) StaticCast<NiTransformData>; -%include "obj/NiTransformInterpolator.h" -%template(NiTransformInterpolatorRef) Ref<NiTransformInterpolator>; -%template(DynamicCastToNiTransformInterpolator) DynamicCast<NiTransformInterpolator>; -%template(StaticCastToNiTransformInterpolator) StaticCast<NiTransformInterpolator>; -%include "obj/NiTriShape.h" -%template(NiTriShapeRef) Ref<NiTriShape>; -%template(DynamicCastToNiTriShape) DynamicCast<NiTriShape>; -%template(StaticCastToNiTriShape) StaticCast<NiTriShape>; -%include "obj/NiTriShapeData.h" -%template(NiTriShapeDataRef) Ref<NiTriShapeData>; -%template(DynamicCastToNiTriShapeData) DynamicCast<NiTriShapeData>; -%template(StaticCastToNiTriShapeData) StaticCast<NiTriShapeData>; -%include "obj/NiTriStrips.h" -%template(NiTriStripsRef) Ref<NiTriStrips>; -%template(DynamicCastToNiTriStrips) DynamicCast<NiTriStrips>; -%template(StaticCastToNiTriStrips) StaticCast<NiTriStrips>; -%include "obj/NiTriStripsData.h" -%template(NiTriStripsDataRef) Ref<NiTriStripsData>; -%template(DynamicCastToNiTriStripsData) DynamicCast<NiTriStripsData>; -%template(StaticCastToNiTriStripsData) StaticCast<NiTriStripsData>; -%include "obj/NiUVController.h" -%template(NiUVControllerRef) Ref<NiUVController>; -%template(DynamicCastToNiUVController) DynamicCast<NiUVController>; -%template(StaticCastToNiUVController) StaticCast<NiUVController>; -%include "obj/NiUVData.h" -%template(NiUVDataRef) Ref<NiUVData>; -%template(DynamicCastToNiUVData) DynamicCast<NiUVData>; -%template(StaticCastToNiUVData) StaticCast<NiUVData>; -%include "obj/NiVectorExtraData.h" -%template(NiVectorExtraDataRef) Ref<NiVectorExtraData>; -%template(DynamicCastToNiVectorExtraData) DynamicCast<NiVectorExtraData>; -%template(StaticCastToNiVectorExtraData) StaticCast<NiVectorExtraData>; -%include "obj/NiVertexColorProperty.h" -%template(NiVertexColorPropertyRef) Ref<NiVertexColorProperty>; -%template(DynamicCastToNiVertexColorProperty) DynamicCast<NiVertexColorProperty>; -%template(StaticCastToNiVertexColorProperty) StaticCast<NiVertexColorProperty>; -%include "obj/NiVertWeightsExtraData.h" -%template(NiVertWeightsExtraDataRef) Ref<NiVertWeightsExtraData>; -%template(DynamicCastToNiVertWeightsExtraData) DynamicCast<NiVertWeightsExtraData>; -%template(StaticCastToNiVertWeightsExtraData) StaticCast<NiVertWeightsExtraData>; -%include "obj/NiVisController.h" -%template(NiVisControllerRef) Ref<NiVisController>; -%template(DynamicCastToNiVisController) DynamicCast<NiVisController>; -%template(StaticCastToNiVisController) StaticCast<NiVisController>; -%include "obj/NiVisData.h" -%template(NiVisDataRef) Ref<NiVisData>; -%template(DynamicCastToNiVisData) DynamicCast<NiVisData>; -%template(StaticCastToNiVisData) StaticCast<NiVisData>; -%include "obj/NiWireframeProperty.h" -%template(NiWireframePropertyRef) Ref<NiWireframeProperty>; -%template(DynamicCastToNiWireframeProperty) DynamicCast<NiWireframeProperty>; -%template(StaticCastToNiWireframeProperty) StaticCast<NiWireframeProperty>; -%include "obj/NiZBufferProperty.h" -%template(NiZBufferPropertyRef) Ref<NiZBufferProperty>; -%template(DynamicCastToNiZBufferProperty) DynamicCast<NiZBufferProperty>; -%template(StaticCastToNiZBufferProperty) StaticCast<NiZBufferProperty>; -%include "obj/RootCollisionNode.h" -%template(RootCollisionNodeRef) Ref<RootCollisionNode>; -%template(DynamicCastToRootCollisionNode) DynamicCast<RootCollisionNode>; -%template(StaticCastToRootCollisionNode) StaticCast<RootCollisionNode>; -%include "gen/ByteArray.h" -%include "gen/Footer.h" -%include "gen/LODRange.h" -%include "gen/MatchGroup.h" -%include "gen/MipMap.h" -%include "gen/NodeGroup.h" -%include "gen/QuaternionXYZW.h" -%include "gen/ShortString.h" -%include "gen/SkinShape.h" -%include "gen/SkinShapeGroup.h" -%include "gen/SkinWeight.h" -%include "gen/AVObject.h" -%include "gen/ControllerLink.h" -%include "gen/Header.h" -%include "gen/StringPalette.h" -%include "gen/TBC.h" -%include "gen/KeyGroup.h" -%include "gen/RotationKeyArray.h" -%include "gen/TexDesc.h" -%include "gen/ShaderTexDesc.h" -%include "gen/TexSource.h" -%include "gen/SkinPartition.h" -%include "gen/BoundingBox.h" -%include "gen/FurniturePosition.h" -%include "gen/hkTriangle.h" -%include "gen/Morph.h" -%include "gen/Particle.h" -%include "gen/SkinData.h" -%include "gen/RagDollDescriptor.h" -%include "gen/LimitedHingeDescriptor.h" - -%template(vector_NiAVObjectRef) std::vector<NiAVObjectRef>; diff --git a/NifExport/niflib/pyniflib.sln b/NifExport/niflib/pyniflib.sln deleted file mode 100755 index 0f38262..0000000 --- a/NifExport/niflib/pyniflib.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual C++ Express 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PyNiflib", "py_niflib.vcproj", "{7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Debug|Win32.ActiveCfg = Debug|Win32 - {7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Debug|Win32.Build.0 = Debug|Win32 - {7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Release|Win32.ActiveCfg = Release|Win32 - {7517F24D-B1A1-427C-B952-F5DD5DDAD7A7}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/NifExport/pch.cpp b/NifExport/pch.cpp new file mode 100644 index 0000000..376ac4c --- /dev/null +++ b/NifExport/pch.cpp @@ -0,0 +1,4 @@ +// Dummy file for creating precompiled headers +// The project contains the linke /FI"$(ProjectDir)pch.h" which automatically adds +// the header to the top of the file. +#include "pch.h" \ No newline at end of file diff --git a/NifExport/pch.h b/NifExport/pch.h index a2a4a78..f916d52 100755 --- a/NifExport/pch.h +++ b/NifExport/pch.h @@ -2,6 +2,12 @@ #include "resource.h" +#include <deque> +#include <algorithm> +#include <functional> +#include <string> +#include <sstream> + #include "Max.h" #include "resource.h" #include "istdplug.h" @@ -11,28 +17,31 @@ // niflib/Ref.h' header guard caused havok! // near & far -#include "niflib/pch.h" -#include "niflib/obj/NiNode.h" -#include "niflib/obj/NiTriStrips.h" -#include "niflib/obj/NiTriStripsData.h" -#include "niflib/obj/NiTriShape.h" -#include "niflib/obj/NiTriShapeData.h" -#include "niflib/obj/bhkCollisionObject.h" -#include "niflib/obj/bhkRigidBody.h" -#include "niflib/obj/bhkNiTriStripsShape.h" -#include "niflib/obj/bhkBoxShape.h" -#include "niflib/obj/bhkSphereShape.h" -#include "niflib/obj/bhkCapsuleShape.h" -#include "niflib/obj/NiMaterialProperty.h" -#include "niflib/obj/NiTexturingProperty.h" -#include "niflib/obj/NiSourceTexture.h" -#include "niflib/obj/BsxFlags.h" -#include "niflib/obj/NiStringExtraData.h" +//#include "niflib/pch.h" +#include "niflib.h" +#include "obj/NiNode.h" +#include "obj/NiTriStrips.h" +#include "obj/NiTriStripsData.h" +#include "obj/NiTriShape.h" +#include "obj/NiTriShapeData.h" +#include "obj/bhkCollisionObject.h" +#include "obj/bhkRigidBody.h" +#include "obj/bhkNiTriStripsShape.h" +#include "obj/bhkBoxShape.h" +#include "obj/bhkSphereShape.h" +#include "obj/bhkCapsuleShape.h" +#include "obj/NiMaterialProperty.h" +#include "obj/NiTexturingProperty.h" +#include "obj/NiSourceTexture.h" +#include "obj/BsxFlags.h" +#include "obj/NiStringExtraData.h" +#include "obj/bhkRigidBodyT.h" #include "NvTriStrip/NvTriStrip.h" -#include <deque> #include "TriStripper/tri_stripper.h" -#include "../NifPlugins.h" +#include "NifPlugins.h" #include "Exporter.h" #include "NifExport.h" + +#include <shlwapi.h> diff --git a/NifFurniture/NifFurniture.cpp b/NifFurniture/NifFurniture.cpp index 44602eb..d80d111 100755 --- a/NifFurniture/NifFurniture.cpp +++ b/NifFurniture/NifFurniture.cpp @@ -1,7 +1,7 @@ #include "NifFurniture.h" #include "FurnitureMarkers.h" -#include "../NifGUI.h" -#include "../NifPlugins.h" +#include "NifGUI.h" +#include "NifPlugins.h" #define FurnitureMarker_CLASS_ID Class_ID(0x5a38017d, 0x4006a661) diff --git a/NifFurniture/NifFurniture.def b/NifFurniture/NifFurniture.def index bf68788..739e3de 100755 --- a/NifFurniture/NifFurniture.def +++ b/NifFurniture/NifFurniture.def @@ -1,4 +1,3 @@ -LIBRARY NifFurniture EXPORTS LibDescription @1 LibNumberClasses @2 diff --git a/NifFurniture/NifFurniture_VC80.vcproj b/NifFurniture/NifFurniture_VC80.vcproj new file mode 100644 index 0000000..632c21c --- /dev/null +++ b/NifFurniture/NifFurniture_VC80.vcproj @@ -0,0 +1,667 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NifFurniture" + ProjectGUID="{746EF66A-D67C-4D9A-9A0D-697952E9FFCD}" + RootNamespace="NifFurniture" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifFurniture.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib manipsys.lib paramblk2.lib" + OutputFile="C:\3dsmax8\plugins\NifFurniture.dlo" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile=".\NifFurniture.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifFurniture.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib manipsys.lib paramblk2.lib" + OutputFile="c:\3dsmax8\plugins\NifFurniture.dlo" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile=".\NifFurniture.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifFurniture.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib manipsys.lib paramblk2.lib" + OutputFile="c:\3dsmax6\plugins\NifFurniture.dlo" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile=".\NifFurniture.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifFurniture.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib manipsys.lib paramblk2.lib" + OutputFile="c:\3dsmax6\plugins\NifFurniture.dlo" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile=".\NifFurniture.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Release - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifFurniture.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib manipsys.lib paramblk2.lib" + OutputFile="c:\3dsmax7\plugins\NifFurniture.dlo" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile=".\NifFurniture.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifFurniture.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib manipsys.lib paramblk2.lib" + OutputFile="c:\3dsmax7\plugins\NifFurniture.dlo" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile=".\NifFurniture.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath=".\DllEntry.cpp" + > + </File> + <File + RelativePath=".\NifFurniture.cpp" + > + </File> + <File + RelativePath=".\NifFurniture.def" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="FurnitureMarkers.h" + > + </File> + <File + RelativePath=".\NifFurniture.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + <File + RelativePath=".\NifFurniture.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/NifImport/ImportCollision.cpp b/NifImport/ImportCollision.cpp new file mode 100644 index 0000000..6455210 --- /dev/null +++ b/NifImport/ImportCollision.cpp @@ -0,0 +1,210 @@ +/********************************************************************** +*< +FILE: ImportMeshAndSkin.cpp + +DESCRIPTION: Mesh and Skin Import routines + +CREATED BY: tazpn (Theo) + +HISTORY: + +*> Copyright (c) 2006, All Rights Reserved. +**********************************************************************/ +#include "stdafx.h" +#include "MaxNifImport.h" +#include "obj\bhkCollisionObject.h" +#include "obj\bhkBlendCollisionObject.h" +#include "obj\bhkRigidBody.h" +#include "obj\bhkShape.h" +#include "obj\bhkSphereShape.h" +#include "obj\bhkCapsuleShape.h" +#include "NifPlugins.h" + +using namespace Niflib; + +static Class_ID SCUBA_CLASS_ID(0x6d3d77ac, 0x79c939a9); +enum +{ + CAPSULE_RADIUS = 0, + CAPSULE_HEIGHT = 1, + CAPSULE_CENTERS = 2, +}; + +struct CollisionImport +{ + CollisionImport(NifImporter& parent) : ni(parent) {} + + NifImporter ∋ + + bool ImportRigidBody(bhkRigidBodyRef rb, INode* node); + + bool ImportShape(bhkRigidBodyRef body, bhkShapeRef shape, INode* parent); + bool ImportSphere(bhkRigidBodyRef body, bhkSphereShapeRef shape, INode *parent); + bool ImportCapsule(bhkRigidBodyRef body, bhkCapsuleShapeRef shape, INode *parent); +}; + +bool NifImporter::ImportCollision(NiNodeRef node) +{ + bool ok = false; + if (!enableCollision) + return false; +#ifdef USE_UNSUPPORTED_CODE + // Currently only support the Oblivion bhk basic objects + NiCollisionObjectRef collObj = node->GetCollisionObject(); + if (collObj) + { + CollisionImport ci(*this); + if (INode *inode = FindINode(gi, collObj->GetParent())) + { + NiObjectRef body = collObj->GetBody(); + if (body->IsDerivedType(bhkRigidBody::TypeConst())) + { + ci.ImportRigidBody(bhkRigidBodyRef(body), inode); + } + } + } +#endif + return ok; +} + + +bool CollisionImport::ImportRigidBody(bhkRigidBodyRef body, INode* node) +{ + if (body == NULL) + return false; + + int lyr = body->GetLayer(); + //body->GetLayerCopy(lyr); + int msys = body->GetMotionSystem(); + int qtype = body->GetQualityType(); + float mass = body->GetMass(); + float lindamp = body->GetLinearDamping(); + float angdamp = body->GetAngularDamping(); + float frict = body->GetFriction(); + float resti = body->GetRestitution(); + float maxlinvel = body->GetMaxLinearVelocity(); + float maxangvel = body->GetMaxAngularVelocity(); + float pendepth = body->GetPenetrationDepth(); + Vector3 center = body->GetCenter(); + + // Update node + npSetProp(node, NP_HVK_LAYER, lyr); + //npSetProp(node, NP_HVK_MATERIAL, mtl); + npSetProp(node, NP_HVK_MOTION_SYSTEM, msys); + npSetProp(node, NP_HVK_QUALITY_TYPE, qtype); + npSetProp(node, NP_HVK_MASS, mass); + npSetProp(node, NP_HVK_LINEAR_DAMPING, lindamp); + npSetProp(node, NP_HVK_ANGULAR_DAMPING, angdamp); + npSetProp(node, NP_HVK_FRICTION, frict); + npSetProp(node, NP_HVK_RESTITUTION, resti); + npSetProp(node, NP_HVK_MAX_LINEAR_VELOCITY, maxlinvel); + npSetProp(node, NP_HVK_MAX_ANGULAR_VELOCITY, maxangvel); + npSetProp(node, NP_HVK_PENETRATION_DEPTH, pendepth); + npSetProp(node, NP_HVK_CENTER, center); + + if (bhkShapeRef shape = body->GetShape()) { + ImportShape(body, shape, node); + } + return true; +} + +bool CollisionImport::ImportShape(bhkRigidBodyRef body, bhkShapeRef shape, INode* node) +{ + if (shape->IsDerivedType(bhkCapsuleShape::TypeConst())) + { + return ImportCapsule(body, bhkCapsuleShapeRef(shape), node); + } + else if (shape->IsDerivedType(bhkSphereShape::TypeConst())) + { + return ImportSphere(body, bhkSphereShapeRef(shape), node); + } + return false; +} + +bool CollisionImport::ImportSphere(bhkRigidBodyRef body, bhkSphereShapeRef shape, INode *parent) +{ + bool ok = false; + if (SimpleObject *ob = (SimpleObject *)ni.gi->CreateInstance(GEOMOBJECT_CLASS_ID, Class_ID(SPHERE_CLASS_ID, 0))) { + float radius = shape->GetRadius(); + + RefTargetHandle t = ob->GetReference(0); + setMAXScriptValue(t, "radius", 0, radius); + + if (INode *n = ni.gi->CreateObjectNode(ob)) { + TSTR name = "bhk"; + name.Append(parent->GetName()); + n->SetName(name); + + // Need to "Affect Pivot Only" and "Center to Object" first + n->CenterPivot(0, FALSE); + + Point3 pos = TOPOINT3(body->GetTranslation()) * ni.bhkScaleFactor; + Point3 center = TOPOINT3(body->GetCenter()); + Quat rot = TOQUAT(body->GetRotation()); + PosRotScaleNode(n, pos, rot, ni.bhkScaleFactor, prsDefault); + + n->SetPrimaryVisibility(FALSE); + n->SetSecondaryVisibility(FALSE); + n->BoneAsLine(TRUE); + n->SetRenderable(FALSE); + n->XRayMtl(TRUE); + + parent->AttachChild(n); + ok = true; + } + } + return ok; +} + +bool CollisionImport::ImportCapsule(bhkRigidBodyRef body, bhkCapsuleShapeRef shape, INode *parent) +{ + bool ok = false; + if (SimpleObject *ob = (SimpleObject *)ni.gi->CreateInstance(GEOMOBJECT_CLASS_ID, SCUBA_CLASS_ID)) { + float radius = shape->GetRadius(); + float radius1 = shape->GetRadius1(); + float radius2 = shape->GetRadius2(); + Point3 pt1 = TOPOINT3(shape->GetFirstPoint()); + Point3 pt2 = TOPOINT3(shape->GetSecondPoint()); + float height = Length(pt1-pt2); + int heighttype = 1; + + RefTargetHandle t = ob->GetReference(0); + + IParamArray *params = ob->GetParamBlock(); + params->SetValue(ob->GetParamBlockIndex(CAPSULE_RADIUS), 0, radius); + params->SetValue(ob->GetParamBlockIndex(CAPSULE_HEIGHT), 0, height); + params->SetValue(ob->GetParamBlockIndex(CAPSULE_CENTERS), 0, heighttype); + + //setMAXScriptValue(t, "radius", 0, radius); + //setMAXScriptValue(t, "height", 0, height); + //setMAXScriptValue(t, "heighttype", 0, heighttype); + + if (INode *n = ni.gi->CreateObjectNode(ob)) { + TSTR name = "bhk"; + name.Append(parent->GetName()); + n->SetName(name); + + // Need to "Affect Pivot Only" and "Center to Object" first + //n->CenterPivot(0, FALSE); + + Point3 pos = TOPOINT3(body->GetTranslation()) * ni.bhkScaleFactor; + Point3 center = TOPOINT3(body->GetCenter()); + Quat rot = TOQUAT(body->GetRotation()); + float ang[] = { 0.0f, TORAD(-90.0f), TORAD(180.0f) }; + Quat q; EulerToQuat(ang, q); + rot *= q; + + PosRotScaleNode(n, pos, rot, ni.bhkScaleFactor, prsDefault); + + n->SetPrimaryVisibility(FALSE); + n->SetSecondaryVisibility(FALSE); + n->BoneAsLine(TRUE); + n->SetRenderable(FALSE); + n->XRayMtl(TRUE); + + parent->AttachChild(n); + ok = true; + } + } + return ok; +} \ No newline at end of file diff --git a/NifImport/ImportMtlAndTex.cpp b/NifImport/ImportMtlAndTex.cpp index 038520d..838ba00 100644 --- a/NifImport/ImportMtlAndTex.cpp +++ b/NifImport/ImportMtlAndTex.cpp @@ -103,7 +103,6 @@ bool NifImporter::ImportMaterialAndTextures(ImpNode *node, NiAVObjectRef avObjec if (Texmap* tex = CreateTexture(texRef->GetTexture(GLOSS_MAP))) m->SetSubTexmap(ID_SS, tex); } - // Self illumination if (texRef->HasTexture(GLOW_MAP)) { if (Texmap* tex = CreateTexture(texRef->GetTexture(GLOW_MAP))) diff --git a/NifImport/ImportSkeleton.cpp b/NifImport/ImportSkeleton.cpp index 799771b..69038d7 100644 --- a/NifImport/ImportSkeleton.cpp +++ b/NifImport/ImportSkeleton.cpp @@ -554,7 +554,7 @@ void NifImporter::ImportBones(NiNodeRef node, bool recurse) vector<NiNodeRef> childNodes = DynamicCast<NiNode>(children); NiAVObject::CollisionType cType = node->GetCollision(); - if (cType == NiAVObject::ctBoundingBox && children.empty() && name=="Bounding Box") + if (cType == NiAVObject::CT_BOUNDINGBOX && children.empty() && name=="Bounding Box") return; NiNodeRef parent = node->GetParent(); @@ -622,6 +622,12 @@ void NifImporter::ImportBones(NiNodeRef node, bool recurse) } } } + // Import UPB + if (bone) ImportUPB(bone, node); + + // Import Havok Collision Data surrounding node + ImportCollision(node); + if (bone && recurse) { ImportBones(childNodes); @@ -634,4 +640,32 @@ void NifImporter::ImportBones(NiNodeRef node, bool recurse) catch( ... ) { } +} + +bool NifImporter::ImportUPB(INode *node, Niflib::NiNodeRef block) +{ + bool ok = false; + if (node && block) + { + list<NiStringExtraDataRef> strings = DynamicCast<NiStringExtraData>(block->GetExtraData()); + for (list<NiStringExtraDataRef>::iterator itr = strings.begin(); itr != strings.end(); ++itr){ + if (strmatch((*itr)->GetName(), "UserPropBuffer") || strmatch((*itr)->GetName(), "UPB")) { + char buffer[1048], *line = buffer; + istringstream istr((*itr)->GetData(), ios_base::out); + while (!istr.eof()) { + line[0] = 0; + istr.getline(buffer, _countof(buffer)-1); + if (LPTSTR equals = _tcschr(line, TEXT('='))){ + *equals++ = 0; + Trim(line), Trim(equals); + if (line[0] && equals[0]){ + node->SetUserPropString(TSTR(line), TSTR(equals)); + ok |= true; + } + } + } + } + } + } + return ok; } \ No newline at end of file diff --git a/NifImport/MaxNifImport_VC80.vcproj b/NifImport/MaxNifImport_VC80.vcproj new file mode 100644 index 0000000..204c390 --- /dev/null +++ b/NifImport/MaxNifImport_VC80.vcproj @@ -0,0 +1,807 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="MaxNifImport" + ProjectGUID="{283FC287-9AF1-4F34-9B74-2376FE3C2FCD}" + RootNamespace="MaxNifImport" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + WholeProgramOptimization="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + CommandLine="" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\MaxNifImport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib bmm.lib niflib.lib" + OutputFile="C:\3dsmax6\plugins\MaxNifImport.dli" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile=".\MaxNifImport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\MaxNifImport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /Zm200" + Optimization="0" + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_UNSUPPORTED_CODE" + GeneratePreprocessedFile="0" + MinimalRebuild="true" + ExceptionHandling="2" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib bmm.lib niflibd.lib" + OutputFile="C:\3dsmax6\plugins\MaxNifImport.dli" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + IgnoreDefaultLibraryNames="msvcrtd.lib" + ModuleDefinitionFile=".\MaxNifImport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + <Configuration + Name="Release - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + WholeProgramOptimization="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + CommandLine="" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\MaxNifImport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_BIPED" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib bmm.lib niflib.lib" + OutputFile="C:\3dsmax7\plugins\MaxNifImport.dli" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile=".\MaxNifImport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\MaxNifImport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_UNSUPPORTED_CODE;USE_BIPED" + GeneratePreprocessedFile="0" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib bmm.lib niflibd.lib" + OutputFile="C:\3dsmax7\plugins\MaxNifImport.dli" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + IgnoreDefaultLibraryNames="msvcrtd.lib" + ModuleDefinitionFile=".\MaxNifImport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + <Configuration + Name="Release - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + WholeProgramOptimization="0" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + CommandLine="" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\MaxNifImport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_BIPED" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib bmm.lib niflib.lib" + OutputFile="C:\3dsmax8\plugins\MaxNifImport.dli" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile=".\MaxNifImport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\MaxNifImport.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD /Zm200" + Optimization="0" + InlineFunctionExpansion="2" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;USE_NIFLIB_TEMPLATE_HELPERS;_USE_MATH_DEFINES;USE_UNSUPPORTED_CODE;USE_BIPED" + GeneratePreprocessedFile="0" + MinimalRebuild="true" + ExceptionHandling="2" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="2" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib paramblk2.lib bmm.lib niflibd.lib" + OutputFile="C:\3dsmax8\plugins\MaxNifImport.dli" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + IgnoreDefaultLibraryNames="msvcrtd.lib" + ModuleDefinitionFile=".\MaxNifImport.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath=".\DllEntry.cpp" + > + </File> + <File + RelativePath=".\MaxNifImport.def" + > + </File> + <File + RelativePath=".\stdafx.cpp" + > + <FileConfiguration + Name="Release - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Release - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="1" + /> + </FileConfiguration> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath=".\KFImporter.h" + > + </File> + <File + RelativePath=".\objectParams.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + <File + RelativePath=".\stdafx.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + <File + RelativePath=".\MaxNifImport.rc" + > + </File> + </Filter> + <Filter + Name="Importer" + > + <File + RelativePath=".\BaseImporter.h" + > + </File> + <File + RelativePath=".\ImportAnimation.cpp" + > + </File> + <File + RelativePath=".\ImportCollision.cpp" + > + </File> + <File + RelativePath=".\ImportMeshAndSkin.cpp" + > + </File> + <File + RelativePath=".\ImportMtlAndTex.cpp" + > + </File> + <File + RelativePath=".\ImportSkeleton.cpp" + > + </File> + <File + RelativePath=".\KFImporter.cpp" + > + </File> + <File + RelativePath=".\KFMImporter.cpp" + > + </File> + <File + RelativePath=".\KFMImporter.h" + > + </File> + <File + RelativePath=".\MaxNifImport.cpp" + > + <FileConfiguration + Name="Debug - Max 6|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 7|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="2" + /> + </FileConfiguration> + <FileConfiguration + Name="Debug - Max 8|Win32" + > + <Tool + Name="VCCLCompilerTool" + UsePrecompiledHeader="2" + /> + </FileConfiguration> + </File> + <File + RelativePath=".\MaxNifImport.h" + > + </File> + <File + RelativePath=".\NIFImport.cpp" + > + </File> + <File + RelativePath=".\NIFImporter.h" + > + </File> + </Filter> + <File + RelativePath="..\MaxNifPlugins_Readme.txt" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/NifImport/MaxNifTools.ini b/NifImport/MaxNifTools.ini deleted file mode 100644 index 4ec1a55..0000000 --- a/NifImport/MaxNifTools.ini +++ /dev/null @@ -1,135 +0,0 @@ -; -; Niftools Max tools configuration file -; -[System] -; ShortDescription used in the -ShortDescription=Netimmerse/Gamebryo -; KnownApplications - Used to indicate which sections in the ini file point -; to "Applications" which have their own settings in a section below. -KnownApplications=Oblivion;Morrowind;Civ4;DAoC -; Reparse the Applications (and therefore Texture directory cache) on every import/export -Reparse=0 - -[MaxNifImport] -; Current Application to get setting/directory information from. Should match KnownApps above or Auto. -; Auto will check the import file against the known root paths use that app if a directory match is found. -CurrentApp=Auto -; Wildcard to use on all NiNodes to test whether a biped may be used. Default: Bip* -SkeletonCheck=Bip* -; Use Bones or Biped. Biped is broken right now so use bones or nothing. Default: 0 -UseBiped=0 -; Flip the V coordinate. Default: 1 -FlipUVTextures=1 -; Show Textures in the Viewport. Default: 1 -ShowTextures=1 -; Enable AutoSmooth on meshes. Default: 1 -EnableAutoSmooth=1 -; AutoSmooth angle. Default: 30 -AutoSmoothAngle=30.0 -; Remove Double/Illegal faces on meshes on import -RemoveDoubleFaces=1 -RemoveIllegalFaces=1 -; EnableSkinSupport attempt to skin the mesh if bones are available -EnableSkinSupport=1 - -[BipedImport] -; Top level bone import setting. Default:1 -ImportBones=1 -; Biped Height. Default: 131.90 -BipedHeight=131.90 -; Biped initial rotation. Default: 90.0 -BipedAngle=90.0 -; Biped Ankle Attach. Default: 0.2 -BipedAnkleAttach=0.2 -; Use Triangle Pelvis. Default: 0 -BipedTrianglePelvis=0 -; Remove unused bones from the biped on import of a mesh. Default: 0 -RemoveUnusedImportedBones=0 -; Minimum Bone Width / Maximum Bone Width / Ratio of Width to Length -MinBoneWidth=0.001 -MaxBoneWidth=0.1 -BoneWidthToLengthRatio=0.01 -; Force nub to point back to parent at expense of loss of rotation data. Default: 1 -ForceRotation=0 -; Browse for skeleton on import. Default: 1 -BrowseForSkeleton=1 -; DefaultName for Skeletons (use if in same directory as imported nif) -DefaultSkeletonName=skeleton.nif - -; Create Dummy nodes for bones that appear to be helper objects. Default: 0 -CreateNubsForBones=0 -; Dummy nodes wildcard matching. (Hide these when not created as Dummy) Default: Bip??;Bip* NonAccum -DummyNodeMatches=Bip??;* NonAccum -; Make Billboard nodes to Dummy nodes rather than bones. Default: 1 -ConvertBillboardsToDummyNodes=1 -; Add Bones not controlled by a controller as dummy. Default: 1 -UncontrolledDummies=1 - -[AnimationImport] -; Enable Animation Import. Default: 1 -EnableAnimations=1 -; Require Multiple Keys to be present to before importing animation. (Kludge to workaround DOaC issues.) Default: 1 -RequireMultipleKeys=1 -; Replace TCB Rotation with Bezier (workaround for unexpected behavior with TCB rotations) -ReplaceTCBRotationWithBezier=1 -; Apply the overall transform to skin and bones. Default: 1 -ApplyOverallTransformToSkinAndBones=1 - -; [Applications] -; RootPaths - Semicolon separated list of base directories to use when determining which app the imported file is from -; -; TextureRootPaths - Semicolon separated list of base directories to look for texturefiles -; TextureExtensions - Extensions to scan for when using TextureSearchPaths -; TextureSeachPaths - Semicolon separated list of directories to look recursively for files in -; -; UseSkeleton - Whether to use skeleton. Default: 0 -; Skeleton - Default Skeleton to use when importing oblivion meshes -; GoToSkeletonBindPosition - Morrowind trishape data is not in the correct bind position for import. Default: 1 - -[Oblivion] -; Installation Folder -InstallPath=[HKLM\SOFTWARE\Bethesda Softworks\Oblivion]=@"Installed Path" -ExtractFolder=E:\Nifs\Oblivion - -RootPath=${InstallPath}\Data -MeshRootPath=${ExtractFolder}\Oblivion - Meshes -TextureRootPath=${ExtractFolder}\Oblivion - Textures - Compressed -UseSkeleton=1 -Skeleton=${MeshRootPath}\meshes\characters\_male\skeleton.nif -RootPaths=${RootPath};${MeshRootPath};${TextureRootPath} -TextureRootPaths=${RootPath};${TextureRootPath} -TextureExtensions=.dds; -TextureSearchPaths=${RootPath}\Textures;${TextureRootPath}\Textures\Characters;${TextureRootPath}\Textures\Armor -GoToSkeletonBindPosition=1 - -[Morrowind] -InstallPath=[HKLM\SOFTWARE\Bethesda Softworks\Morrowind]=@"Installed Path" -RootPath=${InstallPath}\Data Files -ExtractFolder=E:\Nifs\Morrowind\Data Files -RootPaths=${RootPath};${ExtractFolder} -TextureRootPaths=${RootPath}\Textures;${ExtractFolder}\Textures -TextureExtensions=.tga; -TextureSearchPaths=${RootPath}\Textures -GoToSkeletonBindPosition=1 - -[Civ4] -InstallPath=[HKEY_LOCAL_MACHINE\SOFTWARE\Firaxis Games\Sid Meier's Civilization 4]=@"INSTALLDIR" -RootPath= -ExtractFolder=C:\Projects\Main\Civilization4\assets -RootPaths=${ExtractFolder};${InstallPath}\Assets;${InstallPath}\Mods;%USERPROFILE%\My Documents\My Games\Civilization 4\CustomAssets;%USERPROFILE%\My Documents\My Games\Civilization 4\Mods -TextureRootPaths=$(ExtractFolder)\art\shared\ -TextureExtensions=.dds;.bmp -TextureSearchPaths= -GoToSkeletonBindPosition=1 -DummyNodeMatches=MD;Bip;Bip??;* NonAccum;Effect*;Sound*;Dummy* - -[DAoC] -Isles_InstallPath=[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Dark Age of Camelot - Shrouded Isles_is1]=@"InstallLocation" -RootPath= -ExtractFolder= -RootPaths=${Isles_InstallPath};${ExtractFolder} -TextureRootPaths=$(ExtractFolder) -TextureExtensions=.dds;.bmp;.tga -TextureSearchPaths= -GoToSkeletonBindPosition=1 -ApplyOverallTransformToSkinAndBones=0 \ No newline at end of file diff --git a/NifImport/NIFImport.cpp b/NifImport/NIFImport.cpp index 954e4cf..f02484a 100644 --- a/NifImport/NIFImport.cpp +++ b/NifImport/NIFImport.cpp @@ -20,6 +20,7 @@ LPCTSTR NifImportSection = TEXT("MaxNifImport"); LPCTSTR SystemSection = TEXT("System"); LPCTSTR BipedImportSection = TEXT("BipedImport"); LPCTSTR AnimImportSection = TEXT("AnimationImport"); +LPCTSTR CollisionSection = TEXT("Collision"); class IBipMaster; IBipMaster * (_cdecl * Max8CreateNewBiped)(float,float,class Point3 const &,int,int,int,int,int,int,int,int,int,int,int,int,float,int,int,int,int,int,int,int,int) = 0; @@ -114,17 +115,19 @@ void NifImporter::LoadIniSettings() appSettings = &TheAppSettings.front(); } + // General System level useBiped = GetIniValue<bool>(NifImportSection, "UseBiped", false); skeletonCheck = GetIniValue<string>(NifImportSection, "SkeletonCheck", "Bip*"); showTextures = GetIniValue<bool>(NifImportSection, "ShowTextures", true); - removeIllegalFaces = GetIniValue<bool>(NifImportSection, "RemoveIllegalFaces", true); removeDegenerateFaces = GetIniValue<bool>(NifImportSection, "RemoveDegenerateFaces", true); enableAutoSmooth = GetIniValue<bool>(NifImportSection, "EnableAutoSmooth", true); autoSmoothAngle = GetIniValue<float>(NifImportSection, "AutoSmoothAngle", 30.0f); flipUVTextures = GetIniValue<bool>(NifImportSection, "FlipUVTextures", true); enableSkinSupport = GetIniValue<bool>(NifImportSection, "EnableSkinSupport", true); + enableCollision = GetIniValue<bool>(NifImportSection, "EnableCollision", true); + // Biped importBones = GetIniValue<bool>(BipedImportSection, "ImportBones", true); bipedHeight = GetIniValue<float>(BipedImportSection, "BipedHeight", 131.90f); bipedAngle = GetIniValue<float>(BipedImportSection, "BipedAngle", 90.0f); @@ -142,11 +145,15 @@ void NifImporter::LoadIniSettings() convertBillboardsToDummyNodes = GetIniValue<bool>(BipedImportSection, "ConvertBillboardsToDummyNodes", true); uncontrolledDummies = GetIniValue<bool>(BipedImportSection, "UncontrolledDummies", true); + // Animation replaceTCBRotationWithBezier = GetIniValue<bool>(AnimImportSection, "ReplaceTCBRotationWithBezier", true); enableAnimations = GetIniValue<bool>(AnimImportSection, "EnableAnimations", true); requireMultipleKeys = GetIniValue<bool>(AnimImportSection, "RequireMultipleKeys", true); applyOverallTransformToSkinAndBones = GetIniValue<bool>(AnimImportSection, "ApplyOverallTransformToSkinAndBones", true); + // Collision + bhkScaleFactor = GetIniValue<float>(CollisionSection, "bhkScaleFactor", 7.0f); + goToSkeletonBindPosition = false; // Override specific settings if (appSettings) { @@ -219,8 +226,13 @@ bool NifImporter::DoImport() NifImporter skelImport(skeleton.c_str(), i, gi, suppressPrompts); if (skelImport.isValid()) { + // Enable Skeleton specific items skelImport.isBiped = true; skelImport.importBones = true; + // Disable undesirable skeleton items + skelImport.enableCollision = false; + skelImport.enableAnimations = false; + skelImport.DoImport(); if (!skelImport.useBiped && removeUnusedImportedBones) importedBones = GetNamesOfNodes(skelImport.nodes); diff --git a/NifImport/NIFImporter.h b/NifImport/NIFImporter.h index 015a62e..4f543ed 100644 --- a/NifImport/NIFImporter.h +++ b/NifImport/NIFImporter.h @@ -28,6 +28,7 @@ public: bool flipUVTextures; bool enableSkinSupport; bool goToSkeletonBindPosition; + bool enableCollision; // Biped/Bones related settings bool importBones; @@ -59,6 +60,9 @@ public: bool requireMultipleKeys; bool applyOverallTransformToSkinAndBones; + // Collision settings + float bhkScaleFactor; + vector<Niflib::NiObjectRef> blocks; vector<Niflib::NiNodeRef> nodes; map<string,int> ctrlCount; // counter for number of controllers referencing a node @@ -81,6 +85,8 @@ public: bool ImportMeshes(Niflib::NiNodeRef block); string FindImage(const string& name); + bool ImportUPB(INode *node, Niflib::NiNodeRef block); + void SetTrangles(Mesh& mesh, vector<Niflib::Triangle>& v, bool hasTexture); bool ImportMesh(Niflib::NiTriShapeRef triShape); bool ImportMesh(Niflib::NiTriStripsRef triStrips); @@ -93,6 +99,9 @@ public: INode *CreateBone(const string& name, Point3 startPos, Point3 endPos, Point3 zAxis); INode *CreateHelper(const string& name, Point3 startPos); + // Primary Collision entry point. Tests for bhk objects + bool ImportCollision(Niflib::NiNodeRef node); + INode *GetNode(Niflib::NiNodeRef node); virtual bool DoImport(); diff --git a/NifPlugins_Development_Readme.txt b/NifPlugins_Development_Readme.txt new file mode 100644 index 0000000..ce1fa50 --- /dev/null +++ b/NifPlugins_Development_Readme.txt @@ -0,0 +1,47 @@ + NifPlugins for 3ds Max + ====================== + + This document describes the how to setup your build environment to use this + project. + + Report problems and ask questions here: + + http://niftools.sourceforge.net/forum/viewforum.php?f=6 + + A tutorial on how to use the exporter and utility plugins can be found here: + + http://www.silgrad.com/wbb2/thread.php?threadid=2477 + + Enjoy! + + + Requirements + ------------ + Microsoft Visual Studio 2005 + - Visual C++ Express Edition + URL: http://msdn.microsoft.com/vstudio/express/visualc/download/ + + Installation + ------------ + + + Copyright + --------- + + Copyright (c) 2006, NIF File Format Library and Tools. All rights reserved. + + Legal + ----- + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. diff --git a/NifPlugins_VC80.sln b/NifPlugins_VC80.sln new file mode 100644 index 0000000..b3f9085 --- /dev/null +++ b/NifPlugins_VC80.sln @@ -0,0 +1,122 @@ +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NifExport", "NifExport\NifExport_VC80.vcproj", "{E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}" + ProjectSection(ProjectDependencies) = postProject + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} = {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E} = {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NifProps", "NifProps\NifProps_VC80.vcproj", "{520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}" + ProjectSection(ProjectDependencies) = postProject + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} = {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NifFurniture", "NifFurniture\NifFurniture_VC80.vcproj", "{746EF66A-D67C-4D9A-9A0D-697952E9FFCD}" + ProjectSection(ProjectDependencies) = postProject + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} = {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NIFlib", "..\niflib\niflib.vcproj", "{19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaxNifImport", "NifImport\MaxNifImport_VC80.vcproj", "{283FC287-9AF1-4F34-9B74-2376FE3C2FCD}" + ProjectSection(ProjectDependencies) = postProject + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} = {E29131BC-410F-4B9B-B48F-6EED5D3B68A4} + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E} = {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NifCommon", "NifCommon\NifCommon_VC80.vcproj", "{E29131BC-410F-4B9B-B48F-6EED5D3B68A4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{50B67748-0DFB-45B0-BF1F-E80135EE3823}" + ProjectSection(SolutionItems) = preProject + MaxNifPlugins_Readme.txt = MaxNifPlugins_Readme.txt + MaxNifTools.ini = MaxNifTools.ini + NifPlugins_Development_Readme.txt = NifPlugins_Development_Readme.txt + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug - Max 6|Win32 = Debug - Max 6|Win32 + Debug - Max 7|Win32 = Debug - Max 7|Win32 + Debug - Max 8|Win32 = Debug - Max 8|Win32 + Release - Max 6|Win32 = Release - Max 6|Win32 + Release - Max 7|Win32 = Release - Max 7|Win32 + Release - Max 8|Win32 = Release - Max 8|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Debug - Max 6|Win32.ActiveCfg = Debug - Max 6|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Debug - Max 6|Win32.Build.0 = Debug - Max 6|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Debug - Max 7|Win32.ActiveCfg = Debug - Max 7|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Debug - Max 7|Win32.Build.0 = Debug - Max 7|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Debug - Max 8|Win32.ActiveCfg = Debug - Max 8|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Debug - Max 8|Win32.Build.0 = Debug - Max 8|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Release - Max 6|Win32.ActiveCfg = Release - Max 6|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Release - Max 6|Win32.Build.0 = Release - Max 6|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Release - Max 7|Win32.ActiveCfg = Release - Max 7|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Release - Max 7|Win32.Build.0 = Release - Max 7|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Release - Max 8|Win32.ActiveCfg = Release - Max 8|Win32 + {E7CB76AA-6113-46BA-8EBC-8AE1D2B81210}.Release - Max 8|Win32.Build.0 = Release - Max 8|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Debug - Max 6|Win32.ActiveCfg = Debug - Max 6|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Debug - Max 6|Win32.Build.0 = Debug - Max 6|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Debug - Max 7|Win32.ActiveCfg = Debug - Max 7|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Debug - Max 7|Win32.Build.0 = Debug - Max 7|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Debug - Max 8|Win32.ActiveCfg = Debug - Max 8|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Debug - Max 8|Win32.Build.0 = Debug - Max 8|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Release - Max 6|Win32.ActiveCfg = Release - Max 6|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Release - Max 6|Win32.Build.0 = Release - Max 6|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Release - Max 7|Win32.ActiveCfg = Release - Max 7|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Release - Max 7|Win32.Build.0 = Release - Max 7|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Release - Max 8|Win32.ActiveCfg = Release - Max 8|Win32 + {520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}.Release - Max 8|Win32.Build.0 = Release - Max 8|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Debug - Max 6|Win32.ActiveCfg = Debug - Max 6|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Debug - Max 6|Win32.Build.0 = Debug - Max 6|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Debug - Max 7|Win32.ActiveCfg = Debug - Max 7|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Debug - Max 7|Win32.Build.0 = Debug - Max 7|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Debug - Max 8|Win32.ActiveCfg = Debug - Max 8|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Debug - Max 8|Win32.Build.0 = Debug - Max 8|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Release - Max 6|Win32.ActiveCfg = Release - Max 6|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Release - Max 6|Win32.Build.0 = Release - Max 6|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Release - Max 7|Win32.ActiveCfg = Release - Max 7|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Release - Max 7|Win32.Build.0 = Release - Max 7|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Release - Max 8|Win32.ActiveCfg = Release - Max 8|Win32 + {746EF66A-D67C-4D9A-9A0D-697952E9FFCD}.Release - Max 8|Win32.Build.0 = Release - Max 8|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 6|Win32.ActiveCfg = Debug - PCH|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 6|Win32.Build.0 = Debug - PCH|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 7|Win32.ActiveCfg = Debug - PCH|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 7|Win32.Build.0 = Debug - PCH|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 8|Win32.ActiveCfg = Debug - PCH|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Debug - Max 8|Win32.Build.0 = Debug - PCH|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 6|Win32.ActiveCfg = Release|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 6|Win32.Build.0 = Release|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 7|Win32.ActiveCfg = Release|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 7|Win32.Build.0 = Release|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 8|Win32.ActiveCfg = Release|Win32 + {19FD8EE6-79CC-4BAC-9744-D9573BE47C7E}.Release - Max 8|Win32.Build.0 = Release|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Debug - Max 6|Win32.ActiveCfg = Debug - Max 6|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Debug - Max 6|Win32.Build.0 = Debug - Max 6|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Debug - Max 7|Win32.ActiveCfg = Debug - Max 7|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Debug - Max 7|Win32.Build.0 = Debug - Max 7|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Debug - Max 8|Win32.ActiveCfg = Debug - Max 8|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Debug - Max 8|Win32.Build.0 = Debug - Max 8|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Release - Max 6|Win32.ActiveCfg = Release - Max 6|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Release - Max 6|Win32.Build.0 = Release - Max 6|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Release - Max 7|Win32.ActiveCfg = Release - Max 7|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Release - Max 7|Win32.Build.0 = Release - Max 7|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Release - Max 8|Win32.ActiveCfg = Release - Max 8|Win32 + {283FC287-9AF1-4F34-9B74-2376FE3C2FCD}.Release - Max 8|Win32.Build.0 = Release - Max 8|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Debug - Max 6|Win32.ActiveCfg = Debug - Max 6|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Debug - Max 6|Win32.Build.0 = Debug - Max 6|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Debug - Max 7|Win32.ActiveCfg = Debug - Max 7|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Debug - Max 7|Win32.Build.0 = Debug - Max 7|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Debug - Max 8|Win32.ActiveCfg = Debug - Max 8|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Debug - Max 8|Win32.Build.0 = Debug - Max 8|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Release - Max 6|Win32.ActiveCfg = Release - Max 6|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Release - Max 6|Win32.Build.0 = Release - Max 6|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Release - Max 7|Win32.ActiveCfg = Release - Max 7|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Release - Max 7|Win32.Build.0 = Release - Max 7|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Release - Max 8|Win32.ActiveCfg = Release - Max 8|Win32 + {E29131BC-410F-4B9B-B48F-6EED5D3B68A4}.Release - Max 8|Win32.Build.0 = Release - Max 8|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/NifProps/NifProps.cpp b/NifProps/NifProps.cpp index af7c5a8..62b11ae 100755 --- a/NifProps/NifProps.cpp +++ b/NifProps/NifProps.cpp @@ -3,8 +3,8 @@ #include <map> #include "NifProps.h" #include "NifStrings.h" -#include "../NifPlugins.h" -#include "../NifGui.h" +#include "NifPlugins.h" +#include "NifGui.h" using namespace std; @@ -222,17 +222,26 @@ void NifProps::selectionChanged() CheckDlgButton(mPanel, IDC_CHK_ISCOLL, isColl); int mtl, lyr, msys, qtype; - float mass, lindamp, angdamp, frict, maxlinvel, maxangvel; + float mass, lindamp, angdamp, frict, resti, maxlinvel, maxangvel; Vector3 center; + // Handle compatibility + npGetProp(nodeSel, NP_HVK_MASS_OLD, mass, NP_DEFAULT_HVK_EMPTY); + if (mass != NP_DEFAULT_HVK_EMPTY) + npGetProp(nodeSel, NP_HVK_MASS, mass, NP_DEFAULT_HVK_MASS); + npGetProp(nodeSel, NP_HVK_FRICTION_OLD, frict, NP_DEFAULT_HVK_EMPTY); + if (frict != NP_DEFAULT_HVK_EMPTY) + npGetProp(nodeSel, NP_HVK_FRICTION, frict, NP_DEFAULT_HVK_FRICTION); + npGetProp(nodeSel, NP_HVK_RESTITUTION_OLD, resti, NP_DEFAULT_HVK_EMPTY); + if (resti != NP_DEFAULT_HVK_EMPTY) + npGetProp(nodeSel, NP_HVK_RESTITUTION, resti, NP_DEFAULT_HVK_RESTITUTION); + npGetProp(nodeSel, NP_HVK_MATERIAL, mtl, NP_DEFAULT_HVK_MATERIAL); npGetProp(nodeSel, NP_HVK_LAYER, lyr, NP_DEFAULT_HVK_LAYER); npGetProp(nodeSel, NP_HVK_MOTION_SYSTEM, msys, NP_DEFAULT_HVK_MOTION_SYSTEM); npGetProp(nodeSel, NP_HVK_QUALITY_TYPE, qtype, NP_DEFAULT_HVK_QUALITY_TYPE); - npGetProp(nodeSel, NP_HVK_MASS, mass, NP_DEFAULT_HVK_MASS); npGetProp(nodeSel, NP_HVK_LINEAR_DAMPING, lindamp, NP_DEFAULT_HVK_LINEAR_DAMPING); npGetProp(nodeSel, NP_HVK_ANGULAR_DAMPING, angdamp, NP_DEFAULT_HVK_ANGULAR_DAMPING); - npGetProp(nodeSel, NP_HVK_FRICTION, frict, NP_DEFAULT_HVK_FRICTION); npGetProp(nodeSel, NP_HVK_MAX_LINEAR_VELOCITY, maxlinvel, NP_DEFAULT_HVK_FRICTION); npGetProp(nodeSel, NP_HVK_MAX_ANGULAR_VELOCITY, maxangvel, NP_DEFAULT_HVK_MAX_ANGULAR_VELOCITY); npGetProp(nodeSel, NP_HVK_CENTER, center); diff --git a/NifProps/NifProps.def b/NifProps/NifProps.def index 72419e5..739e3de 100755 --- a/NifProps/NifProps.def +++ b/NifProps/NifProps.def @@ -1,4 +1,3 @@ -LIBRARY NifProps EXPORTS LibDescription @1 LibNumberClasses @2 diff --git a/NifProps/NifProps_VC80.vcproj b/NifProps/NifProps_VC80.vcproj new file mode 100644 index 0000000..b2b9ed7 --- /dev/null +++ b/NifProps/NifProps_VC80.vcproj @@ -0,0 +1,668 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="8.00" + Name="NifProps" + ProjectGUID="{520EDC5D-6DCB-4D28-A858-7D5F5C7C7E9C}" + RootNamespace="NifProps" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Release - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifProps.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib" + OutputFile="c:\3dsmax8\plugins\NifProps.dlu" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile=".\NifProps.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 8|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifProps.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax8\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib" + OutputFile="c:\3dsmax8\plugins\NifProps.dlu" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax8\maxsdk\lib" + ModuleDefinitionFile=".\NifProps.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Debug - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifProps.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib" + OutputFile="c:\3dsmax6\plugins\NifProps.dlu" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile=".\NifProps.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release - Max 6|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifProps.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax6\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib" + OutputFile="c:\3dsmax6\plugins\NifProps.dlu" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax6\maxsdk\lib" + ModuleDefinitionFile=".\NifProps.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Release - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="NDEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Release\NifProps.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="2" + InlineFunctionExpansion="2" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + StringPooling="true" + ExceptionHandling="2" + RuntimeLibrary="0" + BufferSecurityCheck="false" + EnableFunctionLevelLinking="true" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib" + OutputFile="c:\3dsmax7\plugins\NifProps.dlu" + LinkIncremental="1" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile=".\NifProps.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + OptimizeForWindows98="1" + SetChecksum="true" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + CommandLine="xcopy /D /Y /I "$(TargetPath)" "$(OutDir)"" + /> + </Configuration> + <Configuration + Name="Debug - Max 7|Win32" + OutputDirectory="$(SolutionDir)Staging\$(ConfigurationName)" + IntermediateDirectory="$(SolutionDir)Temp\$(ProjectName)\$(ConfigurationName)" + ConfigurationType="2" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" + UseOfMFC="0" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + PreprocessorDefinitions="_DEBUG" + MkTypLibCompatible="true" + SuppressStartupBanner="true" + TargetEnvironment="1" + TypeLibraryName=".\Debug\NifProps.tlb" + /> + <Tool + Name="VCCLCompilerTool" + AdditionalOptions="/LD " + Optimization="0" + AdditionalIncludeDirectories="C:\3dsmax7\maxsdk\include;..\..\niflib;..\NifCommon" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" + ExceptionHandling="2" + RuntimeLibrary="1" + ForceConformanceInForLoopScope="false" + UsePrecompiledHeader="0" + WarningLevel="3" + SuppressStartupBanner="true" + DebugInformationFormat="3" + CompileAs="0" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG" + Culture="1033" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="odbc32.lib odbccp32.lib comctl32.lib shlwapi.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib" + OutputFile="c:\3dsmax7\plugins\NifProps.dlu" + LinkIncremental="2" + SuppressStartupBanner="true" + AdditionalLibraryDirectories="C:\3dsmax7\maxsdk\lib" + ModuleDefinitionFile=".\NifProps.def" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb" + SubSystem="2" + BaseAddress="0x16860000" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCWebDeploymentTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" + > + <File + RelativePath=".\DllEntry.cpp" + > + </File> + <File + RelativePath="NifProps.cpp" + > + </File> + <File + RelativePath="NifProps.def" + > + </File> + <File + RelativePath="NifProps.rc" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl" + > + <File + RelativePath="NifProps.h" + > + </File> + <File + RelativePath="NifStrings.h" + > + </File> + <File + RelativePath=".\resource.h" + > + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" + > + <File + RelativePath=".\NifProps.rc" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> -- GitLab