Parcourir la source

Merge remote-tracking branch 'BabylonJS/master'

Raanan Weber il y a 10 ans
Parent
commit
11f5e44d37
100 fichiers modifiés avec 24278 ajouts et 26862 suppressions
  1. 3 0
      .gitignore
  2. BIN
      Exporters/3ds Max/Max2Babylon-0.17.zip
  3. BIN
      Exporters/3ds Max/Max2Babylon-0.20.zip
  4. 0 98
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/action.js
  5. 0 234
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/actionkinds.js
  6. 0 141
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/contextmenu.js
  7. 0 152
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/fonts.css
  8. 0 210
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/index.css
  9. 0 207
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/index.html
  10. 0 284
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/list.js
  11. 0 307
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/parametersManager.js
  12. 0 216
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/utils.js
  13. 0 750
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/viewer.js
  14. 0 87
      Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/viewsertoolbar.js
  15. 1 1
      Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.cs
  16. 1 1
      Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.cs
  17. 5 5
      Exporters/3ds Max/Max2Babylon/GlobalUtility.cs
  18. 16 16
      Exporters/3ds Max/Max2Babylon/Tools/Tools.cs
  19. 115 46
      Exporters/Blender/io_export_babylon.py
  20. 8 1
      Exporters/Blender/readme.md
  21. 273 273
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk.h
  22. 419 419
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxalloc.h
  23. 238 247
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxarch.h
  24. 93 93
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxdebug.h
  25. 510 510
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxnew.h
  26. 97 97
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxstdcompliant.h
  27. 264 264
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxtypes.h
  28. 487 487
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxarray.h
  29. 90 90
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxbitset.h
  30. 95 95
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxcharptrset.h
  31. 213 213
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxcontainerallocators.h
  32. 324 324
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxdynamicarray.h
  33. 257 257
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxfile.h
  34. 80 80
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxfolder.h
  35. 411 411
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxhashmap.h
  36. 262 262
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxintrusivelist.h
  37. 408 408
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxmap.h
  38. 67 67
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxmemorypool.h
  39. 115 115
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxmultimap.h
  40. 62 62
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxpair.h
  41. 1398 1398
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxredblacktree.h
  42. 227 227
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxset.h
  43. 119 119
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxstatus.h
  44. 505 505
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxstring.h
  45. 368 368
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxstringlist.h
  46. 648 648
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxtime.h
  47. 99 99
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxtimecode.h
  48. 168 168
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxutils.h
  49. 166 166
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxclassid.h
  50. 312 312
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxconnectionpoint.h
  51. 267 267
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxdatatypes.h
  52. 94 94
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxemitter.h
  53. 188 188
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxevent.h
  54. 129 129
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxeventhandler.h
  55. 121 121
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxlistener.h
  56. 86 86
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxloadingstrategy.h
  57. 555 555
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxmanager.h
  58. 49 49
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxmodule.h
  59. 1617 1617
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxobject.h
  60. 96 96
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxperipheral.h
  61. 264 264
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxplugin.h
  62. 74 74
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxplugincontainer.h
  63. 1292 1286
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxproperty.h
  64. 146 146
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertydef.h
  65. 576 576
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertyhandle.h
  66. 1747 1736
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertypage.h
  67. 1178 1174
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertytypes.h
  68. 260 260
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxquery.h
  69. 57 57
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxqueryevent.h
  70. 58 58
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxscopedloadingdirectory.h
  71. 64 64
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxscopedloadingfilename.h
  72. 126 126
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxstream.h
  73. 135 135
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxsymbol.h
  74. 219 219
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxsystemunit.h
  75. 227 227
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxxref.h
  76. 340 340
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxaffinematrix.h
  77. 325 325
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxdualquaternion.h
  78. 512 501
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxmath.h
  79. 281 281
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxmatrix.h
  80. 333 333
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxquaternion.h
  81. 282 282
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxtransforms.h
  82. 259 259
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxvector2.h
  83. 324 324
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxvector4.h
  84. 58 58
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxatomic.h
  85. 44 44
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxclock.h
  86. 188 188
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxsync.h
  87. 99 99
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxthread.h
  88. 55 55
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_def.h
  89. 17 17
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_nsbegin.h
  90. 16 16
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_nsend.h
  91. 62 62
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_version.h
  92. 90 90
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladaanimationelement.h
  93. 277 277
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladaelement.h
  94. 127 127
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladaiostream.h
  95. 71 71
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladanamespace.h
  96. 472 472
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladatokens.h
  97. 370 370
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladautils.h
  98. 557 557
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxreadercollada14.h
  99. 570 570
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxwritercollada14.h
  100. 0 0
      Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/fbx/fbxio.h

+ 3 - 0
.gitignore

@@ -116,3 +116,6 @@ UpgradeLog*.XML
 /Exporters/3ds Max/Max2Babylon.sln.ide
 /Exporters/3ds Max/Max2Babylon.sln.ide
 /Exporters/ExportToBabylon.sln.ide
+
+# Do not ignore loaders/obj
+!loaders/*

BIN
Exporters/3ds Max/Max2Babylon-0.17.zip


BIN
Exporters/3ds Max/Max2Babylon-0.20.zip


+ 0 - 98
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/action.js

@@ -1,98 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="viewer.js" />
-/// <reference path="actionKinds.js" />
-
-var AB;
-(function (AB) {
-
-    var Node = (function () {
-        function Node() {
-            // Members
-            this.rect = null;
-            this.text = null;
-            this.line = null;
-
-            this.action = null;
-
-            this.detached = false;
-            this.minimized = false;
-        }
-
-        // Get node's object attribute
-        // element: The element to get the attribute
-        // attribute: the attribute name "text, "width", etc.
-        // value: optional, if not reading mode but writing mode
-        Node.prototype.attr = function(element, attribute, value) {
-            if (value)
-                element.attr(attribute, value);
-            else
-                return element.attr(attribute);
-        }
-
-        // Returns the point at (x, y) is inside the node
-        // x: the x position of the point
-        // y: the y position of the point
-        Node.prototype.isPointInside = function (x, y) {
-            return this.rect.isPointInside(x, y) || this.text.isPointInside(x, y);
-        }
-
-        return Node;
-    })();
-
-    var Action = (function() {
-        function Action(node) {
-            // Graph related
-            this.parent = null;
-            this.children = new Array();
-            this.node = node;
-
-            // Action
-            this.name = "";
-            this.type = AB.ActionsBuilder.Type.OBJECT;
-            this.propertiesResults = new Array();
-            this.properties = new Array();
-
-            // Extra
-            this.combine = false;
-            this.combineArray = new Array();
-            this.hub = null;
-        }
-
-        // Adds a child to the action
-        // object: the child
-        Action.prototype.addChild = function (object) {
-            if (object == null)
-                return false;
-
-            this.children.push(object);
-            object.parent = this;
-
-            return true;
-        }
-
-        // Removes a child from the action
-        // object: the child to remove
-        Action.prototype.removeChild = function (object) {
-            var indice = this.children.indexOf(object);
-
-            if (indice != -1) {
-                this.children.splice(indice, 1);
-                return true;
-            }
-
-            return false;
-        }
-
-        // Clears all the children of the action
-        Action.prototype.clearChildren = function () {
-            this.children = new Array();
-        }
-
-        return Action;
-
-    })();
-
-    AB.Action = Action;
-    AB.Node = Node;
-
-})(AB || (AB = { }));

+ 0 - 234
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/actionkinds.js

@@ -1,234 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="viewer.js" />
-/// <reference path="action.js" />
-/// <reference path="babylon.max.js" />
-
-var AB;
-(function (AB) {
-
-    var directActionTemplate = function (parameters, secondArgument) {
-        var template = [
-            { text: "target", value: "Object name?", targetType: "SceneProperties" }
-        ];
-
-        if (secondArgument)
-            template.push({text: secondArgument, value: "value..."});
-
-        if (parameters)
-            template.push.apply(template, parameters);
-
-        return template;
-    }
-
-    var directActionWidthPropertyPath = function (parameters) {
-        return directActionTemplate(parameters, "propertyPath");
-    }
-
-    var ActionsBuilder = (function () {
-        function ActionsBuilder()
-        { }
-
-        var engine = new BABYLON.Engine(document.getElementById("renderCanvas"), false);
-        var scene = new BABYLON.Scene(engine);
-        var camera = new BABYLON.Camera("empty_camera", BABYLON.Vector3.Zero(), scene);
-        var light = new BABYLON.PointLight("empty_light", BABYLON.Vector3.Zero(), scene);
-        var mesh = new BABYLON.Mesh("empty_mesh", scene);
-
-        ActionsBuilder.Engine = function () {
-            return engine;
-        }
-
-        ActionsBuilder.Scene = function () {
-            return scene;
-        }
-
-        ActionsBuilder.Camera = function () {
-            return camera;
-        }
-
-        ActionsBuilder.Light = function () {
-            return light;
-        }
-
-        ActionsBuilder.Mesh = function () {
-            return mesh;
-        }
-
-        //
-        // Types
-        //
-        ActionsBuilder.Type = ActionsBuilder.Type || {};
-        ActionsBuilder.Type.TRIGGER = 0;
-        ActionsBuilder.Type.ACTION = 1;
-        ActionsBuilder.Type.FLOW_CONTROL = 2;
-        ActionsBuilder.Type.OBJECT = 3;
-        ActionsBuilder.Type.SCENE = 4;
-
-        //
-        // Data types names
-        //
-        ActionsBuilder.DataTypesNames = ActionsBuilder.DataTypesNames || new Array();
-        ActionsBuilder.DataTypesNames.push({ name: "Scene", data: "SceneProperties" });
-        ActionsBuilder.DataTypesNames.push({ name: "Camera", data: "CameraProperties" });
-        ActionsBuilder.DataTypesNames.push({ name: "Light", data: "LightProperties" });
-        ActionsBuilder.DataTypesNames.push({ name: "Mesh", data: "MeshProperties" });
-
-        //
-        // Autorized data types
-        //
-        ActionsBuilder.Types = ActionsBuilder.Types || new Array();
-        ActionsBuilder.Types.push("Boolean");
-        ActionsBuilder.Types.push("Number");
-        ActionsBuilder.Types.push("Vector2");
-        ActionsBuilder.Types.push("Vector3");
-        ActionsBuilder.Types.push("String");
-
-        // Tests if the property type is in ActionsBuilder.Types
-        var testInstanceOf = function (object, propertyName) {
-            if (object == null || object.constructor == null)
-                return false;
-
-            if (propertyName.length > 0 && propertyName[0] == "_")
-                return false;
-
-            var name = object.constructor.toString().match(/function (\w*)/)[1];
-
-            for (var i = 0; i < ActionsBuilder.Types.length; i++) {
-                if (name == ActionsBuilder.Types[i])
-                    return true;
-            }
-
-            return false;
-        }
-
-        //
-        // Scene properties
-        //
-        ActionsBuilder.SceneProperties = ActionsBuilder.SceneProperties || new Array();
-        for (var thing in scene) {
-            if (testInstanceOf(scene[thing], thing)) {
-                ActionsBuilder.SceneProperties.push({ name: thing, type: typeof (scene[thing]) });
-            }
-        }
-
-        //
-        // Camera properties
-        //
-        ActionsBuilder.CameraProperties = ActionsBuilder.CameraProperties || new Array();
-        for (var thing in camera) {
-            if (testInstanceOf(camera[thing], thing)) {
-                ActionsBuilder.CameraProperties.push({ name: thing, type: typeof (camera[thing]) });
-            }
-        }
-
-        //
-        // Light properties
-        //
-        ActionsBuilder.LightProperties = ActionsBuilder.LightProperties || new Array();
-        for (var thing in light) {
-            if (testInstanceOf(light[thing], thing)) {
-                ActionsBuilder.LightProperties.push({ name: thing, type: typeof (light[thing]) });
-            }
-        }
-
-        //
-        // Mesh properties
-        //
-        ActionsBuilder.MeshProperties = ActionsBuilder.MeshProperties || new Array();
-        for (var thing in mesh) {
-            if (testInstanceOf(mesh[thing], thing)) {
-                ActionsBuilder.MeshProperties.push({ name: thing, type: typeof (mesh[thing]) });
-            }
-        }
-
-        //
-        // Scene properties (meshes, lights, etc)
-        //
-        ActionsBuilder.MeshesList = ActionsBuilder.MeshesList || new Array();
-        ActionsBuilder.LightsList = ActionsBuilder.LightsList || new Array();
-        ActionsBuilder.CamerasList = ActionsBuilder.CamerasList || new Array();
-        ActionsBuilder.SoundsList = ActionsBuilder.SoundsList || new Array();
-
-        //
-        // Triggers
-        //
-        ActionsBuilder.Trigger = ActionsBuilder.Trigger || {};
-        ActionsBuilder.Trigger[0] = { name: "NothingTrigger", properties: [] };
-        ActionsBuilder.Trigger[1] = { name: "OnPickTrigger", properties: [], description: "When the user clicks" };
-        ActionsBuilder.Trigger[2] = { name: "OnLeftPickTrigger", properties: [], description: "When the user left clicks" };
-        ActionsBuilder.Trigger[3] = { name: "OnRightPickTrigger", properties: [], description: "When the user right clicks" };
-        ActionsBuilder.Trigger[4] = { name: "OnCenterPickTrigger", properties: [], description: "When the user center clicks (mouse wheel)" };
-        ActionsBuilder.Trigger[5] = { name: "OnPointerOverTrigger", properties: [], description: "When the user's mouse is on the object" };
-        ActionsBuilder.Trigger[6] = { name: "OnPointerOutTrigger", properties: [], description: "When the user's mouse is out of the object" };
-        ActionsBuilder.Trigger[7] = { name: "OnEveryFrameTrigger", properties: [], description: "Called each frame (only on scene)" };
-        ActionsBuilder.Trigger[8] = { name: "OnIntersectionEnterTrigger", properties: [{ text: "parameter", value: "Object name?" }], description: "When the object intersects an other object" };
-        ActionsBuilder.Trigger[9] = { name: "OnIntersectionExitTrigger", properties: [{ text: "parameter", value: "Object name?" }], descripton: "When the object exists intersection with an other object" };
-        ActionsBuilder.Trigger[10] = { name: "OnKeyDownTrigger", properties: [{ text: "parameter:", value: "" }], description: "When the user push a key" };
-        ActionsBuilder.Trigger[11] = { name: "OnKeyUpTrigger", properties: [{ text: "parameter:", value: "" }], description: "When the user pushed a key" };
-        ActionsBuilder.Trigger.COUNT = 12;
-
-        //
-        // Actions (direct & interpolate)
-        //
-        ActionsBuilder.Action = ActionsBuilder.Action || {};
-        ActionsBuilder.Action[0] = { name: "SwitchBooleanAction", properties: directActionWidthPropertyPath(), description: "Switches a boolean value for a given parameter of the target object : true to false, or false to true" };
-        ActionsBuilder.Action[1] = { name: "SetStateAction", properties: directActionTemplate(null, "value"), description: "Sets a new state value of the target object (i.e \"off\" or \"on\")" };
-        ActionsBuilder.Action[2] = { name: "SetValueAction", properties: directActionWidthPropertyPath([{ text: "value", value: "value?" }]), description: "Sets a new value to the specified parameter of the object" };
-        ActionsBuilder.Action[3] = { name: "SetParentAction", properties: directActionTemplate([{ text: "parent", value: "object name?" }]), description: "Sets a new parent for the target object" };
-        ActionsBuilder.Action[4] = { name: "IncrementValueAction", properties: directActionWidthPropertyPath([{ text: "value", value: "value?" }]), description: "Increments the value of the given parameter for the target object. The value can be negative" };
-        ActionsBuilder.Action[5] = { name: "PlayAnimationAction", properties: directActionTemplate([{ text: "from", value: "0" }, { text: "to", value: "150" }, { text: "loop", value: "false" }]), description: "Plays the animation of the target object" };
-        ActionsBuilder.Action[6] = { name: "StopAnimationAction", properties: directActionTemplate(), description: "Stops the animation of the target object" };
-        ActionsBuilder.Action[7] = { name: "DoNothingAction", properties: [], description: "Does nothing, can be used to balance the actions graph" };
-        ActionsBuilder.Action[8] = {
-            name: "InterpolateValueAction", properties: directActionWidthPropertyPath([
-                { text: "value", value: "value" },
-                { text: "duration", value: "1000" },
-                { text: "stopOtherAnimations", value: "false" }]),
-            description: "Creates an animation (key frames) that animates the target object by modifying the given parameter to the target value"
-        };
-        ActionsBuilder.Action[9] = { name: "PlaySoundAction", properties: [{ text: "sound", value: "path to sound..." }], description: "Plays a sound giving it's path (name)" };
-        ActionsBuilder.Action[10] = { name: "StopSoundAction", properties: [{ text: "sound", value: "path to sound..." }], description: "Stops a sound giving it's path (name)" };
-        ActionsBuilder.Action[11] = { name: "CombineAction", properties: [], description: "Special action that combines multiple actions" };
-        ActionsBuilder.Action.COUNT = 12;
-
-        //
-        // Flow Control
-        //
-        ActionsBuilder.FlowActionOperators = ActionsBuilder.FlowActionOperators || new Array();
-        ActionsBuilder.FlowActionOperators.push("IsEqual");
-        ActionsBuilder.FlowActionOperators.push("IsDifferent");
-        ActionsBuilder.FlowActionOperators.push("IsGreater");
-        ActionsBuilder.FlowActionOperators.push("IsLesser");
-
-        ActionsBuilder.FlowAction = ActionsBuilder.FlowAction || {};
-        ActionsBuilder.FlowAction[0] = { name: "ValueCondition", properties: directActionWidthPropertyPath([{ text: "value", value: "value?" }, { text: "operator", value: ActionsBuilder.FlowActionOperators[0] }]), description: "A condition" };
-        ActionsBuilder.FlowAction[1] = { name: "StateCondition", properties: directActionTemplate([{ text: "value", value: "value?" }]), description: "A condition, true if the target object state equals the given state" };
-        ActionsBuilder.FlowAction.COUNT = 2;
-        ActionsBuilder.FlowAction.Hub = { name: "Hub", properties: [], description: "" };
-
-        //
-        // Utils
-        //
-        ActionsBuilder.GetDescriptionFromActionName = function (name) {
-            for (var i = 0; i < ActionsBuilder.Trigger.COUNT; i++) {
-                if (ActionsBuilder.Trigger[i].name == name)
-                    return ActionsBuilder.Trigger[i].description;
-            }
-
-            for (var i = 0; i < ActionsBuilder.Action.COUNT; i++) {
-                if (ActionsBuilder.Action[i].name == name)
-                    return ActionsBuilder.Action[i].description;
-            }
-
-            for (var i = 0; i < ActionsBuilder.FlowAction.COUNT; i++) {
-                if (ActionsBuilder.FlowAction[i].name == name)
-                    return ActionsBuilder.FlowAction[i].description;
-            }
-
-        };
-
-        return ActionsBuilder;
-    })();
-
-    AB.ActionsBuilder = ActionsBuilder;
-})(AB || (AB = {}));

+ 0 - 141
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/contextmenu.js

@@ -1,141 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="actionKinds.js" />
-/// <reference path="viewer.js" />
-
-var AB;
-(function (AB) {
-
-    var ContextMenu = (function () {
-
-        function ContextMenu(viewer) {
-            var scope = this;
-
-            // Members
-            this.viewer = viewer;
-
-            this.showing = false;
-            this.savedColor = Raphael.rgb(255, 255, 255);
-            this.overColor = Raphael.rgb(140, 200, 230);
-
-            // Context menu elements
-            this.elements = [
-                { text: "Reduce", rect: null, action: "onReduce" },
-                { text: "Delete", rect: null, action: "onRemoveNode" },
-                { text: "Delete branch", rect: null, action: "onRemoveBranch" },
-                { text: "Connect / Disconnect", rect: null, action: "onDetachNode" },
-                { text: "Copy", rect: null, action: "onCopyStructure" },
-                { text: "Paste", rect: null, action: "onPasteStructure" },
-                // Add other elements here
-                { text: "", rect: null, action: null } // Color separator (top)
-            ];
-
-            // Finish
-            this.attachControl(viewer.graph.canvas);
-        }
-
-        // Attaches controls to the viewer
-        // element: the viewer element (canvas or div or etc.)
-        ContextMenu.prototype.attachControl = function (element) {
-            var scope = this;
-
-            var onClick = function (event) {
-                var x = scope.viewer.mousex;
-                var y = scope.viewer.mousey;
-
-                // Remove all context menu nodes, and run action if selected
-                if (scope.showing) {
-                    for (var i = 0; i < scope.elements.length; i++) {
-                        var el = scope.elements[i];
-
-                        if (el.action && el.rect.isPointInside(x, y))
-                            scope.viewer.utils[el.action]();
-
-                        scope.viewer._removeNode(el.rect);
-                    }
-                }
-                scope.showing = false;
-            };
-
-            var onMouseMove = function (event) {
-                // Override context menu's node color if mouse is inside
-                if (scope.showing) {
-                    for (var i = 0; i < scope.elements.length; i++) {
-                        var el = scope.elements[i];
-
-                        if (el.text == "")
-                            continue;
-
-                        var x = scope.viewer.mousex;
-                        var y = scope.viewer.mousey;
-
-                        if (el.rect.isPointInside(x, y))
-                            el.rect.attr(el.rect.rect, "fill", scope.overColor);
-                        else
-                            el.rect.attr(el.rect.rect, "fill", scope.savedColor);
-                    }
-                }
-            };
-
-            var onRightClick = function (event) {
-                var x = scope.viewer.mousex;
-                var y = scope.viewer.mousey;
-
-                if (y + (AB.Graph.NODE_HEIGHT * scope.elements.length) > scope.viewer.element.offsetHeight + scope.viewer.element.scrollTop)
-                    y = (AB.Graph.NODE_HEIGHT * scope.elements.length);
-                if (x + AB.Graph.NODE_WIDTH > scope.viewer.element.offsetWidth + scope.viewer.element.scrollLeft)
-                    x -= AB.Graph.NODE_WIDTH;
-
-                scope.viewer.onClick(event);
-
-                // Set selected node
-                var result = scope.viewer.traverseGraph(null, x, y);
-                if (result.hit) {
-                    scope.viewer.selectedNode = result.element;
-                }
-
-                if (!scope.showing) {
-                    if (scope.viewer.selectedNode == null)
-                        return;
-
-                    // Create elements
-                    var yOffset = 10;
-
-                    for (var i = 0; i < scope.elements.length - 1; i++) {
-                        var el = scope.elements[i];
-
-                        el.rect = scope.viewer._createNode(el.text, Raphael.rgb(216, 216, 216), true);
-                        scope.viewer._setNodePosition(el.rect, x, y + yOffset);
-
-                        el.rect.text.attr("x", x + 5);
-
-                        yOffset += AB.Graph.NODE_HEIGHT;
-                    }
-
-                    // Color separator
-                    var separator = scope.elements[scope.elements.length - 1];
-                    separator.rect = scope.viewer._createNode("", scope.viewer.getNodeColor(scope.viewer.selectedNode), true);
-                    scope.viewer._setNodePosition(separator.rect, x, y);
-                    separator.rect.attr(separator.rect.rect, "height", 10);
-
-                    // Finish
-                    scope.showing = true;
-                }
-                else {
-                    onClick();
-                    onRightClick(event);
-                }
-
-                window.event.returnValue = false;
-            };
-
-            document.addEventListener("click", onClick);
-            document.addEventListener("mousemove", onMouseMove);
-            element.addEventListener("contextmenu", onRightClick);
-        }
-
-        return ContextMenu;
-    })();
-
-    AB.ContextMenu = ContextMenu;
-
-})(AB || (AB = { }));

+ 0 - 152
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/fonts.css

@@ -1,152 +0,0 @@
-@font-face {
-    font-family: "Sinkin Sans Thin";
-    src: url('fonts/SinkinSans/SinkinSans-100Thin.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-100Thin.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-100Thin.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-100Thin.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-100Thin.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Thin Italic";
-    src: url('fonts/SinkinSans/SinkinSans-100ThinItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-100ThinItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-100ThinItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-100ThinItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-100ThinItalic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans XLight";
-    src: url('fonts/SinkinSans/SinkinSans-200XLight.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-200XLight.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-200XLight.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-200XLight.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-200XLight.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans XLight Italic";
-    src: url('fonts/SinkinSans/SinkinSans-200XLightItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-200XLightItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-200XLightItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-200XLightItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-200XLightItalic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Light";
-    src: url('fonts/SinkinSans/SinkinSans-300Light.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-300Light.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-300Light.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-300Light.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-300Light.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Light Italic";
-    src: url('fonts/SinkinSans/SinkinSans-300LightItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-300LightItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-300LightItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-300LightItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-300LightItalic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Italic";
-    src: url('fonts/SinkinSans/SinkinSans-400Italic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-400Italic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-400Italic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-400Italic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-400Italic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Regular";
-    src: url('fonts/SinkinSans/SinkinSans-400Regular.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-400Regular.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-400Regular.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-400Regular.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-400Regular.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Medium";
-    src: url('fonts/SinkinSans/SinkinSans-500Medium.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-500Medium.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-500Medium.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-500Medium.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-500Medium.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Medium Italic";
-    src: url('fonts/SinkinSans/SinkinSans-500MediumItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-500MediumItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-500MediumItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-500MediumItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-500MediumItalic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Semi-Bold";
-    src: url('fonts/SinkinSans/SinkinSans-600SemiBold.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-600SemiBold.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-600SemiBold.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-600SemiBold.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-600SemiBold.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Semi-Bold Italic";
-    src: url('fonts/SinkinSans/SinkinSans-600SemiBoldItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-600SemiBoldItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-600SemiBoldItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-600SemiBoldItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-600SemiBoldItalic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Bold";
-    src: url('fonts/SinkinSans/SinkinSans-700Bold.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-700Bold.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-700Bold.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-700Bold.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-700Bold.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Bold Italic";
-    src: url('fonts/SinkinSans/SinkinSans-700BoldItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-700BoldItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-700BoldItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-700BoldItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-700BoldItalic.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans Black";
-    src: url('fonts/SinkinSans/SinkinSans-800Black.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-800Black.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-800Black.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-800Black.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-800Black.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans XBlack";
-    src: url('fonts/SinkinSans/SinkinSans-900XBlack.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-900XBlack.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-900XBlack.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-900XBlack.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-900XBlack.svg#segeoN') format('svg');
-}
-
-@font-face {
-    font-family: "Sinkin Sans XBlack Italic";
-    src: url('fonts/SinkinSans/SinkinSans-900XBlackItalic.ttf');
-    src: url('fonts/SinkinSans/SinkinSans-900XBlackItalic.eot?#iefix') format('embedded-opentype'),
-        url('fonts/SinkinSans/SinkinSans-900XBlackItalic.woff') format('woff'),
-        url('fonts/SinkinSans/SinkinSans-900XBlackItalic.ttf') format('truetype'),
-        url('fonts/SinkinSans/SinkinSans-900XBlackItalic.svg#segeoN') format('svg');
-}

+ 0 - 210
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/index.css

@@ -1,210 +0,0 @@
-html, body {
-  margin: 0;
-  padding: 0;
-  width: 100%;
-  height: 100%;
-  background-color: white;
-  cursor: default;
-}
-
-ul {
-  padding-left: 1em;
-  margin-bottom: 0.5em;
-  margin-top: 0.5em;
-}
-ul li {
-  list-style-type: none;
-  display: inline-block;
-  margin-right: 3em;
-  cursor: pointer;
-}
-ul li:last-child {
-  margin-right: 0;
-}
-
-svg {
-  left: 0 !important;
-}
-
-.container {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-}
-.container a, .container p, .container li {
-  color: black;
-  font-family: Sinkin Sans Light;
-  font-size: 0.7em;
-}
-.container .formSend {
-  float: right;
-  width: 420px;
-  height: 55px;
-}
-.container .formSend button {
-  margin-right: 0.7em;
-  margin-bottom: 2em;
-  margin-top: 1.2em;
-  border: 0;
-  color: white;
-  width: 47%;
-  height: 50%;
-  border-radius: 1em;
-  moz-border-radius: 1em;
-  -webkit-border-radius: 1em;
-  -khtml-border-radius: 1em;
-  text-transform: uppercase;
-  font-family: "Sinkin Sans Semi-Bold";
-  outline: none;
-  cursor: pointer;
-}
-.container .formSend button.grey {
-  text-align: left;
-  padding-left: 1.5em;
-  background-color: #424242;
-}
-.container .formSend button.blue {
-  text-align: right;
-  padding-right: 1.5em;
-  background-color: #7facc1;
-}
-.container #Parameters, .container #List {
-  overflow: auto;
-  width: 25%;
-  /*height: 751px;*/
-  position: relative;
-  float: left;
-  margin-left: 1%;
-}
-.container #Parameters svg, .container #List svg {
-  width: 100%;
-}
-.container #Parameters {
-  position: relative;
-  margin-right: 1%;
-  background-color: #262626 !important;
-}
-.container #Parameters a {
-  margin-left: 3em;
-  color: white;
-}
-.container #Parameters .parametersClass {
-  border: 1px white solid;
-  margin: 0.9em;
-  padding-left: 0.3em;
-  padding-top: 0.5em;
-  padding-bottom: 0.5em;
-  border-radius: 2px;
-  moz-border-radius: 2px;
-  -webkit-border-radius: 2px;
-  -khtml-border-radius: 2px;
-  width: 88%;
-}
-.container #Parameters .parametersClass a {
-  border: 0;
-}
-.container #Parameters input.parametersClass, .container #Parameters select.parametersClass {
-  border: 0;
-  padding: 0;
-  height: 2em;
-  margin-left: 3em !important;
-  cursor: pointer;
-}
-.container #Parameters input.parametersClass {
-  width: 70%;
-  padding-left: 2em;
-  font-family: "Sinkin Sans Light";
-}
-.container #Parameters select.parametersClass {
-  width: 77%;
-  text-indent: 1em;
-  font-family: "Sinkin Sans Light";
-}
-.container #Parameters .parametersEditedNode {
-    width: 90%;
-    margin: 0.9em;
-    height: 25px;
-}
-.container #Parameters .parametersEditedNode a {
-    height: 100%;
-    text-align: center;
-    font-family: "Sinkin Sans Light";
-}
-.container #Parameters .parametersHelp {
-  position: absolute;
-  bottom: 0;
-  width: 100%;
-  padding: 0;
-  background-color: black;
-}
-.container #Parameters .parametersHelp a {
-  padding-left: 0.2em;
-  padding-right: 0.2em;
-  padding-top: 0.5em;
-  padding-bottom: 2em;
-  display: block;
-  width: auto;
-  text-align: left;
-  border: 0;
-  color: #828282;
-  font-style: italic;
-  max-height: 95%;
-  height: 95%;
-}
-.container .GraphContainer {
-  width: 46%;
-  /*height: 751px;*/
-  height: 100%;
-  max-height: 100%;
-  position: relative;
-  float: left;
-  margin-left: 1%;
-}
-.container #Graph {
-  background: -ms-linear-gradient(top, #262626 0%, #7d7e7d 100%);
-  background: linear-gradient(top, #262626 0%, #7d7e7d 100%);
-  background: -webkit-linear-gradient(top, #262626 0%, #7d7e7d 100%);
-  position: relative;
-  overflow: scroll;
-  height: 96%;
-  width: 100%;
-  position: relative;
-}
-
-.container #Graph svg {
-  overflow: scroll;
-  height: 100%;
-  display: inline-block;
-}
-
-.container #Toolbar {
-  margin: 0;
-  padding: 0;
-  background-color: black;
-  padding-top: 1.1%;
-  padding-bottom: 1.1%;
-}
-.container #Toolbar ul {
-  padding: 0;
-  margin: 0;
-  position: relative;
-}
-.container #Toolbar ul li {
-  color: white;
-  margin-right: 4em;
-}
-.container #Toolbar ul li:first-child {
-  margin-left: 3em;
-}
-.container #Toolbar ul li:last-child {
-  margin-right: 0;
-}
-.container #Toolbar ul li.border {
-  padding: 0.2em;
-  border: 1px solid white;
-}
-.container #List {
-  background-color: #3a3a3a;
-  max-height: 95%;
-  height: 95%;
-}

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 207
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/index.html


+ 0 - 284
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/list.js

@@ -1,284 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="actionKinds.js" />
-/// <reference path="viewer.js" />
-
-var AB;
-(function (AB) {
-
-    //
-    // List element
-    //
-    var ListElement = (function () {
-        function ListElement() {
-            // Members
-            this.rect = null;
-            this.text = null;
-
-            this.name = new String();
-            this.type = AB.ActionsBuilder.Type.SCENE;
-            this.kind = null;
-            this.properties = null;
-        }
-
-        ListElement.prototype.attr = function (element, attribute, value) {
-            if (value)
-                element.attr(attribute, value);
-            else
-                return element.attr(attribute);
-        }
-
-        return ListElement;
-    })();
-
-    var List = (function () {
-
-        //
-        // Public functions
-        //
-        function List(graph) {
-            // Members
-            this.telement = document.getElementById("ListTriggers");
-            this.aelement = document.getElementById("ListActions");
-            this.faelement = document.getElementById("ListFlowActions");
-
-            this.tlist = Raphael("ListTriggers", (25 * screen.width) / 100, 400);
-            this.alist = Raphael("ListActions", (25 * screen.width) / 100, 400);
-            this.falist = Raphael("ListFlowActions", (25 * screen.width) / 100, 400);
-            this.graph = graph;
-
-            this.listElements = new Array();
-            this.objectType = AB.ActionsBuilder.Type.OBJECT;
-
-            var scope = this;
-            window.onresize = function () {
-                for (var i = 0; i < scope.listElements.length; i++) {
-                    scope.listElements[i].attr(scope.listElements[i].rect, "width", scope.telement.getBoundingClientRect().width - 20);
-                }
-            }
-        }
-
-        // Clears the list of elements
-        List.prototype.clearList = function () {
-            for (var i = 0; i < this.listElements.length; i++) {
-                this._removeListElement(this.listElements[i]);
-            }
-        }
-
-        // Creates the list of elements automatically
-        List.prototype.createListElements = function () {
-            var excludedTriggers = [7, 10, 11]; // If objectType === Scene
-            var yOffset = 10;
-            var textColor = Raphael.rgb(61, 72, 76);
-            var whiteTitle = Raphael.rgb(255, 255, 255);
-
-            // Create Triggers
-            var t = this._createListElement("TRIGGERS", AB.ActionsBuilder.Type.OBJECT, null, yOffset, false, whiteTitle, this.tlist);
-            t.attr(t.text, "x", 15);
-            t.attr(t.rect, "fill", Raphael.rgb(41, 129, 255));
-            t.text.attr("font-family", "Sinkin Sans Medium");
-            t.text.attr("font-size", "11");
-            yOffset += List.ELEMENT_HEIGHT;
-
-            for (var i = 0; i < AB.ActionsBuilder.Trigger.COUNT; i++) {
-                if (excludedTriggers.indexOf(i) != -1 && this.objectType != AB.ActionsBuilder.Type.SCENE)
-                    continue;
-
-                var e = this._createListElement(AB.ActionsBuilder.Trigger[i].name, AB.ActionsBuilder.Type.TRIGGER,
-                                                AB.ActionsBuilder.Trigger[i].properties, yOffset, true, textColor,
-                                                this.tlist);
-                e.attr(e.rect, "fill", Raphael.rgb(133, 154, 185));
-
-                yOffset += List.ELEMENT_HEIGHT;
-            }
-
-            yOffset += List.ELEMENT_HEIGHT;
-            this.tlist.canvas.style.height = this.telement.style.height = yOffset + "px";
-            this._createCollapseAnimation(this.tlist, this.telement, yOffset, t);
-
-            // Create Actions
-            yOffset = 10;
-
-            var a = this._createListElement("ACTIONS", AB.ActionsBuilder.Type.OBJECT, null, yOffset, false, textColor, this.alist);
-            a.attr(a.text, "x", 15);
-            a.attr(a.rect, "fill", Raphael.rgb(255, 220, 42));
-            a.text.attr("font-family", "Sinkin Sans Medium");
-            a.text.attr("font-size", "11");
-            yOffset += List.ELEMENT_HEIGHT;
-
-            for (var i = 0; i < AB.ActionsBuilder.Action.COUNT; i++) {
-                var e = this._createListElement(AB.ActionsBuilder.Action[i].name, AB.ActionsBuilder.Type.ACTION,
-                                                AB.ActionsBuilder.Action[i].properties, yOffset, true, textColor,
-                                                this.alist);
-                e.attr(e.rect, "fill", Raphael.rgb(182, 185, 132));
-
-                yOffset += List.ELEMENT_HEIGHT;
-            }
-
-            yOffset += List.ELEMENT_HEIGHT;
-            this.alist.canvas.style.height = this.aelement.style.height = yOffset + "px";
-            this._createCollapseAnimation(this.alist, this.aelement, yOffset, a);
-
-            // Create flow control
-            yOffset = 10;
-
-            var f = this._createListElement("FLOW CONTROL", AB.ActionsBuilder.Type.OBJECT, null, yOffset, false, whiteTitle, this.falist);
-            f.attr(f.text, "x", 15);
-            f.attr(f.rect, "fill", Raphael.rgb(255, 41, 53));
-            f.text.attr("font-family", "Sinkin Sans Medium");
-            f.text.attr("font-size", "11");
-            yOffset += List.ELEMENT_HEIGHT;
-
-            for (var i = 0; i < AB.ActionsBuilder.FlowAction.COUNT; i++) {
-                var e = this._createListElement(AB.ActionsBuilder.FlowAction[i].name, AB.ActionsBuilder.Type.FLOW_CONTROL,
-                                                AB.ActionsBuilder.FlowAction[i].properties, yOffset, true, textColor,
-                                                this.falist);
-                e.attr(e.rect, "fill", Raphael.rgb(185, 132, 140));
-
-                yOffset += List.ELEMENT_HEIGHT;
-            }
-
-            yOffset += List.ELEMENT_HEIGHT;
-            this.falist.canvas.style.height = this.faelement.style.height = yOffset + "px";
-            this._createCollapseAnimation(this.falist, this.faelement, yOffset, f);
-        }
-
-        // Sets the color theme of the list (background)
-        List.prototype.setColorTheme = function (color) {
-            this.tlist.canvas.style.backgroundColor = color;
-            this.alist.canvas.style.backgroundColor = color;
-            this.falist.canvas.style.backgroundColor = color;
-        }
-
-        //
-        // Private functions
-        //
-
-        // Creates a list element
-        // name: the element's name
-        // type: the elements type (TRIGGER, ACTION, FLOW_CONTROL)
-        // properties: array of properties
-        // yOffset: the y position of the element
-        // drag: boolean, if the element should be animated
-        // textColor: optional, the text color
-        // list: the raphaeljs object
-        List.prototype._createListElement = function (name, type, properties, yOffset, drag, textColor, list) {
-            var e = new ListElement();
-
-            e.rect = list.rect(10, yOffset, this.telement.getBoundingClientRect().width - 30, List.ELEMENT_HEIGHT);
-            e.text = list.text(e.rect.attr("x") + 20, yOffset + e.rect.attr("height") / 2, name);
-            e.name = name;
-            e.type = type;
-            e.properties = properties;
-
-            e.rect.attr("fill", Raphael.rgb(64, 64, 64));
-            e.rect.attr("stroke", Raphael.rgb(58, 58, 58));
-            e.text.attr("font-size", "12");
-            e.text.attr("text-anchor", "start");
-            e.text.attr("font-family", "Sinkin Sans Light");
-            if (textColor)
-                e.text.attr("fill", textColor);
-
-            if (drag) {
-                this._createListElementAnimation(e);
-            }
-
-            this.listElements.push(e);
-            return e;
-        }
-
-        // Removes a list element
-        // element: the list element to remove
-        List.prototype._removeListElement = function (element) {
-            element.rect.remove();
-            element.text.remove();
-        }
-
-        // Creates the collapse / expand animation
-        // element: the element to animated
-        // htmlElement: the html element container
-        // expandedHeight: the height when list is expanded
-        // onElement: the element that receives the click element
-        List.prototype._createCollapseAnimation = function (element, htmlElement, expandedHeight, onElement) {
-            var onClick = function (event) {               
-                var height = htmlElement.style.height;
-                if (height == expandedHeight + "px") {
-                    htmlElement.style.height = element.canvas.style.height = 35 + "px";
-                }
-                else {
-                    htmlElement.style.height = element.canvas.style.height = expandedHeight + "px";
-                }
-            };
-
-            onElement.rect.click(onClick);
-        }
-
-        // Creates the animation of list elements
-        // element: the element to animate
-        List.prototype._createListElementAnimation = function (element) {
-            var scope = this;
-            var mousex, mousey;
-
-            var onMove = function (dx, dy, x, y, event) {
-                mousex = x;
-                mousey = y;
-            };
-
-            var onStart = function (x, y, event) {
-                element.rect.animate({
-                    x: -10,
-                    opacity: 0.25
-                }, 500, ">");
-                element.text.animate({
-                    x: 10,
-                    opacity: 0.25
-                }, 500, ">");
-            };
-
-            var onEnd = function (event) {
-                element.rect.animate({
-                    x: 10,
-                    opacity: 1.0
-                }, 500, "<");
-                element.text.animate({
-                    x: 30,
-                    opacity: 1.0
-                }, 500, "<");
-
-                var x = mousex - scope.graph.graph.canvas.getBoundingClientRect().left;
-                var y = mousey - scope.graph.graph.canvas.getBoundingClientRect().top;
-                var dragResult = scope.graph.traverseGraph(null, x, y);
-
-                if (dragResult.hit) {
-                    if (element.type == AB.ActionsBuilder.Type.TRIGGER && dragResult.element != scope.graph.root.action)
-                        return;
-
-                    if (element.type == AB.ActionsBuilder.Type.ACTION && dragResult.element == scope.graph.root.action)
-                        return;
-
-                    if (element.type == AB.ActionsBuilder.Type.FLOW_CONTROL && (dragResult.element == scope.graph.root.action || (dragResult.element.type == AB.ActionsBuilder.Type.FLOW_CONTROL && dragResult.element.parent.hub == null)))
-                        return;
-
-                    if (element.type == AB.ActionsBuilder.Type.FLOW_CONTROL && dragResult.element.combine)
-                        return;
-
-                    if (!dragResult.element.combine && dragResult.element.children.length > 0 && dragResult.element.type != AB.ActionsBuilder.Type.TRIGGER && dragResult.element != scope.graph.root.action)
-                        return;
-
-                    scope.graph.addNode(dragResult.element, element);
-                    scope.graph.update();
-                }
-            };
-
-            element.rect.drag(onMove, onStart, onEnd);
-            element.text.drag(onMove, onStart, onEnd);
-        }
-
-        List.ELEMENT_HEIGHT = 25;
-
-        return List;
-    })();
-
-    AB.List = List;
-    AB.ListElement = ListElement;
-
-})(AB || (AB = { }));

+ 0 - 307
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/parametersManager.js

@@ -1,307 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="actionKinds.js" />
-/// <reference path="viewer.js" />
-
-var AB;
-(function (AB) {
-
-    var ParametersManager = (function () {
-
-        function ParametersManager(viewer) {
-            // Members
-            this.viewer = viewer;
-            this.parametersElement = document.getElementById("Parameters");
-        }
-
-        // Clears the parameters view (right side)
-        ParametersManager.prototype.clearParameters = function () {
-            if (this.divHelpText) {
-                this.divHelpText.parentNode.removeChild(this.divHelpText);
-                this.divHelpText = null;
-            }
-
-            while (this.parametersElement.childNodes.length)
-                this.parametersElement.removeChild(this.parametersElement.firstChild);
-        }
-
-        // Creates the help section
-        ParametersManager.prototype.createHelpSection = function (element) {
-            var divHelpText = document.createElement("div");
-            divHelpText.className = "parametersHelp";
-            this.parametersElement.appendChild(divHelpText);
-
-            var helpText = document.createElement("a");
-            helpText.innerHTML = AB.ActionsBuilder.GetDescriptionFromActionName(element.action.name);
-            helpText.className = "parametersClass";
-            divHelpText.appendChild(helpText);
-        }
-
-        // Creates parameters for the given element (node / action)
-        ParametersManager.prototype.createParameters = function (element) {
-            // Events
-            var onInputChange = function (input, propertyID) {
-                return function () {
-                    var value = input.value;
-                    element.action.propertiesResults[propertyID] = value;
-                };
-            };
-
-            var onTargetTypeChanged = function (targetTypeSelect, propertyPathSelect, targetNameSelect, propertyID) {
-                return function () {
-                    var selected = targetTypeSelect.selectedIndex;
-                    var value = targetTypeSelect.options[selected].value;
-
-                    if (targetNameSelect != null && value != "SceneProperties") {
-                        var array = null;
-                        // Keep target name value
-                        var nameValue = targetNameSelect.value;
-
-                        targetNameSelect.length = 0;
-
-                        if (value == "MeshProperties") array = AB.ActionsBuilder.MeshesList;
-                        else if (value == "LightProperties") array = AB.ActionsBuilder.LightsList;
-                        else if (value == "CameraProperties") array = AB.ActionsBuilder.CamerasList;
-
-                        for (var i = 0; i < array.length; i++) {
-                            var option = document.createElement("option");
-                            option.value = array[i];
-                            option.innerHTML = array[i];
-                            targetNameSelect.add(option);
-                        }
-
-                        targetNameSelect.value = nameValue;
-                    }
-
-                    if (propertyPathSelect != null) {
-                        // Get array of properties for selected object type (scene, camera, light, mesh, ...)
-                        var array = AB.ActionsBuilder[targetTypeSelect.options[selected].value];
-                        propertyPathSelect.length = 0;
-
-                        for (var j = 0; j < array.length; j++) {
-                            var option = document.createElement("option");
-                            option.value = array[j].name;
-                            option.innerHTML = array[j].name;
-                            propertyPathSelect.add(option);
-                        }
-                    }
-                    element.action.properties[propertyPathSelect != null ? propertyID - 1 : propertyID].targetType = targetTypeSelect.options[selected].value;
-                };
-            };
-
-            var onTargetNameChanged = function (targetNameSelect, propertyID) {
-                return function () {
-                    element.action.propertiesResults[propertyID] = targetNameSelect.options[targetNameSelect.selectedIndex].value;
-                }
-            }
-
-            var onPropertyPathChanged = function (propertyPathSelect, additionalInput, propertyID) {
-                return function () {
-                    additionalInput.value = "";
-                    element.action.propertiesResults[propertyID] = propertyPathSelect.options[propertyPathSelect.selectedIndex].value;
-                };
-            };
-
-            var onAdditionalPropertyPathChanged = function (propertyPathSelect, additionalInput, propertyID) {
-                return function () {
-                    var propertyPath = propertyPathSelect.options[propertyPathSelect.selectedIndex].value;
-                    if (additionalInput.value != "")
-                        propertyPath += "." + additionalInput.value;
-                    element.action.propertiesResults[propertyID] = propertyPath;
-                };
-            };
-
-            var onConditionOperatorChanged = function (conditionOperatorSelect, propertyID) {
-                return function () {
-                    element.action.propertiesResults[propertyID] = conditionOperatorSelect.options[conditionOperatorSelect.selectedIndex].value;
-                };
-            };
-
-            // Special Elements
-            var targetTypeSelect = null;
-            var targetNameSelect = null;
-            var propertyPathSelect = null;
-            var soundNameSelect = null;
-
-            // Clear view (div)
-            this.clearParameters();
-
-            // Get properties
-            var p = element.action.properties;
-            var pr = element.action.propertiesResults;
-
-            // Create edition presentation
-            var divEditedNode = document.createElement("div");
-            divEditedNode.className = "parametersEditedNode";
-            divEditedNode.style.backgroundColor = this.viewer.getSelectedNodeColor(element.action, this.viewer.isParentDetached(element.action));
-            divEditedNode.style.border = "2px solid white";
-
-            var textEditedNode = document.createElement("a");
-            textEditedNode.className = "parametersEditedNode";
-            textEditedNode.innerHTML = element.action.name;
-            textEditedNode.style.verticalAlign = "middle";
-            textEditedNode.style.textAlign = "center";
-            if (element.action.type == AB.ActionsBuilder.Type.ACTION)
-                textEditedNode.style.color = "black";
-            else
-                textEditedNode.style.color = "white";
-            textEditedNode.style.width = textEditedNode.style.height = "100%";
-            divEditedNode.appendChild(textEditedNode);
-
-            this.parametersElement.appendChild(divEditedNode);
-
-            if (p.length == 0) {
-                this.createHelpSection(element);
-                return;
-            }
-
-            // Create parameters
-            for (var i = 0; i < p.length; i++) {
-                // Create separator
-                var separator = document.createElement("hr");
-                separator.noShade = true;
-                separator.style.width = "90%";
-
-                this.parametersElement.appendChild(separator);
-
-                // Parameter text
-                var propertyText = document.createElement("a");
-                propertyText.text = p[i].text;
-
-                this.parametersElement.appendChild(propertyText);
-
-                // If target, add the input element + combo box with target type
-                if (p[i].text == "sound") {
-                    soundNameSelect = document.createElement("select");
-                    soundNameSelect.className = "parametersClass";
-
-                    for (var j = 0; j < AB.ActionsBuilder.SoundsList.length; j++) {
-                        var name = AB.ActionsBuilder.SoundsList[j];
-                        var option = document.createElement("option");
-                        option.value = option.innerHTML = name;
-                        option.className = "parametersClass";
-                        soundNameSelect.add(option);
-                    }
-
-                    soundNameSelect.value = pr[i];
-                    this.parametersElement.appendChild(document.createElement("br"));
-                    this.parametersElement.appendChild(soundNameSelect);
-
-                    soundNameSelect.onchange = onInputChange(soundNameSelect, i);
-
-                    continue;
-                }
-                else if (p[i].text == "target"
-                    || (element.action.type == AB.ActionsBuilder.Type.TRIGGER && p[i].text == "parameter")
-                    || p[i].text == "parent")
-                {
-                    targetTypeSelect = document.createElement("select");
-                    targetTypeSelect.className = "parametersClass";
-
-                    for (var j = 0; j < AB.ActionsBuilder.DataTypesNames.length; j++) {
-                        var data = AB.ActionsBuilder.DataTypesNames[j];
-                        var option = document.createElement("option");
-                        option.value = data.data;
-                        option.innerHTML = data.name;
-                        option.className = "parametersClass";
-                        targetTypeSelect.add(option);
-                    }
-
-                    targetTypeSelect.value = p[i].targetType;
-
-                    this.parametersElement.appendChild(document.createElement("br"));
-                    this.parametersElement.appendChild(targetTypeSelect);
-
-                    // List names
-                    targetNameSelect = document.createElement("select");
-                    targetNameSelect.className = "parametersClass";
-
-                    this.parametersElement.appendChild(document.createElement("br"));
-                    this.parametersElement.appendChild(targetNameSelect);
-
-                    onTargetTypeChanged(targetTypeSelect, null, targetNameSelect, i)();
-
-                    targetNameSelect.value = pr[i];
-
-                    targetTypeSelect.onchange = onTargetTypeChanged(targetTypeSelect, null, targetNameSelect, i);
-                    targetNameSelect.onchange = onTargetNameChanged(targetNameSelect, i);
-
-                    continue;
-                }
-                // If propertyPath, add the combox box to select the property and input element for additional property
-                else if (p[i].text == "propertyPath") {
-                    propertyPathSelect = document.createElement("select");
-                    propertyPathSelect.className = "parametersClass";
-
-                    this.parametersElement.appendChild(document.createElement("br"));
-                    this.parametersElement.appendChild(propertyPathSelect);
-
-                    // Special input, then continue after its creation
-                    var additionalInput = document.createElement("input");
-                    additionalInput.setAttribute("value", "");
-                    additionalInput.className = "parametersClass";
-
-                    this.parametersElement.appendChild(document.createElement("br"));
-                    this.parametersElement.appendChild(additionalInput);
-
-                    // If propertyPath exists, then target exists
-                    targetTypeSelect.onchange = onTargetTypeChanged(targetTypeSelect, propertyPathSelect, targetNameSelect, i);
-                    propertyPathSelect.onchange = onPropertyPathChanged(propertyPathSelect, additionalInput, i);
-                    additionalInput.onkeyup = onAdditionalPropertyPathChanged(propertyPathSelect, additionalInput, i);
-
-                    // Fill propertyPath combo box
-                    onTargetTypeChanged(targetTypeSelect, propertyPathSelect, targetNameSelect, i)();
-
-                    // Set selected property
-                    var propertyName = pr[i].split(".");
-                    propertyPathSelect.value = propertyName[0];
-
-                    var additionPropertyName = "";
-                    for (var j = 1; j < propertyName.length; j++)
-                        additionPropertyName += propertyName[j];
-
-                    additionalInput.setAttribute("value", additionPropertyName);
-
-                    // Finish
-                    continue;
-                }
-                    // Value condition, add combo box for operator type
-                else if (p[i].text == "operator") {
-                    var conditionOperatorSelect = document.createElement("select");
-                    conditionOperatorSelect.className = "parametersClass";
-
-                    for (var j = 0; j < AB.ActionsBuilder.FlowActionOperators.length; j++) {
-                        var option = document.createElement("option");
-                        option.value = AB.ActionsBuilder.FlowActionOperators[j];
-                        option.innerHTML = AB.ActionsBuilder.FlowActionOperators[j];
-                        conditionOperatorSelect.add(option);
-                    }
-
-                    conditionOperatorSelect.value = pr[i];
-                    conditionOperatorSelect.onchange = onConditionOperatorChanged(conditionOperatorSelect, i);
-
-                    this.parametersElement.appendChild(document.createElement("br"));
-                    this.parametersElement.appendChild(conditionOperatorSelect);
-
-                    continue;
-                }
-
-                var propertyInput = document.createElement("input");
-                propertyInput.setAttribute("value", pr[i]);
-                propertyInput.onkeyup = onInputChange(propertyInput, i);
-                propertyInput.className = "parametersClass";
-
-                //this.parametersElement.appendChild(document.createElement("br"));
-                this.parametersElement.appendChild(propertyInput);
-            }
-
-            // Create help text (bottom)
-            this.createHelpSection(element);
-        }
-
-        return ParametersManager;
-
-    })();
-
-    AB.ParametersManager = ParametersManager;
-
-})(AB || (AB = {}));

+ 0 - 216
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/utils.js

@@ -1,216 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="viewer.js" />
-
-var AB;
-(function (AB) {
-
-    var Utils = (function () {
-        function Utils(viewer) {
-            // Members
-            this.viewer = viewer;
-        }
-
-        // Removes the selected node
-        Utils.prototype.onRemoveNode = function () {
-            if (!this.viewer.selectedNode)
-                return;
-
-            var node = this.viewer.selectedNode;
-
-            if (node.type == AB.ActionsBuilder.Type.FLOW_CONTROL && node.parent.combine)
-                this.viewer.selectedNode = node.parent;
-
-            node.parent.removeChild(node);
-            this.viewer._removeAction(node, false);
-
-            if (node.combine) {
-                // Remove hub
-                var hub = node.hub;
-
-                node.parent.removeChild(hub.action);
-                this.viewer._removeAction(hub.action, false);
-
-                if (hub.action.children.length > 0)
-                    node.hub.action.children[0].parent = node.parent;
-            }
-
-            this.viewer.update();
-            this.viewer.parametersManager.clearParameters();
-
-            this.viewer.selectedNode = null;
-        }
-
-        // Removes the selected branch (starting from the selected node)
-        Utils.prototype.onRemoveBranch = function () {
-            if (!this.viewer.selectedNode)
-                return;
-
-            var node = this.viewer.selectedNode;
-
-            if (node.type == AB.ActionsBuilder.Type.FLOW_CONTROL && node.parent.combine)
-                this.selectedNode = node.parent;
-
-            node.parent.removeChild(this.selectedNode);
-            this.viewer._removeAction(node, true);
-
-            this.viewer.update();
-            this.viewer.parametersManager.clearParameters();
-
-            this.viewer.selectedNode = null;
-        }
-
-        // Detaches the selected node
-        // forceDetach: forces the Detach Color (green) for children of the selected node
-        // forceAttach: same as forceDetach but for the original node color
-        Utils.prototype.onDetachNode = function (forceDetach, forceAttach) {
-            if (!this.viewer.selectedNode)
-                return;
-
-            var node = this.viewer.selectedNode;
-
-            if (forceDetach == null) forceDetach = false;
-            if (forceAttach == null) forceAttach = false;
-
-            var detached = node.node.detached;
-            if (forceAttach)
-                detached = false;
-            else if (forceDetach)
-                detached = true;
-            else
-                detached = !detached;
-
-            node.node.detached = detached;
-
-            var scope = this;
-            var resetColor = function (root, color) {
-                var col = color == null ? scope.viewer.getNodeColor(root, scope.viewer.isParentDetached(root)) : color;
-                root.node.attr(root.node.rect, "fill", col);
-
-                if (root.node.line)
-                    root.node.attr(root.node.line, "stroke", col);
-
-                if (root.combine) {
-                    for (var i = 0; i < root.combineArray.length; i++) {
-                        resetColor(root.combineArray[i], color);
-                    }
-                }
-
-                for (var i = 0; i < root.children.length; i++) {
-                    resetColor(root.children[i], color);
-                }
-            };
-
-            this.viewer._setLine(node);
-            resetColor(node, !detached ? null : this.viewer.getNodeColor(node));
-        }
-
-        // Disconnects all triggers
-        Utils.prototype.onDetachAll = function (forceDetach, forceAttach) {
-            var scope = this;
-
-            var detach = function (root) {
-                scope.viewer.selectedNode = root;
-                scope.onDetachNode(forceDetach, forceAttach);
-            };
-
-            for (var i = 0; i < this.viewer.root.action.children.length; i++)
-                detach(this.viewer.root.action.children[i]);
-        }
-
-        // Copies the selected node structure (except root node) to the
-        // clipboard
-        Utils.prototype.onCopyStructure = function () {
-            if (!this.viewer.selectedNode)
-                return;
-
-            var structure = this.viewer.createJSON(this.viewer.selectedNode);
-            var asText = JSON.stringify(structure);
-
-            window.clipboardData.setData("text", asText);
-        }
-
-        // Pastes the previously copied structure (onCopyStructure) to
-        // the selected node
-        Utils.prototype.onPasteStructure = function () {
-            if (!this.viewer.selectedNode)
-                return;
-
-            var asText = window.clipboardData.getData("text");
-            var isJson = asText.length > 0 && asText[0] == "{" && asText[asText.length - 1] == "}";
-            var structure = JSON.parse(asText);
-            var node = this.viewer.selectedNode;
-
-            if (structure.type == AB.ActionsBuilder.Type.TRIGGER && node.node != this.viewer.root) {
-                alert("You can't paste a trigger if the selected node isn't the root object");
-                return;
-            }
-
-            if (structure.type != AB.ActionsBuilder.Type.TRIGGER && node.node == this.viewer.root) {
-                alert("You can't paste an action or condition if the selected node is the root object");
-                return;
-            }
-
-            this.viewer.loadFromJSON(structure, node);
-            this.viewer.update();
-        }
-
-        // Reduces the select node's width
-        Utils.prototype.onReduce = function (forceExpand, forceReduce) {
-            if (!this.viewer.selectedNode)
-                return;
-
-            if (forceExpand == null) forceExpand = false;
-            if (forceReduce == null) forceReduce = false;
-
-            var node = this.viewer.selectedNode.node;
-            var width = node.attr(node.rect, "width");
-
-            if ((width >= Graph.NODE_WIDTH && !forceExpand) || forceReduce) {
-                node.text.hide();
-                node.rect.stop();
-            }
-            else {
-                node.text.show();
-                node.attr(node.rect, "opacity", 1.0);
-            }
-
-            node.attr(node.rect, "width", (width >= Graph.NODE_WIDTH * this.viewer.zoom && !forceExpand) || forceReduce ? Graph.NODE_MINIMIZED_WIDTH * this.viewer.zoom : Graph.NODE_WIDTH * this.viewer.zoom);
-            node.minimized = !node.minimized;
-
-            this.viewer.update();
-        }
-
-        // Reduces all graph's nodes
-        Utils.prototype.onReduceAll = function (forceExpand) {
-            if (forceExpand == null)
-                forceExpand = false;
-
-            var scope = this;
-
-            var reduce = function (root) {
-                scope.viewer.selectedNode = root;
-                scope.onReduce(forceExpand, forceExpand ? false : true);
-
-                if (root.combine) {
-                    for (var i = 0; i < root.combineArray.length; i++)
-                        reduce(root.combineArray[i]);
-                }
-
-                for (var i = 0; i < root.children.length; i++)
-                    reduce(root.children[i]);
-
-            };
-
-            for (var i = 0; i < this.viewer.root.action.children.length; i++)
-                reduce(this.viewer.root.action.children[i]);
-
-            this.viewer.selectedNode = null;
-        }
-
-        return Utils;
-
-    })();
-
-    AB.Utils = Utils;
-
-})(AB || (AB = {}));

+ 0 - 750
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/viewer.js

@@ -1,750 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="action.js" />
-/// <reference path="contextmenu.js" />
-/// <reference path="viewertoolbar.js" />
-/// <reference path="parametersManager.js" />
-/// <reference path="utils.js" />
-
-var AB;
-(function (AB) {
-
-    var Graph = (function () {
-
-        //
-        // Public functions
-        //
-        function Graph() {
-            var scope = this;
-
-            // Members
-            this.element = document.getElementById("Graph");
-            this.graph = Raphael("Graph", (50 * screen.width) / 100, screen.height);
-            this.root = this._createNode("Object name", Raphael.rgb(255, 255, 255), true);
-
-            this.utils = new AB.Utils(this);
-            this.contextMenu = new AB.ContextMenu(this);
-            this.toolbar = new AB.ToolBar(this);
-            this.parametersManager = new AB.ParametersManager(this);
-
-            this.mousex = 0;
-            this.mousey = 0;
-            this.objectName = "";
-            this.editing = false;
-            this.zoom = 1.0;
-
-            this.selectedNode = null;
-
-            this.element.onmouseover = function () {
-                scope.editing = false;
-            };
-            this.element.onmouseout = function () {
-                scope.editing = true;
-            };
-
-            document.addEventListener("click", function (event) {
-                if (!scope.contextMenu.showing) {
-                    scope.onClick(event);
-                }
-            });
-            document.ondblclick = function (event) {
-                var result = scope.traverseGraph(null, scope.mousex, scope.mousey);
-                if (result.hit && result.element.node != scope.root) {
-                    scope.onReduce();
-                }
-            };
-            document.onmousemove = function (event) {
-                scope.mousex = event.clientX - scope.graph.canvas.getBoundingClientRect().left;
-                scope.mousey = event.clientY - scope.graph.canvas.getBoundingClientRect().top;
-            };
-
-            // Set properties
-            this.element.scrollLeft = (this.element.getBoundingClientRect().width / 2) + (Graph.NODE_WIDTH / 2);
-        }
-
-        // Handles the click event. Called by this and this.contextmenu
-        // event: the event object
-        Graph.prototype.onClick = function (event) {
-            var result = this.traverseGraph(null, this.mousex, this.mousey, true);
-
-            if (!this.editing) {
-                if (this.selectedNode != null) {
-                    var detached = this.isParentDetached(this.selectedNode);
-                    this.selectedNode.node.attr(this.selectedNode.node.rect, "fill", this.getNodeColor(this.selectedNode, detached));
-                    this.selectedNode = null;
-                    if (!result.hit)
-                        this.parametersManager.clearParameters();
-                }
-
-                if (result.hit && result.element.node != this.root) {
-                    this.selectedNode = result.element;
-                    this.selectedNode.node.attr(this.selectedNode.node.rect, "fill", this.getSelectedNodeColor(this.selectedNode, detached));
-                }
-
-                if (!result.hit)
-                    this.selectedNode = null;
-            }
-        }
-
-        // Returns the node's color for a given type
-        // action : the action to test
-        // returns the node color
-        Graph.prototype.getSelectedNodeColor = function (action, detached) {
-            // Detached
-            if (action.detached || (action.node && action.node.detached) || detached)
-                return Raphael.rgb(96, 122, 14);
-
-            // Get proper color
-            var color = Raphael.rgb(255, 255, 255); // Default color for root
-            switch (action.type) {
-                case AB.ActionsBuilder.Type.TRIGGER: color = Raphael.rgb(41, 129, 255); break;
-                case AB.ActionsBuilder.Type.ACTION: color = Raphael.rgb(255, 220, 42); break;
-                case AB.ActionsBuilder.Type.FLOW_CONTROL: color = Raphael.rgb(255, 41, 53); break;
-            }
-
-            return color;
-        }
-
-        Graph.prototype.getNodeColor = function (action, detached) {
-            if (action.detached || (action.node && action.node.detached) || detached)
-                return Raphael.rgb(96, 122, 14);
-
-            // Get proper color
-            var color = Raphael.rgb(255, 255, 255); // Default color for root
-            switch (action.type) {
-                case AB.ActionsBuilder.Type.TRIGGER: color = Raphael.rgb(133, 154, 185); break;
-                case AB.ActionsBuilder.Type.ACTION: color = Raphael.rgb(182, 185, 132); break;
-                case AB.ActionsBuilder.Type.FLOW_CONTROL: color = Raphael.rgb(185, 132, 140); break;
-            }
-
-            return color;
-        }
-
-        Graph.prototype.isParentDetached = function (node) {
-            var parent = node.parent;
-            while (parent != null) {
-                if (parent.node.detached)
-                    return true;
-                parent = parent.parent;
-            }
-
-            return false;
-        }
-
-        // Adds a node to the graph
-        // parent : the parent of the added node
-        // listElement : the values
-        Graph.prototype.addNode = function (parent, listElement) {
-            var color = this.getNodeColor(listElement);
-
-            var n = this._createNode(listElement.name, color, parent.combine ? true : false);
-            if (listElement.name == "CombineAction") {
-                n.action.combine = true;
-
-                var hubElement = AB.ActionsBuilder.FlowAction.Hub;
-                var hubType = AB.ActionsBuilder.Type.FLOW_CONTROL;
-                n.action.hub = this._createNode(hubElement.name, this.getNodeColor({ type: hubType }), false);
-                n.action.hub.action.type = hubType;
-                n.action.addChild(n.action.hub.action);
-                this._createNodeAnimation(n.action.hub);
-            }
-
-            n.action.name = listElement.name;
-            n.action.type = listElement.type;
-            n.detached = listElement.detached || false;
-            n.action.properties = listElement.properties;
-
-            for (var i = 0; i < listElement.properties.length; i++)
-                n.action.propertiesResults.push(listElement.properties[i].value);
-
-            if (parent && !parent.combine) {
-                parent.addChild(n.action);
-            }
-            else if (parent.combine) {
-                // Create hub
-                parent.combineArray.push(n.action);
-                n.action.parent = parent;
-                parent.node.attr(parent.node.text, "text", "");
-            }
-
-            this._createNodeAnimation(n);
-
-            return n;
-        }
-
-        // Updates the graph
-        Graph.prototype.update = function () {
-            var scope = this;
-            var rootChildID = 0;
-
-            var setNodeSize = function(node) {
-                if (node.minimized) {
-                    node.attr(node.rect, "width", Graph.NODE_MINIMIZED_WIDTH * scope.zoom);
-                    node.attr(node.rect, "height", Graph.NODE_HEIGHT * scope.zoom);
-                }
-                else {
-                    node.attr(node.rect, "width", Graph.NODE_WIDTH * scope.zoom);
-                    node.attr(node.rect, "height", Graph.NODE_HEIGHT * scope.zoom);
-                }
-                node.attr(node.text, "font-size", 11 * scope.zoom);
-            }
-
-            var onUpdate = function (action, yOffset) {
-                var node = action.node;
-                var parent = action.parent ? action.parent.node : null;
-
-                // Set size of node according to zoom
-                if (action.combine) {
-                    var length = 0;
-                    for (var i = 0; i < action.combineArray.length; i++) {
-                        var n = action.combineArray[i].node;
-
-                        setNodeSize(n);
-
-                        length += n.attr(n.rect, "width");
-                    }
-                }
-                setNodeSize(node);
-
-                // Set position
-                if (parent) {
-                    scope._setNodePosition(node, parent.attr(parent.rect, "x"), yOffset);
-                    scope._setLine(action);
-                }
-
-                // Calculate total width
-                var totalWidth = 0;
-                for (var i = 0; i < action.children.length; i++) {
-                    var n = action.children[i].node;
-                    totalWidth += n.attr(n.rect, "width");
-                }
-
-                var nodeWidth = node.attr(node.rect, "width");
-                var nodex = node.attr(node.rect, "x");
-
-                var startingXPos = nodex + (nodeWidth / 2) - (totalWidth / 2);
-
-                // Recursively set position of children
-                for (var i = 0; i < action.children.length; i++) {
-
-                    var n = action.children[i].node;
-                    var newx = startingXPos;
-                    var newy = yOffset + Graph.VERTICAL_OFFSET * scope.zoom;
-
-                    onUpdate(n.action, newy);
-
-                    scope._setNodePosition(n, newx, newy);
-                    scope._setLine(n.action);
-                    startingXPos += n.attr(n.rect, "width");
-                }
-            };
-
-            var onPosition = function (action, maxWidth) {
-
-                var total = 0;
-                var start = action.combine && action.combineArray.length > 1 ? 0 : 1;
-
-                for (var i = start; i < action.children.length; i++) {
-                    var n = action.children[i].node;
-
-                    if (action.combine) {
-                        for (var j = 1; j < action.combineArray.length; j++) {
-                            var cn = action.combineArray[j].node;
-                            total += cn.attr(cn.rect, "width");
-                        }
-                    }
-                    else
-                        total += n.attr(n.rect, "width");
-                }
-
-                if (total > maxWidth) {
-                    maxWidth = total;
-                }
-
-                for (var i = 0; i < action.children.length; i++) {
-                    maxWidth = onPosition(action.children[i], maxWidth);
-                }
-
-                return maxWidth;
-
-            };
-
-            // Set root node position / scale and recursively set position of its children
-            this._setNodePosition(this.root, (this.graph.width / 2) - (Graph.NODE_WIDTH / 2) * this.zoom, 10);
-            this.root.attr(this.root.rect, "width", Graph.NODE_WIDTH * scope.zoom);
-            this.root.attr(this.root.rect, "height", Graph.NODE_HEIGHT * scope.zoom);
-
-            onUpdate(this.root.action, 10 * this.zoom);
-
-            // Get total widths
-            var widths = new Array();
-            /*
-            object:
-                {
-                    triggerWidth: number
-                    childrenWidths: new Array<number>()
-                }
-            */
-
-            for (var i = 0; i < scope.root.action.children.length; i++) {
-                var a = scope.root.action.children[i];
-
-                var obj = {
-                    triggerWidth: onPosition(a, 0),
-                    childrenWidths: new Array()
-                };
-
-                for (var j = 0; j < a.children.length; j++) {
-                    var cw = onPosition(a.children[j], 0);
-                    obj.childrenWidths.push(cw);
-                    obj.triggerWidth += cw;
-                }
-
-                widths.push(obj);
-            }
-
-            // Set new position of children
-            var rx = scope.root.attr(scope.root.rect, "x");
-            var rwidth = 0;
-            var cwidth = 0;
-
-            for (var i = 0; i < scope.root.action.children.length; i++) {
-                var a = scope.root.action.children[i];
-                var tx = a.node.attr(a.node.rect, "x");
-
-                for (var j = 0; j < a.children.length; j++) {
-                    var n = a.children[j].node;
-                    var x = n.attr(n.rect, "x");
-                    var y = n.attr(n.rect, "y");
-                    var inverse = x >= tx ? 1 : -1;
-
-                    scope._setNodePosition(n, x + (scope.root.action.children.length > 1 ? widths[i].childrenWidths[j] / 1.8 : 0) * inverse, y);
-                    scope._setLine(n.action);
-
-                    scope._resizeCanvas(n);
-                    cwidth += widths[i].childrenWidths[j] / 2;
-                }
-
-                if (scope.root.action.children.length > 1) {
-                    var n = a.node;
-                    var x = n.attr(n.rect, "x");
-                    var y = n.attr(n.rect, "y");
-                    var inverse = x >= rx && i == 0 && !n.minimized ? 1 : -1;
-
-                    scope._setNodePosition(n, x + rwidth + (i > 1 ? widths[i - 1].triggerWidth / 1.8 : 0) + (widths[i].triggerWidth / 1.8) * inverse, y);
-                    scope._setLine(n.action);
-
-                    scope._resizeCanvas(n);
-                }
-
-                rwidth += widths[i].triggerWidth / 2;
-            }
-        }
-
-        // Creates the JSON according to the graph
-        // root: the root object to start with
-        Graph.prototype.createJSON = function (root) {
-            if (!root) root = this.root.action;
-
-            var action = {};
-            action.type = root.type;
-            action.name = root.name;
-            action.detached = root.node.detached;
-            action.children = new Array();
-            action.combine = new Array();
-
-            action.properties = new Array();
-            for (var i = 0; i < root.properties.length; i++) {
-                action.properties[i] = { name: root.properties[i].text, value: root.propertiesResults[i] };
-                if (root.properties[i].targetType != null)
-                    action.properties[i].targetType = root.properties[i].targetType;
-            }
-
-            if (root.combine) {
-                for (var i = 0; i < root.combineArray.length; i++) {
-                    var combinedAction = root.combineArray[i];
-                    action.combine.push(this.createJSON(combinedAction, action));
-                }
-            }
-            
-            if (root.combine)
-                root = root.children[0]; // The hub
-
-            for (var i = 0; i < root.children.length; i++) {
-                action.children.push(this.createJSON(root.children[i], action));
-            }
-
-            return action;
-        }
-
-        // Loads a graph from a JSON
-        // Graph: the root object's graph
-        // startNode: the start node to where begin the load
-        Graph.prototype.loadFromJSON = function (graph, startNode) {
-            var scope = this;
-
-            // If startNode is null, means it replaces all the graph
-            // If not, it comes from a copy/paste
-            if (startNode == null) {
-                for (var i = 0; i < this.root.action.children.length; i++)
-                    this._removeAction(this.root.action.children[i], true);
-
-                this.root.action.clearChildren();
-            }
-
-            var load = function (root, parent, detached, combine) {
-                if (!parent) parent = scope.root.action;
-                if (!root) root = graph;
-                if (!detached) detached = false;
-                if (!combine) combine = false;
-
-                var n = null; // Not going to be created
-
-                if (root.type != AB.ActionsBuilder.Type.OBJECT) { // Means it is not the root (the edited object)
-                    var e = {};
-                    e.type = root.type;
-                    e.name = root.name;
-                    e.detached = root.detached;
-                    e.combine = root.combine.length > 0;
-                    e.properties = new Array();
-                    e.combineArray = new Array();
-
-                    for (var i = 0; i < root.properties.length; i++) {
-                        e.properties.push({ text: root.properties[i].name, value: root.properties[i].value });
-                        if (root.properties[i].targetType != null) {
-                            e.properties[e.properties.length - 1].targetType = root.properties[i].targetType;
-                        }
-                    }
-
-                    n = scope.addNode(parent, e);
-                    if (detached)
-                        n.attr(n.rect, "fill", scope.getNodeColor(n.action));
-                    else
-                        detached = n.detached;
-
-                    // If combine array length > 0, it is a combine action
-                    for (var i = 0; i < root.combine.length; i++) {
-                        load(root.combine[i], n.action, detached, true);
-                    }
-
-                    if (!combine)
-                        parent = parent.children[parent.children.length - 1];
-                    else
-                        n.action.parent = null;
-                }
-
-                for (var i = 0; i < root.children.length; i++) {
-                    load(root.children[i], n && n.action.combine ? n.action.hub.action : parent, root.detached, false);
-                }
-            }
-
-            load(graph, startNode);
-            this.update();
-        }
-
-        // Traverse the graph and returns if hit a node
-        // start: the start node to start traverse
-        // x: the mouse's x position
-        // y: the mouse's y position
-        // traverseCombine: if check the combine nodes
-        Graph.prototype.traverseGraph = function (start, x, y, traverseCombine) {
-            if (!start) start = this.root.action;
-            if (traverseCombine == null) traverseCombine = false;
-
-            var result = {
-                hit: true,
-                element: start
-            };
-
-            if (start.node.isPointInside(x, y))
-                return result;
-
-            for (var i = 0; i < start.children.length; i++) {
-
-                if (start.children[i].node.isPointInside(x, y)) {
-                    result.hit = true;
-                    result.element = start.children[i];
-
-                    if (start.children[i].combine && traverseCombine) {
-                        var a = start.children[i];
-                        for (var j = 0; j < a.combineArray.length; j++) {
-                            if (a.combineArray[j].node.isPointInside(x, y)) {
-                                result.element = a.combineArray[j];
-                                break;
-                            }
-                        }
-                    }
-
-                    return result;
-                }
-
-                result = this.traverseGraph(start.children[i], x, y, traverseCombine);
-                if (result.hit)
-                    return result;
-
-            }
-
-            result.hit = false;
-            result.element = null;
-            return result;
-        }
-
-        //
-        // Private functions
-        //
-
-        // Sets the given node's line
-        // If commented, the line isn't setted by hidden
-        Graph.prototype._setLine = function (element) {
-            var n = element.node;
-            var nodeWidth = n.attr(n.rect, "width");
-            var nodeHeight = n.attr(n.rect, "height");
-            var nodex = n.attr(n.rect, "x");
-            var nodey = n.attr(n.rect, "y");
-
-            if (n.detached) {
-                n.attr(n.line, "path", ["M", nodex, nodey, "L", nodex, nodey]);
-                return;
-            }
-
-            var linex = n.attr(n.rect, "x") + nodeWidth / 2;
-            var liney = n.attr(n.rect, "y");
-
-            var p = element.parent.node;
-            var parentWidth = p.attr(p.rect, "width");
-            var parentHeight = p.attr(p.rect, "height");
-            var parentx = p.attr(p.rect, "x");
-            var parenty = p.attr(p.rect, "y");
-
-            var liney2 = liney - (liney - parenty - parentHeight) / 2;
-            var linex3 = parentx + parentWidth / 2;
-            var liney4 = parenty + parentHeight;
-
-            n.attr(n.line, "path", ["M", linex, liney, "L", linex, liney2, "L", linex3, liney2, "L", linex3, liney4]);
-            n.attr(n.line, "stroke", this.getSelectedNodeColor(element, element.node.detached));
-
-        }
-
-        // Sets the given node's position
-        // Applies changements on its children
-        Graph.prototype._setNodePosition = function (node, x, y) {
-            var offsetx = node.attr(node.rect, "x") - x;
-
-            node.attr(node.rect, "x", x);
-            node.attr(node.rect, "y", y);
-
-            var bbox = node.text.getBBox();
-            var textWidth = 0;
-            if (bbox)
-                textWidth = node.text.getBBox().width;
-
-            node.attr(node.text, "x", x + node.attr(node.rect, "width") / 2 - textWidth / 2);
-            node.attr(node.text, "y", y + node.attr(node.rect, "height") / 2);
-
-            // Set combine nodes positions
-            if (node.action.combine) {
-                var length = 0;
-                for (var i = 0; i < node.action.combineArray.length; i++) {
-                    var a = node.action.combineArray[i];
-                    var n = a.node;
-
-                    n.attr(n.rect, "x", node.attr(node.rect, "x") + length);
-                    n.attr(n.rect, "y", node.attr(node.rect, "y"));
-
-                    textWidth = n.text.getBBox().width;
-                    n.attr(n.text, "x", n.attr(n.rect, "x") + n.attr(n.rect, "width") / 2 - textWidth / 2);
-                    n.attr(n.text, "y", y + Graph.NODE_HEIGHT / 2);
-
-                    length += n.attr(n.rect, "width");
-                }
-
-                node.attr(node.rect, "width", length);
-            }
-
-            for (var i = 0; i < node.action.children.length; i++) {
-                this._setNodePosition(node.action.children[i].node, node.action.children[i].node.attr(node.action.children[i].node.rect, "x") - offsetx, y + Graph.VERTICAL_OFFSET);
-                this._setLine(node.action.children[i]);
-            }
-        }
-
-        // Resizes the canvas if the node is outside the current canvas size
-        Graph.prototype._resizeCanvas = function (node) {
-            var x = node.attr(node.rect, "x");
-            var y = node.attr(node.rect, "y");
-
-            if (x > 0 + Graph.NODE_WIDTH && x < this.graph.width - Graph.NODE_WIDTH && y < this.graph.height)
-                    return;
-
-            this.graph.setSize(this.graph.width + 500, this.graph.height + 500);
-            this._setNodePosition(this.root, (this.graph.width / 2) - (Graph.NODE_WIDTH / 2), 10);
-
-            this.element.scrollLeft = (this.graph.width / 2) - this.element.getBoundingClientRect().width / 2;
-        }
-
-        // Removes a node
-        // node : the node to remove
-        Graph.prototype._removeNode = function (node) {
-            node.rect.remove();
-            node.text.remove();
-            if (node.line)
-                node.line.remove();
-        }
-
-        // Remove an action from the graph
-        // action : the action to remove
-        // removeChildren : if true, it deletes the branch
-        Graph.prototype._removeAction = function (action, removeChildren) {
-            if (!removeChildren)
-                removeChildren = false;
-
-            this._removeNode(action.node);
-
-            if (action.combine) {
-                for (var i = 0; i < action.combineArray.length; i++) {
-                    this._removeNode(action.combineArray[i].node);
-                }
-                action.combineArray = new Array();
-            }
-
-            if (removeChildren) {
-                for (var i = 0; i < action.children.length; i++)
-                    this._removeAction(action.children[i], removeChildren);
-
-                action.clearChildren();
-            }
-            else {
-                for (var i = 0; i < action.children.length; i++) {
-                    action.parent.addChild(action.children[i]);
-                    action.children[i].parent = action.parent;
-                }
-            }
-        }
-
-        // Creates a node
-        // text : the text/name of the node
-        // color : the node's color
-        // noLine : if the node has parent then draw a line, or not
-        Graph.prototype._createNode = function (text, color, noLine) {
-            var n = new AB.Node();
-            n.rect = this.graph.rect(20, 20, Graph.NODE_WIDTH, Graph.NODE_HEIGHT, 0);
-            n.text = this.graph.text(0, 0, text);
-
-            if (!noLine) {
-                n.line = this.graph.path("M10 10L90 90");
-                n.line.attr("stroke", color);
-            }
-
-            n.action = new AB.Action(n);
-
-            n.rect.attr("fill", color);
-            n.text.attr("font-size", 11);
-            n.text.attr("text-anchor", "start");
-            n.text.attr("font-family", "Sinkin Sans Light");
-
-            return n;
-        }
-
-        // Creates the animations for a node
-        // element: the node
-        Graph.prototype._createNodeAnimation = function (element) {
-            var scope = this;
-            var mousex, mousey;
-            var finished = true;
-            var elementx = 0;
-            var elementy = 0;
-
-            var onMove = function (dx, dy, x, y, event) {
-                mousex = x;
-                mousey = y;
-            };
-
-            var onStart = function (x, y, event) {
-                if (element.minimized)
-                    return;
-
-                mousex = x;
-                mousey = y;
-
-                if (finished) {
-                    elementx = element.attr(element.rect, "x");
-                    elementy = element.attr(element.rect, "y");
-                }
-                finished = false;
-
-                if (!element.minimized) {
-                    element.rect.animate({
-                        x: element.attr(element.rect, "x") - 10,
-                        y: element.attr(element.rect, "y") - 5,
-                        width: element.minimized ? Graph.NODE_MINIMIZED_WIDTH + 20 : Graph.NODE_WIDTH + 20,
-                        height: Graph.NODE_HEIGHT + 10,
-                        opacity: 0.25
-                    }, 500, ">");
-                }
-            };
-
-            var onEnd = function (event) {
-
-                if (!element.minimized) {
-                    element.rect.animate({
-                        x: elementx,
-                        y: elementy,
-                        width: element.minimized ? Graph.NODE_MINIMIZED_WIDTH : Graph.NODE_WIDTH,
-                        height: Graph.NODE_HEIGHT,
-                        opacity: 1.0
-                    }, 500, ">", function () { finished = true; });
-                }
-                var x = mousex - scope.graph.canvas.getBoundingClientRect().left;
-                var y = mousey - scope.graph.canvas.getBoundingClientRect().top;
-                var dragResult = scope.traverseGraph(null, x, y, true);
-
-                if (dragResult.hit && dragResult.element == element.action || !dragResult.hit) {
-                    scope.parametersManager.createParameters(element);
-                }
-                else {
-                    if (dragResult.element.children.length > 0 && dragResult.element.type != AB.ActionsBuilder.Type.TRIGGER)
-                        return;
-
-                    if (element.action.type == AB.ActionsBuilder.Type.TRIGGER && dragResult.element != scope.root.action)
-                        return;
-
-                    if (element.action.type == AB.ActionsBuilder.Type.ACTION && dragResult.element == scope.root.action)
-                        return;
-
-                    if (element.action.type == AB.ActionsBuilder.Type.FLOW_CONTROL && (dragResult.element == scope.root.action || dragResult.element.type == AB.ActionsBuilder.Type.FLOW_CONTROL))
-                        return;
-
-                    if (element.action.parent && element.action.parent.combine) // Musn't move hubs
-                        return;
-
-                    if (element.action == dragResult.element.parent)
-                        return;
-
-                    // Reset node
-                    element.rect.stop(element.rect.animation);
-                    element.attr(element.rect, "opacity", 1.0);
-                    element.attr(element.rect, "width", Graph.NODE_WIDTH);
-                    element.attr(element.rect, "height", Graph.NODE_HEIGHT);
-
-                    if (element.action.parent) {
-                        element.action.parent.removeChild(element.action);
-                        dragResult.element.addChild(element.action);
-                        scope.update();
-                        scope._createNodeAnimation(element);
-                    }
-                }
-            };
-
-            element.rect.drag(onMove, onStart, onEnd);
-            element.text.drag(onMove, onStart, onEnd);
-        }
-
-        Graph.NODE_MINIMIZED_WIDTH = 50;
-        Graph.NODE_WIDTH = 150;
-        Graph.NODE_HEIGHT = 25;
-        Graph.VERTICAL_OFFSET = 70;
-
-        return Graph;
-    })();
-
-    AB.Graph = Graph;
-
-})(AB || (AB = {}));

+ 0 - 87
Exporters/3ds Max/Max2Babylon/Exporter/ActionBuilder/ActionsBuilder/viewsertoolbar.js

@@ -1,87 +0,0 @@
-/// <reference path="raphael.js" />
-/// <reference path="actionKinds.js" />
-/// <reference path="viewer.js" />
-
-var AB;
-(function (AB) {
-
-    var ToolBar = (function () {
-        function ToolBar(viewer) {
-            // Members
-            this.element = document.getElementById("ToolbarList");
-            this.viewer = viewer;
-
-            // Configure
-            this._attachControl();
-        }
-
-        //
-        // Private methods
-        //
-        // Attaches controls to each button
-        ToolBar.prototype._attachControl = function () {
-            var scope = this;
-            var events = new Array();
-
-            // Create event handlers and add them to the events array
-            var onReduce = function () {
-                scope.viewer.utils.onReduceAll(false);
-            };
-            events.push(onReduce);
-
-            var onExpand = function () {
-                scope.viewer.utils.onReduceAll(true);
-            };
-            events.push(onExpand);
-
-            var onDisconnect = function () {
-                scope.viewer.utils.onDetachAll(true, false);
-            };
-            events.push(onDisconnect);
-
-            var onReconnect = function () {
-                scope.viewer.utils.onDetachAll(false, true);
-            };
-            events.push(onReconnect);
-
-            var onDeZoom = function () {
-                if (scope.viewer.zoom > 0.0)
-                    scope.viewer.zoom -= 0.1;
-
-                scope.viewer.update();
-            };
-            events.push(onDeZoom);
-
-            var onZoom = function () {
-                if (scope.viewer.zoom < 1.0)
-                    scope.viewer.zoom += 0.1;
-
-                scope.viewer.update();
-            };
-            events.push(onZoom);
-
-            // Add events
-            var onEvent = function (id, element) {
-                return function (event) {
-                    element.style.backgroundColor = "rgb(155, 155, 155)";
-                    events[id](event);
-                    setTimeout(function () {
-                        element.style.backgroundColor = "rgb(0, 0, 0)";
-                    }, 100);
-                };
-            };
-
-            var list = this.element.getElementsByTagName("li");
-            for (var i = 0; i < events.length; i++) {
-                list[i].addEventListener("click", onEvent(i, list[i]));
-            }
-        }
-
-        ToolBar.VIEW_HEIGHT = 40;
-
-        return ToolBar;
-    })();
-
-    AB.ToolBar = ToolBar;
-
-})(AB || (AB = {}));

+ 1 - 1
Exporters/3ds Max/Max2Babylon/Exporter/BabylonExporter.cs

@@ -197,7 +197,7 @@ namespace Max2Babylon
                         babylonScene.fogColor = fog.GetColor(0).ToArray();
                         babylonScene.fogMode = 3;
                     }
-#if !MAX2015
+#if !MAX2015 && !MAX2016
                     else
                     {
                         var paramBlock = atmospheric.GetReference(0) as IIParamBlock;

+ 1 - 1
Exporters/3ds Max/Max2Babylon/Forms/ActionsBuilderForm.cs

@@ -26,7 +26,7 @@ namespace Max2Babylon
             // Finish
             _babylonActionsBuilderAction = babylonActionsBuilderAction;
         }
-         
+        
         private void ActionsBuilderForm_Load(object sender, EventArgs e)
         {
             if (Loader.Core.SelNodeCount > 0)

+ 5 - 5
Exporters/3ds Max/Max2Babylon/GlobalUtility.cs

@@ -54,7 +54,7 @@ namespace Max2Babylon
                 actionTable = Loader.Global.ActionTable.Create(idActionTable, 0, ref actionTableName);
                 actionTable.AppendOperation(new BabylonExportActionItem());
                 actionTable.AppendOperation(new BabylonPropertiesActionItem());
-               // actionTable.AppendOperation(new BabylonActionsBuilderActionItem());
+                actionTable.AppendOperation(new BabylonActionsBuilderActionItem());
                 actionCallback = new BabylonActionCallback();
 
                 actionManager.RegisterActionTable(actionTable);
@@ -107,11 +107,11 @@ namespace Max2Babylon
                 menuItemBabylon = Loader.Global.IMenuItem;
                 menuItemBabylon.Title = "Babylon Properties";
                 menuItemBabylon.ActionItem = actionTable[1];
-                //menu.AddItem(menuItemBabylon, -1);
+                menu.AddItem(menuItemBabylon, -1);
 
-                //menuItemBabylon = Loader.Global.IMenuItem;
-                //menuItemBabylon.Title = "Babylon Actions Builder";
-                //menuItemBabylon.ActionItem = actionTable[2];
+                menuItemBabylon = Loader.Global.IMenuItem;
+                menuItemBabylon.Title = "Babylon Actions Builder";
+                menuItemBabylon.ActionItem = actionTable[2];
                 menu.AddItem(menuItemBabylon, -1);
 
                 menuItem = Loader.Global.IMenuItem;

+ 16 - 16
Exporters/3ds Max/Max2Babylon/Tools/Tools.cs

@@ -15,7 +15,7 @@ namespace Max2Babylon
     {
         public static IntPtr GetNativeHandle(this INativeObject obj)
         {
-#if MAX2015
+#if MAX2015 || MAX2016
             return obj.NativePointer;
 #else
             return obj.Handle;
@@ -77,7 +77,7 @@ namespace Max2Babylon
 
         public static IMatrix3 Identity { get { return Loader.Global.Matrix3.Create(XAxis, YAxis, ZAxis, Origin); } }
 
-#if !MAX2015
+#if !MAX2015 && !MAX2016
         unsafe public static int GetParamBlockIndex(IIParamBlock paramBlock, string name)
         {
             for (short index = 0; index < paramBlock.NumParams; index++)
@@ -561,7 +561,7 @@ namespace Max2Babylon
         public static void SetStringProperty(this IINode node, string propertyName, string defaultState)
         {
             string state = defaultState;
-#if MAX2015
+#if MAX2015 || MAX2016
             node.SetUserPropString(propertyName, state);
 #else
             node.SetUserPropString(ref propertyName, ref state);
@@ -571,7 +571,7 @@ namespace Max2Babylon
         public static bool GetBoolProperty(this IINode node, string propertyName, int defaultState = 0)
         {
             int state = defaultState;
-#if MAX2015
+#if MAX2015 || MAX2016
             node.GetUserPropBool(propertyName, ref state);
 #else
             node.GetUserPropBool(ref propertyName, ref state);
@@ -583,7 +583,7 @@ namespace Max2Babylon
         public static string GetStringProperty(this IINode node, string propertyName, string defaultState)
         {
             string state = defaultState;
-#if MAX2015
+#if MAX2015 || MAX2016
             node.GetUserPropString(propertyName, ref state);
 #else
             node.GetUserPropString(ref propertyName, ref state);
@@ -595,7 +595,7 @@ namespace Max2Babylon
         public static float GetFloatProperty(this IINode node, string propertyName, float defaultState = 0)
         {
             float state = defaultState;
-#if MAX2015
+#if MAX2015 || MAX2016
             node.GetUserPropFloat(propertyName, ref state);
 #else
             node.GetUserPropFloat(ref propertyName, ref state);
@@ -608,7 +608,7 @@ namespace Max2Babylon
         {
             float state0 = 0;
             string name = propertyName + "_x";
-#if MAX2015
+#if MAX2015 || MAX2016
             node.GetUserPropFloat(name, ref state0);
 #else
             node.GetUserPropFloat(ref name, ref state0);
@@ -617,7 +617,7 @@ namespace Max2Babylon
 
             float state1 = 0;
             name = propertyName + "_y";
-#if MAX2015
+#if MAX2015 || MAX2016
             node.GetUserPropFloat(name, ref state1);
 #else
             node.GetUserPropFloat(ref name, ref state1);
@@ -625,7 +625,7 @@ namespace Max2Babylon
 
             float state2 = 0;
             name = propertyName + "_z";
-#if MAX2015
+#if MAX2015 || MAX2016
             node.GetUserPropFloat(name, ref state2);
 #else
             node.GetUserPropFloat(ref name, ref state2);
@@ -690,7 +690,7 @@ namespace Max2Babylon
         {
             if (checkBox.CheckState != CheckState.Indeterminate)
             {
-#if MAX2015
+#if MAX2015 || MAX2016
                 node.SetUserPropBool(propertyName, checkBox.CheckState == CheckState.Checked);
 #else
                 node.SetUserPropBool(ref propertyName, checkBox.CheckState == CheckState.Checked);
@@ -711,7 +711,7 @@ namespace Max2Babylon
             foreach (var node in nodes)
             {
                 var value = textBox.Text;
-#if MAX2015
+#if MAX2015 || MAX2016
                 node.SetUserPropString(propertyName, value);
 #else
                 node.SetUserPropString(ref propertyName, ref value);
@@ -728,7 +728,7 @@ namespace Max2Babylon
         {
             foreach (var node in nodes)
             {
-#if MAX2015
+#if MAX2015 || MAX2016
                 node.SetUserPropFloat(propertyName, (float)nup.Value);
 #else
                 node.SetUserPropFloat(ref propertyName, (float)nup.Value);
@@ -746,21 +746,21 @@ namespace Max2Babylon
         public static void UpdateVector3Control(Vector3Control vector3Control, IINode node, string propertyName)
         {
             string name = propertyName + "_x";
-#if MAX2015
+#if MAX2015 || MAX2016
             node.SetUserPropFloat(name, vector3Control.X);
 #else
             node.SetUserPropFloat(ref name, vector3Control.X);
 #endif
 
             name = propertyName + "_y";
-#if MAX2015
+#if MAX2015 || MAX2016
             node.SetUserPropFloat(name, vector3Control.Y);
 #else
             node.SetUserPropFloat(ref name, vector3Control.Y);
 #endif
 
             name = propertyName + "_z";
-#if MAX2015
+#if MAX2015 || MAX2016
             node.SetUserPropFloat(name, vector3Control.Z);
 #else
             node.SetUserPropFloat(ref name, vector3Control.Z);
@@ -778,7 +778,7 @@ namespace Max2Babylon
         public static void UpdateComboBox(ComboBox comboBox, IINode node, string propertyName)
         {
             var value = comboBox.SelectedItem.ToString();
-#if MAX2015
+#if MAX2015 || MAX2016
             node.SetUserPropString(propertyName, value);
 #else
             node.SetUserPropString(ref propertyName, ref value);

+ 115 - 46
Exporters/Blender/io_export_babylon.py

@@ -1,8 +1,8 @@
 bl_info = {
     'name': 'Babylon.js',
     'author': 'David Catuhe, Jeff Palmer',
-    'version': (3, 0, 0),
-    'blender': (2, 72, 0),
+    'version': (3, 0, 5),
+    'blender': (2, 75, 0),
     'location': 'File > Export > Babylon.js (.babylon)',
     'description': 'Export Babylon.js scenes (.babylon)',
     'wiki_url': 'https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/Blender',
@@ -137,8 +137,8 @@ class ExporterSettingsPanel(bpy.types.Panel):
     bpy.types.Scene.export_noVertexOpt = bpy.props.BoolProperty(
         name="No vertex sharing",
         description="Turns off an optimization which reduces vertices",
-        default = False,
-        )
+        default = True,
+        )        
     bpy.types.Scene.attachedSound = bpy.props.StringProperty(
         name='Sound',
         description='',
@@ -206,7 +206,8 @@ class Main(bpy.types.Operator, bpy_extras.io_utils.ExportHelper):
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     def getSourceMeshInstance(self, dataName):
         for mesh in self.meshesAndNodes:
-            if mesh.dataName == dataName:
+            # nodes have no 'dataName', cannot be instanced in any case
+            if hasattr(mesh, 'dataName') and mesh.dataName == dataName:
                 return mesh
 
         return None
@@ -610,8 +611,8 @@ class Mesh(FCurveAnimatable):
                         if obj == objArmature:
                             self.skeletonId = i
                             break
-                    else:
-                        i += 1
+                        else:
+                            i += 1
 
         # determine Position, rotation, & scaling
         if forcedParent is None:
@@ -681,7 +682,6 @@ class Mesh(FCurveAnimatable):
             self.physicsFriction = object.rigid_body.friction
             self.physicsRestitution = object.rigid_body.restitution
 
-
         # process all of the materials required
         maxVerts = MAX_VERTEX_ELEMENTS # change for multi-materials
         recipe = BakingRecipe(object)
@@ -690,15 +690,12 @@ class Mesh(FCurveAnimatable):
         if recipe.needsBaking:
             if recipe.multipleRenders:
                 Main.warn('Mixing of Cycles & Blender Render in same mesh not supported.  No materials exported.', 2)
-                uvRequired = False
             else:
                 bakedMat = BakedMaterial(exporter, object, recipe)
                 exporter.materials.append(bakedMat)
-                uvRequired = True
                 self.materialId = bakedMat.name
 
         else:
-            uvRequired = False
             bjs_material_slots = []
             for slot in object.material_slots:
                 # None will be returned when either the first encounter or must be unique due to baked textures
@@ -710,7 +707,6 @@ class Mesh(FCurveAnimatable):
                     material = StdMaterial(slot, exporter, object)
                     exporter.materials.append(material)
 
-                uvRequired |= len(material.textures) > 0
                 bjs_material_slots.append(material)
 
             if len(bjs_material_slots) == 1:
@@ -758,6 +754,7 @@ class Mesh(FCurveAnimatable):
 
         # used tracking of vertices as they are received
         alreadySavedVertices = []
+        vertices_Normals = []
         vertices_UVs = []
         vertices_UV2s = []
         vertices_Colors = []
@@ -767,6 +764,7 @@ class Mesh(FCurveAnimatable):
 
         for v in range(0, len(mesh.vertices)):
             alreadySavedVertices.append(False)
+            vertices_Normals.append([])
             vertices_UVs.append([])
             vertices_UV2s.append([])
             vertices_Colors.append([])
@@ -775,6 +773,7 @@ class Mesh(FCurveAnimatable):
         materialsCount = 1 if recipe.needsBaking else max(1, len(object.material_slots))
         verticesCount = 0
         indicesCount = 0
+        maxInfluencersExceeded = 0
 
         for materialIndex in range(materialsCount):
             if self.offsetFace != 0:
@@ -798,7 +797,11 @@ class Mesh(FCurveAnimatable):
 
                     vertex = mesh.vertices[vertex_index]
                     position = vertex.co
-                    normal = vertex.normal
+                    
+                    if (scene.export_noVertexOpt):
+                        normal = face.normal
+                    else:
+                        normal = vertex.normal
 
                     #skeletons
                     if hasSkeleton:
@@ -819,7 +822,7 @@ class Mesh(FCurveAnimatable):
                             for boneIndex, bone in enumerate(objArmature.pose.bones):
                                 if object.vertex_groups[index].name == bone.name:
                                     if (i == MAX_INFLUENCERS_PER_VERTEX):
-                                        Main.warn('Maximum # of influencers exceeded for a vertex, extras ignored', 2)
+                                        maxInfluencersExceeded += 1
                                         break
                                     matricesWeights[i] = weight
                                     matricesIndicesCompressed += boneIndex << offset
@@ -851,6 +854,10 @@ class Mesh(FCurveAnimatable):
                         # UV
                         index_UV = 0
                         for savedIndex in vertices_indices[vertex_index]:
+                            vNormal = vertices_Normals[vertex_index][index_UV]
+                            if (normal.x != vNormal.x or normal.y != vNormal.y or normal.z != vNormal.z):
+                                continue;
+                            
                             if hasUV:
                                 vUV = vertices_UVs[vertex_index][index_UV]
                                 if (vUV[0] != vertex_UV[0] or vUV[1] != vertex_UV[1]):
@@ -879,6 +886,10 @@ class Mesh(FCurveAnimatable):
                         # Export new one
                         index = verticesCount
                         alreadySavedVertices[vertex_index] = True
+                        
+                        vertices_Normals[vertex_index].append(normal)                        
+                        self.normals.append(normal)
+                        
                         if hasUV:
                             vertices_UVs[vertex_index].append(vertex_UV)
                             self.uvs.append(vertex_UV[0])
@@ -903,7 +914,6 @@ class Mesh(FCurveAnimatable):
                         vertices_indices[vertex_index].append(index)
 
                         self.positions.append(position)
-                        self.normals.append(normal)
 
                         verticesCount += 1
                     self.indices.append(index)
@@ -912,7 +922,11 @@ class Mesh(FCurveAnimatable):
             self.subMeshes.append(SubMesh(materialIndex, subMeshVerticesStart, subMeshIndexStart, verticesCount - subMeshVerticesStart, indicesCount - subMeshIndexStart))
 
         if verticesCount > MAX_VERTEX_ELEMENTS:
-            warn('Due to multi-materials & this meshes size, 32bit indices must be used.  This may not run on all hardware.', 2)
+            Main.warn('Due to multi-materials & this meshes size, 32bit indices must be used.  This may not run on all hardware.', 2)
+
+        if maxInfluencersExceeded > 0:
+            Main.warn('Maximum # of influencers exceeded for ' + format_int(maxInfluencersExceeded) + ' vertices, extras ignored', 2)
+            
         BakedMaterial.meshBakingClean(object)
 
         Main.log('num positions      :  ' + str(len(self.positions)), 2)
@@ -925,9 +939,6 @@ class Mesh(FCurveAnimatable):
             Main.log('num skeletonWeights:  ' + str(len(self.skeletonWeights)), 2)
             Main.log('num skeletonIndices:  ' + str(len(self.skeletonIndicesCompressed * 4)), 2)
 
-        if uvRequired and len(self.uvs) == 0:
-            Main.warn('Textures being used, but no UV Map found', 2)
-
         numZeroAreaFaces = self.find_zero_area_faces()
         if numZeroAreaFaces > 0:
             Main.warn('# of 0 area faces found:  ' + str(numZeroAreaFaces), 2)
@@ -1084,7 +1095,7 @@ class Node(FCurveAnimatable):
         self.castShadows = False
         self.receiveShadows = False
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-    def to_scene_file(self, file_handler, ignored):
+    def to_scene_file(self, file_handler):
         file_handler.write('{')
         write_string(file_handler, 'name', self.name, True)
         write_string(file_handler, 'id', self.name)
@@ -1478,7 +1489,10 @@ class Texture:
             self.hasAlpha = texture.texture.use_alpha
 
             usingMap = texture.uv_layer
-            Main.log('Image texture found, type:  ' + slot + ', mapped using: ' + usingMap, 3)
+            if len(usingMap) == 0:
+                usingMap = mesh.data.uv_textures[0].name
+                
+            Main.log('Image texture found, type:  ' + slot + ', mapped using: "' + usingMap + '"', 3)
             if mesh.data.uv_textures[0].name == usingMap:
                 self.coordinatesIndex = 0
             elif mesh.data.uv_textures[1].name == usingMap:
@@ -1639,35 +1653,89 @@ class BakingRecipe:
 
             else:
                 blenderRender = True
+                nDiffuseImages = 0
+                nReflectionImages = 0
+                nAmbientImages = 0
+                nOpacityImages = 0
+                nEmissiveImages = 0
+                nBumpImages = 0
+                nSpecularImages = 0
 
                 textures = [mtex for mtex in material.texture_slots if mtex and mtex.texture]
                 for mtex in textures:
-                    if mtex.texture.type == 'IMAGE':
+                    # ignore empty slots
+                    if mtex.texture.type == 'NONE':
                         continue
+                    
+                    # for images, just need to make sure there is only 1 per type
+                    if mtex.texture.type == 'IMAGE':
+                        if mtex.use_map_diffuse or mtex.use_map_color_diffuse:
+                            if mtex.texture_coords == 'REFLECTION':
+                                nReflectionImages += 1
+                            else:
+                                nDiffuseImages += 1
+    
+                        if mtex.use_map_ambient:
+                            nAmbientImages += 1
+    
+                        if mtex.use_map_alpha:
+                            nOpacityImages += 1
+    
+                        if mtex.use_map_emit:
+                            nEmissiveImages += 1
+    
+                        if mtex.use_map_normal:
+                            nBumpImages += 1
+    
+                        if mtex.use_map_color_spec:
+                            nSpecularImages += 1
 
-                    self.needsBaking = True
-
-                    if mtex.use_map_diffuse or mtex.use_map_color_diffuse:
-                        if mtex.texture_coords == 'REFLECTION':
-                            self.reflectionBaking = True
-                        else:
-                            self.diffuseBaking = True
-
-                    if mtex.use_map_ambient:
-                        self.ambientBaking = True
-
-                    if mtex.use_map_alpha:
-                        self.opacityBaking = True
-
-                    if mtex.use_map_emit:
-                        self.emissiveBaking = True
-
-                    if mtex.use_map_normal:
-                        self.bumpBaking = True
-
-                    if mtex.use_map_color_spec:
-                        self.specularBaking = True
+                    else:
+                        self.needsBaking = True
+    
+                        if mtex.use_map_diffuse or mtex.use_map_color_diffuse:
+                            if mtex.texture_coords == 'REFLECTION':
+                                self.reflectionBaking = True
+                            else:
+                                self.diffuseBaking = True
+    
+                        if mtex.use_map_ambient:
+                            self.ambientBaking = True
+    
+                        if mtex.use_map_alpha:
+                            self.opacityBaking = True
+    
+                        if mtex.use_map_emit:
+                            self.emissiveBaking = True
+    
+                        if mtex.use_map_normal:
+                            self.bumpBaking = True
+    
+                        if mtex.use_map_color_spec:
+                            self.specularBaking = True
+                            
+                # 2nd pass 2 check for multiples of a given image type
+                if nDiffuseImages > 1:
+                    self.needsBaking = self.diffuseBaking = True
+                if nReflectionImages > 1:
+                    self.needsBaking = self.nReflectionImages = True
+                if nAmbientImages > 1:
+                    self.needsBaking = self.ambientBaking = True
+                if nOpacityImages > 1:
+                    self.needsBaking = self.opacityBaking = True
+                if nEmissiveImages > 1:
+                    self.needsBaking = self.emissiveBaking = True
+                if nBumpImages > 1:
+                    self.needsBaking = self.bumpBaking = True
+                if nSpecularImages > 1:
+                    self.needsBaking = self.specularBaking = True
+                        
         self.multipleRenders = blenderRender and self.cyclesRender
+        
+        # check for really old .blend file, eg. 2.49, to ensure that everything requires exists
+        if self.needsBaking and bpy.data.screens.find('UV Editing') == -1:
+            Main.warn('Contains material requiring baking, but resources not available.  Probably .blend very old', 2)
+            self.needsBaking = False     
 #===============================================================================
 # Not intended to be instanced directly
 class Material:
@@ -1722,8 +1790,8 @@ class StdMaterial(Material):
             elif not mtex.texture.image:
                 Main.warn('Material has un-assigned image texture:  "' + mtex.name + '" ignored', 3)
                 continue
-            elif len(mtex.uv_layer) == 0:
-                Main.warn('Material has image texture with no UV map assigned:  "' + mtex.name + '" ignored', 3)
+            elif len(mesh.data.uv_textures) == 0:
+                Main.warn('Mesh has no UV maps, material:  "' + mtex.name + '" ignored', 3)
                 continue
 
             if mtex.use_map_diffuse or mtex.use_map_color_diffuse:
@@ -2395,3 +2463,4 @@ class ObjectPanel(bpy.types.Panel):
             box.prop(ob.data, 'shadowBlurBoxOffset')
 
             layout.prop(ob.data, 'autoAnimate')
+

+ 8 - 1
Exporters/Blender/readme.md

@@ -3,6 +3,7 @@ Blender to Babylon.js exporter
 
 The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/06/28/babylon-js-how-to-load-a-babylon-file-produced-with-blender.aspx) supports the following features:
 
+For a discussion of Tower of Babel exporter, along with the difference this exporter, [See]{https://github.com/BabylonJS/Extensions/tree/master/TowerOfBabel)
 * **Cameras**
  * Name
  * Position
@@ -14,6 +15,7 @@ The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/0
  * Gravity
  * Ellipsoid
  * Animations
+ * 3D Camera Rigs
  * All kind of Babylon.js cameras can be chosen from a custom dropdown list
 * **Lights**
  * Type (Point, directional (Sun), Spot, Hemispheric)
@@ -25,7 +27,7 @@ The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/0
  * Energy
  * Diffuse color
  * Specular color
- * Shadow maps (For directional lights)
+ * Shadow maps, all types (For directional lights)
  * Animations
 * **Materials**
  * Name
@@ -42,9 +44,12 @@ The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/0
  * Reflection texture
  * Emissive texture
  * Bump texture
+ * Procedural Texture Baking
+ * Cycles Render Baking
 * **Multi-materials**
  * Name
  * Child materials
+ * 32 bit vertex limit for multi-materials
 * **Textures**
  * Name
  * Associated file
@@ -55,12 +60,14 @@ The [Blender export plugin](http://blogs.msdn.com/b/eternalcoding/archive/2013/0
  * uAng / vAng / Wang
  * WrapU / WrapV
  * Coordinates index
+ * Texture in-lining to .babylon file
 * **Meshes**
  * Name
  * Geometry (Positions & normals)
  * Position
  * Rotation
  * Scaling
+ * FreezeWorldMatrix
  * Texture coordinates (2 channels)
  * Vertex colors
  * Visibility

+ 273 - 273
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk.h

@@ -1,273 +1,273 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxsdk.h
-#ifndef _FBXSDK_H_
-#define _FBXSDK_H_
-
-/**
-  * \mainpage FBX SDK Reference
-  * <p>
-  * \section welcome Welcome to the FBX SDK Reference
-  * The FBX SDK Reference contains reference information on every header file, 
-  * namespace, class, method, enum, typedef, variable, and other C++ elements 
-  * that comprise the FBX software development kit (SDK).
-  * <p>
-  * The FBX SDK Reference is organized into the following sections:
-  * <ul><li>Class List: an alphabetical list of FBX SDK classes
-  *     <li>Class Hierarchy: a textual representation of the FBX SDK class structure
-  *     <li>Graphical Class Hierarchy: a graphical representation of the FBX SDK class structure
-  *     <li>File List: an alphabetical list of all documented header files</ul>
-  * <p>
-  * \section otherdocumentation Other Documentation
-  * Apart from this reference guide, an FBX SDK Programming Guide and many FBX 
-  * SDK examples are also provided.
-  * <p>
-  * \section aboutFBXSDK About the FBX SDK
-  * The FBX SDK is a C++ software development kit (SDK) that lets you import 
-  * and export 3D scenes using the Autodesk FBX file format. The FBX SDK 
-  * reads FBX files created with FiLMBOX version 2.5 and later and writes FBX 
-  * files compatible with MotionBuilder version 6.0 and up. 
-  */
-
-#pragma pack(push, 8)	//FBXSDK is compiled with default value (8)
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_NAMESPACE_USING
-	#define FBXSDK_NAMESPACE_USING 1
-#endif
-
-//---------------------------------------------------------------------------------------
-//Core Base Includes
-#include <fbxsdk/core/base/fbxarray.h>
-#include <fbxsdk/core/base/fbxbitset.h>
-#include <fbxsdk/core/base/fbxcharptrset.h>
-#include <fbxsdk/core/base/fbxcontainerallocators.h>
-#include <fbxsdk/core/base/fbxdynamicarray.h>
-#include <fbxsdk/core/base/fbxstatus.h>
-#include <fbxsdk/core/base/fbxfile.h>
-#ifndef FBXSDK_ENV_WINSTORE
-	#include <fbxsdk/core/base/fbxfolder.h>
-#endif
-#include <fbxsdk/core/base/fbxhashmap.h>
-#include <fbxsdk/core/base/fbxintrusivelist.h>
-#include <fbxsdk/core/base/fbxmap.h>
-#include <fbxsdk/core/base/fbxmemorypool.h>
-#include <fbxsdk/core/base/fbxpair.h>
-#include <fbxsdk/core/base/fbxset.h>
-#include <fbxsdk/core/base/fbxstring.h>
-#include <fbxsdk/core/base/fbxstringlist.h>
-#include <fbxsdk/core/base/fbxtime.h>
-#include <fbxsdk/core/base/fbxtimecode.h>
-#include <fbxsdk/core/base/fbxutils.h>
-
-//---------------------------------------------------------------------------------------
-//Core Math Includes
-#include <fbxsdk/core/math/fbxmath.h>
-#include <fbxsdk/core/math/fbxdualquaternion.h>
-#include <fbxsdk/core/math/fbxmatrix.h>
-#include <fbxsdk/core/math/fbxquaternion.h>
-#include <fbxsdk/core/math/fbxvector2.h>
-#include <fbxsdk/core/math/fbxvector4.h>
-
-//---------------------------------------------------------------------------------------
-//Core Sync Includes
-#ifndef FBXSDK_ENV_WINSTORE
-	#include <fbxsdk/core/sync/fbxatomic.h>
-	#include <fbxsdk/core/sync/fbxclock.h>
-	#include <fbxsdk/core/sync/fbxsync.h>
-	#include <fbxsdk/core/sync/fbxthread.h>
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-//---------------------------------------------------------------------------------------
-//Core Includes
-#include <fbxsdk/core/fbxclassid.h>
-#include <fbxsdk/core/fbxconnectionpoint.h>
-#include <fbxsdk/core/fbxdatatypes.h>
-#ifndef FBXSDK_ENV_WINSTORE
-	#include <fbxsdk/core/fbxmodule.h>
-	#include <fbxsdk/core/fbxloadingstrategy.h>
-#endif /* !FBXSDK_ENV_WINSTORE */
-#include <fbxsdk/core/fbxmanager.h>
-#include <fbxsdk/core/fbxobject.h>
-#include <fbxsdk/core/fbxperipheral.h>
-#ifndef FBXSDK_ENV_WINSTORE
-	#include <fbxsdk/core/fbxplugin.h>
-	#include <fbxsdk/core/fbxplugincontainer.h>
-#endif /* !FBXSDK_ENV_WINSTORE */
-#include <fbxsdk/core/fbxproperty.h>
-#include <fbxsdk/core/fbxpropertydef.h>
-#include <fbxsdk/core/fbxpropertyhandle.h>
-#include <fbxsdk/core/fbxpropertypage.h>
-#include <fbxsdk/core/fbxpropertytypes.h>
-#include <fbxsdk/core/fbxquery.h>
-#include <fbxsdk/core/fbxqueryevent.h>
-#ifndef FBXSDK_ENV_WINSTORE
-	#include <fbxsdk/core/fbxscopedloadingdirectory.h>
-	#include <fbxsdk/core/fbxscopedloadingfilename.h>
-#endif /* !FBXSDK_ENV_WINSTORE */
-#include <fbxsdk/core/fbxxref.h>
-
-//---------------------------------------------------------------------------------------
-//File I/O Includes
-#include <fbxsdk/fileio/fbxexporter.h>
-#include <fbxsdk/fileio/fbxexternaldocreflistener.h>
-#include <fbxsdk/fileio/fbxfiletokens.h>
-#include <fbxsdk/fileio/fbxglobalcamerasettings.h>
-#include <fbxsdk/fileio/fbxgloballightsettings.h>
-#include <fbxsdk/fileio/fbxgobo.h>
-#include <fbxsdk/fileio/fbximporter.h>
-#include <fbxsdk/fileio/fbxiobase.h>
-#include <fbxsdk/fileio/fbxiopluginregistry.h>
-#include <fbxsdk/fileio/fbxiosettings.h>
-#include <fbxsdk/fileio/fbxstatisticsfbx.h>
-#include <fbxsdk/fileio/fbxstatistics.h>
-
-//---------------------------------------------------------------------------------------
-//Scene Includes
-#include <fbxsdk/scene/fbxcollection.h>
-#include <fbxsdk/scene/fbxcollectionexclusive.h>
-#include <fbxsdk/scene/fbxcontainer.h>
-#include <fbxsdk/scene/fbxcontainertemplate.h>
-#include <fbxsdk/scene/fbxdisplaylayer.h>
-#include <fbxsdk/scene/fbxdocument.h>
-#include <fbxsdk/scene/fbxdocumentinfo.h>
-#include <fbxsdk/scene/fbxenvironment.h>
-#include <fbxsdk/scene/fbxgroupname.h>
-#include <fbxsdk/scene/fbxlibrary.h>
-#include <fbxsdk/scene/fbxobjectmetadata.h>
-#include <fbxsdk/scene/fbxpose.h>
-#include <fbxsdk/scene/fbxreference.h>
-#include <fbxsdk/scene/fbxscene.h>
-#include <fbxsdk/scene/fbxselectionset.h>
-#include <fbxsdk/scene/fbxselectionnode.h>
-#include <fbxsdk/scene/fbxtakeinfo.h>
-#include <fbxsdk/scene/fbxthumbnail.h>
-#include <fbxsdk/scene/fbxvideo.h>
-
-//---------------------------------------------------------------------------------------
-//Scene Animation Includes
-#include <fbxsdk/scene/animation/fbxanimcurve.h>
-#include <fbxsdk/scene/animation/fbxanimcurvebase.h>
-#include <fbxsdk/scene/animation/fbxanimcurvefilters.h>
-#include <fbxsdk/scene/animation/fbxanimcurvenode.h>
-#include <fbxsdk/scene/animation/fbxanimevalclassic.h>
-#include <fbxsdk/scene/animation/fbxanimevalstate.h>
-#include <fbxsdk/scene/animation/fbxanimevaluator.h>
-#include <fbxsdk/scene/animation/fbxanimlayer.h>
-#include <fbxsdk/scene/animation/fbxanimstack.h>
-#include <fbxsdk/scene/animation/fbxanimutilities.h>
-
-//---------------------------------------------------------------------------------------
-//Scene Constraint Includes
-#include <fbxsdk/scene/constraint/fbxcharacternodename.h>
-#include <fbxsdk/scene/constraint/fbxcharacter.h>
-#include <fbxsdk/scene/constraint/fbxcharacterpose.h>
-#include <fbxsdk/scene/constraint/fbxconstraint.h>
-#include <fbxsdk/scene/constraint/fbxconstraintaim.h>
-#include <fbxsdk/scene/constraint/fbxconstraintcustom.h>
-#include <fbxsdk/scene/constraint/fbxconstraintparent.h>
-#include <fbxsdk/scene/constraint/fbxconstraintposition.h>
-#include <fbxsdk/scene/constraint/fbxconstraintrotation.h>
-#include <fbxsdk/scene/constraint/fbxconstraintscale.h>
-#include <fbxsdk/scene/constraint/fbxconstraintsinglechainik.h>
-#include <fbxsdk/scene/constraint/fbxconstraintutils.h>
-#include <fbxsdk/scene/constraint/fbxcontrolset.h>
-#include <fbxsdk/scene/constraint/fbxhik2fbxcharacter.h>
-
-//---------------------------------------------------------------------------------------
-//Scene Geometry Includes
-#include <fbxsdk/scene/geometry/fbxblendshape.h>
-#include <fbxsdk/scene/geometry/fbxblendshapechannel.h>
-#include <fbxsdk/scene/geometry/fbxcache.h>
-#include <fbxsdk/scene/geometry/fbxcachedeffect.h>
-#include <fbxsdk/scene/geometry/fbxcamera.h>
-#include <fbxsdk/scene/geometry/fbxcamerastereo.h>
-#include <fbxsdk/scene/geometry/fbxcameraswitcher.h>
-#include <fbxsdk/scene/geometry/fbxcluster.h>
-#include <fbxsdk/scene/geometry/fbxdeformer.h>
-#include <fbxsdk/scene/geometry/fbxgenericnode.h>
-#include <fbxsdk/scene/geometry/fbxgeometry.h>
-#include <fbxsdk/scene/geometry/fbxgeometrybase.h>
-#include <fbxsdk/scene/geometry/fbxgeometryweightedmap.h>
-#include <fbxsdk/scene/geometry/fbxlight.h>
-#include <fbxsdk/scene/geometry/fbxlimitsutilities.h>
-#include <fbxsdk/scene/geometry/fbxline.h>
-#include <fbxsdk/scene/geometry/fbxlodgroup.h>
-#include <fbxsdk/scene/geometry/fbxmarker.h>
-#include <fbxsdk/scene/geometry/fbxmesh.h>
-#include <fbxsdk/scene/geometry/fbxnode.h>
-#include <fbxsdk/scene/geometry/fbxnodeattribute.h>
-#include <fbxsdk/scene/geometry/fbxnull.h>
-#include <fbxsdk/scene/geometry/fbxnurbs.h>
-#include <fbxsdk/scene/geometry/fbxnurbscurve.h>
-#include <fbxsdk/scene/geometry/fbxnurbssurface.h>
-#include <fbxsdk/scene/geometry/fbxopticalreference.h>
-#include <fbxsdk/scene/geometry/fbxpatch.h>
-#include <fbxsdk/scene/geometry/fbxproceduralgeometry.h>
-#include <fbxsdk/scene/geometry/fbxshape.h>
-#include <fbxsdk/scene/geometry/fbxskeleton.h>
-#include <fbxsdk/scene/geometry/fbxskin.h>
-#include <fbxsdk/scene/geometry/fbxsubdeformer.h>
-#include <fbxsdk/scene/geometry/fbxsubdiv.h>
-#include <fbxsdk/scene/geometry/fbxtrimnurbssurface.h>
-#include <fbxsdk/scene/geometry/fbxvertexcachedeformer.h>
-#include <fbxsdk/scene/geometry/fbxweightedmapping.h>
-
-//---------------------------------------------------------------------------------------
-//Scene Shading Includes
-#include <fbxsdk/scene/shading/fbxshadingconventions.h>
-#include <fbxsdk/scene/shading/fbxbindingsentryview.h>
-#include <fbxsdk/scene/shading/fbxbindingtable.h>
-#include <fbxsdk/scene/shading/fbxbindingtableentry.h>
-#include <fbxsdk/scene/shading/fbxbindingoperator.h>
-#include <fbxsdk/scene/shading/fbxconstantentryview.h>
-#include <fbxsdk/scene/shading/fbxentryview.h>
-#include <fbxsdk/scene/shading/fbxfiletexture.h>
-#include <fbxsdk/scene/shading/fbximplementation.h>
-#include <fbxsdk/scene/shading/fbximplementationfilter.h>
-#include <fbxsdk/scene/shading/fbximplementationutils.h>
-#include <fbxsdk/scene/shading/fbxlayeredtexture.h>
-#include <fbxsdk/scene/shading/fbxoperatorentryview.h>
-#include <fbxsdk/scene/shading/fbxproceduraltexture.h>
-#include <fbxsdk/scene/shading/fbxpropertyentryview.h>
-#include <fbxsdk/scene/shading/fbxsemanticentryview.h>
-#include <fbxsdk/scene/shading/fbxsurfacelambert.h>
-#include <fbxsdk/scene/shading/fbxsurfacematerial.h>
-#include <fbxsdk/scene/shading/fbxsurfacephong.h>
-#include <fbxsdk/scene/shading/fbxtexture.h>
-
-//---------------------------------------------------------------------------------------
-//Utilities Includes
-#include <fbxsdk/utils/fbxdeformationsevaluator.h>
-#include <fbxsdk/utils/fbxprocessor.h>
-#include <fbxsdk/utils/fbxprocessorxref.h>
-#include <fbxsdk/utils/fbxprocessorxrefuserlib.h>
-#include <fbxsdk/utils/fbxprocessorshaderdependency.h>
-#include <fbxsdk/utils/fbxclonemanager.h>
-#include <fbxsdk/utils/fbxgeometryconverter.h>
-#include <fbxsdk/utils/fbxmanipulators.h>
-#include <fbxsdk/utils/fbxmaterialconverter.h>
-#include <fbxsdk/utils/fbxrenamingstrategyfbx5.h>
-#include <fbxsdk/utils/fbxrenamingstrategyfbx6.h>
-#include <fbxsdk/utils/fbxrenamingstrategyutilities.h>
-#include <fbxsdk/utils/fbxrootnodeutility.h>
-#include <fbxsdk/utils/fbxusernotification.h>
-
-//---------------------------------------------------------------------------------------
-#if defined(FBXSDK_NAMESPACE) && (FBXSDK_NAMESPACE_USING == 1)
-	using namespace FBXSDK_NAMESPACE;
-#endif
-
-#pragma pack(pop)
-
-#endif /* _FBXSDK_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxsdk.h
+#ifndef _FBXSDK_H_
+#define _FBXSDK_H_
+
+/**
+  * \mainpage FBX SDK Reference
+  * <p>
+  * \section welcome Welcome to the FBX SDK Reference
+  * The FBX SDK Reference contains reference information on every header file, 
+  * namespace, class, method, enum, typedef, variable, and other C++ elements 
+  * that comprise the FBX software development kit (SDK).
+  * <p>
+  * The FBX SDK Reference is organized into the following sections:
+  * <ul><li>Class List: an alphabetical list of FBX SDK classes
+  *     <li>Class Hierarchy: a textual representation of the FBX SDK class structure
+  *     <li>Graphical Class Hierarchy: a graphical representation of the FBX SDK class structure
+  *     <li>File List: an alphabetical list of all documented header files</ul>
+  * <p>
+  * \section otherdocumentation Other Documentation
+  * Apart from this reference guide, an FBX SDK Programming Guide and many FBX 
+  * SDK examples are also provided.
+  * <p>
+  * \section aboutFBXSDK About the FBX SDK
+  * The FBX SDK is a C++ software development kit (SDK) that lets you import 
+  * and export 3D scenes using the Autodesk FBX file format. The FBX SDK 
+  * reads FBX files created with FiLMBOX version 2.5 and later and writes FBX 
+  * files compatible with MotionBuilder version 6.0 and up. 
+  */
+
+#pragma pack(push, 8)	//FBXSDK is compiled with default value (8)
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_NAMESPACE_USING
+	#define FBXSDK_NAMESPACE_USING 1
+#endif
+
+//---------------------------------------------------------------------------------------
+//Core Base Includes
+#include <fbxsdk/core/base/fbxarray.h>
+#include <fbxsdk/core/base/fbxbitset.h>
+#include <fbxsdk/core/base/fbxcharptrset.h>
+#include <fbxsdk/core/base/fbxcontainerallocators.h>
+#include <fbxsdk/core/base/fbxdynamicarray.h>
+#include <fbxsdk/core/base/fbxstatus.h>
+#include <fbxsdk/core/base/fbxfile.h>
+#ifndef FBXSDK_ENV_WINSTORE
+	#include <fbxsdk/core/base/fbxfolder.h>
+#endif
+#include <fbxsdk/core/base/fbxhashmap.h>
+#include <fbxsdk/core/base/fbxintrusivelist.h>
+#include <fbxsdk/core/base/fbxmap.h>
+#include <fbxsdk/core/base/fbxmemorypool.h>
+#include <fbxsdk/core/base/fbxpair.h>
+#include <fbxsdk/core/base/fbxset.h>
+#include <fbxsdk/core/base/fbxstring.h>
+#include <fbxsdk/core/base/fbxstringlist.h>
+#include <fbxsdk/core/base/fbxtime.h>
+#include <fbxsdk/core/base/fbxtimecode.h>
+#include <fbxsdk/core/base/fbxutils.h>
+
+//---------------------------------------------------------------------------------------
+//Core Math Includes
+#include <fbxsdk/core/math/fbxmath.h>
+#include <fbxsdk/core/math/fbxdualquaternion.h>
+#include <fbxsdk/core/math/fbxmatrix.h>
+#include <fbxsdk/core/math/fbxquaternion.h>
+#include <fbxsdk/core/math/fbxvector2.h>
+#include <fbxsdk/core/math/fbxvector4.h>
+
+//---------------------------------------------------------------------------------------
+//Core Sync Includes
+#ifndef FBXSDK_ENV_WINSTORE
+	#include <fbxsdk/core/sync/fbxatomic.h>
+	#include <fbxsdk/core/sync/fbxclock.h>
+	#include <fbxsdk/core/sync/fbxsync.h>
+	#include <fbxsdk/core/sync/fbxthread.h>
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+//---------------------------------------------------------------------------------------
+//Core Includes
+#include <fbxsdk/core/fbxclassid.h>
+#include <fbxsdk/core/fbxconnectionpoint.h>
+#include <fbxsdk/core/fbxdatatypes.h>
+#ifndef FBXSDK_ENV_WINSTORE
+	#include <fbxsdk/core/fbxmodule.h>
+	#include <fbxsdk/core/fbxloadingstrategy.h>
+#endif /* !FBXSDK_ENV_WINSTORE */
+#include <fbxsdk/core/fbxmanager.h>
+#include <fbxsdk/core/fbxobject.h>
+#include <fbxsdk/core/fbxperipheral.h>
+#ifndef FBXSDK_ENV_WINSTORE
+	#include <fbxsdk/core/fbxplugin.h>
+	#include <fbxsdk/core/fbxplugincontainer.h>
+#endif /* !FBXSDK_ENV_WINSTORE */
+#include <fbxsdk/core/fbxproperty.h>
+#include <fbxsdk/core/fbxpropertydef.h>
+#include <fbxsdk/core/fbxpropertyhandle.h>
+#include <fbxsdk/core/fbxpropertypage.h>
+#include <fbxsdk/core/fbxpropertytypes.h>
+#include <fbxsdk/core/fbxquery.h>
+#include <fbxsdk/core/fbxqueryevent.h>
+#ifndef FBXSDK_ENV_WINSTORE
+	#include <fbxsdk/core/fbxscopedloadingdirectory.h>
+	#include <fbxsdk/core/fbxscopedloadingfilename.h>
+#endif /* !FBXSDK_ENV_WINSTORE */
+#include <fbxsdk/core/fbxxref.h>
+
+//---------------------------------------------------------------------------------------
+//File I/O Includes
+#include <fbxsdk/fileio/fbxexporter.h>
+#include <fbxsdk/fileio/fbxexternaldocreflistener.h>
+#include <fbxsdk/fileio/fbxfiletokens.h>
+#include <fbxsdk/fileio/fbxglobalcamerasettings.h>
+#include <fbxsdk/fileio/fbxgloballightsettings.h>
+#include <fbxsdk/fileio/fbxgobo.h>
+#include <fbxsdk/fileio/fbximporter.h>
+#include <fbxsdk/fileio/fbxiobase.h>
+#include <fbxsdk/fileio/fbxiopluginregistry.h>
+#include <fbxsdk/fileio/fbxiosettings.h>
+#include <fbxsdk/fileio/fbxstatisticsfbx.h>
+#include <fbxsdk/fileio/fbxstatistics.h>
+
+//---------------------------------------------------------------------------------------
+//Scene Includes
+#include <fbxsdk/scene/fbxcollection.h>
+#include <fbxsdk/scene/fbxcollectionexclusive.h>
+#include <fbxsdk/scene/fbxcontainer.h>
+#include <fbxsdk/scene/fbxcontainertemplate.h>
+#include <fbxsdk/scene/fbxdisplaylayer.h>
+#include <fbxsdk/scene/fbxdocument.h>
+#include <fbxsdk/scene/fbxdocumentinfo.h>
+#include <fbxsdk/scene/fbxenvironment.h>
+#include <fbxsdk/scene/fbxgroupname.h>
+#include <fbxsdk/scene/fbxlibrary.h>
+#include <fbxsdk/scene/fbxobjectmetadata.h>
+#include <fbxsdk/scene/fbxpose.h>
+#include <fbxsdk/scene/fbxreference.h>
+#include <fbxsdk/scene/fbxscene.h>
+#include <fbxsdk/scene/fbxselectionset.h>
+#include <fbxsdk/scene/fbxselectionnode.h>
+#include <fbxsdk/scene/fbxtakeinfo.h>
+#include <fbxsdk/scene/fbxthumbnail.h>
+#include <fbxsdk/scene/fbxvideo.h>
+
+//---------------------------------------------------------------------------------------
+//Scene Animation Includes
+#include <fbxsdk/scene/animation/fbxanimcurve.h>
+#include <fbxsdk/scene/animation/fbxanimcurvebase.h>
+#include <fbxsdk/scene/animation/fbxanimcurvefilters.h>
+#include <fbxsdk/scene/animation/fbxanimcurvenode.h>
+#include <fbxsdk/scene/animation/fbxanimevalclassic.h>
+#include <fbxsdk/scene/animation/fbxanimevalstate.h>
+#include <fbxsdk/scene/animation/fbxanimevaluator.h>
+#include <fbxsdk/scene/animation/fbxanimlayer.h>
+#include <fbxsdk/scene/animation/fbxanimstack.h>
+#include <fbxsdk/scene/animation/fbxanimutilities.h>
+
+//---------------------------------------------------------------------------------------
+//Scene Constraint Includes
+#include <fbxsdk/scene/constraint/fbxcharacternodename.h>
+#include <fbxsdk/scene/constraint/fbxcharacter.h>
+#include <fbxsdk/scene/constraint/fbxcharacterpose.h>
+#include <fbxsdk/scene/constraint/fbxconstraint.h>
+#include <fbxsdk/scene/constraint/fbxconstraintaim.h>
+#include <fbxsdk/scene/constraint/fbxconstraintcustom.h>
+#include <fbxsdk/scene/constraint/fbxconstraintparent.h>
+#include <fbxsdk/scene/constraint/fbxconstraintposition.h>
+#include <fbxsdk/scene/constraint/fbxconstraintrotation.h>
+#include <fbxsdk/scene/constraint/fbxconstraintscale.h>
+#include <fbxsdk/scene/constraint/fbxconstraintsinglechainik.h>
+#include <fbxsdk/scene/constraint/fbxconstraintutils.h>
+#include <fbxsdk/scene/constraint/fbxcontrolset.h>
+#include <fbxsdk/scene/constraint/fbxhik2fbxcharacter.h>
+
+//---------------------------------------------------------------------------------------
+//Scene Geometry Includes
+#include <fbxsdk/scene/geometry/fbxblendshape.h>
+#include <fbxsdk/scene/geometry/fbxblendshapechannel.h>
+#include <fbxsdk/scene/geometry/fbxcache.h>
+#include <fbxsdk/scene/geometry/fbxcachedeffect.h>
+#include <fbxsdk/scene/geometry/fbxcamera.h>
+#include <fbxsdk/scene/geometry/fbxcamerastereo.h>
+#include <fbxsdk/scene/geometry/fbxcameraswitcher.h>
+#include <fbxsdk/scene/geometry/fbxcluster.h>
+#include <fbxsdk/scene/geometry/fbxdeformer.h>
+#include <fbxsdk/scene/geometry/fbxgenericnode.h>
+#include <fbxsdk/scene/geometry/fbxgeometry.h>
+#include <fbxsdk/scene/geometry/fbxgeometrybase.h>
+#include <fbxsdk/scene/geometry/fbxgeometryweightedmap.h>
+#include <fbxsdk/scene/geometry/fbxlight.h>
+#include <fbxsdk/scene/geometry/fbxlimitsutilities.h>
+#include <fbxsdk/scene/geometry/fbxline.h>
+#include <fbxsdk/scene/geometry/fbxlodgroup.h>
+#include <fbxsdk/scene/geometry/fbxmarker.h>
+#include <fbxsdk/scene/geometry/fbxmesh.h>
+#include <fbxsdk/scene/geometry/fbxnode.h>
+#include <fbxsdk/scene/geometry/fbxnodeattribute.h>
+#include <fbxsdk/scene/geometry/fbxnull.h>
+#include <fbxsdk/scene/geometry/fbxnurbs.h>
+#include <fbxsdk/scene/geometry/fbxnurbscurve.h>
+#include <fbxsdk/scene/geometry/fbxnurbssurface.h>
+#include <fbxsdk/scene/geometry/fbxopticalreference.h>
+#include <fbxsdk/scene/geometry/fbxpatch.h>
+#include <fbxsdk/scene/geometry/fbxproceduralgeometry.h>
+#include <fbxsdk/scene/geometry/fbxshape.h>
+#include <fbxsdk/scene/geometry/fbxskeleton.h>
+#include <fbxsdk/scene/geometry/fbxskin.h>
+#include <fbxsdk/scene/geometry/fbxsubdeformer.h>
+#include <fbxsdk/scene/geometry/fbxsubdiv.h>
+#include <fbxsdk/scene/geometry/fbxtrimnurbssurface.h>
+#include <fbxsdk/scene/geometry/fbxvertexcachedeformer.h>
+#include <fbxsdk/scene/geometry/fbxweightedmapping.h>
+
+//---------------------------------------------------------------------------------------
+//Scene Shading Includes
+#include <fbxsdk/scene/shading/fbxshadingconventions.h>
+#include <fbxsdk/scene/shading/fbxbindingsentryview.h>
+#include <fbxsdk/scene/shading/fbxbindingtable.h>
+#include <fbxsdk/scene/shading/fbxbindingtableentry.h>
+#include <fbxsdk/scene/shading/fbxbindingoperator.h>
+#include <fbxsdk/scene/shading/fbxconstantentryview.h>
+#include <fbxsdk/scene/shading/fbxentryview.h>
+#include <fbxsdk/scene/shading/fbxfiletexture.h>
+#include <fbxsdk/scene/shading/fbximplementation.h>
+#include <fbxsdk/scene/shading/fbximplementationfilter.h>
+#include <fbxsdk/scene/shading/fbximplementationutils.h>
+#include <fbxsdk/scene/shading/fbxlayeredtexture.h>
+#include <fbxsdk/scene/shading/fbxoperatorentryview.h>
+#include <fbxsdk/scene/shading/fbxproceduraltexture.h>
+#include <fbxsdk/scene/shading/fbxpropertyentryview.h>
+#include <fbxsdk/scene/shading/fbxsemanticentryview.h>
+#include <fbxsdk/scene/shading/fbxsurfacelambert.h>
+#include <fbxsdk/scene/shading/fbxsurfacematerial.h>
+#include <fbxsdk/scene/shading/fbxsurfacephong.h>
+#include <fbxsdk/scene/shading/fbxtexture.h>
+
+//---------------------------------------------------------------------------------------
+//Utilities Includes
+#include <fbxsdk/utils/fbxdeformationsevaluator.h>
+#include <fbxsdk/utils/fbxprocessor.h>
+#include <fbxsdk/utils/fbxprocessorxref.h>
+#include <fbxsdk/utils/fbxprocessorxrefuserlib.h>
+#include <fbxsdk/utils/fbxprocessorshaderdependency.h>
+#include <fbxsdk/utils/fbxclonemanager.h>
+#include <fbxsdk/utils/fbxgeometryconverter.h>
+#include <fbxsdk/utils/fbxmanipulators.h>
+#include <fbxsdk/utils/fbxmaterialconverter.h>
+#include <fbxsdk/utils/fbxrenamingstrategyfbx5.h>
+#include <fbxsdk/utils/fbxrenamingstrategyfbx6.h>
+#include <fbxsdk/utils/fbxrenamingstrategyutilities.h>
+#include <fbxsdk/utils/fbxrootnodeutility.h>
+#include <fbxsdk/utils/fbxusernotification.h>
+
+//---------------------------------------------------------------------------------------
+#if defined(FBXSDK_NAMESPACE) && (FBXSDK_NAMESPACE_USING == 1)
+	using namespace FBXSDK_NAMESPACE;
+#endif
+
+#pragma pack(pop)
+
+#endif /* _FBXSDK_H_ */

+ 419 - 419
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxalloc.h

@@ -1,419 +1,419 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxalloc.h
-  * Allocation functions definition.
-  *
-  * It is possible to override memory allocation functions throughout the FBX SDK by
-  * providing system memory allocation functions using the handler set functions below.
-  * The Microsoft Windows implementation in debug mode allows to specify where the
-  * allocations happen by providing the standard block type, file name and line number.
-  */
-#ifndef _FBXSDK_CORE_ARCH_ALLOC_H_
-#define _FBXSDK_CORE_ARCH_ALLOC_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#if defined(_DEBUG) && defined(FBXSDK_ENV_WIN)
-	#include <crtdbg.h>
-#endif
-
-#if defined(FBXSDK_ENV_MAC)
-	#include <malloc/malloc.h>
-#else
-	#include <malloc.h>
-#endif
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#if defined(FBXSDK_CPU_32) && !defined(FBXSDK_ENV_IOS)
-	#define FBXSDK_MEMORY_ALIGNMENT ((size_t)8U)
-#else
-	#define FBXSDK_MEMORY_ALIGNMENT ((size_t)16U)
-#endif
-
-#define FBXSDK_MEMORY_COPY(dst, src, size) {memcpy(dst,src,size);}
-
-typedef void*	(*FbxMallocProc)(size_t);			//! Function pointer signature used to replace "malloc"
-typedef void*	(*FbxCallocProc)(size_t, size_t);	//! Function pointer signature used to replace "calloc"
-typedef void*	(*FbxReallocProc)(void*, size_t);	//! Function pointer signature used to replace "realloc"
-typedef void	(*FbxFreeProc)(void*);				//! Function pointer signature used to replace "free"
-
-/** Set the global memory allocation function used internally by the FBX SDK.
-* \param pHandler Function pointer that implements the necessary procedure to allocate memory in the system. */
-FBXSDK_DLL void FbxSetMallocHandler(FbxMallocProc pHandler);
-
-/** Set the global zero'd memory allocation function used internally by the FBX SDK.
-* \param pHandler Function pointer that implements the necessary procedure to allocate zero'd memory in the system. */
-FBXSDK_DLL void FbxSetCallocHandler(FbxCallocProc pHandler);
-
-/** Set the global memory re-allocation function used internally by the FBX SDK.
-* \param pHandler Function pointer that implements the necessary procedure to re-allocate memory in the system. */
-FBXSDK_DLL void FbxSetReallocHandler(FbxReallocProc pHandler);
-
-/** Set the global memory freeing function used internally by the FBX SDK.
-* \param pHandler Function pointer that implements the necessary procedure to free memory in the system. */
-FBXSDK_DLL void FbxSetFreeHandler(FbxFreeProc pHandler);
-
-/** Get the global memory allocation function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal malloc */
-FBXSDK_DLL FbxMallocProc FbxGetMallocHandler();
-
-/** Get the global zero'd memory allocation function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal calloc */
-FBXSDK_DLL FbxCallocProc FbxGetCallocHandler();
-
-/** Get the global memory re-allocation function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal realloc */
-FBXSDK_DLL FbxReallocProc FbxGetReallocHandler();
-
-/** Get the global memory freeing function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal free */
-FBXSDK_DLL FbxFreeProc FbxGetFreeHandler();
-
-/** Get the default global memory allocation function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal malloc */
-FBXSDK_DLL FbxMallocProc FbxGetDefaultMallocHandler();
-
-/** Get the default global zero'd memory allocation function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal calloc */
-FBXSDK_DLL FbxCallocProc FbxGetDefaultCallocHandler();
-
-/** Get the default global memory re-allocation function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal realloc */
-FBXSDK_DLL FbxReallocProc FbxGetDefaultReallocHandler();
-
-/** Get the default global memory freeing function used internally by the FBX SDK.
-* \return pHandler Function pointer on FBX's internal free */
-FBXSDK_DLL FbxFreeProc FbxGetDefaultFreeHandler();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FBXSDK_DLL void* FbxMalloc(size_t pSize);
-	FBXSDK_DLL void* FbxCalloc(size_t pCount, size_t pSize);
-	FBXSDK_DLL void* FbxRealloc(void* pData, size_t pSize);
-	FBXSDK_DLL void FbxFree(void* pData);
-	FBXSDK_DLL char* FbxStrDup(const char* pString);
-	FBXSDK_DLL wchar_t* FbxStrDupWC(const wchar_t* pString);
-
-	//These versions of allocators use the default system mallocs, and on Windows we also pass the debugging parameters.
-	//If you define FBXSDK_ALLOC_DEBUG in your project, the FBX SDK will use these debug versions everywhere.
-	FBXSDK_DLL void* FbxMallocDebug(size_t pSize, int pBlock, const char* pFile, int pLine);
-	FBXSDK_DLL void* FbxCallocDebug(size_t pCount, size_t pSize, int pBlock, const char* pFile, int pLine);
-	FBXSDK_DLL void* FbxReallocDebug(void* pData, size_t pSize, int pBlock, const char* pFile, int pLine);
-	FBXSDK_DLL void FbxFreeDebug(void* pData, int pBlock);
-
-	//When FBXSDK_ALLOC_DEBUG is defined, redirect allocation calls to the debug version.
-	#if defined(FBXSDK_ALLOC_DEBUG)
-		#define FbxMalloc(s) FbxMallocDebug(s, _NORMAL_BLOCK, __FILE__, __LINE__)
-		#define FbxCalloc(c, s) FbxCallocDebug(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
-		#define FbxRealloc(p, s) FbxReallocDebug(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
-		#define FbxFree(p) FbxFreeDebug(p, _NORMAL_BLOCK)
-	#endif
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-
-//! Deletion policy for pointer template classes that uses the delete operator.
-template <class Type> class FbxDeletionPolicyDefault
-{
-public:
-	//! Destruction policy implementation.
-	static inline void DeleteIt(Type** pPtr)
-	{
-		if( *pPtr )
-		{
-			delete *pPtr;
-			*pPtr = NULL;
-		}
-	}
-};
-
-//! Deletion policy for pointer template classes that uses the FbxDelete() function.
-template<typename T> void FbxDelete(T* p);
-template<typename T> void FbxDelete(const T* p);
-template <class Type> class FbxDeletionPolicyDelete
-{
-public:
-	//! Destruction policy implementation.
-	static inline void DeleteIt(Type** mPtr)
-	{
-		if( *mPtr )
-		{
-			FbxDelete(*mPtr);
-			*mPtr = NULL;
-		}
-	}
-};
-
-//! Deletion policy for pointer template classes that uses the FbxFree() function.
-template <class Type> class FbxDeletionPolicyFree
-{
-public:
-	//! Destruction policy implementation.
-	static inline void DeleteIt(Type** pPtr)
-	{
-		if( *pPtr )
-		{
-			FbxFree(*pPtr);
-			*pPtr = NULL;
-		}
-	}
-};
-
-//! Deletion policy for pointer template classes that uses the Destroy() function.
-template <class Type> class FbxDeletionPolicyObject
-{
-public:
-	//! Destruction policy implementation.
-	static inline void DeleteIt(Type** pPtr)
-	{
-		if( *pPtr )
-		{
-			(*pPtr)->Destroy();
-			*pPtr = NULL;
-		}
-	}
-};
-
-/** FbxAutoPtr mimics the \c auto_ptr class template implementation available in the C++ Standard Library. The \c auto_ptr template
-* class describes an object that stores a pointer to a single allocated object of type Type* that ensures that the object to which
-* it points gets destroyed automatically when control leaves a scope. */
-template<class Type, class Policy=FbxDeletionPolicyDefault<Type> > class FbxAutoPtr
-{
-public:
-	//! Construct from a pointer.
-	explicit FbxAutoPtr(Type* pPtr=0) : mPtr(pPtr){}
-
-	//! Destructor.
-	~FbxAutoPtr() { Policy::DeleteIt(&mPtr); }
-
-	//! Retrieve the pointer it holds.
-	inline Type* Get() const { return mPtr; }
-
-	//! Member access operator.
-	inline Type* operator->() const { return mPtr; }
-
-	//! Convert to a Type pointer.
-	inline operator Type* () const { return mPtr; }
-
-	//! Dereference operator.
-	inline Type& operator*() const { return *mPtr; }
-
-	//! Logical not operator.
-	inline bool operator!() const { return mPtr == 0; }
-
-	//! Convert to boolean value.
-	inline operator bool () const { return mPtr != 0; }
-
-	//! Reset the scoped pointer by swapping with another pointer.
-	inline void Reset(Type* pPtr=0)
-	{
-		FBX_ASSERT(pPtr == 0 || pPtr != mPtr);	//Catch self-reset errors
-		FbxAutoPtr<Type, Policy>(pPtr).Swap(*this);
-	}
-
-	//! Swap with another pointer.
-	inline void Swap(FbxAutoPtr& pOther)
-	{
-		Type* TmpPtr = pOther.mPtr;
-		pOther.mPtr = mPtr;
-		mPtr = TmpPtr;
-	}
-
-	//! Release the pointer, so that it won't perform deletion in its destruction.
-	inline Type* Release()
-	{
-		Type* TmpPtr = mPtr;
-		mPtr = NULL;
-		return TmpPtr;
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-	FbxAutoPtr(const FbxAutoPtr&);
-	FbxAutoPtr& operator=(const FbxAutoPtr&);
-
-	Type* mPtr;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-//! Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate.
-template <class Type> class FbxAutoFreePtr : public FbxAutoPtr<Type, FbxDeletionPolicyFree<Type> >
-{
-public:
-	//! Construct from a pointer.
-    explicit FbxAutoFreePtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyFree<Type> >(pPtr){}
-};
-
-//! Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate.
-template <class Type> class FbxAutoDeletePtr : public FbxAutoPtr<Type, FbxDeletionPolicyDelete<Type> >
-{
-public:
-	//! Construct from a pointer.
-    explicit FbxAutoDeletePtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyDelete<Type> >(pPtr){}
-};
-
-//! Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate.
-template <class Type> class FbxAutoDestroyPtr : public FbxAutoPtr<Type, FbxDeletionPolicyObject<Type> >
-{
-public:
-	//! Construct from a pointer.
-    explicit FbxAutoDestroyPtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyObject<Type> >(pPtr){}
-};
-
-
-/** FbxSharedPtr class describes an object that stores a pointer to a single allocated object of type 
-* Type* that ensures that the object to which it points gets destroyed automatically when the control 
-* leaves a scope and the reference count is 0. */
-class RefCount
-{
-public:
- 	RefCount()	{ Init(); };
-	~RefCount() { Init(); };
-
-	void    Init()   { count = 0; }
-	void	IncRef() { count++; }
-	int	    DecRef() { count--; if (count < 0) count = 0; return count; }
-	
-private:
-	int  count;
-};
-
-template<class Type, class Policy=FbxDeletionPolicyDefault<Type> > class FbxSharedPtr
-{
-public:
-	// Default constructor.
-	FbxSharedPtr() : 
-		mPtr(0),
-		mRef(0)
-	{}
-
-	//! Construct from a pointer.
-	explicit FbxSharedPtr(Type* pPtr) : 
-		mPtr(pPtr),
-		mRef(0)
-	{ 
-		if (pPtr != 0) 
-		{
-			mRef = (RefCount*)FbxMalloc(sizeof(RefCount)); 
-			mRef->Init();
-			mRef->IncRef(); 
-		}
-	}
-
-	//! Copy constructor
-	FbxSharedPtr(const FbxSharedPtr& pSPtr) : 
-		mPtr(pSPtr.mPtr), 
-		mRef(pSPtr.mRef) 
-	{ 
-		if (pSPtr.mPtr != 0 && mRef != 0) 
-			mRef->IncRef(); 
-	}
-
-	// Assignment operator
-	FbxSharedPtr& operator=(const FbxSharedPtr& pSPtr)
-	{
-		if (this != &pSPtr) // avoid self assignment
-		{
-			Reset();
-
-			if (pSPtr.mPtr)
-			{
-				mPtr = pSPtr.mPtr;
-				mRef = pSPtr.mRef;
-				FBX_ASSERT(mRef != NULL);
-				mRef->IncRef();
-			}
-		}
-		return *this;
-	}
-
-	//! Destructor.
-	~FbxSharedPtr() { Destroy(); }
-
-	void Destroy() { Reset(); }
-
-	//! Retrieve the pointer it holds.
-	inline Type* Get() const { return mPtr; }
-
-	//! Member access operator.
-	inline Type* operator->() const { return mPtr; }
-
-	//! Convert to a Type pointer.
-	inline operator Type* () const { return mPtr; }
-
-	//! Dereference operator.
-	inline Type& operator*() const { return *mPtr; }
-
-	//! Logical not operator.
-	inline bool operator!() const { return mPtr == 0; }
-
-	//! Convert to boolean value.
-	inline operator bool () const { return mPtr != 0; }
-
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-	void Reset() 
-	{		
-		if (mRef)
-		{
-			FBX_ASSERT(mPtr != 0);
-			if (mRef->DecRef() == 0)
-			{
-				Policy::DeleteIt(&mPtr); 
-				FbxFree(mRef);
-				mRef = NULL;
-			}
-		}
-	}
-
-	Type* mPtr;
-	RefCount* mRef;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-//! Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate.
-template <class Type> class FbxSharedFreePtr : public FbxSharedPtr<Type, FbxDeletionPolicyFree<Type> >
-{
-public:
-	//! Construct from a pointer.
-    explicit FbxSharedFreePtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyFree<Type> >(pPtr){}
-};
-
-//! Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate.
-template <class Type> class FbxSharedDeletePtr : public FbxSharedPtr<Type, FbxDeletionPolicyDelete<Type> >
-{
-public:
-	//! Construct from a pointer.
-    explicit FbxSharedDeletePtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyDelete<Type> >(pPtr){}
-};
-
-//! Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate.
-template <class Type> class FbxSharedDestroyPtr : public FbxSharedPtr<Type, FbxDeletionPolicyObject<Type> >
-{
-public:
-	//! Construct from a pointer.
-    explicit FbxSharedDestroyPtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyObject<Type> >(pPtr){}
-};
-
-
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_ARCH_ALLOC_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxalloc.h
+  * Allocation functions definition.
+  *
+  * It is possible to override memory allocation functions throughout the FBX SDK by
+  * providing system memory allocation functions using the handler set functions below.
+  * The Microsoft Windows implementation in debug mode allows to specify where the
+  * allocations happen by providing the standard block type, file name and line number.
+  */
+#ifndef _FBXSDK_CORE_ARCH_ALLOC_H_
+#define _FBXSDK_CORE_ARCH_ALLOC_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#if defined(_DEBUG) && defined(FBXSDK_ENV_WIN)
+	#include <crtdbg.h>
+#endif
+
+#if defined(FBXSDK_ENV_MAC)
+	#include <malloc/malloc.h>
+#else
+	#include <malloc.h>
+#endif
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#if defined(FBXSDK_CPU_32) && !defined(FBXSDK_ENV_IOS)
+	#define FBXSDK_MEMORY_ALIGNMENT ((size_t)8U)
+#else
+	#define FBXSDK_MEMORY_ALIGNMENT ((size_t)16U)
+#endif
+
+#define FBXSDK_MEMORY_COPY(dst, src, size) {memcpy(dst,src,size);}
+
+typedef void*	(*FbxMallocProc)(size_t);			//! Function pointer signature used to replace "malloc"
+typedef void*	(*FbxCallocProc)(size_t, size_t);	//! Function pointer signature used to replace "calloc"
+typedef void*	(*FbxReallocProc)(void*, size_t);	//! Function pointer signature used to replace "realloc"
+typedef void	(*FbxFreeProc)(void*);				//! Function pointer signature used to replace "free"
+
+/** Set the global memory allocation function used internally by the FBX SDK.
+* \param pHandler Function pointer that implements the necessary procedure to allocate memory in the system. */
+FBXSDK_DLL void FbxSetMallocHandler(FbxMallocProc pHandler);
+
+/** Set the global zero'd memory allocation function used internally by the FBX SDK.
+* \param pHandler Function pointer that implements the necessary procedure to allocate zero'd memory in the system. */
+FBXSDK_DLL void FbxSetCallocHandler(FbxCallocProc pHandler);
+
+/** Set the global memory re-allocation function used internally by the FBX SDK.
+* \param pHandler Function pointer that implements the necessary procedure to re-allocate memory in the system. */
+FBXSDK_DLL void FbxSetReallocHandler(FbxReallocProc pHandler);
+
+/** Set the global memory freeing function used internally by the FBX SDK.
+* \param pHandler Function pointer that implements the necessary procedure to free memory in the system. */
+FBXSDK_DLL void FbxSetFreeHandler(FbxFreeProc pHandler);
+
+/** Get the global memory allocation function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal malloc */
+FBXSDK_DLL FbxMallocProc FbxGetMallocHandler();
+
+/** Get the global zero'd memory allocation function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal calloc */
+FBXSDK_DLL FbxCallocProc FbxGetCallocHandler();
+
+/** Get the global memory re-allocation function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal realloc */
+FBXSDK_DLL FbxReallocProc FbxGetReallocHandler();
+
+/** Get the global memory freeing function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal free */
+FBXSDK_DLL FbxFreeProc FbxGetFreeHandler();
+
+/** Get the default global memory allocation function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal malloc */
+FBXSDK_DLL FbxMallocProc FbxGetDefaultMallocHandler();
+
+/** Get the default global zero'd memory allocation function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal calloc */
+FBXSDK_DLL FbxCallocProc FbxGetDefaultCallocHandler();
+
+/** Get the default global memory re-allocation function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal realloc */
+FBXSDK_DLL FbxReallocProc FbxGetDefaultReallocHandler();
+
+/** Get the default global memory freeing function used internally by the FBX SDK.
+* \return pHandler Function pointer on FBX's internal free */
+FBXSDK_DLL FbxFreeProc FbxGetDefaultFreeHandler();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FBXSDK_DLL void* FbxMalloc(size_t pSize);
+	FBXSDK_DLL void* FbxCalloc(size_t pCount, size_t pSize);
+	FBXSDK_DLL void* FbxRealloc(void* pData, size_t pSize);
+	FBXSDK_DLL void FbxFree(void* pData);
+	FBXSDK_DLL char* FbxStrDup(const char* pString);
+	FBXSDK_DLL wchar_t* FbxStrDupWC(const wchar_t* pString);
+
+	//These versions of allocators use the default system mallocs, and on Windows we also pass the debugging parameters.
+	//If you define FBXSDK_ALLOC_DEBUG in your project, the FBX SDK will use these debug versions everywhere.
+	FBXSDK_DLL void* FbxMallocDebug(size_t pSize, int pBlock, const char* pFile, int pLine);
+	FBXSDK_DLL void* FbxCallocDebug(size_t pCount, size_t pSize, int pBlock, const char* pFile, int pLine);
+	FBXSDK_DLL void* FbxReallocDebug(void* pData, size_t pSize, int pBlock, const char* pFile, int pLine);
+	FBXSDK_DLL void FbxFreeDebug(void* pData, int pBlock);
+
+	//When FBXSDK_ALLOC_DEBUG is defined, redirect allocation calls to the debug version.
+	#if defined(FBXSDK_ALLOC_DEBUG)
+		#define FbxMalloc(s) FbxMallocDebug(s, _NORMAL_BLOCK, __FILE__, __LINE__)
+		#define FbxCalloc(c, s) FbxCallocDebug(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
+		#define FbxRealloc(p, s) FbxReallocDebug(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
+		#define FbxFree(p) FbxFreeDebug(p, _NORMAL_BLOCK)
+	#endif
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+
+//! Deletion policy for pointer template classes that uses the delete operator.
+template <class Type> class FbxDeletionPolicyDefault
+{
+public:
+	//! Destruction policy implementation.
+	static inline void DeleteIt(Type** pPtr)
+	{
+		if( *pPtr )
+		{
+			delete *pPtr;
+			*pPtr = NULL;
+		}
+	}
+};
+
+//! Deletion policy for pointer template classes that uses the FbxDelete() function.
+template<typename T> void FbxDelete(T* p);
+template<typename T> void FbxDelete(const T* p);
+template <class Type> class FbxDeletionPolicyDelete
+{
+public:
+	//! Destruction policy implementation.
+	static inline void DeleteIt(Type** mPtr)
+	{
+		if( *mPtr )
+		{
+			FbxDelete(*mPtr);
+			*mPtr = NULL;
+		}
+	}
+};
+
+//! Deletion policy for pointer template classes that uses the FbxFree() function.
+template <class Type> class FbxDeletionPolicyFree
+{
+public:
+	//! Destruction policy implementation.
+	static inline void DeleteIt(Type** pPtr)
+	{
+		if( *pPtr )
+		{
+			FbxFree(*pPtr);
+			*pPtr = NULL;
+		}
+	}
+};
+
+//! Deletion policy for pointer template classes that uses the Destroy() function.
+template <class Type> class FbxDeletionPolicyObject
+{
+public:
+	//! Destruction policy implementation.
+	static inline void DeleteIt(Type** pPtr)
+	{
+		if( *pPtr )
+		{
+			(*pPtr)->Destroy();
+			*pPtr = NULL;
+		}
+	}
+};
+
+/** FbxAutoPtr mimics the \c auto_ptr class template implementation available in the C++ Standard Library. The \c auto_ptr template
+* class describes an object that stores a pointer to a single allocated object of type Type* that ensures that the object to which
+* it points gets destroyed automatically when control leaves a scope. */
+template<class Type, class Policy=FbxDeletionPolicyDefault<Type> > class FbxAutoPtr
+{
+public:
+	//! Construct from a pointer.
+	explicit FbxAutoPtr(Type* pPtr=0) : mPtr(pPtr){}
+
+	//! Destructor.
+	~FbxAutoPtr() { Policy::DeleteIt(&mPtr); }
+
+	//! Retrieve the pointer it holds.
+	inline Type* Get() const { return mPtr; }
+
+	//! Member access operator.
+	inline Type* operator->() const { return mPtr; }
+
+	//! Convert to a Type pointer.
+	inline operator Type* () const { return mPtr; }
+
+	//! Dereference operator.
+	inline Type& operator*() const { return *mPtr; }
+
+	//! Logical not operator.
+	inline bool operator!() const { return mPtr == 0; }
+
+	//! Convert to boolean value.
+	inline operator bool () const { return mPtr != 0; }
+
+	//! Reset the scoped pointer by swapping with another pointer.
+	inline void Reset(Type* pPtr=0)
+	{
+		FBX_ASSERT(pPtr == 0 || pPtr != mPtr);	//Catch self-reset errors
+		FbxAutoPtr<Type, Policy>(pPtr).Swap(*this);
+	}
+
+	//! Swap with another pointer.
+	inline void Swap(FbxAutoPtr& pOther)
+	{
+		Type* TmpPtr = pOther.mPtr;
+		pOther.mPtr = mPtr;
+		mPtr = TmpPtr;
+	}
+
+	//! Release the pointer, so that it won't perform deletion in its destruction.
+	inline Type* Release()
+	{
+		Type* TmpPtr = mPtr;
+		mPtr = NULL;
+		return TmpPtr;
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+	FbxAutoPtr(const FbxAutoPtr&);
+	FbxAutoPtr& operator=(const FbxAutoPtr&);
+
+	Type* mPtr;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+//! Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate.
+template <class Type> class FbxAutoFreePtr : public FbxAutoPtr<Type, FbxDeletionPolicyFree<Type> >
+{
+public:
+	//! Construct from a pointer.
+    explicit FbxAutoFreePtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyFree<Type> >(pPtr){}
+};
+
+//! Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate.
+template <class Type> class FbxAutoDeletePtr : public FbxAutoPtr<Type, FbxDeletionPolicyDelete<Type> >
+{
+public:
+	//! Construct from a pointer.
+    explicit FbxAutoDeletePtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyDelete<Type> >(pPtr){}
+};
+
+//! Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate.
+template <class Type> class FbxAutoDestroyPtr : public FbxAutoPtr<Type, FbxDeletionPolicyObject<Type> >
+{
+public:
+	//! Construct from a pointer.
+    explicit FbxAutoDestroyPtr(Type* pPtr=0) : FbxAutoPtr<Type, FbxDeletionPolicyObject<Type> >(pPtr){}
+};
+
+
+/** FbxSharedPtr class describes an object that stores a pointer to a single allocated object of type 
+* Type* that ensures that the object to which it points gets destroyed automatically when the control 
+* leaves a scope and the reference count is 0. */
+class RefCount
+{
+public:
+ 	RefCount()	{ Init(); };
+	~RefCount() { Init(); };
+
+	void    Init()   { count = 0; }
+	void	IncRef() { count++; }
+	int	    DecRef() { count--; if (count < 0) count = 0; return count; }
+	
+private:
+	int  count;
+};
+
+template<class Type, class Policy=FbxDeletionPolicyDefault<Type> > class FbxSharedPtr
+{
+public:
+	// Default constructor.
+	FbxSharedPtr() : 
+		mPtr(0),
+		mRef(0)
+	{}
+
+	//! Construct from a pointer.
+	explicit FbxSharedPtr(Type* pPtr) : 
+		mPtr(pPtr),
+		mRef(0)
+	{ 
+		if (pPtr != 0) 
+		{
+			mRef = (RefCount*)FbxMalloc(sizeof(RefCount)); 
+			mRef->Init();
+			mRef->IncRef(); 
+		}
+	}
+
+	//! Copy constructor
+	FbxSharedPtr(const FbxSharedPtr& pSPtr) : 
+		mPtr(pSPtr.mPtr), 
+		mRef(pSPtr.mRef) 
+	{ 
+		if (pSPtr.mPtr != 0 && mRef != 0) 
+			mRef->IncRef(); 
+	}
+
+	// Assignment operator
+	FbxSharedPtr& operator=(const FbxSharedPtr& pSPtr)
+	{
+		if (this != &pSPtr) // avoid self assignment
+		{
+			Reset();
+
+			if (pSPtr.mPtr)
+			{
+				mPtr = pSPtr.mPtr;
+				mRef = pSPtr.mRef;
+				FBX_ASSERT(mRef != NULL);
+				mRef->IncRef();
+			}
+		}
+		return *this;
+	}
+
+	//! Destructor.
+	~FbxSharedPtr() { Destroy(); }
+
+	void Destroy() { Reset(); }
+
+	//! Retrieve the pointer it holds.
+	inline Type* Get() const { return mPtr; }
+
+	//! Member access operator.
+	inline Type* operator->() const { return mPtr; }
+
+	//! Convert to a Type pointer.
+	inline operator Type* () const { return mPtr; }
+
+	//! Dereference operator.
+	inline Type& operator*() const { return *mPtr; }
+
+	//! Logical not operator.
+	inline bool operator!() const { return mPtr == 0; }
+
+	//! Convert to boolean value.
+	inline operator bool () const { return mPtr != 0; }
+
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+	void Reset() 
+	{		
+		if (mRef)
+		{
+			FBX_ASSERT(mPtr != 0);
+			if (mRef->DecRef() == 0)
+			{
+				Policy::DeleteIt(&mPtr); 
+				FbxFree(mRef);
+				mRef = NULL;
+			}
+		}
+	}
+
+	Type* mPtr;
+	RefCount* mRef;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+//! Scoped pointer for FbxMalloc allocations, which call FbxFree() to deallocate.
+template <class Type> class FbxSharedFreePtr : public FbxSharedPtr<Type, FbxDeletionPolicyFree<Type> >
+{
+public:
+	//! Construct from a pointer.
+    explicit FbxSharedFreePtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyFree<Type> >(pPtr){}
+};
+
+//! Scoped pointer for FbxNew allocations, which call FbxDelete() to deallocate.
+template <class Type> class FbxSharedDeletePtr : public FbxSharedPtr<Type, FbxDeletionPolicyDelete<Type> >
+{
+public:
+	//! Construct from a pointer.
+    explicit FbxSharedDeletePtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyDelete<Type> >(pPtr){}
+};
+
+//! Scoped pointer for FbxObject derived classes, which call Destroy() to deallocate.
+template <class Type> class FbxSharedDestroyPtr : public FbxSharedPtr<Type, FbxDeletionPolicyObject<Type> >
+{
+public:
+	//! Construct from a pointer.
+    explicit FbxSharedDestroyPtr(Type* pPtr=0) : FbxSharedPtr<Type, FbxDeletionPolicyObject<Type> >(pPtr){}
+};
+
+
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_ARCH_ALLOC_H_ */

+ 238 - 247
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxarch.h

@@ -1,247 +1,238 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxarch.h
-  * Architecture definition.
-  * 
-  * List of available preprocessor defines that can appear on various systems:
-  *
-  * Operating System Environment:
-  *    FBXSDK_ENV_WIN (Windows)
-  *    FBXSDK_ENV_WINSTORE (Windows Store App)
-  *    FBXSDK_ENV_MAC (MacOSX)
-  *    FBXSDK_ENV_IOS (iOS)
-  *    FBXSDK_ENV_LINUX (Linux)
-  *
-  * Architecture:
-  *    FBXSDK_ARCH_IX86 (Intel x86)
-  *    FBXSDK_ARCH_AMD64 (AMD64)
-  *    FBXSDK_ARCH_ARM (Advanced RISC Machine)
-  *
-  * Processor:
-  *    FBXSDK_CPU_32 (32bit processor)
-  *    FBXSDK_CPU_64 (64bit processor)
-  *
-  * Compiler:
-  *    FBXSDK_COMPILER_MSC (Microsoft Compiler)
-  *    FBXSDK_COMPILER_GNU (GNU Compiler)
-  *    FBXSDK_COMPILER_INTEL (Intel Compiler)
-  *    FBXSDK_COMPILER_CLANG (Clang Compiler)
-  *
-  * These definitions are based on the information found here:
-  * http://predef.sourceforge.net/index.php
-  *
-  */
-#ifndef _FBXSDK_CORE_ARCH_ARCH_H_
-#define _FBXSDK_CORE_ARCH_ARCH_H_
-
-#if defined(_WIN32) || defined(_WIN64) //Microsoft Windows ------------------------------
-
-	#define FBXSDK_ENV_WIN 1
-
-	#if defined(WINAPI_FAMILY)
-		#if _MSC_VER >= 1800
-			// VS 2013 rewrote the winapifamily.h file 
-			#if !WINAPI_PARTITION_DESKTOP
-				#define FBXSDK_ENV_WINSTORE 1
-			#endif
-		#else
-			#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
-				#define FBXSDK_ENV_WINSTORE 1
-			#endif
-		#endif
-	#endif
-
-	#if defined(_M_X64)
-		#define FBXSDK_ARCH_AMD64 1
-		#define FBXSDK_CPU_64 1
-	#elif defined(_M_IX86)
-		#define FBXSDK_ARCH_IX86 1
-		#define FBXSDK_CPU_32 1
-	#elif defined(_M_ARM)
-		#define FBXSDK_ARCH_ARM 1
-		#define FBXSDK_CPU_32 1
-	#else
-		#error Unsupported architecture!
-	#endif
-
-	#if defined(_MSC_VER)
-		#define FBXSDK_COMPILER_MSC 1
-	#elif defined(__GNUC__)
-		#define FBXSDK_COMPILER_GNU 1
-	#elif defined(__ICL)
-		#define FBXSDK_COMPILER_INTEL 1
-	#else
-		#error Unsupported compiler!
-	#endif
-
-#elif defined(__APPLE__) || defined(__MACH__) //Apple MacOS/X ---------------------------
-
-    #include "TargetConditionals.h"
-
-	#define FBXSDK_ENV_MAC 1
-
-    #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
-        #define FBXSDK_ENV_IOS 1
-    #endif
-
-	#if defined(__i386__)
-		#define FBXSDK_ARCH_IX86 1
-		#define FBXSDK_CPU_32 1
-	#elif defined(__x86_64__) || defined(__x86_64)
-		#define FBXSDK_ARCH_AMD64 1
-		#define FBXSDK_CPU_64 1
-	#elif defined(__arm__)
-		#define FBXSDK_ARCH_ARM 1
-		#define FBXSDK_CPU_32 1
-    #elif defined(__arm64__)
-        #define FBXSDK_ARCH_ARM 1
-        #define FBXSDK_CPU_64 1
-	#else
-		#error Unsupported architecture!
-	#endif
-
-	#if defined(__GNUC__)
-		#define FBXSDK_COMPILER_GNU 1
-	#endif
-
-    #if defined(__clang__)
-        #define FBXSDK_COMPILER_CLANG 1
-	#endif
-
-	#if !defined(FBXSDK_COMPILER_GNU) && !defined(FBXSDK_COMPILER_CLANG)
-		#error Unsupported compiler!
-	#endif
-
-#elif defined(__linux__) || defined(__CYGWIN__) || defined(EMSCRIPTEN) || defined(ANDROID) //Linux ---------------------------------
-
-	#define FBXSDK_ENV_LINUX 1
-
-  	#if defined(EMSCRIPTEN)
-  		#define FBXSDK_ENV_EMSCRIPTEN 1
-  	#endif
-
-	#if defined(ANDROID)
-		#define FBXSDK_ENV_ANDROID 1
-	#endif
-
-	#if defined(__i386__)
-		#define FBXSDK_ARCH_IX86 1
-		#define FBXSDK_CPU_32 1
-	#elif defined(__x86_64__) || defined(__x86_64)
-		#define FBXSDK_ARCH_AMD64 1
-		#define FBXSDK_CPU_64 1
-    #elif defined(__arm__)
-		#define FBXSDK_ARCH_ARM 1
-		#define FBXSDK_CPU_32 1
-	#elif defined(EMSCRIPTEN)
-  		#define FBXSDK_ARCH_AMD64 1
-		#define FBXSDK_CPU_64 1
-  	#else
-		#error Unsupported architecture!
-	#endif
-
-	#if defined(__GNUC__)
-		#define FBXSDK_COMPILER_GNU 1
-	#elif defined(EMSCRIPTEN)
-  		#define FBXSDK_COMPILER_EMSCRIPTEN 1 
-	#else
-		#error Unsupported compiler!
-	#endif
- #else
-	#error Unsupported platform!
-#endif
-
-//---------------------------------------------------------------------------------------
-//Compiler Specifics
-#if defined(FBXSDK_SHARED)
-	#if defined(FBXSDK_COMPILER_MSC) || defined(FBXSDK_COMPILER_INTEL)
-		#define FBXSDK_DLLIMPORT __declspec(dllimport)
-		#define FBXSDK_DLLEXPORT __declspec(dllexport)
-	#elif defined(FBXSDK_COMPILER_GNU) && (__GNUC__ >= 4)
-		#define FBXSDK_DLLIMPORT __attribute__((visibility("default")))
-		#define FBXSDK_DLLEXPORT __attribute__((visibility("default")))
-	#else
-		#define FBXSDK_DLLIMPORT
-		#define FBXSDK_DLLEXPORT
-	#endif
-#else
-	#define FBXSDK_DLLIMPORT
-	#define FBXSDK_DLLEXPORT
-#endif
-
-#ifndef FBXSDK_DLL
-	#define FBXSDK_DLL FBXSDK_DLLIMPORT
-#endif
-
-#if defined(FBXSDK_COMPILER_MSC)
-	#pragma warning(disable : 4251)	//'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
-    #if _MSC_VER >= 1300 // 7.1
-        #define FBX_DEPRECATED __declspec(deprecated)
-    #else
-        #define FBX_DEPRECATED
-    #endif
-#elif defined(FBXSDK_COMPILER_GNU) || defined(FBXSDK_COMPILER_EMSCRIPTEN)
-    #define FBX_DEPRECATED __attribute__((deprecated))
-#elif defined(FBXSDK_COMPILER_INTEL)
-    #if __INTEL_COMPILER >= 810
-        #define FBX_DEPRECATED __declspec(deprecated)
-    #else
-        #define FBX_DEPRECATED
-    #endif
-#else
-	#error Unsupported compiler!
-#endif
-
-#ifdef FBXSDK_COMPILER_CLANG
-	#define FBX_UNUSED(p) _Pragma(FBX_STRINGIFY(unused(p)))
-#else
-	#define FBX_UNUSED(p) (void)(p)
-#endif
-
-//---------------------------------------------------------------------------------------
-//Platform Standardization
-#ifndef NULL
-	#if defined(__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
-		#define NULL (__null)
-	#else	
-    	#if defined(__cplusplus)
-    		#define NULL 0
-    	#else
-    		#define NULL ((void*)0)
-    	#endif
-    #endif
-#endif
-
-#if !defined(_MAX_PATH)
-	#define _MAX_PATH 260
-#endif
-
-#if defined(FBXSDK_ENV_WIN)
-	#define snprintf _snprintf //for stdio.h platform compatibility
-#endif
-
-#if !defined(FBXSDK_COMPILER_MSC)
-	#ifndef strcmpi
-		#define strcmpi strcasecmp
-	#endif
-	#ifndef stricmp
-		#define stricmp strcasecmp
-	#endif
-	#ifndef strncmpi
-		#define strncmpi strncasecmp
-	#endif
-	#ifndef strnicmp
-		#define strnicmp strncasecmp
-	#endif
-#endif
-
-#endif /* _FBXSDK_CORE_ARCH_ARCH_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxarch.h
+  * Architecture definition.
+  * 
+  * List of available preprocessor defines that can appear on various systems:
+  *
+  * Operating System Environment:
+  *    FBXSDK_ENV_WIN (Windows)
+  *    FBXSDK_ENV_WINSTORE (Windows Store App)
+  *    FBXSDK_ENV_MAC (MacOSX)
+  *    FBXSDK_ENV_IOS (iOS)
+  *    FBXSDK_ENV_LINUX (Linux)
+  *
+  * Architecture:
+  *    FBXSDK_ARCH_IX86 (Intel x86)
+  *    FBXSDK_ARCH_AMD64 (AMD64)
+  *    FBXSDK_ARCH_ARM (Advanced RISC Machine)
+  *
+  * Processor:
+  *    FBXSDK_CPU_32 (32bit processor)
+  *    FBXSDK_CPU_64 (64bit processor)
+  *
+  * Compiler:
+  *    FBXSDK_COMPILER_MSC (Microsoft Compiler)
+  *    FBXSDK_COMPILER_GNU (GNU Compiler)
+  *    FBXSDK_COMPILER_INTEL (Intel Compiler)
+  *    FBXSDK_COMPILER_CLANG (Clang Compiler)
+  *
+  * These definitions are based on the information found here:
+  * http://predef.sourceforge.net/index.php
+  *
+  */
+#ifndef _FBXSDK_CORE_ARCH_ARCH_H_
+#define _FBXSDK_CORE_ARCH_ARCH_H_
+
+#if defined(_WIN32) || defined(_WIN64) //Microsoft Windows ------------------------------
+
+	#define FBXSDK_ENV_WIN 1
+
+	#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+		#define FBXSDK_ENV_WINSTORE 1
+	#endif
+
+	#if defined(_M_X64)
+		#define FBXSDK_ARCH_AMD64 1
+		#define FBXSDK_CPU_64 1
+	#elif defined(_M_IX86)
+		#define FBXSDK_ARCH_IX86 1
+		#define FBXSDK_CPU_32 1
+	#elif defined(_M_ARM)
+		#define FBXSDK_ARCH_ARM 1
+		#define FBXSDK_CPU_32 1
+	#else
+		#error Unsupported architecture!
+	#endif
+
+	#if defined(_MSC_VER)
+		#define FBXSDK_COMPILER_MSC 1
+	#elif defined(__GNUC__)
+		#define FBXSDK_COMPILER_GNU 1
+	#elif defined(__ICL)
+		#define FBXSDK_COMPILER_INTEL 1
+	#else
+		#error Unsupported compiler!
+	#endif
+
+#elif defined(__APPLE__) || defined(__MACH__) //Apple MacOS/X ---------------------------
+
+    #include "TargetConditionals.h"
+
+	#define FBXSDK_ENV_MAC 1
+
+    #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
+        #define FBXSDK_ENV_IOS 1
+    #endif
+
+	#if defined(__i386__)
+		#define FBXSDK_ARCH_IX86 1
+		#define FBXSDK_CPU_32 1
+	#elif defined(__x86_64__) || defined(__x86_64)
+		#define FBXSDK_ARCH_AMD64 1
+		#define FBXSDK_CPU_64 1
+	#elif defined(__arm__)
+		#define FBXSDK_ARCH_ARM 1
+		#define FBXSDK_CPU_32 1
+    #elif defined(__arm64__)
+        #define FBXSDK_ARCH_ARM 1
+        #define FBXSDK_CPU_64 1
+	#else
+		#error Unsupported architecture!
+	#endif
+
+	#if defined(__GNUC__)
+		#define FBXSDK_COMPILER_GNU 1
+	#endif
+
+    #if defined(__clang__)
+        #define FBXSDK_COMPILER_CLANG 1
+	#endif
+
+	#if !defined(FBXSDK_COMPILER_GNU) && !defined(FBXSDK_COMPILER_CLANG)
+		#error Unsupported compiler!
+	#endif
+
+#elif defined(__linux__) || defined(__CYGWIN__) || defined(EMSCRIPTEN) || defined(ANDROID) //Linux ---------------------------------
+
+	#define FBXSDK_ENV_LINUX 1
+
+  	#if defined(EMSCRIPTEN)
+  		#define FBXSDK_ENV_EMSCRIPTEN 1
+  	#endif
+
+	#if defined(ANDROID)
+		#define FBXSDK_ENV_ANDROID 1
+	#endif
+
+	#if defined(__i386__)
+		#define FBXSDK_ARCH_IX86 1
+		#define FBXSDK_CPU_32 1
+	#elif defined(__x86_64__) || defined(__x86_64)
+		#define FBXSDK_ARCH_AMD64 1
+		#define FBXSDK_CPU_64 1
+    #elif defined(__arm__)
+		#define FBXSDK_ARCH_ARM 1
+		#define FBXSDK_CPU_32 1
+	#elif defined(EMSCRIPTEN)
+  		#define FBXSDK_ARCH_AMD64 1
+		#define FBXSDK_CPU_64 1
+  	#else
+		#error Unsupported architecture!
+	#endif
+
+	#if defined(__GNUC__)
+		#define FBXSDK_COMPILER_GNU 1
+	#elif defined(EMSCRIPTEN)
+  		#define FBXSDK_COMPILER_EMSCRIPTEN 1 
+	#else
+		#error Unsupported compiler!
+	#endif
+ #else
+	#error Unsupported platform!
+#endif
+
+//---------------------------------------------------------------------------------------
+//Compiler Specifics
+#if defined(FBXSDK_SHARED)
+	#if defined(FBXSDK_COMPILER_MSC) || defined(FBXSDK_COMPILER_INTEL)
+		#define FBXSDK_DLLIMPORT __declspec(dllimport)
+		#define FBXSDK_DLLEXPORT __declspec(dllexport)
+	#elif defined(FBXSDK_COMPILER_GNU) && (__GNUC__ >= 4)
+		#define FBXSDK_DLLIMPORT __attribute__((visibility("default")))
+		#define FBXSDK_DLLEXPORT __attribute__((visibility("default")))
+	#else
+		#define FBXSDK_DLLIMPORT
+		#define FBXSDK_DLLEXPORT
+	#endif
+#else
+	#define FBXSDK_DLLIMPORT
+	#define FBXSDK_DLLEXPORT
+#endif
+
+#ifndef FBXSDK_DLL
+	#define FBXSDK_DLL FBXSDK_DLLIMPORT
+#endif
+
+#if defined(FBXSDK_COMPILER_MSC)
+	#pragma warning(disable : 4251)	//'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
+    #if _MSC_VER >= 1300 // 7.1
+        #define FBX_DEPRECATED __declspec(deprecated)
+    #else
+        #define FBX_DEPRECATED
+    #endif
+#elif defined(FBXSDK_COMPILER_GNU) || defined(FBXSDK_COMPILER_EMSCRIPTEN)
+    #define FBX_DEPRECATED __attribute__((deprecated))
+#elif defined(FBXSDK_COMPILER_INTEL)
+    #if __INTEL_COMPILER >= 810
+        #define FBX_DEPRECATED __declspec(deprecated)
+    #else
+        #define FBX_DEPRECATED
+    #endif
+#else
+	#error Unsupported compiler!
+#endif
+
+#ifdef FBXSDK_COMPILER_CLANG
+	#define FBX_UNUSED(p) _Pragma(FBX_STRINGIFY(unused(p)))
+#else
+	#define FBX_UNUSED(p) (void)(p)
+#endif
+
+//---------------------------------------------------------------------------------------
+//Platform Standardization
+#ifndef NULL
+	#if defined(__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
+		#define NULL (__null)
+	#else	
+    	#if defined(__cplusplus)
+    		#define NULL 0
+    	#else
+    		#define NULL ((void*)0)
+    	#endif
+    #endif
+#endif
+
+#if !defined(_MAX_PATH)
+	#define _MAX_PATH 260
+#endif
+
+#if defined(FBXSDK_ENV_WIN)
+	#define snprintf _snprintf //for stdio.h platform compatibility
+#endif
+
+#if !defined(FBXSDK_COMPILER_MSC)
+	#ifndef strcmpi
+		#define strcmpi strcasecmp
+	#endif
+	#ifndef stricmp
+		#define stricmp strcasecmp
+	#endif
+	#ifndef strncmpi
+		#define strncmpi strncasecmp
+	#endif
+	#ifndef strnicmp
+		#define strnicmp strncasecmp
+	#endif
+#endif
+
+#endif /* _FBXSDK_CORE_ARCH_ARCH_H_ */

+ 93 - 93
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxdebug.h

@@ -1,93 +1,93 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxdebug.h
-  * Debugging macros and functions.
-  * 
-  * All macros and functions are removed in release builds. To enable asserts, a debug build is required as well
-  * as the environment variable "FBXSDK_ASSERT" set to 1 is also required. By default, assertions will pop-up
-  * a window. It is possible to disable the pop-up on the Windows platform by calling the following code:
-  * \code
-  * _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
-  * \endcode
-  */
-#ifndef _FBXSDK_CORE_ARCH_DEBUG_H_
-#define _FBXSDK_CORE_ARCH_DEBUG_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** If this environment variable is set to 1, the FBX SDK will assert in debug builds */
-#define FBXSDK_ASSERT_ENVSTR "FBXSDK_ASSERT"
-
-/** The assertion procedure signature. If a different assertion procedure must be provided, it should have this signature.
-* \param pFileName The file name where the assertion occurred.
-* \param pFunctionName The function name where the assertion occurred.
-* \param pLineNumber The line number in the file where the assertion occurred.
-* \param pMessage The message to display when the assertion occurs. */
-typedef void (*FbxAssertProc)(const char* pFileName, const char* pFunctionName, const unsigned int pLineNumber, const char* pMessage);
-
-/** Change the procedure used when assertion occurs.
-* \param pAssertProc The procedure to be called when assertions occurs. */
-FBXSDK_DLL void FbxAssertSetProc(FbxAssertProc pAssertProc);
-
-//! Change the procedure back to the default one.
-FBXSDK_DLL void FbxAssertSetDefaultProc();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-FBXSDK_DLL void _FbxAssert(const char* pFileName, const char* pFunctionName, const unsigned int pLineNumber, bool pFormat, const char* pMessage, ...);
-FBXSDK_DLL void _FbxTrace(const char* pMessage, ...);
-
-#ifdef _DEBUG
-    template <bool x> struct FbxStaticAssertType;
-    template<> struct FbxStaticAssertType<true>			{enum{value=1};};
-    template<> struct FbxStaticAssertType<false>		{enum{value=-1};};
-	#define FBX_ASSERT(Condition)						{if(!(Condition)){_FbxAssert(__FILE__,__FUNCTION__,__LINE__,false,#Condition);}}
-	#define FBX_ASSERT_MSG(Condition, Message, ...)		{if(!(Condition)){_FbxAssert(__FILE__,__FUNCTION__,__LINE__,true,Message,##__VA_ARGS__);}}
-	#define FBX_ASSERT_NOW(Message, ...)				_FbxAssert(__FILE__,__FUNCTION__,__LINE__,true,Message,##__VA_ARGS__);
-	#define FBX_ASSERT_RETURN(Condition)				{if(!(Condition)){FBX_ASSERT_NOW(#Condition); return;}}
-	#define FBX_ASSERT_RETURN_VALUE(Condition, Value)	{if(!(Condition)){FBX_ASSERT_NOW(#Condition); return Value;}}
-	#define FBX_ASSERT_STATIC(Condition)				typedef char FbxBuildBreakIfFalse[FbxStaticAssertType<(bool)(Condition)>::value];
-	#define FBX_TRACE(Message, ...)						{_FbxTrace(Message,##__VA_ARGS__);}
-#else
-	#define FBX_ASSERT(Condition)						((void)0)
-	#define FBX_ASSERT_MSG(Condition, Message, ...)		((void)0)
-	#define FBX_ASSERT_NOW(Message, ...)				((void)0)
-	#define FBX_ASSERT_RETURN(Condition)				if(!(Condition)){return;}
-	#define FBX_ASSERT_RETURN_VALUE(Condition, Value)	if(!(Condition)){return Value;}
-	#define FBX_ASSERT_STATIC(Condition)
-	#define FBX_TRACE(Message, ...)						((void)0)
-#endif
-
-template<typename T> struct FbxIncompatibleWithArray{ enum {value = 0}; };
-
-#define FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(T)\
-	struct FbxIncompatibleWithArray< T >{\
-		union {\
-			T t();\
-		} catcherr;\
-		enum {value = 1};}
-
-#define FBXSDK_INCOMPATIBLE_WITH_ARRAY(T)\
-	template<> FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(T)
-
-#define FBXSDK_IS_INCOMPATIBLE_WITH_ARRAY(T) ((bool) FbxIncompatibleWithArray<T>::value)
-
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_ARCH_DEBUG_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxdebug.h
+  * Debugging macros and functions.
+  * 
+  * All macros and functions are removed in release builds. To enable asserts, a debug build is required as well
+  * as the environment variable "FBXSDK_ASSERT" set to 1 is also required. By default, assertions will pop-up
+  * a window. It is possible to disable the pop-up on the Windows platform by calling the following code:
+  * \code
+  * _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_DEBUG);
+  * \endcode
+  */
+#ifndef _FBXSDK_CORE_ARCH_DEBUG_H_
+#define _FBXSDK_CORE_ARCH_DEBUG_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** If this environment variable is set to 1, the FBX SDK will assert in debug builds */
+#define FBXSDK_ASSERT_ENVSTR "FBXSDK_ASSERT"
+
+/** The assertion procedure signature. If a different assertion procedure must be provided, it should have this signature.
+* \param pFileName The file name where the assertion occurred.
+* \param pFunctionName The function name where the assertion occurred.
+* \param pLineNumber The line number in the file where the assertion occurred.
+* \param pMessage The message to display when the assertion occurs. */
+typedef void (*FbxAssertProc)(const char* pFileName, const char* pFunctionName, const unsigned int pLineNumber, const char* pMessage);
+
+/** Change the procedure used when assertion occurs.
+* \param pAssertProc The procedure to be called when assertions occurs. */
+FBXSDK_DLL void FbxAssertSetProc(FbxAssertProc pAssertProc);
+
+//! Change the procedure back to the default one.
+FBXSDK_DLL void FbxAssertSetDefaultProc();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+FBXSDK_DLL void _FbxAssert(const char* pFileName, const char* pFunctionName, const unsigned int pLineNumber, bool pFormat, const char* pMessage, ...);
+FBXSDK_DLL void _FbxTrace(const char* pMessage, ...);
+
+#ifdef _DEBUG
+    template <bool x> struct FbxStaticAssertType;
+    template<> struct FbxStaticAssertType<true>			{enum{value=1};};
+    template<> struct FbxStaticAssertType<false>		{enum{value=-1};};
+	#define FBX_ASSERT(Condition)						{if(!(Condition)){_FbxAssert(__FILE__,__FUNCTION__,__LINE__,false,#Condition);}}
+	#define FBX_ASSERT_MSG(Condition, Message, ...)		{if(!(Condition)){_FbxAssert(__FILE__,__FUNCTION__,__LINE__,true,Message,##__VA_ARGS__);}}
+	#define FBX_ASSERT_NOW(Message, ...)				_FbxAssert(__FILE__,__FUNCTION__,__LINE__,true,Message,##__VA_ARGS__);
+	#define FBX_ASSERT_RETURN(Condition)				{if(!(Condition)){FBX_ASSERT_NOW(#Condition); return;}}
+	#define FBX_ASSERT_RETURN_VALUE(Condition, Value)	{if(!(Condition)){FBX_ASSERT_NOW(#Condition); return Value;}}
+	#define FBX_ASSERT_STATIC(Condition)				typedef char FbxBuildBreakIfFalse[FbxStaticAssertType<(bool)(Condition)>::value];
+	#define FBX_TRACE(Message, ...)						{_FbxTrace(Message,##__VA_ARGS__);}
+#else
+	#define FBX_ASSERT(Condition)						((void)0)
+	#define FBX_ASSERT_MSG(Condition, Message, ...)		((void)0)
+	#define FBX_ASSERT_NOW(Message, ...)				((void)0)
+	#define FBX_ASSERT_RETURN(Condition)				if(!(Condition)){return;}
+	#define FBX_ASSERT_RETURN_VALUE(Condition, Value)	if(!(Condition)){return Value;}
+	#define FBX_ASSERT_STATIC(Condition)
+	#define FBX_TRACE(Message, ...)						((void)0)
+#endif
+
+template<typename T> struct FbxIncompatibleWithArray{ enum {value = 0}; };
+
+#define FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(T)\
+	struct FbxIncompatibleWithArray< T >{\
+		union {\
+			T t();\
+		} catcherr;\
+		enum {value = 1};}
+
+#define FBXSDK_INCOMPATIBLE_WITH_ARRAY(T)\
+	template<> FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(T)
+
+#define FBXSDK_IS_INCOMPATIBLE_WITH_ARRAY(T) ((bool) FbxIncompatibleWithArray<T>::value)
+
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_ARCH_DEBUG_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 510 - 510
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxnew.h


+ 97 - 97
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxstdcompliant.h

@@ -1,97 +1,97 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxstdcompliant.h
-* Macros to properly support the CRT secure functions. */
-#ifndef _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_
-#define _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#if defined(FBXSDK_ENV_WIN)
-	#define FBXSDK_printf							printf_s
-	#define FBXSDK_fprintf							fprintf_s
-	inline int FBXSDK_sprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsprintf_s(dst, dstsize, format, vl); va_end(vl); return ret; }
-	inline int FBXSDK_snprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsnprintf_s(dst, dstsize, _TRUNCATE, format, vl); va_end(vl); return ret; }
-	inline int FBXSDK_vsprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsprintf_s(dst, dstsize, format, vl); }
-	inline int FBXSDK_vsnprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsnprintf_s(dst, dstsize, _TRUNCATE, format, vl); }
-	#define FBXSDK_stricmp(dst, src)				_stricmp(dst, src)
-	#define FBXSDK_strnicmp(dst, src, count)		_strnicmp(dst, src, count)
-	#define FBXSDK_strcpy(dst, size, src)			strcpy_s(dst, size, src)
-	#define FBXSDK_strncpy(dst, size, src, count)	strncpy_s(dst, size, src, count)
-	#define FBXSDK_strcat(dst, size, src)			strcat_s(dst, size, src)
-	#define FBXSDK_strtok(str, delim, ctx)			strtok_s(str, delim, ctx)
-	#define FBXSDK_wcscpy(dst, size, src)			wcscpy_s(dst, size, src)
-	#define FBXSDK_wcscat(dst, size, src)			wcscat_s(dst, size, src)
-#if !defined(FBXSDK_ENV_WINSTORE)
-	#define FBXSDK_getpid							_getpid
-	#define FBXSDK_getcwd							_getcwd
-#else
-	inline int FBXSDK_getpid(){ return 0; }
-	inline char* FBXSDK_getcwd(char*,int){ return NULL; }
-#endif
-	#define FBXSDK_localtime(ptm, time)				{ struct tm tms; ptm = &tms; localtime_s(ptm, time); }
-	#define FBXSDK_gmtime(ptm, time)				{ struct tm tms; ptm = &tms; gmtime_s(ptm, time); }
-	#define FBXSDK_fopen(fp, name, mode)			fopen_s(&fp, name, mode)
-
-#elif defined(FBXSDK_ENV_MAC) || defined(FBXSDK_ENV_LINUX)
-	#define FBXSDK_printf							printf
-	#define FBXSDK_fprintf							fprintf
-	inline int FBXSDK_sprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsprintf(dst, format, vl); va_end(vl); return ret; }
-	inline int FBXSDK_snprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsnprintf(dst, dstsize, format, vl); va_end(vl); return ret; }
-	inline int FBXSDK_vsprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsprintf(dst, format, vl); }
-	inline int FBXSDK_vsnprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsnprintf(dst, dstsize, format, vl); }
-	#define FBXSDK_stricmp(dst, src)				stricmp(dst, src)
-	#define FBXSDK_strnicmp(dst, src, count)		strnicmp(dst, src, count)
-	#define FBXSDK_strcpy(dst, size, src)			strcpy(dst, src)
-	#define FBXSDK_strncpy(dst, size, src, count)	strncpy(dst, src, count)
-	#define FBXSDK_strcat(dst, size, src)			strcat(dst, src)
-	#define FBXSDK_strtok(str, delim, ctx)			strtok(str, delim)
-	#define FBXSDK_wcscpy(dst, size, src)			wcscpy(dst, src)
-	#define FBXSDK_wcscat(dst, size, src)			wcscat_s(dst, src)
-	#define FBXSDK_getpid							getpid	
-	#define FBXSDK_getcwd							getcwd
-	#define FBXSDK_localtime(tm, time)				tm=localtime(time)
-	#define FBXSDK_gmtime(tm, time)					tm=gmtime(time)
-	#define FBXSDK_fopen(fp, name, mode)			fp=fopen(name, mode)
-
-#else
-	#error Unsupported platform!
-#endif
-
-#define FBXSDK_strdup								FbxStrDup
-
-//The scanf family functions cannot easily be used in both secure and non-secure versions because
-//Microsoft's secure version expects the size of the string/char* arguments following their address.
-//On Unix machines the scanf family functions do not have this behavior and trying to use the same
-//calls would result in compiler errors because the arguments would not match the format string.
-//Using the following macros in the code will simply desable the warning at compile time.
-#if defined(FBXSDK_COMPILER_MSC) && (_MSC_VER >= 1300)
-	#define FBXSDK_CRT_SECURE_NO_WARNING_BEGIN\
-	{\
-		__pragma(warning(push))\
-		__pragma(warning(disable : 4996))\
-	}
-    
-	#define FBXSDK_CRT_SECURE_NO_WARNING_END\
-	{\
-		__pragma(warning(pop))\
-	}
-#else
-	#define FBXSDK_CRT_SECURE_NO_WARNING_BEGIN
-	#define FBXSDK_CRT_SECURE_NO_WARNING_END
-#endif
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxstdcompliant.h
+* Macros to properly support the CRT secure functions. */
+#ifndef _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_
+#define _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#if defined(FBXSDK_ENV_WIN)
+	#define FBXSDK_printf							printf_s
+	#define FBXSDK_fprintf							fprintf_s
+	inline int FBXSDK_sprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsprintf_s(dst, dstsize, format, vl); va_end(vl); return ret; }
+	inline int FBXSDK_snprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsnprintf_s(dst, dstsize, _TRUNCATE, format, vl); va_end(vl); return ret; }
+	inline int FBXSDK_vsprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsprintf_s(dst, dstsize, format, vl); }
+	inline int FBXSDK_vsnprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsnprintf_s(dst, dstsize, _TRUNCATE, format, vl); }
+	#define FBXSDK_stricmp(dst, src)				_stricmp(dst, src)
+	#define FBXSDK_strnicmp(dst, src, count)		_strnicmp(dst, src, count)
+	#define FBXSDK_strcpy(dst, size, src)			strcpy_s(dst, size, src)
+	#define FBXSDK_strncpy(dst, size, src, count)	strncpy_s(dst, size, src, count)
+	#define FBXSDK_strcat(dst, size, src)			strcat_s(dst, size, src)
+	#define FBXSDK_strtok(str, delim, ctx)			strtok_s(str, delim, ctx)
+	#define FBXSDK_wcscpy(dst, size, src)			wcscpy_s(dst, size, src)
+	#define FBXSDK_wcscat(dst, size, src)			wcscat_s(dst, size, src)
+#if !defined(FBXSDK_ENV_WINSTORE)
+	#define FBXSDK_getpid							_getpid
+	#define FBXSDK_getcwd							_getcwd
+#else
+	inline int FBXSDK_getpid(){ return 0; }
+	inline char* FBXSDK_getcwd(char*,int){ return NULL; }
+#endif
+	#define FBXSDK_localtime(ptm, time)				{ struct tm tms; ptm = &tms; localtime_s(ptm, time); }
+	#define FBXSDK_gmtime(ptm, time)				{ struct tm tms; ptm = &tms; gmtime_s(ptm, time); }
+	#define FBXSDK_fopen(fp, name, mode)			fopen_s(&fp, name, mode)
+
+#elif defined(FBXSDK_ENV_MAC) || defined(FBXSDK_ENV_LINUX)
+	#define FBXSDK_printf							printf
+	#define FBXSDK_fprintf							fprintf
+	inline int FBXSDK_sprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsprintf(dst, format, vl); va_end(vl); return ret; }
+	inline int FBXSDK_snprintf(char* dst, size_t dstsize, const char* format, ...){ va_list vl; va_start(vl, format); int ret = vsnprintf(dst, dstsize, format, vl); va_end(vl); return ret; }
+	inline int FBXSDK_vsprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsprintf(dst, format, vl); }
+	inline int FBXSDK_vsnprintf(char* dst, size_t dstsize, const char* format, va_list vl){ return vsnprintf(dst, dstsize, format, vl); }
+	#define FBXSDK_stricmp(dst, src)				stricmp(dst, src)
+	#define FBXSDK_strnicmp(dst, src, count)		strnicmp(dst, src, count)
+	#define FBXSDK_strcpy(dst, size, src)			strcpy(dst, src)
+	#define FBXSDK_strncpy(dst, size, src, count)	strncpy(dst, src, count)
+	#define FBXSDK_strcat(dst, size, src)			strcat(dst, src)
+	#define FBXSDK_strtok(str, delim, ctx)			strtok(str, delim)
+	#define FBXSDK_wcscpy(dst, size, src)			wcscpy(dst, src)
+	#define FBXSDK_wcscat(dst, size, src)			wcscat_s(dst, src)
+	#define FBXSDK_getpid							getpid	
+	#define FBXSDK_getcwd							getcwd
+	#define FBXSDK_localtime(tm, time)				tm=localtime(time)
+	#define FBXSDK_gmtime(tm, time)					tm=gmtime(time)
+	#define FBXSDK_fopen(fp, name, mode)			fp=fopen(name, mode)
+
+#else
+	#error Unsupported platform!
+#endif
+
+#define FBXSDK_strdup								FbxStrDup
+
+//The scanf family functions cannot easily be used in both secure and non-secure versions because
+//Microsoft's secure version expects the size of the string/char* arguments following their address.
+//On Unix machines the scanf family functions do not have this behavior and trying to use the same
+//calls would result in compiler errors because the arguments would not match the format string.
+//Using the following macros in the code will simply desable the warning at compile time.
+#if defined(FBXSDK_COMPILER_MSC) && (_MSC_VER >= 1300)
+	#define FBXSDK_CRT_SECURE_NO_WARNING_BEGIN\
+	{\
+		__pragma(warning(push))\
+		__pragma(warning(disable : 4996))\
+	}
+    
+	#define FBXSDK_CRT_SECURE_NO_WARNING_END\
+	{\
+		__pragma(warning(pop))\
+	}
+#else
+	#define FBXSDK_CRT_SECURE_NO_WARNING_BEGIN
+	#define FBXSDK_CRT_SECURE_NO_WARNING_END
+#endif
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_ARCH_STDCOMPLIANT_H_ */

+ 264 - 264
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/arch/fbxtypes.h

@@ -1,264 +1,264 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxtypes.h
-  * Basic types definition.
-  *
-  * Standard basic types used across the FBX SDK. There is also platform independent
-  * definitions that guarantee size across operating systems. The FBXSDK_SYSTEM_IS_LP64
-  * define is set to 1 when the operating system defines the "long" C++ type as 64-bit.
-  */
-#ifndef _FBXSDK_CORE_ARCH_TYPES_H_
-#define _FBXSDK_CORE_ARCH_TYPES_H_
-
-#include <fbxsdk/core/arch/fbxarch.h>
-
-//Note: On MacOSX and Linux 64-bit, long is defined as 64-bits while on Windows
-//it is still a 32-bits for backward compatibility. We stick with Windows standard.
-#if defined(FBXSDK_CPU_64) && !defined(FBXSDK_ENV_WIN)
-	#define FBXSDK_SYSTEM_IS_LP64 1
-#endif
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxObject;
-
-typedef bool			FbxBool;
-typedef signed char		FbxChar;
-typedef unsigned char	FbxUChar;
-typedef signed short	FbxShort;
-typedef unsigned short	FbxUShort;
-typedef signed int		FbxInt;
-typedef unsigned int	FbxUInt;
-typedef float			FbxFloat;
-typedef double			FbxDouble;
-
-typedef FbxBool*		FbxBoolPtr;
-typedef FbxChar*		FbxCharPtr;
-typedef FbxUChar*		FbxUCharPtr;
-typedef FbxShort*		FbxShortPtr;
-typedef FbxUShort*		FbxUShortPtr;
-typedef FbxInt*			FbxIntPtr;
-typedef FbxUInt*		FbxUIntPtr;
-typedef FbxFloat*		FbxFloatPtr;
-typedef FbxDouble*		FbxDoublePtr;
-
-typedef FbxInt			FbxEnum;
-typedef FbxObject*		FbxReference;
-
-//-------------------------------------------------------------------------------------
-//Architecture independent defines (guarantee size)
-#if defined(FBXSDK_COMPILER_MSC)
-	#define FBXSDK_LONGLONG(x)	(x##i64)
-	#define FBXSDK_ULONGLONG(x)	(x##Ui64)
-
-	typedef signed __int8		FbxInt8;
-	typedef unsigned __int8		FbxUInt8;
-	typedef signed __int16		FbxInt16;
-	typedef unsigned __int16	FbxUInt16;
-	typedef signed __int32		FbxInt32;
-	typedef unsigned __int32	FbxUInt32;
-	typedef signed __int64		FbxInt64;
-	typedef unsigned __int64	FbxUInt64;
-#else
-	#define FBXSDK_LONGLONG(x)	(x##LL)
-	#define FBXSDK_ULONGLONG(x)	(x##ULL)
-
-	typedef signed char			FbxInt8;
-	typedef unsigned char		FbxUInt8;
-	typedef signed short		FbxInt16;
-	typedef unsigned short		FbxUInt16;
-	typedef signed int			FbxInt32;
-	typedef unsigned int		FbxUInt32;
-	typedef signed long long	FbxInt64;
-	typedef unsigned long long	FbxUInt64;
-#endif
-
-#ifdef FBXSDK_SYSTEM_IS_LP64
-	typedef signed int			FbxLong;
-	typedef unsigned int		FbxULong;
-#else
-	typedef signed long			FbxLong;
-	typedef unsigned long		FbxULong;
-#endif
-typedef FbxInt64				FbxLongLong;
-typedef FbxUInt64				FbxULongLong;
-
-typedef FbxLong*				FbxLongPtr;
-typedef FbxULong*				FbxULongPtr;
-typedef FbxLongLong*			FbxLongLongPtr;
-typedef FbxULongLong*			FbxULongLongPtr;
-
-
-#if defined(FBXSDK_ENV_EMSCRIPTEN)
-	typedef FbxInt32 			__int32_t;
-	typedef FbxUInt32			__uint32_t;
-	typedef FbxInt64  			__int64_t;
-	typedef FbxUInt64			__uint64_t;
-#endif
-
-//-------------------------------------------------------------------------------------
-//Minimum and Maximum values for types
-#define FBXSDK_CHAR_MIN			-128
-#define FBXSDK_CHAR_MAX			127
-#define FBXSDK_UCHAR_MIN		0
-#define FBXSDK_UCHAR_MAX		255
-#define FBXSDK_SHORT_MIN		-32768
-#define FBXSDK_SHORT_MAX		32767
-#define FBXSDK_USHORT_MIN		0
-#define FBXSDK_USHORT_MAX		65535
-#define FBXSDK_INT_MIN			0x80000000
-#define FBXSDK_INT_MAX			0x7fffffff
-#define FBXSDK_UINT_MIN			0
-#define FBXSDK_UINT_MAX			0xffffffff
-#define FBXSDK_LONG_MIN			FBXSDK_INT_MIN
-#define FBXSDK_LONG_MAX			FBXSDK_INT_MAX
-#define FBXSDK_ULONG_MIN		FBXSDK_UINT_MIN
-#define FBXSDK_ULONG_MAX		FBXSDK_UINT_MAX
-#define FBXSDK_LONGLONG_MIN		FBXSDK_LONGLONG(0x8000000000000000)
-#define FBXSDK_LONGLONG_MAX		FBXSDK_LONGLONG(0x7fffffffffffffff)
-#define FBXSDK_ULONGLONG_MIN	FBXSDK_ULONGLONG(0)
-#define FBXSDK_ULONGLONG_MAX	FBXSDK_ULONGLONG(0xffffffffffffffff)
-#define FBXSDK_FLOAT_MIN		FLT_MIN
-#define FBXSDK_FLOAT_MAX		FLT_MAX
-#define FBXSDK_FLOAT_EPSILON	FLT_EPSILON
-#define FBXSDK_DOUBLE_MIN		DBL_MIN
-#define FBXSDK_DOUBLE_MAX		DBL_MAX
-#define FBXSDK_DOUBLE_EPSILON	DBL_EPSILON
-#define FBXSDK_TOLERANCE		(1.0e-6)
-
-//-------------------------------------------------------------------------------------
-//Handle and atomic definition (size change depending of architecture)
-#if defined(FBXSDK_CPU_32)
-	typedef FbxUInt32			FbxHandle;
-	#define FBXSDK_REF_MIN		FBXSDK_UINT_MIN
-	#define FBXSDK_REF_MAX		FBXSDK_UINT_MAX
-
-	typedef FbxLong				FbxAtomic;
-	#define FBXSDK_ATOMIC_MIN	FBXSDK_LONG_MIN
-	#define FBXSDK_ATOMIC_MAX	FBXSDK_LONG_MAX
-#elif defined(FBXSDK_CPU_64)
-	typedef FbxUInt64			FbxHandle;
-	#define FBXSDK_REF_MIN		FBXSDK_ULONGLONG_MIN
-	#define FBXSDK_REF_MAX		FBXSDK_ULONGLONG_MAX
-
-	typedef FbxInt64			FbxAtomic;
-	#define FBXSDK_ATOMIC_MIN	FBXSDK_LONGLONG_MIN
-	#define FBXSDK_ATOMIC_MAX	FBXSDK_LONGLONG_MAX
-#else
-	#error Unsupported architecture!
-#endif
-
-//-------------------------------------------------------------------------------------
-//Various utility functions for fbxsdk basic types
-inline const FbxChar				FbxMin(const FbxChar){ return FBXSDK_CHAR_MIN; }
-inline const FbxUChar				FbxMin(const FbxUChar){ return FBXSDK_UCHAR_MIN; }
-inline const FbxShort				FbxMin(const FbxShort){ return FBXSDK_SHORT_MIN; }
-inline const FbxUShort				FbxMin(const FbxUShort){ return FBXSDK_USHORT_MIN; }
-inline const FbxInt					FbxMin(const FbxInt){ return FBXSDK_INT_MIN; }
-inline const FbxUInt				FbxMin(const FbxUInt){ return FBXSDK_UINT_MIN; }
-inline const FbxLongLong			FbxMin(const FbxLongLong){ return FBXSDK_LONGLONG_MIN; }
-inline const FbxULongLong			FbxMin(const FbxULongLong){ return FBXSDK_ULONGLONG_MIN; }
-inline const FbxFloat				FbxMin(const FbxFloat){ return FBXSDK_FLOAT_MIN; }
-inline const FbxDouble				FbxMin(const FbxDouble){ return FBXSDK_DOUBLE_MIN; }
-
-inline const FbxChar				FbxMax(const FbxChar){ return FBXSDK_CHAR_MAX; }
-inline const FbxUChar				FbxMax(const FbxUChar){ return FBXSDK_UCHAR_MAX; }
-inline const FbxShort				FbxMax(const FbxShort){ return FBXSDK_SHORT_MAX; }
-inline const FbxUShort				FbxMax(const FbxUShort){ return FBXSDK_USHORT_MAX; }
-inline const FbxInt					FbxMax(const FbxInt){ return FBXSDK_INT_MAX; }
-inline const FbxUInt				FbxMax(const FbxUInt){ return FBXSDK_UINT_MAX; }
-inline const FbxLongLong			FbxMax(const FbxLongLong){ return FBXSDK_LONGLONG_MAX; }
-inline const FbxULongLong			FbxMax(const FbxULongLong){ return FBXSDK_ULONGLONG_MAX; }
-inline const FbxFloat				FbxMax(const FbxFloat){ return FBXSDK_FLOAT_MAX; }
-inline const FbxDouble				FbxMax(const FbxDouble){ return FBXSDK_DOUBLE_MAX; }
-
-#ifndef FBXSDK_SYSTEM_IS_LP64
-	inline const FbxLong			FbxMin(const FbxLong){ return FBXSDK_LONG_MIN; }
-	inline const FbxULong			FbxMin(const FbxULong){ return FBXSDK_ULONG_MIN; }
-	inline const FbxLong			FbxMax(const FbxLong){ return FBXSDK_LONG_MAX; }
-	inline const FbxULong			FbxMax(const FbxULong){ return FBXSDK_ULONG_MAX; }
-#endif
-
-template<class T> inline const T	FbxMin(const T){};
-template<class T> inline const T	FbxMax(const T){};
-
-template<class T> inline T			FbxMin(const T x, const T y){ return (x < y) ? x : y; }
-template<class T> inline T			FbxMax(const T x, const T y){ return (x > y) ? x : y; }
-
-//-------------------------------------------------------------------------------------
-//Vector Template Types
-template<class T> class FBXSDK_DLL FbxVectorTemplate2
-{
-public:
-	inline FbxVectorTemplate2(){ *this = T(0); }
-	inline explicit FbxVectorTemplate2(T pValue){ *this = pValue; }
-	inline FbxVectorTemplate2(T pData0, T pData1){ mData[0] = pData0; mData[1] = pData1; }
-	inline ~FbxVectorTemplate2(){}
-	inline T& operator[](int pIndex){ return mData[pIndex]; }
-	inline const T& operator[](int pIndex) const { return mData[pIndex]; }
-	inline FbxVectorTemplate2<T>& operator=(const T& pValue){ mData[0] = pValue; mData[1] = pValue; return *this; }
-	inline FbxVectorTemplate2<T>& operator=(const FbxVectorTemplate2<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; return *this; }
-	inline bool operator==(const FbxVectorTemplate2<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1])); }
-	inline bool operator!=(const FbxVectorTemplate2<T>& pVector) const { return !operator==( pVector ); }
-	inline T* Buffer(){ return mData; }
-	inline const T* Buffer() const { return mData; }
-	T mData[2];
-};
-
-template<class T> class FBXSDK_DLL FbxVectorTemplate3
-{
-public:
-	inline FbxVectorTemplate3(){ *this = T(0); }
-	inline explicit FbxVectorTemplate3(T pValue){ *this = pValue; }
-	inline FbxVectorTemplate3(T pData0, T pData1, T pData2){ mData[0] = pData0; mData[1] = pData1; mData[2] = pData2; }
-	inline ~FbxVectorTemplate3(){}
-	inline T& operator[](int pIndex) { return mData[pIndex]; }
-	inline const T& operator[](int pIndex) const { return mData[pIndex]; }
-	inline operator FbxVectorTemplate2<T>& () const { return *((FbxVectorTemplate2<T>*)this); }
-	inline FbxVectorTemplate3<T>& operator=(T const &pValue){ mData[0] = pValue; mData[1] = pValue; mData[2] = pValue; return *this; }
-	inline FbxVectorTemplate3<T>& operator=(const FbxVectorTemplate2<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; return *this; }
-	inline FbxVectorTemplate3<T>& operator=(const FbxVectorTemplate3<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; mData[2] = pVector.mData[2]; return *this; }
-	inline bool operator==(const FbxVectorTemplate3<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1]) && (mData[2] == pVector.mData[2])); }
-	inline bool operator!=(const FbxVectorTemplate3<T>& pVector) const { return !operator==(pVector); }
-	inline T* Buffer(){ return mData; }
-	inline const T* Buffer() const { return mData; }
-	T mData[3];
-};
-
-template<class T> class FBXSDK_DLL FbxVectorTemplate4
-{
-public:
-	inline FbxVectorTemplate4(){ *this = T(0); }
-	inline explicit FbxVectorTemplate4(T pValue){ *this = pValue; }
-	inline FbxVectorTemplate4(T pData0, T pData1, T pData2, T pData3){ mData[0] = pData0; mData[1] = pData1; mData[2] = pData2; mData[3] = pData3; }
-	inline ~FbxVectorTemplate4(){}
-	inline T& operator[](int pIndex){ return mData[pIndex]; }
-	inline const T& operator[](int pIndex) const { return mData[pIndex]; }
-	inline operator FbxVectorTemplate3<T>& () const { return *((FbxVectorTemplate3<T>*)this); }
-	inline FbxVectorTemplate4<T>& operator=(const T& pValue){ mData[0] = pValue; mData[1] = pValue; mData[2] = pValue; mData[3] = pValue; return *this; }
-	inline FbxVectorTemplate4<T>& operator=(const FbxVectorTemplate3<T>& pValue){ mData[0] = pValue[0]; mData[1] = pValue[1]; mData[2] = pValue[2]; return *this; }
-	inline FbxVectorTemplate4<T>& operator=(const FbxVectorTemplate4<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; mData[2] = pVector.mData[2]; mData[3] = pVector.mData[3]; return *this; }
-	inline bool operator==(const FbxVectorTemplate4<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1]) && (mData[2] == pVector.mData[2]) && (mData[3] == pVector.mData[3])); }
-	inline bool operator!=(const FbxVectorTemplate4<T>& pVector) const { return !operator==( pVector ); }
-	inline T* Buffer(){ return mData; }
-	inline const T* Buffer() const { return mData; }
-	T mData[4];
-};
-
-typedef FbxVectorTemplate2<FbxDouble> FbxDouble2;
-typedef FbxVectorTemplate3<FbxDouble> FbxDouble3;
-typedef FbxVectorTemplate4<FbxDouble> FbxDouble4;
-typedef FbxVectorTemplate4<FbxDouble4> FbxDouble4x4;
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_ARCH_TYPES_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxtypes.h
+  * Basic types definition.
+  *
+  * Standard basic types used across the FBX SDK. There is also platform independent
+  * definitions that guarantee size across operating systems. The FBXSDK_SYSTEM_IS_LP64
+  * define is set to 1 when the operating system defines the "long" C++ type as 64-bit.
+  */
+#ifndef _FBXSDK_CORE_ARCH_TYPES_H_
+#define _FBXSDK_CORE_ARCH_TYPES_H_
+
+#include <fbxsdk/core/arch/fbxarch.h>
+
+//Note: On MacOSX and Linux 64-bit, long is defined as 64-bits while on Windows
+//it is still a 32-bits for backward compatibility. We stick with Windows standard.
+#if defined(FBXSDK_CPU_64) && !defined(FBXSDK_ENV_WIN)
+	#define FBXSDK_SYSTEM_IS_LP64 1
+#endif
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxObject;
+
+typedef bool			FbxBool;
+typedef signed char		FbxChar;
+typedef unsigned char	FbxUChar;
+typedef signed short	FbxShort;
+typedef unsigned short	FbxUShort;
+typedef signed int		FbxInt;
+typedef unsigned int	FbxUInt;
+typedef float			FbxFloat;
+typedef double			FbxDouble;
+
+typedef FbxBool*		FbxBoolPtr;
+typedef FbxChar*		FbxCharPtr;
+typedef FbxUChar*		FbxUCharPtr;
+typedef FbxShort*		FbxShortPtr;
+typedef FbxUShort*		FbxUShortPtr;
+typedef FbxInt*			FbxIntPtr;
+typedef FbxUInt*		FbxUIntPtr;
+typedef FbxFloat*		FbxFloatPtr;
+typedef FbxDouble*		FbxDoublePtr;
+
+typedef FbxInt			FbxEnum;
+typedef FbxObject*		FbxReference;
+
+//-------------------------------------------------------------------------------------
+//Architecture independent defines (guarantee size)
+#if defined(FBXSDK_COMPILER_MSC)
+	#define FBXSDK_LONGLONG(x)	(x##i64)
+	#define FBXSDK_ULONGLONG(x)	(x##Ui64)
+
+	typedef signed __int8		FbxInt8;
+	typedef unsigned __int8		FbxUInt8;
+	typedef signed __int16		FbxInt16;
+	typedef unsigned __int16	FbxUInt16;
+	typedef signed __int32		FbxInt32;
+	typedef unsigned __int32	FbxUInt32;
+	typedef signed __int64		FbxInt64;
+	typedef unsigned __int64	FbxUInt64;
+#else
+	#define FBXSDK_LONGLONG(x)	(x##LL)
+	#define FBXSDK_ULONGLONG(x)	(x##ULL)
+
+	typedef signed char			FbxInt8;
+	typedef unsigned char		FbxUInt8;
+	typedef signed short		FbxInt16;
+	typedef unsigned short		FbxUInt16;
+	typedef signed int			FbxInt32;
+	typedef unsigned int		FbxUInt32;
+	typedef signed long long	FbxInt64;
+	typedef unsigned long long	FbxUInt64;
+#endif
+
+#ifdef FBXSDK_SYSTEM_IS_LP64
+	typedef signed int			FbxLong;
+	typedef unsigned int		FbxULong;
+#else
+	typedef signed long			FbxLong;
+	typedef unsigned long		FbxULong;
+#endif
+typedef FbxInt64				FbxLongLong;
+typedef FbxUInt64				FbxULongLong;
+
+typedef FbxLong*				FbxLongPtr;
+typedef FbxULong*				FbxULongPtr;
+typedef FbxLongLong*			FbxLongLongPtr;
+typedef FbxULongLong*			FbxULongLongPtr;
+
+
+#if defined(FBXSDK_ENV_EMSCRIPTEN)
+	typedef FbxInt32 			__int32_t;
+	typedef FbxUInt32			__uint32_t;
+	typedef FbxInt64  			__int64_t;
+	typedef FbxUInt64			__uint64_t;
+#endif
+
+//-------------------------------------------------------------------------------------
+//Minimum and Maximum values for types
+#define FBXSDK_CHAR_MIN			-128
+#define FBXSDK_CHAR_MAX			127
+#define FBXSDK_UCHAR_MIN		0
+#define FBXSDK_UCHAR_MAX		255
+#define FBXSDK_SHORT_MIN		-32768
+#define FBXSDK_SHORT_MAX		32767
+#define FBXSDK_USHORT_MIN		0
+#define FBXSDK_USHORT_MAX		65535
+#define FBXSDK_INT_MIN			0x80000000
+#define FBXSDK_INT_MAX			0x7fffffff
+#define FBXSDK_UINT_MIN			0
+#define FBXSDK_UINT_MAX			0xffffffff
+#define FBXSDK_LONG_MIN			FBXSDK_INT_MIN
+#define FBXSDK_LONG_MAX			FBXSDK_INT_MAX
+#define FBXSDK_ULONG_MIN		FBXSDK_UINT_MIN
+#define FBXSDK_ULONG_MAX		FBXSDK_UINT_MAX
+#define FBXSDK_LONGLONG_MIN		FBXSDK_LONGLONG(0x8000000000000000)
+#define FBXSDK_LONGLONG_MAX		FBXSDK_LONGLONG(0x7fffffffffffffff)
+#define FBXSDK_ULONGLONG_MIN	FBXSDK_ULONGLONG(0)
+#define FBXSDK_ULONGLONG_MAX	FBXSDK_ULONGLONG(0xffffffffffffffff)
+#define FBXSDK_FLOAT_MIN		FLT_MIN
+#define FBXSDK_FLOAT_MAX		FLT_MAX
+#define FBXSDK_FLOAT_EPSILON	FLT_EPSILON
+#define FBXSDK_DOUBLE_MIN		DBL_MIN
+#define FBXSDK_DOUBLE_MAX		DBL_MAX
+#define FBXSDK_DOUBLE_EPSILON	DBL_EPSILON
+#define FBXSDK_TOLERANCE		(1.0e-6)
+
+//-------------------------------------------------------------------------------------
+//Handle and atomic definition (size change depending of architecture)
+#if defined(FBXSDK_CPU_32)
+	typedef FbxUInt32			FbxHandle;
+	#define FBXSDK_REF_MIN		FBXSDK_UINT_MIN
+	#define FBXSDK_REF_MAX		FBXSDK_UINT_MAX
+
+	typedef FbxLong				FbxAtomic;
+	#define FBXSDK_ATOMIC_MIN	FBXSDK_LONG_MIN
+	#define FBXSDK_ATOMIC_MAX	FBXSDK_LONG_MAX
+#elif defined(FBXSDK_CPU_64)
+	typedef FbxUInt64			FbxHandle;
+	#define FBXSDK_REF_MIN		FBXSDK_ULONGLONG_MIN
+	#define FBXSDK_REF_MAX		FBXSDK_ULONGLONG_MAX
+
+	typedef FbxInt64			FbxAtomic;
+	#define FBXSDK_ATOMIC_MIN	FBXSDK_LONGLONG_MIN
+	#define FBXSDK_ATOMIC_MAX	FBXSDK_LONGLONG_MAX
+#else
+	#error Unsupported architecture!
+#endif
+
+//-------------------------------------------------------------------------------------
+//Various utility functions for fbxsdk basic types
+inline const FbxChar				FbxMin(const FbxChar){ return FBXSDK_CHAR_MIN; }
+inline const FbxUChar				FbxMin(const FbxUChar){ return FBXSDK_UCHAR_MIN; }
+inline const FbxShort				FbxMin(const FbxShort){ return FBXSDK_SHORT_MIN; }
+inline const FbxUShort				FbxMin(const FbxUShort){ return FBXSDK_USHORT_MIN; }
+inline const FbxInt					FbxMin(const FbxInt){ return FBXSDK_INT_MIN; }
+inline const FbxUInt				FbxMin(const FbxUInt){ return FBXSDK_UINT_MIN; }
+inline const FbxLongLong			FbxMin(const FbxLongLong){ return FBXSDK_LONGLONG_MIN; }
+inline const FbxULongLong			FbxMin(const FbxULongLong){ return FBXSDK_ULONGLONG_MIN; }
+inline const FbxFloat				FbxMin(const FbxFloat){ return FBXSDK_FLOAT_MIN; }
+inline const FbxDouble				FbxMin(const FbxDouble){ return FBXSDK_DOUBLE_MIN; }
+
+inline const FbxChar				FbxMax(const FbxChar){ return FBXSDK_CHAR_MAX; }
+inline const FbxUChar				FbxMax(const FbxUChar){ return FBXSDK_UCHAR_MAX; }
+inline const FbxShort				FbxMax(const FbxShort){ return FBXSDK_SHORT_MAX; }
+inline const FbxUShort				FbxMax(const FbxUShort){ return FBXSDK_USHORT_MAX; }
+inline const FbxInt					FbxMax(const FbxInt){ return FBXSDK_INT_MAX; }
+inline const FbxUInt				FbxMax(const FbxUInt){ return FBXSDK_UINT_MAX; }
+inline const FbxLongLong			FbxMax(const FbxLongLong){ return FBXSDK_LONGLONG_MAX; }
+inline const FbxULongLong			FbxMax(const FbxULongLong){ return FBXSDK_ULONGLONG_MAX; }
+inline const FbxFloat				FbxMax(const FbxFloat){ return FBXSDK_FLOAT_MAX; }
+inline const FbxDouble				FbxMax(const FbxDouble){ return FBXSDK_DOUBLE_MAX; }
+
+#ifndef FBXSDK_SYSTEM_IS_LP64
+	inline const FbxLong			FbxMin(const FbxLong){ return FBXSDK_LONG_MIN; }
+	inline const FbxULong			FbxMin(const FbxULong){ return FBXSDK_ULONG_MIN; }
+	inline const FbxLong			FbxMax(const FbxLong){ return FBXSDK_LONG_MAX; }
+	inline const FbxULong			FbxMax(const FbxULong){ return FBXSDK_ULONG_MAX; }
+#endif
+
+template<class T> inline const T	FbxMin(const T){};
+template<class T> inline const T	FbxMax(const T){};
+
+template<class T> inline T			FbxMin(const T x, const T y){ return (x < y) ? x : y; }
+template<class T> inline T			FbxMax(const T x, const T y){ return (x > y) ? x : y; }
+
+//-------------------------------------------------------------------------------------
+//Vector Template Types
+template<class T> class FBXSDK_DLL FbxVectorTemplate2
+{
+public:
+	inline FbxVectorTemplate2(){ *this = T(0); }
+	inline explicit FbxVectorTemplate2(T pValue){ *this = pValue; }
+	inline FbxVectorTemplate2(T pData0, T pData1){ mData[0] = pData0; mData[1] = pData1; }
+	inline ~FbxVectorTemplate2(){}
+	inline T& operator[](int pIndex){ return mData[pIndex]; }
+	inline const T& operator[](int pIndex) const { return mData[pIndex]; }
+	inline FbxVectorTemplate2<T>& operator=(const T& pValue){ mData[0] = pValue; mData[1] = pValue; return *this; }
+	inline FbxVectorTemplate2<T>& operator=(const FbxVectorTemplate2<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; return *this; }
+	inline bool operator==(const FbxVectorTemplate2<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1])); }
+	inline bool operator!=(const FbxVectorTemplate2<T>& pVector) const { return !operator==( pVector ); }
+	inline T* Buffer(){ return mData; }
+	inline const T* Buffer() const { return mData; }
+	T mData[2];
+};
+
+template<class T> class FBXSDK_DLL FbxVectorTemplate3
+{
+public:
+	inline FbxVectorTemplate3(){ *this = T(0); }
+	inline explicit FbxVectorTemplate3(T pValue){ *this = pValue; }
+	inline FbxVectorTemplate3(T pData0, T pData1, T pData2){ mData[0] = pData0; mData[1] = pData1; mData[2] = pData2; }
+	inline ~FbxVectorTemplate3(){}
+	inline T& operator[](int pIndex) { return mData[pIndex]; }
+	inline const T& operator[](int pIndex) const { return mData[pIndex]; }
+	inline operator FbxVectorTemplate2<T>& () const { return *((FbxVectorTemplate2<T>*)this); }
+	inline FbxVectorTemplate3<T>& operator=(T const &pValue){ mData[0] = pValue; mData[1] = pValue; mData[2] = pValue; return *this; }
+	inline FbxVectorTemplate3<T>& operator=(const FbxVectorTemplate2<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; return *this; }
+	inline FbxVectorTemplate3<T>& operator=(const FbxVectorTemplate3<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; mData[2] = pVector.mData[2]; return *this; }
+	inline bool operator==(const FbxVectorTemplate3<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1]) && (mData[2] == pVector.mData[2])); }
+	inline bool operator!=(const FbxVectorTemplate3<T>& pVector) const { return !operator==(pVector); }
+	inline T* Buffer(){ return mData; }
+	inline const T* Buffer() const { return mData; }
+	T mData[3];
+};
+
+template<class T> class FBXSDK_DLL FbxVectorTemplate4
+{
+public:
+	inline FbxVectorTemplate4(){ *this = T(0); }
+	inline explicit FbxVectorTemplate4(T pValue){ *this = pValue; }
+	inline FbxVectorTemplate4(T pData0, T pData1, T pData2, T pData3){ mData[0] = pData0; mData[1] = pData1; mData[2] = pData2; mData[3] = pData3; }
+	inline ~FbxVectorTemplate4(){}
+	inline T& operator[](int pIndex){ return mData[pIndex]; }
+	inline const T& operator[](int pIndex) const { return mData[pIndex]; }
+	inline operator FbxVectorTemplate3<T>& () const { return *((FbxVectorTemplate3<T>*)this); }
+	inline FbxVectorTemplate4<T>& operator=(const T& pValue){ mData[0] = pValue; mData[1] = pValue; mData[2] = pValue; mData[3] = pValue; return *this; }
+	inline FbxVectorTemplate4<T>& operator=(const FbxVectorTemplate3<T>& pValue){ mData[0] = pValue[0]; mData[1] = pValue[1]; mData[2] = pValue[2]; return *this; }
+	inline FbxVectorTemplate4<T>& operator=(const FbxVectorTemplate4<T>& pVector){ mData[0] = pVector.mData[0]; mData[1] = pVector.mData[1]; mData[2] = pVector.mData[2]; mData[3] = pVector.mData[3]; return *this; }
+	inline bool operator==(const FbxVectorTemplate4<T>& pVector) const { return ((mData[0] == pVector.mData[0]) && (mData[1] == pVector.mData[1]) && (mData[2] == pVector.mData[2]) && (mData[3] == pVector.mData[3])); }
+	inline bool operator!=(const FbxVectorTemplate4<T>& pVector) const { return !operator==( pVector ); }
+	inline T* Buffer(){ return mData; }
+	inline const T* Buffer() const { return mData; }
+	T mData[4];
+};
+
+typedef FbxVectorTemplate2<FbxDouble> FbxDouble2;
+typedef FbxVectorTemplate3<FbxDouble> FbxDouble3;
+typedef FbxVectorTemplate4<FbxDouble> FbxDouble4;
+typedef FbxVectorTemplate4<FbxDouble4> FbxDouble4x4;
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_ARCH_TYPES_H_ */

+ 487 - 487
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxarray.h

@@ -1,487 +1,487 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxarray.h
-#ifndef _FBXSDK_CORE_BASE_ARRAY_H_
-#define _FBXSDK_CORE_BASE_ARRAY_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Class for array of basic elements such as pointers and basic types. This class will not
-* call constructor and destructor for elements, thus it is not suitable for object references.
-* Memory allocations are always done in a single contiguous memory region. */
-template <class T> class FbxArray
-{
-public:
-	//! Element compare function pointer definition
-	typedef int (*CompareFunc)(const void*, const void*);
-
-	//! Constructor.
-	FbxArray() : mSize(0), mCapacity(0), mArray(NULL){}
-
-	//! Reserve constructor.
-	FbxArray(const int pCapacity) : mSize(0), mCapacity(0), mArray(NULL){ if( pCapacity > 0 ) Reserve(pCapacity); }
-
-	//! Copy constructor.
-	FbxArray(const FbxArray& pArray) : mSize(0), mCapacity(0), mArray(NULL){ *this = pArray; }
-
-	/** Destructor.
-	* \remark The destructor for each element will not be called. */
-	~FbxArray(){ Clear(); }
-
-	/** Insert an element at the given position, growing the array if capacity is not sufficient.
-	* \param pIndex Position where to insert the element. Must be a positive value.
-	* \param pElement Element to insert in the array.
-	* \param pCompact If \c true and capacity is exceeded, grow capacity by one, otherwise double capacity (default).
-	* \return -1 if insert failed, otherwise the position of the inserted element in the array.
-	* \remark If the given index is greater than Size(), the element is appended at the end. Use compact mode only if you need to save memory. */
-	inline int InsertAt(const int pIndex, const T& pElement, bool pCompact=false)
-	{
-		FBX_ASSERT_RETURN_VALUE(pIndex >= 0, -1);
-		int lIndex = FbxMin(pIndex, mSize);
-		if( mSize >= mCapacity )
-		{
-			T lElement = pElement;	//Copy element because we might move memory
-			int lNewCapacity = FbxMax(pCompact ? mCapacity + 1 : mCapacity * 2, 1);	//We always double capacity when not compacting
-			T* lArray = Allocate(lNewCapacity);
-			FBX_ASSERT_RETURN_VALUE(lArray, -1);
-			mArray = lArray;
-			mCapacity = lNewCapacity;
-			return InsertAt(pIndex, lElement);	//Insert copied element because reference might be moved
-		}
-
-		if( lIndex < mSize )	//Move elements to leave a space open to insert the new element
-		{
-			//If pElement is inside memmove range, copy element and insert copy instead
-			if( (&pElement >= &mArray[lIndex]) && (&pElement < &mArray[mSize]) )
-			{
-				T lElement = pElement;
-				return InsertAt(pIndex, lElement);
-			}
-			memmove(&mArray[lIndex + 1], &mArray[lIndex], (mSize - lIndex) * sizeof(T));
-		}
-
-		memcpy(&mArray[lIndex], &pElement, sizeof(T));
-		mSize++;
-
-		return lIndex;
-	}
-
-	/** Append an element at the end of the array, doubling the array if capacity is not sufficient.
-	* \param pElement Element to append to the array.
-	* \return -1 if add failed, otherwise the position of the added element in the array. */
-	inline int Add(const T& pElement)
-	{
-		return InsertAt(mSize, pElement);
-	}
-
-	/** Append an element at the end of array, if not already present, doubling the array if capacity is not sufficient.
-	* \param pElement Element to append to the array.
-	* \return -1 if add failed, otherwise the position of the added element in the array. */
-	inline int AddUnique(const T& pElement)
-	{
-		int lIndex = Find(pElement);
-		return ( lIndex == -1 ) ? Add(pElement) : lIndex;
-	}
-
-	/** Append an element at the end of the array, growing the array by one element if capacity is not sufficient.
-	* \param pElement Element to append to the array.
-	* \return -1 if add failed, otherwise the position of the added element in the array. */
-	inline int AddCompact(const T& pElement)
-	{
-		return InsertAt(mSize, pElement, true);
-	}
-
-	/** Retrieve the number of element contained in the array. To increase the capacity without increasing the size, please use Reserve().
-	* \return The number of element in the array.
-	* \remark The size of the array cannot exceed its capacity. */
-	inline int Size() const { return mSize; }
-
-	/** Retrieve the current allocated memory capacity of the array.
-	* \return The capacity of the array in number of element.
-	* \remark The capacity will always be greater or equal to its size. */
-	inline int Capacity() const { return mCapacity; }
-
-	/** Retrieve a reference of the element at given index position in the array.
-	* \param pIndex Position of element in the array.
-	* \return A reference to the element at the specified position in the array.
-	* \remark No error will be thrown if the index is out of bounds. */
-	inline T& operator[](const int pIndex) const
-	{
-	#ifdef _DEBUG
-		FBX_ASSERT_MSG(pIndex >= 0, "Index is out of range!");
-		if( pIndex >= mSize )
-		{
-			if( pIndex < mCapacity )
-			{
-				FBX_ASSERT_NOW("Index is out of range, but not outside of capacity! Call SetAt() to use reserved memory.");
-			}
-			else FBX_ASSERT_NOW("Index is out of range!");
-		}
-	#endif
-		return (T&)mArray[pIndex];
-	}
-
-	/** Retrieve a copy of the element at given index position in the array.
-	* \param pIndex Position of element in the array.
-	* \return The value of the element at the specified position in the array.
-	* \remark No error will be thrown if the index is out of bounds. */
-	inline T GetAt(const int pIndex) const
-	{
-		return operator[](pIndex);
-	}
-
-	/** Retrieve a copy of the first element.
-	* \return Copy of the first element.
-	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
-	inline T GetFirst() const
-	{
-		return GetAt(0);
-	}
-
-	/** Retrieve a copy of the last element.
-	* \return Copy of the last element.
-	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
-	inline T GetLast() const
-	{
-		return GetAt(mSize-1);
-	}
-
-	/** Find first matching element, from first to last.
-	* \param pElement The element to be compared to each of the elements.
-	* \param pStartIndex The position to start searching from.
-	* \return Position of first matching element or -1 if there is no matching element. */
-	inline int Find(const T& pElement, const int pStartIndex=0) const
-	{
-		FBX_ASSERT_RETURN_VALUE(pStartIndex >= 0, -1);
-		for( int i = pStartIndex; i < mSize; ++i )
-		{
-			if( operator[](i) == pElement ) return i;
-		}
-		return -1;
-	}
-
-	/** Find first matching element, from last to first.
-	* \param pElement The element to be compared to each of the elements.
-	* \param pStartIndex The position to start searching from.
-	* \return Position of first matching element or -1 if there is no matching element. */
-	inline int FindReverse(const T& pElement, const int pStartIndex=FBXSDK_INT_MAX) const
-	{
-		for( int i = FbxMin(pStartIndex, mSize-1); i >= 0; --i )
-		{
-			if( operator[](i) == pElement ) return i;
-		}
-		return -1;
-	}
-
-	/** Request for allocation of additional memory without inserting new elements. After the memory has been reserved, please use SetAt() to initialize elements.
-	* \param pCapacity The number of additional element memory allocation requested.
-	* \return \c true if the memory allocation succeeded or if the capacity is unchanged, \c false otherwise.
-	* \remark If the requested capacity is less than or equal to the current capacity, this call has no effect. In either case, Size() is unchanged. */
-	inline bool Reserve(const int pCapacity)
-	{
-		FBX_ASSERT_RETURN_VALUE(pCapacity > 0, false);
-		if( pCapacity > mCapacity )
-		{
-			T* lArray = Allocate(pCapacity);
-			FBX_ASSERT_RETURN_VALUE(lArray, false);
-			mArray = lArray;
-			mCapacity = pCapacity;
-
-			//Initialize new memory to zero
-			memset(&mArray[mSize], 0, (mCapacity - mSize) * sizeof(T));
-		}
-		return true;
-	}
-
-	/** Set the element at given position in the array.
-	* \param pIndex Position of element in the array.
-	* \param pElement The new element.
-	* \remark If the index is outside range, and outside capacity, this call has no effect. However, if index is
-	* within capacity range, element count is increased such that Size() will become pIndex + 1. */
-	inline void SetAt(const int pIndex, const T& pElement)
-	{
-		FBX_ASSERT_RETURN(pIndex < mCapacity);
-		if( pIndex >= mSize ) mSize = pIndex + 1;
-		if( mArray ) memcpy(&mArray[pIndex], &pElement, sizeof(T));
-	}
-
-	/** Set the value of the first element.
-	* \param pElement The new value of the last element.
-	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
-	inline void SetFirst(const T& pElement)
-	{
-		SetAt(0, pElement);
-	}
-
-	/** Set the value of the last element.
-	* \param pElement The new value of the last element.
-	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
-	inline void SetLast(const T& pElement)
-	{
-		SetAt(mSize-1, pElement);
-	}
-
-	/** Remove an element at the given position in the array.
-	* \param pIndex Position of the element to remove.
-	* \return Removed element.
-	* \remark No error will be thrown if the index is out of bounds. */
-	inline T RemoveAt(const int pIndex)
-	{
-		T lElement = GetAt(pIndex);
-		if( pIndex + 1 < mSize )
-		{
-			memmove(&mArray[pIndex], &mArray[pIndex + 1], (mSize - pIndex - 1) * sizeof(T));
-		}
-		mSize--;
-		return lElement;
-	}
-
-	/** Remove the first element in the array.
-	* \return Removed element.
-	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
-	inline T RemoveFirst()
-	{
-		return RemoveAt(0);
-	}
-
-	/** Remove the last element in the array.
-	* \return Removed element.
-	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
-	inline T RemoveLast()
-	{
-		return RemoveAt(mSize-1);
-	}
-
-	/** Remove first matching element in the array.
-	* \param pElement Element to be removed.
-	* \return \c true if a matching element is found and removed, \c false otherwise. */
-	inline bool RemoveIt(const T& pElement)
-	{
-		int Index = Find(pElement);
-		if( Index >= 0 )
-		{
-			RemoveAt(Index);
-			return true;
-		}
-		return false;
-	}
-
-	/** Remove a range of elements at the given position in the array.
-	* \param pIndex Begin position of the elements to remove.
-	* \param pCount The count of elements to remove.
-	* \return \c true if successful, otherwise \c false. */
-	inline void RemoveRange(const int pIndex, const int pCount)
-	{
-		if( pIndex + pCount < mSize )
-		{
-			memmove(&mArray[pIndex], &mArray[pIndex + pCount], (mSize - pIndex - pCount) * sizeof(T));
-		}
-		mSize -= pCount;
-	}
-
-	/** Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed. Please use SetAt() to initialize any new elements.
-	* \param pSize The new count of elements to set the array to. Must be greater or equal to zero.
-	* \return \c true if the memory (re)allocation succeeded, \c false otherwise.
-	* \remark If the requested element count is less than or equal to the current count, elements are freed from memory. Otherwise, the array grows and elements are unchanged. */
-	inline bool Resize(const int pSize)
-	{
-		if( pSize == mSize && mSize == mCapacity ) return true;
-
-		if( pSize == 0 )
-		{
-			Clear();
-			return true;
-		}
-
-		FBX_ASSERT_RETURN_VALUE(pSize > 0, false);
-		if( pSize != mCapacity )
-		{
-			T* lArray = Allocate(pSize);
-			FBX_ASSERT_RETURN_VALUE(lArray, false);
-			mArray = lArray;
-		}
-
-		if( pSize > mCapacity )	//Initialize new memory to zero
-		{
-			memset(&mArray[mSize], 0, (pSize - mSize) * sizeof(T));
-		}
-
-		mSize = pSize;
-		mCapacity = pSize;
-		return true;
-	}
-
-	/** Increase size of array by the specified size.
-	* \param pSize The size to add to the array size.
-	* \return \c true if operation succeeded, \c false otherwise. */
-	inline bool Grow(const int pSize)
-	{
-		return Resize(mSize + pSize);
-	}
-
-	/** Reduce size of array by the specified size.
-	* \param pSize The size to remove from the array size.
-	* \return \c true if operation succeeded, \c false otherwise. */
-	inline bool Shrink(const int pSize)
-	{
-		return Resize(mSize - pSize);
-	}
-
-	/** Compact the array so that its capacity is the same as its size.
-	* \return \c true if operation succeeded, \c false otherwise. */
-	inline bool Compact()
-	{
-		return Resize(mSize);
-	}
-
-	/** Reset the number of element to zero and free the memory allocated.
-	* \remark This only free the memory allocated by the array, and doesn't call the destructor of each element. */
-	inline void Clear()
-	{
-		if( mArray != NULL )
-		{
-			mSize = 0;
-			mCapacity = 0;
-			FbxFree(mArray);
-			mArray = NULL;
-		}
-	}
-
-	/** Sort the array using the specified compare function pointer
-	* \param pCompareFunc The compare function to use to sort elements. */
-	inline void Sort(CompareFunc pCompareFunc)
-	{
-		qsort(mArray, mSize, sizeof(T), pCompareFunc);
-	}
-
-	//! Get pointer to internal array of elements.
-	inline T* GetArray() const { return mArray ? (T*)mArray : NULL; }
-
-	//! Cast operator.
-	inline operator T* (){ return mArray ? (T*)mArray : NULL; }
-
-	/** Append another array at the end of this array.
-	* \param pOther The other array to append to this array. */
-	inline void AddArray(const FbxArray<T>& pOther)
-	{
-		if( Grow(pOther.mSize) )
-		{
-			memcpy(&mArray[mSize - pOther.mSize], pOther.mArray, pOther.mSize * sizeof(T));
-		}
-	}
-
-	/** Append the elements of another array at the end of this array if they are not present.
-	* \param pOther Another array. */
-	inline void AddArrayNoDuplicate(const FbxArray<T>& pOther)
-	{
-		for( int i = 0, c = pOther.mSize; i < c; ++i )
-		{
-			AddUnique(pOther[i]);
-		}
-	}
-
-	/** Remove the elements of another array from this array is they are present.
-	* \param pOther Another array. */
-	inline void RemoveArray(const FbxArray<T>& pOther)
-	{
-		for( int i = 0, c = pOther.mSize; i < c; ++i )
-		{
-			RemoveIt(pOther[i]);
-		}
-	}
-
-	/** Operator to copy elements of an array.
-	* \return this array containing a copy of pOther elements. */
-	inline FbxArray<T>& operator=(const FbxArray<T>& pOther)
-	{
-		if( this != &pOther )
-		{
-			if( Resize(pOther.mSize) )
-			{
-				memcpy(mArray, pOther.mArray, pOther.mSize * sizeof(T));
-			}
-		}
-		return *this;
-	}
-
-	/** Operator to compare elements of an array.
-	* \return \c true if the two arrays are equal, otherwise \c false. */
-	inline bool operator==(const FbxArray<T>& pOther) const
-	{
-		if( this == &pOther ) return true;
-		if( mSize != pOther.mSize ) return false;
-		return memcmp(mArray, pOther.mArray, sizeof(T) * mSize) == 0;
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	inline int GetCount() const { return mSize; }
-
-private:
-	inline T* Allocate(const int pCapacity)
-	{
-		return (T*)FbxRealloc(mArray, pCapacity * sizeof(T));
-	}
-
-	int	mSize;
-	int	mCapacity;
-	T*	mArray;
-
-#if defined(FBXSDK_COMPILER_MSC)
-    //Previously class FbxArray is for pointers. Somehow, it's used to store other types. Here's a compile-time checking for known incompatible classes.
-    //If it happens you find new incompatible ones, declare them with macro FBXSDK_INCOMPATIBLE_WITH_ARRAY. Also see file fbxstring.h.
-    FBX_ASSERT_STATIC(FBXSDK_IS_SIMPLE_TYPE(T) || __is_enum(T) || (__has_trivial_constructor(T)&&__has_trivial_destructor(T)) || !FBXSDK_IS_INCOMPATIBLE_WITH_ARRAY(T));
-#endif
-
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-//! Call FbxFree on each element of the array, and then clear it.
-template <class T> inline void FbxArrayFree(FbxArray<T>& pArray)
-{
-	for( int i = 0, c = pArray.Size(); i < c; ++i )
-	{
-		FbxFree(pArray[i]);
-	}
-	pArray.Clear();
-}
-
-//! Call FbxDelete on each element of the array, and then clear it.
-template <class T> inline void FbxArrayDelete(FbxArray<T>& pArray)
-{
-	for( int i = 0, c = pArray.Size(); i < c; ++i )
-	{
-		FbxDelete(pArray[i]);
-	}
-	pArray.Clear();
-}
-
-//! Call Destroy on each element of the array, and then clear it.
-template <class T> inline void FbxArrayDestroy(FbxArray<T>& pArray)
-{
-	for( int i = 0, c = pArray.Size(); i < c; ++i )
-	{
-		(pArray[i])->Destroy();
-	}
-	pArray.Clear();
-}
-
-//! Make sure to break build if someone try to make FbxArray<FbxArray<T>>, which is not supported.
-template <class T> FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(FbxArray<T>);
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_ARRAY_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxarray.h
+#ifndef _FBXSDK_CORE_BASE_ARRAY_H_
+#define _FBXSDK_CORE_BASE_ARRAY_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Class for array of basic elements such as pointers and basic types. This class will not
+* call constructor and destructor for elements, thus it is not suitable for object references.
+* Memory allocations are always done in a single contiguous memory region. */
+template <class T> class FbxArray
+{
+public:
+	//! Element compare function pointer definition
+	typedef int (*CompareFunc)(const void*, const void*);
+
+	//! Constructor.
+	FbxArray() : mSize(0), mCapacity(0), mArray(NULL){}
+
+	//! Reserve constructor.
+	FbxArray(const int pCapacity) : mSize(0), mCapacity(0), mArray(NULL){ if( pCapacity > 0 ) Reserve(pCapacity); }
+
+	//! Copy constructor.
+	FbxArray(const FbxArray& pArray) : mSize(0), mCapacity(0), mArray(NULL){ *this = pArray; }
+
+	/** Destructor.
+	* \remark The destructor for each element will not be called. */
+	~FbxArray(){ Clear(); }
+
+	/** Insert an element at the given position, growing the array if capacity is not sufficient.
+	* \param pIndex Position where to insert the element. Must be a positive value.
+	* \param pElement Element to insert in the array.
+	* \param pCompact If \c true and capacity is exceeded, grow capacity by one, otherwise double capacity (default).
+	* \return -1 if insert failed, otherwise the position of the inserted element in the array.
+	* \remark If the given index is greater than Size(), the element is appended at the end. Use compact mode only if you need to save memory. */
+	inline int InsertAt(const int pIndex, const T& pElement, bool pCompact=false)
+	{
+		FBX_ASSERT_RETURN_VALUE(pIndex >= 0, -1);
+		int lIndex = FbxMin(pIndex, mSize);
+		if( mSize >= mCapacity )
+		{
+			T lElement = pElement;	//Copy element because we might move memory
+			int lNewCapacity = FbxMax(pCompact ? mCapacity + 1 : mCapacity * 2, 1);	//We always double capacity when not compacting
+			T* lArray = Allocate(lNewCapacity);
+			FBX_ASSERT_RETURN_VALUE(lArray, -1);
+			mArray = lArray;
+			mCapacity = lNewCapacity;
+			return InsertAt(pIndex, lElement);	//Insert copied element because reference might be moved
+		}
+
+		if( lIndex < mSize )	//Move elements to leave a space open to insert the new element
+		{
+			//If pElement is inside memmove range, copy element and insert copy instead
+			if( (&pElement >= &mArray[lIndex]) && (&pElement < &mArray[mSize]) )
+			{
+				T lElement = pElement;
+				return InsertAt(pIndex, lElement);
+			}
+			memmove(&mArray[lIndex + 1], &mArray[lIndex], (mSize - lIndex) * sizeof(T));
+		}
+
+		memcpy(&mArray[lIndex], &pElement, sizeof(T));
+		mSize++;
+
+		return lIndex;
+	}
+
+	/** Append an element at the end of the array, doubling the array if capacity is not sufficient.
+	* \param pElement Element to append to the array.
+	* \return -1 if add failed, otherwise the position of the added element in the array. */
+	inline int Add(const T& pElement)
+	{
+		return InsertAt(mSize, pElement);
+	}
+
+	/** Append an element at the end of array, if not already present, doubling the array if capacity is not sufficient.
+	* \param pElement Element to append to the array.
+	* \return -1 if add failed, otherwise the position of the added element in the array. */
+	inline int AddUnique(const T& pElement)
+	{
+		int lIndex = Find(pElement);
+		return ( lIndex == -1 ) ? Add(pElement) : lIndex;
+	}
+
+	/** Append an element at the end of the array, growing the array by one element if capacity is not sufficient.
+	* \param pElement Element to append to the array.
+	* \return -1 if add failed, otherwise the position of the added element in the array. */
+	inline int AddCompact(const T& pElement)
+	{
+		return InsertAt(mSize, pElement, true);
+	}
+
+	/** Retrieve the number of element contained in the array. To increase the capacity without increasing the size, please use Reserve().
+	* \return The number of element in the array.
+	* \remark The size of the array cannot exceed its capacity. */
+	inline int Size() const { return mSize; }
+
+	/** Retrieve the current allocated memory capacity of the array.
+	* \return The capacity of the array in number of element.
+	* \remark The capacity will always be greater or equal to its size. */
+	inline int Capacity() const { return mCapacity; }
+
+	/** Retrieve a reference of the element at given index position in the array.
+	* \param pIndex Position of element in the array.
+	* \return A reference to the element at the specified position in the array.
+	* \remark No error will be thrown if the index is out of bounds. */
+	inline T& operator[](const int pIndex) const
+	{
+	#ifdef _DEBUG
+		FBX_ASSERT_MSG(pIndex >= 0, "Index is out of range!");
+		if( pIndex >= mSize )
+		{
+			if( pIndex < mCapacity )
+			{
+				FBX_ASSERT_NOW("Index is out of range, but not outside of capacity! Call SetAt() to use reserved memory.");
+			}
+			else FBX_ASSERT_NOW("Index is out of range!");
+		}
+	#endif
+		return (T&)mArray[pIndex];
+	}
+
+	/** Retrieve a copy of the element at given index position in the array.
+	* \param pIndex Position of element in the array.
+	* \return The value of the element at the specified position in the array.
+	* \remark No error will be thrown if the index is out of bounds. */
+	inline T GetAt(const int pIndex) const
+	{
+		return operator[](pIndex);
+	}
+
+	/** Retrieve a copy of the first element.
+	* \return Copy of the first element.
+	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
+	inline T GetFirst() const
+	{
+		return GetAt(0);
+	}
+
+	/** Retrieve a copy of the last element.
+	* \return Copy of the last element.
+	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
+	inline T GetLast() const
+	{
+		return GetAt(mSize-1);
+	}
+
+	/** Find first matching element, from first to last.
+	* \param pElement The element to be compared to each of the elements.
+	* \param pStartIndex The position to start searching from.
+	* \return Position of first matching element or -1 if there is no matching element. */
+	inline int Find(const T& pElement, const int pStartIndex=0) const
+	{
+		FBX_ASSERT_RETURN_VALUE(pStartIndex >= 0, -1);
+		for( int i = pStartIndex; i < mSize; ++i )
+		{
+			if( operator[](i) == pElement ) return i;
+		}
+		return -1;
+	}
+
+	/** Find first matching element, from last to first.
+	* \param pElement The element to be compared to each of the elements.
+	* \param pStartIndex The position to start searching from.
+	* \return Position of first matching element or -1 if there is no matching element. */
+	inline int FindReverse(const T& pElement, const int pStartIndex=FBXSDK_INT_MAX) const
+	{
+		for( int i = FbxMin(pStartIndex, mSize-1); i >= 0; --i )
+		{
+			if( operator[](i) == pElement ) return i;
+		}
+		return -1;
+	}
+
+	/** Request for allocation of additional memory without inserting new elements. After the memory has been reserved, please use SetAt() to initialize elements.
+	* \param pCapacity The number of additional element memory allocation requested.
+	* \return \c true if the memory allocation succeeded or if the capacity is unchanged, \c false otherwise.
+	* \remark If the requested capacity is less than or equal to the current capacity, this call has no effect. In either case, Size() is unchanged. */
+	inline bool Reserve(const int pCapacity)
+	{
+		FBX_ASSERT_RETURN_VALUE(pCapacity > 0, false);
+		if( pCapacity > mCapacity )
+		{
+			T* lArray = Allocate(pCapacity);
+			FBX_ASSERT_RETURN_VALUE(lArray, false);
+			mArray = lArray;
+			mCapacity = pCapacity;
+
+			//Initialize new memory to zero
+			memset(&mArray[mSize], 0, (mCapacity - mSize) * sizeof(T));
+		}
+		return true;
+	}
+
+	/** Set the element at given position in the array.
+	* \param pIndex Position of element in the array.
+	* \param pElement The new element.
+	* \remark If the index is outside range, and outside capacity, this call has no effect. However, if index is
+	* within capacity range, element count is increased such that Size() will become pIndex + 1. */
+	inline void SetAt(const int pIndex, const T& pElement)
+	{
+		FBX_ASSERT_RETURN(pIndex < mCapacity);
+		if( pIndex >= mSize ) mSize = pIndex + 1;
+		if( mArray ) memcpy(&mArray[pIndex], &pElement, sizeof(T));
+	}
+
+	/** Set the value of the first element.
+	* \param pElement The new value of the last element.
+	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
+	inline void SetFirst(const T& pElement)
+	{
+		SetAt(0, pElement);
+	}
+
+	/** Set the value of the last element.
+	* \param pElement The new value of the last element.
+	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
+	inline void SetLast(const T& pElement)
+	{
+		SetAt(mSize-1, pElement);
+	}
+
+	/** Remove an element at the given position in the array.
+	* \param pIndex Position of the element to remove.
+	* \return Removed element.
+	* \remark No error will be thrown if the index is out of bounds. */
+	inline T RemoveAt(const int pIndex)
+	{
+		T lElement = GetAt(pIndex);
+		if( pIndex + 1 < mSize )
+		{
+			memmove(&mArray[pIndex], &mArray[pIndex + 1], (mSize - pIndex - 1) * sizeof(T));
+		}
+		mSize--;
+		return lElement;
+	}
+
+	/** Remove the first element in the array.
+	* \return Removed element.
+	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
+	inline T RemoveFirst()
+	{
+		return RemoveAt(0);
+	}
+
+	/** Remove the last element in the array.
+	* \return Removed element.
+	* \remark The array should have at least one element and no error will be thrown if the array is empty. */
+	inline T RemoveLast()
+	{
+		return RemoveAt(mSize-1);
+	}
+
+	/** Remove first matching element in the array.
+	* \param pElement Element to be removed.
+	* \return \c true if a matching element is found and removed, \c false otherwise. */
+	inline bool RemoveIt(const T& pElement)
+	{
+		int Index = Find(pElement);
+		if( Index >= 0 )
+		{
+			RemoveAt(Index);
+			return true;
+		}
+		return false;
+	}
+
+	/** Remove a range of elements at the given position in the array.
+	* \param pIndex Begin position of the elements to remove.
+	* \param pCount The count of elements to remove.
+	* \return \c true if successful, otherwise \c false. */
+	inline void RemoveRange(const int pIndex, const int pCount)
+	{
+		if( pIndex + pCount < mSize )
+		{
+			memmove(&mArray[pIndex], &mArray[pIndex + pCount], (mSize - pIndex - pCount) * sizeof(T));
+		}
+		mSize -= pCount;
+	}
+
+	/** Inserts or erases elements at the end such that Size() becomes pSize, increasing capacity if needed. Please use SetAt() to initialize any new elements.
+	* \param pSize The new count of elements to set the array to. Must be greater or equal to zero.
+	* \return \c true if the memory (re)allocation succeeded, \c false otherwise.
+	* \remark If the requested element count is less than or equal to the current count, elements are freed from memory. Otherwise, the array grows and elements are unchanged. */
+	inline bool Resize(const int pSize)
+	{
+		if( pSize == mSize && mSize == mCapacity ) return true;
+
+		if( pSize == 0 )
+		{
+			Clear();
+			return true;
+		}
+
+		FBX_ASSERT_RETURN_VALUE(pSize > 0, false);
+		if( pSize != mCapacity )
+		{
+			T* lArray = Allocate(pSize);
+			FBX_ASSERT_RETURN_VALUE(lArray, false);
+			mArray = lArray;
+		}
+
+		if( pSize > mCapacity )	//Initialize new memory to zero
+		{
+			memset(&mArray[mSize], 0, (pSize - mSize) * sizeof(T));
+		}
+
+		mSize = pSize;
+		mCapacity = pSize;
+		return true;
+	}
+
+	/** Increase size of array by the specified size.
+	* \param pSize The size to add to the array size.
+	* \return \c true if operation succeeded, \c false otherwise. */
+	inline bool Grow(const int pSize)
+	{
+		return Resize(mSize + pSize);
+	}
+
+	/** Reduce size of array by the specified size.
+	* \param pSize The size to remove from the array size.
+	* \return \c true if operation succeeded, \c false otherwise. */
+	inline bool Shrink(const int pSize)
+	{
+		return Resize(mSize - pSize);
+	}
+
+	/** Compact the array so that its capacity is the same as its size.
+	* \return \c true if operation succeeded, \c false otherwise. */
+	inline bool Compact()
+	{
+		return Resize(mSize);
+	}
+
+	/** Reset the number of element to zero and free the memory allocated.
+	* \remark This only free the memory allocated by the array, and doesn't call the destructor of each element. */
+	inline void Clear()
+	{
+		if( mArray != NULL )
+		{
+			mSize = 0;
+			mCapacity = 0;
+			FbxFree(mArray);
+			mArray = NULL;
+		}
+	}
+
+	/** Sort the array using the specified compare function pointer
+	* \param pCompareFunc The compare function to use to sort elements. */
+	inline void Sort(CompareFunc pCompareFunc)
+	{
+		qsort(mArray, mSize, sizeof(T), pCompareFunc);
+	}
+
+	//! Get pointer to internal array of elements.
+	inline T* GetArray() const { return mArray ? (T*)mArray : NULL; }
+
+	//! Cast operator.
+	inline operator T* (){ return mArray ? (T*)mArray : NULL; }
+
+	/** Append another array at the end of this array.
+	* \param pOther The other array to append to this array. */
+	inline void AddArray(const FbxArray<T>& pOther)
+	{
+		if( Grow(pOther.mSize) )
+		{
+			memcpy(&mArray[mSize - pOther.mSize], pOther.mArray, pOther.mSize * sizeof(T));
+		}
+	}
+
+	/** Append the elements of another array at the end of this array if they are not present.
+	* \param pOther Another array. */
+	inline void AddArrayNoDuplicate(const FbxArray<T>& pOther)
+	{
+		for( int i = 0, c = pOther.mSize; i < c; ++i )
+		{
+			AddUnique(pOther[i]);
+		}
+	}
+
+	/** Remove the elements of another array from this array is they are present.
+	* \param pOther Another array. */
+	inline void RemoveArray(const FbxArray<T>& pOther)
+	{
+		for( int i = 0, c = pOther.mSize; i < c; ++i )
+		{
+			RemoveIt(pOther[i]);
+		}
+	}
+
+	/** Operator to copy elements of an array.
+	* \return this array containing a copy of pOther elements. */
+	inline FbxArray<T>& operator=(const FbxArray<T>& pOther)
+	{
+		if( this != &pOther )
+		{
+			if( Resize(pOther.mSize) )
+			{
+				memcpy(mArray, pOther.mArray, pOther.mSize * sizeof(T));
+			}
+		}
+		return *this;
+	}
+
+	/** Operator to compare elements of an array.
+	* \return \c true if the two arrays are equal, otherwise \c false. */
+	inline bool operator==(const FbxArray<T>& pOther) const
+	{
+		if( this == &pOther ) return true;
+		if( mSize != pOther.mSize ) return false;
+		return memcmp(mArray, pOther.mArray, sizeof(T) * mSize) == 0;
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	inline int GetCount() const { return mSize; }
+
+private:
+	inline T* Allocate(const int pCapacity)
+	{
+		return (T*)FbxRealloc(mArray, pCapacity * sizeof(T));
+	}
+
+	int	mSize;
+	int	mCapacity;
+	T*	mArray;
+
+#if defined(FBXSDK_COMPILER_MSC)
+    //Previously class FbxArray is for pointers. Somehow, it's used to store other types. Here's a compile-time checking for known incompatible classes.
+    //If it happens you find new incompatible ones, declare them with macro FBXSDK_INCOMPATIBLE_WITH_ARRAY. Also see file fbxstring.h.
+    FBX_ASSERT_STATIC(FBXSDK_IS_SIMPLE_TYPE(T) || __is_enum(T) || (__has_trivial_constructor(T)&&__has_trivial_destructor(T)) || !FBXSDK_IS_INCOMPATIBLE_WITH_ARRAY(T));
+#endif
+
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+//! Call FbxFree on each element of the array, and then clear it.
+template <class T> inline void FbxArrayFree(FbxArray<T>& pArray)
+{
+	for( int i = 0, c = pArray.Size(); i < c; ++i )
+	{
+		FbxFree(pArray[i]);
+	}
+	pArray.Clear();
+}
+
+//! Call FbxDelete on each element of the array, and then clear it.
+template <class T> inline void FbxArrayDelete(FbxArray<T>& pArray)
+{
+	for( int i = 0, c = pArray.Size(); i < c; ++i )
+	{
+		FbxDelete(pArray[i]);
+	}
+	pArray.Clear();
+}
+
+//! Call Destroy on each element of the array, and then clear it.
+template <class T> inline void FbxArrayDestroy(FbxArray<T>& pArray)
+{
+	for( int i = 0, c = pArray.Size(); i < c; ++i )
+	{
+		(pArray[i])->Destroy();
+	}
+	pArray.Clear();
+}
+
+//! Make sure to break build if someone try to make FbxArray<FbxArray<T>>, which is not supported.
+template <class T> FBXSDK_INCOMPATIBLE_WITH_ARRAY_TEMPLATE(FbxArray<T>);
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_ARRAY_H_ */

+ 90 - 90
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxbitset.h

@@ -1,90 +1,90 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxbitset.h
-#ifndef _FBXSDK_CORE_BASE_BITSET_H_
-#define _FBXSDK_CORE_BASE_BITSET_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** An automatic growing array of bit.
-  *
-  * The bit array will automatically grow when specifying bit indexes that are greater
-  * than the array size when calling SetBit or UnsetBit. Indexes can vary from 0 to
-  * FBXSDK_UINT_MAX-1. When an invalid index is returned from any functions, FBXSDK_UINT_MAX
-  * is returned. The bit array is not thread safe.
-  */
-class FBXSDK_DLL FbxBitSet
-{
-public:
-	/** Constructor.
-	  * \param pInitialSize Initial bit array size in bit count (not in byte count!).
-	  */
-	FbxBitSet(const FbxUInt pInitialSize=0);
-
-	//! Destructor.
-	virtual ~FbxBitSet();
-
-	/** Set the bit at the specified bit index to true regardless of its current value.
-	  * \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
-	  */
-	void SetBit(const FbxUInt pBitIndex);
-
-	/** Set all the bits to the specified value regardless of their current value.
-	  * \param pValue The boolean value to set to all bits.
-	  */
-	void SetAllBits(const bool pValue);
-
-	/** Set the bit at the specified bit index to false regardless of its current value.
-	  * \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
-	  */
-	void UnsetBit(const FbxUInt pBitIndex);
-
-	/** Get the bit boolean value at the specified bit index.
-	  * \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
-	  * \return True if the bit is set, false otherwise.
-	  */
-	bool GetBit(const FbxUInt pBitIndex) const;
-
-	/** Get the bit index of the first bit that is currently set.
-	  * \return The bit index of the first set bit, FBXSDK_UINT_MAX if none found.
-	  */
-	FbxUInt GetFirstSetBitIndex() const;
-
-	/** Get the bit index of the last bit that is currently set.
-	  * \return The bit index of the last set bit, FBXSDK_UINT_MAX if none found.
-	  */
-	FbxUInt GetLastSetBitIndex() const;
-
-	/** Get the bit index of the next set bit after the specified bit index.
-	  * \param pBitIndex The start bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
-	  * \return The bit index of the next set bit, FBXSDK_UINT_MAX if none found.
-	  */
-	FbxUInt GetNextSetBitIndex(const FbxUInt pBitIndex) const;
-
-	/** Get the bit index of the previous set bit before the specified bit index.
-	  * \param pBitIndex The start bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
-	  * \return The bit index of the previous set bit, FBXSDK_UINT_MAX if none found.
-	  */
-	FbxUInt GetPreviousSetBitIndex(const FbxUInt pBitIndex) const;
-
-private:
-	void Grow(const FbxUInt pNewSize);
-
-	void* mData;
-	FbxUInt mSize;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_BITSET_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxbitset.h
+#ifndef _FBXSDK_CORE_BASE_BITSET_H_
+#define _FBXSDK_CORE_BASE_BITSET_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** An automatic growing array of bit.
+  *
+  * The bit array will automatically grow when specifying bit indexes that are greater
+  * than the array size when calling SetBit or UnsetBit. Indexes can vary from 0 to
+  * FBXSDK_UINT_MAX-1. When an invalid index is returned from any functions, FBXSDK_UINT_MAX
+  * is returned. The bit array is not thread safe.
+  */
+class FBXSDK_DLL FbxBitSet
+{
+public:
+	/** Constructor.
+	  * \param pInitialSize Initial bit array size in bit count (not in byte count!).
+	  */
+	FbxBitSet(const FbxUInt pInitialSize=0);
+
+	//! Destructor.
+	virtual ~FbxBitSet();
+
+	/** Set the bit at the specified bit index to true regardless of its current value.
+	  * \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
+	  */
+	void SetBit(const FbxUInt pBitIndex);
+
+	/** Set all the bits to the specified value regardless of their current value.
+	  * \param pValue The boolean value to set to all bits.
+	  */
+	void SetAllBits(const bool pValue);
+
+	/** Set the bit at the specified bit index to false regardless of its current value.
+	  * \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
+	  */
+	void UnsetBit(const FbxUInt pBitIndex);
+
+	/** Get the bit boolean value at the specified bit index.
+	  * \param pBitIndex The bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
+	  * \return True if the bit is set, false otherwise.
+	  */
+	bool GetBit(const FbxUInt pBitIndex) const;
+
+	/** Get the bit index of the first bit that is currently set.
+	  * \return The bit index of the first set bit, FBXSDK_UINT_MAX if none found.
+	  */
+	FbxUInt GetFirstSetBitIndex() const;
+
+	/** Get the bit index of the last bit that is currently set.
+	  * \return The bit index of the last set bit, FBXSDK_UINT_MAX if none found.
+	  */
+	FbxUInt GetLastSetBitIndex() const;
+
+	/** Get the bit index of the next set bit after the specified bit index.
+	  * \param pBitIndex The start bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
+	  * \return The bit index of the next set bit, FBXSDK_UINT_MAX if none found.
+	  */
+	FbxUInt GetNextSetBitIndex(const FbxUInt pBitIndex) const;
+
+	/** Get the bit index of the previous set bit before the specified bit index.
+	  * \param pBitIndex The start bit index in the array in the range of [0, FBXSDK_UINT_MAX-1].
+	  * \return The bit index of the previous set bit, FBXSDK_UINT_MAX if none found.
+	  */
+	FbxUInt GetPreviousSetBitIndex(const FbxUInt pBitIndex) const;
+
+private:
+	void Grow(const FbxUInt pNewSize);
+
+	void* mData;
+	FbxUInt mSize;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_BITSET_H_ */

+ 95 - 95
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxcharptrset.h

@@ -1,95 +1,95 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcharptrset.h
-#ifndef _FBXSDK_CORE_BASE_CHARPTRSET_H_
-#define _FBXSDK_CORE_BASE_CHARPTRSET_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** This class contains the data structure support for char pointer set.
-  */
-class FBXSDK_DLL FbxCharPtrSet
-{
-public:
-	/** Class constructor
-	* \param pItemPerBlock Number of item per block. Default is 20. */
-	FbxCharPtrSet(int pItemPerBlock=20);
-
-	//! Class destructor
-	~FbxCharPtrSet();
-
-	/** Add a new item.
-	* \param pReference char pointer reference to the item.
-	* \param pItem FbxHandle to the item. */
-	void Add(const char* pReference, FbxHandle pItem);
-
-	/** Removes an item.
-	* \param pReference char reference to the item.
-	* \return true if successful. */
-	bool Remove(const char* pReference);
-
-	/** Get an item's reference.
-	* \param pReference char reference to the item.
-	* \param PIndex index to the item.
-	* \return FbxHandle to the item, NULL if fails. */
-	FbxHandle Get(const char* pReference, int* PIndex=NULL);
-
-	/** Get an item's reference from index.
-	* \param pIndex index to the item.
-	* \return FbxHandle to the item, NULL if fails. */
-	FbxHandle& operator[](int pIndex);
-
-	/** Get an item's reference from index.
-	* \param pIndex index to the item.
-	* \param pReference char reference to the item.
-	* \return FbxHandle to the item, NULL if fails. */
-	FbxHandle GetFromIndex(int pIndex, const char** pReference=NULL);
-
-	/** Removes an item by index.
-	* \param pIndex index to the item. */
-	void RemoveFromIndex(int pIndex);
-
-	/** Get the number of item in the array.
-	* \return the number of element in the set. */
-	inline int GetCount() const { return mCharPtrSetCount; }
-
-	//! Sorts the array.
-	void Sort();
-
-	//! Clears the array.
-	void Clear();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	struct CharPtrSet;
-
-	inline void SetCaseSensitive(bool pIsCaseSensitive){ mIsCaseSensitive = pIsCaseSensitive; }
-
-private:
-	CharPtrSet*	FindEqual(const char* pReference) const;
-
-	CharPtrSet*	mCharPtrSetArray;
-	int			mCharPtrSetCount;
-	int			mBlockCount;
-	int			mItemPerBlock;
-	bool		mIsChanged;
-	bool		mIsCaseSensitive;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_CHARPTRSET_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcharptrset.h
+#ifndef _FBXSDK_CORE_BASE_CHARPTRSET_H_
+#define _FBXSDK_CORE_BASE_CHARPTRSET_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** This class contains the data structure support for char pointer set.
+  */
+class FBXSDK_DLL FbxCharPtrSet
+{
+public:
+	/** Class constructor
+	* \param pItemPerBlock Number of item per block. Default is 20. */
+	FbxCharPtrSet(int pItemPerBlock=20);
+
+	//! Class destructor
+	~FbxCharPtrSet();
+
+	/** Add a new item.
+	* \param pReference char pointer reference to the item.
+	* \param pItem FbxHandle to the item. */
+	void Add(const char* pReference, FbxHandle pItem);
+
+	/** Removes an item.
+	* \param pReference char reference to the item.
+	* \return true if successful. */
+	bool Remove(const char* pReference);
+
+	/** Get an item's reference.
+	* \param pReference char reference to the item.
+	* \param PIndex index to the item.
+	* \return FbxHandle to the item, NULL if fails. */
+	FbxHandle Get(const char* pReference, int* PIndex=NULL);
+
+	/** Get an item's reference from index.
+	* \param pIndex index to the item.
+	* \return FbxHandle to the item, NULL if fails. */
+	FbxHandle& operator[](int pIndex);
+
+	/** Get an item's reference from index.
+	* \param pIndex index to the item.
+	* \param pReference char reference to the item.
+	* \return FbxHandle to the item, NULL if fails. */
+	FbxHandle GetFromIndex(int pIndex, const char** pReference=NULL);
+
+	/** Removes an item by index.
+	* \param pIndex index to the item. */
+	void RemoveFromIndex(int pIndex);
+
+	/** Get the number of item in the array.
+	* \return the number of element in the set. */
+	inline int GetCount() const { return mCharPtrSetCount; }
+
+	//! Sorts the array.
+	void Sort();
+
+	//! Clears the array.
+	void Clear();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	struct CharPtrSet;
+
+	inline void SetCaseSensitive(bool pIsCaseSensitive){ mIsCaseSensitive = pIsCaseSensitive; }
+
+private:
+	CharPtrSet*	FindEqual(const char* pReference) const;
+
+	CharPtrSet*	mCharPtrSetArray;
+	int			mCharPtrSetCount;
+	int			mBlockCount;
+	int			mItemPerBlock;
+	bool		mIsChanged;
+	bool		mIsCaseSensitive;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_CHARPTRSET_H_ */

+ 213 - 213
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxcontainerallocators.h

@@ -1,213 +1,213 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcontainerallocators.h
-#ifndef _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_
-#define _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** An allocator class for use as a template parameter to one of the
-  * container class (FbxMap, FbxSet, FbxDynamicArray...) must implement these.
-  */
-class FBXSDK_DLL FbxBaseAllocator
-{
-public:
-	/** The class constructor.  
-	  * \param pRecordSize the size of one record held by the container. 
-	  * \remarks The parameter pRecordSize is not necessarily the same 
-	  *  size as of the value type, since the
-	  *  container may wrap the value into a private class.
-	  */
-	FbxBaseAllocator(const size_t pRecordSize) :
-		mRecordSize(pRecordSize)
-	{
-	}
-
-	/** This tells the allocator that we are about to call AllocateRecords
-	  * one or many times to allocate pRecordCount records. 
-	  * \param pRecordCount
-	  * \remarks This gives the allocator a chance to do whatever it deems necessary
-	  * to optimize subsequent allocations, for example, by preallocating a
-	  * sufficiently large pool of memory.
-	  */
-	void Reserve(const size_t /*pRecordCount*/)
-	{
-		// By default, ignore all preallocating requests.
-	}
-
-	/** Returns a pointer to a uninitialized continuous block of memory
-	  * able to hold pRecordCount * pRecordSize  bytes.  
-	  * \param pRecordCount
-	  * \remarks pRecordSize was defined in the Constructor description, above.
-	  */
-	void* AllocateRecords(const size_t pRecordCount=1)
-	{
-		return FbxMalloc(pRecordCount * mRecordSize);
-	}
-
-	/** Frees a block of memory returned by AllocateRecords. 
-	  * \param pRecord
-	  */
-	void FreeMemory(void* pRecord)
-	{
-		FbxFree(pRecord);
-	}
-
-	/** \return the size of each record allocated. 
-	  */
-	size_t GetRecordSize() const
-	{
-		return mRecordSize;
-	}
-
-private:
-	size_t mRecordSize;
-};
-
-/** This allocator only frees the allocated memory when it is deleted.
-  * This is a good allocator for building dictionaries, where we only
-  * add things to a container, but never remove them.
-  */
-class FbxHungryAllocator
-{
-public:
-	FbxHungryAllocator(size_t pRecordSize) :
-		mRecordSize(pRecordSize),
-		mRecordPoolSize(0),
-		mData(NULL)
-	{
-	}
-
-	FbxHungryAllocator(const FbxHungryAllocator& pOther) :
-		mRecordSize(pOther.mRecordSize),
-		mRecordPoolSize(pOther.mRecordPoolSize),
-		mData(NULL)
-	{
-	}
-
-	~FbxHungryAllocator()
-	{
-		MemoryBlock* lCurrent = mData;
-		MemoryBlock* lNext = lCurrent ? lCurrent->mNextBlock : 0;
-		while (lCurrent)
-		{
-			FbxDelete(lCurrent);
-			lCurrent = lNext;
-			lNext = lCurrent ? lCurrent->mNextBlock : 0;
-		}
-	}
-
-	void Reserve(const size_t pRecordCount)
-	{
-		MemoryBlock* lMem = FbxNew< MemoryBlock >(pRecordCount* mRecordSize);
-		lMem->mNextBlock = mData;
-		mData = lMem;
-		mRecordPoolSize += pRecordCount;
-	}
-
-	void* AllocateRecords(const size_t pRecordCount = 1)
-	{
-		MemoryBlock* lBlock = mData;
-		void* lRecord = NULL;
-
-		while( (lBlock != NULL) && ((lRecord = lBlock->GetChunk(pRecordCount * mRecordSize)) == NULL) )
-		{
-			lBlock = lBlock->mNextBlock;
-		}
-
-		if( lRecord == NULL )
-		{
-			size_t lNumRecordToAllocate = mRecordPoolSize / 8 == 0 ? 2 : mRecordPoolSize / 8;
-			if( lNumRecordToAllocate < pRecordCount )
-			{
-				lNumRecordToAllocate = pRecordCount;
-			}
-			Reserve(lNumRecordToAllocate);
-			lRecord = AllocateRecords(pRecordCount);
-		}
-		return lRecord;
-	}
-
-	void FreeMemory(void* /*pRecord*/)
-	{
-		// "Hungry": release memory only when the allocator is destroyed.
-	}
-
-	size_t GetRecordSize() const
-	{
-		return mRecordSize;
-	}
-
-	FbxHungryAllocator& operator=(const FbxHungryAllocator& pOther)
-	{
-		if( this != &pOther )
-		{
-			// The next call to AllocateRecords() may skip over currently reserved
-			// records if the size changes drastically, but otherwise GetChunk()
-			// is size-oblivious.
-			if( mRecordSize < pOther.mRecordSize )
-			{
-				mRecordPoolSize = 0;
-			}
-
-			mRecordSize = pOther.mRecordSize;
-		}
-		return(*this);
-	}
-
-private:
-	class MemoryBlock
-	{
-	public:
-		MemoryBlock(size_t pSize) :
-			mNextBlock(NULL),
-			mData(NULL),
-			mFreeData(NULL),
-			mEnd(NULL)
-		{
-			mData = FbxMalloc(pSize);
-			mFreeData = mData;
-			mEnd = reinterpret_cast<char*>(mData) + pSize;
-		}
-
-		~MemoryBlock()
-		{
-			FbxFree(mData);
-		}
-
-		void* GetChunk(const size_t pSize)
-		{
-			if( reinterpret_cast<char*>(mFreeData) + pSize < mEnd )
-			{
-				void* lChunk = mFreeData;
-				mFreeData = reinterpret_cast<char*>(mFreeData) + pSize;
-				return lChunk;
-			}
-			return NULL;
-		}
-
-		MemoryBlock*	mNextBlock;
-		void*			mData;
-		void*			mFreeData;
-		void*			mEnd;
-	};
-
-	size_t			mRecordSize;
-	size_t			mRecordPoolSize;
-	MemoryBlock*	mData;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcontainerallocators.h
+#ifndef _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_
+#define _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** An allocator class for use as a template parameter to one of the
+  * container class (FbxMap, FbxSet, FbxDynamicArray...) must implement these.
+  */
+class FBXSDK_DLL FbxBaseAllocator
+{
+public:
+	/** The class constructor.  
+	  * \param pRecordSize the size of one record held by the container. 
+	  * \remarks The parameter pRecordSize is not necessarily the same 
+	  *  size as of the value type, since the
+	  *  container may wrap the value into a private class.
+	  */
+	FbxBaseAllocator(const size_t pRecordSize) :
+		mRecordSize(pRecordSize)
+	{
+	}
+
+	/** This tells the allocator that we are about to call AllocateRecords
+	  * one or many times to allocate pRecordCount records. 
+	  * \param pRecordCount
+	  * \remarks This gives the allocator a chance to do whatever it deems necessary
+	  * to optimize subsequent allocations, for example, by preallocating a
+	  * sufficiently large pool of memory.
+	  */
+	void Reserve(const size_t /*pRecordCount*/)
+	{
+		// By default, ignore all preallocating requests.
+	}
+
+	/** Returns a pointer to a uninitialized continuous block of memory
+	  * able to hold pRecordCount * pRecordSize  bytes.  
+	  * \param pRecordCount
+	  * \remarks pRecordSize was defined in the Constructor description, above.
+	  */
+	void* AllocateRecords(const size_t pRecordCount=1)
+	{
+		return FbxMalloc(pRecordCount * mRecordSize);
+	}
+
+	/** Frees a block of memory returned by AllocateRecords. 
+	  * \param pRecord
+	  */
+	void FreeMemory(void* pRecord)
+	{
+		FbxFree(pRecord);
+	}
+
+	/** \return the size of each record allocated. 
+	  */
+	size_t GetRecordSize() const
+	{
+		return mRecordSize;
+	}
+
+private:
+	size_t mRecordSize;
+};
+
+/** This allocator only frees the allocated memory when it is deleted.
+  * This is a good allocator for building dictionaries, where we only
+  * add things to a container, but never remove them.
+  */
+class FbxHungryAllocator
+{
+public:
+	FbxHungryAllocator(size_t pRecordSize) :
+		mRecordSize(pRecordSize),
+		mRecordPoolSize(0),
+		mData(NULL)
+	{
+	}
+
+	FbxHungryAllocator(const FbxHungryAllocator& pOther) :
+		mRecordSize(pOther.mRecordSize),
+		mRecordPoolSize(pOther.mRecordPoolSize),
+		mData(NULL)
+	{
+	}
+
+	~FbxHungryAllocator()
+	{
+		MemoryBlock* lCurrent = mData;
+		MemoryBlock* lNext = lCurrent ? lCurrent->mNextBlock : 0;
+		while (lCurrent)
+		{
+			FbxDelete(lCurrent);
+			lCurrent = lNext;
+			lNext = lCurrent ? lCurrent->mNextBlock : 0;
+		}
+	}
+
+	void Reserve(const size_t pRecordCount)
+	{
+		MemoryBlock* lMem = FbxNew< MemoryBlock >(pRecordCount* mRecordSize);
+		lMem->mNextBlock = mData;
+		mData = lMem;
+		mRecordPoolSize += pRecordCount;
+	}
+
+	void* AllocateRecords(const size_t pRecordCount = 1)
+	{
+		MemoryBlock* lBlock = mData;
+		void* lRecord = NULL;
+
+		while( (lBlock != NULL) && ((lRecord = lBlock->GetChunk(pRecordCount * mRecordSize)) == NULL) )
+		{
+			lBlock = lBlock->mNextBlock;
+		}
+
+		if( lRecord == NULL )
+		{
+			size_t lNumRecordToAllocate = mRecordPoolSize / 8 == 0 ? 2 : mRecordPoolSize / 8;
+			if( lNumRecordToAllocate < pRecordCount )
+			{
+				lNumRecordToAllocate = pRecordCount;
+			}
+			Reserve(lNumRecordToAllocate);
+			lRecord = AllocateRecords(pRecordCount);
+		}
+		return lRecord;
+	}
+
+	void FreeMemory(void* /*pRecord*/)
+	{
+		// "Hungry": release memory only when the allocator is destroyed.
+	}
+
+	size_t GetRecordSize() const
+	{
+		return mRecordSize;
+	}
+
+	FbxHungryAllocator& operator=(const FbxHungryAllocator& pOther)
+	{
+		if( this != &pOther )
+		{
+			// The next call to AllocateRecords() may skip over currently reserved
+			// records if the size changes drastically, but otherwise GetChunk()
+			// is size-oblivious.
+			if( mRecordSize < pOther.mRecordSize )
+			{
+				mRecordPoolSize = 0;
+			}
+
+			mRecordSize = pOther.mRecordSize;
+		}
+		return(*this);
+	}
+
+private:
+	class MemoryBlock
+	{
+	public:
+		MemoryBlock(size_t pSize) :
+			mNextBlock(NULL),
+			mData(NULL),
+			mFreeData(NULL),
+			mEnd(NULL)
+		{
+			mData = FbxMalloc(pSize);
+			mFreeData = mData;
+			mEnd = reinterpret_cast<char*>(mData) + pSize;
+		}
+
+		~MemoryBlock()
+		{
+			FbxFree(mData);
+		}
+
+		void* GetChunk(const size_t pSize)
+		{
+			if( reinterpret_cast<char*>(mFreeData) + pSize < mEnd )
+			{
+				void* lChunk = mFreeData;
+				mFreeData = reinterpret_cast<char*>(mFreeData) + pSize;
+				return lChunk;
+			}
+			return NULL;
+		}
+
+		MemoryBlock*	mNextBlock;
+		void*			mData;
+		void*			mFreeData;
+		void*			mEnd;
+	};
+
+	size_t			mRecordSize;
+	size_t			mRecordPoolSize;
+	MemoryBlock*	mData;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_CONTAINER_ALLOCATORS_H_ */

+ 324 - 324
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxdynamicarray.h

@@ -1,324 +1,324 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxdynamicarray.h
-#ifndef _FBXSDK_CORE_BASE_DYNAMICARRAY_H_
-#define _FBXSDK_CORE_BASE_DYNAMICARRAY_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxcontainerallocators.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Template class for dynamic array holding objects.
-  * \nosubgrouping
-  * \see FbxStaticArray
-  */
-template <typename Type, typename Allocator=FbxBaseAllocator> class FbxDynamicArray
-{
-public:
-	//! Default constructor.
-	FbxDynamicArray() :
-		mArray(NULL),
-		mCapacity(0),
-		mSize(0),
-		mAllocator(sizeof(Type))
-	{
-	}
-
-	/** Constructor.
-	* \param pInitialSize initial capacity of this array */
-	FbxDynamicArray(const size_t pInitialSize) :
-		mArray(NULL),
-		mCapacity(0),
-		mSize(0),
-		mAllocator(sizeof(Type))
-	{
-		Reserve(pInitialSize);
-	}
-
-	/** Copy constructor.
-	* \remarks The copy constructor of \c Type will be 
-	* invoked in order to copy the value of elements to the
-	* new array.
-	*/
-	FbxDynamicArray(const FbxDynamicArray& pArray) :
-		mArray(NULL),
-		mCapacity(0),
-		mSize(0),
-		mAllocator(sizeof(Type))
-	{
-		Reserve(pArray.mCapacity);
-		CopyArray(mArray, pArray.mArray, pArray.mSize);
-		mSize = pArray.mSize;
-	}
-
-	//! Destructor.
-	~FbxDynamicArray()
-	{
-		for( size_t i = 0; i < mSize; ++i )
-		{
-			mArray[i].~Type();
-		}
-		mAllocator.FreeMemory(mArray);
-	}
-
-	//! Gets the current capacity of the array.
-	size_t Capacity() const
-	{
-		return mCapacity;
-	}
-
-	//! Gets the size of the array.
-	size_t Size() const
-	{
-		return mSize;
-	}
-
-	/** Assures that sufficient memory is allocated to hold n objects in the array, and increases the capacity if necessary.
-	* \param pCount Number of objects to reserve */
-	void Reserve(const size_t pCount)
-	{
-		if( pCount > mCapacity )
-		{
-			//We don't use mAllocator.PreAllocate, because we want our array to be continuous in memory.
-			Type* lNewArray = (Type*)mAllocator.AllocateRecords(pCount);
-			MoveArray(lNewArray, mArray, mSize);
-			mAllocator.FreeMemory(mArray);
-			mArray = lNewArray;
-			mCapacity = pCount;
-		}
-	}
-
-	/** Appends n objects at the end of the array.
-	* \param pItem object to append
-	* \param pNCopies number of copies to append */
-	void PushBack(const Type& pItem, const size_t pNCopies = 1)
-	{
-		if( mSize + pNCopies > mCapacity )
-		{
-			size_t lNewSize = mCapacity + mCapacity / 2;	//grow by 50%
-			if( mSize + pNCopies > lNewSize )
-			{
-				lNewSize = mSize + pNCopies;
-			}
-			Reserve(lNewSize);
-		}
-		FBX_ASSERT(mSize + pNCopies <= mCapacity);
-		Fill(mArray + mSize, pItem, pNCopies);
-		mSize += pNCopies;
-	}
-
-	/** Inserts n objects at the specified position.
-	* \param pIndex position index
-	* \param pItem object to insert
-	* \param pNCopies number of copies to append */
-	void Insert(const size_t pIndex, const Type& pItem, const size_t pNCopies=1)
-	{
-		FBX_ASSERT(pIndex >= 0);
-		FBX_ASSERT(pIndex <= mSize);
-		Type lValue = pItem; // in case pItem is in array
-		if( pNCopies == 0 )
-		{
-		}
-		else if( pIndex >= mSize )
-		{
-			PushBack(pItem, pNCopies);
-		}
-		else if( mSize + pNCopies > mCapacity )
-		{
-			size_t lNewSize = mCapacity + mCapacity / 2;	//not enough room, grow by 50%
-			if( mSize + pNCopies > lNewSize )
-			{
-				lNewSize = mSize + pNCopies;
-			}
-
-			Type* lNewArray = (Type*)mAllocator.AllocateRecords(lNewSize);
-			MoveArray(lNewArray, mArray, pIndex); // copy prefix
-			Fill(lNewArray + pIndex, pItem, pNCopies); // copy values
-			MoveArray(lNewArray + pIndex + pNCopies, mArray + pIndex, mSize - pIndex); // copy suffix
-			mAllocator.FreeMemory(mArray);
-			mArray = lNewArray;
-			mSize += pNCopies;
-			mCapacity = lNewSize;
-		}
-		else
-		{
-			// copy suffix backwards
-			MoveArrayBackwards(mArray + pIndex + pNCopies, mArray + pIndex, mSize - pIndex);
-			Fill(mArray + pIndex, pItem, pNCopies); // copy values
-			mSize += pNCopies;
-		}
-	}
-
-	/** Removes n objects at the end.
-	* \param pNElements number of objects to remove */
-	void PopBack(size_t pNElements=1)
-	{
-		FBX_ASSERT(pNElements <= mSize);
-		for( size_t i = mSize - pNElements; i < mSize; ++i )
-		{
-			mArray[i].~Type();
-		}
-		mSize -= pNElements;
-	}
-
-	/** Removes n objects at the specified position.
-	* \param pIndex position index
-	* \param pNElements number of objects to remove */
-	void Remove(const size_t pIndex, size_t pNElements=1)
-	{
-		FBX_ASSERT(pIndex >= 0);
-		FBX_ASSERT(pIndex <= mSize);
-		FBX_ASSERT(pIndex + pNElements <= mSize);
-		if( pIndex + pNElements >= mSize )
-		{
-			PopBack(pNElements);
-		}
-		else
-		{            
-			for( size_t i = pIndex; i < pIndex + pNElements; ++i )
-			{
-				mArray[i].~Type();
-			}
-			MoveOverlappingArray(&mArray[pIndex], &mArray[pIndex + pNElements], mSize - pIndex - pNElements);
-			mSize -= pNElements;
-		}
-	}
-
-	/** Gets nth object in the array.
-	* \param pIndex position index */
-	Type& operator[](const size_t pIndex)
-	{
-		return mArray[pIndex];
-	}
-
-	/** Gets nth object in the array.
-	* \param pIndex position index */
-	const Type& operator[](const size_t pIndex) const
-	{
-		return mArray[pIndex];
-	}
-
-	/** Retrieve the first item in the array.
-	* \return The first item in the array. */
-	Type& First()
-	{
-		return operator[](0);
-	}
-
-	/** Retrieve the first item in the array.
-	* \return The first item in the array. */
-	const Type& First() const
-	{
-		return operator[](0);
-	}
-
-	/** Retrieve the last item in the array.
-	* \return The last item in the array. */
-	Type& Last()
-	{
-		return operator[](mSize-1);
-	}
-
-	/** Retrieve the last item in the array.
-	* \return The last item in the array. */
-	const Type& Last() const
-	{
-		return operator[](mSize-1);
-	}
-
-	/** Find first matching element, from first to last.
-	* \param pItem The item to try to find in the array.
-	* \param pStartIndex The index to start searching from.
-	* \return Index of the first matching item, otherwise returns -1 (equivalent of SIZE_MAX for size_t). */
-	size_t Find(const Type& pItem, const size_t pStartIndex=0) const
-	{
-		for( size_t i = pStartIndex; i < mSize; ++i )
-		{
-			if( operator[](i) == pItem ) return i;
-		}
-		return -1;
-	}
-
-	/** Assignment operator.
-	* \remarks The copy constructor of \c Type will be invoked in order to copy the value of elements to the new array. */
-	FbxDynamicArray& operator=(const FbxDynamicArray& pArray)
-	{
-		Reserve(pArray.mCapacity);
-		CopyArray(mArray, pArray.mArray, pArray.mSize);
-		mSize = pArray.mSize;
-		return *this;
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-	static void CopyArray(Type* pDest, const Type* pSrc, size_t pCount)
-	{
-		for( int i = 0; i < int(pCount); i++ )
-		{
-			new(&(pDest[i])) Type(pSrc[i]);	//in-place new won't allocate memory, so it is safe
-		}
-	}
-
-	static void MoveArray(Type* pDest, const Type* pSrc, size_t pCount)
-	{
-		for( int i = 0; i < int(pCount); i++ )
-		{
-			new(&(pDest[i])) Type(pSrc[i]);	//in-place new won't allocate memory, so it is safe
-		}
-
-		for( int i = 0; i < int(pCount); i++ )
-		{
-			pSrc[i].~Type();
-		}
-	}
-
-	static void MoveOverlappingArray(Type* pDest, const Type* pSrc, size_t pCount)
-	{
-		for( int i = 0; i < int(pCount); i++ )
-		{
-			new(&(pDest[i])) Type(pSrc[i]);	//in-place new won't allocate memory, so it is safe
-			pSrc[i].~Type();
-		}
-	}
-
-	static void MoveArrayBackwards(Type* pDest, const Type* pSrc, size_t pCount)
-	{
-		for( int i = 0; i < int(pCount); ++i )
-		{
-			new(&(pDest[pCount-1-i])) Type(pSrc[pCount-1-i]);	//in-place new won't allocate memory, so it is safe
-			pSrc[pCount-1-i].~Type();
-		}
-	}
-
-	static void Fill(Type* pDest, const Type& pItem, size_t pCount)
-	{
-		for( int i = 0; i < int(pCount); i++ )
-		{
-			new(&(pDest[i])) Type(pItem);	//in-place new won't allocate memory, so it is safe
-		}
-	}
-
-    Type*		mArray;
-    size_t		mCapacity;
-    size_t		mSize;
-    Allocator	mAllocator;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_DYNAMICARRAY_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxdynamicarray.h
+#ifndef _FBXSDK_CORE_BASE_DYNAMICARRAY_H_
+#define _FBXSDK_CORE_BASE_DYNAMICARRAY_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxcontainerallocators.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Template class for dynamic array holding objects.
+  * \nosubgrouping
+  * \see FbxStaticArray
+  */
+template <typename Type, typename Allocator=FbxBaseAllocator> class FbxDynamicArray
+{
+public:
+	//! Default constructor.
+	FbxDynamicArray() :
+		mArray(NULL),
+		mCapacity(0),
+		mSize(0),
+		mAllocator(sizeof(Type))
+	{
+	}
+
+	/** Constructor.
+	* \param pInitialSize initial capacity of this array */
+	FbxDynamicArray(const size_t pInitialSize) :
+		mArray(NULL),
+		mCapacity(0),
+		mSize(0),
+		mAllocator(sizeof(Type))
+	{
+		Reserve(pInitialSize);
+	}
+
+	/** Copy constructor.
+	* \remarks The copy constructor of \c Type will be 
+	* invoked in order to copy the value of elements to the
+	* new array.
+	*/
+	FbxDynamicArray(const FbxDynamicArray& pArray) :
+		mArray(NULL),
+		mCapacity(0),
+		mSize(0),
+		mAllocator(sizeof(Type))
+	{
+		Reserve(pArray.mCapacity);
+		CopyArray(mArray, pArray.mArray, pArray.mSize);
+		mSize = pArray.mSize;
+	}
+
+	//! Destructor.
+	~FbxDynamicArray()
+	{
+		for( size_t i = 0; i < mSize; ++i )
+		{
+			mArray[i].~Type();
+		}
+		mAllocator.FreeMemory(mArray);
+	}
+
+	//! Gets the current capacity of the array.
+	size_t Capacity() const
+	{
+		return mCapacity;
+	}
+
+	//! Gets the size of the array.
+	size_t Size() const
+	{
+		return mSize;
+	}
+
+	/** Assures that sufficient memory is allocated to hold n objects in the array, and increases the capacity if necessary.
+	* \param pCount Number of objects to reserve */
+	void Reserve(const size_t pCount)
+	{
+		if( pCount > mCapacity )
+		{
+			//We don't use mAllocator.PreAllocate, because we want our array to be continuous in memory.
+			Type* lNewArray = (Type*)mAllocator.AllocateRecords(pCount);
+			MoveArray(lNewArray, mArray, mSize);
+			mAllocator.FreeMemory(mArray);
+			mArray = lNewArray;
+			mCapacity = pCount;
+		}
+	}
+
+	/** Appends n objects at the end of the array.
+	* \param pItem object to append
+	* \param pNCopies number of copies to append */
+	void PushBack(const Type& pItem, const size_t pNCopies = 1)
+	{
+		if( mSize + pNCopies > mCapacity )
+		{
+			size_t lNewSize = mCapacity + mCapacity / 2;	//grow by 50%
+			if( mSize + pNCopies > lNewSize )
+			{
+				lNewSize = mSize + pNCopies;
+			}
+			Reserve(lNewSize);
+		}
+		FBX_ASSERT(mSize + pNCopies <= mCapacity);
+		Fill(mArray + mSize, pItem, pNCopies);
+		mSize += pNCopies;
+	}
+
+	/** Inserts n objects at the specified position.
+	* \param pIndex position index
+	* \param pItem object to insert
+	* \param pNCopies number of copies to append */
+	void Insert(const size_t pIndex, const Type& pItem, const size_t pNCopies=1)
+	{
+		FBX_ASSERT(pIndex >= 0);
+		FBX_ASSERT(pIndex <= mSize);
+		Type lValue = pItem; // in case pItem is in array
+		if( pNCopies == 0 )
+		{
+		}
+		else if( pIndex >= mSize )
+		{
+			PushBack(pItem, pNCopies);
+		}
+		else if( mSize + pNCopies > mCapacity )
+		{
+			size_t lNewSize = mCapacity + mCapacity / 2;	//not enough room, grow by 50%
+			if( mSize + pNCopies > lNewSize )
+			{
+				lNewSize = mSize + pNCopies;
+			}
+
+			Type* lNewArray = (Type*)mAllocator.AllocateRecords(lNewSize);
+			MoveArray(lNewArray, mArray, pIndex); // copy prefix
+			Fill(lNewArray + pIndex, pItem, pNCopies); // copy values
+			MoveArray(lNewArray + pIndex + pNCopies, mArray + pIndex, mSize - pIndex); // copy suffix
+			mAllocator.FreeMemory(mArray);
+			mArray = lNewArray;
+			mSize += pNCopies;
+			mCapacity = lNewSize;
+		}
+		else
+		{
+			// copy suffix backwards
+			MoveArrayBackwards(mArray + pIndex + pNCopies, mArray + pIndex, mSize - pIndex);
+			Fill(mArray + pIndex, pItem, pNCopies); // copy values
+			mSize += pNCopies;
+		}
+	}
+
+	/** Removes n objects at the end.
+	* \param pNElements number of objects to remove */
+	void PopBack(size_t pNElements=1)
+	{
+		FBX_ASSERT(pNElements <= mSize);
+		for( size_t i = mSize - pNElements; i < mSize; ++i )
+		{
+			mArray[i].~Type();
+		}
+		mSize -= pNElements;
+	}
+
+	/** Removes n objects at the specified position.
+	* \param pIndex position index
+	* \param pNElements number of objects to remove */
+	void Remove(const size_t pIndex, size_t pNElements=1)
+	{
+		FBX_ASSERT(pIndex >= 0);
+		FBX_ASSERT(pIndex <= mSize);
+		FBX_ASSERT(pIndex + pNElements <= mSize);
+		if( pIndex + pNElements >= mSize )
+		{
+			PopBack(pNElements);
+		}
+		else
+		{            
+			for( size_t i = pIndex; i < pIndex + pNElements; ++i )
+			{
+				mArray[i].~Type();
+			}
+			MoveOverlappingArray(&mArray[pIndex], &mArray[pIndex + pNElements], mSize - pIndex - pNElements);
+			mSize -= pNElements;
+		}
+	}
+
+	/** Gets nth object in the array.
+	* \param pIndex position index */
+	Type& operator[](const size_t pIndex)
+	{
+		return mArray[pIndex];
+	}
+
+	/** Gets nth object in the array.
+	* \param pIndex position index */
+	const Type& operator[](const size_t pIndex) const
+	{
+		return mArray[pIndex];
+	}
+
+	/** Retrieve the first item in the array.
+	* \return The first item in the array. */
+	Type& First()
+	{
+		return operator[](0);
+	}
+
+	/** Retrieve the first item in the array.
+	* \return The first item in the array. */
+	const Type& First() const
+	{
+		return operator[](0);
+	}
+
+	/** Retrieve the last item in the array.
+	* \return The last item in the array. */
+	Type& Last()
+	{
+		return operator[](mSize-1);
+	}
+
+	/** Retrieve the last item in the array.
+	* \return The last item in the array. */
+	const Type& Last() const
+	{
+		return operator[](mSize-1);
+	}
+
+	/** Find first matching element, from first to last.
+	* \param pItem The item to try to find in the array.
+	* \param pStartIndex The index to start searching from.
+	* \return Index of the first matching item, otherwise returns -1 (equivalent of SIZE_MAX for size_t). */
+	size_t Find(const Type& pItem, const size_t pStartIndex=0) const
+	{
+		for( size_t i = pStartIndex; i < mSize; ++i )
+		{
+			if( operator[](i) == pItem ) return i;
+		}
+		return -1;
+	}
+
+	/** Assignment operator.
+	* \remarks The copy constructor of \c Type will be invoked in order to copy the value of elements to the new array. */
+	FbxDynamicArray& operator=(const FbxDynamicArray& pArray)
+	{
+		Reserve(pArray.mCapacity);
+		CopyArray(mArray, pArray.mArray, pArray.mSize);
+		mSize = pArray.mSize;
+		return *this;
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+	static void CopyArray(Type* pDest, const Type* pSrc, size_t pCount)
+	{
+		for( int i = 0; i < int(pCount); i++ )
+		{
+			new(&(pDest[i])) Type(pSrc[i]);	//in-place new won't allocate memory, so it is safe
+		}
+	}
+
+	static void MoveArray(Type* pDest, const Type* pSrc, size_t pCount)
+	{
+		for( int i = 0; i < int(pCount); i++ )
+		{
+			new(&(pDest[i])) Type(pSrc[i]);	//in-place new won't allocate memory, so it is safe
+		}
+
+		for( int i = 0; i < int(pCount); i++ )
+		{
+			pSrc[i].~Type();
+		}
+	}
+
+	static void MoveOverlappingArray(Type* pDest, const Type* pSrc, size_t pCount)
+	{
+		for( int i = 0; i < int(pCount); i++ )
+		{
+			new(&(pDest[i])) Type(pSrc[i]);	//in-place new won't allocate memory, so it is safe
+			pSrc[i].~Type();
+		}
+	}
+
+	static void MoveArrayBackwards(Type* pDest, const Type* pSrc, size_t pCount)
+	{
+		for( int i = 0; i < int(pCount); ++i )
+		{
+			new(&(pDest[pCount-1-i])) Type(pSrc[pCount-1-i]);	//in-place new won't allocate memory, so it is safe
+			pSrc[pCount-1-i].~Type();
+		}
+	}
+
+	static void Fill(Type* pDest, const Type& pItem, size_t pCount)
+	{
+		for( int i = 0; i < int(pCount); i++ )
+		{
+			new(&(pDest[i])) Type(pItem);	//in-place new won't allocate memory, so it is safe
+		}
+	}
+
+    Type*		mArray;
+    size_t		mCapacity;
+    size_t		mSize;
+    Allocator	mAllocator;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_DYNAMICARRAY_H_ */

+ 257 - 257
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxfile.h

@@ -1,257 +1,257 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxfile.h
-#ifndef _FBXSDK_CORE_BASE_FILE_H_
-#define _FBXSDK_CORE_BASE_FILE_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxstring.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxStream;
-
-/**
-    Class for interfacing with files, providing a similar interface for files independant of the OS or filesystem.
-*/
-class FBXSDK_DLL FbxFile
-{
-public:
-	enum EMode {eNone, eReadOnly, eReadWrite, eCreateWriteOnly, eCreateReadWrite, eCreateAppend};
-	enum ESeekPos {eBegin, eCurrent, eEnd};
-
-    FbxFile();
-    virtual ~FbxFile();
-
-	/** Opens a file on disk using the specified read/write mode.
-	  * \param pFileName_UTF8 Filename in UTF8 (compatible with ASCII)
-      * \param pMode Mode in which to open the file, e.g. eReadOnly, eCreateReadWrite, etc.
-      * \param pBinary Whether the file is to be opened in binary or text mode.
-	  * \return True if opening is successful.
-	  */
-    virtual bool        Open(const char* pFileName_UTF8, const EMode pMode=eCreateReadWrite, const bool pBinary=true);
-
-	/** Opens a file from a data stream using the specified read/write mode.
-	  * \param pStream Stream instance with which the file will be read/written
-      * \param pStreamData User-defined data to pass as a parameter to the stream's Open() method.
-      * \param pMode Deprecated/Unused.
-	  * \return True if opening is successful.
-	  */
-    virtual bool        Open(FbxStream* pStream, void* pStreamData, const char* pMode);
-
-	/** Closes a file, freeing its handle.
-	  * \return True if closing is successful.
-	  */
-    virtual bool        Close();
-
-    /** Seek to a specific position in the file, starting from either beginning, current position or end
-	  * \param pOffset Offset to seek to (advance the file position cursor) starting from pSeekPos
-      * \param pSeekPos Starting position from which to seek to.  Beginning, current position or end.
-	  */
-    virtual void		Seek(const FbxInt64 pOffset, const ESeekPos pSeekPos=eBegin);
-
-	/** Returns the position at which the file cursor currently is.  For example, will be ==0 for beginning and ==FileSize for end.
-	  * \return The position at which the file cursor currently is.
-	  */
-    virtual FbxInt64	Tell() const;
-
-	/** Read a part of the file into a buffer
-      * \param pDstBuf Pre-allocated buffer in which to read data
-      * \param pSize Size of the data chunk to be read in bytes
-	  * \return Number of bytes read.
-	  */
-    virtual	size_t		Read(void* pDstBuf, const size_t pSize);
-
-	/** Read a part of the file as a string into a buffer
-      * \param pDstBuf Pre-allocated buffer in which to read the string
-      * \param pDstSize Size of the data chunk to be read in characters
-      * \param pStopAtFirstWhiteSpace If true, will stop reading at first white space, otherwise it will stop at the first line feed (\n)
-	  * \return Pointer on the data read.  Equivalent to parameter pDstBuf
-	  */
-	virtual char*		ReadString(char* pDstBuf, const size_t pDstSize, bool pStopAtFirstWhiteSpace=false);
-
-	/** Write a buffer to an opened file
-      * \param pSrcBuf Pre-allocated buffer from which to write data
-      * \param pSize Size of the data chunk to be written in bytes
-	  * \return Number of bytes written.
-	  */
-    virtual size_t		Write(const void* pSrcBuf, const size_t pSize);
-
-	/** Write a formatted string to an opened file
-      * \param pFormat Pre-allocated format buffer from which to write data
-      * \param ... Variable number of arguments describing the values in the previous parameter. 
-	  * \return True if data was successfully written
-	  */
-    virtual bool		WriteFormat(const char* pFormat, ...);
-
-	/** Modify the size of a file. Null characters ('\0') are appended if the file is extended. 
-      * If the file is truncated, all data from the end of the shortened file to the original length of the file is lost.
-      * Please note that this function considers the current file cursor as the beginning of the file.
-      * It is therefore required to use Seek(0) prior to calling it if we want the size specified by the
-      * pSize parameter to be absolute.
-      * \param pSize New desired file size
-	  * \return True if file was successfully truncated
-	  */
-    virtual bool		Truncate(const FbxInt64 pSize);
-
-	/** Checks whether the current file cursor position is at the end of file.
-	  * \return True if the cursor is at the end of file, false otherwise.
-	  */
-    virtual bool		EndOfFile() const;
-
-	/** Gets the size of the currently opened file.
-	  * \return File size
-	  */
-	virtual FbxInt64	GetSize();
-
-    /** Unused function in this default implementation.  Must be implemented by memory files.       
-      * \param pMemPtr Unused
-	  * \param pSize Unused
-	  */
-	virtual void		GetMemoryFileInfo(void** pMemPtr, size_t pSize);
-
-	/** Checks whether the file is currently opened.
-	  * \return True if file is opened, false otherwise
-	  */
-    bool                IsOpen() const;
-
-	/** Checks whether the file is currently opened with a user-provided streaming interface instead of just the file name
-	  * \return True if file has been opened with a stream interface, false otherwise
-	  */
-    bool                IsStream() const;
-
-	/** Returns the full file path name, as provided when opening it.
-	  * \return File full path
-	  */
-    const char*			GetFilePathName() const;
-
-	/** Returns the mode with which the file was opened, when calling the Open() method.
-	  * \return Mode with which the file was opened
-	  */
-    EMode				GetFileMode() const;
-
-	/** Returns last encountered error when performing any operation on the file.
-	  * \return Last error code
-	  */
-    int                 GetLastError();
-
-	/** Resets the current error code and the end of file indicator of the opened file
-	  */
-    void                ClearError();
-
-protected:
-	FILE*				mFilePtr;
-    FbxStream*          mStreamPtr;
-	bool                mIsOpen;
-	bool                mIsStream;
-	EMode				mMode;
-	FbxString			mFileName;
-};
-
-class FBXSDK_DLL FbxFileUtils
-{
-public:
-	/** Delete a file from disk.
-	  * \param pFileName_UTF8 The file to be deleted.
-	  * \return True if delete is successful.
-	  */
-    static bool Delete(const char* pFileName_UTF8);
-
-	/** Rename a file on disk.
-	  * \param pFileName_UTF8 The file to be renamed.
-	  * \param pNewName_UTF8 The new file name upon rename.
-	  * \return True if rename is successful.
-	  */
-    static bool Rename(const char* pFileName_UTF8, const char* pNewName_UTF8);
-
-	/** Copy one file's content to another file (if the destination file not exist, it will be created).
-	  * \param pDestination_UTF8 The destination file path
-	  * \param pSource_UTF8 The source file path
-	  * \return Return true if copy is successfully.
-	  */
-	static bool Copy(const char* pDestination_UTF8, const char* pSource_UTF8);
-
-	//! Get given file's size.
-	static FbxInt64 Size(const char* pFilePath_UTF8);
-
-	/** Find if the specified file exist.
-	  * \param pFilePath_UTF8 The file path to test against.
-	  * \return Returns true if the file exist.
-	  */
-	static bool Exist(const char* pFilePath_UTF8);
-
-	/** Find if the specified file is in read-only mode.
-	  * \param pFilePath_UTF8 The file path to test against.
-	  * \return Returns true if the file is in read-only mode.
-	  */
-	static bool IsReadOnly(const char* pFilePath_UTF8);
-
-	// We return a KLong that in fact is a cast of a time_t.
-	//! Get given file's last date.
-	static FbxLong GetLastDate(const char* pPath_UTF8);
-
-	//! Set the given file's last date as the given date.
-	static bool SetLastDate(const char* pPath_UTF8, FbxLong pTime);
-
-	/** Get some content of a file.
-	  * \param pStr The content get from file.
-	  * \param pSize The size of content.
-	  * \param pStream The opened stream of file.
-	  */
-	static char* FGets(char* pStr, int pSize, FILE* pStream);
-};
-
-template<class T> inline const T FbxSwab(const T x)
-{
-	switch( sizeof(x) )
-	{
-		case 2:
-		{
-			FbxUInt8 t[2];
-			t[0] = ((FbxUInt8*)&x)[1];
-			t[1] = ((FbxUInt8*)&x)[0];
-			return *(T*)&t;
-		}
-
-		case 4:
-		{
-			FbxUInt8 t[4];
-			t[0] = ((FbxUInt8*)&x)[3];
-			t[1] = ((FbxUInt8*)&x)[2];
-			t[2] = ((FbxUInt8*)&x)[1];
-			t[3] = ((FbxUInt8*)&x)[0];
-			return *(T*)&t;
-		}
-
-		case 8:
-		{
-			FbxUInt8 t[8];
-			t[0] = ((FbxUInt8*)&x)[7];
-			t[1] = ((FbxUInt8*)&x)[6];
-			t[2] = ((FbxUInt8*)&x)[5];
-			t[3] = ((FbxUInt8*)&x)[4];
-			t[4] = ((FbxUInt8*)&x)[3];
-			t[5] = ((FbxUInt8*)&x)[2];
-			t[6] = ((FbxUInt8*)&x)[1];
-			t[7] = ((FbxUInt8*)&x)[0];
-			return *(T*)&t;
-		}
-
-		default:
-			return x;
-	}
-}
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_FILE_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxfile.h
+#ifndef _FBXSDK_CORE_BASE_FILE_H_
+#define _FBXSDK_CORE_BASE_FILE_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxstring.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxStream;
+
+/**
+    Class for interfacing with files, providing a similar interface for files independant of the OS or filesystem.
+*/
+class FBXSDK_DLL FbxFile
+{
+public:
+	enum EMode {eNone, eReadOnly, eReadWrite, eCreateWriteOnly, eCreateReadWrite, eCreateAppend};
+	enum ESeekPos {eBegin, eCurrent, eEnd};
+
+    FbxFile();
+    virtual ~FbxFile();
+
+	/** Opens a file on disk using the specified read/write mode.
+	  * \param pFileName_UTF8 Filename in UTF8 (compatible with ASCII)
+      * \param pMode Mode in which to open the file, e.g. eReadOnly, eCreateReadWrite, etc.
+      * \param pBinary Whether the file is to be opened in binary or text mode.
+	  * \return True if opening is successful.
+	  */
+    virtual bool        Open(const char* pFileName_UTF8, const EMode pMode=eCreateReadWrite, const bool pBinary=true);
+
+	/** Opens a file from a data stream using the specified read/write mode.
+	  * \param pStream Stream instance with which the file will be read/written
+      * \param pStreamData User-defined data to pass as a parameter to the stream's Open() method.
+      * \param pMode Deprecated/Unused.
+	  * \return True if opening is successful.
+	  */
+    virtual bool        Open(FbxStream* pStream, void* pStreamData, const char* pMode);
+
+	/** Closes a file, freeing its handle.
+	  * \return True if closing is successful.
+	  */
+    virtual bool        Close();
+
+    /** Seek to a specific position in the file, starting from either beginning, current position or end
+	  * \param pOffset Offset to seek to (advance the file position cursor) starting from pSeekPos
+      * \param pSeekPos Starting position from which to seek to.  Beginning, current position or end.
+	  */
+    virtual void		Seek(const FbxInt64 pOffset, const ESeekPos pSeekPos=eBegin);
+
+	/** Returns the position at which the file cursor currently is.  For example, will be ==0 for beginning and ==FileSize for end.
+	  * \return The position at which the file cursor currently is.
+	  */
+    virtual FbxInt64	Tell() const;
+
+	/** Read a part of the file into a buffer
+      * \param pDstBuf Pre-allocated buffer in which to read data
+      * \param pSize Size of the data chunk to be read in bytes
+	  * \return Number of bytes read.
+	  */
+    virtual	size_t		Read(void* pDstBuf, const size_t pSize);
+
+	/** Read a part of the file as a string into a buffer
+      * \param pDstBuf Pre-allocated buffer in which to read the string
+      * \param pDstSize Size of the data chunk to be read in characters
+      * \param pStopAtFirstWhiteSpace If true, will stop reading at first white space, otherwise it will stop at the first line feed (\n)
+	  * \return Pointer on the data read.  Equivalent to parameter pDstBuf
+	  */
+	virtual char*		ReadString(char* pDstBuf, const size_t pDstSize, bool pStopAtFirstWhiteSpace=false);
+
+	/** Write a buffer to an opened file
+      * \param pSrcBuf Pre-allocated buffer from which to write data
+      * \param pSize Size of the data chunk to be written in bytes
+	  * \return Number of bytes written.
+	  */
+    virtual size_t		Write(const void* pSrcBuf, const size_t pSize);
+
+	/** Write a formatted string to an opened file
+      * \param pFormat Pre-allocated format buffer from which to write data
+      * \param ... Variable number of arguments describing the values in the previous parameter. 
+	  * \return True if data was successfully written
+	  */
+    virtual bool		WriteFormat(const char* pFormat, ...);
+
+	/** Modify the size of a file. Null characters ('\0') are appended if the file is extended. 
+      * If the file is truncated, all data from the end of the shortened file to the original length of the file is lost.
+      * Please note that this function considers the current file cursor as the beginning of the file.
+      * It is therefore required to use Seek(0) prior to calling it if we want the size specified by the
+      * pSize parameter to be absolute.
+      * \param pSize New desired file size
+	  * \return True if file was successfully truncated
+	  */
+    virtual bool		Truncate(const FbxInt64 pSize);
+
+	/** Checks whether the current file cursor position is at the end of file.
+	  * \return True if the cursor is at the end of file, false otherwise.
+	  */
+    virtual bool		EndOfFile() const;
+
+	/** Gets the size of the currently opened file.
+	  * \return File size
+	  */
+	virtual FbxInt64	GetSize();
+
+    /** Unused function in this default implementation.  Must be implemented by memory files.       
+      * \param pMemPtr Unused
+	  * \param pSize Unused
+	  */
+	virtual void		GetMemoryFileInfo(void** pMemPtr, size_t pSize);
+
+	/** Checks whether the file is currently opened.
+	  * \return True if file is opened, false otherwise
+	  */
+    bool                IsOpen() const;
+
+	/** Checks whether the file is currently opened with a user-provided streaming interface instead of just the file name
+	  * \return True if file has been opened with a stream interface, false otherwise
+	  */
+    bool                IsStream() const;
+
+	/** Returns the full file path name, as provided when opening it.
+	  * \return File full path
+	  */
+    const char*			GetFilePathName() const;
+
+	/** Returns the mode with which the file was opened, when calling the Open() method.
+	  * \return Mode with which the file was opened
+	  */
+    EMode				GetFileMode() const;
+
+	/** Returns last encountered error when performing any operation on the file.
+	  * \return Last error code
+	  */
+    int                 GetLastError();
+
+	/** Resets the current error code and the end of file indicator of the opened file
+	  */
+    void                ClearError();
+
+protected:
+	FILE*				mFilePtr;
+    FbxStream*          mStreamPtr;
+	bool                mIsOpen;
+	bool                mIsStream;
+	EMode				mMode;
+	FbxString			mFileName;
+};
+
+class FBXSDK_DLL FbxFileUtils
+{
+public:
+	/** Delete a file from disk.
+	  * \param pFileName_UTF8 The file to be deleted.
+	  * \return True if delete is successful.
+	  */
+    static bool Delete(const char* pFileName_UTF8);
+
+	/** Rename a file on disk.
+	  * \param pFileName_UTF8 The file to be renamed.
+	  * \param pNewName_UTF8 The new file name upon rename.
+	  * \return True if rename is successful.
+	  */
+    static bool Rename(const char* pFileName_UTF8, const char* pNewName_UTF8);
+
+	/** Copy one file's content to another file (if the destination file not exist, it will be created).
+	  * \param pDestination_UTF8 The destination file path
+	  * \param pSource_UTF8 The source file path
+	  * \return Return true if copy is successfully.
+	  */
+	static bool Copy(const char* pDestination_UTF8, const char* pSource_UTF8);
+
+	//! Get given file's size.
+	static FbxInt64 Size(const char* pFilePath_UTF8);
+
+	/** Find if the specified file exist.
+	  * \param pFilePath_UTF8 The file path to test against.
+	  * \return Returns true if the file exist.
+	  */
+	static bool Exist(const char* pFilePath_UTF8);
+
+	/** Find if the specified file is in read-only mode.
+	  * \param pFilePath_UTF8 The file path to test against.
+	  * \return Returns true if the file is in read-only mode.
+	  */
+	static bool IsReadOnly(const char* pFilePath_UTF8);
+
+	// We return a KLong that in fact is a cast of a time_t.
+	//! Get given file's last date.
+	static FbxLong GetLastDate(const char* pPath_UTF8);
+
+	//! Set the given file's last date as the given date.
+	static bool SetLastDate(const char* pPath_UTF8, FbxLong pTime);
+
+	/** Get some content of a file.
+	  * \param pStr The content get from file.
+	  * \param pSize The size of content.
+	  * \param pStream The opened stream of file.
+	  */
+	static char* FGets(char* pStr, int pSize, FILE* pStream);
+};
+
+template<class T> inline const T FbxSwab(const T x)
+{
+	switch( sizeof(x) )
+	{
+		case 2:
+		{
+			FbxUInt8 t[2];
+			t[0] = ((FbxUInt8*)&x)[1];
+			t[1] = ((FbxUInt8*)&x)[0];
+			return *(T*)&t;
+		}
+
+		case 4:
+		{
+			FbxUInt8 t[4];
+			t[0] = ((FbxUInt8*)&x)[3];
+			t[1] = ((FbxUInt8*)&x)[2];
+			t[2] = ((FbxUInt8*)&x)[1];
+			t[3] = ((FbxUInt8*)&x)[0];
+			return *(T*)&t;
+		}
+
+		case 8:
+		{
+			FbxUInt8 t[8];
+			t[0] = ((FbxUInt8*)&x)[7];
+			t[1] = ((FbxUInt8*)&x)[6];
+			t[2] = ((FbxUInt8*)&x)[5];
+			t[3] = ((FbxUInt8*)&x)[4];
+			t[4] = ((FbxUInt8*)&x)[3];
+			t[5] = ((FbxUInt8*)&x)[2];
+			t[6] = ((FbxUInt8*)&x)[1];
+			t[7] = ((FbxUInt8*)&x)[0];
+			return *(T*)&t;
+		}
+
+		default:
+			return x;
+	}
+}
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_FILE_H_ */

+ 80 - 80
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxfolder.h

@@ -1,80 +1,80 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxfolder.h
-#ifndef _FBXSDK_CORE_BASE_FOLDER_H_
-#define _FBXSDK_CORE_BASE_FOLDER_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/core/base/fbxstring.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Class for iterating into file system folders and the items contained. */
-class FBXSDK_DLL FbxFolder
-{
-public:
-	//! The different entry type that can be found in folders.
-	enum EEntryType
-	{
-		eRegularEntry,	//!< Regular entry, such as file.
-		eFolderEntry	//!< Folder entry that potentially contain more files.
-	};
-
-	/** Open the specified folder for browsing its content.
-	* \param pFolderPath_UTF8 The folder path to open.
-	* \return True if the folder path was successfully open, false otherwise. */
-	bool Open(const char* pFolderPath_UTF8);
-
-	/** Get the next item in the folder.
-	* \return True if another item was found after the current one. */
-	bool Next();
-
-	/** Get the type of the current entry in the folder.
-	* \return The entry type. */
-	EEntryType GetEntryType() const;
-
-	/** Retrieve the name of the current entry in the folder.
-	* \return The name of the current entry. */
-	FbxString GetEntryName() const;
-
-	/** Retrieve the extension name of the current entry.
-	* \return The extension name of the current entry. */
-	char* GetEntryExtension() const;
-
-	/** Close the folder when done browsing its content. */
-	void Close();
-
-	/** Find out if the folder was successfully opened the last time Open was called.
-	* \return True if the folder is currently open. */
-	bool IsOpen() const;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxFolder();
-	~FbxFolder();
-
-private:
-	struct FolderImpl;
-	FolderImpl* mImpl;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_BASE_FOLDER_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxfolder.h
+#ifndef _FBXSDK_CORE_BASE_FOLDER_H_
+#define _FBXSDK_CORE_BASE_FOLDER_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/core/base/fbxstring.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Class for iterating into file system folders and the items contained. */
+class FBXSDK_DLL FbxFolder
+{
+public:
+	//! The different entry type that can be found in folders.
+	enum EEntryType
+	{
+		eRegularEntry,	//!< Regular entry, such as file.
+		eFolderEntry	//!< Folder entry that potentially contain more files.
+	};
+
+	/** Open the specified folder for browsing its content.
+	* \param pFolderPath_UTF8 The folder path to open.
+	* \return True if the folder path was successfully open, false otherwise. */
+	bool Open(const char* pFolderPath_UTF8);
+
+	/** Get the next item in the folder.
+	* \return True if another item was found after the current one. */
+	bool Next();
+
+	/** Get the type of the current entry in the folder.
+	* \return The entry type. */
+	EEntryType GetEntryType() const;
+
+	/** Retrieve the name of the current entry in the folder.
+	* \return The name of the current entry. */
+	FbxString GetEntryName() const;
+
+	/** Retrieve the extension name of the current entry.
+	* \return The extension name of the current entry. */
+	char* GetEntryExtension() const;
+
+	/** Close the folder when done browsing its content. */
+	void Close();
+
+	/** Find out if the folder was successfully opened the last time Open was called.
+	* \return True if the folder is currently open. */
+	bool IsOpen() const;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxFolder();
+	~FbxFolder();
+
+private:
+	struct FolderImpl;
+	FolderImpl* mImpl;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_BASE_FOLDER_H_ */

+ 411 - 411
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxhashmap.h

@@ -1,411 +1,411 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxhashmap.h
-#ifndef _FBXSDK_CORE_BASE_HASHMAP_H_
-#define _FBXSDK_CORE_BASE_HASHMAP_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxarray.h>
-#include <fbxsdk/core/base/fbxmap.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-template<class T> class FbxNoOpDestruct { public: static inline void DoIt(T&) {} };
-template<class T> class FbxPtrDestruct  { public: static inline void DoIt(T& v) { FbxDelete(v); v = NULL; } };
-
-//True if equal, false otherwise
-template<class T> class FbxDefaultComparator{ public: static inline bool CompareIt( const T& t1, const T& t2 ) { return t1 == t2; } };
-
-/** \brief This object represents a standard hash map.  You must provide the typename of KEY and VALUE as well
-    as the typename of the class that contains the hash function to use to hash values.   The hash class must
-    overload operator() and be built like this.
-    \code
-    class SimpleHash
-    {
-    public:
-        inline unsigned int operator() ( const int pKey ) const
-        {
-            return pKey;
-        }
-    };
-    \endcode
-  * \nosubgrouping
-  */
-template< typename KEY, typename VALUE, typename HASH, class Destruct = FbxNoOpDestruct<VALUE>, class Comparator = FbxDefaultComparator<KEY> >
-class FbxHashMap
-{
-public:
-	typedef KEY KeyType;
-	typedef VALUE ValueType;
-	typedef HASH HashFunctorType;
-
-private:
-
-	class ListItem
-	{
-	public:
-		ListItem* mNext;
-		ValueType mValue;
-		KeyType mKey;
-
-		ListItem()
-			:
-		mNext(NULL)
-		{
-		}
-
-        ~ListItem()
-        {
-            Destruct::DoIt(mValue);        
-        }
-	};
-
-public:
-    /**
-    Iterate through every element in a hash map.
-    */
-	class Iterator
-	{
-	public:
-
-		typedef ListItem ListItemType;
-		typedef FbxPair< KeyType, ValueType > KeyValuePair;
-
-        /**
-        Copy constructor
-        */
-		Iterator( const Iterator& pOther )
-			:
-			mMap( pOther.mMap ),
-			mBucketIndex( pOther.mBucketIndex ),
-			mCurrentItem( pOther.mCurrentItem )
-		{
-
-		}
-
-        /**
-        Destructor
-        */
-		~Iterator(){};
-
-        /**
-        Used to dereference an iterator and give it a behavior more similar to a pointer.
-        \return The KeyValuePair currently referenced by the iterator
-        */
-		KeyValuePair operator*() const
-		{
-			KeyValuePair lItem;
-
-			if( mCurrentItem )
-			{
-				lItem.mFirst = mCurrentItem->mKey;
-				lItem.mSecond = mCurrentItem->mValue;
-				return lItem;
-			}
-
-			FBX_ASSERT_NOW("Accessing out of bounds iterator");
-
-			return lItem;
-		}
-
-        /**
-        Advances the iterator to the next keyvaluepair in the hashmap.  It does not wrap around so 
-        advancing after reaching the last element will not point back to the first one.
-        */
-		void Next()
-		{
-			if( !mCurrentItem )
-				return;
-
-			if( mCurrentItem->mNext )
-			{
-				mCurrentItem = mCurrentItem->mNext;
-				return;
-			}
-			else
-			{
-				mBucketIndex++;
-				for( ; mBucketIndex < mMap->mBuckets.GetCount(); ++mBucketIndex )
-				{
-					if( mMap->mBuckets[ mBucketIndex ] )
-					{
-						mCurrentItem = mMap->mBuckets[ mBucketIndex ];
-						return;
-					}
-				}
-				
-				if( mBucketIndex >= mMap->mBuckets.GetCount() )
-				{
-					*this = mMap->End();
-					return;
-				}
-			}
-		}
-
-        /**
-        Check equivalence between two iterators.  There are 3 conditions for equivalence between 2 iterators:
-        1) Item being referenced by the iterator must be equivalent
-        2) They must point at the same index
-        3) They must point on the same map
-        \return true if both iterators are equal, false otherwise
-        */
-		bool operator==( const Iterator& pOther ) const
-		{
-			return	mCurrentItem == pOther.mCurrentItem && 
-					mBucketIndex == pOther.mBucketIndex &&
-					mMap == pOther.mMap;
-		}
-
-        /**
-        Check inequivalence between 2 iterators.  Please see operator== for more information.
-        \return true if both iterators are NOT equal, false if they are
-        */
-		bool operator!=( const Iterator& pOther ) const
-		{
-			return !(*this == pOther);
-		}
-
-		/**
-        Assign the current iterator to the one on the right hand side of the operator.  After assignment they will
-        reference the same object, at the same index, in the same map.
-        \return The new iterator
-        */
-		Iterator& operator=( const Iterator& pOther )
-		{
-			this->mBucketIndex = pOther.mBucketIndex;
-			this->mMap = pOther.mMap;
-			this->mCurrentItem = pOther.mCurrentItem;
-			return *this;
-		}
-
-    private:
-		const FbxHashMap* mMap;		
-
-		int mBucketIndex;
-		ListItemType* mCurrentItem;
-		
-		Iterator(const FbxHashMap* pMap, int pBucketIndex, ListItemType* pCurrentItem)
-			:
-			mMap( pMap ),
-			mBucketIndex(pBucketIndex),
-			mCurrentItem(pCurrentItem)
-		{
-
-		}
-
-		friend class FbxHashMap;
-	};
-	
-	/**
-    Construct a FbxHashMap with an user-defined maximum number of elements.
-    \param pBucketSize Initial maximum number of elements.
-    */
-	FbxHashMap( int pBucketSize )
-	{
-		mBuckets.Resize( pBucketSize );
-	}
-
-	/**
-    Construct a FbxHashMap with the default maximum number of elements (30)
-    */
-    FbxHashMap()
-    {
-        mBuckets.Resize(30);
-    }
-
-	/**
-    Clear all elements in the hash map before destroying itself
-    */
-	~FbxHashMap()
-	{
-		Clear();
-		mBuckets.Clear();
-	}
-
-	/**
-    Calls operator delete on all elements of the hashmap, de-allocating all memory and destroying them
-    */
-	void Clear()
-	{
-		for( int i = 0; i < mBuckets.GetCount(); ++i)
-		{
-			if( mBuckets[i] )
-			{
-				ListItem* lNext = mBuckets[i]->mNext;
-				while( lNext )
-				{
-					ListItem* lNextNext = lNext->mNext;
-					FbxDelete(lNext);
-					lNext = lNextNext;
-				}
-
-				FbxDelete(mBuckets[i]);
-				mBuckets[i] = NULL;
-			}
-		}
-	}
-
-	/**
-    Find an element in the hashmap.  If no element exist with the specified key, returns an iterator pointing on the
-    end of the map (not an actual KeyValuePair).
-    \param pKey The value of the key corresponding to the element
-    \return An Iterator referencing that element
-    */
-	const Iterator Find( const KeyType& pKey ) const
-	{
-		unsigned int lIndex = mHashFunctor(pKey);
-		lIndex = lIndex % mBuckets.GetCount();
-		ListItem* lItem = mBuckets[lIndex];
-		while( lItem )
-		{
-            if( Comparator::CompareIt( lItem->mKey, pKey ) )
-			{
-				Iterator lIt( this, lIndex, lItem );
-				return lIt;
-			}
-			lItem = lItem->mNext;
-		}
-		
-		return End();
-	}
-	
-	/**
-    Remove an element in the hashmap.
-    \param pKey The key value of the element to remove
-    \return The value of the element that was just deleted.  If the element does not exist, a value created with its default constructor will be returned
-    */
-	VALUE Remove( const KEY& pKey )
-    {
-		unsigned int lIndex = mHashFunctor(pKey);
-		lIndex = lIndex % mBuckets.GetCount();
-		ListItem* lItem = mBuckets.GetAt(lIndex);
-        ListItem* lLastItem = NULL;
-		
-        while( lItem )
-		{
-			if( lItem->mKey == pKey )
-			{
-                if( lLastItem )
-                    lLastItem->mNext = lItem->mNext;
-
-                if( mBuckets.GetAt(lIndex) == lItem ) 
-                    mBuckets.SetAt(lIndex, lItem->mNext );
-
-                VALUE lValue = lItem->mValue;
-                FbxDelete(lItem);
-                
-                return lValue;
-			}
-
-            lLastItem = lItem;
-			lItem = lItem->mNext;
-		}
-		
-        return VALUE();
-    }
-
-    /** Add or retrieve a KeyValuePair from the Hashmap.  If there is already an entry in the map for an element
-    with key value specified in parameter, the value will be returned.  Otherwise, a new entry will be created
-    with this key value and the default value for ValueType will be returned.  It can be modified using the 
-    assignment operator
-    \param pKey The key for which to retrieve/add a value.
-    \return Value of the element referenced by the key specified in parameter.
-    */
-	ValueType& operator[]( const KeyType& pKey )
-	{
-        unsigned int lIndex = 0;
-		Iterator lIt = InternalFind( pKey, lIndex);
-		if( lIt != End() )
-		{
-			return lIt.mCurrentItem->mValue;
-		}
-
-		lIndex = lIndex % mBuckets.GetCount();
-		ListItem* lItem = FbxNew< ListItem >();
-		lItem->mNext = NULL;
-		lItem->mKey = pKey;
-
-		if( !mBuckets.GetAt(lIndex) )
-		{
-			mBuckets.SetAt(lIndex, lItem);
-		}
-		else
-		{
-			lItem->mNext = mBuckets.GetAt(lIndex);
-			mBuckets.SetAt(lIndex, lItem);
-		}
-
-		return lItem->mValue;
-	}
-
-    /** Returns an iterator pointing on the first non-null element in the map
-    \return An iterator pointing on the first non-null element in the map.
-    */
-	Iterator Start() const
-	{
-		for( int i = 0; i < mBuckets.GetCount(); ++i )
-		{
-			if( mBuckets[i] )
-			{
-				Iterator lIt( this, i, mBuckets[i] );
-				return lIt;
-			}
-		}
-
-		return End();
-	}
-
-    /** Returns an iterator pointing on the last element in the map.  This is not an actual KeyValuePair but 
-    * but an iterator pointing on a null element. 
-    \return Iterator pointing on a null value at the end of the map
-    */
-	Iterator End() const
-	{
-		Iterator lIt( this, 0, NULL );
-		return lIt;
-	}
-
-private:
-
-    // Avoid calculating the hashvalue twice
-	const Iterator InternalFind( const KeyType& pKey, unsigned int& pOutCalculatedIndex ) const
-	{
-		pOutCalculatedIndex = mHashFunctor(pKey);
-		unsigned int lIndex = pOutCalculatedIndex % mBuckets.GetCount();
-		ListItem* lItem = mBuckets[lIndex];
-		while( lItem )
-		{
-            if( Comparator::CompareIt( lItem->mKey, pKey ) )
-			{
-				Iterator lIt( this, lIndex, lItem );
-				return lIt;
-			}
-			lItem = lItem->mNext;
-		}
-		
-		return End();
-	}
-
-
-	// not implemented yet!
-	FbxHashMap( const FbxHashMap& pOther ) {};
-
-	FbxArray<ListItem*> mBuckets;
-	HashFunctorType mHashFunctor;
-
-	friend class Iterator;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_HASHMAP_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxhashmap.h
+#ifndef _FBXSDK_CORE_BASE_HASHMAP_H_
+#define _FBXSDK_CORE_BASE_HASHMAP_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxarray.h>
+#include <fbxsdk/core/base/fbxmap.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+template<class T> class FbxNoOpDestruct { public: static inline void DoIt(T&) {} };
+template<class T> class FbxPtrDestruct  { public: static inline void DoIt(T& v) { FbxDelete(v); v = NULL; } };
+
+//True if equal, false otherwise
+template<class T> class FbxDefaultComparator{ public: static inline bool CompareIt( const T& t1, const T& t2 ) { return t1 == t2; } };
+
+/** \brief This object represents a standard hash map.  You must provide the typename of KEY and VALUE as well
+    as the typename of the class that contains the hash function to use to hash values.   The hash class must
+    overload operator() and be built like this.
+    \code
+    class SimpleHash
+    {
+    public:
+        inline unsigned int operator() ( const int pKey ) const
+        {
+            return pKey;
+        }
+    };
+    \endcode
+  * \nosubgrouping
+  */
+template< typename KEY, typename VALUE, typename HASH, class Destruct = FbxNoOpDestruct<VALUE>, class Comparator = FbxDefaultComparator<KEY> >
+class FbxHashMap
+{
+public:
+	typedef KEY KeyType;
+	typedef VALUE ValueType;
+	typedef HASH HashFunctorType;
+
+private:
+
+	class ListItem
+	{
+	public:
+		ListItem* mNext;
+		ValueType mValue;
+		KeyType mKey;
+
+		ListItem()
+			:
+		mNext(NULL)
+		{
+		}
+
+        ~ListItem()
+        {
+            Destruct::DoIt(mValue);        
+        }
+	};
+
+public:
+    /**
+    Iterate through every element in a hash map.
+    */
+	class Iterator
+	{
+	public:
+
+		typedef ListItem ListItemType;
+		typedef FbxPair< KeyType, ValueType > KeyValuePair;
+
+        /**
+        Copy constructor
+        */
+		Iterator( const Iterator& pOther )
+			:
+			mMap( pOther.mMap ),
+			mBucketIndex( pOther.mBucketIndex ),
+			mCurrentItem( pOther.mCurrentItem )
+		{
+
+		}
+
+        /**
+        Destructor
+        */
+		~Iterator(){};
+
+        /**
+        Used to dereference an iterator and give it a behavior more similar to a pointer.
+        \return The KeyValuePair currently referenced by the iterator
+        */
+		KeyValuePair operator*() const
+		{
+			KeyValuePair lItem;
+
+			if( mCurrentItem )
+			{
+				lItem.mFirst = mCurrentItem->mKey;
+				lItem.mSecond = mCurrentItem->mValue;
+				return lItem;
+			}
+
+			FBX_ASSERT_NOW("Accessing out of bounds iterator");
+
+			return lItem;
+		}
+
+        /**
+        Advances the iterator to the next keyvaluepair in the hashmap.  It does not wrap around so 
+        advancing after reaching the last element will not point back to the first one.
+        */
+		void Next()
+		{
+			if( !mCurrentItem )
+				return;
+
+			if( mCurrentItem->mNext )
+			{
+				mCurrentItem = mCurrentItem->mNext;
+				return;
+			}
+			else
+			{
+				mBucketIndex++;
+				for( ; mBucketIndex < mMap->mBuckets.GetCount(); ++mBucketIndex )
+				{
+					if( mMap->mBuckets[ mBucketIndex ] )
+					{
+						mCurrentItem = mMap->mBuckets[ mBucketIndex ];
+						return;
+					}
+				}
+				
+				if( mBucketIndex >= mMap->mBuckets.GetCount() )
+				{
+					*this = mMap->End();
+					return;
+				}
+			}
+		}
+
+        /**
+        Check equivalence between two iterators.  There are 3 conditions for equivalence between 2 iterators:
+        1) Item being referenced by the iterator must be equivalent
+        2) They must point at the same index
+        3) They must point on the same map
+        \return true if both iterators are equal, false otherwise
+        */
+		bool operator==( const Iterator& pOther ) const
+		{
+			return	mCurrentItem == pOther.mCurrentItem && 
+					mBucketIndex == pOther.mBucketIndex &&
+					mMap == pOther.mMap;
+		}
+
+        /**
+        Check inequivalence between 2 iterators.  Please see operator== for more information.
+        \return true if both iterators are NOT equal, false if they are
+        */
+		bool operator!=( const Iterator& pOther ) const
+		{
+			return !(*this == pOther);
+		}
+
+		/**
+        Assign the current iterator to the one on the right hand side of the operator.  After assignment they will
+        reference the same object, at the same index, in the same map.
+        \return The new iterator
+        */
+		Iterator& operator=( const Iterator& pOther )
+		{
+			this->mBucketIndex = pOther.mBucketIndex;
+			this->mMap = pOther.mMap;
+			this->mCurrentItem = pOther.mCurrentItem;
+			return *this;
+		}
+
+    private:
+		const FbxHashMap* mMap;		
+
+		int mBucketIndex;
+		ListItemType* mCurrentItem;
+		
+		Iterator(const FbxHashMap* pMap, int pBucketIndex, ListItemType* pCurrentItem)
+			:
+			mMap( pMap ),
+			mBucketIndex(pBucketIndex),
+			mCurrentItem(pCurrentItem)
+		{
+
+		}
+
+		friend class FbxHashMap;
+	};
+	
+	/**
+    Construct a FbxHashMap with an user-defined maximum number of elements.
+    \param pBucketSize Initial maximum number of elements.
+    */
+	FbxHashMap( int pBucketSize )
+	{
+		mBuckets.Resize( pBucketSize );
+	}
+
+	/**
+    Construct a FbxHashMap with the default maximum number of elements (30)
+    */
+    FbxHashMap()
+    {
+        mBuckets.Resize(30);
+    }
+
+	/**
+    Clear all elements in the hash map before destroying itself
+    */
+	~FbxHashMap()
+	{
+		Clear();
+		mBuckets.Clear();
+	}
+
+	/**
+    Calls operator delete on all elements of the hashmap, de-allocating all memory and destroying them
+    */
+	void Clear()
+	{
+		for( int i = 0; i < mBuckets.GetCount(); ++i)
+		{
+			if( mBuckets[i] )
+			{
+				ListItem* lNext = mBuckets[i]->mNext;
+				while( lNext )
+				{
+					ListItem* lNextNext = lNext->mNext;
+					FbxDelete(lNext);
+					lNext = lNextNext;
+				}
+
+				FbxDelete(mBuckets[i]);
+				mBuckets[i] = NULL;
+			}
+		}
+	}
+
+	/**
+    Find an element in the hashmap.  If no element exist with the specified key, returns an iterator pointing on the
+    end of the map (not an actual KeyValuePair).
+    \param pKey The value of the key corresponding to the element
+    \return An Iterator referencing that element
+    */
+	const Iterator Find( const KeyType& pKey ) const
+	{
+		unsigned int lIndex = mHashFunctor(pKey);
+		lIndex = lIndex % mBuckets.GetCount();
+		ListItem* lItem = mBuckets[lIndex];
+		while( lItem )
+		{
+            if( Comparator::CompareIt( lItem->mKey, pKey ) )
+			{
+				Iterator lIt( this, lIndex, lItem );
+				return lIt;
+			}
+			lItem = lItem->mNext;
+		}
+		
+		return End();
+	}
+	
+	/**
+    Remove an element in the hashmap.
+    \param pKey The key value of the element to remove
+    \return The value of the element that was just deleted.  If the element does not exist, a value created with its default constructor will be returned
+    */
+	VALUE Remove( const KEY& pKey )
+    {
+		unsigned int lIndex = mHashFunctor(pKey);
+		lIndex = lIndex % mBuckets.GetCount();
+		ListItem* lItem = mBuckets.GetAt(lIndex);
+        ListItem* lLastItem = NULL;
+		
+        while( lItem )
+		{
+			if( lItem->mKey == pKey )
+			{
+                if( lLastItem )
+                    lLastItem->mNext = lItem->mNext;
+
+                if( mBuckets.GetAt(lIndex) == lItem ) 
+                    mBuckets.SetAt(lIndex, lItem->mNext );
+
+                VALUE lValue = lItem->mValue;
+                FbxDelete(lItem);
+                
+                return lValue;
+			}
+
+            lLastItem = lItem;
+			lItem = lItem->mNext;
+		}
+		
+        return VALUE();
+    }
+
+    /** Add or retrieve a KeyValuePair from the Hashmap.  If there is already an entry in the map for an element
+    with key value specified in parameter, the value will be returned.  Otherwise, a new entry will be created
+    with this key value and the default value for ValueType will be returned.  It can be modified using the 
+    assignment operator
+    \param pKey The key for which to retrieve/add a value.
+    \return Value of the element referenced by the key specified in parameter.
+    */
+	ValueType& operator[]( const KeyType& pKey )
+	{
+        unsigned int lIndex = 0;
+		Iterator lIt = InternalFind( pKey, lIndex);
+		if( lIt != End() )
+		{
+			return lIt.mCurrentItem->mValue;
+		}
+
+		lIndex = lIndex % mBuckets.GetCount();
+		ListItem* lItem = FbxNew< ListItem >();
+		lItem->mNext = NULL;
+		lItem->mKey = pKey;
+
+		if( !mBuckets.GetAt(lIndex) )
+		{
+			mBuckets.SetAt(lIndex, lItem);
+		}
+		else
+		{
+			lItem->mNext = mBuckets.GetAt(lIndex);
+			mBuckets.SetAt(lIndex, lItem);
+		}
+
+		return lItem->mValue;
+	}
+
+    /** Returns an iterator pointing on the first non-null element in the map
+    \return An iterator pointing on the first non-null element in the map.
+    */
+	Iterator Start() const
+	{
+		for( int i = 0; i < mBuckets.GetCount(); ++i )
+		{
+			if( mBuckets[i] )
+			{
+				Iterator lIt( this, i, mBuckets[i] );
+				return lIt;
+			}
+		}
+
+		return End();
+	}
+
+    /** Returns an iterator pointing on the last element in the map.  This is not an actual KeyValuePair but 
+    * but an iterator pointing on a null element. 
+    \return Iterator pointing on a null value at the end of the map
+    */
+	Iterator End() const
+	{
+		Iterator lIt( this, 0, NULL );
+		return lIt;
+	}
+
+private:
+
+    // Avoid calculating the hashvalue twice
+	const Iterator InternalFind( const KeyType& pKey, unsigned int& pOutCalculatedIndex ) const
+	{
+		pOutCalculatedIndex = mHashFunctor(pKey);
+		unsigned int lIndex = pOutCalculatedIndex % mBuckets.GetCount();
+		ListItem* lItem = mBuckets[lIndex];
+		while( lItem )
+		{
+            if( Comparator::CompareIt( lItem->mKey, pKey ) )
+			{
+				Iterator lIt( this, lIndex, lItem );
+				return lIt;
+			}
+			lItem = lItem->mNext;
+		}
+		
+		return End();
+	}
+
+
+	// not implemented yet!
+	FbxHashMap( const FbxHashMap& pOther ) {};
+
+	FbxArray<ListItem*> mBuckets;
+	HashFunctorType mHashFunctor;
+
+	friend class Iterator;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_HASHMAP_H_ */

+ 262 - 262
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxintrusivelist.h

@@ -1,262 +1,262 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxintrusivelist.h
-#ifndef _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_
-#define _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-#define FBXSDK_INTRUSIVE_LIST_NODE(Class, NodeCount)\
-    public: inline FbxListNode<Class>& GetListNode(int index = 0){ return this->mNode[index]; }\
-    private: FbxListNode<Class> mNode[NodeCount];
-
-template <typename T> class FbxListNode
-{
-    typedef FbxListNode<T> NodeT; 
-
-public:
-	explicit FbxListNode(T* pData = 0):mNext(0),mPrev(0),mData(pData){}
-	~FbxListNode(){ Disconnect(); }
-
-	void Disconnect()
-	{
-		if ( mPrev != 0 )
-			mPrev->mNext = mNext;
-
-		if ( mNext != 0 )
-			mNext->mPrev = mPrev;
-
-		mPrev = mNext = 0;
-	}
-
-	NodeT*	mNext;
-	NodeT*	mPrev;
-	T*		mData;
-};
-
-//-----------------------------------------------------------------
-// template arg T: Type listed
-//          arg NodeIndex: If an object listed has  multiple list node, which
-//                         index corresponds to the right node
-template <typename T, int NodeIndex=0> class FbxIntrusiveList
-{
-public:
-    typedef T         allocator_type;
-    typedef T         value_type;
-    typedef T&        reference;
-    typedef const T&  const_reference;
-    typedef T*        pointer;
-    typedef const T*  const_pointer;
-
-    typedef FbxListNode<T> NodeT;
-
-    // Construction / Destruction
-    FbxIntrusiveList():mHead(0)
-    {
-        mHead.mNext = mHead.mPrev = &mHead;
-    }
-    ~FbxIntrusiveList()
-    {
-        while(!Empty())
-            Begin().Get()->Disconnect();  // LINUXNote:  should be Erase(Begin()); but there's an issue with gcc 4.2
-    };
-
-    // true if the list's size is 0.
-    bool Empty() const
-    {
-        return ((mHead.mNext==&mHead)&&(mHead.mPrev==&mHead));
-    }
-
-    // Back Insertion Sequence  Inserts a new element at the end.  
-    void PushBack(T& pElement)
-    {
-        NodeT* pNode = &pElement.GetListNode(NodeIndex);
-        pNode->mData = &pElement;
-
-        if (Empty())
-        {
-            pNode->mNext = &mHead;
-            pNode->mPrev = &mHead;
-            mHead.mNext = pNode;
-            mHead.mPrev = pNode;
-        }
-        else
-        {
-            pNode->mNext = &mHead;
-            pNode->mPrev = mHead.mPrev;
-
-            pNode->mPrev->mNext = pNode;
-            mHead.mPrev = pNode;
-        }
-    }
-
-    void PushFront(T& pElement)
-    {
-        NodeT* pNode = &pElement.GetListNode(NodeIndex);
-        pNode->mData = &pElement;
-
-        if (Empty())
-        {
-            pNode->mNext = &mHead;
-            pNode->mPrev = &mHead;
-            mHead.mNext = pNode;
-            mHead.mPrev = pNode;
-        }
-        else
-        {
-            pNode->mNext = mHead.mNext;
-            pNode->mPrev = &mHead;
-
-            pNode->mNext->mPrev = pNode;
-            mHead.mNext = pNode;
-        }
-    }
-
-    void PopFront()
-    {
-        iterator begin = Begin();
-        Erase(begin);
-    }
-
-    void PopBack()
-    {
-        Erase(--(End()));
-    }
-
-public:
-    class IntrusiveListIterator
-    {
-    public:
-        explicit IntrusiveListIterator(NodeT* ptr=0):mPtr(ptr){}
-
-        // pre-increment
-        IntrusiveListIterator& operator++()
-        {
-            mPtr = mPtr->mNext;return (*this);
-        }
-        // post-increment
-        const IntrusiveListIterator operator++(int)
-        {
-            IntrusiveListIterator temp = *this;
-            ++*this;
-            return (temp);
-        }
-        // pre-decrement
-        IntrusiveListIterator& operator--()
-        {
-            mPtr = mPtr->mPrev;return *this;
-        }
-        // post-decrement
-        const IntrusiveListIterator operator--(int)
-        {
-            IntrusiveListIterator temp = *this;
-            --*this;
-            return (temp);
-        }
-        IntrusiveListIterator& operator=(const IntrusiveListIterator &other){mPtr = other.mPtr; return *this;}
-
-        reference operator*() const { return *(mPtr->mData); }
-        pointer operator->() const { return (&**this); }
-        bool operator==(const IntrusiveListIterator& other)const{ return mPtr==other.mPtr; } 
-        bool operator!=(const IntrusiveListIterator& other)const{ return !(*this == other); } 
-
-        inline NodeT* Get()const { return mPtr; }
-
-    private:
-        NodeT* mPtr;
-    };
-
-    class  IntrusiveListConstIterator
-    {
-    public:
-        explicit IntrusiveListConstIterator(const NodeT* ptr=0):mPtr(ptr){}
-
-       // pre-increment
-        IntrusiveListConstIterator& operator++()
-        {
-            mPtr = mPtr->mNext;return (*this);
-        }
-        // post-increment
-        const IntrusiveListConstIterator operator++(int)
-        {
-            IntrusiveListConstIterator temp = *this;
-            ++*this;
-            return (temp);
-        }
-        // pre-decrement
-        IntrusiveListConstIterator& operator--()
-        {
-            mPtr = mPtr->mPrev;return *this;
-        }
-        // post-decrement
-        const IntrusiveListConstIterator operator--(int)
-        {
-            IntrusiveListConstIterator temp = *this;
-            --*this;
-            return (temp);
-        }
-        IntrusiveListConstIterator& operator=(const IntrusiveListConstIterator &other){mPtr = other.mPtr; return *this;}
-
-        const_reference operator*() const { return *(mPtr->mData); }
-        const_pointer operator->() const { return (&**this); }
-        bool operator==(const IntrusiveListConstIterator& other)const{ return mPtr==other.mPtr; } 
-        bool operator!=(const IntrusiveListConstIterator& other)const{ return !(*this == other); } 
-
-        inline const NodeT* Get()const { return mPtr; }
-
-    private:
-        mutable const NodeT* mPtr;
-    };
-
-    // --- Iterator definitions ---
-    typedef IntrusiveListIterator iterator;
-    typedef IntrusiveListConstIterator const_iterator;
-
-    // iterator support
-    inline iterator Begin() { return iterator(mHead.mNext); }
-    inline const_iterator Begin() const { return const_iterator(mHead.mNext); }
-    inline iterator End() { return iterator(&mHead); }
-    inline const_iterator End() const { return const_iterator(&mHead); }
-
-    // Because there is no real use, for the reverse iterators, 
-    // they have not been implemented. 
-
-    reference Front(){return (*Begin());}
-    const_reference Front() const { return (*Begin()); }
-    reference Back(){ return (*(--End())); }
-    const_reference Back() const{ return (*(--End())); }
-
-    iterator& Erase(iterator& it)
-    {
-        it.Get()->Disconnect();
-        return (++it);
-    }
-private:
-    NodeT mHead;
-
-    // Not copyable
-    FbxIntrusiveList(const FbxIntrusiveList&);
-    FbxIntrusiveList& operator=(const FbxIntrusiveList& Right){return (*this);}
-};
-
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxintrusivelist.h
+#ifndef _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_
+#define _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+#define FBXSDK_INTRUSIVE_LIST_NODE(Class, NodeCount)\
+    public: inline FbxListNode<Class>& GetListNode(int index = 0){ return this->mNode[index]; }\
+    private: FbxListNode<Class> mNode[NodeCount];
+
+template <typename T> class FbxListNode
+{
+    typedef FbxListNode<T> NodeT; 
+
+public:
+	explicit FbxListNode(T* pData = 0):mNext(0),mPrev(0),mData(pData){}
+	~FbxListNode(){ Disconnect(); }
+
+	void Disconnect()
+	{
+		if ( mPrev != 0 )
+			mPrev->mNext = mNext;
+
+		if ( mNext != 0 )
+			mNext->mPrev = mPrev;
+
+		mPrev = mNext = 0;
+	}
+
+	NodeT*	mNext;
+	NodeT*	mPrev;
+	T*		mData;
+};
+
+//-----------------------------------------------------------------
+// template arg T: Type listed
+//          arg NodeIndex: If an object listed has  multiple list node, which
+//                         index corresponds to the right node
+template <typename T, int NodeIndex=0> class FbxIntrusiveList
+{
+public:
+    typedef T         allocator_type;
+    typedef T         value_type;
+    typedef T&        reference;
+    typedef const T&  const_reference;
+    typedef T*        pointer;
+    typedef const T*  const_pointer;
+
+    typedef FbxListNode<T> NodeT;
+
+    // Construction / Destruction
+    FbxIntrusiveList():mHead(0)
+    {
+        mHead.mNext = mHead.mPrev = &mHead;
+    }
+    ~FbxIntrusiveList()
+    {
+        while(!Empty())
+            Begin().Get()->Disconnect();  // LINUXNote:  should be Erase(Begin()); but there's an issue with gcc 4.2
+    };
+
+    // true if the list's size is 0.
+    bool Empty() const
+    {
+        return ((mHead.mNext==&mHead)&&(mHead.mPrev==&mHead));
+    }
+
+    // Back Insertion Sequence  Inserts a new element at the end.  
+    void PushBack(T& pElement)
+    {
+        NodeT* pNode = &pElement.GetListNode(NodeIndex);
+        pNode->mData = &pElement;
+
+        if (Empty())
+        {
+            pNode->mNext = &mHead;
+            pNode->mPrev = &mHead;
+            mHead.mNext = pNode;
+            mHead.mPrev = pNode;
+        }
+        else
+        {
+            pNode->mNext = &mHead;
+            pNode->mPrev = mHead.mPrev;
+
+            pNode->mPrev->mNext = pNode;
+            mHead.mPrev = pNode;
+        }
+    }
+
+    void PushFront(T& pElement)
+    {
+        NodeT* pNode = &pElement.GetListNode(NodeIndex);
+        pNode->mData = &pElement;
+
+        if (Empty())
+        {
+            pNode->mNext = &mHead;
+            pNode->mPrev = &mHead;
+            mHead.mNext = pNode;
+            mHead.mPrev = pNode;
+        }
+        else
+        {
+            pNode->mNext = mHead.mNext;
+            pNode->mPrev = &mHead;
+
+            pNode->mNext->mPrev = pNode;
+            mHead.mNext = pNode;
+        }
+    }
+
+    void PopFront()
+    {
+        iterator begin = Begin();
+        Erase(begin);
+    }
+
+    void PopBack()
+    {
+        Erase(--(End()));
+    }
+
+public:
+    class IntrusiveListIterator
+    {
+    public:
+        explicit IntrusiveListIterator(NodeT* ptr=0):mPtr(ptr){}
+
+        // pre-increment
+        IntrusiveListIterator& operator++()
+        {
+            mPtr = mPtr->mNext;return (*this);
+        }
+        // post-increment
+        const IntrusiveListIterator operator++(int)
+        {
+            IntrusiveListIterator temp = *this;
+            ++*this;
+            return (temp);
+        }
+        // pre-decrement
+        IntrusiveListIterator& operator--()
+        {
+            mPtr = mPtr->mPrev;return *this;
+        }
+        // post-decrement
+        const IntrusiveListIterator operator--(int)
+        {
+            IntrusiveListIterator temp = *this;
+            --*this;
+            return (temp);
+        }
+        IntrusiveListIterator& operator=(const IntrusiveListIterator &other){mPtr = other.mPtr; return *this;}
+
+        reference operator*() const { return *(mPtr->mData); }
+        pointer operator->() const { return (&**this); }
+        bool operator==(const IntrusiveListIterator& other)const{ return mPtr==other.mPtr; } 
+        bool operator!=(const IntrusiveListIterator& other)const{ return !(*this == other); } 
+
+        inline NodeT* Get()const { return mPtr; }
+
+    private:
+        NodeT* mPtr;
+    };
+
+    class  IntrusiveListConstIterator
+    {
+    public:
+        explicit IntrusiveListConstIterator(const NodeT* ptr=0):mPtr(ptr){}
+
+       // pre-increment
+        IntrusiveListConstIterator& operator++()
+        {
+            mPtr = mPtr->mNext;return (*this);
+        }
+        // post-increment
+        const IntrusiveListConstIterator operator++(int)
+        {
+            IntrusiveListConstIterator temp = *this;
+            ++*this;
+            return (temp);
+        }
+        // pre-decrement
+        IntrusiveListConstIterator& operator--()
+        {
+            mPtr = mPtr->mPrev;return *this;
+        }
+        // post-decrement
+        const IntrusiveListConstIterator operator--(int)
+        {
+            IntrusiveListConstIterator temp = *this;
+            --*this;
+            return (temp);
+        }
+        IntrusiveListConstIterator& operator=(const IntrusiveListConstIterator &other){mPtr = other.mPtr; return *this;}
+
+        const_reference operator*() const { return *(mPtr->mData); }
+        const_pointer operator->() const { return (&**this); }
+        bool operator==(const IntrusiveListConstIterator& other)const{ return mPtr==other.mPtr; } 
+        bool operator!=(const IntrusiveListConstIterator& other)const{ return !(*this == other); } 
+
+        inline const NodeT* Get()const { return mPtr; }
+
+    private:
+        mutable const NodeT* mPtr;
+    };
+
+    // --- Iterator definitions ---
+    typedef IntrusiveListIterator iterator;
+    typedef IntrusiveListConstIterator const_iterator;
+
+    // iterator support
+    inline iterator Begin() { return iterator(mHead.mNext); }
+    inline const_iterator Begin() const { return const_iterator(mHead.mNext); }
+    inline iterator End() { return iterator(&mHead); }
+    inline const_iterator End() const { return const_iterator(&mHead); }
+
+    // Because there is no real use, for the reverse iterators, 
+    // they have not been implemented. 
+
+    reference Front(){return (*Begin());}
+    const_reference Front() const { return (*Begin()); }
+    reference Back(){ return (*(--End())); }
+    const_reference Back() const{ return (*(--End())); }
+
+    iterator& Erase(iterator& it)
+    {
+        it.Get()->Disconnect();
+        return (++it);
+    }
+private:
+    NodeT mHead;
+
+    // Not copyable
+    FbxIntrusiveList(const FbxIntrusiveList&);
+    FbxIntrusiveList& operator=(const FbxIntrusiveList& Right){return (*this);}
+};
+
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_INTRUSIVE_LIST_H_ */

+ 408 - 408
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxmap.h

@@ -1,408 +1,408 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxmap.h
-#ifndef _FBXSDK_CORE_BASE_MAP_H_
-#define _FBXSDK_CORE_BASE_MAP_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxstring.h>
-#include <fbxsdk/core/base/fbxredblacktree.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxObject;
-
-/** Default compare functor for FbxMap and FbxSet, which assumes operator < is defined.
-Here is examples of different compare class implementations:
-With Key = int
-\code
-class IntCompare
-{
-    inline int operator()(int pKeyA, int pKeyB) const
-    {
-        return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
-    }
-};
-\endcode
-With Key = Class
-\code
-class ClassCompare
-{
-	inline int operator()(const Class& pKeyA, const Class& pKeyB) const
-	{
-		return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
-	}
-};
-\endcode
-With Key = char*
-\code
-class StrCompare
-{
-	inline int operator()(const char* pKeyA, const char* pKeyB) const
-	{
-		return strcmp(pKeyA, pKeyB);
-	}
-};
-\endcode
-*/
-template <typename Type> struct FbxLessCompare
-{
-    inline int operator()(const Type& pLeft, const Type& pRight) const
-    {
-        return (pLeft < pRight) ? -1 : ((pRight < pLeft) ? 1 : 0);
-    }
-};
-
-/** This class implements an efficient map based on key comparison, which stores key-value pairs.
-It executes insertion, deletion and query operations in O(log(n)) time. */
-template <typename Key, typename Type, typename Compare=FbxLessCompare<Key>, typename Allocator=FbxBaseAllocator> class FbxMap
-{
-protected:
-	//! This class defines the key-value pairs used by the map.
-	class KeyValuePair : private FbxPair<const Key, Type>
-	{
-	/*****************************************************************************************************************************
-	** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-	*****************************************************************************************************************************/
-	#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	public:
-		typedef const Key	KeyType;
-		typedef const Key	ConstKeyType;
-		typedef Type		ValueType;
-		typedef const Type	ConstValueType;
-
-		KeyValuePair(const Key& pFirst, const Type& pSecond) : FbxPair<const Key, Type>(pFirst, pSecond){}
-		ConstKeyType& GetKey() const { return this->mFirst; }
-		KeyType& GetKey(){ return this->mFirst; }
-		ConstValueType& GetValue() const { return this->mSecond; }
-		ValueType& GetValue(){ return this->mSecond; }
-	#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-	};
-
-	//! Declaration of the storage type used by the map.
-	typedef FbxRedBlackTree<KeyValuePair, Compare, Allocator> StorageType;
-
-public:
-	typedef Type									ValueType;
-	typedef Key										KeyType;
-	typedef typename StorageType::RecordType		RecordType;
-	typedef typename StorageType::IteratorType		Iterator;
-	typedef typename StorageType::ConstIteratorType	ConstIterator;
-
-	/** Preallocate memory.
-	* \param pRecordCount The number of elements. */
-	inline void Reserve(unsigned int pRecordCount)
-	{
-		mTree.Reserve(pRecordCount);
-	}
-
-	//! Retrieve the number of key-value pairs it holds.
-	inline int GetSize() const
-	{
-		return mTree.GetSize();
-	}
-
-	/** Insert a key-value pair.
-	* \param pKey The key.
-	* \param pValue The value.
-	* \return If the key is already present in the map, returns the existing pair and false; else returns the pointer to the new key-value and true. */
-	inline FbxPair<RecordType*, bool> Insert(const KeyType& pKey, const ValueType& pValue)
-	{
-		return mTree.Insert(KeyValuePair(pKey, pValue));
-	}
-
-	/** Delete a key-value pair.
-	* \param pKey The key.
-	* \return \c true if success, \c false if key is not found. */
-	inline bool Remove(const KeyType& pKey)
-	{
-		return mTree.Remove(pKey);
-	}
-
-	//! Clear the map.
-	inline void Clear()
-	{
-		mTree.Clear();
-	}
-
-	//! Query whether the map is empty.
-	inline bool Empty() const
-	{
-		return mTree.Empty();
-	}
-
-	//! Retrieve the begin iterator of the map.
-	Iterator Begin()
-	{
-		return Iterator(Minimum());
-	}
-
-	//! Retrieve the end iterator of the map.
-	Iterator End()
-	{
-		return Iterator();
-	}
-
-	//! Retrieve the begin iterator of the map.
-	ConstIterator Begin() const
-	{
-		return ConstIterator(Minimum());
-	}
-
-	//! Retrieve the end iterator of the map.
-	ConstIterator End() const
-	{
-		return ConstIterator();
-	}
-
-	/** Query a key.
-	* \param pKey The key.
-	* \return A key-value pair if success, NULL if the key is not found. */
-	inline const RecordType* Find(const KeyType& pKey) const
-	{
-		return mTree.Find(pKey);
-	}
-
-	/** Query a key.
-	* \param pKey The key.
-	* \return A key-value pair if success, NULL if it's not found. */
-	inline RecordType* Find(const KeyType& pKey)
-	{
-		return mTree.Find(pKey);
-	}
-
-	/** Find the key-value pair with the smallest key greater than a specified key.
-	* \param pKey The key.
-	* \return The found key-value pair. */
-	inline const RecordType* UpperBound(const KeyType& pKey) const
-	{
-		return mTree.UpperBound(pKey);
-	}
-
-	/** Find the key-value pair with the smallest key greater than a specified key.
-	* \param pKey The key.
-	* \return The found key-value pair. */
-	inline RecordType* UpperBound(const KeyType& pKey)
-	{
-		return mTree.UpperBound(pKey);
-	}
-
-	/** Retrieve the reference of the value in the key-value pairs in map.
-	* \param pKey The key.
-	* \return The reference of the value.
-	* \remark If the key is not found, a new key-value pair will be inserted. */
-	inline ValueType& operator[](const KeyType& pKey)
-	{
-		RecordType* lRecord = Find(pKey);
-
-		if( !lRecord )
-		{
-			lRecord = Insert(pKey, ValueType()).mFirst;
-		}
-
-		return lRecord->GetValue();
-	}
-
-	//! Retrieve the key-value pair which is the minimum key in map.
-	inline const RecordType* Minimum() const
-	{
-		return mTree.Minimum();
-	}
-
-	//! Retrieve the key-value pair which is the minimum key in map.
-	inline RecordType* Minimum()
-	{
-		return mTree.Minimum();
-	}
-
-	//! Retrieve the key-value pair which is the maximum key in map.
-	inline const RecordType* Maximum() const
-	{
-		return mTree.Maximum();
-	}
-
-	//! Retrieve the key-value pair which is the maximum key in map.
-	inline RecordType* Maximum()
-	{
-		return mTree.Maximum();
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	inline FbxMap(){}
-	inline FbxMap(const FbxMap& pMap) : mTree(pMap.mTree){}
-	inline ~FbxMap(){ Clear(); }
-
-private:
-	StorageType mTree;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-/** A simple map class representing a dictionary-like data structure.
-* \nosubgrouping */
-template <class Key, class Type, class Compare> class FBXSDK_DLL FbxSimpleMap
-{
-public:
-    typedef typename FbxMap<Key, Type, Compare>::RecordType* Iterator;
-
-	/** Add a key-value pair as an element.
-	* \param pKey The new key.
-	* \param pValue The new value. */
-	inline void Add(const Key& pKey, const Type& pValue)
-	{
-		mMap.Insert(pKey, pValue);
-	}
-
-	/** Find an element with a given key.
-	* \param pKey The given key.
-	* \return The iterator pointing to the found element or NULL if fails. */
-	inline Iterator Find(const Key& pKey) const
-	{
-		return (Iterator)mMap.Find(pKey);
-	}
-
-	/** Find an element with a given value.
-	* \param pValue The given value.
-	* \return The iterator pointing to the found element or NULL if fails. */
-	inline Iterator Find(const Type& pValue) const
-	{
-		Iterator lIterator = GetFirst();
-		while( lIterator )
-		{
-			if( lIterator->GetValue() == pValue )
-			{
-				return lIterator;
-			}
-			lIterator = GetNext(lIterator);
-		}
-		return 0;
-	}
-
-	/** Remove an element from the map.
-	* \param pIterator The given element. */
-	inline void Remove(Iterator pIterator)
-	{
-		if( pIterator ) mMap.Remove(pIterator->GetKey());
-	}
-
-	/** Get the first element.
-	* \return The the heading element. */
-	inline Iterator GetFirst() const
-	{
-		return (Iterator)mMap.Minimum();
-	}
-
-	/** Get the next element of a given element.
-	* \param pIterator The given element.
-	* \return The next element. */
-	inline Iterator GetNext(Iterator pIterator) const
-	{
-		return (Iterator)pIterator ? pIterator->Successor() : 0;
-	}
-
-	//! Remove all of the elements.
-	inline void Clear() 
-	{
-		mMap.Clear();
-	}
-
-	/** Reserve the space for given number elements.
-	* \param pSize The given number. */
-	inline void Reserve(int pSize)
-	{
-		mMap.Reserve(pSize);
-	}
-
-	/** Query the count of elements in the map.
-	* \return The count of elements. */
-	inline int GetCount() const
-	{
-		return mMap.GetSize();
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	inline FbxSimpleMap(){}
-
-private:
-    FbxMap<Key, Type, Compare> mMap;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-/** This class template declare a simple FbxObject map.
-* \nosubgrouping */
-template <class Type, class Compare> class FBXSDK_DLL FbxObjectMap : public FbxSimpleMap<Type, FbxObject*, Compare>
-{
-public:
-    //! Constructor
-    inline FbxObjectMap(){}
-
-    /** Get the object contained in an element.
-      * \param pIterator The given element.
-      * \return The object.
-      */
-    inline FbxObject* Get(typename FbxSimpleMap<Type, FbxObject*, Compare>::Iterator pIterator)
-    {
-        return pIterator ? pIterator->GetValue() : 0;
-    }
-};
-
-/** A class that maps strings to objects with a basic string comparator.
-* \nosubgrouping */
-class FBXSDK_DLL FbxObjectStringMap : public FbxObjectMap<FbxString, FbxStringCompare>
-{
-public:
-    //! Constructor
-    inline FbxObjectStringMap(){}
-};
-
-//! Call FbxFree on each element of the map, and then clear it.
-template <typename K, typename V, typename C, typename A> inline void FbxMapFree(FbxMap<K, V, C, A>& pMap)
-{
-	for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
-	{
-		FbxFree(i->GetValue());
-	}
-	pMap.Clear();
-}
-
-//! Call FbxDelete on each element of the map, and then clear it.
-template <typename K, typename V, typename C, typename A> inline void FbxMapDelete(FbxMap<K, V, C, A>& pMap)
-{
-	for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
-	{
-		FbxDelete(i->GetValue());
-	}
-	pMap.Clear();
-}
-
-//! Call Destroy on each element of the map, and then clear it.
-template <typename K, typename V, typename C, typename A> inline void FbxMapDestroy(FbxMap<K, V, C, A>& pMap)
-{
-	for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
-	{
-		i->GetValue()->Destroy();
-	}
-	pMap.Clear();
-}
-
-template class FbxSimpleMap<FbxString, FbxObject*, FbxStringCompare>;
-template class FbxObjectMap<FbxString, FbxStringCompare>;
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_MAP_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxmap.h
+#ifndef _FBXSDK_CORE_BASE_MAP_H_
+#define _FBXSDK_CORE_BASE_MAP_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxstring.h>
+#include <fbxsdk/core/base/fbxredblacktree.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxObject;
+
+/** Default compare functor for FbxMap and FbxSet, which assumes operator < is defined.
+Here is examples of different compare class implementations:
+With Key = int
+\code
+class IntCompare
+{
+    inline int operator()(int pKeyA, int pKeyB) const
+    {
+        return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
+    }
+};
+\endcode
+With Key = Class
+\code
+class ClassCompare
+{
+	inline int operator()(const Class& pKeyA, const Class& pKeyB) const
+	{
+		return pKeyA < pKeyB ? -1 : (pKeyA > pKeyB ? 1 : 0);
+	}
+};
+\endcode
+With Key = char*
+\code
+class StrCompare
+{
+	inline int operator()(const char* pKeyA, const char* pKeyB) const
+	{
+		return strcmp(pKeyA, pKeyB);
+	}
+};
+\endcode
+*/
+template <typename Type> struct FbxLessCompare
+{
+    inline int operator()(const Type& pLeft, const Type& pRight) const
+    {
+        return (pLeft < pRight) ? -1 : ((pRight < pLeft) ? 1 : 0);
+    }
+};
+
+/** This class implements an efficient map based on key comparison, which stores key-value pairs.
+It executes insertion, deletion and query operations in O(log(n)) time. */
+template <typename Key, typename Type, typename Compare=FbxLessCompare<Key>, typename Allocator=FbxBaseAllocator> class FbxMap
+{
+protected:
+	//! This class defines the key-value pairs used by the map.
+	class KeyValuePair : private FbxPair<const Key, Type>
+	{
+	/*****************************************************************************************************************************
+	** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+	*****************************************************************************************************************************/
+	#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	public:
+		typedef const Key	KeyType;
+		typedef const Key	ConstKeyType;
+		typedef Type		ValueType;
+		typedef const Type	ConstValueType;
+
+		KeyValuePair(const Key& pFirst, const Type& pSecond) : FbxPair<const Key, Type>(pFirst, pSecond){}
+		ConstKeyType& GetKey() const { return this->mFirst; }
+		KeyType& GetKey(){ return this->mFirst; }
+		ConstValueType& GetValue() const { return this->mSecond; }
+		ValueType& GetValue(){ return this->mSecond; }
+	#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+	};
+
+	//! Declaration of the storage type used by the map.
+	typedef FbxRedBlackTree<KeyValuePair, Compare, Allocator> StorageType;
+
+public:
+	typedef Type									ValueType;
+	typedef Key										KeyType;
+	typedef typename StorageType::RecordType		RecordType;
+	typedef typename StorageType::IteratorType		Iterator;
+	typedef typename StorageType::ConstIteratorType	ConstIterator;
+
+	/** Preallocate memory.
+	* \param pRecordCount The number of elements. */
+	inline void Reserve(unsigned int pRecordCount)
+	{
+		mTree.Reserve(pRecordCount);
+	}
+
+	//! Retrieve the number of key-value pairs it holds.
+	inline int GetSize() const
+	{
+		return mTree.GetSize();
+	}
+
+	/** Insert a key-value pair.
+	* \param pKey The key.
+	* \param pValue The value.
+	* \return If the key is already present in the map, returns the existing pair and false; else returns the pointer to the new key-value and true. */
+	inline FbxPair<RecordType*, bool> Insert(const KeyType& pKey, const ValueType& pValue)
+	{
+		return mTree.Insert(KeyValuePair(pKey, pValue));
+	}
+
+	/** Delete a key-value pair.
+	* \param pKey The key.
+	* \return \c true if success, \c false if key is not found. */
+	inline bool Remove(const KeyType& pKey)
+	{
+		return mTree.Remove(pKey);
+	}
+
+	//! Clear the map.
+	inline void Clear()
+	{
+		mTree.Clear();
+	}
+
+	//! Query whether the map is empty.
+	inline bool Empty() const
+	{
+		return mTree.Empty();
+	}
+
+	//! Retrieve the begin iterator of the map.
+	Iterator Begin()
+	{
+		return Iterator(Minimum());
+	}
+
+	//! Retrieve the end iterator of the map.
+	Iterator End()
+	{
+		return Iterator();
+	}
+
+	//! Retrieve the begin iterator of the map.
+	ConstIterator Begin() const
+	{
+		return ConstIterator(Minimum());
+	}
+
+	//! Retrieve the end iterator of the map.
+	ConstIterator End() const
+	{
+		return ConstIterator();
+	}
+
+	/** Query a key.
+	* \param pKey The key.
+	* \return A key-value pair if success, NULL if the key is not found. */
+	inline const RecordType* Find(const KeyType& pKey) const
+	{
+		return mTree.Find(pKey);
+	}
+
+	/** Query a key.
+	* \param pKey The key.
+	* \return A key-value pair if success, NULL if it's not found. */
+	inline RecordType* Find(const KeyType& pKey)
+	{
+		return mTree.Find(pKey);
+	}
+
+	/** Find the key-value pair with the smallest key greater than a specified key.
+	* \param pKey The key.
+	* \return The found key-value pair. */
+	inline const RecordType* UpperBound(const KeyType& pKey) const
+	{
+		return mTree.UpperBound(pKey);
+	}
+
+	/** Find the key-value pair with the smallest key greater than a specified key.
+	* \param pKey The key.
+	* \return The found key-value pair. */
+	inline RecordType* UpperBound(const KeyType& pKey)
+	{
+		return mTree.UpperBound(pKey);
+	}
+
+	/** Retrieve the reference of the value in the key-value pairs in map.
+	* \param pKey The key.
+	* \return The reference of the value.
+	* \remark If the key is not found, a new key-value pair will be inserted. */
+	inline ValueType& operator[](const KeyType& pKey)
+	{
+		RecordType* lRecord = Find(pKey);
+
+		if( !lRecord )
+		{
+			lRecord = Insert(pKey, ValueType()).mFirst;
+		}
+
+		return lRecord->GetValue();
+	}
+
+	//! Retrieve the key-value pair which is the minimum key in map.
+	inline const RecordType* Minimum() const
+	{
+		return mTree.Minimum();
+	}
+
+	//! Retrieve the key-value pair which is the minimum key in map.
+	inline RecordType* Minimum()
+	{
+		return mTree.Minimum();
+	}
+
+	//! Retrieve the key-value pair which is the maximum key in map.
+	inline const RecordType* Maximum() const
+	{
+		return mTree.Maximum();
+	}
+
+	//! Retrieve the key-value pair which is the maximum key in map.
+	inline RecordType* Maximum()
+	{
+		return mTree.Maximum();
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	inline FbxMap(){}
+	inline FbxMap(const FbxMap& pMap) : mTree(pMap.mTree){}
+	inline ~FbxMap(){ Clear(); }
+
+private:
+	StorageType mTree;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+/** A simple map class representing a dictionary-like data structure.
+* \nosubgrouping */
+template <class Key, class Type, class Compare> class FBXSDK_DLL FbxSimpleMap
+{
+public:
+    typedef typename FbxMap<Key, Type, Compare>::RecordType* Iterator;
+
+	/** Add a key-value pair as an element.
+	* \param pKey The new key.
+	* \param pValue The new value. */
+	inline void Add(const Key& pKey, const Type& pValue)
+	{
+		mMap.Insert(pKey, pValue);
+	}
+
+	/** Find an element with a given key.
+	* \param pKey The given key.
+	* \return The iterator pointing to the found element or NULL if fails. */
+	inline Iterator Find(const Key& pKey) const
+	{
+		return (Iterator)mMap.Find(pKey);
+	}
+
+	/** Find an element with a given value.
+	* \param pValue The given value.
+	* \return The iterator pointing to the found element or NULL if fails. */
+	inline Iterator Find(const Type& pValue) const
+	{
+		Iterator lIterator = GetFirst();
+		while( lIterator )
+		{
+			if( lIterator->GetValue() == pValue )
+			{
+				return lIterator;
+			}
+			lIterator = GetNext(lIterator);
+		}
+		return 0;
+	}
+
+	/** Remove an element from the map.
+	* \param pIterator The given element. */
+	inline void Remove(Iterator pIterator)
+	{
+		if( pIterator ) mMap.Remove(pIterator->GetKey());
+	}
+
+	/** Get the first element.
+	* \return The the heading element. */
+	inline Iterator GetFirst() const
+	{
+		return (Iterator)mMap.Minimum();
+	}
+
+	/** Get the next element of a given element.
+	* \param pIterator The given element.
+	* \return The next element. */
+	inline Iterator GetNext(Iterator pIterator) const
+	{
+		return (Iterator)pIterator ? pIterator->Successor() : 0;
+	}
+
+	//! Remove all of the elements.
+	inline void Clear() 
+	{
+		mMap.Clear();
+	}
+
+	/** Reserve the space for given number elements.
+	* \param pSize The given number. */
+	inline void Reserve(int pSize)
+	{
+		mMap.Reserve(pSize);
+	}
+
+	/** Query the count of elements in the map.
+	* \return The count of elements. */
+	inline int GetCount() const
+	{
+		return mMap.GetSize();
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	inline FbxSimpleMap(){}
+
+private:
+    FbxMap<Key, Type, Compare> mMap;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+/** This class template declare a simple FbxObject map.
+* \nosubgrouping */
+template <class Type, class Compare> class FBXSDK_DLL FbxObjectMap : public FbxSimpleMap<Type, FbxObject*, Compare>
+{
+public:
+    //! Constructor
+    inline FbxObjectMap(){}
+
+    /** Get the object contained in an element.
+      * \param pIterator The given element.
+      * \return The object.
+      */
+    inline FbxObject* Get(typename FbxSimpleMap<Type, FbxObject*, Compare>::Iterator pIterator)
+    {
+        return pIterator ? pIterator->GetValue() : 0;
+    }
+};
+
+/** A class that maps strings to objects with a basic string comparator.
+* \nosubgrouping */
+class FBXSDK_DLL FbxObjectStringMap : public FbxObjectMap<FbxString, FbxStringCompare>
+{
+public:
+    //! Constructor
+    inline FbxObjectStringMap(){}
+};
+
+//! Call FbxFree on each element of the map, and then clear it.
+template <typename K, typename V, typename C, typename A> inline void FbxMapFree(FbxMap<K, V, C, A>& pMap)
+{
+	for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
+	{
+		FbxFree(i->GetValue());
+	}
+	pMap.Clear();
+}
+
+//! Call FbxDelete on each element of the map, and then clear it.
+template <typename K, typename V, typename C, typename A> inline void FbxMapDelete(FbxMap<K, V, C, A>& pMap)
+{
+	for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
+	{
+		FbxDelete(i->GetValue());
+	}
+	pMap.Clear();
+}
+
+//! Call Destroy on each element of the map, and then clear it.
+template <typename K, typename V, typename C, typename A> inline void FbxMapDestroy(FbxMap<K, V, C, A>& pMap)
+{
+	for( typename FbxMap<K, V, C, A>::Iterator i = pMap.Begin(); i != pMap.End(); ++i )
+	{
+		i->GetValue()->Destroy();
+	}
+	pMap.Clear();
+}
+
+template class FbxSimpleMap<FbxString, FbxObject*, FbxStringCompare>;
+template class FbxObjectMap<FbxString, FbxStringCompare>;
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_MAP_H_ */

+ 67 - 67
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxmemorypool.h

@@ -1,67 +1,67 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxmemorypool.h
-#ifndef _FBXSDK_CORE_BASE_MEMORY_H_
-#define _FBXSDK_CORE_BASE_MEMORY_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/sync/fbxatomic.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** \brief Class to create a simple fixed-size-blocks memory pool to allocate memory dynamically. */
-class FBXSDK_DLL FbxMemoryPool
-{
-public:
-	/** Memory pool constructor.
-	* \param pBlockSize		The size of one memory block.
-	* \param pBlockCount	The count of block that should be pre-allocated.
-	* \param pResizable		Whether memory pool can grow if no block are availalbe upon calling Allocate.
-	* \param pConcurrent	Whether the pool supports concurrent allocation and release operations.
-	* \remark				All memory blocks must be released before the memory pool is destroyed, otherwise a memory leak will occur. */
-	FbxMemoryPool(size_t pBlockSize, FbxInt64 pBlockCount=0, bool pResizable=true, bool pConcurrent=true);
-
-	/** Memory pool destructor. Upon destruction, all memory blocks of the pool will be de-allocated. */
-	~FbxMemoryPool();
-
-	/** Free memory of all memory blocks from this memory pool, also effectively resetting the block count to zero.
-	* \remark The block size and alignment/resize/concurrent support will remain unchanged. */
-	void Reset();
-
-	/** Allocate or lock a memory block for usage.
-	* \return An memory block pointer that can be NULL if the memory pool cannot grow in size and no blocks are available. */
-	void* Allocate();
-
-	/** Dispose or unlock a memory block.
-	* \param pMemBlock A pointer to the memory block to release. This will not free the block's memory, instead simply putting it back in the available stack. */
-	void Release(void* pMemBlock);
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-    void*		Pop();
-
-	FbxInt64	mMaxBlockCount;
-    FbxAtomic	mFreeBlockCount;
-    void*		mFreeBlocksStack;
-    size_t		mBlockSize;
-    bool		mResizable;
-    bool		mSupportConcurrentAccess;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_MEMORY_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxmemorypool.h
+#ifndef _FBXSDK_CORE_BASE_MEMORY_H_
+#define _FBXSDK_CORE_BASE_MEMORY_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/sync/fbxatomic.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** \brief Class to create a simple fixed-size-blocks memory pool to allocate memory dynamically. */
+class FBXSDK_DLL FbxMemoryPool
+{
+public:
+	/** Memory pool constructor.
+	* \param pBlockSize		The size of one memory block.
+	* \param pBlockCount	The count of block that should be pre-allocated.
+	* \param pResizable		Whether memory pool can grow if no block are availalbe upon calling Allocate.
+	* \param pConcurrent	Whether the pool supports concurrent allocation and release operations.
+	* \remark				All memory blocks must be released before the memory pool is destroyed, otherwise a memory leak will occur. */
+	FbxMemoryPool(size_t pBlockSize, FbxInt64 pBlockCount=0, bool pResizable=true, bool pConcurrent=true);
+
+	/** Memory pool destructor. Upon destruction, all memory blocks of the pool will be de-allocated. */
+	~FbxMemoryPool();
+
+	/** Free memory of all memory blocks from this memory pool, also effectively resetting the block count to zero.
+	* \remark The block size and alignment/resize/concurrent support will remain unchanged. */
+	void Reset();
+
+	/** Allocate or lock a memory block for usage.
+	* \return An memory block pointer that can be NULL if the memory pool cannot grow in size and no blocks are available. */
+	void* Allocate();
+
+	/** Dispose or unlock a memory block.
+	* \param pMemBlock A pointer to the memory block to release. This will not free the block's memory, instead simply putting it back in the available stack. */
+	void Release(void* pMemBlock);
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+    void*		Pop();
+
+	FbxInt64	mMaxBlockCount;
+    FbxAtomic	mFreeBlockCount;
+    void*		mFreeBlocksStack;
+    size_t		mBlockSize;
+    bool		mResizable;
+    bool		mSupportConcurrentAccess;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_MEMORY_H_ */

+ 115 - 115
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxmultimap.h

@@ -1,115 +1,115 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxmultimap.h
-#ifndef _FBXSDK_CORE_BASE_MULTIMAP_H_
-#define _FBXSDK_CORE_BASE_MULTIMAP_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Class to manipulate a map that can contain multiple times the same key.
-* \nosubgrouping */
-class FBXSDK_DLL FbxMultiMap
-{
-public:
-	struct Pair
-	{
-		FbxHandle mKey;
-		FbxHandle mItem;
-	};
-
-	/** If can't find the matching item,append a item at the end of the array.
-	* If find the matching item ,insert the new item before the matching item. 
-    * \param pKey The value of Key in new item, also is the character for matching.
-	* \param pItem The value of Item in new item.
-	* \return If add successfully return true,otherwise return false.
-    */
-    bool Add(FbxHandle pKey, FbxHandle pItem);
-	
-	/** Remove the first matching item, whose reference is the same as given.
-	* \param pKey The given reference.
-	* \return If remove successfully return true,otherwise return false.
-	*/
-    bool Remove(FbxHandle pKey);
-	
-	/** Remove all the matching item, whose item is the same as given.
-	* \param pItem The given item.
-	* \return If remove successfully return true,otherwise return false.
-	*/
-    bool RemoveItem(FbxHandle pItem);
-
-    /** Set first matching item with the given parameter.
-    * \param pKey The character for matching.
-	* \param pItem  The value of Item that the matching item will be set.
-	* \return If set successfully return true,otherwise return false.
-    */
-    bool SetItem(FbxHandle pKey, FbxHandle pItem);
-
-    /** Get first matching item with the given parameter.
-    * \param pKey The character for matching.
-	* \param pIndex The pointer to the index of the matching item.
-	* \return The value of Item in the matching item.
-    * \remarks If there are multiple elements that match the character, the index returned is unspecified.
-    */
-    FbxHandle Get(FbxHandle pKey, int* pIndex=NULL);
-
-	//! Delete the array.
-    void Clear();
-
-	/** Get the item of the given index.
-    * \param pIndex The index for matching.
-	* \param pKey The pointer to the Key of the matching item.
-	* \return The value of Item in the matching item.
-    */
-    FbxHandle GetFromIndex(int pIndex, FbxHandle* pKey=NULL);
-
-	/** Remove the item of the given index
-	* \param pIndex The given index.
-	* \return If remove successfully return true,otherwise return false.
-	*/
-    bool RemoveFromIndex(int pIndex);
-
-	/** Get number of items in the array.
-	* \return The number of items in the array. */
-    int GetCount() const { return mSetCount; }
-
-	/** Swap the value of Key and Item in every item of array, and sort the new array with the value of Key. */
-    void Swap();
-
-	/** Sort the array according the value of Key in each item. */
-    void Sort();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxMultiMap(int pItemPerBlock=20);
-	FbxMultiMap(const FbxMultiMap& pOther);
-	~FbxMultiMap();
-
-    FbxMultiMap& operator=(const FbxMultiMap&);
-
-private:
-    Pair*	FindEqual(FbxHandle pKey) const;
-
-    Pair*	mSetArray;
-    int		mSetCount;
-    int		mBlockCount;
-    int		mItemPerBlock;
-    bool	mIsChanged;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_MULTIMAP_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxmultimap.h
+#ifndef _FBXSDK_CORE_BASE_MULTIMAP_H_
+#define _FBXSDK_CORE_BASE_MULTIMAP_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Class to manipulate a map that can contain multiple times the same key.
+* \nosubgrouping */
+class FBXSDK_DLL FbxMultiMap
+{
+public:
+	struct Pair
+	{
+		FbxHandle mKey;
+		FbxHandle mItem;
+	};
+
+	/** If can't find the matching item,append a item at the end of the array.
+	* If find the matching item ,insert the new item before the matching item. 
+    * \param pKey The value of Key in new item, also is the character for matching.
+	* \param pItem The value of Item in new item.
+	* \return If add successfully return true,otherwise return false.
+    */
+    bool Add(FbxHandle pKey, FbxHandle pItem);
+	
+	/** Remove the first matching item, whose reference is the same as given.
+	* \param pKey The given reference.
+	* \return If remove successfully return true,otherwise return false.
+	*/
+    bool Remove(FbxHandle pKey);
+	
+	/** Remove all the matching item, whose item is the same as given.
+	* \param pItem The given item.
+	* \return If remove successfully return true,otherwise return false.
+	*/
+    bool RemoveItem(FbxHandle pItem);
+
+    /** Set first matching item with the given parameter.
+    * \param pKey The character for matching.
+	* \param pItem  The value of Item that the matching item will be set.
+	* \return If set successfully return true,otherwise return false.
+    */
+    bool SetItem(FbxHandle pKey, FbxHandle pItem);
+
+    /** Get first matching item with the given parameter.
+    * \param pKey The character for matching.
+	* \param pIndex The pointer to the index of the matching item.
+	* \return The value of Item in the matching item.
+    * \remarks If there are multiple elements that match the character, the index returned is unspecified.
+    */
+    FbxHandle Get(FbxHandle pKey, int* pIndex=NULL);
+
+	//! Delete the array.
+    void Clear();
+
+	/** Get the item of the given index.
+    * \param pIndex The index for matching.
+	* \param pKey The pointer to the Key of the matching item.
+	* \return The value of Item in the matching item.
+    */
+    FbxHandle GetFromIndex(int pIndex, FbxHandle* pKey=NULL);
+
+	/** Remove the item of the given index
+	* \param pIndex The given index.
+	* \return If remove successfully return true,otherwise return false.
+	*/
+    bool RemoveFromIndex(int pIndex);
+
+	/** Get number of items in the array.
+	* \return The number of items in the array. */
+    int GetCount() const { return mSetCount; }
+
+	/** Swap the value of Key and Item in every item of array, and sort the new array with the value of Key. */
+    void Swap();
+
+	/** Sort the array according the value of Key in each item. */
+    void Sort();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxMultiMap(int pItemPerBlock=20);
+	FbxMultiMap(const FbxMultiMap& pOther);
+	~FbxMultiMap();
+
+    FbxMultiMap& operator=(const FbxMultiMap&);
+
+private:
+    Pair*	FindEqual(FbxHandle pKey) const;
+
+    Pair*	mSetArray;
+    int		mSetCount;
+    int		mBlockCount;
+    int		mItemPerBlock;
+    bool	mIsChanged;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_MULTIMAP_H_ */

+ 62 - 62
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxpair.h

@@ -1,62 +1,62 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxpair.h
-#ifndef _FBXSDK_CORE_BASE_PAIR_H_
-#define _FBXSDK_CORE_BASE_PAIR_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** This class template holds a pair of objects.
-* \nosubgrouping */
-template <typename First, typename Second> class FbxPair
-{
-public:
-	//! Constructor.
-	inline FbxPair() : mFirst(), mSecond() {}
-
-	/** Constructor.
-	* \param pFirst The first object.
-	* \param pSecond The second object. */
-	inline FbxPair(const First& pFirst, const Second& pSecond) : mFirst(pFirst), mSecond(pSecond) {}
-
-	/** Assignment operator.
-	* \param pOther The pair to be copied. */
-	inline FbxPair<First, Second>& operator=(const FbxPair<First, Second>& pOther)
-	{
-		mFirst = pOther.mFirst;
-		mSecond = pOther.mSecond;
-		return *this;
-	}
-
-	/** Comparison operator.
-	* \param pOther The pair to be compared. */
-	inline bool operator==(const FbxPair<First, Second>& pOther)
-	{
-		return mFirst == pOther.mFirst && mSecond == pOther.mSecond;
-	}
-
-	/** Inverse comparison operator.
-	* \param pOther The pair to be compared. */
-	inline bool operator!=(const FbxPair<First, Second>& pOther)
-	{
-		return !operator==(pOther);
-	}
-
-	First mFirst;	//!< The first object in the pair.
-	Second mSecond;	//!< The second object in the pair.
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_PAIR_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxpair.h
+#ifndef _FBXSDK_CORE_BASE_PAIR_H_
+#define _FBXSDK_CORE_BASE_PAIR_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** This class template holds a pair of objects.
+* \nosubgrouping */
+template <typename First, typename Second> class FbxPair
+{
+public:
+	//! Constructor.
+	inline FbxPair() : mFirst(), mSecond() {}
+
+	/** Constructor.
+	* \param pFirst The first object.
+	* \param pSecond The second object. */
+	inline FbxPair(const First& pFirst, const Second& pSecond) : mFirst(pFirst), mSecond(pSecond) {}
+
+	/** Assignment operator.
+	* \param pOther The pair to be copied. */
+	inline FbxPair<First, Second>& operator=(const FbxPair<First, Second>& pOther)
+	{
+		mFirst = pOther.mFirst;
+		mSecond = pOther.mSecond;
+		return *this;
+	}
+
+	/** Comparison operator.
+	* \param pOther The pair to be compared. */
+	inline bool operator==(const FbxPair<First, Second>& pOther)
+	{
+		return mFirst == pOther.mFirst && mSecond == pOther.mSecond;
+	}
+
+	/** Inverse comparison operator.
+	* \param pOther The pair to be compared. */
+	inline bool operator!=(const FbxPair<First, Second>& pOther)
+	{
+		return !operator==(pOther);
+	}
+
+	First mFirst;	//!< The first object in the pair.
+	Second mSecond;	//!< The second object in the pair.
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_PAIR_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 1398 - 1398
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxredblacktree.h


+ 227 - 227
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxset.h

@@ -1,227 +1,227 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxset.h
-#ifndef _FBXSDK_CORE_BASE_SET_H_
-#define _FBXSDK_CORE_BASE_SET_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxredblacktree.h>
-#include <fbxsdk/core/base/fbxmap.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** This class implements an efficient set based on value comparison, which stores values.
-* It executes insertion, deletion and query operations in O(log(n)) time. */
-template <typename Type, typename Compare=FbxLessCompare<Type>, typename Allocator=FbxBaseAllocator> class FbxSet
-{
-protected:
-	//! This class defines the value type used by the set.
-	class Value
-	{
-	/*****************************************************************************************************************************
-	** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-	*****************************************************************************************************************************/
-	#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	public:
-		typedef const Type KeyType;
-		typedef const Type ConstKeyType;
-		typedef const Type ValueType;
-		typedef const Type ConstValueType;
-
-		inline Value(const Type& pValue) : mValue(pValue){}
-		inline KeyType& GetKey() const { return mValue; }
-		inline ConstKeyType& GetKey(){ return mValue; }
-		inline ValueType& GetValue() const { return mValue; }
-		inline ConstValueType& GetValue(){ return mValue; }
-
-	protected:
-		ValueType mValue;
-
-	private:
-		Value& operator=(const Value&);
-	#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-	};
-
-	//! Declaration of the storage type used by the set.
-	typedef FbxRedBlackTree<Value, Compare, Allocator> StorageType;
-
-public:
-	typedef Type ValueType;
-	typedef typename StorageType::RecordType        RecordType;
-	typedef typename StorageType::IteratorType      Iterator;
-	typedef typename StorageType::ConstIteratorType ConstIterator;
-
-	/** Preallocate memory.
-	* \param pRecordCount The number of elements.
-	*/
-	inline void Reserve(unsigned int pRecordCount)
-	{
-		mTree.Reserve(pRecordCount);
-	}
-
-	//! Retrieve the number of values it holds.
-	inline int GetSize() const
-	{
-		return mTree.GetSize();
-	}
-
-	/** Insert a value.
-	* \param pValue The value.
-	* \return If the value is already present in the map, returns the existing value and false; else returns the pointer to the new value and true. */
-	inline FbxPair<RecordType*, bool> Insert(const ValueType& pValue)
-	{
-		return mTree.Insert(Value(pValue));
-	}
-
-	/** Delete a value.
-	* \param pValue The value.
-	* \return \c true if success, \c false if value is not found. */
-	inline int Remove(const ValueType& pValue)
-	{
-		return mTree.Remove(pValue);
-	}
-
-	//! Clear the set.
-	inline void Clear()
-	{
-		mTree.Clear();
-	}
-
-	//! Query whether the set is empty.
-	inline bool Empty() const
-	{
-		return mTree.Empty();
-	}
-
-	//! Retrieve the begin iterator of the set.
-	Iterator Begin()
-	{
-		return Iterator(Minimum());
-	}
-
-	//! Retrieve the end iterator of the set.
-	Iterator End()
-	{
-		return Iterator();
-	}
-
-	//! Retrieve the begin iterator of the set.
-	ConstIterator Begin() const
-	{
-		return ConstIterator(Minimum());
-	}
-
-	//! Retrieve the end iterator of the set.
-	ConstIterator End() const
-	{
-		return ConstIterator();
-	}
-
-	/** Find a given value in the set.
-	* \param pValue The value to find.
-	* \return The value in the set, or NULL if the value is not found in the set. */
-	inline const RecordType* Find(const ValueType& pValue) const
-	{
-		return mTree.Find(pValue);
-	}
-
-	/** Find a given value in the set.
-	* \param pValue The value to find.
-	* \return The value in the set, or NULL if the value is not found in the set. */
-	inline RecordType* Find(const ValueType& pValue)
-	{
-		return mTree.Find(pValue);
-	}
-
-	//! Retrieve the minimum value in the set.
-	inline const RecordType* Minimum() const
-	{
-		return mTree.Minimum();
-	}
-
-	//! Retrieve the minimum value in the set.
-	inline RecordType* Minimum()
-	{
-		return mTree.Minimum();
-	}
-
-	//! Retrieve the maximum value in the set.
-	inline const RecordType* Maximum() const
-	{
-		return mTree.Maximum();
-	}
-
-	//! Retrieve the maximum value in the set.
-	inline RecordType* Maximum()
-	{
-		return mTree.Maximum();
-	}
-
-	//! Equality operator.
-	inline bool operator==(const FbxSet<Type, Compare, Allocator>& pOther) const
-	{
-		return (this == &pOther) || (mTree == pOther.mTree);
-	}
-
-	//! Inequality operator.
-	inline bool operator != (const FbxSet<Type, Compare, Allocator>& pOther) const
-	{
-		return !(*this == pOther);
-	}
-
-	/** Intersect with another set.
-	* \param pOther The other set.
-	* \return The intersection set of the two sets. */
-	inline FbxSet Intersect(const FbxSet& pOther) const
-	{
-		FbxSet lReturn;
-		ConstIterator lBegin = Begin();
-		for (; lBegin != End(); ++lBegin)
-		{
-			if (pOther.Find(lBegin->GetValue()) != NULL)
-				lReturn.Insert(lBegin->GetValue());
-		}
-		return lReturn;
-	}
-
-	/** Unite with another set.
-	* \param pOther The other set.
-	* \return The union set of the two sets (no duplicated items). */
-	inline FbxSet Union(const FbxSet& pOther) const
-	{
-		FbxSet lReturn(*this);
-		ConstIterator lBegin = pOther.Begin();
-		for (; lBegin != End(); ++lBegin)
-		{
-			if (Find(lBegin->GetValue()) == NULL)
-				lReturn.Insert(lBegin->GetValue());
-		}
-		return lReturn;
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-    inline FbxSet(){}
-    inline FbxSet(const FbxSet& pSet) : mTree(pSet.mTree){}
-    inline ~FbxSet(){ Clear(); }
-
-private:
-    StorageType mTree;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_SET_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxset.h
+#ifndef _FBXSDK_CORE_BASE_SET_H_
+#define _FBXSDK_CORE_BASE_SET_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxredblacktree.h>
+#include <fbxsdk/core/base/fbxmap.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** This class implements an efficient set based on value comparison, which stores values.
+* It executes insertion, deletion and query operations in O(log(n)) time. */
+template <typename Type, typename Compare=FbxLessCompare<Type>, typename Allocator=FbxBaseAllocator> class FbxSet
+{
+protected:
+	//! This class defines the value type used by the set.
+	class Value
+	{
+	/*****************************************************************************************************************************
+	** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+	*****************************************************************************************************************************/
+	#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	public:
+		typedef const Type KeyType;
+		typedef const Type ConstKeyType;
+		typedef const Type ValueType;
+		typedef const Type ConstValueType;
+
+		inline Value(const Type& pValue) : mValue(pValue){}
+		inline KeyType& GetKey() const { return mValue; }
+		inline ConstKeyType& GetKey(){ return mValue; }
+		inline ValueType& GetValue() const { return mValue; }
+		inline ConstValueType& GetValue(){ return mValue; }
+
+	protected:
+		ValueType mValue;
+
+	private:
+		Value& operator=(const Value&);
+	#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+	};
+
+	//! Declaration of the storage type used by the set.
+	typedef FbxRedBlackTree<Value, Compare, Allocator> StorageType;
+
+public:
+	typedef Type ValueType;
+	typedef typename StorageType::RecordType        RecordType;
+	typedef typename StorageType::IteratorType      Iterator;
+	typedef typename StorageType::ConstIteratorType ConstIterator;
+
+	/** Preallocate memory.
+	* \param pRecordCount The number of elements.
+	*/
+	inline void Reserve(unsigned int pRecordCount)
+	{
+		mTree.Reserve(pRecordCount);
+	}
+
+	//! Retrieve the number of values it holds.
+	inline int GetSize() const
+	{
+		return mTree.GetSize();
+	}
+
+	/** Insert a value.
+	* \param pValue The value.
+	* \return If the value is already present in the map, returns the existing value and false; else returns the pointer to the new value and true. */
+	inline FbxPair<RecordType*, bool> Insert(const ValueType& pValue)
+	{
+		return mTree.Insert(Value(pValue));
+	}
+
+	/** Delete a value.
+	* \param pValue The value.
+	* \return \c true if success, \c false if value is not found. */
+	inline int Remove(const ValueType& pValue)
+	{
+		return mTree.Remove(pValue);
+	}
+
+	//! Clear the set.
+	inline void Clear()
+	{
+		mTree.Clear();
+	}
+
+	//! Query whether the set is empty.
+	inline bool Empty() const
+	{
+		return mTree.Empty();
+	}
+
+	//! Retrieve the begin iterator of the set.
+	Iterator Begin()
+	{
+		return Iterator(Minimum());
+	}
+
+	//! Retrieve the end iterator of the set.
+	Iterator End()
+	{
+		return Iterator();
+	}
+
+	//! Retrieve the begin iterator of the set.
+	ConstIterator Begin() const
+	{
+		return ConstIterator(Minimum());
+	}
+
+	//! Retrieve the end iterator of the set.
+	ConstIterator End() const
+	{
+		return ConstIterator();
+	}
+
+	/** Find a given value in the set.
+	* \param pValue The value to find.
+	* \return The value in the set, or NULL if the value is not found in the set. */
+	inline const RecordType* Find(const ValueType& pValue) const
+	{
+		return mTree.Find(pValue);
+	}
+
+	/** Find a given value in the set.
+	* \param pValue The value to find.
+	* \return The value in the set, or NULL if the value is not found in the set. */
+	inline RecordType* Find(const ValueType& pValue)
+	{
+		return mTree.Find(pValue);
+	}
+
+	//! Retrieve the minimum value in the set.
+	inline const RecordType* Minimum() const
+	{
+		return mTree.Minimum();
+	}
+
+	//! Retrieve the minimum value in the set.
+	inline RecordType* Minimum()
+	{
+		return mTree.Minimum();
+	}
+
+	//! Retrieve the maximum value in the set.
+	inline const RecordType* Maximum() const
+	{
+		return mTree.Maximum();
+	}
+
+	//! Retrieve the maximum value in the set.
+	inline RecordType* Maximum()
+	{
+		return mTree.Maximum();
+	}
+
+	//! Equality operator.
+	inline bool operator==(const FbxSet<Type, Compare, Allocator>& pOther) const
+	{
+		return (this == &pOther) || (mTree == pOther.mTree);
+	}
+
+	//! Inequality operator.
+	inline bool operator != (const FbxSet<Type, Compare, Allocator>& pOther) const
+	{
+		return !(*this == pOther);
+	}
+
+	/** Intersect with another set.
+	* \param pOther The other set.
+	* \return The intersection set of the two sets. */
+	inline FbxSet Intersect(const FbxSet& pOther) const
+	{
+		FbxSet lReturn;
+		ConstIterator lBegin = Begin();
+		for (; lBegin != End(); ++lBegin)
+		{
+			if (pOther.Find(lBegin->GetValue()) != NULL)
+				lReturn.Insert(lBegin->GetValue());
+		}
+		return lReturn;
+	}
+
+	/** Unite with another set.
+	* \param pOther The other set.
+	* \return The union set of the two sets (no duplicated items). */
+	inline FbxSet Union(const FbxSet& pOther) const
+	{
+		FbxSet lReturn(*this);
+		ConstIterator lBegin = pOther.Begin();
+		for (; lBegin != End(); ++lBegin)
+		{
+			if (Find(lBegin->GetValue()) == NULL)
+				lReturn.Insert(lBegin->GetValue());
+		}
+		return lReturn;
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+    inline FbxSet(){}
+    inline FbxSet(const FbxSet& pSet) : mTree(pSet.mTree){}
+    inline ~FbxSet(){ Clear(); }
+
+private:
+    StorageType mTree;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_SET_H_ */

+ 119 - 119
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxstatus.h

@@ -1,119 +1,119 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxstatus.h
-#ifndef _FBXSDK_CORE_BASE_STATUS_H_
-#define _FBXSDK_CORE_BASE_STATUS_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxstring.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** This class facilitates the testing/reporting of errors.  It encapsulates the
-  * status code and the internal FBXSDK error code as returned by the API functions.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxStatus
-{
-public:
-
-
-    //! Available status codes.
-    enum EStatusCode {        
-        eSuccess = 0,                           //!< Operation was successful
-        eFailure,                               //!< Operation failed
-        eInsufficientMemory,                    //!< Operation failed due to insufficient memory
-        eInvalidParameter,                      //!< An invalid parameter was provided
-        eIndexOutOfRange,                       //!< Index value outside the valid range
-        ePasswordError,                         //!< Operation on FBX file password failed
-        eInvalidFileVersion,                    //!< File version not supported (anymore or yet)
-        eInvalidFile                            //!< Operation on the file access failed
-    };
-
-    //! Default constructor.
-    FbxStatus();
-
-    FbxStatus(EStatusCode pCode);
-    FbxStatus(const FbxStatus& rhs);
-
-    FbxStatus&      operator=(const FbxStatus& rhs);
-
-    /** Equivalence operator.
-      * \param rhs Status object to compare.
-      * \return \c True if all the members of \e rhs are equal to this instance members and \c False otherwise.
-      */
-    bool            operator==(const FbxStatus& rhs)    const   { return (mCode == rhs.mCode); }
-    /** Equivalence operator.
-      * \param pCode Status code to compare.
-      * \return \c True if the code member of this instance equals \e pCode and \c False otherwise.
-      */
-    bool            operator==(const EStatusCode pCode) const   { return (mCode == pCode); }
-    /** Non-Equivalence operator.
-      * \param rhs Status object to compare.
-      * \return \c True if at least one member of \e rhs is not equal to this instance member and \c True otherwise.
-      */
-    bool            operator!=(const FbxStatus& rhs)    const   { return (mCode != rhs.mCode); }
-    /** Non-Equivalence operator.
-      * \param rhs Status code to compare.
-      * \return \c True if the code member of this instance equals \e rhs and \c False otherwise.
-      */
-    bool            operator!=(const EStatusCode rhs)   const   { return (mCode != rhs); }
-
-    /** The conversion operator that converts a FbxStatus object to bool.
-      *	The result it returns will be \c True if the FbxStatus does not contain
-      * an error, and \c False if it does.
-      */
-    operator        bool() const    { return mCode==eSuccess; }
-
-    /** Determines whether there is an error.
-      * \return \c True if an error occured and \c False if the operation was sucessful.
-      */
-    bool            Error() const   { return !this->operator bool(); }
-
-    //! Clear error code and message from the instance. After this call, it will behave as if it contained eSuccess.
-    void            Clear();
-
-    //! Retrieve the type of error that occurred, as specified in the enumeration.
-    EStatusCode     GetCode() const { return mCode; }
-
-    /** Change the current code of the instance.
-      * \param rhs New code value.
-      */
-    void            SetCode(const EStatusCode rhs);
-
-    /** Change the current code of the instance.
-      * \param rhs New code value.
-      * \param pErrorMsg Optional error description string. This string can have formatting characters
-      *                  The function will use the vsnprintf function to assemble the final string
-      *                  using an internal buffer of 4096 characters.
-      */
-    void            SetCode(const EStatusCode rhs, const char* pErrorMsg, ...);
-
-    //! Get the error message string corresponding to the current code.
-    const char*     GetErrorString() const;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-private:
-    EStatusCode     mCode;
-    FbxString       mErrorString;
-
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_STATUS_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxstatus.h
+#ifndef _FBXSDK_CORE_BASE_STATUS_H_
+#define _FBXSDK_CORE_BASE_STATUS_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxstring.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** This class facilitates the testing/reporting of errors.  It encapsulates the
+  * status code and the internal FBXSDK error code as returned by the API functions.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxStatus
+{
+public:
+
+
+    //! Available status codes.
+    enum EStatusCode {        
+        eSuccess = 0,                           //!< Operation was successful
+        eFailure,                               //!< Operation failed
+        eInsufficientMemory,                    //!< Operation failed due to insufficient memory
+        eInvalidParameter,                      //!< An invalid parameter was provided
+        eIndexOutOfRange,                       //!< Index value outside the valid range
+        ePasswordError,                         //!< Operation on FBX file password failed
+        eInvalidFileVersion,                    //!< File version not supported (anymore or yet)
+        eInvalidFile                            //!< Operation on the file access failed
+    };
+
+    //! Default constructor.
+    FbxStatus();
+
+    FbxStatus(EStatusCode pCode);
+    FbxStatus(const FbxStatus& rhs);
+
+    FbxStatus&      operator=(const FbxStatus& rhs);
+
+    /** Equivalence operator.
+      * \param rhs Status object to compare.
+      * \return \c True if all the members of \e rhs are equal to this instance members and \c False otherwise.
+      */
+    bool            operator==(const FbxStatus& rhs)    const   { return (mCode == rhs.mCode); }
+    /** Equivalence operator.
+      * \param pCode Status code to compare.
+      * \return \c True if the code member of this instance equals \e pCode and \c False otherwise.
+      */
+    bool            operator==(const EStatusCode pCode) const   { return (mCode == pCode); }
+    /** Non-Equivalence operator.
+      * \param rhs Status object to compare.
+      * \return \c True if at least one member of \e rhs is not equal to this instance member and \c True otherwise.
+      */
+    bool            operator!=(const FbxStatus& rhs)    const   { return (mCode != rhs.mCode); }
+    /** Non-Equivalence operator.
+      * \param rhs Status code to compare.
+      * \return \c True if the code member of this instance equals \e rhs and \c False otherwise.
+      */
+    bool            operator!=(const EStatusCode rhs)   const   { return (mCode != rhs); }
+
+    /** The conversion operator that converts a FbxStatus object to bool.
+      *	The result it returns will be \c True if the FbxStatus does not contain
+      * an error, and \c False if it does.
+      */
+    operator        bool() const    { return mCode==eSuccess; }
+
+    /** Determines whether there is an error.
+      * \return \c True if an error occured and \c False if the operation was sucessful.
+      */
+    bool            Error() const   { return !this->operator bool(); }
+
+    //! Clear error code and message from the instance. After this call, it will behave as if it contained eSuccess.
+    void            Clear();
+
+    //! Retrieve the type of error that occurred, as specified in the enumeration.
+    EStatusCode     GetCode() const { return mCode; }
+
+    /** Change the current code of the instance.
+      * \param rhs New code value.
+      */
+    void            SetCode(const EStatusCode rhs);
+
+    /** Change the current code of the instance.
+      * \param rhs New code value.
+      * \param pErrorMsg Optional error description string. This string can have formatting characters
+      *                  The function will use the vsnprintf function to assemble the final string
+      *                  using an internal buffer of 4096 characters.
+      */
+    void            SetCode(const EStatusCode rhs, const char* pErrorMsg, ...);
+
+    //! Get the error message string corresponding to the current code.
+    const char*     GetErrorString() const;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+    EStatusCode     mCode;
+    FbxString       mErrorString;
+
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS */
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_STATUS_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 505 - 505
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxstring.h


+ 368 - 368
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxstringlist.h

@@ -1,368 +1,368 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxstringlist.h
-#ifndef _FBXSDK_CORE_BASE_STRING_LIST_H_
-#define _FBXSDK_CORE_BASE_STRING_LIST_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxarray.h>
-#include <fbxsdk/core/base/fbxstring.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-//! Wraps a string (FbxString) and a pointer (FbxHandle).
-class FbxStringListItem
-{
-public:
-    FbxStringListItem(){ mReference = 0; }
-    FbxStringListItem(const char* pString, FbxHandle pRef=0){ mString = pString; mReference = pRef; }
-
-    FbxString	mString; 
-    FbxHandle		mReference;
-};
-
-inline int FbxCompareStringListSort(const void* E1, const void* E2)
-{
-	return FBXSDK_stricmp((*(FbxStringListItem**)E1)->mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
-}
-
-inline int FbxCompareStringListFindEqual(const void* E1, const void* E2)
-{
-	return FBXSDK_stricmp((*(FbxStringListItem*)E1).mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
-}
-
-inline int FbxCompareCaseSensitiveStringList(const void *E1,const void *E2)
-{
-	return strcmp((*(FbxStringListItem*)E1).mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
-}
- 
-//! Base class of FbxStringList.
-template <class Type> class FbxStringListT
-{
-protected:
-    FbxArray<Type*> mList;
-
-public:
-	/**
-     * \name Operation With The Array 
-     */
-   //@{
-
-	 /** Append a item at the end of the array.
-    * \return Index of appended pointer.
-    */
-    int		AddItem( Type* pItem )		{ return mList.Add( pItem ); }
-
-    /** Insert a item in the array.
-    * \param pIndex Position where to insert the item.
-    * \param pItem  Item to insert.
-    * \return Position of the inserted item in the array.
-    * \remarks If the given index is out of range, the pointer is appended at the end of the array.
-    */
-	int		InsertItemAt( int pIndex, Type* pItem )	{ return mList.InsertAt( pIndex, pItem ); }
-
-	//! Access item at given index.
-    Type*   GetItemAt( int pIndex )	const	{ return mList[pIndex]; }
-
-	/** Find first matching item.
-    * \return Index of first matching item found or -1 if there is no matching element.
-    */
-    int		FindItem( Type* pItem )	const	{ return mList.Find( pItem ); }
-	//}@
-
-public : 
-    /**
-     * \name Constructor and Destructor
-     */
-   //@{
-
-	//! Default constructor.
-    FbxStringListT()
-    {
-    }
-
-	//! Destructor.
-    virtual ~FbxStringListT() { Clear(); }
-	//}@
-
-	//!Remove the item at the end of the array and delete the associated object.
-    void RemoveLast() { RemoveAt( mList.GetCount()-1 ); }
-
-	/** Get number of items in the array.
-     * \return The number of items in the array.
-     */
-    inline int		GetCount() const { return mList.GetCount(); }
-
-	//! Access the string in the item at given index.
-    FbxString&   operator[](int pIndex) { return mList[pIndex]->mString; }
-
-    //! Access the value of reference in the item at given index.
-    FbxHandle		GetReferenceAt(int pIndex) const { return mList[pIndex]->mReference; }
-
-    //! Set the value of reference at given index.        
-    void			SetReferenceAt(int pIndex, FbxHandle pRef) { mList[pIndex]->mReference = pRef; }
-
-	//! Access the pointer of string at given index.
-    char*		GetStringAt(int pIndex) const { if (pIndex<mList.GetCount()) return mList[pIndex]->mString.Buffer(); else return NULL; }
-    
-	//! Set string at given index.
-	virtual bool	SetStringAt(int pIndex, const char* pString) 
-    { 
-	    if (pIndex<mList.GetCount()) 
-	    {
-		    mList[pIndex]->mString = pString; 
-		    return true;
-	    } else return false; 
-    }
-   
-    /** Find first matching item.
-    * \return Index of first matching item found or -1 if  there is no
-    * matching element.
-    */
-    int Find( Type& pItem ) const
-    { 
-	    for (int Count=0; Count<mList.GetCount(); Count++) {
-		    if (mList[Count]==&pItem) {
-			    return Count;
-		    }
-	    }
-	    return -1;
-    }
-
-	/** Find first matching item which has the same reference as given parameter.
-    * \return Index of first matching item found or -1 if  there is no
-    * matching element.
-    */
-    int FindIndex( FbxHandle pReference ) const
-    { 
-	    for (int Count=0; Count<mList.GetCount(); Count++) {
-		    if (mList[Count]->mReference==pReference) {
-			    return Count;
-		    }
-	    }
-	    return -1;
-    }
-
-	/** Find first matching item in array whose string address is the same as given pointer.
-    * \return Index of first matching item found or -1 if  there is no
-    * matching element.
-    */
-    int FindIndex( const char* pString ) const
-    { 
-	    for (int lCount=0; lCount<mList.GetCount(); lCount++) {
-		    if (mList[lCount]->mString==pString) {
-			    return lCount;
-		    }
-	    }
-	    return -1;
-    }
-
-	/** Access the value of reference of the first matching item in array 
-	* whose string address is the same as given pointer.
-    * \return The value of reference of the first matching item found or NULL if  there is no
-    * matching element.
-    */
-    FbxHandle FindReference(const char* pString ) const
-    {
-    int lIndex = FindIndex( pString );
-	    if (lIndex!=-1) {
-		    return mList[lIndex]->mReference;
-	    }
-	    return 0; // NULL
-    }
-
-	//! Remove first matching item.
-    bool Remove ( Type& pItem )
-    {
-    int lIndex = Find( pItem );
-        if (lIndex>=0) {
-		    RemoveAt( lIndex );
-		    return true;
-	    }
-	    return false;
-    }
-
-	//! Remove first matching item in array whose string address is the same as given pointer.
-    bool Remove (const char* pString )
-    {
-    int lIndex = FindIndex( pString );
-        if (lIndex>=0) {
-		    RemoveAt( lIndex );
-		    return true;
-	    }
-	    return false;
-    }
-
-	//! Remove first matching item.
-    bool RemoveIt ( Type& pItem )
-    {
-    int lIndex = Find( pItem );
-        if (lIndex>=0) {
-		    RemoveAt( lIndex );
-		    return true;
-	    }
-	    return false;
-    }
-
-	//! Sort the array by the string of every item,not case sensitive.
-    void Sort( )
-    {
-	    qsort( &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListSort );
-    }
-
-    /** Find first matching item which has the same string as given parameter,not case sensitive.
-    * \return the pointer of matching item found or NULL if  there is no
-    * matching element.
-	* \remark To cast the returned pointer to the FbxStringListItem you need a double indirection: (FbxStringListItem**)
-    */
-	void* FindEqual(const char* pString) const
-    {
-    FbxStringListItem Key(pString);  
-    
-	    if (mList.GetCount() != 0)
-	    {
-		    return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListFindEqual );
-	    }
-	    else
-	    {
-		    return NULL ;
-	    }
-    }
-
-	/** Find first matching item which has the same string as given parameter, case sensitive.
-    * \return the pointer of matching item found or NULL if  there is no
-    * matching element.
-	* \remark To cast the returned pointer to the FbxStringListItem you need a double indirection: (FbxStringListItem**)
-    */
-	void* FindCaseSensitive(const char* pString) const
-	{
-    FbxStringListItem Key(pString);  
-    
-	    if (mList.GetCount() != 0)
-	    {
-		    return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*), FbxCompareCaseSensitiveStringList);
-	    }
-	    else
-	    {
-		    return NULL ;
-	    }
-	
-	}
-
-
-	//! Add a new item at the end of array.
-    int Add( const char* pString, FbxHandle pItem=0 ) 
-    { 
-	    return InsertAt( mList.GetCount(),pString,pItem ); 
-    }
-
-    virtual int InsertAt( int pIndex, const char* pString, FbxHandle pItem=0 ) 
-    { 
-	    return mList.InsertAt( pIndex,FbxNew< Type >( pString,(FbxHandle)pItem )); 
-    }
-
-    /** Remove the item at the given position in the array and delete the associated object.
-    * \param pIndex Position of the item to remove.
-    * \remarks If the index is not valid, nothing is performed. Otherwise,
-    * the item is removed from the array and the items are shifted to fill the
-    * empty slot.
-    */
-	virtual void RemoveAt(int pIndex)
-    { 
-	    FbxDelete(mList.RemoveAt(pIndex));
-    }
-
-	//! Delete the array.
-    virtual void Clear()
-    {
-		FbxArrayDelete(mList);
-    }
-
-	/** Get the string of all the item.
-    * \return The text of string, each item's string separated by '~'.
-    */
-   virtual void GetText(FbxString& pText) const
-    {
-	    int	lCount;
-	    for (lCount=0; lCount<mList.GetCount(); lCount++) 
-        {
-            pText += mList[lCount]->mString;
-            if (lCount<mList.GetCount()-1) 
-            {               
-                pText += "~";               
-            }
-	    }
-    }
-
-    /** Clear the array and set the array's new items with the substring separated by '~' from the given string.
-    * \param pList The string which used to generate the new items.
-	* \return The last index of the item in the new array.
-    * \remarks The number of items in the new array is the same as the number of substrings, 
-	* and the string of each item is decided by the content of each substring.
-    */ 
-    virtual int SetText(const char* pList)
-    {
-    int		lPos=0, lOldPos = 0;
-    int		lLastIndex=0;
-    FbxString	lName=pList;
-
-	    Clear();
-	    for (lPos=0; lName.Buffer()[lPos]!=0; lPos++) {
-    	    if (lName.Buffer()[lPos]=='~') {
-        	    lName.Buffer()[lPos]=0;
-        	    lLastIndex = Add(lName.Buffer()+lOldPos);
-        	    lOldPos=lPos+1;
-    	    }
-	    }
-
-	    if(lOldPos != lPos)
-	    {
-	        lLastIndex = Add(lName.Buffer()+lOldPos);
-	    }
-	    return lLastIndex;
-    } 
-
-
-};
-
-/** Array that stores pairs of FbxString and a pointer.
-  */
-class FBXSDK_DLL FbxStringList : public FbxStringListT<FbxStringListItem>
-{
-public:
-	/**
-	  * \name Constructors
-	  */
-	//@{
-		//! Default constructor.
-		FbxStringList(); 
-
-		//! Copy constructor.
-		FbxStringList( const FbxStringList& pOriginal );
-	//@}
-
-	/**
-	 * \name Assignment Operators
-	 */
-	//@{
-		//! FbxStringList assignment function.
-		void CopyFrom( const FbxStringList* pOriginal  );
-
-		//! FbxStringList assignment operator.
-		FbxStringList& operator=(const FbxStringList& pOriginal);
-	//@}
-};
-	  
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_STRING_LIST_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxstringlist.h
+#ifndef _FBXSDK_CORE_BASE_STRING_LIST_H_
+#define _FBXSDK_CORE_BASE_STRING_LIST_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxarray.h>
+#include <fbxsdk/core/base/fbxstring.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+//! Wraps a string (FbxString) and a pointer (FbxHandle).
+class FbxStringListItem
+{
+public:
+    FbxStringListItem(){ mReference = 0; }
+    FbxStringListItem(const char* pString, FbxHandle pRef=0){ mString = pString; mReference = pRef; }
+
+    FbxString	mString; 
+    FbxHandle		mReference;
+};
+
+inline int FbxCompareStringListSort(const void* E1, const void* E2)
+{
+	return FBXSDK_stricmp((*(FbxStringListItem**)E1)->mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
+}
+
+inline int FbxCompareStringListFindEqual(const void* E1, const void* E2)
+{
+	return FBXSDK_stricmp((*(FbxStringListItem*)E1).mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
+}
+
+inline int FbxCompareCaseSensitiveStringList(const void *E1,const void *E2)
+{
+	return strcmp((*(FbxStringListItem*)E1).mString.Buffer(), (*(FbxStringListItem**)E2)->mString.Buffer());
+}
+ 
+//! Base class of FbxStringList.
+template <class Type> class FbxStringListT
+{
+protected:
+    FbxArray<Type*> mList;
+
+public:
+	/**
+     * \name Operation With The Array 
+     */
+   //@{
+
+	 /** Append a item at the end of the array.
+    * \return Index of appended pointer.
+    */
+    int		AddItem( Type* pItem )		{ return mList.Add( pItem ); }
+
+    /** Insert a item in the array.
+    * \param pIndex Position where to insert the item.
+    * \param pItem  Item to insert.
+    * \return Position of the inserted item in the array.
+    * \remarks If the given index is out of range, the pointer is appended at the end of the array.
+    */
+	int		InsertItemAt( int pIndex, Type* pItem )	{ return mList.InsertAt( pIndex, pItem ); }
+
+	//! Access item at given index.
+    Type*   GetItemAt( int pIndex )	const	{ return mList[pIndex]; }
+
+	/** Find first matching item.
+    * \return Index of first matching item found or -1 if there is no matching element.
+    */
+    int		FindItem( Type* pItem )	const	{ return mList.Find( pItem ); }
+	//}@
+
+public : 
+    /**
+     * \name Constructor and Destructor
+     */
+   //@{
+
+	//! Default constructor.
+    FbxStringListT()
+    {
+    }
+
+	//! Destructor.
+    virtual ~FbxStringListT() { Clear(); }
+	//}@
+
+	//!Remove the item at the end of the array and delete the associated object.
+    void RemoveLast() { RemoveAt( mList.GetCount()-1 ); }
+
+	/** Get number of items in the array.
+     * \return The number of items in the array.
+     */
+    inline int		GetCount() const { return mList.GetCount(); }
+
+	//! Access the string in the item at given index.
+    FbxString&   operator[](int pIndex) { return mList[pIndex]->mString; }
+
+    //! Access the value of reference in the item at given index.
+    FbxHandle		GetReferenceAt(int pIndex) const { return mList[pIndex]->mReference; }
+
+    //! Set the value of reference at given index.        
+    void			SetReferenceAt(int pIndex, FbxHandle pRef) { mList[pIndex]->mReference = pRef; }
+
+	//! Access the pointer of string at given index.
+    char*		GetStringAt(int pIndex) const { if (pIndex<mList.GetCount()) return mList[pIndex]->mString.Buffer(); else return NULL; }
+    
+	//! Set string at given index.
+	virtual bool	SetStringAt(int pIndex, const char* pString) 
+    { 
+	    if (pIndex<mList.GetCount()) 
+	    {
+		    mList[pIndex]->mString = pString; 
+		    return true;
+	    } else return false; 
+    }
+   
+    /** Find first matching item.
+    * \return Index of first matching item found or -1 if  there is no
+    * matching element.
+    */
+    int Find( Type& pItem ) const
+    { 
+	    for (int Count=0; Count<mList.GetCount(); Count++) {
+		    if (mList[Count]==&pItem) {
+			    return Count;
+		    }
+	    }
+	    return -1;
+    }
+
+	/** Find first matching item which has the same reference as given parameter.
+    * \return Index of first matching item found or -1 if  there is no
+    * matching element.
+    */
+    int FindIndex( FbxHandle pReference ) const
+    { 
+	    for (int Count=0; Count<mList.GetCount(); Count++) {
+		    if (mList[Count]->mReference==pReference) {
+			    return Count;
+		    }
+	    }
+	    return -1;
+    }
+
+	/** Find first matching item in array whose string address is the same as given pointer.
+    * \return Index of first matching item found or -1 if  there is no
+    * matching element.
+    */
+    int FindIndex( const char* pString ) const
+    { 
+	    for (int lCount=0; lCount<mList.GetCount(); lCount++) {
+		    if (mList[lCount]->mString==pString) {
+			    return lCount;
+		    }
+	    }
+	    return -1;
+    }
+
+	/** Access the value of reference of the first matching item in array 
+	* whose string address is the same as given pointer.
+    * \return The value of reference of the first matching item found or NULL if  there is no
+    * matching element.
+    */
+    FbxHandle FindReference(const char* pString ) const
+    {
+    int lIndex = FindIndex( pString );
+	    if (lIndex!=-1) {
+		    return mList[lIndex]->mReference;
+	    }
+	    return 0; // NULL
+    }
+
+	//! Remove first matching item.
+    bool Remove ( Type& pItem )
+    {
+    int lIndex = Find( pItem );
+        if (lIndex>=0) {
+		    RemoveAt( lIndex );
+		    return true;
+	    }
+	    return false;
+    }
+
+	//! Remove first matching item in array whose string address is the same as given pointer.
+    bool Remove (const char* pString )
+    {
+    int lIndex = FindIndex( pString );
+        if (lIndex>=0) {
+		    RemoveAt( lIndex );
+		    return true;
+	    }
+	    return false;
+    }
+
+	//! Remove first matching item.
+    bool RemoveIt ( Type& pItem )
+    {
+    int lIndex = Find( pItem );
+        if (lIndex>=0) {
+		    RemoveAt( lIndex );
+		    return true;
+	    }
+	    return false;
+    }
+
+	//! Sort the array by the string of every item,not case sensitive.
+    void Sort( )
+    {
+	    qsort( &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListSort );
+    }
+
+    /** Find first matching item which has the same string as given parameter,not case sensitive.
+    * \return the pointer of matching item found or NULL if  there is no
+    * matching element.
+	* \remark To cast the returned pointer to the FbxStringListItem you need a double indirection: (FbxStringListItem**)
+    */
+	void* FindEqual(const char* pString) const
+    {
+    FbxStringListItem Key(pString);  
+    
+	    if (mList.GetCount() != 0)
+	    {
+		    return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*),FbxCompareStringListFindEqual );
+	    }
+	    else
+	    {
+		    return NULL ;
+	    }
+    }
+
+	/** Find first matching item which has the same string as given parameter, case sensitive.
+    * \return the pointer of matching item found or NULL if  there is no
+    * matching element.
+	* \remark To cast the returned pointer to the FbxStringListItem you need a double indirection: (FbxStringListItem**)
+    */
+	void* FindCaseSensitive(const char* pString) const
+	{
+    FbxStringListItem Key(pString);  
+    
+	    if (mList.GetCount() != 0)
+	    {
+		    return bsearch ( &Key, &(mList.GetArray()[0]),mList.GetCount(),sizeof(FbxStringListItem*), FbxCompareCaseSensitiveStringList);
+	    }
+	    else
+	    {
+		    return NULL ;
+	    }
+	
+	}
+
+
+	//! Add a new item at the end of array.
+    int Add( const char* pString, FbxHandle pItem=0 ) 
+    { 
+	    return InsertAt( mList.GetCount(),pString,pItem ); 
+    }
+
+    virtual int InsertAt( int pIndex, const char* pString, FbxHandle pItem=0 ) 
+    { 
+	    return mList.InsertAt( pIndex,FbxNew< Type >( pString,(FbxHandle)pItem )); 
+    }
+
+    /** Remove the item at the given position in the array and delete the associated object.
+    * \param pIndex Position of the item to remove.
+    * \remarks If the index is not valid, nothing is performed. Otherwise,
+    * the item is removed from the array and the items are shifted to fill the
+    * empty slot.
+    */
+	virtual void RemoveAt(int pIndex)
+    { 
+	    FbxDelete(mList.RemoveAt(pIndex));
+    }
+
+	//! Delete the array.
+    virtual void Clear()
+    {
+		FbxArrayDelete(mList);
+    }
+
+	/** Get the string of all the item.
+    * \return The text of string, each item's string separated by '~'.
+    */
+   virtual void GetText(FbxString& pText) const
+    {
+	    int	lCount;
+	    for (lCount=0; lCount<mList.GetCount(); lCount++) 
+        {
+            pText += mList[lCount]->mString;
+            if (lCount<mList.GetCount()-1) 
+            {               
+                pText += "~";               
+            }
+	    }
+    }
+
+    /** Clear the array and set the array's new items with the substring separated by '~' from the given string.
+    * \param pList The string which used to generate the new items.
+	* \return The last index of the item in the new array.
+    * \remarks The number of items in the new array is the same as the number of substrings, 
+	* and the string of each item is decided by the content of each substring.
+    */ 
+    virtual int SetText(const char* pList)
+    {
+    int		lPos=0, lOldPos = 0;
+    int		lLastIndex=0;
+    FbxString	lName=pList;
+
+	    Clear();
+	    for (lPos=0; lName.Buffer()[lPos]!=0; lPos++) {
+    	    if (lName.Buffer()[lPos]=='~') {
+        	    lName.Buffer()[lPos]=0;
+        	    lLastIndex = Add(lName.Buffer()+lOldPos);
+        	    lOldPos=lPos+1;
+    	    }
+	    }
+
+	    if(lOldPos != lPos)
+	    {
+	        lLastIndex = Add(lName.Buffer()+lOldPos);
+	    }
+	    return lLastIndex;
+    } 
+
+
+};
+
+/** Array that stores pairs of FbxString and a pointer.
+  */
+class FBXSDK_DLL FbxStringList : public FbxStringListT<FbxStringListItem>
+{
+public:
+	/**
+	  * \name Constructors
+	  */
+	//@{
+		//! Default constructor.
+		FbxStringList(); 
+
+		//! Copy constructor.
+		FbxStringList( const FbxStringList& pOriginal );
+	//@}
+
+	/**
+	 * \name Assignment Operators
+	 */
+	//@{
+		//! FbxStringList assignment function.
+		void CopyFrom( const FbxStringList* pOriginal  );
+
+		//! FbxStringList assignment operator.
+		FbxStringList& operator=(const FbxStringList& pOriginal);
+	//@}
+};
+	  
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_STRING_LIST_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 648 - 648
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxtime.h


+ 99 - 99
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxtimecode.h

@@ -1,99 +1,99 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxtimecode.h
-#ifndef _FBXSDK_CORE_BASE_TIMECODE_H_
-#define _FBXSDK_CORE_BASE_TIMECODE_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#define FBXSDK_TC_ZERO					FBXSDK_LONGLONG(0)  
-#define FBXSDK_TC_EPSILON				FBXSDK_LONGLONG(1)
-#define FBXSDK_TC_MINFINITY				FBXSDK_LONGLONG(-0x7fffffffffffffff)
-#define FBXSDK_TC_INFINITY				FBXSDK_LONGLONG(0x7fffffffffffffff)
-#define FBXSDK_TC_FIX_DEN				FBXSDK_LONGLONG(100000000)
-
-#define FBXSDK_TC_MILLISECOND			FBXSDK_LONGLONG(46186158)
-#define FBXSDK_TC_SECOND				FbxLongLong(FBXSDK_TC_MILLISECOND*1000)
-#define FBXSDK_TC_MINUTE				FbxLongLong(FBXSDK_TC_SECOND*60)
-#define FBXSDK_TC_HOUR					FbxLongLong(FBXSDK_TC_MINUTE*60)
-#define FBXSDK_TC_DAY					FbxLongLong(FBXSDK_TC_HOUR*24)
-
-// Frame @ 30 Hz
-#define FBXSDK_TC_NTSC_FIELD			FbxLongLong(FBXSDK_TC_SECOND/30/2)
-#define FBXSDK_TC_NTSC_FRAME			FbxLongLong(FBXSDK_TC_SECOND/30)
-
-// Frame @ 29.9700299700 Hz
-#define FBXSDK_TC_MNTSC_FIELD			FbxLongLong(FBXSDK_TC_MNTSC_FRAME/2)
-#define FBXSDK_TC_MNTSC_FRAME			FbxLongLong(FBXSDK_TC_SECOND/30*1001/1000)
-#define FBXSDK_TC_MNTSC_2_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*2)
-#define FBXSDK_TC_MNTSC_30_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)
-#define FBXSDK_TC_MNTSC_1798_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1798)		// leap minute
-#define FBXSDK_TC_MNTSC_1800_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1800)		// ~1 minute
-#define FBXSDK_TC_MNTSC_17982_FRAMES	FbxLongLong(FBXSDK_TC_MNTSC_FRAME*17982)	// ~10 minutes
-#define FBXSDK_TC_MNTSC_107892_FRAMES	FbxLongLong(FBXSDK_TC_MNTSC_FRAME*107892)	// ~1 hour
-#define FBXSDK_TC_MNTSC_108000_FRAMES	FbxLongLong(FBXSDK_TC_MNTSC_FRAME*108000)
-
-// For 29.9700299700 non-drop, btw : same values as with 23.976
-#define FBXSDK_TC_MNTSC_1_SECOND		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)		// 1 frame * 30
-#define FBXSDK_TC_MNTSC_1_MINUTE		FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*60)	// 1 minute (1800 frames)
-#define FBXSDK_TC_MNTSC_1_HOUR			FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*3600)	// 1 hour
-
-#define FBXSDK_TC_MNTSC_NUM				FbxULong(FBXSDK_TC_FIX_DEN*1000*30/1001)
-#define FBXSDK_TC_MNTSC_DEN				FBXSDK_TC_FIX_DEN
-
-// Frame @ 25 Hz
-#define FBXSDK_TC_PAL_FIELD				FbxLongLong(FBXSDK_TC_SECOND/25/2)
-#define FBXSDK_TC_PAL_FRAME				FbxLongLong(FBXSDK_TC_SECOND/25)
-
-// Frame @ 24 Hz
-#define FBXSDK_TC_FILM_FRAME			FbxLongLong(FBXSDK_TC_SECOND/24)
-
-// Frame @ 23.9760239760 Hz
-#define FBXSDK_TC_MFILM_FIELD			FbxLongLong(FBXSDK_TC_MFILM_FRAME/2)
-#define FBXSDK_TC_MFILM_FRAME			FbxLongLong(FBXSDK_TC_SECOND/24*1001/1000)
-#define FBXSDK_TC_MFILM_1_SECOND		FbxLongLong(FBXSDK_TC_MFILM_FRAME*24)		// 1 frame * 24   
-#define FBXSDK_TC_MFILM_1_MINUTE		FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*60)	// 1 minute (1440 frames)
-#define FBXSDK_TC_MFILM_1_HOUR			FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*3600)	// 1 hour
-
-#define FBXSDK_TC_MFILM_NUM				FbxULong(FBXSDK_TC_FIX_DEN*1000*24/1001)
-#define FBXSDK_TC_MFILM_DEN				FBXSDK_TC_FIX_DEN
-
-//////////////////////////////////////////////////////////////////////////////////////////
-
-#define FBXSDK_TC_REM(quot, num, den)		((quot) = (num) / (den), (quot) * (den))
-#define FBXSDK_TC_HOUR_REM(quot, num, den)	((quot) = ((num - (-FbxLongLong(num < 0) & (den - 1))) / (den)), (quot) * (den))
-
-FBXSDK_DLL FbxLongLong FbxTCSeconds(FbxLongLong pTime);
-FBXSDK_DLL FbxLongLong FbxTCMinutes(FbxLongLong pTime);
-FBXSDK_DLL FbxLongLong FbxTCHours(FbxLongLong pTime);
-FBXSDK_DLL FbxLongLong FbxTCSetRate(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, FbxLongLong pPeriod);
-FBXSDK_DLL FbxLongLong FbxTCGetRate(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, FbxLongLong pPeriod);
-FBXSDK_DLL FbxLongLong FbxTCSetNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
-FBXSDK_DLL FbxLongLong FbxTCGetNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
-FBXSDK_DLL FbxLongLong FbxTCSetMNTSCnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
-FBXSDK_DLL FbxLongLong FbxTCGetMNTSCnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
-FBXSDK_DLL FbxLongLong FbxTCSetMNTSC_2Xnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
-FBXSDK_DLL FbxLongLong FbxTCGetMNTSC_2Xnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
-FBXSDK_DLL FbxLongLong FbxTCSetMNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
-FBXSDK_DLL FbxLongLong FbxTCGetMNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
-FBXSDK_DLL FbxLongLong FbxTCSetPAL(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
-FBXSDK_DLL FbxLongLong FbxTCGetPAL(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
-FBXSDK_DLL FbxLongLong FbxTCSetFILM(int pHour, int pMinute, int pSecond, FbxLongLong pFrame);
-FBXSDK_DLL FbxLongLong FbxTCGetFILM(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame);
-FBXSDK_DLL FbxLongLong FbxTCSetFILMND(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
-FBXSDK_DLL FbxLongLong FbxTCGetFILMND(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_TIMECODE_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxtimecode.h
+#ifndef _FBXSDK_CORE_BASE_TIMECODE_H_
+#define _FBXSDK_CORE_BASE_TIMECODE_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#define FBXSDK_TC_ZERO					FBXSDK_LONGLONG(0)  
+#define FBXSDK_TC_EPSILON				FBXSDK_LONGLONG(1)
+#define FBXSDK_TC_MINFINITY				FBXSDK_LONGLONG(-0x7fffffffffffffff)
+#define FBXSDK_TC_INFINITY				FBXSDK_LONGLONG(0x7fffffffffffffff)
+#define FBXSDK_TC_FIX_DEN				FBXSDK_LONGLONG(100000000)
+
+#define FBXSDK_TC_MILLISECOND			FBXSDK_LONGLONG(46186158)
+#define FBXSDK_TC_SECOND				FbxLongLong(FBXSDK_TC_MILLISECOND*1000)
+#define FBXSDK_TC_MINUTE				FbxLongLong(FBXSDK_TC_SECOND*60)
+#define FBXSDK_TC_HOUR					FbxLongLong(FBXSDK_TC_MINUTE*60)
+#define FBXSDK_TC_DAY					FbxLongLong(FBXSDK_TC_HOUR*24)
+
+// Frame @ 30 Hz
+#define FBXSDK_TC_NTSC_FIELD			FbxLongLong(FBXSDK_TC_SECOND/30/2)
+#define FBXSDK_TC_NTSC_FRAME			FbxLongLong(FBXSDK_TC_SECOND/30)
+
+// Frame @ 29.9700299700 Hz
+#define FBXSDK_TC_MNTSC_FIELD			FbxLongLong(FBXSDK_TC_MNTSC_FRAME/2)
+#define FBXSDK_TC_MNTSC_FRAME			FbxLongLong(FBXSDK_TC_SECOND/30*1001/1000)
+#define FBXSDK_TC_MNTSC_2_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*2)
+#define FBXSDK_TC_MNTSC_30_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)
+#define FBXSDK_TC_MNTSC_1798_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1798)		// leap minute
+#define FBXSDK_TC_MNTSC_1800_FRAMES		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*1800)		// ~1 minute
+#define FBXSDK_TC_MNTSC_17982_FRAMES	FbxLongLong(FBXSDK_TC_MNTSC_FRAME*17982)	// ~10 minutes
+#define FBXSDK_TC_MNTSC_107892_FRAMES	FbxLongLong(FBXSDK_TC_MNTSC_FRAME*107892)	// ~1 hour
+#define FBXSDK_TC_MNTSC_108000_FRAMES	FbxLongLong(FBXSDK_TC_MNTSC_FRAME*108000)
+
+// For 29.9700299700 non-drop, btw : same values as with 23.976
+#define FBXSDK_TC_MNTSC_1_SECOND		FbxLongLong(FBXSDK_TC_MNTSC_FRAME*30)		// 1 frame * 30
+#define FBXSDK_TC_MNTSC_1_MINUTE		FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*60)	// 1 minute (1800 frames)
+#define FBXSDK_TC_MNTSC_1_HOUR			FbxLongLong(FBXSDK_TC_MNTSC_1_SECOND*3600)	// 1 hour
+
+#define FBXSDK_TC_MNTSC_NUM				FbxULong(FBXSDK_TC_FIX_DEN*1000*30/1001)
+#define FBXSDK_TC_MNTSC_DEN				FBXSDK_TC_FIX_DEN
+
+// Frame @ 25 Hz
+#define FBXSDK_TC_PAL_FIELD				FbxLongLong(FBXSDK_TC_SECOND/25/2)
+#define FBXSDK_TC_PAL_FRAME				FbxLongLong(FBXSDK_TC_SECOND/25)
+
+// Frame @ 24 Hz
+#define FBXSDK_TC_FILM_FRAME			FbxLongLong(FBXSDK_TC_SECOND/24)
+
+// Frame @ 23.9760239760 Hz
+#define FBXSDK_TC_MFILM_FIELD			FbxLongLong(FBXSDK_TC_MFILM_FRAME/2)
+#define FBXSDK_TC_MFILM_FRAME			FbxLongLong(FBXSDK_TC_SECOND/24*1001/1000)
+#define FBXSDK_TC_MFILM_1_SECOND		FbxLongLong(FBXSDK_TC_MFILM_FRAME*24)		// 1 frame * 24   
+#define FBXSDK_TC_MFILM_1_MINUTE		FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*60)	// 1 minute (1440 frames)
+#define FBXSDK_TC_MFILM_1_HOUR			FbxLongLong(FBXSDK_TC_MFILM_1_SECOND*3600)	// 1 hour
+
+#define FBXSDK_TC_MFILM_NUM				FbxULong(FBXSDK_TC_FIX_DEN*1000*24/1001)
+#define FBXSDK_TC_MFILM_DEN				FBXSDK_TC_FIX_DEN
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+#define FBXSDK_TC_REM(quot, num, den)		((quot) = (num) / (den), (quot) * (den))
+#define FBXSDK_TC_HOUR_REM(quot, num, den)	((quot) = ((num - (-FbxLongLong(num < 0) & (den - 1))) / (den)), (quot) * (den))
+
+FBXSDK_DLL FbxLongLong FbxTCSeconds(FbxLongLong pTime);
+FBXSDK_DLL FbxLongLong FbxTCMinutes(FbxLongLong pTime);
+FBXSDK_DLL FbxLongLong FbxTCHours(FbxLongLong pTime);
+FBXSDK_DLL FbxLongLong FbxTCSetRate(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, FbxLongLong pPeriod);
+FBXSDK_DLL FbxLongLong FbxTCGetRate(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, FbxLongLong pPeriod);
+FBXSDK_DLL FbxLongLong FbxTCSetNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
+FBXSDK_DLL FbxLongLong FbxTCGetNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
+FBXSDK_DLL FbxLongLong FbxTCSetMNTSCnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
+FBXSDK_DLL FbxLongLong FbxTCGetMNTSCnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
+FBXSDK_DLL FbxLongLong FbxTCSetMNTSC_2Xnd(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
+FBXSDK_DLL FbxLongLong FbxTCGetMNTSC_2Xnd(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
+FBXSDK_DLL FbxLongLong FbxTCSetMNTSC(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
+FBXSDK_DLL FbxLongLong FbxTCGetMNTSC(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
+FBXSDK_DLL FbxLongLong FbxTCSetPAL(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
+FBXSDK_DLL FbxLongLong FbxTCGetPAL(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
+FBXSDK_DLL FbxLongLong FbxTCSetFILM(int pHour, int pMinute, int pSecond, FbxLongLong pFrame);
+FBXSDK_DLL FbxLongLong FbxTCGetFILM(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame);
+FBXSDK_DLL FbxLongLong FbxTCSetFILMND(int pHour, int pMinute, int pSecond, FbxLongLong pFrame, int pField);
+FBXSDK_DLL FbxLongLong FbxTCGetFILMND(FbxLongLong pTime, int& pHour, int& pMinute, int& pSecond, int& pFrame, int& pField);
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_TIMECODE_H_ */

+ 168 - 168
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/base/fbxutils.h

@@ -1,168 +1,168 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxutils.h
-#ifndef _FBXSDK_CORE_BASE_UTILITIES_H_
-#define _FBXSDK_CORE_BASE_UTILITIES_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxstring.h>
-#include <fbxsdk/core/base/fbxstatus.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-	/** Retrieve the environment variable value.
-	* \return A new string containing the environment variable value. */
-	FBXSDK_DLL FbxString FbxGetEnv(const char* pEnvVar);
-
-	/** Get the application directory
-	* \return The application directory. */
-	FBXSDK_DLL FbxString FbxGetApplicationDirectory();
-#endif
-
-/** Retrieve the system temporary folder path name.
-* \return A new string containing the system temporary folder path name. */
-FBXSDK_DLL FbxString FbxGetSystemTempPath();
-
-/** Override the system temporary folder path name.
-* \param pPathUTF8 The system temporary folder to use for override. */
-FBXSDK_DLL void FbxSetSystemTempPath(const char* pPathUTF8);
-
-/** Retrieve the working directory of the system in UTF8 format.
-* \return A string that contain the current working directory of the system. */
-FBXSDK_DLL FbxString FbxGetCurrentWorkPath();
-
-/** Change the working directory of the system. */
-FBXSDK_DLL void FbxSetCurrentWorkPath(const char* pPath_UTF8);
-
-class FBXSDK_DLL FbxPathUtils
-{
-public:
-	/** Bind together a root path with a file path.
-	  * \param pRootPath The root path that will get binded to the file path.
-	  * \param pFilePath The file path to bind to the root path.
-	  * \param pCleanPath If true, the resulting path will be cleaned via FbxPathUtils::Clean().
-	  * \return Both paths binded together forming a new file path.
-	  * \remark If the file path is already a full valid path, pFilePath is returned.
-	  */
-	static FbxString Bind(const char* pRootPath, const char* pFilePath, bool pCleanPath=true);
-
-	/** Extract the folder name from the given file path.
-	  * \param pFilePath The given file path.
-	  * \return The folder name. If there isn't any '\\' or '/' in  the given file path, it will return pFilePath.
-	  */
-	static FbxString GetFolderName(const char* pFilePath);
-
-	/** Extract file name from the given file path.
-	  * \param pFilePath The given file path.
-	  * \param pWithExtension Decide the file name with extension or without extension.
-	  * If it is true, return the file name with extension;
-	  * if it is false, return the file name without extension.
-	  */
-	static FbxString GetFileName(const char* pFilePath, bool pWithExtension=true);
-
-	/** Extract the file extension in the given file path.
-	  * \param pFilePath The file path to extract the extension.
-	  * \return The file extension without the '.' character.
-	  * \remark Return empty string if the file path doesn't contain a valid extension.
-	  */
-	static FbxString GetExtensionName(const char* pFilePath);
-
-	/** Change or append a file extension to the specified file path.
-	  * \param pFilePath The file path to change the file extension
-	  * \param pExtension The extension to change or append to the file path.
-	  * \return The file path with the file extension changed/added.
-	  * \remark If the file path doesn't end with a valid file name, pFilePath is returned.
-	  */
-	static FbxString ChangeExtension(const char* pFilePath, const char* pExtension);
-
-	//! Test if the given path is relative path, if it is return true.
-	static bool IsRelative(const char* pPath);
-
-	/** Get the given new path's relative path to the given root path.
-	  * \param pRootPath The given root path
-	  * \param pNewPath The given new path. If it is only file name, the default directory is work directory.
-	  * \return The relative path.
-	  * \remarks If the given two paths have the same drive, the function will turn  '\\' in the relative path to  '/'.
-	  */
-	static FbxString GetRelativePath(const char* pRootPath, const char* pNewPath);
-
-	//! Get the given new path's relative path to the given root path.
-	static FbxString GetRelativeFilePath(const char* pRootPath, const char* pNewFilePath);
-
-	/** Get the full path of given path (if the given path is relative path,
-	  * it will take current directory as default root path.)
-	  */
-	static FbxString Resolve(const char* pRelPath);
-
-	//! Clean the redundant and useless denotations in given path name.
-	static FbxString Clean(const char* pPath);
-
-	/** Generate full safe file path name you can use to create new file.
-	  * \param pFolder The folder where the file name should be attempted to be created.
-	  * \param pPrefix The prefix of generated file name.
-	  * \return A valid file path that can safely be used to create a new file.
-	  */
-	static FbxString GenerateFileName(const char* pFolder, const char* pPrefix);
-
-	/** Verify if the specified folder path exist.
-	* \param pFolderPathUTF8 The folder path to test its existance.
-	* \return True if the folder path exist, false otherwise.
-	* \remark This function work for relative paths. It will search from the current work path. */
-	static bool Exist(const char* pFolderPathUTF8);
-
-	/** Create the specified folder path if it doesn't exist.
-	* \param pFolderPathUTF8 The folder path to create, in UTF8 encoding.
-	* \return True if folder path already exist, or if it was successfully created, false otherwise.
-	* \remark This function will create multiple folders if needed, and it also work for relative paths. */
-	static bool Create(const char* pFolderPathUTF8);
-
-	/** Delete the specified folder path and all its content recursively.
-	* \param pFolderPathUTF8 The folder path to delete, in UTF8 encoding.
-	* \return True if folder path was successfully deleted, false otherwise.
-	* \remark This function work for relative paths. It will search from the current work path. */
-	static bool Delete(const char* pFolderPathUTF8);
-
-#ifndef FBXSDK_ENV_WINSTORE
-	/** Verify if the folder contains items or not.
-	* \param pFolderPath_UTF8 The folder path to test if it contains items.
-	* \return True if the folder contain any kind of entry type. */
-	static bool IsEmpty(const char* pFolderPath_UTF8);
-#endif
-};
-
-/** Global accessor to an FbxStatus object.
-* This object is not used internally by the FBX SDK. It is provided for convenience and its usage is shown in the custom reader/writers samples. */
-class FBXSDK_DLL FbxStatusGlobal
-{
-public:
-	static FbxStatus& GetRef() 
-	{ 
-		if( !mStatusPtr )
-		{ 
-			mStatusPtr = FbxNew<FbxStatus>(); 
-		} 
-		return *mStatusPtr; 
-	}
-
-private:
-	FbxStatusGlobal(){ mStatusPtr = NULL; }
-	~FbxStatusGlobal(){ FbxDelete<FbxStatus>(mStatusPtr); }
-	static FbxStatusGlobal sgFbxStatusGlobal;
-	static FbxStatus* mStatusPtr;
-};
-
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_BASE_UTILITIES_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxutils.h
+#ifndef _FBXSDK_CORE_BASE_UTILITIES_H_
+#define _FBXSDK_CORE_BASE_UTILITIES_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxstring.h>
+#include <fbxsdk/core/base/fbxstatus.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+	/** Retrieve the environment variable value.
+	* \return A new string containing the environment variable value. */
+	FBXSDK_DLL FbxString FbxGetEnv(const char* pEnvVar);
+
+	/** Get the application directory
+	* \return The application directory. */
+	FBXSDK_DLL FbxString FbxGetApplicationDirectory();
+#endif
+
+/** Retrieve the system temporary folder path name.
+* \return A new string containing the system temporary folder path name. */
+FBXSDK_DLL FbxString FbxGetSystemTempPath();
+
+/** Override the system temporary folder path name.
+* \param pPathUTF8 The system temporary folder to use for override. */
+FBXSDK_DLL void FbxSetSystemTempPath(const char* pPathUTF8);
+
+/** Retrieve the working directory of the system in UTF8 format.
+* \return A string that contain the current working directory of the system. */
+FBXSDK_DLL FbxString FbxGetCurrentWorkPath();
+
+/** Change the working directory of the system. */
+FBXSDK_DLL void FbxSetCurrentWorkPath(const char* pPath_UTF8);
+
+class FBXSDK_DLL FbxPathUtils
+{
+public:
+	/** Bind together a root path with a file path.
+	  * \param pRootPath The root path that will get binded to the file path.
+	  * \param pFilePath The file path to bind to the root path.
+	  * \param pCleanPath If true, the resulting path will be cleaned via FbxPathUtils::Clean().
+	  * \return Both paths binded together forming a new file path.
+	  * \remark If the file path is already a full valid path, pFilePath is returned.
+	  */
+	static FbxString Bind(const char* pRootPath, const char* pFilePath, bool pCleanPath=true);
+
+	/** Extract the folder name from the given file path.
+	  * \param pFilePath The given file path.
+	  * \return The folder name. If there isn't any '\\' or '/' in  the given file path, it will return pFilePath.
+	  */
+	static FbxString GetFolderName(const char* pFilePath);
+
+	/** Extract file name from the given file path.
+	  * \param pFilePath The given file path.
+	  * \param pWithExtension Decide the file name with extension or without extension.
+	  * If it is true, return the file name with extension;
+	  * if it is false, return the file name without extension.
+	  */
+	static FbxString GetFileName(const char* pFilePath, bool pWithExtension=true);
+
+	/** Extract the file extension in the given file path.
+	  * \param pFilePath The file path to extract the extension.
+	  * \return The file extension without the '.' character.
+	  * \remark Return empty string if the file path doesn't contain a valid extension.
+	  */
+	static FbxString GetExtensionName(const char* pFilePath);
+
+	/** Change or append a file extension to the specified file path.
+	  * \param pFilePath The file path to change the file extension
+	  * \param pExtension The extension to change or append to the file path.
+	  * \return The file path with the file extension changed/added.
+	  * \remark If the file path doesn't end with a valid file name, pFilePath is returned.
+	  */
+	static FbxString ChangeExtension(const char* pFilePath, const char* pExtension);
+
+	//! Test if the given path is relative path, if it is return true.
+	static bool IsRelative(const char* pPath);
+
+	/** Get the given new path's relative path to the given root path.
+	  * \param pRootPath The given root path
+	  * \param pNewPath The given new path. If it is only file name, the default directory is work directory.
+	  * \return The relative path.
+	  * \remarks If the given two paths have the same drive, the function will turn  '\\' in the relative path to  '/'.
+	  */
+	static FbxString GetRelativePath(const char* pRootPath, const char* pNewPath);
+
+	//! Get the given new path's relative path to the given root path.
+	static FbxString GetRelativeFilePath(const char* pRootPath, const char* pNewFilePath);
+
+	/** Get the full path of given path (if the given path is relative path,
+	  * it will take current directory as default root path.)
+	  */
+	static FbxString Resolve(const char* pRelPath);
+
+	//! Clean the redundant and useless denotations in given path name.
+	static FbxString Clean(const char* pPath);
+
+	/** Generate full safe file path name you can use to create new file.
+	  * \param pFolder The folder where the file name should be attempted to be created.
+	  * \param pPrefix The prefix of generated file name.
+	  * \return A valid file path that can safely be used to create a new file.
+	  */
+	static FbxString GenerateFileName(const char* pFolder, const char* pPrefix);
+
+	/** Verify if the specified folder path exist.
+	* \param pFolderPathUTF8 The folder path to test its existance.
+	* \return True if the folder path exist, false otherwise.
+	* \remark This function work for relative paths. It will search from the current work path. */
+	static bool Exist(const char* pFolderPathUTF8);
+
+	/** Create the specified folder path if it doesn't exist.
+	* \param pFolderPathUTF8 The folder path to create, in UTF8 encoding.
+	* \return True if folder path already exist, or if it was successfully created, false otherwise.
+	* \remark This function will create multiple folders if needed, and it also work for relative paths. */
+	static bool Create(const char* pFolderPathUTF8);
+
+	/** Delete the specified folder path and all its content recursively.
+	* \param pFolderPathUTF8 The folder path to delete, in UTF8 encoding.
+	* \return True if folder path was successfully deleted, false otherwise.
+	* \remark This function work for relative paths. It will search from the current work path. */
+	static bool Delete(const char* pFolderPathUTF8);
+
+#ifndef FBXSDK_ENV_WINSTORE
+	/** Verify if the folder contains items or not.
+	* \param pFolderPath_UTF8 The folder path to test if it contains items.
+	* \return True if the folder contain any kind of entry type. */
+	static bool IsEmpty(const char* pFolderPath_UTF8);
+#endif
+};
+
+/** Global accessor to an FbxStatus object.
+* This object is not used internally by the FBX SDK. It is provided for convenience and its usage is shown in the custom reader/writers samples. */
+class FBXSDK_DLL FbxStatusGlobal
+{
+public:
+	static FbxStatus& GetRef() 
+	{ 
+		if( !mStatusPtr )
+		{ 
+			mStatusPtr = FbxNew<FbxStatus>(); 
+		} 
+		return *mStatusPtr; 
+	}
+
+private:
+	FbxStatusGlobal(){ mStatusPtr = NULL; }
+	~FbxStatusGlobal(){ FbxDelete<FbxStatus>(mStatusPtr); }
+	static FbxStatusGlobal sgFbxStatusGlobal;
+	static FbxStatus* mStatusPtr;
+};
+
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_BASE_UTILITIES_H_ */

+ 166 - 166
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxclassid.h

@@ -1,166 +1,166 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxclassid.h
-#ifndef _FBXSDK_CORE_CLASSID_H_
-#define _FBXSDK_CORE_CLASSID_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxClassIdInfo;
-class FbxObject;
-class FbxPropertyHandle;
-class FbxManager;
-
-//! The function pointer type for object constructor functions.
-typedef FbxObject* (*FbxObjectCreateProc)(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
-
-/** Internal class used to differentiate objects during run-time. Essentially, each class has an unique ClassId, that the
-* system can request in order to test if the class match the description. This class implement the necessary tools to be able
-* to perform hierarchic class testing. This means that a class B that inherits from the class A will answer yes to a "Is A"
-* query of type A or B, but will answer no to a class C that can still inherit from A. All class must inherit from FbxObject
-* before they can have their own ClassId. When using the standard macros to create new types of objects in the FBX SDK, a
-* static ClassId will automatically be generated for that new class.
-*
-* When objects are exported to an FBX file, their class type is maintained using 3 sort of strings. They are the Object Type
-* string, the Object Sub Type string and the Object Type Prefix. There is no good or bad way to choose the value of these
-* identifiers, but it is preferable to use meaningful values to keep the ASCII version of FBX readable and easy to understand.
-* \see FbxObject */
-class FBXSDK_DLL FbxClassId
-{
-public:
-	//! Constructor.
-	FbxClassId();
-
-	/** Advanced constructor were we can specify the general parameters for this ClassId.
-	* \param pClassName The name of the class represented.
-	* \param pParentClassId The parent ClassId of this class.
-	* \param pConstructor A function pointer to a construction method for this ClassId.
-	* \param pFBXType The FBX file Object Type string associated to this class.
-	* \param pFBXSubType The FBX file Object Sub Type string associated to this class. */
-	FbxClassId(const char* pClassName, const FbxClassId& pParentClassId, FbxObjectCreateProc pConstructor=0, const char* pFBXType=NULL, const char* pFBXSubType=NULL);
-
-	//! Destructor.
-	void Destroy();
-
-	/** Retrieve the class name.
-	* \return The class identification string name. */
-	const char* GetName() const;
-
-    /** Retrieve the parent ClassId.
-	* \return The parent ClassId. */
-	FbxClassId GetParent() const;
-
-	/** Create an instance of this class.
-	* \param pManager The FBX SDK Manager to be used to instantiate this object. This allow the object to use the same memory manager as the provided manager.
-	* \param pName The name to assign to this new object instance.
-	* \param pFrom An object to clone if it matches the same ClassId. This is an optional parameter.
-	* \return The newly created instance of this class. */
-	FbxObject* Create(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
-
-	/** Override the function pointer method to construct this object.
-	* \param pConstructor A newly defined function pointer to a construction method to replace the existing one.
-	* \return True if the operation was successful. */
-	bool Override(FbxObjectCreateProc pConstructor);
-
-	/** Test if this class is a hierarchical children of the specified class type. This is the standard method to differentiate object classes.
-	* \param pId The class type to test against self.
-	* \return True if the object is a hierarchical children of the type specified.
-	* \remark This function will perform a complete search until it reaches the top level class, but it will stop as soon as one ClassId matches the test. */
-	bool Is(const FbxClassId& pId) const;
-
-	/** Equivalence operator.
-	* \param pClassId The class type to test against self.
-	* \return \c true if the ClassId is exactly the same, \c false otherwise.
-	* \remark This function only perform direct equality test, and doesn't test hierarchic children. */
-	bool operator==(const FbxClassId& pClassId) const;
-
-	/** Inequivalence operator.
-	* \param pClassId The class type to test against self.
-	* \return \c true if the ClassId is not the same, \c false otherwise.
-	* \remark This function only perform direct inequality test, and doesn't test hierarchic children. */
-	bool operator!=(const FbxClassId& pClassId) const;
-
-	/** Retrieve the FBX file Object Type string associated to this class.
-	* \param pAskParent If \c true, retrieve the parent ClassId, but only if self ClassId is not valid.
-	* \return The FBX file Object Type string associated to this class. */
-	const char* GetFbxFileTypeName(bool pAskParent=false) const;
-
-	/** Retrieve the FBX file Object Sub Type string associated to this class.
-	* \return The FBX file Object Sub Type string associated to this class. */
-	const char* GetFbxFileSubTypeName() const;
-
-	/** Find out if self ClassId is valid or not.
-	* \return \c true if self ClassId is valid, \c false otherwise. */
-	inline bool IsValid() const { return mClassInfo ? true : false; }
-    
-	/** Set the Object Type Prefix string associated to this class. This will change the "ObjectTypePrefix::" found in front
-	* of object name in the FBX file. This is useful to differentiate objects by their name without using the Object Type or
-	* Sub Type strings in the file.
-	* \param pObjectTypePrefix The Object Type prefix string. */
-	void SetObjectTypePrefix(const char* pObjectTypePrefix);
-
-	/** Retrieve the Object Type Prefix string associated to this class.
-	* \return The Object Type Prefix string. */
-	const char* GetObjectTypePrefix();
-   
-	/** Retrieve the root property handle of this class. This is useful to access the default property hierarchy for this
-	* class. This allow users to retrieve information such as the default value for all properties of this class.
-	* \return The root property handle for this class. */
-	FbxPropertyHandle* GetRootClassDefaultPropertyHandle();
-
-	/** Increase the instance reference count for this class type.
-	* \return the new count of reference to this class after increment. */
-	int ClassInstanceIncRef();
-
-	/** Decrease the instance reference count for this class type.
-	* \return the new count of reference to this class after decrement. */
-	int ClassInstanceDecRef();
-	 
-	/** Retrieve the instance reference count for this class type.
-	* \return The reference count of this class type. */
-	int GetInstanceRef();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	inline FbxClassIdInfo* GetClassIdInfo() { return mClassInfo; }
-    inline const FbxClassIdInfo* GetClassIdInfo() const { return mClassInfo; }
-
-private:
-	FbxClassId(FbxClassIdInfo* mClassInfo);
-
-	bool SetFbxFileTypeName(const char* pName);
-	bool SetFbxFileSubTypeName(const char* pName);
-
-	FbxClassIdInfo* mClassInfo;
-
-	friend class FbxManager;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-//! Functor to compare FbxClassId
-struct FbxClassIdCompare
-{
-	inline int operator()(const FbxClassId& pKeyA, const FbxClassId& pKeyB) const
-	{
-		const FbxClassIdInfo* lKeyA = pKeyA.GetClassIdInfo();
-		const FbxClassIdInfo* lKeyB = pKeyB.GetClassIdInfo();
-		return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
-	}
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_CLASSID_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxclassid.h
+#ifndef _FBXSDK_CORE_CLASSID_H_
+#define _FBXSDK_CORE_CLASSID_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxClassIdInfo;
+class FbxObject;
+class FbxPropertyHandle;
+class FbxManager;
+
+//! The function pointer type for object constructor functions.
+typedef FbxObject* (*FbxObjectCreateProc)(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
+
+/** Internal class used to differentiate objects during run-time. Essentially, each class has an unique ClassId, that the
+* system can request in order to test if the class match the description. This class implement the necessary tools to be able
+* to perform hierarchic class testing. This means that a class B that inherits from the class A will answer yes to a "Is A"
+* query of type A or B, but will answer no to a class C that can still inherit from A. All class must inherit from FbxObject
+* before they can have their own ClassId. When using the standard macros to create new types of objects in the FBX SDK, a
+* static ClassId will automatically be generated for that new class.
+*
+* When objects are exported to an FBX file, their class type is maintained using 3 sort of strings. They are the Object Type
+* string, the Object Sub Type string and the Object Type Prefix. There is no good or bad way to choose the value of these
+* identifiers, but it is preferable to use meaningful values to keep the ASCII version of FBX readable and easy to understand.
+* \see FbxObject */
+class FBXSDK_DLL FbxClassId
+{
+public:
+	//! Constructor.
+	FbxClassId();
+
+	/** Advanced constructor were we can specify the general parameters for this ClassId.
+	* \param pClassName The name of the class represented.
+	* \param pParentClassId The parent ClassId of this class.
+	* \param pConstructor A function pointer to a construction method for this ClassId.
+	* \param pFBXType The FBX file Object Type string associated to this class.
+	* \param pFBXSubType The FBX file Object Sub Type string associated to this class. */
+	FbxClassId(const char* pClassName, const FbxClassId& pParentClassId, FbxObjectCreateProc pConstructor=0, const char* pFBXType=NULL, const char* pFBXSubType=NULL);
+
+	//! Destructor.
+	void Destroy();
+
+	/** Retrieve the class name.
+	* \return The class identification string name. */
+	const char* GetName() const;
+
+    /** Retrieve the parent ClassId.
+	* \return The parent ClassId. */
+	FbxClassId GetParent() const;
+
+	/** Create an instance of this class.
+	* \param pManager The FBX SDK Manager to be used to instantiate this object. This allow the object to use the same memory manager as the provided manager.
+	* \param pName The name to assign to this new object instance.
+	* \param pFrom An object to clone if it matches the same ClassId. This is an optional parameter.
+	* \return The newly created instance of this class. */
+	FbxObject* Create(FbxManager& pManager, const char* pName, const FbxObject* pFrom);
+
+	/** Override the function pointer method to construct this object.
+	* \param pConstructor A newly defined function pointer to a construction method to replace the existing one.
+	* \return True if the operation was successful. */
+	bool Override(FbxObjectCreateProc pConstructor);
+
+	/** Test if this class is a hierarchical children of the specified class type. This is the standard method to differentiate object classes.
+	* \param pId The class type to test against self.
+	* \return True if the object is a hierarchical children of the type specified.
+	* \remark This function will perform a complete search until it reaches the top level class, but it will stop as soon as one ClassId matches the test. */
+	bool Is(const FbxClassId& pId) const;
+
+	/** Equivalence operator.
+	* \param pClassId The class type to test against self.
+	* \return \c true if the ClassId is exactly the same, \c false otherwise.
+	* \remark This function only perform direct equality test, and doesn't test hierarchic children. */
+	bool operator==(const FbxClassId& pClassId) const;
+
+	/** Inequivalence operator.
+	* \param pClassId The class type to test against self.
+	* \return \c true if the ClassId is not the same, \c false otherwise.
+	* \remark This function only perform direct inequality test, and doesn't test hierarchic children. */
+	bool operator!=(const FbxClassId& pClassId) const;
+
+	/** Retrieve the FBX file Object Type string associated to this class.
+	* \param pAskParent If \c true, retrieve the parent ClassId, but only if self ClassId is not valid.
+	* \return The FBX file Object Type string associated to this class. */
+	const char* GetFbxFileTypeName(bool pAskParent=false) const;
+
+	/** Retrieve the FBX file Object Sub Type string associated to this class.
+	* \return The FBX file Object Sub Type string associated to this class. */
+	const char* GetFbxFileSubTypeName() const;
+
+	/** Find out if self ClassId is valid or not.
+	* \return \c true if self ClassId is valid, \c false otherwise. */
+	inline bool IsValid() const { return mClassInfo ? true : false; }
+    
+	/** Set the Object Type Prefix string associated to this class. This will change the "ObjectTypePrefix::" found in front
+	* of object name in the FBX file. This is useful to differentiate objects by their name without using the Object Type or
+	* Sub Type strings in the file.
+	* \param pObjectTypePrefix The Object Type prefix string. */
+	void SetObjectTypePrefix(const char* pObjectTypePrefix);
+
+	/** Retrieve the Object Type Prefix string associated to this class.
+	* \return The Object Type Prefix string. */
+	const char* GetObjectTypePrefix();
+   
+	/** Retrieve the root property handle of this class. This is useful to access the default property hierarchy for this
+	* class. This allow users to retrieve information such as the default value for all properties of this class.
+	* \return The root property handle for this class. */
+	FbxPropertyHandle* GetRootClassDefaultPropertyHandle();
+
+	/** Increase the instance reference count for this class type.
+	* \return the new count of reference to this class after increment. */
+	int ClassInstanceIncRef();
+
+	/** Decrease the instance reference count for this class type.
+	* \return the new count of reference to this class after decrement. */
+	int ClassInstanceDecRef();
+	 
+	/** Retrieve the instance reference count for this class type.
+	* \return The reference count of this class type. */
+	int GetInstanceRef();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	inline FbxClassIdInfo* GetClassIdInfo() { return mClassInfo; }
+    inline const FbxClassIdInfo* GetClassIdInfo() const { return mClassInfo; }
+
+private:
+	FbxClassId(FbxClassIdInfo* mClassInfo);
+
+	bool SetFbxFileTypeName(const char* pName);
+	bool SetFbxFileSubTypeName(const char* pName);
+
+	FbxClassIdInfo* mClassInfo;
+
+	friend class FbxManager;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+//! Functor to compare FbxClassId
+struct FbxClassIdCompare
+{
+	inline int operator()(const FbxClassId& pKeyA, const FbxClassId& pKeyB) const
+	{
+		const FbxClassIdInfo* lKeyA = pKeyA.GetClassIdInfo();
+		const FbxClassIdInfo* lKeyB = pKeyB.GetClassIdInfo();
+		return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
+	}
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_CLASSID_H_ */

+ 312 - 312
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxconnectionpoint.h

@@ -1,312 +1,312 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxconnectionpoint.h
-#ifndef _FBXSDK_CORE_CONNECTION_POINT_H_
-#define _FBXSDK_CORE_CONNECTION_POINT_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxarray.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FBXSDK_DLL FbxConnection
-{
-public:
-	enum EType
-	{ 
-		eNone = 0,
-		// System or user
-		eSystem = 1 << 0,
-		eUser = 1 << 1,
-		eSystemOrUser = eUser | eSystem,
-		// Type of Link
-		eReference = 1 << 2,
-		eContains = 1 << 3,
-		eData = 1 << 4,
-		eLinkType = eReference | eContains | eData,
-		eDefault = eUser | eReference,
-		eUnidirectional = 1 << 7
-	};
-};
-
-class FbxConnectionPointFilter;
-
-class FBXSDK_DLL FbxConnectionPoint
-{
-public:
-	enum EDirection
-	{ 
-		eDirSrc = 1 << 0,	// Contains sources
-		eDirDst = 1 << 1,	// Contains destinations
-		eDirUni = 1 << 2,	// Connection is not 2 ways
-		eDirBoth = eDirSrc | eDirDst,
-		eDirMask = eDirSrc | eDirDst | eDirUni
-	};
-
-	enum EType
-	{
-		eStandard = 0,
-		eSubConnection = 1 << 3,		// Connect is a sub Connect of another
-		eTypeMask = eSubConnection
-	}; 
-
-	enum EAttribute
-	{
-		eDefault = 0,
-		eCache = 1 << 4,			
-		eAttributeMask = eCache
-	}; 
-
-	enum EAllocFlag
-	{
-		eNotAllocated = 0,
-		eAllocated = 1 << 5,
-		eAllocFlagMask = eAllocated
-	};
-
-	enum ECleanedFlag
-	{
-		eNotCleaned = 0,
-		eCleaned = 1 << 6,
-		eCleanedFlagMask = eCleaned
-	};
-
-	enum EEvent
-	{
-		eSrcConnectRequest,
-		eDstConnectRequest,
-		eSrcConnect,
-		eDstConnect,
-		eSrcConnected,
-		eDstConnected,
-		eSrcDisconnect,
-		eDstDisconnect,
-		eSrcDisconnected,
-		eDstDisconnected,
-		eSrcReplaceBegin,
-		eSrcReplaceEnd,
-		eDstReplaceBegin,
-		eDstReplaceEnd,
-		eSrcReorder,
-		eSrcReordered
-	};
-
-	// Constructor/Destructor	
-	FbxConnectionPoint(void* pData=0);
-	virtual ~FbxConnectionPoint();
-
-	void SetFilter(FbxConnectionPointFilter* pConnectFilter, EType pType=eStandard);
-	void InternalClear();
-
-	//! Clear the ConnectList without any regards to what is connected
-	void WipeConnectionList();
-	void Destroy();
-	void SubConnectRemoveAll();
-
-	inline FbxConnectionPoint*			GetSubOwnerConnect(){ return GetConnectType() == eSubConnection ? mOwner : NULL; }
-	inline FbxConnectionPointFilter*	GetFilter(){ return mFilter; }
-
-	virtual bool		IsInReplace(FbxConnectionPoint* p1, FbxConnectionPoint* p2);
-
-	inline void			SetConnectType(EType pType){ mFlags = (mFlags & ~eTypeMask) | pType; }
-	inline EType		GetConnectType(){ return EType(mFlags & eTypeMask); }
-	inline void			SetDirection(int pDirections){ mFlags = (mFlags & ~eDirMask) | pDirections; }
-	inline EDirection	GetDirection(){ return EDirection(mFlags & eDirMask); }
-	inline void			SetAttribute(int pAttributes){ mFlags = (mFlags & ~eAttributeMask) | pAttributes; }
-	inline EAttribute	GetAttribute(){ return EAttribute(mFlags & eAttributeMask); }
-	inline void			SetAllocatedFlag(bool pBool){ mFlags = ( pBool ) ? mFlags | eAllocated : mFlags & ~eAllocFlagMask; }
-	inline bool			GetAllocatedFlag(){ return ( mFlags & eAllocFlagMask ) ? true : false; }
-	inline void			SetCleanedFlag(bool pBool){ mFlags = ( pBool ) ? mFlags | eCleaned : mFlags & ~eCleanedFlagMask; }
-	inline bool			GetCleanedFlag(){ return ( mFlags & eCleanedFlagMask ) ? true : false; }		
-
-	bool				IsValidSrc(FbxConnectionPoint* pConnect);
-	bool				IsValidDst(FbxConnectionPoint* pConnect);
-	bool				IsValidSrcConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType);
-	bool				IsValidDstConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType);
-	bool				RequestValidSrcConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType );
-	bool				RequestValidDstConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType );
-
-	bool				ConnectSrc(FbxConnectionPoint* pSrc,FbxConnection::EType pConnectionType=FbxConnection::eNone);
-	bool				ConnectDst(FbxConnectionPoint* pDst,FbxConnection::EType pConnectionType=FbxConnection::eNone);
-	bool				ConnectSrcAt(int pDst_SrcIndex, FbxConnectionPoint* pSrc, FbxConnection::EType pConnectionType=FbxConnection::eNone);
-	bool				ConnectDstAt(int pSrc_DstIndex, FbxConnectionPoint* pDst, FbxConnection::EType pConnectionType=FbxConnection::eNone);
-	static bool			ConnectConnect(FbxConnectionPoint* pSrc,FbxConnectionPoint* pDst,FbxConnection::EType pConnectionType);
-	static bool			ConnectAt(FbxConnectionPoint* pSrc, int pSrc_DstIndex, FbxConnectionPoint* pDst, int pDst_SrcIndex, FbxConnection::EType pConnectionType);
-
-	bool				DisconnectDst(FbxConnectionPoint* pSrc);
-	bool				DisconnectSrc(FbxConnectionPoint* pSrc);
-	void				DisconnectAllSrc();
-	void				DisconnectAllDst();
-	static bool			DisconnectConnect(FbxConnectionPoint* pSrc,FbxConnectionPoint* pDst);
-	bool				DisconnectDstAt(int pIndex);
-	bool				DisconnectSrcAt(int pIndex);
-
-	bool				ReplaceInDst(FbxConnectionPoint* pDstOld, FbxConnectionPoint* pDstNew, int pIndexInNew);
-	bool				ReplaceInSrc(FbxConnectionPoint* pSrcOld, FbxConnectionPoint* pSrcNew, int pIndexInNew);
-	bool				ReplaceDstAt(int pIndex, FbxConnectionPoint* pDst);
-	bool				ReplaceSrcAt(int pIndex, FbxConnectionPoint* pSrc);
-	bool				SwapSrc(int pIndexA, int pIndexB);
-
-	/** Change the position of a source Connect.
-	* \param pIndex	Position of the Connect to move.
-	* \param pAtIndex	Position where to move the Connect.
-	* \return			\c True if the Connect was moved.
-	* \remarks After the move, the Connect will be precisely at position pAtIndex.
-	*/
-	bool MoveSrcAt(int pIndex, int pAtIndex);
-
-	/** Change the position of a source Connect.
-	* \param pSrc		Connect to move.
-	* \param pAtSrc	Connect at which position to move.
-	* \return			\c True if the Connect was moved.
-	* \remarks After the move, the Connect will be precisely at the position where pAtSrc was before the move.
-	*/
-	bool MoveSrcAt(FbxConnectionPoint* pSrc, FbxConnectionPoint* pAtSrc);
-
-	// Access services
-	bool IsConnectedSrc(FbxConnectionPoint*);
-	bool IsConnectedDst(FbxConnectionPoint*);
-	inline bool IsConnected(FbxConnectionPoint* pConnect) { return IsConnectedSrc(pConnect) || IsConnectedDst(pConnect); }
-
-	inline int					GetSrcCount() const { return mConnectionList.GetSrcCount(); }
-	inline FbxConnectionPoint*	GetSrc(int pIndex) const { return mConnectionList.GetSrc(pIndex);}
-	inline FbxConnection::EType	GetSrcType(int pIndex) const { return mConnectionList.GetSrcType(pIndex);}
-	inline int					GetDstCount() const { return mConnectionList.GetDstCount(); }
-	inline FbxConnectionPoint*	GetDst(int pIndex) const { return mConnectionList.GetDst(pIndex);}
-	inline FbxConnection::EType	GetDstType(int pIndex) const { return mConnectionList.GetDstType(pIndex);}
-
-	inline int					FindSrc(FbxConnectionPoint* pConnect){ return mConnectionList.FindSrc(pConnect); }
-	inline int					FindDst(FbxConnectionPoint* pConnect){ return mConnectionList.FindDst(pConnect); }
-
-	// Filtered versions	
-	inline int					GetSrcCount(FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrcCount() : GetSrcCount(); }
-	inline FbxConnectionPoint*	GetSrc(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrc(pIndex) : GetSrc(pIndex); }
-	inline FbxConnection::EType	GetSrcType(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrcType(pIndex) : GetSrcType(pIndex); }
-	inline int					GetDstCount(FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDstCount() : GetDstCount(); }
-	inline FbxConnectionPoint*	GetDst(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDst(pIndex): GetDst(pIndex); }
-	inline FbxConnection::EType	GetDstType(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDstType(pIndex) : GetDstType(pIndex); }
-
-	void* GetData(){ return mData; }
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-protected:
-	class ConnectionList
-	{
-	public:
-		ConnectionList();
-		~ConnectionList();
-
-		void					Clear();
-
-		void					InsertSrcAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pType);
-		void					AddSrc(FbxConnectionPoint* pConnect, FbxConnection::EType pType);
-		void					RemoveSrcAt(int pIndex);
-		int						FindSrc(FbxConnectionPoint* pConnect) const;
-		int						GetSrcCount() const; 
-		FbxConnectionPoint*		GetSrc(int pIndex) const;
-		FbxConnection::EType	GetSrcType(int pIndex) const;
-
-		void					InsertDstAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pType);
-		void					AddDst(FbxConnectionPoint* pConnect, FbxConnection::EType pType);
-		void					RemoveDstAt(int pIndex);
-		int						FindDst(FbxConnectionPoint* pConnect) const;
-		int						GetDstCount() const;
-		FbxConnectionPoint*		GetDst(int pIndex) const;
-		FbxConnection::EType	GetDstType(int pIndex) const;
-
-	protected:
-		struct Connection {
-			Connection(FbxConnectionPoint* pPoint, FbxConnection::EType pType) : mPoint(pPoint), mType(pType){}
-			FbxConnectionPoint* mPoint; FbxConnection::EType mType;
-		};
-		FbxArray<Connection>	mSrcList;
-		FbxArray<Connection>	mDstList;
-	};
-
-	void				SubConnectAdd(FbxConnectionPoint* pConnect);
-	void				SubConnectRemove(FbxConnectionPoint* pConnect);
-	FbxConnectionPoint* SubConnectFind(FbxConnectionPointFilter* pFilter);
-	FbxConnectionPoint* SubConnectGetOrCreate(FbxConnectionPointFilter* pFilter);
-	void				SubConnectFill(FbxConnectionPoint*	pConnect);
-
-	virtual	bool		ConnectNotify(EEvent pAction, FbxConnectionPoint* pThis, int pIndex, FbxConnectionPoint* pConnect=NULL, FbxConnection::EType pConnectionType=FbxConnection::eNone, FbxConnectionPoint* pNewConnect=NULL);
-	virtual void		ConnectCleanUp(FbxConnectionPoint* pThis);
-
-	int					FindSrcIndexFromOwnerConnectIndex(FbxConnectionPoint* pOwner, int pOwnerIndex);
-	int					FindDstIndexFromOwnerConnectIndex(FbxConnectionPoint* pOwner, int pOwnerIndex);
-
-	bool				InternalMoveSrcBefore(int pIndex, int pBeforeIndex);
-
-private:
-	inline void			InsertSrcAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType){ mConnectionList.InsertSrcAt(pIndex, pConnect, pConnectionType); }
-	inline void			InsertDstAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType){ mConnectionList.InsertDstAt(pIndex, pConnect, pConnectionType); }
-	inline void			RemoveSrcAt(int pIndex){ mConnectionList.RemoveSrcAt(pIndex); }
-	inline void			RemoveDstAt(int pIndex){ mConnectionList.RemoveDstAt(pIndex); }    	
-
-	static bool			InternalConnectBefore(FbxConnectionPoint* pSrc, FbxConnectionPoint* pSrc_BeforeDst, FbxConnectionPoint* pDst, FbxConnectionPoint* pDst_BeforeSrc, FbxConnection::EType pConnectionType);
-	static bool			UserConnectBefore(FbxConnectionPoint* pSrc, FbxConnectionPoint* pSrc_BeforeDst, FbxConnectionPoint* pDst, FbxConnectionPoint* pDst_BeforeSrc, FbxConnection::EType pConnectionType);
-	static bool			EmitReplaceNotify(FbxConnectionPoint* pDstOwner, FbxConnectionPoint* pSrcOwner, FbxConnectionPoint* pDst, FbxConnectionPoint* pSrc, EEvent pConnectAction, FbxConnectionPoint* pNew);
-
-	virtual bool				SetOwnerConnect(FbxConnectionPoint* pConnect);
-	inline FbxConnectionPoint*	GetOwnerConnect(){ return mOwner;  }
-	bool						ConnectOwnedConnect(FbxConnectionPoint* pConnect);
-	bool						DisconnectOwnedConnect(FbxConnectionPoint* pConnect);
-
-	void*							mData;
-	int								mFlags;
-	FbxConnectionPoint*				mOwner;
-	ConnectionList					mConnectionList;
-	FbxArray<FbxConnectionPoint*>	mSubConnectList;
-	FbxArray<FbxConnectionPoint*>	mSubConnectCreatedList;		
-	FbxConnectionPointFilter*		mFilter;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-/** Class to manage Connect Filter */
-class FBXSDK_DLL FbxConnectionPointFilter
-{
-public: 
-    virtual ~FbxConnectionPointFilter() {};
-    
-	//! Return reference ConnectionPoint filter.
-	virtual FbxConnectionPointFilter* Ref();
-
-	//! Cancel reference
-	virtual void Unref();
-
-	//! Get unique filter ID
-	virtual FbxInt GetUniqueId() const { return 0; }
-
-	/** Judge if the given Connection Point is valid
-	* \param pConnect The given Connection Point.
-	* \return \c True if valid, \c false if not valid. */
-	virtual bool IsValid(FbxConnectionPoint* pConnect) const;
-
-	/** Judge if the given Connection Point is a valid connection
-	* \param pConnect The given Connection Point.
-	* \param pType Connection type.
-	* \return \c True if valid, \c false if not valid. */
-	virtual bool IsValidConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pType) const;
-
-	/** Judge if it is equal with the given  ConnectionPoint filter.
-	* \param pConnectFilter The given  ConnectionPoint filter.
-	* \return \c True if equal, \c false if unequal. */
-	virtual bool IsEqual(FbxConnectionPointFilter* pConnectFilter) const;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_CONNECTION_POINT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxconnectionpoint.h
+#ifndef _FBXSDK_CORE_CONNECTION_POINT_H_
+#define _FBXSDK_CORE_CONNECTION_POINT_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxarray.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FBXSDK_DLL FbxConnection
+{
+public:
+	enum EType
+	{ 
+		eNone = 0,
+		// System or user
+		eSystem = 1 << 0,
+		eUser = 1 << 1,
+		eSystemOrUser = eUser | eSystem,
+		// Type of Link
+		eReference = 1 << 2,
+		eContains = 1 << 3,
+		eData = 1 << 4,
+		eLinkType = eReference | eContains | eData,
+		eDefault = eUser | eReference,
+		eUnidirectional = 1 << 7
+	};
+};
+
+class FbxConnectionPointFilter;
+
+class FBXSDK_DLL FbxConnectionPoint
+{
+public:
+	enum EDirection
+	{ 
+		eDirSrc = 1 << 0,	// Contains sources
+		eDirDst = 1 << 1,	// Contains destinations
+		eDirUni = 1 << 2,	// Connection is not 2 ways
+		eDirBoth = eDirSrc | eDirDst,
+		eDirMask = eDirSrc | eDirDst | eDirUni
+	};
+
+	enum EType
+	{
+		eStandard = 0,
+		eSubConnection = 1 << 3,		// Connect is a sub Connect of another
+		eTypeMask = eSubConnection
+	}; 
+
+	enum EAttribute
+	{
+		eDefault = 0,
+		eCache = 1 << 4,			
+		eAttributeMask = eCache
+	}; 
+
+	enum EAllocFlag
+	{
+		eNotAllocated = 0,
+		eAllocated = 1 << 5,
+		eAllocFlagMask = eAllocated
+	};
+
+	enum ECleanedFlag
+	{
+		eNotCleaned = 0,
+		eCleaned = 1 << 6,
+		eCleanedFlagMask = eCleaned
+	};
+
+	enum EEvent
+	{
+		eSrcConnectRequest,
+		eDstConnectRequest,
+		eSrcConnect,
+		eDstConnect,
+		eSrcConnected,
+		eDstConnected,
+		eSrcDisconnect,
+		eDstDisconnect,
+		eSrcDisconnected,
+		eDstDisconnected,
+		eSrcReplaceBegin,
+		eSrcReplaceEnd,
+		eDstReplaceBegin,
+		eDstReplaceEnd,
+		eSrcReorder,
+		eSrcReordered
+	};
+
+	// Constructor/Destructor	
+	FbxConnectionPoint(void* pData=0);
+	virtual ~FbxConnectionPoint();
+
+	void SetFilter(FbxConnectionPointFilter* pConnectFilter, EType pType=eStandard);
+	void InternalClear();
+
+	//! Clear the ConnectList without any regards to what is connected
+	void WipeConnectionList();
+	void Destroy();
+	void SubConnectRemoveAll();
+
+	inline FbxConnectionPoint*			GetSubOwnerConnect(){ return GetConnectType() == eSubConnection ? mOwner : NULL; }
+	inline FbxConnectionPointFilter*	GetFilter(){ return mFilter; }
+
+	virtual bool		IsInReplace(FbxConnectionPoint* p1, FbxConnectionPoint* p2);
+
+	inline void			SetConnectType(EType pType){ mFlags = (mFlags & ~eTypeMask) | pType; }
+	inline EType		GetConnectType(){ return EType(mFlags & eTypeMask); }
+	inline void			SetDirection(int pDirections){ mFlags = (mFlags & ~eDirMask) | pDirections; }
+	inline EDirection	GetDirection(){ return EDirection(mFlags & eDirMask); }
+	inline void			SetAttribute(int pAttributes){ mFlags = (mFlags & ~eAttributeMask) | pAttributes; }
+	inline EAttribute	GetAttribute(){ return EAttribute(mFlags & eAttributeMask); }
+	inline void			SetAllocatedFlag(bool pBool){ mFlags = ( pBool ) ? mFlags | eAllocated : mFlags & ~eAllocFlagMask; }
+	inline bool			GetAllocatedFlag(){ return ( mFlags & eAllocFlagMask ) ? true : false; }
+	inline void			SetCleanedFlag(bool pBool){ mFlags = ( pBool ) ? mFlags | eCleaned : mFlags & ~eCleanedFlagMask; }
+	inline bool			GetCleanedFlag(){ return ( mFlags & eCleanedFlagMask ) ? true : false; }		
+
+	bool				IsValidSrc(FbxConnectionPoint* pConnect);
+	bool				IsValidDst(FbxConnectionPoint* pConnect);
+	bool				IsValidSrcConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType);
+	bool				IsValidDstConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType);
+	bool				RequestValidSrcConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType );
+	bool				RequestValidDstConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType );
+
+	bool				ConnectSrc(FbxConnectionPoint* pSrc,FbxConnection::EType pConnectionType=FbxConnection::eNone);
+	bool				ConnectDst(FbxConnectionPoint* pDst,FbxConnection::EType pConnectionType=FbxConnection::eNone);
+	bool				ConnectSrcAt(int pDst_SrcIndex, FbxConnectionPoint* pSrc, FbxConnection::EType pConnectionType=FbxConnection::eNone);
+	bool				ConnectDstAt(int pSrc_DstIndex, FbxConnectionPoint* pDst, FbxConnection::EType pConnectionType=FbxConnection::eNone);
+	static bool			ConnectConnect(FbxConnectionPoint* pSrc,FbxConnectionPoint* pDst,FbxConnection::EType pConnectionType);
+	static bool			ConnectAt(FbxConnectionPoint* pSrc, int pSrc_DstIndex, FbxConnectionPoint* pDst, int pDst_SrcIndex, FbxConnection::EType pConnectionType);
+
+	bool				DisconnectDst(FbxConnectionPoint* pSrc);
+	bool				DisconnectSrc(FbxConnectionPoint* pSrc);
+	void				DisconnectAllSrc();
+	void				DisconnectAllDst();
+	static bool			DisconnectConnect(FbxConnectionPoint* pSrc,FbxConnectionPoint* pDst);
+	bool				DisconnectDstAt(int pIndex);
+	bool				DisconnectSrcAt(int pIndex);
+
+	bool				ReplaceInDst(FbxConnectionPoint* pDstOld, FbxConnectionPoint* pDstNew, int pIndexInNew);
+	bool				ReplaceInSrc(FbxConnectionPoint* pSrcOld, FbxConnectionPoint* pSrcNew, int pIndexInNew);
+	bool				ReplaceDstAt(int pIndex, FbxConnectionPoint* pDst);
+	bool				ReplaceSrcAt(int pIndex, FbxConnectionPoint* pSrc);
+	bool				SwapSrc(int pIndexA, int pIndexB);
+
+	/** Change the position of a source Connect.
+	* \param pIndex	Position of the Connect to move.
+	* \param pAtIndex	Position where to move the Connect.
+	* \return			\c True if the Connect was moved.
+	* \remarks After the move, the Connect will be precisely at position pAtIndex.
+	*/
+	bool MoveSrcAt(int pIndex, int pAtIndex);
+
+	/** Change the position of a source Connect.
+	* \param pSrc		Connect to move.
+	* \param pAtSrc	Connect at which position to move.
+	* \return			\c True if the Connect was moved.
+	* \remarks After the move, the Connect will be precisely at the position where pAtSrc was before the move.
+	*/
+	bool MoveSrcAt(FbxConnectionPoint* pSrc, FbxConnectionPoint* pAtSrc);
+
+	// Access services
+	bool IsConnectedSrc(FbxConnectionPoint*);
+	bool IsConnectedDst(FbxConnectionPoint*);
+	inline bool IsConnected(FbxConnectionPoint* pConnect) { return IsConnectedSrc(pConnect) || IsConnectedDst(pConnect); }
+
+	inline int					GetSrcCount() const { return mConnectionList.GetSrcCount(); }
+	inline FbxConnectionPoint*	GetSrc(int pIndex) const { return mConnectionList.GetSrc(pIndex);}
+	inline FbxConnection::EType	GetSrcType(int pIndex) const { return mConnectionList.GetSrcType(pIndex);}
+	inline int					GetDstCount() const { return mConnectionList.GetDstCount(); }
+	inline FbxConnectionPoint*	GetDst(int pIndex) const { return mConnectionList.GetDst(pIndex);}
+	inline FbxConnection::EType	GetDstType(int pIndex) const { return mConnectionList.GetDstType(pIndex);}
+
+	inline int					FindSrc(FbxConnectionPoint* pConnect){ return mConnectionList.FindSrc(pConnect); }
+	inline int					FindDst(FbxConnectionPoint* pConnect){ return mConnectionList.FindDst(pConnect); }
+
+	// Filtered versions	
+	inline int					GetSrcCount(FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrcCount() : GetSrcCount(); }
+	inline FbxConnectionPoint*	GetSrc(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrc(pIndex) : GetSrc(pIndex); }
+	inline FbxConnection::EType	GetSrcType(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetSrcType(pIndex) : GetSrcType(pIndex); }
+	inline int					GetDstCount(FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDstCount() : GetDstCount(); }
+	inline FbxConnectionPoint*	GetDst(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDst(pIndex): GetDst(pIndex); }
+	inline FbxConnection::EType	GetDstType(int pIndex,FbxConnectionPointFilter* pFilter){ return (pFilter) ? SubConnectGetOrCreate(pFilter)->GetDstType(pIndex) : GetDstType(pIndex); }
+
+	void* GetData(){ return mData; }
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+protected:
+	class ConnectionList
+	{
+	public:
+		ConnectionList();
+		~ConnectionList();
+
+		void					Clear();
+
+		void					InsertSrcAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pType);
+		void					AddSrc(FbxConnectionPoint* pConnect, FbxConnection::EType pType);
+		void					RemoveSrcAt(int pIndex);
+		int						FindSrc(FbxConnectionPoint* pConnect) const;
+		int						GetSrcCount() const; 
+		FbxConnectionPoint*		GetSrc(int pIndex) const;
+		FbxConnection::EType	GetSrcType(int pIndex) const;
+
+		void					InsertDstAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pType);
+		void					AddDst(FbxConnectionPoint* pConnect, FbxConnection::EType pType);
+		void					RemoveDstAt(int pIndex);
+		int						FindDst(FbxConnectionPoint* pConnect) const;
+		int						GetDstCount() const;
+		FbxConnectionPoint*		GetDst(int pIndex) const;
+		FbxConnection::EType	GetDstType(int pIndex) const;
+
+	protected:
+		struct Connection {
+			Connection(FbxConnectionPoint* pPoint, FbxConnection::EType pType) : mPoint(pPoint), mType(pType){}
+			FbxConnectionPoint* mPoint; FbxConnection::EType mType;
+		};
+		FbxArray<Connection>	mSrcList;
+		FbxArray<Connection>	mDstList;
+	};
+
+	void				SubConnectAdd(FbxConnectionPoint* pConnect);
+	void				SubConnectRemove(FbxConnectionPoint* pConnect);
+	FbxConnectionPoint* SubConnectFind(FbxConnectionPointFilter* pFilter);
+	FbxConnectionPoint* SubConnectGetOrCreate(FbxConnectionPointFilter* pFilter);
+	void				SubConnectFill(FbxConnectionPoint*	pConnect);
+
+	virtual	bool		ConnectNotify(EEvent pAction, FbxConnectionPoint* pThis, int pIndex, FbxConnectionPoint* pConnect=NULL, FbxConnection::EType pConnectionType=FbxConnection::eNone, FbxConnectionPoint* pNewConnect=NULL);
+	virtual void		ConnectCleanUp(FbxConnectionPoint* pThis);
+
+	int					FindSrcIndexFromOwnerConnectIndex(FbxConnectionPoint* pOwner, int pOwnerIndex);
+	int					FindDstIndexFromOwnerConnectIndex(FbxConnectionPoint* pOwner, int pOwnerIndex);
+
+	bool				InternalMoveSrcBefore(int pIndex, int pBeforeIndex);
+
+private:
+	inline void			InsertSrcAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType){ mConnectionList.InsertSrcAt(pIndex, pConnect, pConnectionType); }
+	inline void			InsertDstAt(int pIndex, FbxConnectionPoint* pConnect, FbxConnection::EType pConnectionType){ mConnectionList.InsertDstAt(pIndex, pConnect, pConnectionType); }
+	inline void			RemoveSrcAt(int pIndex){ mConnectionList.RemoveSrcAt(pIndex); }
+	inline void			RemoveDstAt(int pIndex){ mConnectionList.RemoveDstAt(pIndex); }    	
+
+	static bool			InternalConnectBefore(FbxConnectionPoint* pSrc, FbxConnectionPoint* pSrc_BeforeDst, FbxConnectionPoint* pDst, FbxConnectionPoint* pDst_BeforeSrc, FbxConnection::EType pConnectionType);
+	static bool			UserConnectBefore(FbxConnectionPoint* pSrc, FbxConnectionPoint* pSrc_BeforeDst, FbxConnectionPoint* pDst, FbxConnectionPoint* pDst_BeforeSrc, FbxConnection::EType pConnectionType);
+	static bool			EmitReplaceNotify(FbxConnectionPoint* pDstOwner, FbxConnectionPoint* pSrcOwner, FbxConnectionPoint* pDst, FbxConnectionPoint* pSrc, EEvent pConnectAction, FbxConnectionPoint* pNew);
+
+	virtual bool				SetOwnerConnect(FbxConnectionPoint* pConnect);
+	inline FbxConnectionPoint*	GetOwnerConnect(){ return mOwner;  }
+	bool						ConnectOwnedConnect(FbxConnectionPoint* pConnect);
+	bool						DisconnectOwnedConnect(FbxConnectionPoint* pConnect);
+
+	void*							mData;
+	int								mFlags;
+	FbxConnectionPoint*				mOwner;
+	ConnectionList					mConnectionList;
+	FbxArray<FbxConnectionPoint*>	mSubConnectList;
+	FbxArray<FbxConnectionPoint*>	mSubConnectCreatedList;		
+	FbxConnectionPointFilter*		mFilter;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+/** Class to manage Connect Filter */
+class FBXSDK_DLL FbxConnectionPointFilter
+{
+public: 
+    virtual ~FbxConnectionPointFilter() {};
+    
+	//! Return reference ConnectionPoint filter.
+	virtual FbxConnectionPointFilter* Ref();
+
+	//! Cancel reference
+	virtual void Unref();
+
+	//! Get unique filter ID
+	virtual FbxInt GetUniqueId() const { return 0; }
+
+	/** Judge if the given Connection Point is valid
+	* \param pConnect The given Connection Point.
+	* \return \c True if valid, \c false if not valid. */
+	virtual bool IsValid(FbxConnectionPoint* pConnect) const;
+
+	/** Judge if the given Connection Point is a valid connection
+	* \param pConnect The given Connection Point.
+	* \param pType Connection type.
+	* \return \c True if valid, \c false if not valid. */
+	virtual bool IsValidConnection(FbxConnectionPoint* pConnect, FbxConnection::EType pType) const;
+
+	/** Judge if it is equal with the given  ConnectionPoint filter.
+	* \param pConnectFilter The given  ConnectionPoint filter.
+	* \return \c True if equal, \c false if unequal. */
+	virtual bool IsEqual(FbxConnectionPointFilter* pConnectFilter) const;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_CONNECTION_POINT_H_ */

+ 267 - 267
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxdatatypes.h

@@ -1,267 +1,267 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxdatatypes.h
-#ifndef _FBXSDK_CORE_DATA_TYPES_H_
-#define _FBXSDK_CORE_DATA_TYPES_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxpropertytypes.h>
-#include <fbxsdk/core/fbxpropertyhandle.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** FBX SDK data type class
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxDataType
-{
-public:
-	static FbxDataType Create(const char* pName, const EFbxType pType);
-	static FbxDataType Create(const char* pName, const FbxDataType& pDataType);
-
-	/**
-	  *\name Constructor and Destructor.
-	  */
-	//@{
-		//! Constructor.
-		FbxDataType();
-
-		/** Copy constructor.
-		  * \param pDataType Another FbxDataType object copied to this one.
-		  */
-		FbxDataType(const FbxDataType& pDataType);
-
-		//! Destroy this datatype.
-		void Destroy();
-
-		/** Constructor.
-		  * \param pTypeInfoHandle Type information handle
-		  */
-		FbxDataType(const FbxPropertyHandle& pTypeInfoHandle);
-
-		//! Destructor.
-		~FbxDataType();
-	//@}
-
-	/** Assignment operator
-	  * \param pDataType Datatype whose value is assigned to this datatype.
-	  * \return This datatype
-	  */
-    inline FbxDataType& operator=(const FbxDataType& pDataType){ mTypeInfoHandle=pDataType.mTypeInfoHandle; return *this; }
-
-	/**
-	  * \name boolean operation
-	  */
-	//@{
-		/** Equality operator
-		  * \param pDataType Datatype to compare to.
-		  * \return \c true if equal,\c false otherwise.
-		  */
-		inline bool operator==(const FbxDataType& pDataType) const { return mTypeInfoHandle==pDataType.mTypeInfoHandle; }
-
-		/** Non-equality operator
-		  * \param pDataType Datatype to compare to.
-		  * \return \c true if unequal,\c false otherwise.
-		  */
-		inline bool operator!=(const FbxDataType& pDataType) const { return mTypeInfoHandle!=pDataType.mTypeInfoHandle; }
-	//@}
-
-	/** Test whether this datatype is a valid datatype.
-	  * \return \c true if valid, \c false otherwise.
-	  */
-	inline bool Valid() const { return mTypeInfoHandle.Valid(); }
-
-	/** Test if this datatype is the specified datatype. 
-	  * \param pDataType Datatype to compare to.
-	  * \return \c true if this datatype is the specified datatype, \c false otherwise. 
-	  */
-	inline bool Is(const FbxDataType& pDataType) const { return mTypeInfoHandle.Is(pDataType.mTypeInfoHandle); }
-
-	/** Retrieve this data type.
-	  * \return This data type.
-	  */
-	EFbxType GetType() const;
-
-	/** Retrieve data type name.
-	  * \return Data type name.
-	  */
-	const char* GetName() const;
-
-	/** Retrieve the information handle of this data type.
-	  * \return Information handle of this data type.
-	  */
-	inline const FbxPropertyHandle& GetTypeInfoHandle() const { return mTypeInfoHandle; }
-
-private:
-	FbxPropertyHandle mTypeInfoHandle;
-    friend class FbxManager;
-};
-
-/** Retrieve data type from type enumeration index
-  * \param pType The type enumeration index
-  * \return The corresponding data type
-  */
-FBXSDK_DLL const FbxDataType& FbxGetDataTypeFromEnum(const EFbxType pType);
-
-/** Retrieve data type name string used by I/O operations
-  * \param pDataType The data type instance to retrieve its I/O name string
-  * \return The data type name string
-  * \remark This function is only used during I/O operations. It is not equal
-  *         to the actual data type name.
-  */
-FBXSDK_DLL const char* FbxGetDataTypeNameForIO(const FbxDataType& pDataType);
-
-//! \name Basic Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxUndefinedDT;
-	extern FBXSDK_DLL FbxDataType FbxBoolDT;
-	extern FBXSDK_DLL FbxDataType FbxCharDT;
-	extern FBXSDK_DLL FbxDataType FbxUCharDT;
-	extern FBXSDK_DLL FbxDataType FbxShortDT;
-	extern FBXSDK_DLL FbxDataType FbxUShortDT;
-	extern FBXSDK_DLL FbxDataType FbxIntDT;
-	extern FBXSDK_DLL FbxDataType FbxUIntDT;
-	extern FBXSDK_DLL FbxDataType FbxLongLongDT;
-	extern FBXSDK_DLL FbxDataType FbxULongLongDT;
-	extern FBXSDK_DLL FbxDataType FbxFloatDT;
-	extern FBXSDK_DLL FbxDataType FbxHalfFloatDT;
-	extern FBXSDK_DLL FbxDataType FbxDoubleDT;
-	extern FBXSDK_DLL FbxDataType FbxDouble2DT;
-	extern FBXSDK_DLL FbxDataType FbxDouble3DT;
-	extern FBXSDK_DLL FbxDataType FbxDouble4DT;
-	extern FBXSDK_DLL FbxDataType FbxDouble4x4DT;
-	extern FBXSDK_DLL FbxDataType FbxEnumDT;
-	extern FBXSDK_DLL FbxDataType FbxStringDT;
-	extern FBXSDK_DLL FbxDataType FbxTimeDT;
-	extern FBXSDK_DLL FbxDataType FbxReferenceDT;
-	extern FBXSDK_DLL FbxDataType FbxBlobDT;
-	extern FBXSDK_DLL FbxDataType FbxDistanceDT;
-	extern FBXSDK_DLL FbxDataType FbxDateTimeDT;
-//@}
-
-//! \name Extended Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxColor3DT;
-	extern FBXSDK_DLL FbxDataType FbxColor4DT;
-	extern FBXSDK_DLL FbxDataType FbxCompoundDT;
-	extern FBXSDK_DLL FbxDataType FbxReferenceObjectDT;
-	extern FBXSDK_DLL FbxDataType FbxReferencePropertyDT;
-	extern FBXSDK_DLL FbxDataType FbxVisibilityDT;
-	extern FBXSDK_DLL FbxDataType FbxVisibilityInheritanceDT;
-	extern FBXSDK_DLL FbxDataType FbxUrlDT;
-	extern FBXSDK_DLL FbxDataType FbxXRefUrlDT;
-//@}
-
-//! \name Transform Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxTranslationDT;
-	extern FBXSDK_DLL FbxDataType FbxRotationDT;
-	extern FBXSDK_DLL FbxDataType FbxScalingDT;
-	extern FBXSDK_DLL FbxDataType FbxQuaternionDT;
-	extern FBXSDK_DLL FbxDataType FbxLocalTranslationDT;
-	extern FBXSDK_DLL FbxDataType FbxLocalRotationDT;
-	extern FBXSDK_DLL FbxDataType FbxLocalScalingDT;
-	extern FBXSDK_DLL FbxDataType FbxLocalQuaternionDT;
-	extern FBXSDK_DLL FbxDataType FbxTransformMatrixDT;
-	extern FBXSDK_DLL FbxDataType FbxTranslationMatrixDT;
-	extern FBXSDK_DLL FbxDataType FbxRotationMatrixDT;
-	extern FBXSDK_DLL FbxDataType FbxScalingMatrixDT;
-//@}
-
-//! \name Material Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxMaterialEmissiveDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialEmissiveFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialAmbientDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialAmbientFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialDiffuseDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialDiffuseFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialBumpDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialNormalMapDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialTransparentColorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialTransparencyFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialSpecularDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialSpecularFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialShininessDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialReflectionDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialReflectionFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialDisplacementDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialVectorDisplacementDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialCommonFactorDT;
-	extern FBXSDK_DLL FbxDataType FbxMaterialCommonTextureDT;
-//@}
-
-//! \name Layer Element Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxLayerElementUndefinedDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementNormalDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementBinormalDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementTangentDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementMaterialDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementTextureDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementPolygonGroupDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementUVDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementVertexColorDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementSmoothingDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementCreaseDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementHoleDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementUserDataDT;
-	extern FBXSDK_DLL FbxDataType FbxLayerElementVisibilityDT;
-//@}
-
-//! \name I/O Specialized Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxAliasDT;
-	extern FBXSDK_DLL FbxDataType FbxPresetsDT;
-	extern FBXSDK_DLL FbxDataType FbxStatisticsDT;
-	extern FBXSDK_DLL FbxDataType FbxTextLineDT;
-	extern FBXSDK_DLL FbxDataType FbxUnitsDT;
-	extern FBXSDK_DLL FbxDataType FbxWarningDT;
-	extern FBXSDK_DLL FbxDataType FbxWebDT;
-//@}
-
-//! \name External Support Data Types
-//@{
-	extern FBXSDK_DLL FbxDataType FbxActionDT;
-	extern FBXSDK_DLL FbxDataType FbxCameraIndexDT;
-	extern FBXSDK_DLL FbxDataType FbxCharPtrDT;
-	extern FBXSDK_DLL FbxDataType FbxConeAngleDT;
-	extern FBXSDK_DLL FbxDataType FbxEventDT;
-	extern FBXSDK_DLL FbxDataType FbxFieldOfViewDT;
-	extern FBXSDK_DLL FbxDataType FbxFieldOfViewXDT;
-	extern FBXSDK_DLL FbxDataType FbxFieldOfViewYDT;
-	extern FBXSDK_DLL FbxDataType FbxFogDT;
-	extern FBXSDK_DLL FbxDataType FbxHSBDT;
-	extern FBXSDK_DLL FbxDataType FbxIKReachTranslationDT;
-	extern FBXSDK_DLL FbxDataType FbxIKReachRotationDT;
-	extern FBXSDK_DLL FbxDataType FbxIntensityDT;
-	extern FBXSDK_DLL FbxDataType FbxLookAtDT;
-	extern FBXSDK_DLL FbxDataType FbxOcclusionDT;
-	extern FBXSDK_DLL FbxDataType FbxOpticalCenterXDT;
-	extern FBXSDK_DLL FbxDataType FbxOpticalCenterYDT;
-	extern FBXSDK_DLL FbxDataType FbxOrientationDT;
-	extern FBXSDK_DLL FbxDataType FbxRealDT;
-	extern FBXSDK_DLL FbxDataType FbxRollDT;
-	extern FBXSDK_DLL FbxDataType FbxScalingUVDT;
-	extern FBXSDK_DLL FbxDataType FbxShapeDT;
-	extern FBXSDK_DLL FbxDataType FbxStringListDT;
-	extern FBXSDK_DLL FbxDataType FbxTextureRotationDT;
-	extern FBXSDK_DLL FbxDataType FbxTimeCodeDT;
-	extern FBXSDK_DLL FbxDataType FbxTimeWarpDT;
-	extern FBXSDK_DLL FbxDataType FbxTranslationUVDT;
-	extern FBXSDK_DLL FbxDataType FbxWeightDT;
-//@}
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_DATA_TYPES_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxdatatypes.h
+#ifndef _FBXSDK_CORE_DATA_TYPES_H_
+#define _FBXSDK_CORE_DATA_TYPES_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxpropertytypes.h>
+#include <fbxsdk/core/fbxpropertyhandle.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** FBX SDK data type class
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxDataType
+{
+public:
+	static FbxDataType Create(const char* pName, const EFbxType pType);
+	static FbxDataType Create(const char* pName, const FbxDataType& pDataType);
+
+	/**
+	  *\name Constructor and Destructor.
+	  */
+	//@{
+		//! Constructor.
+		FbxDataType();
+
+		/** Copy constructor.
+		  * \param pDataType Another FbxDataType object copied to this one.
+		  */
+		FbxDataType(const FbxDataType& pDataType);
+
+		//! Destroy this datatype.
+		void Destroy();
+
+		/** Constructor.
+		  * \param pTypeInfoHandle Type information handle
+		  */
+		FbxDataType(const FbxPropertyHandle& pTypeInfoHandle);
+
+		//! Destructor.
+		~FbxDataType();
+	//@}
+
+	/** Assignment operator
+	  * \param pDataType Datatype whose value is assigned to this datatype.
+	  * \return This datatype
+	  */
+    inline FbxDataType& operator=(const FbxDataType& pDataType){ mTypeInfoHandle=pDataType.mTypeInfoHandle; return *this; }
+
+	/**
+	  * \name boolean operation
+	  */
+	//@{
+		/** Equality operator
+		  * \param pDataType Datatype to compare to.
+		  * \return \c true if equal,\c false otherwise.
+		  */
+		inline bool operator==(const FbxDataType& pDataType) const { return mTypeInfoHandle==pDataType.mTypeInfoHandle; }
+
+		/** Non-equality operator
+		  * \param pDataType Datatype to compare to.
+		  * \return \c true if unequal,\c false otherwise.
+		  */
+		inline bool operator!=(const FbxDataType& pDataType) const { return mTypeInfoHandle!=pDataType.mTypeInfoHandle; }
+	//@}
+
+	/** Test whether this datatype is a valid datatype.
+	  * \return \c true if valid, \c false otherwise.
+	  */
+	inline bool Valid() const { return mTypeInfoHandle.Valid(); }
+
+	/** Test if this datatype is the specified datatype. 
+	  * \param pDataType Datatype to compare to.
+	  * \return \c true if this datatype is the specified datatype, \c false otherwise. 
+	  */
+	inline bool Is(const FbxDataType& pDataType) const { return mTypeInfoHandle.Is(pDataType.mTypeInfoHandle); }
+
+	/** Retrieve this data type.
+	  * \return This data type.
+	  */
+	EFbxType GetType() const;
+
+	/** Retrieve data type name.
+	  * \return Data type name.
+	  */
+	const char* GetName() const;
+
+	/** Retrieve the information handle of this data type.
+	  * \return Information handle of this data type.
+	  */
+	inline const FbxPropertyHandle& GetTypeInfoHandle() const { return mTypeInfoHandle; }
+
+private:
+	FbxPropertyHandle mTypeInfoHandle;
+    friend class FbxManager;
+};
+
+/** Retrieve data type from type enumeration index
+  * \param pType The type enumeration index
+  * \return The corresponding data type
+  */
+FBXSDK_DLL const FbxDataType& FbxGetDataTypeFromEnum(const EFbxType pType);
+
+/** Retrieve data type name string used by I/O operations
+  * \param pDataType The data type instance to retrieve its I/O name string
+  * \return The data type name string
+  * \remark This function is only used during I/O operations. It is not equal
+  *         to the actual data type name.
+  */
+FBXSDK_DLL const char* FbxGetDataTypeNameForIO(const FbxDataType& pDataType);
+
+//! \name Basic Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxUndefinedDT;
+	extern FBXSDK_DLL FbxDataType FbxBoolDT;
+	extern FBXSDK_DLL FbxDataType FbxCharDT;
+	extern FBXSDK_DLL FbxDataType FbxUCharDT;
+	extern FBXSDK_DLL FbxDataType FbxShortDT;
+	extern FBXSDK_DLL FbxDataType FbxUShortDT;
+	extern FBXSDK_DLL FbxDataType FbxIntDT;
+	extern FBXSDK_DLL FbxDataType FbxUIntDT;
+	extern FBXSDK_DLL FbxDataType FbxLongLongDT;
+	extern FBXSDK_DLL FbxDataType FbxULongLongDT;
+	extern FBXSDK_DLL FbxDataType FbxFloatDT;
+	extern FBXSDK_DLL FbxDataType FbxHalfFloatDT;
+	extern FBXSDK_DLL FbxDataType FbxDoubleDT;
+	extern FBXSDK_DLL FbxDataType FbxDouble2DT;
+	extern FBXSDK_DLL FbxDataType FbxDouble3DT;
+	extern FBXSDK_DLL FbxDataType FbxDouble4DT;
+	extern FBXSDK_DLL FbxDataType FbxDouble4x4DT;
+	extern FBXSDK_DLL FbxDataType FbxEnumDT;
+	extern FBXSDK_DLL FbxDataType FbxStringDT;
+	extern FBXSDK_DLL FbxDataType FbxTimeDT;
+	extern FBXSDK_DLL FbxDataType FbxReferenceDT;
+	extern FBXSDK_DLL FbxDataType FbxBlobDT;
+	extern FBXSDK_DLL FbxDataType FbxDistanceDT;
+	extern FBXSDK_DLL FbxDataType FbxDateTimeDT;
+//@}
+
+//! \name Extended Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxColor3DT;
+	extern FBXSDK_DLL FbxDataType FbxColor4DT;
+	extern FBXSDK_DLL FbxDataType FbxCompoundDT;
+	extern FBXSDK_DLL FbxDataType FbxReferenceObjectDT;
+	extern FBXSDK_DLL FbxDataType FbxReferencePropertyDT;
+	extern FBXSDK_DLL FbxDataType FbxVisibilityDT;
+	extern FBXSDK_DLL FbxDataType FbxVisibilityInheritanceDT;
+	extern FBXSDK_DLL FbxDataType FbxUrlDT;
+	extern FBXSDK_DLL FbxDataType FbxXRefUrlDT;
+//@}
+
+//! \name Transform Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxTranslationDT;
+	extern FBXSDK_DLL FbxDataType FbxRotationDT;
+	extern FBXSDK_DLL FbxDataType FbxScalingDT;
+	extern FBXSDK_DLL FbxDataType FbxQuaternionDT;
+	extern FBXSDK_DLL FbxDataType FbxLocalTranslationDT;
+	extern FBXSDK_DLL FbxDataType FbxLocalRotationDT;
+	extern FBXSDK_DLL FbxDataType FbxLocalScalingDT;
+	extern FBXSDK_DLL FbxDataType FbxLocalQuaternionDT;
+	extern FBXSDK_DLL FbxDataType FbxTransformMatrixDT;
+	extern FBXSDK_DLL FbxDataType FbxTranslationMatrixDT;
+	extern FBXSDK_DLL FbxDataType FbxRotationMatrixDT;
+	extern FBXSDK_DLL FbxDataType FbxScalingMatrixDT;
+//@}
+
+//! \name Material Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxMaterialEmissiveDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialEmissiveFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialAmbientDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialAmbientFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialDiffuseDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialDiffuseFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialBumpDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialNormalMapDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialTransparentColorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialTransparencyFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialSpecularDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialSpecularFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialShininessDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialReflectionDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialReflectionFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialDisplacementDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialVectorDisplacementDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialCommonFactorDT;
+	extern FBXSDK_DLL FbxDataType FbxMaterialCommonTextureDT;
+//@}
+
+//! \name Layer Element Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxLayerElementUndefinedDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementNormalDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementBinormalDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementTangentDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementMaterialDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementTextureDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementPolygonGroupDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementUVDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementVertexColorDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementSmoothingDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementCreaseDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementHoleDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementUserDataDT;
+	extern FBXSDK_DLL FbxDataType FbxLayerElementVisibilityDT;
+//@}
+
+//! \name I/O Specialized Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxAliasDT;
+	extern FBXSDK_DLL FbxDataType FbxPresetsDT;
+	extern FBXSDK_DLL FbxDataType FbxStatisticsDT;
+	extern FBXSDK_DLL FbxDataType FbxTextLineDT;
+	extern FBXSDK_DLL FbxDataType FbxUnitsDT;
+	extern FBXSDK_DLL FbxDataType FbxWarningDT;
+	extern FBXSDK_DLL FbxDataType FbxWebDT;
+//@}
+
+//! \name External Support Data Types
+//@{
+	extern FBXSDK_DLL FbxDataType FbxActionDT;
+	extern FBXSDK_DLL FbxDataType FbxCameraIndexDT;
+	extern FBXSDK_DLL FbxDataType FbxCharPtrDT;
+	extern FBXSDK_DLL FbxDataType FbxConeAngleDT;
+	extern FBXSDK_DLL FbxDataType FbxEventDT;
+	extern FBXSDK_DLL FbxDataType FbxFieldOfViewDT;
+	extern FBXSDK_DLL FbxDataType FbxFieldOfViewXDT;
+	extern FBXSDK_DLL FbxDataType FbxFieldOfViewYDT;
+	extern FBXSDK_DLL FbxDataType FbxFogDT;
+	extern FBXSDK_DLL FbxDataType FbxHSBDT;
+	extern FBXSDK_DLL FbxDataType FbxIKReachTranslationDT;
+	extern FBXSDK_DLL FbxDataType FbxIKReachRotationDT;
+	extern FBXSDK_DLL FbxDataType FbxIntensityDT;
+	extern FBXSDK_DLL FbxDataType FbxLookAtDT;
+	extern FBXSDK_DLL FbxDataType FbxOcclusionDT;
+	extern FBXSDK_DLL FbxDataType FbxOpticalCenterXDT;
+	extern FBXSDK_DLL FbxDataType FbxOpticalCenterYDT;
+	extern FBXSDK_DLL FbxDataType FbxOrientationDT;
+	extern FBXSDK_DLL FbxDataType FbxRealDT;
+	extern FBXSDK_DLL FbxDataType FbxRollDT;
+	extern FBXSDK_DLL FbxDataType FbxScalingUVDT;
+	extern FBXSDK_DLL FbxDataType FbxShapeDT;
+	extern FBXSDK_DLL FbxDataType FbxStringListDT;
+	extern FBXSDK_DLL FbxDataType FbxTextureRotationDT;
+	extern FBXSDK_DLL FbxDataType FbxTimeCodeDT;
+	extern FBXSDK_DLL FbxDataType FbxTimeWarpDT;
+	extern FBXSDK_DLL FbxDataType FbxTranslationUVDT;
+	extern FBXSDK_DLL FbxDataType FbxWeightDT;
+//@}
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_DATA_TYPES_H_ */

+ 94 - 94
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxemitter.h

@@ -1,94 +1,94 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxemitter.h
-#ifndef _FBXSDK_CORE_EMITTER_H_
-#define _FBXSDK_CORE_EMITTER_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxintrusivelist.h>
-#include <fbxsdk/core/fbxeventhandler.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxListener;
-
-/** Base class to emit event with the specified event type.
-* The event type could be a specific class which derived from FbxEvent. Please read FbxEmitter::Emit() for more details. 
-* Event emitter contains a list of event handlers.
-* FBX object could be used as emitter, since FbxObject is derived from FbxEmitter.
-* Before using emitter to emit an event, one or more event handlers must be added to the handlers list of current emitter.
-* In other words, it's "bind event handlers to emitter".
-* There are two ways to bind event handlers to emitter.
-* \li 1. If you already got an event handler and would like to bind it to current emitter, please call FbxEmitter::AddListener().
-* \li 2. Or you can create an event listener first and then call FbxListener::Bind().
-* It will create an event handler automatically and bind the handler to the specified emitter.
-* It's similar to unbind or remove an even handler. For more details, 
-* \see FbxEmitter::RemoveListener()
-* \see FbxListener::Unbind()
-* \remarks An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, 
-* will receive a signal and take action to process the event data. 
-* \par The whole process of event is:
-* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
-* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
-* \li 3. Once an event is emitted, the listener to this event will receive a signal. 
-* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
-* \note The event data is process by the callback function of event handler.
-* \nosubgrouping
-* \see FbxListener FbxEventHandler FbxEvent FbxEventBase
-*/
-class FBXSDK_DLL FbxEmitter
-{
-public:
-	/** Add the specified event handler to current emitter list.
-	* \param pHandler The event handler will be added to the handlers list of current emitter. */
-	void AddListener(FbxEventHandler& pHandler);
-
-	/** Remove the specified event handler from current emitter list.
-	* \param pHandler The event handler will be removed from the handlers list of current emitter. */
-	void RemoveListener(FbxEventHandler& pHandler);
-
-	/** Emit an event with the specified the event type. One the event is emitted, the listener to this event will receive a signal.
-	* \param pEvent Specify the event type to emit. Could be a specific class which derived from FbxEvent, such as FbxObjectPropertyChanged.
-	* \see FbxEventBase FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
-	* \see FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary */
-	template <typename EventType> void Emit(const EventType& pEvent) const
-	{
-		if( !mData ) return;
-		EventHandlerList::iterator itBegin = mData->mEventHandlerList.Begin();
-		EventHandlerList::iterator itEnd = mData->mEventHandlerList.End();
-		for( EventHandlerList::iterator it = itBegin; it != itEnd; ++it )
-		{
-			if ((*it).GetHandlerEventType() == pEvent.GetTypeId())
-			{
-				(*it).FunctionCall(pEvent);
-			}
-		}
-	}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxEmitter();
-	~FbxEmitter();
-
-protected:
-    typedef FbxIntrusiveList<FbxEventHandler, FbxEventHandler::eEmitter> EventHandlerList;
-    struct EventData { EventHandlerList mEventHandlerList; };
-    EventData* mData;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_EMITTER_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxemitter.h
+#ifndef _FBXSDK_CORE_EMITTER_H_
+#define _FBXSDK_CORE_EMITTER_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxintrusivelist.h>
+#include <fbxsdk/core/fbxeventhandler.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxListener;
+
+/** Base class to emit event with the specified event type.
+* The event type could be a specific class which derived from FbxEvent. Please read FbxEmitter::Emit() for more details. 
+* Event emitter contains a list of event handlers.
+* FBX object could be used as emitter, since FbxObject is derived from FbxEmitter.
+* Before using emitter to emit an event, one or more event handlers must be added to the handlers list of current emitter.
+* In other words, it's "bind event handlers to emitter".
+* There are two ways to bind event handlers to emitter.
+* \li 1. If you already got an event handler and would like to bind it to current emitter, please call FbxEmitter::AddListener().
+* \li 2. Or you can create an event listener first and then call FbxListener::Bind().
+* It will create an event handler automatically and bind the handler to the specified emitter.
+* It's similar to unbind or remove an even handler. For more details, 
+* \see FbxEmitter::RemoveListener()
+* \see FbxListener::Unbind()
+* \remarks An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, 
+* will receive a signal and take action to process the event data. 
+* \par The whole process of event is:
+* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
+* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
+* \li 3. Once an event is emitted, the listener to this event will receive a signal. 
+* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
+* \note The event data is process by the callback function of event handler.
+* \nosubgrouping
+* \see FbxListener FbxEventHandler FbxEvent FbxEventBase
+*/
+class FBXSDK_DLL FbxEmitter
+{
+public:
+	/** Add the specified event handler to current emitter list.
+	* \param pHandler The event handler will be added to the handlers list of current emitter. */
+	void AddListener(FbxEventHandler& pHandler);
+
+	/** Remove the specified event handler from current emitter list.
+	* \param pHandler The event handler will be removed from the handlers list of current emitter. */
+	void RemoveListener(FbxEventHandler& pHandler);
+
+	/** Emit an event with the specified the event type. One the event is emitted, the listener to this event will receive a signal.
+	* \param pEvent Specify the event type to emit. Could be a specific class which derived from FbxEvent, such as FbxObjectPropertyChanged.
+	* \see FbxEventBase FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
+	* \see FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary */
+	template <typename EventType> void Emit(const EventType& pEvent) const
+	{
+		if( !mData ) return;
+		EventHandlerList::iterator itBegin = mData->mEventHandlerList.Begin();
+		EventHandlerList::iterator itEnd = mData->mEventHandlerList.End();
+		for( EventHandlerList::iterator it = itBegin; it != itEnd; ++it )
+		{
+			if ((*it).GetHandlerEventType() == pEvent.GetTypeId())
+			{
+				(*it).FunctionCall(pEvent);
+			}
+		}
+	}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxEmitter();
+	~FbxEmitter();
+
+protected:
+    typedef FbxIntrusiveList<FbxEventHandler, FbxEventHandler::eEmitter> EventHandlerList;
+    struct EventData { EventHandlerList mEventHandlerList; };
+    EventData* mData;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_EMITTER_H_ */

+ 188 - 188
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxevent.h

@@ -1,188 +1,188 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxevent.h
-#ifndef _FBXSDK_CORE_EVENT_H_
-#define _FBXSDK_CORE_EVENT_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxpropertytypes.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** FBX SDK event base class. 
-  * An event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it. 
-  * You can see that like a form that you send to some people. If those people know how to fill the form, they fill it and return
-  * it to you with the right information in it. FBX object could be used as emitter, since FbxObject is derived from FbxEmitter.
-  * Meanwhile, plug-in could be used as listener, since FbxPlugin is derived from FbxListener.
-  * The derived class of FbxEventBase contains a type ID to distinguish different types of events.
-  * FBX object can emit different types of FBX events at different conditions. 
-  * \par The whole process of event is:
-  * \li 1. Create an emitter and a listener, then bind them together via the same event handler.
-  * \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
-  * \li 3. Once an event is emitted, the listener to this event will receive a signal. 
-  * \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
-  * \note The event data is process by the callback function of event handler.
-  * For example, if a certain property of a FBX object is changed, the FBX object(emitter) can emit an event which type is FbxObjectPropertyChanged.
-  * The plug-in(listener) who are listening to FbxObjectPropertyChanged, will receive a signal and take action to process the event data. 
-  * \nosubgrouping
-  * \see FbxEvent FbxEventHandler FbxListener FbxEmitter
-  */
-class FBXSDK_DLL FbxEventBase
-{
-  public:
-	 /**
-	   * \name Constructor and Destructor
-	   */
-     //@{
-	 //!Destructor
-     virtual ~FbxEventBase();
-	 //@}
-
-	 /** Retrieve the event type ID
-	   * \return            type id
-	   */
-     virtual int GetTypeId() const = 0;
-
-	 /** Force events to give us a name
-	   * \return            event name 
-	   */
-     virtual const char* GetEventName() const = 0;   
-
-	protected:
-     static int GetStaticTypeId(const char*);
-};
-
-// Force events to declare a name by using an abstract method, and force them to use 
-// the proper name by making the call from FbxEvent<> go through the private static
-// method.
-#define FBXSDK_EVENT_DECLARE(Class)												\
-	public: virtual const char* GetEventName() const { return FbxEventName(); }	\
-	private: static const char* FbxEventName() { return #Class; }				\
-	friend class FbxEvent<Class>;												\
-
-//
-// Similar to above, but to be used when you've got an event template, and the
-// type is something know to FBX
-//
-#define FBXSDK_EVENT_TYPE_DECLARE(Class, FBXType)                                  \
-  public: virtual const char* GetEventName() const { return FbxEventName(); }      \
-  private:                                                                         \
-     static const char* FbxEventName() {                                           \
-     static FbxString lEventName = FbxString(#Class) + FbxString("<") +                  \
-     FbxGetDataTypeFromEnum(FbxTypeOf(*((const FBXType *)0))).GetName() + ">";               \
-                                                                                   \
-     return lEventName.Buffer();                                                   \
-  }                                                                                \
-  friend class FbxEvent< Class<FBXType> >;
-
-
-
-//This is for templates classes that will uses non fbxtypes in their templates
-//We force the the creation of an UNIQUE string for each types so that we can
-//retrieve the event within multiple DLLs
-
-//to be able to use this, the char EventName[] = "uniqueEventName"; must be declared
-//globally.
-
-#define FBXSDK_EVENT_TEMPLATE_HEADER(ClassName, TemplateName)\
-template < class TemplateName, const char* T > \
-class ClassName: public  FbxEvent< ClassName <TemplateName,T> >\
-{\
-    public: virtual const char* GetEventName() const {return FbxEventName();}\
-    private: static const char* FbxEventName() {\
-    static FbxString lEventName = (FbxString(#ClassName) +"<"+ FbxString(T) +">");\
-    return lEventName.Buffer();\
-    }\
-    friend class FbxEvent< ClassName<TemplateName, T> >;
-
-
-//This is the footer macro, to put at the end to close the template class
-//created by FBXSDK_EVENT_TEMPLATE_HEADER
-#define FBXSDK_EVENT_TEMPLATE_FOOTER()\
-};
-
-/** FBX event class, derived from FbxEventBase, and it contains a type ID for event. 
-* It's a template class. You can derive your own types of even. Such as:
-* \code class FbxEventCustom : public FbxEvent<FbxEventCustom> \endcode
-* \see FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
-* \see FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary
-* \nosubgrouping
-* \remarks A FBX event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it. 
-* An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, 
-* will receive a signal and take action to process the event data. 
-* \par The whole process of event is:
-* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
-* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
-* \li 3. Once an event is emitted, the listener to this event will receive a signal. 
-* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
-* \note The event data is process by the callback function of event handler.
-* \see FbxEventBase FbxEventHandler FbxListener FbxEmitter
-*/
-//---------------------------------------------------
-// T : We use the curiously recurring template pattern
-//          to initialize the typeId of each event type
-template<typename T> class FbxEvent : public FbxEventBase
-{
-public:
-    //!Destructor
-    virtual ~FbxEvent(){}
-
-    /** Update the type ID of current event with the given type ID.
-    * \param pTypeId     the new type ID.
-    */
-    static void ForceTypeId(int pTypeId)
-    {
-        // This is to handle specific cases where the type ID must be hard coded
-        // It is useful for shared event across DLL. We can then guarantee that
-        // The ID of a certain type will always have the same ID
-        smTypeId = pTypeId;
-    }
-
-    /** Retrieve the event type ID
-    * \note This may be called from multiple threads.
-    * \return            type id
-    */
-    virtual int GetTypeId() const 
-    {
-		return GetStaticTypeId();
-    }
-
-    /** Retrieve the event type ID
-    * \return            type id
-    */
-    static int GetStaticTypeId() 
-    {
-        if( !smTypeId )
-        {
-            if( !smTypeId )
-            {
-                // If this does not compile, you need to add 
-                // FBXSDK_EVENT_DECLARE(YourEventClassName) to your class declaration
-                smTypeId  = FbxEventBase::GetStaticTypeId(T::FbxEventName());
-            }
-        }
-
-       return smTypeId;
-    }
-
-private:
-    //! The type ID of event
-    static int smTypeId;
-};
-
-// Static members implementation
-template<typename T> int FbxEvent<T>::smTypeId = 0;
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_EVENT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxevent.h
+#ifndef _FBXSDK_CORE_EVENT_H_
+#define _FBXSDK_CORE_EVENT_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxpropertytypes.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** FBX SDK event base class. 
+  * An event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it. 
+  * You can see that like a form that you send to some people. If those people know how to fill the form, they fill it and return
+  * it to you with the right information in it. FBX object could be used as emitter, since FbxObject is derived from FbxEmitter.
+  * Meanwhile, plug-in could be used as listener, since FbxPlugin is derived from FbxListener.
+  * The derived class of FbxEventBase contains a type ID to distinguish different types of events.
+  * FBX object can emit different types of FBX events at different conditions. 
+  * \par The whole process of event is:
+  * \li 1. Create an emitter and a listener, then bind them together via the same event handler.
+  * \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
+  * \li 3. Once an event is emitted, the listener to this event will receive a signal. 
+  * \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
+  * \note The event data is process by the callback function of event handler.
+  * For example, if a certain property of a FBX object is changed, the FBX object(emitter) can emit an event which type is FbxObjectPropertyChanged.
+  * The plug-in(listener) who are listening to FbxObjectPropertyChanged, will receive a signal and take action to process the event data. 
+  * \nosubgrouping
+  * \see FbxEvent FbxEventHandler FbxListener FbxEmitter
+  */
+class FBXSDK_DLL FbxEventBase
+{
+  public:
+	 /**
+	   * \name Constructor and Destructor
+	   */
+     //@{
+	 //!Destructor
+     virtual ~FbxEventBase();
+	 //@}
+
+	 /** Retrieve the event type ID
+	   * \return            type id
+	   */
+     virtual int GetTypeId() const = 0;
+
+	 /** Force events to give us a name
+	   * \return            event name 
+	   */
+     virtual const char* GetEventName() const = 0;   
+
+	protected:
+     static int GetStaticTypeId(const char*);
+};
+
+// Force events to declare a name by using an abstract method, and force them to use 
+// the proper name by making the call from FbxEvent<> go through the private static
+// method.
+#define FBXSDK_EVENT_DECLARE(Class)												\
+	public: virtual const char* GetEventName() const { return FbxEventName(); }	\
+	private: static const char* FbxEventName() { return #Class; }				\
+	friend class FbxEvent<Class>;												\
+
+//
+// Similar to above, but to be used when you've got an event template, and the
+// type is something know to FBX
+//
+#define FBXSDK_EVENT_TYPE_DECLARE(Class, FBXType)                                  \
+  public: virtual const char* GetEventName() const { return FbxEventName(); }      \
+  private:                                                                         \
+     static const char* FbxEventName() {                                           \
+     static FbxString lEventName = FbxString(#Class) + FbxString("<") +                  \
+     FbxGetDataTypeFromEnum(FbxTypeOf(*((const FBXType *)0))).GetName() + ">";               \
+                                                                                   \
+     return lEventName.Buffer();                                                   \
+  }                                                                                \
+  friend class FbxEvent< Class<FBXType> >;
+
+
+
+//This is for templates classes that will uses non fbxtypes in their templates
+//We force the the creation of an UNIQUE string for each types so that we can
+//retrieve the event within multiple DLLs
+
+//to be able to use this, the char EventName[] = "uniqueEventName"; must be declared
+//globally.
+
+#define FBXSDK_EVENT_TEMPLATE_HEADER(ClassName, TemplateName)\
+template < class TemplateName, const char* T > \
+class ClassName: public  FbxEvent< ClassName <TemplateName,T> >\
+{\
+    public: virtual const char* GetEventName() const {return FbxEventName();}\
+    private: static const char* FbxEventName() {\
+    static FbxString lEventName = (FbxString(#ClassName) +"<"+ FbxString(T) +">");\
+    return lEventName.Buffer();\
+    }\
+    friend class FbxEvent< ClassName<TemplateName, T> >;
+
+
+//This is the footer macro, to put at the end to close the template class
+//created by FBXSDK_EVENT_TEMPLATE_HEADER
+#define FBXSDK_EVENT_TEMPLATE_FOOTER()\
+};
+
+/** FBX event class, derived from FbxEventBase, and it contains a type ID for event. 
+* It's a template class. You can derive your own types of even. Such as:
+* \code class FbxEventCustom : public FbxEvent<FbxEventCustom> \endcode
+* \see FbxObjectPropertyChanged FbxEventReferencedDocument FbxEventPostExport
+* \see FbxEventPostImport FbxEventPreExport FbxEventPreImport FbxEventPopulateSystemLibrary
+* \nosubgrouping
+* \remarks A FBX event is something that is emitted by an emitter, with the goal of being filled by the listener that listen to it. 
+* An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, 
+* will receive a signal and take action to process the event data. 
+* \par The whole process of event is:
+* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
+* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
+* \li 3. Once an event is emitted, the listener to this event will receive a signal. 
+* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
+* \note The event data is process by the callback function of event handler.
+* \see FbxEventBase FbxEventHandler FbxListener FbxEmitter
+*/
+//---------------------------------------------------
+// T : We use the curiously recurring template pattern
+//          to initialize the typeId of each event type
+template<typename T> class FbxEvent : public FbxEventBase
+{
+public:
+    //!Destructor
+    virtual ~FbxEvent(){}
+
+    /** Update the type ID of current event with the given type ID.
+    * \param pTypeId     the new type ID.
+    */
+    static void ForceTypeId(int pTypeId)
+    {
+        // This is to handle specific cases where the type ID must be hard coded
+        // It is useful for shared event across DLL. We can then guarantee that
+        // The ID of a certain type will always have the same ID
+        smTypeId = pTypeId;
+    }
+
+    /** Retrieve the event type ID
+    * \note This may be called from multiple threads.
+    * \return            type id
+    */
+    virtual int GetTypeId() const 
+    {
+		return GetStaticTypeId();
+    }
+
+    /** Retrieve the event type ID
+    * \return            type id
+    */
+    static int GetStaticTypeId() 
+    {
+        if( !smTypeId )
+        {
+            if( !smTypeId )
+            {
+                // If this does not compile, you need to add 
+                // FBXSDK_EVENT_DECLARE(YourEventClassName) to your class declaration
+                smTypeId  = FbxEventBase::GetStaticTypeId(T::FbxEventName());
+            }
+        }
+
+       return smTypeId;
+    }
+
+private:
+    //! The type ID of event
+    static int smTypeId;
+};
+
+// Static members implementation
+template<typename T> int FbxEvent<T>::smTypeId = 0;
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_EVENT_H_ */

+ 129 - 129
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxeventhandler.h

@@ -1,129 +1,129 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxeventhandler.h
-#ifndef _FBXSDK_CORE_EVENT_HANDLER_H_
-#define _FBXSDK_CORE_EVENT_HANDLER_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxevent.h>
-#include <fbxsdk/core/base/fbxintrusivelist.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxListener;
-
-/** Event handler class contains a listener and a callback function.
-* Event handler is used to bind emitter and listener together. Its callback function can process event data.
-* To generate a valid event handler, you can create an event emitter and event listener first and then call FbxListener::Bind().
-* It will create an event handler automatically and bind the handler to the listener and the created emitter. 
-* After that, the emitter and listener are bound together via event handler.
-* \remarks An object(emitter) can emit a certain type of event, the object(listener) who are listening to that type of event, 
-* will receive a signal and take action to process the event data. 
-* \par The whole process of event is:
-* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
-* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
-* \li 3. Once an event is emitted, the listener to this event will receive a signal. 
-* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
-* \note The event data is process by the callback function of event handler.
-* \nosubgrouping
-* \see FbxListener FbxEventBase FbxEvent FbxEmitter
-*/
-class FbxEventHandler
-{
-public:
-	//! Event handler base type.
-	enum EType
-	{
-		eListener,	//!< Listener event handler type.
-		eEmitter,	//!< Emitter event handler type.
-		eCount		//!< Count of different event handler types.
-	};
-
-	/** Get event type of current handler.
-	* \return The type ID of event. */
-	virtual int GetHandlerEventType()=0;
-
-	/** Call function that process event data.
-	* \param pEvent specify the event type. pEvent could be a specific class which derived from FbxEventBase.
-	* \see FbxEventBase */
-	virtual void FunctionCall(const FbxEventBase& pEvent)=0;
-
-	/** Get listener of current handler.
-	* \return A pointer to the listener object. */
-	virtual FbxListener* GetListener()=0;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-    FbxEventHandler(){}
-    virtual ~FbxEventHandler(){}
-
-	FBXSDK_INTRUSIVE_LIST_NODE(FbxEventHandler, eCount);
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-
-template <typename EventType, typename ListenerType> class FbxMemberFuncEventHandler : public FbxEventHandler
-{
-	typedef void (ListenerType::*CallbackFnc)(const EventType*);
-
-public:
-    FbxMemberFuncEventHandler(ListenerType* pListenerInstance, CallbackFnc pFunction) : mListener(pListenerInstance), mFunction(pFunction){}
-	virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }  
-	virtual void FunctionCall(const FbxEventBase& pEvent){ (*mListener.*mFunction)(reinterpret_cast<const EventType*>(&pEvent)); } 
-	virtual FbxListener* GetListener(){ return mListener; }
-
-private:
-	ListenerType*	mListener;
-	CallbackFnc		mFunction;
-};
-
-template <typename EventType, typename ListenerType> class FbxConstMemberFuncEventHandler : public FbxEventHandler
-{
-	typedef void (ListenerType::*CallbackFnc)(const EventType*) const;
-
-public:
-	FbxConstMemberFuncEventHandler(ListenerType* pListenerInstance, CallbackFnc pFunction) : mListener(pListenerInstance), mFunction(pFunction){}
-	virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }    
-	virtual void FunctionCall(const FbxEventBase& pEvent){ (*mListener.*mFunction)(reinterpret_cast<const EventType*>(&pEvent)); }
-	virtual FbxListener* GetListener(){ return mListener; }
-
-private:
-	ListenerType*	mListener;
-	CallbackFnc		mFunction;
-};
-
-template <typename EventType> class FbxFuncEventHandler : public FbxEventHandler
-{
-	typedef void (*CallbackFnc)(const EventType*, FbxListener*);
-
-public:
-	FbxFuncEventHandler(FbxListener* pListener, CallbackFnc pFunction) : mListener(pListener), mFunction(pFunction){}
-	virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }   
-	virtual void FunctionCall(const FbxEventBase& pEvent){ (*mFunction)(reinterpret_cast<const EventType*>(&pEvent), mListener); }
-	virtual FbxListener* GetListener(){ return mListener; }
-
-private:
-	FbxListener*	mListener;
-	CallbackFnc		mFunction;
-};
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_EVENT_HANDLER_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxeventhandler.h
+#ifndef _FBXSDK_CORE_EVENT_HANDLER_H_
+#define _FBXSDK_CORE_EVENT_HANDLER_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxevent.h>
+#include <fbxsdk/core/base/fbxintrusivelist.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxListener;
+
+/** Event handler class contains a listener and a callback function.
+* Event handler is used to bind emitter and listener together. Its callback function can process event data.
+* To generate a valid event handler, you can create an event emitter and event listener first and then call FbxListener::Bind().
+* It will create an event handler automatically and bind the handler to the listener and the created emitter. 
+* After that, the emitter and listener are bound together via event handler.
+* \remarks An object(emitter) can emit a certain type of event, the object(listener) who are listening to that type of event, 
+* will receive a signal and take action to process the event data. 
+* \par The whole process of event is:
+* \li 1. Create an emitter and a listener, then bind them together via the same event handler.
+* \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
+* \li 3. Once an event is emitted, the listener to this event will receive a signal. 
+* \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
+* \note The event data is process by the callback function of event handler.
+* \nosubgrouping
+* \see FbxListener FbxEventBase FbxEvent FbxEmitter
+*/
+class FbxEventHandler
+{
+public:
+	//! Event handler base type.
+	enum EType
+	{
+		eListener,	//!< Listener event handler type.
+		eEmitter,	//!< Emitter event handler type.
+		eCount		//!< Count of different event handler types.
+	};
+
+	/** Get event type of current handler.
+	* \return The type ID of event. */
+	virtual int GetHandlerEventType()=0;
+
+	/** Call function that process event data.
+	* \param pEvent specify the event type. pEvent could be a specific class which derived from FbxEventBase.
+	* \see FbxEventBase */
+	virtual void FunctionCall(const FbxEventBase& pEvent)=0;
+
+	/** Get listener of current handler.
+	* \return A pointer to the listener object. */
+	virtual FbxListener* GetListener()=0;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+    FbxEventHandler(){}
+    virtual ~FbxEventHandler(){}
+
+	FBXSDK_INTRUSIVE_LIST_NODE(FbxEventHandler, eCount);
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template <typename EventType, typename ListenerType> class FbxMemberFuncEventHandler : public FbxEventHandler
+{
+	typedef void (ListenerType::*CallbackFnc)(const EventType*);
+
+public:
+    FbxMemberFuncEventHandler(ListenerType* pListenerInstance, CallbackFnc pFunction) : mListener(pListenerInstance), mFunction(pFunction){}
+	virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }  
+	virtual void FunctionCall(const FbxEventBase& pEvent){ (*mListener.*mFunction)(reinterpret_cast<const EventType*>(&pEvent)); } 
+	virtual FbxListener* GetListener(){ return mListener; }
+
+private:
+	ListenerType*	mListener;
+	CallbackFnc		mFunction;
+};
+
+template <typename EventType, typename ListenerType> class FbxConstMemberFuncEventHandler : public FbxEventHandler
+{
+	typedef void (ListenerType::*CallbackFnc)(const EventType*) const;
+
+public:
+	FbxConstMemberFuncEventHandler(ListenerType* pListenerInstance, CallbackFnc pFunction) : mListener(pListenerInstance), mFunction(pFunction){}
+	virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }    
+	virtual void FunctionCall(const FbxEventBase& pEvent){ (*mListener.*mFunction)(reinterpret_cast<const EventType*>(&pEvent)); }
+	virtual FbxListener* GetListener(){ return mListener; }
+
+private:
+	ListenerType*	mListener;
+	CallbackFnc		mFunction;
+};
+
+template <typename EventType> class FbxFuncEventHandler : public FbxEventHandler
+{
+	typedef void (*CallbackFnc)(const EventType*, FbxListener*);
+
+public:
+	FbxFuncEventHandler(FbxListener* pListener, CallbackFnc pFunction) : mListener(pListener), mFunction(pFunction){}
+	virtual int GetHandlerEventType(){ return EventType::GetStaticTypeId(); }   
+	virtual void FunctionCall(const FbxEventBase& pEvent){ (*mFunction)(reinterpret_cast<const EventType*>(&pEvent), mListener); }
+	virtual FbxListener* GetListener(){ return mListener; }
+
+private:
+	FbxListener*	mListener;
+	CallbackFnc		mFunction;
+};
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_EVENT_HANDLER_H_ */

+ 121 - 121
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxlistener.h

@@ -1,121 +1,121 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxlistener.h
-#ifndef _FBXSDK_CORE_LISTENER_H_
-#define _FBXSDK_CORE_LISTENER_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxemitter.h>
-#include <fbxsdk/core/fbxeventhandler.h>
-#include <fbxsdk/core/base/fbxintrusivelist.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/**FBX SDK listener class. Once an event is emitted by an emitter, a listener should be created to listen to the event. 
-  * The listener could receive a signal and take action to process the event data. 
-  * \note The data will be process by the callback function of FbxListener::Bind().
-  * Plug-in could be used as listener, since FbxPlugin is derived from FbxListener.
-  * To emit event, you could create an emitter and a listener, and then bind them together via event handler.
-  * To listen to an event which is emitted by an emitter, you should bind current listener to the emitter by calling FbxListener::Bind(). 
-  * Event listener contains a list of event handlers.
-  * \remarks An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, 
-  * will receive a signal and take action to process the event data. 
-  * \par The whole process of event is:
-  * \li 1. Create an emitter and a listener, then bind them together via the same event handler.
-  * \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
-  * \li 3. Once an event is emitted, the listener to this event will receive a signal. 
-  * \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
-  * \note The event data is process by the callback function of event handler.
-  * \see FbxEmitter FbxEventHandler FbxEvent FbxEventBase
-  */
-class FBXSDK_DLL FbxListener
-{
-public:
-	/**
-	  * \name Constructor and Destructor
-	  */
-	//@{
-	//!Destructor.
-    ~FbxListener();
-	//!Constructor.
-    FbxListener(){}
-	//@}
-   
-	////////////////////////////////////////////////////////////////////////////////////////
-    /**
-    * \name Bind and unbind methods
-    */
-    //@{
-
-    /**Bind current listener and the specified emitter together via an automatically created event handler. 
-     * An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
-     * After that, the listener can listen to the event which is emitted by the specified emitter.
-	 * \param pEmitter          Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
-	 * \param pFunc             The callback function to process event date.
-	 * \return                  The automatically created event handler.
-	 */
-    template <typename EventType,typename ListenerType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (ListenerType::*pFunc)(const EventType*))
-    {
-        FbxMemberFuncEventHandler<EventType,ListenerType>* eventHandler = 
-            FbxNew< FbxMemberFuncEventHandler<EventType,ListenerType> >(static_cast<ListenerType*>(this),pFunc);
-        pEmitter.AddListener(*eventHandler);
-        mEventHandler.PushBack(*eventHandler);
-        return eventHandler;
-    }
-
-    /**Bind current listener and the specified emitter together via an automatically created event handler. 
-    * An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
-    * After that, the listener can listen to the event which is emitted by the specified emitter.
-    * \param pEmitter          Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
-    * \param pFunc             The callback function to process event date.
-    * \return                  The automatically created event handler.
-    */
-    template <typename EventType,typename ListenerType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (ListenerType::*pFunc)(const EventType*)const)
-    {
-        FbxConstMemberFuncEventHandler<EventType,ListenerType>* eventHandler = 
-                    FbxNew< FbxConstMemberFuncEventHandler<EventType,ListenerType> >(static_cast<ListenerType*>(this),pFunc);
-        pEmitter.AddListener(*eventHandler);
-        mEventHandler.PushBack(*eventHandler);
-        return eventHandler;
-    }
-
-    /**Bind current listener and the specified emitter together via an automatically created event handler. 
-    * An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
-    * After that, the listener can listen to the event which is emitted by the specified emitter.
-    * \param pEmitter          Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
-    * \param pFunc             The callback function to process event date.
-    * \return                  The automatically created event handler.
-    */
-    template <typename EventType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (*pFunc)(const EventType*,FbxListener*))
-    {
-        FbxFuncEventHandler<EventType>* eventHandler = 
-                        FbxNew< FbxFuncEventHandler<EventType> >(this, pFunc);
-        pEmitter.AddListener(*eventHandler);
-        mEventHandler.PushBack(*eventHandler);
-        return eventHandler;
-    }
-    
-	/**Unbind an event handler. The specified event handler will be removed from the handlers list of current listener. 
-	  * \param aBindId       The event handler to unbind.
-	  */
-    void Unbind(const FbxEventHandler* aBindId);
-	//@}
-
-private:
-    typedef FbxIntrusiveList<FbxEventHandler, FbxEventHandler::eListener> EventHandlerList;
-    EventHandlerList mEventHandler;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_LISTENER_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxlistener.h
+#ifndef _FBXSDK_CORE_LISTENER_H_
+#define _FBXSDK_CORE_LISTENER_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxemitter.h>
+#include <fbxsdk/core/fbxeventhandler.h>
+#include <fbxsdk/core/base/fbxintrusivelist.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/**FBX SDK listener class. Once an event is emitted by an emitter, a listener should be created to listen to the event. 
+  * The listener could receive a signal and take action to process the event data. 
+  * \note The data will be process by the callback function of FbxListener::Bind().
+  * Plug-in could be used as listener, since FbxPlugin is derived from FbxListener.
+  * To emit event, you could create an emitter and a listener, and then bind them together via event handler.
+  * To listen to an event which is emitted by an emitter, you should bind current listener to the emitter by calling FbxListener::Bind(). 
+  * Event listener contains a list of event handlers.
+  * \remarks An object(emitter) can emit a certain type of event, the plug-in(listener) who are listening to that type of event, 
+  * will receive a signal and take action to process the event data. 
+  * \par The whole process of event is:
+  * \li 1. Create an emitter and a listener, then bind them together via the same event handler.
+  * \li 2. Emitter can emit an event at certain conditions. The event could be handled by event handler.
+  * \li 3. Once an event is emitted, the listener to this event will receive a signal. 
+  * \li 4. And then the listener could process the event data according to the types of event, by calling event handler.
+  * \note The event data is process by the callback function of event handler.
+  * \see FbxEmitter FbxEventHandler FbxEvent FbxEventBase
+  */
+class FBXSDK_DLL FbxListener
+{
+public:
+	/**
+	  * \name Constructor and Destructor
+	  */
+	//@{
+	//!Destructor.
+    ~FbxListener();
+	//!Constructor.
+    FbxListener(){}
+	//@}
+   
+	////////////////////////////////////////////////////////////////////////////////////////
+    /**
+    * \name Bind and unbind methods
+    */
+    //@{
+
+    /**Bind current listener and the specified emitter together via an automatically created event handler. 
+     * An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
+     * After that, the listener can listen to the event which is emitted by the specified emitter.
+	 * \param pEmitter          Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
+	 * \param pFunc             The callback function to process event date.
+	 * \return                  The automatically created event handler.
+	 */
+    template <typename EventType,typename ListenerType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (ListenerType::*pFunc)(const EventType*))
+    {
+        FbxMemberFuncEventHandler<EventType,ListenerType>* eventHandler = 
+            FbxNew< FbxMemberFuncEventHandler<EventType,ListenerType> >(static_cast<ListenerType*>(this),pFunc);
+        pEmitter.AddListener(*eventHandler);
+        mEventHandler.PushBack(*eventHandler);
+        return eventHandler;
+    }
+
+    /**Bind current listener and the specified emitter together via an automatically created event handler. 
+    * An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
+    * After that, the listener can listen to the event which is emitted by the specified emitter.
+    * \param pEmitter          Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
+    * \param pFunc             The callback function to process event date.
+    * \return                  The automatically created event handler.
+    */
+    template <typename EventType,typename ListenerType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (ListenerType::*pFunc)(const EventType*)const)
+    {
+        FbxConstMemberFuncEventHandler<EventType,ListenerType>* eventHandler = 
+                    FbxNew< FbxConstMemberFuncEventHandler<EventType,ListenerType> >(static_cast<ListenerType*>(this),pFunc);
+        pEmitter.AddListener(*eventHandler);
+        mEventHandler.PushBack(*eventHandler);
+        return eventHandler;
+    }
+
+    /**Bind current listener and the specified emitter together via an automatically created event handler. 
+    * An event handler will be created automatically and added to the handlers list of current listener and the specified emitter.
+    * After that, the listener can listen to the event which is emitted by the specified emitter.
+    * \param pEmitter          Event emitter to bind. Current listener can listen to the event which is emitted by pEmitter.
+    * \param pFunc             The callback function to process event date.
+    * \return                  The automatically created event handler.
+    */
+    template <typename EventType> FbxEventHandler* Bind(FbxEmitter& pEmitter, void (*pFunc)(const EventType*,FbxListener*))
+    {
+        FbxFuncEventHandler<EventType>* eventHandler = 
+                        FbxNew< FbxFuncEventHandler<EventType> >(this, pFunc);
+        pEmitter.AddListener(*eventHandler);
+        mEventHandler.PushBack(*eventHandler);
+        return eventHandler;
+    }
+    
+	/**Unbind an event handler. The specified event handler will be removed from the handlers list of current listener. 
+	  * \param aBindId       The event handler to unbind.
+	  */
+    void Unbind(const FbxEventHandler* aBindId);
+	//@}
+
+private:
+    typedef FbxIntrusiveList<FbxEventHandler, FbxEventHandler::eListener> EventHandlerList;
+    EventHandlerList mEventHandler;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_LISTENER_H_ */

+ 86 - 86
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxloadingstrategy.h

@@ -1,86 +1,86 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxloadingstrategy.h
-#ifndef _FBXSDK_CORE_LOADING_STRATEGY_H_
-#define _FBXSDK_CORE_LOADING_STRATEGY_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/core/fbxplugin.h>
-#include <fbxsdk/core/fbxplugincontainer.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** 
- * Abstract class used to implemented some plug-in loading strategy.
- * A loading strategy dictate how some plug-ins will be loaded for instance.
- * We could have a simple strategy that loads only a single dll on PC. 
- * We could also implement a strategy that load multiple dlls from a directory.
- */
-class FBXSDK_DLL FbxLoadingStrategy : public FbxPluginContainer
-{
-public:
-    /** Result state of loading plug-in.
-     */
-    enum EState
-	{
-        eAllLoaded,     //!< All plug-in are loaded.
-        eNoneLoaded,    //!< No plug-in is loaded, i.e., there is not plug-in to load. 
-        eAllFailed,     //!< All plug-in are failed to load.
-        eSomeFailed     //!< Some plug-ins are loaded but some are failed.
-    };
-
-    /**
-    *\name Public interface
-    */
-    //@{
-		/** Execute the operation of loading the plug-in(s). The way it is executed is determined by the specific implementations.
-		* \param pData  Plug in data that can be access inside the plug-ins.
-		* \return If the plugin loading is successful return \c true, otherwise return \c false.
-		*/
-		EState Load(FbxPluginData& pData);
-
-		/** Execute the operation of unloading the plug-in(s). The way it is executed is determined by the specific implementations.
-		*/
-		void Unload();
-    //@}
-
-protected:
-    /**
-    *\name User implementation
-    */
-    //@{
-		/** Called by the Load method, it contains the specific user implementation strategy to load the desired plug-in(s).
-		* \param pData  Plug in data that can be access inside the plug-ins.
-		* \return If the plugin loading is successful return \c true, otherwise return \c false
-		*/
-		virtual bool SpecificLoad(FbxPluginData& pData) = 0;
-
-		/** Called by the Unload method, it contains the specific user implementation strategy to unload the desired plug-in(s).
-		*/
-		virtual void SpecificUnload(FbxPluginData& pData) = 0;
-    //@}
-
-    //! Whether the plugin is loaded or not.
-    EState mPluginsLoadedState;
-
-private:
-    FbxPluginData mData;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_LOADING_STRATEGY_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxloadingstrategy.h
+#ifndef _FBXSDK_CORE_LOADING_STRATEGY_H_
+#define _FBXSDK_CORE_LOADING_STRATEGY_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/core/fbxplugin.h>
+#include <fbxsdk/core/fbxplugincontainer.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** 
+ * Abstract class used to implemented some plug-in loading strategy.
+ * A loading strategy dictate how some plug-ins will be loaded for instance.
+ * We could have a simple strategy that loads only a single dll on PC. 
+ * We could also implement a strategy that load multiple dlls from a directory.
+ */
+class FBXSDK_DLL FbxLoadingStrategy : public FbxPluginContainer
+{
+public:
+    /** Result state of loading plug-in.
+     */
+    enum EState
+	{
+        eAllLoaded,     //!< All plug-in are loaded.
+        eNoneLoaded,    //!< No plug-in is loaded, i.e., there is not plug-in to load. 
+        eAllFailed,     //!< All plug-in are failed to load.
+        eSomeFailed     //!< Some plug-ins are loaded but some are failed.
+    };
+
+    /**
+    *\name Public interface
+    */
+    //@{
+		/** Execute the operation of loading the plug-in(s). The way it is executed is determined by the specific implementations.
+		* \param pData  Plug in data that can be access inside the plug-ins.
+		* \return If the plugin loading is successful return \c true, otherwise return \c false.
+		*/
+		EState Load(FbxPluginData& pData);
+
+		/** Execute the operation of unloading the plug-in(s). The way it is executed is determined by the specific implementations.
+		*/
+		void Unload();
+    //@}
+
+protected:
+    /**
+    *\name User implementation
+    */
+    //@{
+		/** Called by the Load method, it contains the specific user implementation strategy to load the desired plug-in(s).
+		* \param pData  Plug in data that can be access inside the plug-ins.
+		* \return If the plugin loading is successful return \c true, otherwise return \c false
+		*/
+		virtual bool SpecificLoad(FbxPluginData& pData) = 0;
+
+		/** Called by the Unload method, it contains the specific user implementation strategy to unload the desired plug-in(s).
+		*/
+		virtual void SpecificUnload(FbxPluginData& pData) = 0;
+    //@}
+
+    //! Whether the plugin is loaded or not.
+    EState mPluginsLoadedState;
+
+private:
+    FbxPluginData mData;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_LOADING_STRATEGY_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 555 - 555
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxmanager.h


+ 49 - 49
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxmodule.h

@@ -1,49 +1,49 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxmodule.h
-#ifndef _FBXSDK_CORE_MODULE_H_
-#define _FBXSDK_CORE_MODULE_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-typedef void* FbxModule;
-
-/** Loads the specified module into the address space of the calling process.
-  * \param pFilePath The full file path name of the module to load.
-  * \return The module handle if it successfully loaded, otherwise NULL.
-  * \remark The specified module may cause other modules to be loaded.
-  */
-FBXSDK_DLL FbxModule FbxModuleLoad(const char* pFilePath);
-
-/** Retrieves the address of an exported function or variable from the specified module.
-  * \param pModuleHandle A valid module handle.
-  * \param pProcName The procedure name to search.
-  * \return The procedure handle if valid, otherwise NULL.
-  */
-FBXSDK_DLL void* FbxModuleGetProc(FbxModule pModuleHandle, const char* pProcName);
-
-/** Frees the loaded module and, if necessary, decrements its reference count.
-  * \param pModuleHandle A valid module handle.
-  * \return \c true on success, \c false otherwise.
-  * \remark When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.
-  */
-FBXSDK_DLL bool FbxModuleFree(FbxModule pModuleHandle);
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_MODULE_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxmodule.h
+#ifndef _FBXSDK_CORE_MODULE_H_
+#define _FBXSDK_CORE_MODULE_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+typedef void* FbxModule;
+
+/** Loads the specified module into the address space of the calling process.
+  * \param pFilePath The full file path name of the module to load.
+  * \return The module handle if it successfully loaded, otherwise NULL.
+  * \remark The specified module may cause other modules to be loaded.
+  */
+FBXSDK_DLL FbxModule FbxModuleLoad(const char* pFilePath);
+
+/** Retrieves the address of an exported function or variable from the specified module.
+  * \param pModuleHandle A valid module handle.
+  * \param pProcName The procedure name to search.
+  * \return The procedure handle if valid, otherwise NULL.
+  */
+FBXSDK_DLL void* FbxModuleGetProc(FbxModule pModuleHandle, const char* pProcName);
+
+/** Frees the loaded module and, if necessary, decrements its reference count.
+  * \param pModuleHandle A valid module handle.
+  * \return \c true on success, \c false otherwise.
+  * \remark When the reference count reaches zero, the module is unloaded from the address space of the calling process and the handle is no longer valid.
+  */
+FBXSDK_DLL bool FbxModuleFree(FbxModule pModuleHandle);
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_MODULE_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 1617 - 1617
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxobject.h


+ 96 - 96
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxperipheral.h

@@ -1,96 +1,96 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxperipheral.h
-#ifndef _FBXSDK_CORE_PERIPHERAL_H_
-#define _FBXSDK_CORE_PERIPHERAL_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxObject;
-
-/** FbxPeripheral is an interface to load/unload content of FbxObject from memory to
-somewhere you defined, for example, to a temporary file on disk .
-* \nosubgrouping
-* You need to inherited your own peripheral class from this class and overload
-* the functions to control what information of a FbxObject you want to load/unload,
-* and where you are going to load/unload these information to.
-* For example, you can ask an object to dump itself on disk to free some memory and vice-versa 
-* when you want to load/unload this object from your scene flexibly.
-*/
-class FBXSDK_DLL FbxPeripheral 
-{
-public:
-	/**
-	  * \name Constructor and Destructor
-	  */
-	//@{
-
-	//!Constructor.
-	FbxPeripheral();
-
-    //!Destructor.
-	virtual ~FbxPeripheral();
-	//@}
-
-	/** Reset the peripheral to its initial state.
-	  */
-	virtual void Reset() = 0;
-
-	/** Unload the content of pObject.
-	  * \param pObject                 Object whose content is to be offloaded into 
-	  * the peripheral storage area.
-	  * \return                        \c true if the object content has been successfully transferred.
-	  * \c false otherwise.
-	  */
-	virtual bool UnloadContentOf(FbxObject* pObject) = 0;
-
-	/** Load the content of pObject.
-	  * \param pObject                 Object whose content is to be loaded from
-	  * the peripheral storage area.
-	  * \return                        \c true if the object content has been successfully transferred.
-	  * \c false otherwise.
-	  */
-	virtual bool LoadContentOf(FbxObject* pObject) = 0;
-
-	/** Check if this peripheral can unload the given object content.
-	  * \param pObject                 Object whose content has to be transferred.
-	  * \return                        \c true if the peripheral can handle this object content and
-	  * has enough space in its storage area.\c false otherwise.
-	  */
-	virtual bool CanUnloadContentOf(FbxObject* pObject) = 0;
-
-    /** Check if this peripheral can load the given object content.
-    * \param pObject                  Object whose content has to be transferred.
-    * \return                         \c true if the peripheral can handle this object content.
-	* \c false otherwise.
-    */
-    virtual bool CanLoadContentOf(FbxObject* pObject) = 0;
-
-    /** Initialize the connections of an object
-    * \param pObject                  Object on which the request for connection is done.
-    */
-    virtual void InitializeConnectionsOf(FbxObject* pObject) = 0;
-
-    /** Uninitialize the connections of an object
-    * \param pObject                 Object on which the request for disconnection is done.
-    */
-    virtual void UninitializeConnectionsOf(FbxObject* pObject) = 0;
-};
-
-// predefined offload peripherals
-extern FBXSDK_DLL FbxPeripheral* NULL_PERIPHERAL;
-extern FBXSDK_DLL FbxPeripheral* TMPFILE_PERIPHERAL;
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_PERIPHERAL_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxperipheral.h
+#ifndef _FBXSDK_CORE_PERIPHERAL_H_
+#define _FBXSDK_CORE_PERIPHERAL_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxObject;
+
+/** FbxPeripheral is an interface to load/unload content of FbxObject from memory to
+somewhere you defined, for example, to a temporary file on disk .
+* \nosubgrouping
+* You need to inherited your own peripheral class from this class and overload
+* the functions to control what information of a FbxObject you want to load/unload,
+* and where you are going to load/unload these information to.
+* For example, you can ask an object to dump itself on disk to free some memory and vice-versa 
+* when you want to load/unload this object from your scene flexibly.
+*/
+class FBXSDK_DLL FbxPeripheral 
+{
+public:
+	/**
+	  * \name Constructor and Destructor
+	  */
+	//@{
+
+	//!Constructor.
+	FbxPeripheral();
+
+    //!Destructor.
+	virtual ~FbxPeripheral();
+	//@}
+
+	/** Reset the peripheral to its initial state.
+	  */
+	virtual void Reset() = 0;
+
+	/** Unload the content of pObject.
+	  * \param pObject                 Object whose content is to be offloaded into 
+	  * the peripheral storage area.
+	  * \return                        \c true if the object content has been successfully transferred.
+	  * \c false otherwise.
+	  */
+	virtual bool UnloadContentOf(FbxObject* pObject) = 0;
+
+	/** Load the content of pObject.
+	  * \param pObject                 Object whose content is to be loaded from
+	  * the peripheral storage area.
+	  * \return                        \c true if the object content has been successfully transferred.
+	  * \c false otherwise.
+	  */
+	virtual bool LoadContentOf(FbxObject* pObject) = 0;
+
+	/** Check if this peripheral can unload the given object content.
+	  * \param pObject                 Object whose content has to be transferred.
+	  * \return                        \c true if the peripheral can handle this object content and
+	  * has enough space in its storage area.\c false otherwise.
+	  */
+	virtual bool CanUnloadContentOf(FbxObject* pObject) = 0;
+
+    /** Check if this peripheral can load the given object content.
+    * \param pObject                  Object whose content has to be transferred.
+    * \return                         \c true if the peripheral can handle this object content.
+	* \c false otherwise.
+    */
+    virtual bool CanLoadContentOf(FbxObject* pObject) = 0;
+
+    /** Initialize the connections of an object
+    * \param pObject                  Object on which the request for connection is done.
+    */
+    virtual void InitializeConnectionsOf(FbxObject* pObject) = 0;
+
+    /** Uninitialize the connections of an object
+    * \param pObject                 Object on which the request for disconnection is done.
+    */
+    virtual void UninitializeConnectionsOf(FbxObject* pObject) = 0;
+};
+
+// predefined offload peripherals
+extern FBXSDK_DLL FbxPeripheral* NULL_PERIPHERAL;
+extern FBXSDK_DLL FbxPeripheral* TMPFILE_PERIPHERAL;
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_PERIPHERAL_H_ */

+ 264 - 264
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxplugin.h

@@ -1,264 +1,264 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxplugin.h
-#ifndef _FBXSDK_CORE_PLUGIN_H_
-#define _FBXSDK_CORE_PLUGIN_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/core/fbxobject.h>
-#include <fbxsdk/core/fbxmodule.h>
-#include <fbxsdk/core/fbxlistener.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxManager;
-class FbxPluginContainer;
-
-//! Plug-in declaration macro that must to be used when defining new FbxPlugin objects.
-#define FBXSDK_PLUGIN_DECLARE(Plugin)\
-	FBXSDK_FRIEND_NEW();\
-public:\
-	static Plugin * Create(const FbxPluginDef& pDefinition, FbxModule pModuleHandle);\
-	void Destroy();
-
-//! Plug-in implementation macro that must be used when implementing new FbxPlugin objects.
-#define FBXSDK_PLUGIN_IMPLEMENT(Plugin)\
-	Plugin* Plugin::Create(const FbxPluginDef& pDefinition, FbxModule pModuleHandle){ return FbxNew<Plugin>(pDefinition, pModuleHandle); }\
-	void Plugin::Destroy(){ FbxDelete(this); }
-
-/** Structure used by plug-ins for identification purposes.
-  * \note To avoid confusions in the system, it is recommended to choose an appropriate unique identifier string name when
-  * defining your plug-in, as well as incrementing the version string to a correct value whenever something changes in the
-  * implementation of the plug-in. Both of these string are used when comparing plug-ins for searches, as well as
-  * identification in FBX files.
-  */
-struct FBXSDK_DLL FbxPluginDef
-{
-	//! Constructor
-	FbxPluginDef() :
-		mName("Unknown Name"),
-		mVersion("Unknown Version")
-	{
-	}
-
-	FbxString mName;		//!< The identifier name string of the plug-in. If the name is already used by another plug-in, the plug-in will still register.
-	FbxString mVersion;	//!< The version string of the plug-in.
-};
-
-/** Data used to communicate information between an application and the plug-in.
-  */
-struct FBXSDK_DLL FbxPluginData
-{
-	//! Constructor
-	FbxPluginData() :
-		mQueryEmitter(NULL),
-		mSDKManager(NULL),
-		mPluginContainer(NULL)
-	{
-	}
-
-	//! Copy Constructor
-	explicit FbxPluginData(const FbxPluginData& pOther) :
-		mQueryEmitter(pOther.mQueryEmitter),
-		mSDKManager(pOther.mSDKManager),
-		mPluginContainer(pOther.mPluginContainer)
-	{
-	}
-
-	FbxEmitter*			mQueryEmitter;		//!< The emitter on which the plug-in can listen to receive events.
-	FbxManager*			mSDKManager;		//!< The FBX SDK Manager on which the plug-in was instanced.
-	FbxPluginContainer*	mPluginContainer;   //!< The container which will have the ownership of the plug-in.
-};
-
-/** The base class to inherit from when creating new plug-ins for the FBX SDK. Plug-ins for the FBX SDK are extremely flexible
-  * allowing a wide-range of possibilities. For example, one can write his own plug-in to add new readers/writers to the current list
-  * of supported I/O formats, or add new dynamic classes to instantiate custom objects that can later be stored in FBX files. We also use the same
-  * interface for plug-ins written using the FBX Extension SDK, which allow additional callbacks for other various Autodesk products
-  * enabling greater interoperability with multiple various SDKs.
-  *
-  * Here is typical implementation of an FBX SDK plug-in that doesn't do anything else than just registering itself:
-  * \code
-  * class MyPlugin : public FbxPlugin
-  * {
-  *     FBXSDK_PLUGIN_DECLARE(MyPlugin); //This macro is mandatory for any plug-in definition
-  *
-  * protected:
-  *     explicit MyPlugin(const FbxPluginDef& pDefinition, FbxModule pModuleHandle) : FbxPlugin(pDefinition, pModuleHandle)
-  *     {
-  *     }
-  *
-  *     //Abstract functions that *must* be implemented
-  *     virtual bool SpecificInitialize()
-  *     {
-  *         //For example, here we could register as many new I/O readers/writers as we would like, or classes, etc.
-  *         return true;
-  *     }
-  *
-  *     virtual bool SpecificTerminate()
-  *     {
-  *         //Here we would have to unregister whatever we registered to the FBX SDK
-  *         return true;
-  *     }
-  * };
-  *
-  * FBXSDK_PLUGIN_IMPLEMENT(MyPlugin); //This macro is mandatory for any plug-in implementation
-  *
-  * //Standard C export needed for any new FBX SDK plug-in
-  * extern "C"
-  * {
-  *     static MyPlugin* sMyPluginInstance = NULL; //The module is owner of the plug-in
-  *
-  *     //This function will be called when an application will request the plug-in
-  * #ifdef FBXSDK_ENV_WIN
-  *     __declspec(dllexport) void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pModuleHandle)
-  * #else
-  *     void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pModuleHandle)
-  * #endif
-  *     {
-  *         if( sPlugin == NULL )
-  *         {
-  *             //Create the plug-in definition which contains the information about the plug-in
-  *             FbxPluginDef sPluginDef;
-  *             sPluginDef.mName = "My Plugin";
-  *             sPluginDef.mVersion = "1.0";
-  *
-  *             //Create an instance of the plug-in
-  *             sMyPluginInstance = MyPlugin::Create(sPluginDef, pLibHandle);
-  *
-  *             //Register the plug-in with the FBX SDK
-  *             pContainer.Register(*sPlugin);
-  *         }
-  *     }
-  * }
-  * \endcode
-  * \see FbxPluginDef, FbxPluginData
-  */
-class FBXSDK_DLL FbxPlugin : public FbxListener
-{
-	FBXSDK_INTRUSIVE_LIST_NODE(FbxPlugin, 1);
-
-public:
-	/** Abstract function called once at the end of the plug-in construction. At that moment, plug-in data have been properly initialized.
-	  * This function must be implemented by anyone who writes a new plug-in for the FBX SDK.
-	  */
-	virtual bool SpecificInitialize()=0;
-
-	/** Abstract function called once at the beginning of the plug-in destruction. At that moment, plug-in data is fully available.
-	  * This function must be implemented by anyone who writes a new plug-in for the FBX SDK.
-	  */
-	virtual bool SpecificTerminate()=0;
-
-	/** Virtual function called once when the FBX SDK is about to write an FBX file. Users can re-implement it in their plug-in if they need
-	  * to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
-	  * \param pScene The scene that is about to be written in the FBX file.
-	  */
-	virtual void WriteBegin(FbxScene& pScene);
-
-	/** Virtual function called once when the FBX SDK is about to write plug-in's parameters. Users can re-implement it in their plug-in if they need
-	  * to store properties in the FBX file for their own usage. The object in parameter is used to store those properties.
-	  * If not re-implemented, this function does nothing.
-	  * \param pParams An abstract object that can be used as a property container, to allow the plug-in to store properties about the plug-in.
-	  */
-	virtual void WriteParameters(FbxObject& pParams);
-
-	/** Virtual function called once after the FBX SDK wrote an FBX file. Users can re-implement it in their plug-in if they need
-	  * to perform tasks at that moment. The scene provided in parameter can be altered, but the changes will not appear in the FBX file.
-	  * If not re-implemented, this function does nothing.
-	  * \param pScene The scene that was written in the FBX file.
-	  */
-	virtual void WriteEnd(FbxScene& pScene);
-
-	/** Virtual function called once when the FBX SDK is about to read an FBX file. Users can re-implement it in their plug-in if they need
-	  * to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
-	  * \param pScene The scene that is about to be read in the FBX file.
-	  */
-	virtual void ReadBegin(FbxScene& pScene);
-
-	/** Virtual function called once after the FBX SDK reads the plug-in's parameters. Users can re-implement it in their plug-in if they need
-	  * to retrieve properties for their own usage. The object in parameter is used to retrieve those properties.
-	  * If not re-implemented, this function does nothing.
-	  * \param pParams An abstract object that can be used as a property container, to allow the plug-in to read properties about the plug-in.
-	  */
-	virtual void ReadParameters(FbxObject& pParams);
-
-	/** Virtual function called once after the FBX SDK read an FBX file. Users can re-implement it in their plug-in if they need
-	  * to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
-	  * \param pScene The scene that was read in the FBX file.
-	  */
-	virtual void ReadEnd(FbxScene& pScene);
-
-	/** Accessor to the plug-in definition structure that contains basic information on the plug-in like its name or version. This is
-	  * the only method available to differentiate plug-ins.
-	  * \return The definition structure for this plug-in.
-	  */
-	const FbxPluginDef& GetDefinition() const;
-
-	/** Retrieve the module address pointer for this plug-in. With this module instance handle, for example someone can query procedures addresses,
-	  * allowing more complex interactions, as well as other operating system module specific functions.
-	  */
-	FbxModule GetModuleHdl();
-
-protected:
-	/** Use the Create() and Destroy() methods declared and implemented in the FBXSDK_PLUGIN_DECLARE and FBXSDK_PLUGIN_IMPLEMENT macros to construct and destroy FbxPlugin objects.
-	  * \param pDefinition The definition associated with this plug-in. Each plug-in must have its own definition to differentiate it with other plug-ins.
-	  * \param pModuleHandle A pointer to the plug-in module address.
-	  */
-	explicit FbxPlugin(const FbxPluginDef& pDefinition, FbxModule pModuleHandle);
-
-	/** Accessor to the plug-in private data.
-	  * \return The data for the current plug-in.
-	  */
-	FbxPluginData& GetData();
-
-	/** Const accessor to the plug-in private data.
-	  * \return The const data for the current plug-in.
-	  */
-	const FbxPluginData& GetData() const;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-public:
-	inline FbxObject& GetPluginSettings() { return *mPluginSettings; }
-	inline const FbxObject& GetPluginSettings() const { return *mPluginSettings; }
-	template <typename EventType, typename ListernerType> inline FbxEventHandler* Bind(void (ListernerType::*pFunc)(const EventType*))
-	{
-		return FbxListener::Bind<EventType,ListernerType>(*(GetData().mQueryEmitter), pFunc );
-	}
-	virtual void Destroy() = 0;
-
-protected:
-	virtual ~FbxPlugin();
-
-private:
-	bool							Initialize(const FbxPluginData& pData);
-	bool							Terminate();
-
-	bool							mInitialized;
-	FbxPluginData					mData;
-	FbxPluginDef					mDefinition;
-	FbxModule						mModuleHandle;
-	FbxObject*						mPluginSettings;
-
-	friend class FbxLoadingStrategy;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_PLUGIN_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxplugin.h
+#ifndef _FBXSDK_CORE_PLUGIN_H_
+#define _FBXSDK_CORE_PLUGIN_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/core/fbxobject.h>
+#include <fbxsdk/core/fbxmodule.h>
+#include <fbxsdk/core/fbxlistener.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxManager;
+class FbxPluginContainer;
+
+//! Plug-in declaration macro that must to be used when defining new FbxPlugin objects.
+#define FBXSDK_PLUGIN_DECLARE(Plugin)\
+	FBXSDK_FRIEND_NEW();\
+public:\
+	static Plugin * Create(const FbxPluginDef& pDefinition, FbxModule pModuleHandle);\
+	void Destroy();
+
+//! Plug-in implementation macro that must be used when implementing new FbxPlugin objects.
+#define FBXSDK_PLUGIN_IMPLEMENT(Plugin)\
+	Plugin* Plugin::Create(const FbxPluginDef& pDefinition, FbxModule pModuleHandle){ return FbxNew<Plugin>(pDefinition, pModuleHandle); }\
+	void Plugin::Destroy(){ FbxDelete(this); }
+
+/** Structure used by plug-ins for identification purposes.
+  * \note To avoid confusions in the system, it is recommended to choose an appropriate unique identifier string name when
+  * defining your plug-in, as well as incrementing the version string to a correct value whenever something changes in the
+  * implementation of the plug-in. Both of these string are used when comparing plug-ins for searches, as well as
+  * identification in FBX files.
+  */
+struct FBXSDK_DLL FbxPluginDef
+{
+	//! Constructor
+	FbxPluginDef() :
+		mName("Unknown Name"),
+		mVersion("Unknown Version")
+	{
+	}
+
+	FbxString mName;		//!< The identifier name string of the plug-in. If the name is already used by another plug-in, the plug-in will still register.
+	FbxString mVersion;	//!< The version string of the plug-in.
+};
+
+/** Data used to communicate information between an application and the plug-in.
+  */
+struct FBXSDK_DLL FbxPluginData
+{
+	//! Constructor
+	FbxPluginData() :
+		mQueryEmitter(NULL),
+		mSDKManager(NULL),
+		mPluginContainer(NULL)
+	{
+	}
+
+	//! Copy Constructor
+	explicit FbxPluginData(const FbxPluginData& pOther) :
+		mQueryEmitter(pOther.mQueryEmitter),
+		mSDKManager(pOther.mSDKManager),
+		mPluginContainer(pOther.mPluginContainer)
+	{
+	}
+
+	FbxEmitter*			mQueryEmitter;		//!< The emitter on which the plug-in can listen to receive events.
+	FbxManager*			mSDKManager;		//!< The FBX SDK Manager on which the plug-in was instanced.
+	FbxPluginContainer*	mPluginContainer;   //!< The container which will have the ownership of the plug-in.
+};
+
+/** The base class to inherit from when creating new plug-ins for the FBX SDK. Plug-ins for the FBX SDK are extremely flexible
+  * allowing a wide-range of possibilities. For example, one can write his own plug-in to add new readers/writers to the current list
+  * of supported I/O formats, or add new dynamic classes to instantiate custom objects that can later be stored in FBX files. We also use the same
+  * interface for plug-ins written using the FBX Extension SDK, which allow additional callbacks for other various Autodesk products
+  * enabling greater interoperability with multiple various SDKs.
+  *
+  * Here is typical implementation of an FBX SDK plug-in that doesn't do anything else than just registering itself:
+  * \code
+  * class MyPlugin : public FbxPlugin
+  * {
+  *     FBXSDK_PLUGIN_DECLARE(MyPlugin); //This macro is mandatory for any plug-in definition
+  *
+  * protected:
+  *     explicit MyPlugin(const FbxPluginDef& pDefinition, FbxModule pModuleHandle) : FbxPlugin(pDefinition, pModuleHandle)
+  *     {
+  *     }
+  *
+  *     //Abstract functions that *must* be implemented
+  *     virtual bool SpecificInitialize()
+  *     {
+  *         //For example, here we could register as many new I/O readers/writers as we would like, or classes, etc.
+  *         return true;
+  *     }
+  *
+  *     virtual bool SpecificTerminate()
+  *     {
+  *         //Here we would have to unregister whatever we registered to the FBX SDK
+  *         return true;
+  *     }
+  * };
+  *
+  * FBXSDK_PLUGIN_IMPLEMENT(MyPlugin); //This macro is mandatory for any plug-in implementation
+  *
+  * //Standard C export needed for any new FBX SDK plug-in
+  * extern "C"
+  * {
+  *     static MyPlugin* sMyPluginInstance = NULL; //The module is owner of the plug-in
+  *
+  *     //This function will be called when an application will request the plug-in
+  * #ifdef FBXSDK_ENV_WIN
+  *     __declspec(dllexport) void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pModuleHandle)
+  * #else
+  *     void FBXPluginRegistration(FbxPluginContainer& pContainer, FbxModule pModuleHandle)
+  * #endif
+  *     {
+  *         if( sPlugin == NULL )
+  *         {
+  *             //Create the plug-in definition which contains the information about the plug-in
+  *             FbxPluginDef sPluginDef;
+  *             sPluginDef.mName = "My Plugin";
+  *             sPluginDef.mVersion = "1.0";
+  *
+  *             //Create an instance of the plug-in
+  *             sMyPluginInstance = MyPlugin::Create(sPluginDef, pLibHandle);
+  *
+  *             //Register the plug-in with the FBX SDK
+  *             pContainer.Register(*sPlugin);
+  *         }
+  *     }
+  * }
+  * \endcode
+  * \see FbxPluginDef, FbxPluginData
+  */
+class FBXSDK_DLL FbxPlugin : public FbxListener
+{
+	FBXSDK_INTRUSIVE_LIST_NODE(FbxPlugin, 1);
+
+public:
+	/** Abstract function called once at the end of the plug-in construction. At that moment, plug-in data have been properly initialized.
+	  * This function must be implemented by anyone who writes a new plug-in for the FBX SDK.
+	  */
+	virtual bool SpecificInitialize()=0;
+
+	/** Abstract function called once at the beginning of the plug-in destruction. At that moment, plug-in data is fully available.
+	  * This function must be implemented by anyone who writes a new plug-in for the FBX SDK.
+	  */
+	virtual bool SpecificTerminate()=0;
+
+	/** Virtual function called once when the FBX SDK is about to write an FBX file. Users can re-implement it in their plug-in if they need
+	  * to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
+	  * \param pScene The scene that is about to be written in the FBX file.
+	  */
+	virtual void WriteBegin(FbxScene& pScene);
+
+	/** Virtual function called once when the FBX SDK is about to write plug-in's parameters. Users can re-implement it in their plug-in if they need
+	  * to store properties in the FBX file for their own usage. The object in parameter is used to store those properties.
+	  * If not re-implemented, this function does nothing.
+	  * \param pParams An abstract object that can be used as a property container, to allow the plug-in to store properties about the plug-in.
+	  */
+	virtual void WriteParameters(FbxObject& pParams);
+
+	/** Virtual function called once after the FBX SDK wrote an FBX file. Users can re-implement it in their plug-in if they need
+	  * to perform tasks at that moment. The scene provided in parameter can be altered, but the changes will not appear in the FBX file.
+	  * If not re-implemented, this function does nothing.
+	  * \param pScene The scene that was written in the FBX file.
+	  */
+	virtual void WriteEnd(FbxScene& pScene);
+
+	/** Virtual function called once when the FBX SDK is about to read an FBX file. Users can re-implement it in their plug-in if they need
+	  * to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
+	  * \param pScene The scene that is about to be read in the FBX file.
+	  */
+	virtual void ReadBegin(FbxScene& pScene);
+
+	/** Virtual function called once after the FBX SDK reads the plug-in's parameters. Users can re-implement it in their plug-in if they need
+	  * to retrieve properties for their own usage. The object in parameter is used to retrieve those properties.
+	  * If not re-implemented, this function does nothing.
+	  * \param pParams An abstract object that can be used as a property container, to allow the plug-in to read properties about the plug-in.
+	  */
+	virtual void ReadParameters(FbxObject& pParams);
+
+	/** Virtual function called once after the FBX SDK read an FBX file. Users can re-implement it in their plug-in if they need
+	  * to perform tasks at that moment. The scene provided in parameter can be altered. If not re-implemented, this function does nothing.
+	  * \param pScene The scene that was read in the FBX file.
+	  */
+	virtual void ReadEnd(FbxScene& pScene);
+
+	/** Accessor to the plug-in definition structure that contains basic information on the plug-in like its name or version. This is
+	  * the only method available to differentiate plug-ins.
+	  * \return The definition structure for this plug-in.
+	  */
+	const FbxPluginDef& GetDefinition() const;
+
+	/** Retrieve the module address pointer for this plug-in. With this module instance handle, for example someone can query procedures addresses,
+	  * allowing more complex interactions, as well as other operating system module specific functions.
+	  */
+	FbxModule GetModuleHdl();
+
+protected:
+	/** Use the Create() and Destroy() methods declared and implemented in the FBXSDK_PLUGIN_DECLARE and FBXSDK_PLUGIN_IMPLEMENT macros to construct and destroy FbxPlugin objects.
+	  * \param pDefinition The definition associated with this plug-in. Each plug-in must have its own definition to differentiate it with other plug-ins.
+	  * \param pModuleHandle A pointer to the plug-in module address.
+	  */
+	explicit FbxPlugin(const FbxPluginDef& pDefinition, FbxModule pModuleHandle);
+
+	/** Accessor to the plug-in private data.
+	  * \return The data for the current plug-in.
+	  */
+	FbxPluginData& GetData();
+
+	/** Const accessor to the plug-in private data.
+	  * \return The const data for the current plug-in.
+	  */
+	const FbxPluginData& GetData() const;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+public:
+	inline FbxObject& GetPluginSettings() { return *mPluginSettings; }
+	inline const FbxObject& GetPluginSettings() const { return *mPluginSettings; }
+	template <typename EventType, typename ListernerType> inline FbxEventHandler* Bind(void (ListernerType::*pFunc)(const EventType*))
+	{
+		return FbxListener::Bind<EventType,ListernerType>(*(GetData().mQueryEmitter), pFunc );
+	}
+	virtual void Destroy() = 0;
+
+protected:
+	virtual ~FbxPlugin();
+
+private:
+	bool							Initialize(const FbxPluginData& pData);
+	bool							Terminate();
+
+	bool							mInitialized;
+	FbxPluginData					mData;
+	FbxPluginDef					mDefinition;
+	FbxModule						mModuleHandle;
+	FbxObject*						mPluginSettings;
+
+	friend class FbxLoadingStrategy;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_PLUGIN_H_ */

+ 74 - 74
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxplugincontainer.h

@@ -1,74 +1,74 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxplugincontainer.h
-#ifndef _FBXSDK_CORE_PLUGIN_CONTAINER_H_
-#define _FBXSDK_CORE_PLUGIN_CONTAINER_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/core/fbxplugin.h>
-#include <fbxsdk/core/fbxemitter.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Manages registration and ownership of FBX SDK plug-ins (FbxPlugin). 
-  * The FBX SDK will provide a pointer to FbxPluginContainer as an argument
-  * to the FBXPluginRegistration() function exported from a plug-in's DLL.
-  * A plug-in must register itself explicitly with the FbxPluginContainer
-  * by calling FbxPluginContainer::Register() after it is constructed. 
-  * For an example of this process see the code example in the FbxPlugin 
-  * class documentation.
-  * \see FbxPlugin
-  */
-class FBXSDK_DLL FbxPluginContainer : public FbxEmitter
-{
-public:
-	//! Definition of a plug-in list.
-	typedef FbxIntrusiveList<FbxPlugin> PluginList;
-
-	/** The registration function that must be called when the module containing the plug-in is loaded.
-	  * \param pPlugin The plug-in to register.
-	  */
-	void Register(FbxPlugin& pPlugin);
-
-	/** The unregistration function that must be called when the module containing the plug-in is unloaded.
-	  * \param pPlugin The plug-in to unregister.
-	  */
-	void Unregister(FbxPlugin& pPlugin);
-
-	/** Const accessor to the list of plug-ins owned by the container.
-	  * \return A list of plug-in registered to this container.
-	  */
-	const PluginList& GetPlugins() const;
-
-	/** Accessor to the list of plug-ins owned by the container.
-	  * \return A list of plug-in registered to this container.
-	  */
-	PluginList& GetPlugins();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-protected:
-	virtual ~FbxPluginContainer();
-	PluginList mPlugins;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_PLUGIN_CONTAINER_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxplugincontainer.h
+#ifndef _FBXSDK_CORE_PLUGIN_CONTAINER_H_
+#define _FBXSDK_CORE_PLUGIN_CONTAINER_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/core/fbxplugin.h>
+#include <fbxsdk/core/fbxemitter.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Manages registration and ownership of FBX SDK plug-ins (FbxPlugin). 
+  * The FBX SDK will provide a pointer to FbxPluginContainer as an argument
+  * to the FBXPluginRegistration() function exported from a plug-in's DLL.
+  * A plug-in must register itself explicitly with the FbxPluginContainer
+  * by calling FbxPluginContainer::Register() after it is constructed. 
+  * For an example of this process see the code example in the FbxPlugin 
+  * class documentation.
+  * \see FbxPlugin
+  */
+class FBXSDK_DLL FbxPluginContainer : public FbxEmitter
+{
+public:
+	//! Definition of a plug-in list.
+	typedef FbxIntrusiveList<FbxPlugin> PluginList;
+
+	/** The registration function that must be called when the module containing the plug-in is loaded.
+	  * \param pPlugin The plug-in to register.
+	  */
+	void Register(FbxPlugin& pPlugin);
+
+	/** The unregistration function that must be called when the module containing the plug-in is unloaded.
+	  * \param pPlugin The plug-in to unregister.
+	  */
+	void Unregister(FbxPlugin& pPlugin);
+
+	/** Const accessor to the list of plug-ins owned by the container.
+	  * \return A list of plug-in registered to this container.
+	  */
+	const PluginList& GetPlugins() const;
+
+	/** Accessor to the list of plug-ins owned by the container.
+	  * \return A list of plug-in registered to this container.
+	  */
+	PluginList& GetPlugins();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+protected:
+	virtual ~FbxPluginContainer();
+	PluginList mPlugins;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_PLUGIN_CONTAINER_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 1292 - 1286
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxproperty.h


+ 146 - 146
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertydef.h

@@ -1,146 +1,146 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxpropertydef.h
-#ifndef _FBXSDK_CORE_PROPERTY_DEFINITION_H_
-#define _FBXSDK_CORE_PROPERTY_DEFINITION_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxpropertytypes.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#define FBXSDK_PROPERTY_ID_NULL	-1
-#define FBXSDK_PROPERTY_ID_ROOT 0
-
-class FbxPropertyPage;
-
-class FBXSDK_DLL FbxPropertyFlags
-{
-public:
-	//! Property inherit types
-	enum EInheritType
-	{
-		eOverride,	//!< Property override this flag from its reference property.
-		eInherit,	//!< Property inherit this flag from its reference property.
-		eDeleted	//!< Property has been deleted, so inheritance is invalid.
-	};
-
-	//! Property flags that affect their behaviors
-	enum EFlags
-	{
-		eNone = 0,					//!< No flag.
-		eStatic = 1 << 0,			//!< Property is defined in the class declaration, so it wasn't created dynamically.
-		eAnimatable = 1 << 1,		//!< Property can be animated, thus is can have am animation curve node connected.
-		eAnimated = 1 << 2,			//!< Property is animated, so it also has an animation curve node connected.
-		eImported = 1 << 3,			//!< Property has been created during import process when reading FBX file.
-		eUserDefined = 1 << 4,		//!< Property has been defined by user, not by the FBX SDK.
-		eHidden = 1 << 5,			//!< Property should not be displayed on user interface.
-		eNotSavable = 1 << 6,		//!< Property value must not be exported when writing FBX files.
-
-        eLockedMember0 = 1 << 7,	//!< This property has its member #0 locked.
-        eLockedMember1 = 1 << 8,	//!< This property has its member #1 locked.
-        eLockedMember2 = 1 << 9,	//!< This property has its member #2 locked.
-        eLockedMember3 = 1 << 10,	//!< This property has its member #3 locked.
-        eLockedAll = eLockedMember0 | eLockedMember1 | eLockedMember2 | eLockedMember3,
-        eMutedMember0 = 1 << 11,	//!< This property has its member #0 muted.
-        eMutedMember1 = 1 << 12,	//!< This property has its member #1 muted.
-        eMutedMember2 = 1 << 13,	//!< This property has its member #2 muted.
-        eMutedMember3 = 1 << 14,	//!< This property has its member #3 muted.
-        eMutedAll = eMutedMember0 | eMutedMember1 | eMutedMember2 | eMutedMember3,
-
-		//Private flags
-		eUIDisabled = 1 << 15,		//!< Private flag for dynamic UI in FBX plug-ins.
-		eUIGroup = 1 << 16,			//!< Private flag for dynamic UI in FBX plug-ins.
-		eUIBoolGroup = 1 << 17,		//!< Private flag for dynamic UI in FBX plug-ins.
-		eUIExpanded = 1 << 18,		//!< Private flag for dynamic UI in FBX plug-ins.
-		eUINoCaption = 1 << 19,		//!< Private flag for dynamic UI in FBX plug-ins.
-		eUIPanel = 1 << 20,			//!< Private flag for dynamic UI in FBX plug-ins.
-		eUILeftLabel = 1 << 21,		//!< Private flag for dynamic UI in FBX plug-ins.
-		eUIHidden = 1 << 22,		//!< Private flag for dynamic UI in FBX plug-ins.
-
-		eCtrlFlags = eStatic | eAnimatable | eAnimated | eImported | eUserDefined | eHidden | eNotSavable | eLockedAll | eMutedAll,
-		eUIFlags = eUIDisabled | eUIGroup | eUIBoolGroup | eUIExpanded | eUINoCaption | eUIPanel | eUILeftLabel | eUIHidden,
-		eAllFlags = eCtrlFlags | eUIFlags,
-
-		eFlagCount = 23,
-	};
-
-	bool SetFlags(FbxPropertyFlags::EFlags pMask, FbxPropertyFlags::EFlags pFlags);
-	FbxPropertyFlags::EFlags GetFlags() const;
-	FbxPropertyFlags::EFlags GetMergedFlags(FbxPropertyFlags::EFlags pFlags) const;
-	bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue);
-	FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags) const;
-
-	bool SetMask(FbxPropertyFlags::EFlags pFlags);
-	bool UnsetMask(FbxPropertyFlags::EFlags pFlags);
-	FbxPropertyFlags::EFlags GetMask() const;
-
-	bool Equal(const FbxPropertyFlags& pOther, FbxPropertyFlags::EFlags pFlags) const;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxPropertyFlags();
-	explicit FbxPropertyFlags(FbxPropertyFlags::EFlags pFlags);
-	FbxPropertyFlags Clone(FbxPropertyPage* pPage);
-
-    static const int sLockedMembersMax = 4;			//Maximum number of property sub-member that can be locked.
-    static const int sLockedMembersBitOffset = 7;	//Number of bits to shift to get to the first locked member flag.
-    static const int sMutedMembersMax = 4;			//Maximum number of property sub-member that can be muted.
-    static const int sMutedMembersBitOffset = 11;	//Number of bits to shift to get to the first muted member flag.
-
-private:
-    FbxUInt32 mFlagData, mMaskData;
-
-	FBX_ASSERT_STATIC(sizeof(FbxUInt32) * 8 >= FbxPropertyFlags::eFlagCount);
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-class FBXSDK_DLL FbxPropertyValue
-{
-public:
-	static FbxPropertyValue* Create(void* pData, EFbxType pType);
-	void Destroy();
-	FbxPropertyValue* Clone(FbxPropertyPage*);
-
-	bool Get(void* pValue, EFbxType pValueType);
-	bool Set(const void* pValue, EFbxType pValueType);
-	size_t GetSizeOf() const;
-	size_t GetComponentCount() const;
-
-	void IncRef();
-	void DecRef();
-	int GetRef();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxPropertyValue();
-
-private:
-	FbxPropertyValue(void* pValue, EFbxType pType);
-	~FbxPropertyValue();
-
-	int			mRef;
-	EFbxType	mType;
-	void*		mValue;
-
-	FBXSDK_FRIEND_NEW();
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_PROPERTY_DEFINITION_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxpropertydef.h
+#ifndef _FBXSDK_CORE_PROPERTY_DEFINITION_H_
+#define _FBXSDK_CORE_PROPERTY_DEFINITION_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxpropertytypes.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#define FBXSDK_PROPERTY_ID_NULL	-1
+#define FBXSDK_PROPERTY_ID_ROOT 0
+
+class FbxPropertyPage;
+
+class FBXSDK_DLL FbxPropertyFlags
+{
+public:
+	//! Property inherit types
+	enum EInheritType
+	{
+		eOverride,	//!< Property override this flag from its reference property.
+		eInherit,	//!< Property inherit this flag from its reference property.
+		eDeleted	//!< Property has been deleted, so inheritance is invalid.
+	};
+
+	//! Property flags that affect their behaviors
+	enum EFlags
+	{
+		eNone = 0,					//!< No flag.
+		eStatic = 1 << 0,			//!< Property is defined in the class declaration, so it wasn't created dynamically.
+		eAnimatable = 1 << 1,		//!< Property can be animated, thus is can have am animation curve node connected.
+		eAnimated = 1 << 2,			//!< Property is animated, so it also has an animation curve node connected.
+		eImported = 1 << 3,			//!< Property has been created during import process when reading FBX file.
+		eUserDefined = 1 << 4,		//!< Property has been defined by user, not by the FBX SDK.
+		eHidden = 1 << 5,			//!< Property should not be displayed on user interface.
+		eNotSavable = 1 << 6,		//!< Property value must not be exported when writing FBX files.
+
+        eLockedMember0 = 1 << 7,	//!< This property has its member #0 locked.
+        eLockedMember1 = 1 << 8,	//!< This property has its member #1 locked.
+        eLockedMember2 = 1 << 9,	//!< This property has its member #2 locked.
+        eLockedMember3 = 1 << 10,	//!< This property has its member #3 locked.
+        eLockedAll = eLockedMember0 | eLockedMember1 | eLockedMember2 | eLockedMember3,
+        eMutedMember0 = 1 << 11,	//!< This property has its member #0 muted.
+        eMutedMember1 = 1 << 12,	//!< This property has its member #1 muted.
+        eMutedMember2 = 1 << 13,	//!< This property has its member #2 muted.
+        eMutedMember3 = 1 << 14,	//!< This property has its member #3 muted.
+        eMutedAll = eMutedMember0 | eMutedMember1 | eMutedMember2 | eMutedMember3,
+
+		//Private flags
+		eUIDisabled = 1 << 15,		//!< Private flag for dynamic UI in FBX plug-ins.
+		eUIGroup = 1 << 16,			//!< Private flag for dynamic UI in FBX plug-ins.
+		eUIBoolGroup = 1 << 17,		//!< Private flag for dynamic UI in FBX plug-ins.
+		eUIExpanded = 1 << 18,		//!< Private flag for dynamic UI in FBX plug-ins.
+		eUINoCaption = 1 << 19,		//!< Private flag for dynamic UI in FBX plug-ins.
+		eUIPanel = 1 << 20,			//!< Private flag for dynamic UI in FBX plug-ins.
+		eUILeftLabel = 1 << 21,		//!< Private flag for dynamic UI in FBX plug-ins.
+		eUIHidden = 1 << 22,		//!< Private flag for dynamic UI in FBX plug-ins.
+
+		eCtrlFlags = eStatic | eAnimatable | eAnimated | eImported | eUserDefined | eHidden | eNotSavable | eLockedAll | eMutedAll,
+		eUIFlags = eUIDisabled | eUIGroup | eUIBoolGroup | eUIExpanded | eUINoCaption | eUIPanel | eUILeftLabel | eUIHidden,
+		eAllFlags = eCtrlFlags | eUIFlags,
+
+		eFlagCount = 23,
+	};
+
+	bool SetFlags(FbxPropertyFlags::EFlags pMask, FbxPropertyFlags::EFlags pFlags);
+	FbxPropertyFlags::EFlags GetFlags() const;
+	FbxPropertyFlags::EFlags GetMergedFlags(FbxPropertyFlags::EFlags pFlags) const;
+	bool ModifyFlags(FbxPropertyFlags::EFlags pFlags, bool pValue);
+	FbxPropertyFlags::EInheritType GetFlagsInheritType(FbxPropertyFlags::EFlags pFlags) const;
+
+	bool SetMask(FbxPropertyFlags::EFlags pFlags);
+	bool UnsetMask(FbxPropertyFlags::EFlags pFlags);
+	FbxPropertyFlags::EFlags GetMask() const;
+
+	bool Equal(const FbxPropertyFlags& pOther, FbxPropertyFlags::EFlags pFlags) const;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxPropertyFlags();
+	explicit FbxPropertyFlags(FbxPropertyFlags::EFlags pFlags);
+	FbxPropertyFlags Clone(FbxPropertyPage* pPage);
+
+    static const int sLockedMembersMax = 4;			//Maximum number of property sub-member that can be locked.
+    static const int sLockedMembersBitOffset = 7;	//Number of bits to shift to get to the first locked member flag.
+    static const int sMutedMembersMax = 4;			//Maximum number of property sub-member that can be muted.
+    static const int sMutedMembersBitOffset = 11;	//Number of bits to shift to get to the first muted member flag.
+
+private:
+    FbxUInt32 mFlagData, mMaskData;
+
+	FBX_ASSERT_STATIC(sizeof(FbxUInt32) * 8 >= FbxPropertyFlags::eFlagCount);
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+class FBXSDK_DLL FbxPropertyValue
+{
+public:
+	static FbxPropertyValue* Create(void* pData, EFbxType pType);
+	void Destroy();
+	FbxPropertyValue* Clone(FbxPropertyPage*);
+
+	bool Get(void* pValue, EFbxType pValueType);
+	bool Set(const void* pValue, EFbxType pValueType);
+	size_t GetSizeOf() const;
+	size_t GetComponentCount() const;
+
+	void IncRef();
+	void DecRef();
+	int GetRef();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxPropertyValue();
+
+private:
+	FbxPropertyValue(void* pValue, EFbxType pType);
+	~FbxPropertyValue();
+
+	int			mRef;
+	EFbxType	mType;
+	void*		mValue;
+
+	FBXSDK_FRIEND_NEW();
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_PROPERTY_DEFINITION_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 576 - 576
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertyhandle.h


Fichier diff supprimé car celui-ci est trop grand
+ 1747 - 1736
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertypage.h


Fichier diff supprimé car celui-ci est trop grand
+ 1178 - 1174
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxpropertytypes.h


+ 260 - 260
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxquery.h

@@ -1,260 +1,260 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxquery.h
-#ifndef _FBXSDK_CORE_QUERY_H_
-#define _FBXSDK_CORE_QUERY_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxclassid.h>
-#include <fbxsdk/core/fbxconnectionpoint.h>
-#include <fbxsdk/core/base/fbxmap.h>
-#include <fbxsdk/core/base/fbxmemorypool.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#define FBXSDK_QUERY_UNIQUE_ID 0x14000000
-
-class FbxProperty;
-
-/** Base class to manage query. A query contains a filter and reference ID, which will be used to search and retrieve objects. 
-* The derived query classes are used to create FbxCriteria.
-* \nosubgrouping */
-class FBXSDK_DLL FbxQuery
-{
-public:
-	//! Get unique filter Id
-	virtual FbxInt GetUniqueId() const { return FBXSDK_QUERY_UNIQUE_ID; }
-
-	/** Judge if the given property is valid.
-	* \param pProperty The given property.
-	* \return \c true always, not implemented. */
-	virtual bool IsValid(const FbxProperty& pProperty) const;
-
-	/** This compares whether two FbxQuery are the same, NOT whether the query matches or not. It's strictly the equivalent of an operator==, but virtual.
-	* \param pOtherQuery The given FbxQuery */
-	virtual bool IsEqual(FbxQuery* pOtherQuery) const;
-
-	//! Add one to ref count.
-	void Ref();
-
-	//! Minus one to ref count, if ref count is zero, delete this query object.
-	void Unref();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-protected:
-    FbxQuery();
-    virtual ~FbxQuery();
-
-private:
-    class InternalFilter : public FbxConnectionPointFilter
-	{
-	public:
-		InternalFilter(FbxQuery* pQuery);
-		~InternalFilter();
-
-	public:
-		FbxConnectionPointFilter*	Ref();
-		void						Unref();
-		FbxInt						GetUniqueId() const { return mQuery->GetUniqueId(); }
-		bool						IsValid(FbxConnectionPoint* pConnect) const;
-		bool						IsEqual(FbxConnectionPointFilter* pConnectFilter) const;
-
-		FbxQuery*					mQuery;
-    };
-
-    InternalFilter	mFilter;
-    int				mRefCount;
-
-    FBXSDK_FRIEND_NEW();
-    friend class FbxProperty;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-/** Defines a filtering criteria for a query of objects, connections and properties, so that only those satisfying the criteria are
-* affected by the query. Some examples of kinds of criteria are object type, connection type, or property. Criteria can be combined
-* using logical operators such as "and" and "or".
-* \note 
-* Objects are basic elements in FBX. Each of them has a hierarchy type and some properties. Objects and properties can be connected
-* through a connection to represent a relationship between them. (e.g. child-parent, container membership, reference, etc.,). In a
-* query, you could select object or properties based on these criteria.
-* Here are some examples:
-* \code
-* FbxObject* lObject = FbxObject::Create(lManager, "Object");
-* int lSrcLightCount = lObject->RootProperty.GetSrcObjectCount(FbxCriteria::ObjectType(FbxLight::ClassId));
-* int lSrcDeformerCount = lObject->RootProperty.GetSrcObjectCount(FbxCriteria::ObjectTypeStrict(FbxDeformer::ClassId));
-* int lSrcPropertyCount = lObject->RootProperty.GetSrcCount(FbxCriteria::IsProperty());
-* \endcode
-* \see FbxQuery
-* \see FbxProperty::GetSrcObjectCount(const FbxCriteria&) const
-* \see FbxCollection::GetMemberCount(const FbxCriteria&) const
-* \nosubgrouping */
-class FBXSDK_DLL FbxCriteria
-{
-public:
-	/** Creates a new query criteria that only selects objects which have a specific
-	* class ID or derive from a class with a specific class ID.
-	* \param pClassId The base type class ID */
-	static FbxCriteria ObjectType(const FbxClassId& pClassId);
-
-	/** Creates a new query criteria that only selects objects which have a specific class ID.
-	* \param pClassId The type class ID */
-	static FbxCriteria ObjectTypeStrict(const FbxClassId& pClassId);
-
-	//! Creates a new query criteria that only selects properties.
-	static FbxCriteria IsProperty();
-
-	/** Gets a logical conjunction (and) criteria from this and the specified criteria.
-	* \param pCriteria The specified criteria */
-	FbxCriteria operator&&(const FbxCriteria& pCriteria) const;
-
-	/** Gets a logical disjunction (or) criteria from this and the specified criteria.
-	* \param pCriteria The specified criteria */
-	FbxCriteria operator||(const FbxCriteria& pCriteria) const;
-
-	//! Returns a negated version of the criteria.
-	FbxCriteria operator!() const;
-
-	/** Retrieves the query.
-	* \return The query of this criteria */
-	FbxQuery* GetQuery() const;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxCriteria();
-	FbxCriteria(const FbxCriteria& pCriteria);
-	FbxCriteria(FbxQuery* pQuery);
-	~FbxCriteria();
-
-	FbxCriteria& operator=(const FbxCriteria& pCriteria);
-
-private:
-    FbxQuery* mQuery;
-
-	static void FreeGlobalCache();
-
-    FBXSDK_FRIEND_NEW();
-	friend class FbxManager;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-//! Functor to compare FbxCriteria
-struct FbxCriteriaCompare
-{
-	inline int operator()(const FbxCriteria& pKeyA, const FbxCriteria& pKeyB) const
-	{
-		const FbxQuery* lKeyA = pKeyA.GetQuery();
-		const FbxQuery* lKeyB = pKeyB.GetQuery();
-		return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
-	}
-};
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-class FBXSDK_DLL FbxQueryOperator : public FbxQuery
-{
-public:
-    FBXSDK_FRIEND_NEW();
-
-	enum EType {eAND, eOR};
-
-    static FbxQueryOperator* Create(FbxQuery* pA, EType pOperator, FbxQuery* pB);
-    virtual FbxInt GetUniqueId() const { return FBXSDK_QUERY_UNIQUE_ID+1; }
-    virtual bool IsValid(const FbxProperty& pProperty) const;
-    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
-
-protected:
-    FbxQueryOperator(FbxQuery* pA, EType pOperator, FbxQuery* pB);
-    virtual ~FbxQueryOperator();
-
-private:
-    FbxQuery	*mA, *mB;
-    EType		mOperator;
-};
-
-class FBXSDK_DLL FbxQueryOperatorUnary : public FbxQuery
-{
-public:
-    FBXSDK_FRIEND_NEW();
-
-    static FbxQueryOperatorUnary* Create(FbxQuery* pA);
-    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+2; }
-    virtual bool IsValid(const FbxProperty& pProperty) const;
-    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
-
-protected:
-    FbxQueryOperatorUnary(FbxQuery* pA);
-    virtual ~FbxQueryOperatorUnary();
-
-private:
-    FbxQuery* mA;
-};
-
-class FBXSDK_DLL FbxQueryClassId : public FbxQuery
-{
-public:
-    FBXSDK_FRIEND_NEW();
-
-    static FbxQueryClassId* Create(const FbxClassId& pClassId);
-    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+3; }
-    virtual bool IsValid(const FbxProperty& pProperty) const;
-    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
-
-protected:
-    FbxQueryClassId(const FbxClassId& pClassId);
-
-private:
-    FbxClassId	mClassId;
-};
-
-class FBXSDK_DLL FbxQueryIsA : public FbxQuery
-{
-public:
-    FBXSDK_FRIEND_NEW();
-
-    static FbxQueryIsA* Create(const FbxClassId& pClassId);       
-    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+4; }
-    virtual bool IsValid(const FbxProperty& pProperty) const;
-    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
-
-protected:
-    FbxQueryIsA(const FbxClassId& pClassId);
-
-private:
-    FbxClassId mClassId;
-};
-
-class FBXSDK_DLL FbxQueryIsProperty : public FbxQuery
-{
-public:
-    FBXSDK_FRIEND_NEW();
-
-    static FbxQueryIsProperty* Create();
-    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+5; }
-    virtual bool IsValid(const FbxProperty& pProperty) const;
-    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
-
-protected:
-    FbxQueryIsProperty();
-};
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_QUERY_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxquery.h
+#ifndef _FBXSDK_CORE_QUERY_H_
+#define _FBXSDK_CORE_QUERY_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxclassid.h>
+#include <fbxsdk/core/fbxconnectionpoint.h>
+#include <fbxsdk/core/base/fbxmap.h>
+#include <fbxsdk/core/base/fbxmemorypool.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#define FBXSDK_QUERY_UNIQUE_ID 0x14000000
+
+class FbxProperty;
+
+/** Base class to manage query. A query contains a filter and reference ID, which will be used to search and retrieve objects. 
+* The derived query classes are used to create FbxCriteria.
+* \nosubgrouping */
+class FBXSDK_DLL FbxQuery
+{
+public:
+	//! Get unique filter Id
+	virtual FbxInt GetUniqueId() const { return FBXSDK_QUERY_UNIQUE_ID; }
+
+	/** Judge if the given property is valid.
+	* \param pProperty The given property.
+	* \return \c true always, not implemented. */
+	virtual bool IsValid(const FbxProperty& pProperty) const;
+
+	/** This compares whether two FbxQuery are the same, NOT whether the query matches or not. It's strictly the equivalent of an operator==, but virtual.
+	* \param pOtherQuery The given FbxQuery */
+	virtual bool IsEqual(FbxQuery* pOtherQuery) const;
+
+	//! Add one to ref count.
+	void Ref();
+
+	//! Minus one to ref count, if ref count is zero, delete this query object.
+	void Unref();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+protected:
+    FbxQuery();
+    virtual ~FbxQuery();
+
+private:
+    class InternalFilter : public FbxConnectionPointFilter
+	{
+	public:
+		InternalFilter(FbxQuery* pQuery);
+		~InternalFilter();
+
+	public:
+		FbxConnectionPointFilter*	Ref();
+		void						Unref();
+		FbxInt						GetUniqueId() const { return mQuery->GetUniqueId(); }
+		bool						IsValid(FbxConnectionPoint* pConnect) const;
+		bool						IsEqual(FbxConnectionPointFilter* pConnectFilter) const;
+
+		FbxQuery*					mQuery;
+    };
+
+    InternalFilter	mFilter;
+    int				mRefCount;
+
+    FBXSDK_FRIEND_NEW();
+    friend class FbxProperty;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+/** Defines a filtering criteria for a query of objects, connections and properties, so that only those satisfying the criteria are
+* affected by the query. Some examples of kinds of criteria are object type, connection type, or property. Criteria can be combined
+* using logical operators such as "and" and "or".
+* \note 
+* Objects are basic elements in FBX. Each of them has a hierarchy type and some properties. Objects and properties can be connected
+* through a connection to represent a relationship between them. (e.g. child-parent, container membership, reference, etc.,). In a
+* query, you could select object or properties based on these criteria.
+* Here are some examples:
+* \code
+* FbxObject* lObject = FbxObject::Create(lManager, "Object");
+* int lSrcLightCount = lObject->RootProperty.GetSrcObjectCount(FbxCriteria::ObjectType(FbxLight::ClassId));
+* int lSrcDeformerCount = lObject->RootProperty.GetSrcObjectCount(FbxCriteria::ObjectTypeStrict(FbxDeformer::ClassId));
+* int lSrcPropertyCount = lObject->RootProperty.GetSrcCount(FbxCriteria::IsProperty());
+* \endcode
+* \see FbxQuery
+* \see FbxProperty::GetSrcObjectCount(const FbxCriteria&) const
+* \see FbxCollection::GetMemberCount(const FbxCriteria&) const
+* \nosubgrouping */
+class FBXSDK_DLL FbxCriteria
+{
+public:
+	/** Creates a new query criteria that only selects objects which have a specific
+	* class ID or derive from a class with a specific class ID.
+	* \param pClassId The base type class ID */
+	static FbxCriteria ObjectType(const FbxClassId& pClassId);
+
+	/** Creates a new query criteria that only selects objects which have a specific class ID.
+	* \param pClassId The type class ID */
+	static FbxCriteria ObjectTypeStrict(const FbxClassId& pClassId);
+
+	//! Creates a new query criteria that only selects properties.
+	static FbxCriteria IsProperty();
+
+	/** Gets a logical conjunction (and) criteria from this and the specified criteria.
+	* \param pCriteria The specified criteria */
+	FbxCriteria operator&&(const FbxCriteria& pCriteria) const;
+
+	/** Gets a logical disjunction (or) criteria from this and the specified criteria.
+	* \param pCriteria The specified criteria */
+	FbxCriteria operator||(const FbxCriteria& pCriteria) const;
+
+	//! Returns a negated version of the criteria.
+	FbxCriteria operator!() const;
+
+	/** Retrieves the query.
+	* \return The query of this criteria */
+	FbxQuery* GetQuery() const;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxCriteria();
+	FbxCriteria(const FbxCriteria& pCriteria);
+	FbxCriteria(FbxQuery* pQuery);
+	~FbxCriteria();
+
+	FbxCriteria& operator=(const FbxCriteria& pCriteria);
+
+private:
+    FbxQuery* mQuery;
+
+	static void FreeGlobalCache();
+
+    FBXSDK_FRIEND_NEW();
+	friend class FbxManager;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+//! Functor to compare FbxCriteria
+struct FbxCriteriaCompare
+{
+	inline int operator()(const FbxCriteria& pKeyA, const FbxCriteria& pKeyB) const
+	{
+		const FbxQuery* lKeyA = pKeyA.GetQuery();
+		const FbxQuery* lKeyB = pKeyB.GetQuery();
+		return lKeyA < lKeyB ? -1 : (lKeyA > lKeyB ? 1 : 0);
+	}
+};
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class FBXSDK_DLL FbxQueryOperator : public FbxQuery
+{
+public:
+    FBXSDK_FRIEND_NEW();
+
+	enum EType {eAND, eOR};
+
+    static FbxQueryOperator* Create(FbxQuery* pA, EType pOperator, FbxQuery* pB);
+    virtual FbxInt GetUniqueId() const { return FBXSDK_QUERY_UNIQUE_ID+1; }
+    virtual bool IsValid(const FbxProperty& pProperty) const;
+    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
+
+protected:
+    FbxQueryOperator(FbxQuery* pA, EType pOperator, FbxQuery* pB);
+    virtual ~FbxQueryOperator();
+
+private:
+    FbxQuery	*mA, *mB;
+    EType		mOperator;
+};
+
+class FBXSDK_DLL FbxQueryOperatorUnary : public FbxQuery
+{
+public:
+    FBXSDK_FRIEND_NEW();
+
+    static FbxQueryOperatorUnary* Create(FbxQuery* pA);
+    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+2; }
+    virtual bool IsValid(const FbxProperty& pProperty) const;
+    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
+
+protected:
+    FbxQueryOperatorUnary(FbxQuery* pA);
+    virtual ~FbxQueryOperatorUnary();
+
+private:
+    FbxQuery* mA;
+};
+
+class FBXSDK_DLL FbxQueryClassId : public FbxQuery
+{
+public:
+    FBXSDK_FRIEND_NEW();
+
+    static FbxQueryClassId* Create(const FbxClassId& pClassId);
+    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+3; }
+    virtual bool IsValid(const FbxProperty& pProperty) const;
+    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
+
+protected:
+    FbxQueryClassId(const FbxClassId& pClassId);
+
+private:
+    FbxClassId	mClassId;
+};
+
+class FBXSDK_DLL FbxQueryIsA : public FbxQuery
+{
+public:
+    FBXSDK_FRIEND_NEW();
+
+    static FbxQueryIsA* Create(const FbxClassId& pClassId);       
+    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+4; }
+    virtual bool IsValid(const FbxProperty& pProperty) const;
+    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
+
+protected:
+    FbxQueryIsA(const FbxClassId& pClassId);
+
+private:
+    FbxClassId mClassId;
+};
+
+class FBXSDK_DLL FbxQueryIsProperty : public FbxQuery
+{
+public:
+    FBXSDK_FRIEND_NEW();
+
+    static FbxQueryIsProperty* Create();
+    virtual FbxInt GetUniqueId() const{ return FBXSDK_QUERY_UNIQUE_ID+5; }
+    virtual bool IsValid(const FbxProperty& pProperty) const;
+    virtual bool IsEqual(FbxQuery* pOtherQuery) const;
+
+protected:
+    FbxQueryIsProperty();
+};
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_QUERY_H_ */

+ 57 - 57
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxqueryevent.h

@@ -1,57 +1,57 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxqueryevent.h
-#ifndef _FBXSDK_CORE_QUERY_EVENT_H_
-#define _FBXSDK_CORE_QUERY_EVENT_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/fbxevent.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** A query event is something that is emitted by an entity, with the goal of being filled by someone that listen to it. 
-*  You can see that like a form that you send to some people. If those people know how to fill the form, they fill it and return
-*  it to you with the right information in it.  A query event is emitted, and plug-in who are listening to that type of query, 
-*  fill the data that can be accessed by the query emitter.
-*/
-template <typename QueryT> class FbxQueryEvent : public FbxEvent<FbxQueryEvent<QueryT> >
-{
-public:
-    /**
-    *\name Public interface
-    */
-    //@{
-    /** Constructor.
-	  * \param pData The requested data.  
-      */
-    explicit FbxQueryEvent(QueryT* pData):mData(pData){}
-
-    /** Accessor to a mutable reference to the data. Event are usually const and can't be modified by listener. 
-     * This special type of event can have is content modified via this accessor.
-     * \return A mutable reference the requested data.
-    */
-    QueryT& GetData()const { return *mData; }
-    //@}
-
-private:
-    mutable QueryT* mData;
-
-private:
-    virtual const char* GetEventName() const { FBX_ASSERT(false); return ""; }
-    static const char* FbxEventName() { FBX_ASSERT(false); return ""; }
-    friend class FbxEvent< FbxQueryEvent<QueryT> >;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_QUERY_EVENT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxqueryevent.h
+#ifndef _FBXSDK_CORE_QUERY_EVENT_H_
+#define _FBXSDK_CORE_QUERY_EVENT_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/fbxevent.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** A query event is something that is emitted by an entity, with the goal of being filled by someone that listen to it. 
+*  You can see that like a form that you send to some people. If those people know how to fill the form, they fill it and return
+*  it to you with the right information in it.  A query event is emitted, and plug-in who are listening to that type of query, 
+*  fill the data that can be accessed by the query emitter.
+*/
+template <typename QueryT> class FbxQueryEvent : public FbxEvent<FbxQueryEvent<QueryT> >
+{
+public:
+    /**
+    *\name Public interface
+    */
+    //@{
+    /** Constructor.
+	  * \param pData The requested data.  
+      */
+    explicit FbxQueryEvent(QueryT* pData):mData(pData){}
+
+    /** Accessor to a mutable reference to the data. Event are usually const and can't be modified by listener. 
+     * This special type of event can have is content modified via this accessor.
+     * \return A mutable reference the requested data.
+    */
+    QueryT& GetData()const { return *mData; }
+    //@}
+
+private:
+    mutable QueryT* mData;
+
+private:
+    virtual const char* GetEventName() const { FBX_ASSERT(false); return ""; }
+    static const char* FbxEventName() { FBX_ASSERT(false); return ""; }
+    friend class FbxEvent< FbxQueryEvent<QueryT> >;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_QUERY_EVENT_H_ */

+ 58 - 58
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxscopedloadingdirectory.h

@@ -1,58 +1,58 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxscopedloadingdirectory.h
-#ifndef _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
-#define _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/core/fbxloadingstrategy.h>
-#include <fbxsdk/core/fbxmodule.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxPluginHandle;
-
-//! A plug-in loading strategy that loads all DLLs with a specific extension from a specific directory. When this class is destroyed all of the plug-ins are unloaded.
-class FBXSDK_DLL FbxScopedLoadingDirectory : public FbxLoadingStrategy
-{
-public:
-	/** Constructor, which also load plug-ins in the folder specified.
-	* \param pDirectoryPath The directory path.
-	* \param pPluginExtension The plug-in extension. */
-	FbxScopedLoadingDirectory(const char* pDirectoryPath, const char* pPluginExtension);
-
-	/** Destructor. Unload plug-ins. */
-	virtual ~FbxScopedLoadingDirectory();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-	virtual bool SpecificLoad(FbxPluginData& pData);
-	virtual void SpecificUnload(FbxPluginData& pData);
-
-	FbxString mDirectoryPath;
-	FbxString mExtension;
-
-	FbxArray<FbxModule> mPluginHandles;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxscopedloadingdirectory.h
+#ifndef _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
+#define _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/core/fbxloadingstrategy.h>
+#include <fbxsdk/core/fbxmodule.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxPluginHandle;
+
+//! A plug-in loading strategy that loads all DLLs with a specific extension from a specific directory. When this class is destroyed all of the plug-ins are unloaded.
+class FBXSDK_DLL FbxScopedLoadingDirectory : public FbxLoadingStrategy
+{
+public:
+	/** Constructor, which also load plug-ins in the folder specified.
+	* \param pDirectoryPath The directory path.
+	* \param pPluginExtension The plug-in extension. */
+	FbxScopedLoadingDirectory(const char* pDirectoryPath, const char* pPluginExtension);
+
+	/** Destructor. Unload plug-ins. */
+	virtual ~FbxScopedLoadingDirectory();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+	virtual bool SpecificLoad(FbxPluginData& pData);
+	virtual void SpecificUnload(FbxPluginData& pData);
+
+	FbxString mDirectoryPath;
+	FbxString mExtension;
+
+	FbxArray<FbxModule> mPluginHandles;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_SCOPED_LOADING_DIRECTORY_H_ */

+ 64 - 64
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxscopedloadingfilename.h

@@ -1,64 +1,64 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxscopedloadingfilename.h
-#ifndef _FBXSDK_CORE_SCOPED_LOADING_FILENAME_H_
-#define _FBXSDK_CORE_SCOPED_LOADING_FILENAME_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/core/fbxloadingstrategy.h>
-#include <fbxsdk/core/fbxmodule.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** 
- * A plug-in loading strategy that loads a single DLL by specifying the file name in the constructor, and unloads the DLL in its destructor.
- */
-class FBXSDK_DLL FbxScopedLoadingFileName : public FbxLoadingStrategy
-{
-public:
-    /**
-     *\name Public interface
-     */
-    //@{
-		/** Constructor.
-		  * Load plug-in.
-		  * \param pPath The file path.
-		  */
-		explicit FbxScopedLoadingFileName(const char* pPath);
-
-		/** Destructor.
-		 * Unload plug-in.
-		 */
-		virtual ~FbxScopedLoadingFileName();
-    //@}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-    virtual bool SpecificLoad(FbxPluginData& pData);
-    virtual void SpecificUnload(FbxPluginData& pData);
-
-    FbxModule mInstance;
-    FbxString mPath;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_SCOPED_LOADING_FILENAME_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxscopedloadingfilename.h
+#ifndef _FBXSDK_CORE_SCOPED_LOADING_FILENAME_H_
+#define _FBXSDK_CORE_SCOPED_LOADING_FILENAME_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/core/fbxloadingstrategy.h>
+#include <fbxsdk/core/fbxmodule.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** 
+ * A plug-in loading strategy that loads a single DLL by specifying the file name in the constructor, and unloads the DLL in its destructor.
+ */
+class FBXSDK_DLL FbxScopedLoadingFileName : public FbxLoadingStrategy
+{
+public:
+    /**
+     *\name Public interface
+     */
+    //@{
+		/** Constructor.
+		  * Load plug-in.
+		  * \param pPath The file path.
+		  */
+		explicit FbxScopedLoadingFileName(const char* pPath);
+
+		/** Destructor.
+		 * Unload plug-in.
+		 */
+		virtual ~FbxScopedLoadingFileName();
+    //@}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+    virtual bool SpecificLoad(FbxPluginData& pData);
+    virtual void SpecificUnload(FbxPluginData& pData);
+
+    FbxModule mInstance;
+    FbxString mPath;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_SCOPED_LOADING_FILENAME_H_ */

+ 126 - 126
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxstream.h

@@ -1,126 +1,126 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxstream.h
-#ifndef _FBXSDK_CORE_STREAM_H_
-#define _FBXSDK_CORE_STREAM_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxfile.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Abstract class for implementing I/O operations through a stream of data.
-* For instance, it can be used to read data from a memory source, thus making it possible to import files from memory. However, 
-* for the time being, the FbxStream class is only supported with FBX files. 
-*/
-class FBXSDK_DLL FbxStream
-{
-public:
-	/** Current stream state. */
-	enum EState
-	{
-		eClosed,	//!< The stream is closed.
-		eOpen,		//!< The stream is open.
-		eEmpty		//!< The stream is empty.
-	};
-
-	/** Query the current state of the stream. */
-	virtual EState GetState() = 0;
-
-	/** Open the stream.
-	* \return True if successful.
-	* \remark Each time the stream is open or closed, the stream position must be reset to zero. */
-	virtual bool Open(void* pStreamData) = 0;
-
-	/** Close the stream.
-	* \return True if successful.
-	* \remark Each time the stream is open or closed, the stream position must be reset to zero. */
-	virtual bool Close() = 0;
-
-	/** Empties the internal data of the stream.
-	* \return True if successful. */
-	virtual bool Flush() = 0;
-
-	/** Writes a memory block.
-	* \param pData Pointer to the memory block to write.
-	* \param pSize Size (in bytes) of the memory block to write.
-	* \return The number of bytes written in the stream. */
-	virtual int Write(const void* /*pData*/, int /*pSize*/) = 0;
-
-	/** Read bytes from the stream and store them in the memory block.
-	* \param pData Pointer to the memory block where the read bytes are stored.
-	* \param pSize Number of bytes read from the stream.
-	* \return The actual number of bytes successfully read from the stream. */
-	virtual int Read(void* /*pData*/, int /*pSize*/) const = 0;
-
-	/** Read a string from the stream.
-	* The default implementation is written in terms of Read() but does not cope with DOS line endings.
-	* Subclasses may need to override this if DOS line endings are to be supported.
-	* \param pBuffer Pointer to the memory block where the read bytes are stored.
-	* \param pMaxSize Maximum number of bytes to be read from the stream.
-	* \param pStopAtFirstWhiteSpace Stop reading when any whitespace is encountered. Otherwise read to end of line (like fgets()).
-	* \return pBuffer, if successful, else NULL.
-	* \remark The default implementation terminates the \e pBuffer with a null character and assumes there is enough room for it.
-	* For example, a call with \e pMaxSize = 1 will fill \e pBuffer with the null character only. */
-	virtual char* ReadString(char* pBuffer, int pMaxSize, bool pStopAtFirstWhiteSpace=false);
-
-	/** If not specified by KFbxImporter::Initialize(), the importer will ask
-	* the stream to select an appropriate reader ID to associate with the stream.
-	* FbxIOPluginRegistry can be used to locate id by extension or description.
-	* Return -1 to allow FBX to select an appropriate default. */
-	virtual int GetReaderID() const = 0;
-
-	/** If not specified by KFbxExporter::Initialize(), the exporter will ask
-	* the stream to select an appropriate writer ID to associate with the stream.
-	* KFbxIOPluginRegistry can be used to locate id by extension or description.
-	* Return -1 to allow FBX to select an appropriate default. */
-	virtual int GetWriterID() const = 0;
-
-	/** Adjust the current stream position.
-	* \param pSeekPos Pre-defined position where offset is added (FbxFile::eBegin, FbxFile::eCurrent:, FbxFile::eEnd)
-	* \param pOffset Number of bytes to offset from pSeekPos. */
-	virtual void Seek(const FbxInt64& pOffset, const FbxFile::ESeekPos& pSeekPos)=0;
-
-	/** Get the current stream position.
-	* \return Current number of bytes from the beginning of the stream. */
-	virtual long GetPosition() const = 0;
-
-	/** Set the current stream position.
-	* \param pPosition Number of bytes from the beginning of the stream to seek to. */
-	virtual void SetPosition(long pPosition)=0;
-
-	/** Return 0 if no errors occurred. Otherwise, return 1 to indicate
-	* an error. This method will be invoked whenever FBX needs to verify
-	* that the last operation succeeded. */
-	virtual int GetError() const = 0;
-
-	/** Clear current error condition by setting the current error value to 0. */
-	virtual void ClearError() = 0;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxStream(){};
-	virtual ~FbxStream(){};
-
-	int Write(const char* pData, int pSize){ return Write((void*)pData, pSize); }
-	int Write(const int* pData, int pSize){ return Write((void*)pData, pSize); }
-	int Read(char* pData, int pSize) const { return Read((void*)pData, pSize); }
-	int Read(int* pData, int pSize) const { return Read((void*)pData, pSize); }
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_STREAM_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxstream.h
+#ifndef _FBXSDK_CORE_STREAM_H_
+#define _FBXSDK_CORE_STREAM_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxfile.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Abstract class for implementing I/O operations through a stream of data.
+* For instance, it can be used to read data from a memory source, thus making it possible to import files from memory. However, 
+* for the time being, the FbxStream class is only supported with FBX files. 
+*/
+class FBXSDK_DLL FbxStream
+{
+public:
+	/** Current stream state. */
+	enum EState
+	{
+		eClosed,	//!< The stream is closed.
+		eOpen,		//!< The stream is open.
+		eEmpty		//!< The stream is empty.
+	};
+
+	/** Query the current state of the stream. */
+	virtual EState GetState() = 0;
+
+	/** Open the stream.
+	* \return True if successful.
+	* \remark Each time the stream is open or closed, the stream position must be reset to zero. */
+	virtual bool Open(void* pStreamData) = 0;
+
+	/** Close the stream.
+	* \return True if successful.
+	* \remark Each time the stream is open or closed, the stream position must be reset to zero. */
+	virtual bool Close() = 0;
+
+	/** Empties the internal data of the stream.
+	* \return True if successful. */
+	virtual bool Flush() = 0;
+
+	/** Writes a memory block.
+	* \param pData Pointer to the memory block to write.
+	* \param pSize Size (in bytes) of the memory block to write.
+	* \return The number of bytes written in the stream. */
+	virtual int Write(const void* /*pData*/, int /*pSize*/) = 0;
+
+	/** Read bytes from the stream and store them in the memory block.
+	* \param pData Pointer to the memory block where the read bytes are stored.
+	* \param pSize Number of bytes read from the stream.
+	* \return The actual number of bytes successfully read from the stream. */
+	virtual int Read(void* /*pData*/, int /*pSize*/) const = 0;
+
+	/** Read a string from the stream.
+	* The default implementation is written in terms of Read() but does not cope with DOS line endings.
+	* Subclasses may need to override this if DOS line endings are to be supported.
+	* \param pBuffer Pointer to the memory block where the read bytes are stored.
+	* \param pMaxSize Maximum number of bytes to be read from the stream.
+	* \param pStopAtFirstWhiteSpace Stop reading when any whitespace is encountered. Otherwise read to end of line (like fgets()).
+	* \return pBuffer, if successful, else NULL.
+	* \remark The default implementation terminates the \e pBuffer with a null character and assumes there is enough room for it.
+	* For example, a call with \e pMaxSize = 1 will fill \e pBuffer with the null character only. */
+	virtual char* ReadString(char* pBuffer, int pMaxSize, bool pStopAtFirstWhiteSpace=false);
+
+	/** If not specified by KFbxImporter::Initialize(), the importer will ask
+	* the stream to select an appropriate reader ID to associate with the stream.
+	* FbxIOPluginRegistry can be used to locate id by extension or description.
+	* Return -1 to allow FBX to select an appropriate default. */
+	virtual int GetReaderID() const = 0;
+
+	/** If not specified by KFbxExporter::Initialize(), the exporter will ask
+	* the stream to select an appropriate writer ID to associate with the stream.
+	* KFbxIOPluginRegistry can be used to locate id by extension or description.
+	* Return -1 to allow FBX to select an appropriate default. */
+	virtual int GetWriterID() const = 0;
+
+	/** Adjust the current stream position.
+	* \param pSeekPos Pre-defined position where offset is added (FbxFile::eBegin, FbxFile::eCurrent:, FbxFile::eEnd)
+	* \param pOffset Number of bytes to offset from pSeekPos. */
+	virtual void Seek(const FbxInt64& pOffset, const FbxFile::ESeekPos& pSeekPos)=0;
+
+	/** Get the current stream position.
+	* \return Current number of bytes from the beginning of the stream. */
+	virtual long GetPosition() const = 0;
+
+	/** Set the current stream position.
+	* \param pPosition Number of bytes from the beginning of the stream to seek to. */
+	virtual void SetPosition(long pPosition)=0;
+
+	/** Return 0 if no errors occurred. Otherwise, return 1 to indicate
+	* an error. This method will be invoked whenever FBX needs to verify
+	* that the last operation succeeded. */
+	virtual int GetError() const = 0;
+
+	/** Clear current error condition by setting the current error value to 0. */
+	virtual void ClearError() = 0;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxStream(){};
+	virtual ~FbxStream(){};
+
+	int Write(const char* pData, int pSize){ return Write((void*)pData, pSize); }
+	int Write(const int* pData, int pSize){ return Write((void*)pData, pSize); }
+	int Read(char* pData, int pSize) const { return Read((void*)pData, pSize); }
+	int Read(int* pData, int pSize) const { return Read((void*)pData, pSize); }
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_STREAM_H_ */

+ 135 - 135
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxsymbol.h

@@ -1,135 +1,135 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxsymbol.h
-#ifndef _FBXSDK_CORE_SYMBOL_H_
-#define _FBXSDK_CORE_SYMBOL_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxstring.h>
-#include <fbxsdk/core/base/fbxmap.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Defines a symbol string. A symbol string is a string that is unique and stored in a global symbol table.
-* \nosubgrouping */
-class FBXSDK_DLL FbxSymbol
-{
-public:
-    /**
-    * \name Constructors and Destructor
-    */
-    //@{
-
-    /** Constructor.
-    * Construct a symbol and add it to global symbol table.
-    * \param pName Symbol name.
-    * \param pRealm The real value for this symbol. 
-    */
-    FbxSymbol(const char* pName, const char* pRealm);
-
-    //! Destructor.
-    ~FbxSymbol();
-    //@}
-
-    /**
-    * \name Access function.
-    */
-    //@{
-    /**
-    * Get ID in global symbol table.
-    * \return Symbol ID in global symbol table.
-    */
-    unsigned int GetID() const;
-    //@}
-
-    /**
-    * \name Symbol comparison
-    */
-    //@{
-    /** Equality operator.
-    * \param pSymbol The symbol to be compared. 
-    */
-    bool operator==(FbxSymbol const& pSymbol) const;
-
-    /** Inequality operator.
-    * \param pSymbol The symbol to be compared. 
-    */
-    bool operator!=(FbxSymbol const& pSymbol) const;
-    //@}
-
-private:
-    unsigned int mID;
-};
-
-typedef FbxMap< FbxString, int, FbxStringCompare > FbxStringSymbolMap;
-
-
-/** This class is to mark a string as symbol.
-  * String Symbol only has its name.
-  * /remarks Each symbol is unique. That means there are no symbols which have the same name.
-* \nosubgrouping */
-class FBXSDK_DLL FbxStringSymbol
-{
-public:
-    /**
-    * \name Constructors and Destructor
-    */
-    //@{
-
-    //! Default constructor.
-    FbxStringSymbol();
-
-    /** Constructor.
-    * Construct a symbol and add it to global symbol table.
-    * \param pName Symbol name.
-    */
-    FbxStringSymbol(const char* pName);
-
-    //! Copy constructor.
-    FbxStringSymbol(const FbxStringSymbol& pOther);
-
-    //! Destructor.
-    ~FbxStringSymbol();
-    //@}
-
-    //! Cast operator to const char* type.
-    inline operator const char*() const { return mItem ? ((const char*) mItem->GetKey()) : NULL; }
-
-
-    /** Determine the symbol empty or not.
-    * \return \c true if empty. \c false otherwise.
-    */    
-    inline bool IsEmpty() const
-    {
-        return !mItem || mItem->GetKey().IsEmpty();
-    }
-
-    //! Static function to allocate global string symbol map.
-    static void AllocateGlobalStringSymbolMap();
-
-    //! Static function to deallocate global string symbol map.
-    static void FreeGlobalStringSymbolMap();
-
-    /** Assignment operator.
-    * \param pName  The symbol value. 
-    * \return       The self after assignment.
-    */
-    FbxStringSymbol& operator=(const char* pName);
-
-private:
-    FbxStringSymbolMap::RecordType* mItem;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_SYMBOL_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxsymbol.h
+#ifndef _FBXSDK_CORE_SYMBOL_H_
+#define _FBXSDK_CORE_SYMBOL_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxstring.h>
+#include <fbxsdk/core/base/fbxmap.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Defines a symbol string. A symbol string is a string that is unique and stored in a global symbol table.
+* \nosubgrouping */
+class FBXSDK_DLL FbxSymbol
+{
+public:
+    /**
+    * \name Constructors and Destructor
+    */
+    //@{
+
+    /** Constructor.
+    * Construct a symbol and add it to global symbol table.
+    * \param pName Symbol name.
+    * \param pRealm The real value for this symbol. 
+    */
+    FbxSymbol(const char* pName, const char* pRealm);
+
+    //! Destructor.
+    ~FbxSymbol();
+    //@}
+
+    /**
+    * \name Access function.
+    */
+    //@{
+    /**
+    * Get ID in global symbol table.
+    * \return Symbol ID in global symbol table.
+    */
+    unsigned int GetID() const;
+    //@}
+
+    /**
+    * \name Symbol comparison
+    */
+    //@{
+    /** Equality operator.
+    * \param pSymbol The symbol to be compared. 
+    */
+    bool operator==(FbxSymbol const& pSymbol) const;
+
+    /** Inequality operator.
+    * \param pSymbol The symbol to be compared. 
+    */
+    bool operator!=(FbxSymbol const& pSymbol) const;
+    //@}
+
+private:
+    unsigned int mID;
+};
+
+typedef FbxMap< FbxString, int, FbxStringCompare > FbxStringSymbolMap;
+
+
+/** This class is to mark a string as symbol.
+  * String Symbol only has its name.
+  * /remarks Each symbol is unique. That means there are no symbols which have the same name.
+* \nosubgrouping */
+class FBXSDK_DLL FbxStringSymbol
+{
+public:
+    /**
+    * \name Constructors and Destructor
+    */
+    //@{
+
+    //! Default constructor.
+    FbxStringSymbol();
+
+    /** Constructor.
+    * Construct a symbol and add it to global symbol table.
+    * \param pName Symbol name.
+    */
+    FbxStringSymbol(const char* pName);
+
+    //! Copy constructor.
+    FbxStringSymbol(const FbxStringSymbol& pOther);
+
+    //! Destructor.
+    ~FbxStringSymbol();
+    //@}
+
+    //! Cast operator to const char* type.
+    inline operator const char*() const { return mItem ? ((const char*) mItem->GetKey()) : NULL; }
+
+
+    /** Determine the symbol empty or not.
+    * \return \c true if empty. \c false otherwise.
+    */    
+    inline bool IsEmpty() const
+    {
+        return !mItem || mItem->GetKey().IsEmpty();
+    }
+
+    //! Static function to allocate global string symbol map.
+    static void AllocateGlobalStringSymbolMap();
+
+    //! Static function to deallocate global string symbol map.
+    static void FreeGlobalStringSymbolMap();
+
+    /** Assignment operator.
+    * \param pName  The symbol value. 
+    * \return       The self after assignment.
+    */
+    FbxStringSymbol& operator=(const char* pName);
+
+private:
+    FbxStringSymbolMap::RecordType* mItem;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_SYMBOL_H_ */

+ 219 - 219
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxsystemunit.h

@@ -1,219 +1,219 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxsystemunit.h
-#ifndef _FBXSDK_CORE_SYSTEM_UNIT_H_
-#define _FBXSDK_CORE_SYSTEM_UNIT_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxstring.h>
-#include <fbxsdk/core/base/fbxarray.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxAMatrix;
-class FbxScene;
-class FbxNode;
-class FbxAnimCurveNode;
-
-/** \brief This class describes the units of measurement used within a particular scene.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxSystemUnit 
-{
-public:
-
-    /** Struct to define various options that you can use to convert the system unit of a scene.
-      * The default values are:
-      *         mConvertRrsNodes = true
-      *         mConvertLimits = true
-      *         mConvertClusters = true
-      *         mConvertLightIntensity = true
-      *         mConvertPhotometricLProperties = true
-      *         mConvertCameraClipPlanes = true
-      *
-      * The default configuration have been tested to give the best conversion results in the majority of the case. 
-      * \remark Changing any of these values will have a direct impact on the whole scene behavior. 
-      */
-    struct ConversionOptions
-    {
-        //! This flag indicates whether or not to convert the nodes that do not inherit their parent's scale.
-        bool mConvertRrsNodes;  
-
-        //! This flag indicates whether or not to convert limits.
-        bool mConvertLimits;
-
-        //! This flag indicates whether or not to convert clusters.
-        bool mConvertClusters;
-
-        //! This flag indicates whether or not to convert the light intensity property.
-        bool mConvertLightIntensity;	
-
-        //! This flag indicates whether or not to convert photometric lights properties.
-        bool mConvertPhotometricLProperties;
-
-        //! This flag indicates whether or not to convert the cameras clip planes.
-        bool mConvertCameraClipPlanes;
-    };
-
-	FbxSystemUnit();
-
-    /** Constructor.
-      * \param pScaleFactor The equivalent number of centimeters in the new system unit. 
-      *                     For example, an inch unit uses a scale factor of 2.54.
-      * \param pMultiplier  A multiplier factor of pScaleFactor.
-      */
-    FbxSystemUnit(double pScaleFactor, double pMultiplier = 1.0);
-
-    /** Destructor.
-      */
-    ~FbxSystemUnit();
-
-    //! Predefined system unit for millimeters.
-    static const FbxSystemUnit mm;
-
-    //! Predefined system unit for decimeters.
-    static const FbxSystemUnit dm;
-
-    //! Predefined system unit for centimeters.
-    static const FbxSystemUnit cm;
-
-    //! Predefined system unit for meters.
-    static const FbxSystemUnit m;
-
-    //! Predefined system unit for kilometers.
-    static const FbxSystemUnit km;
-
-    //! Predefined system unit for inches.
-    static const FbxSystemUnit Inch;
-
-    //! Predefined system unit for feet.
-    static const FbxSystemUnit Foot;
-    
-    //! Predefined system unit for miles.
-    static const FbxSystemUnit Mile;
-
-    //! Predefined system unit for yards.
-    static const FbxSystemUnit Yard;
-
-    #define FBXSDK_SYSTEM_UNIT_PREDEF_COUNT 9
-
-    //! Points to a FbxSystemUnit array to store the predefined system units. The array size is FBXSDK_SYSTEM_UNIT_PREDEF_COUNT.
-    static const FbxSystemUnit *sPredefinedUnits;
-
-    //! Stores the default conversion options.
-    static const ConversionOptions DefaultConversionOptions;
-
-    /** Converts a scene from its system units to this system unit.
-      * \param pScene The scene to convert.
-      * \param pOptions Conversion options, see:FbxSystemUnit::ConversionOptions.
-      */
-    void ConvertScene( FbxScene* pScene, const ConversionOptions& pOptions = DefaultConversionOptions ) const;
-
-    /** Converts the child (or children) of the given node from the system unit to this system unit.
-      * Unlike the ConvertScene() method, this method does not set the axis system 
-      * of the scene to which the pRoot node belongs. It also does not adjust FbxPose
-      * as they are not stored under the scene, and not under a particular node.
-      * \param pRoot The given node.
-      * \param pSrcUnit The source system unit.
-      * \param pOptions Conversion options, see:FbxSystemUnit::ConversionOptions.
-      */
-    void ConvertChildren( FbxNode* pRoot, const FbxSystemUnit& pSrcUnit, const ConversionOptions& pOptions = DefaultConversionOptions ) const;
-
-    /** Converts a scene from its system unit to this system unit, using the specified 
-      * Fbx_Root node. This method is provided for backwards compatibility only
-      * and instead you should use ConvertScene( FbxScene* , const ConversionOptions&  ) whenever possible.
-      * \param pScene The scene to convert.
-      * \param pFbxRoot The Fbx_Root node to use for conversion.
-      * \param pOptions Conversion options, see:FbxSystemUnit::ConversionOptions
-      */
-    void ConvertScene( FbxScene* pScene, FbxNode* pFbxRoot, const ConversionOptions& pOptions = DefaultConversionOptions ) const;
-
-    /** Returns the system unit's scale factor, relative to centimeters.
-      * This factor scales system unit values to centimeters. If you want to scale values to centimeters, use this value.
-      * Ignore the "multiplier" (returned by GetMultiplier()) value. 
-      * \return The the system unit's scale factor, relative to centimeters.
-      */
-    double GetScaleFactor() const;
-
-    /** Returns a unit label for the current scale factor.
-      * \param pAbbreviated If \c true, returns abbreviated string. 
-      * \return The unit label for the current scale factor.
-      */
-    FbxString GetScaleFactorAsString(bool pAbbreviated = true) const;
-
-    /** Returns a unit label for the current scale factor. 
-      * The first letter of the label is in upper case and the label should be pluralized. 
-      * \return The unit label for the current scale factor.
-      */
-    FbxString GetScaleFactorAsString_Plurial() const;
-
-    /** Returns the multiplier factor of the system unit.
-      */
-    double GetMultiplier() const;
-
-    /** Equivalence operator.
-      * \param pOther Another system unit compared with this system unit.
-      * \return \c True if equal, \c false otherwise.
-      */   
-    bool operator==(const FbxSystemUnit& pOther) const;
-
-    /** Non-equivalence operator.
-      * \param pOther Another system unit compared with this system unit.
-      * \return \c True if unequal, \c false otherwise.
-      */  
-    bool operator!=(const FbxSystemUnit& pOther) const;
-
-    /** Assignment operation.
-      * \param pSystemUnit Unit system assigned to this one.
-      */
-	FbxSystemUnit& operator=(const FbxSystemUnit& pSystemUnit);
-
-    /** Returns the conversion factor from this system unit to the target system unit, excluding the multiplier factor.
-      * \param pTarget The target system unit.
-      */
-    double GetConversionFactorTo( const FbxSystemUnit& pTarget ) const;
-
-    /** Returns the conversion factor from the source system unit to this system unit, excluding the multiplier factor.
-      * \param pSource The source system unit.
-      */
-    double GetConversionFactorFrom( const FbxSystemUnit& pSource ) const;
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-    void ApplyMultiplier(FbxNode* pRoot, bool pSubChildrenOnly) const;
-    void ConvertSTProperties(FbxArray<FbxNode*>& pNodes, double pConversionFactor) const;
-    void ConvertSProperty(FbxArray<FbxNode*>& pNodes, double pConversionFactor) const;
-    void ConvertAnimCurveNode(FbxArray<FbxAnimCurveNode*>& pFCurves, double pConversionFactor) const;
-    double GetConversionFactor(double pTargetScaleFactor, double pSourceScaleFactor) const;
-    void AdjustPivots(FbxNode* pNode, double pConversionFactor, FbxAMatrix& pOriginalGlobalM ) const;
-    void AdjustLimits(FbxNode* pNode, double pConversionFactor) const;
-    void AdjustPoses(FbxScene* pScene, double pConversionFactor) const;
-    void AdjustCluster(FbxNode* pNode, double pConversionFactor) const;
-    void AdjustLightIntensity(FbxNode* pNode, const double pConversionFactor) const;
-    void AdjustPhotometricLightProperties(FbxNode* pNode, const double pConversionFactor) const;
-    void AdjustCameraClipPlanes(FbxNode* pNode, const double pConversionFactor) const;
-    void ConvertChildren(FbxNode* pRoot, const FbxSystemUnit& pSrcUnit, bool pSubChildrenOnly, const ConversionOptions& pOptions) const;
-
-    double mScaleFactor;
-    double mMultiplier;
-
-    friend class FbxGlobalSettings;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_SYSTEM_UNIT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxsystemunit.h
+#ifndef _FBXSDK_CORE_SYSTEM_UNIT_H_
+#define _FBXSDK_CORE_SYSTEM_UNIT_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxstring.h>
+#include <fbxsdk/core/base/fbxarray.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxAMatrix;
+class FbxScene;
+class FbxNode;
+class FbxAnimCurveNode;
+
+/** \brief This class describes the units of measurement used within a particular scene.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxSystemUnit 
+{
+public:
+
+    /** Struct to define various options that you can use to convert the system unit of a scene.
+      * The default values are:
+      *         mConvertRrsNodes = true
+      *         mConvertLimits = true
+      *         mConvertClusters = true
+      *         mConvertLightIntensity = true
+      *         mConvertPhotometricLProperties = true
+      *         mConvertCameraClipPlanes = true
+      *
+      * The default configuration have been tested to give the best conversion results in the majority of the case. 
+      * \remark Changing any of these values will have a direct impact on the whole scene behavior. 
+      */
+    struct ConversionOptions
+    {
+        //! This flag indicates whether or not to convert the nodes that do not inherit their parent's scale.
+        bool mConvertRrsNodes;  
+
+        //! This flag indicates whether or not to convert limits.
+        bool mConvertLimits;
+
+        //! This flag indicates whether or not to convert clusters.
+        bool mConvertClusters;
+
+        //! This flag indicates whether or not to convert the light intensity property.
+        bool mConvertLightIntensity;	
+
+        //! This flag indicates whether or not to convert photometric lights properties.
+        bool mConvertPhotometricLProperties;
+
+        //! This flag indicates whether or not to convert the cameras clip planes.
+        bool mConvertCameraClipPlanes;
+    };
+
+	FbxSystemUnit();
+
+    /** Constructor.
+      * \param pScaleFactor The equivalent number of centimeters in the new system unit. 
+      *                     For example, an inch unit uses a scale factor of 2.54.
+      * \param pMultiplier  A multiplier factor of pScaleFactor.
+      */
+    FbxSystemUnit(double pScaleFactor, double pMultiplier = 1.0);
+
+    /** Destructor.
+      */
+    ~FbxSystemUnit();
+
+    //! Predefined system unit for millimeters.
+    static const FbxSystemUnit mm;
+
+    //! Predefined system unit for decimeters.
+    static const FbxSystemUnit dm;
+
+    //! Predefined system unit for centimeters.
+    static const FbxSystemUnit cm;
+
+    //! Predefined system unit for meters.
+    static const FbxSystemUnit m;
+
+    //! Predefined system unit for kilometers.
+    static const FbxSystemUnit km;
+
+    //! Predefined system unit for inches.
+    static const FbxSystemUnit Inch;
+
+    //! Predefined system unit for feet.
+    static const FbxSystemUnit Foot;
+    
+    //! Predefined system unit for miles.
+    static const FbxSystemUnit Mile;
+
+    //! Predefined system unit for yards.
+    static const FbxSystemUnit Yard;
+
+    #define FBXSDK_SYSTEM_UNIT_PREDEF_COUNT 9
+
+    //! Points to a FbxSystemUnit array to store the predefined system units. The array size is FBXSDK_SYSTEM_UNIT_PREDEF_COUNT.
+    static const FbxSystemUnit *sPredefinedUnits;
+
+    //! Stores the default conversion options.
+    static const ConversionOptions DefaultConversionOptions;
+
+    /** Converts a scene from its system units to this system unit.
+      * \param pScene The scene to convert.
+      * \param pOptions Conversion options, see:FbxSystemUnit::ConversionOptions.
+      */
+    void ConvertScene( FbxScene* pScene, const ConversionOptions& pOptions = DefaultConversionOptions ) const;
+
+    /** Converts the child (or children) of the given node from the system unit to this system unit.
+      * Unlike the ConvertScene() method, this method does not set the axis system 
+      * of the scene to which the pRoot node belongs. It also does not adjust FbxPose
+      * as they are not stored under the scene, and not under a particular node.
+      * \param pRoot The given node.
+      * \param pSrcUnit The source system unit.
+      * \param pOptions Conversion options, see:FbxSystemUnit::ConversionOptions.
+      */
+    void ConvertChildren( FbxNode* pRoot, const FbxSystemUnit& pSrcUnit, const ConversionOptions& pOptions = DefaultConversionOptions ) const;
+
+    /** Converts a scene from its system unit to this system unit, using the specified 
+      * Fbx_Root node. This method is provided for backwards compatibility only
+      * and instead you should use ConvertScene( FbxScene* , const ConversionOptions&  ) whenever possible.
+      * \param pScene The scene to convert.
+      * \param pFbxRoot The Fbx_Root node to use for conversion.
+      * \param pOptions Conversion options, see:FbxSystemUnit::ConversionOptions
+      */
+    void ConvertScene( FbxScene* pScene, FbxNode* pFbxRoot, const ConversionOptions& pOptions = DefaultConversionOptions ) const;
+
+    /** Returns the system unit's scale factor, relative to centimeters.
+      * This factor scales system unit values to centimeters. If you want to scale values to centimeters, use this value.
+      * Ignore the "multiplier" (returned by GetMultiplier()) value. 
+      * \return The the system unit's scale factor, relative to centimeters.
+      */
+    double GetScaleFactor() const;
+
+    /** Returns a unit label for the current scale factor.
+      * \param pAbbreviated If \c true, returns abbreviated string. 
+      * \return The unit label for the current scale factor.
+      */
+    FbxString GetScaleFactorAsString(bool pAbbreviated = true) const;
+
+    /** Returns a unit label for the current scale factor. 
+      * The first letter of the label is in upper case and the label should be pluralized. 
+      * \return The unit label for the current scale factor.
+      */
+    FbxString GetScaleFactorAsString_Plurial() const;
+
+    /** Returns the multiplier factor of the system unit.
+      */
+    double GetMultiplier() const;
+
+    /** Equivalence operator.
+      * \param pOther Another system unit compared with this system unit.
+      * \return \c True if equal, \c false otherwise.
+      */   
+    bool operator==(const FbxSystemUnit& pOther) const;
+
+    /** Non-equivalence operator.
+      * \param pOther Another system unit compared with this system unit.
+      * \return \c True if unequal, \c false otherwise.
+      */  
+    bool operator!=(const FbxSystemUnit& pOther) const;
+
+    /** Assignment operation.
+      * \param pSystemUnit Unit system assigned to this one.
+      */
+	FbxSystemUnit& operator=(const FbxSystemUnit& pSystemUnit);
+
+    /** Returns the conversion factor from this system unit to the target system unit, excluding the multiplier factor.
+      * \param pTarget The target system unit.
+      */
+    double GetConversionFactorTo( const FbxSystemUnit& pTarget ) const;
+
+    /** Returns the conversion factor from the source system unit to this system unit, excluding the multiplier factor.
+      * \param pSource The source system unit.
+      */
+    double GetConversionFactorFrom( const FbxSystemUnit& pSource ) const;
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+    void ApplyMultiplier(FbxNode* pRoot, bool pSubChildrenOnly) const;
+    void ConvertSTProperties(FbxArray<FbxNode*>& pNodes, double pConversionFactor) const;
+    void ConvertSProperty(FbxArray<FbxNode*>& pNodes, double pConversionFactor) const;
+    void ConvertAnimCurveNode(FbxArray<FbxAnimCurveNode*>& pFCurves, double pConversionFactor) const;
+    double GetConversionFactor(double pTargetScaleFactor, double pSourceScaleFactor) const;
+    void AdjustPivots(FbxNode* pNode, double pConversionFactor, FbxAMatrix& pOriginalGlobalM ) const;
+    void AdjustLimits(FbxNode* pNode, double pConversionFactor) const;
+    void AdjustPoses(FbxScene* pScene, double pConversionFactor) const;
+    void AdjustCluster(FbxNode* pNode, double pConversionFactor) const;
+    void AdjustLightIntensity(FbxNode* pNode, const double pConversionFactor) const;
+    void AdjustPhotometricLightProperties(FbxNode* pNode, const double pConversionFactor) const;
+    void AdjustCameraClipPlanes(FbxNode* pNode, const double pConversionFactor) const;
+    void ConvertChildren(FbxNode* pRoot, const FbxSystemUnit& pSrcUnit, bool pSubChildrenOnly, const ConversionOptions& pOptions) const;
+
+    double mScaleFactor;
+    double mMultiplier;
+
+    friend class FbxGlobalSettings;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_SYSTEM_UNIT_H_ */

+ 227 - 227
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/fbxxref.h

@@ -1,227 +1,227 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxxref.h
-#ifndef _FBXSDK_CORE_XREF_H_
-#define _FBXSDK_CORE_XREF_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/base/fbxarray.h>
-#include <fbxsdk/core/base/fbxstring.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxProperty;
-class FbxDocument;
-class FbxXRefManagerProject;
-
-/** This class manages external references to files.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxXRefManager
-{
-public:
-    //! Default constructor.
-    FbxXRefManager();
-
-    //! Destructor.
-    virtual ~FbxXRefManager();
-
-    /**
-      * \name Predefined Project Types
-      */
-    //@{
-
-        //! This project represents an URL for storing temporary files.
-        static const char* sTemporaryFileProject;
-
-        //! This project represents an URL for configuration files.
-        static const char* sConfigurationProject;
-
-        //! This project represents an URL for storing localization files (that is not part of the asset library).
-        static const char* sLocalizationProject;
-
-        /** This project is used for creating the ".fbm" folders that are used for
-          * storing embedded resources in FBX files.
-          *  
-          * When not set, or if the folder is not writable, the ".fbm"
-          * folder is created alongside the FBX file.
-          *  
-          * If we cannot write in that folder, we look at the sTemporaryFileProject location.
-          * If no folder is set in the sTemporaryFileProject location, or it is not
-          * writable, the operating system's Temp folder becomes the location.
-          */
-        static const char* sEmbeddedFileProject;
-    //@}
-
-    /**
-      * \name XRef URL properties
-      */
-    //@{
-        /** Returns the number of URLs that are stored in a property.
-		  * \param pProperty                The property. 
-          * \return                         The URL count.
-          */
-        static int     GetUrlCount(FbxProperty const &pProperty);
-
-        /** Returns the number of URLs that are stored in a string.
-		  * \param pUrl                     The string.
-		  * \return                         The URL count.
-		  */
-		 
-        static int     GetUrlCount(FbxString const& pUrl);
-
-        /** Checks whether the URL at the given index stored in the property is relative or not.
-		  * \param pProperty                The property.
-		  * \param pIndex                   The URL index.
-          * \return                         \c True if the URL is relative, \c false if the URL is not relative.
-          */
-        static bool IsRelativeUrl  (FbxProperty const &pProperty,int pIndex);
-
-        /** Returns the URL stored in the property at the given index.
-		  * \param pProperty                The property.
-		  * \param pIndex                   The URL index.
-          * \return The URL
-          */
-        static FbxString GetUrl(FbxProperty const &pProperty,int pIndex);
-
-        /** Tries to resolve the URL stored in the property at the given index.
-		  * \param pProperty                The property.
-		  * \param pIndex                   The URL index.
-		  * \param pResolvedPath            Filled with the resolved path.
-          * \return                         \c True if the URL is resolved, return \c false if the URL is not resolved.
-          */
-        bool GetResolvedUrl (FbxProperty const &pProperty,int pIndex,FbxString & pResolvedPath) const;
-    
-        /** Tries to resolve the specified URL.
-		  * \param pUrl                     The specified URL.
-		  * \param pDoc                     The document whose ".fbm" folder is used to resolve the URL.
-		  * \param pResolvedPath            Filled with the resolved path.
-          * \return                         \c True if the URL is resolved, return \c false if the URL is not resolved.
-          */
-        bool GetResolvedUrl (const char* pUrl, FbxDocument* pDoc, FbxString& pResolvedPath) const;
-    //@}
-
-        /** Looks for the first file that matches a specified "pattern",
-          * which is built as:
-          *
-          * if pOptExt is given:         prefix*.ext
-          * If pOptExt is NULL:          prefix*
-          * if pOptExt is "" or ".":     prefix*.
-          *
-          * Returns the URL of the first matching files. This function cannot be
-          * used to resolve folders, only files.
-          *
-          * If a document is given, we start by looking at the document's ".fbm" folder.
-	      * \param pPrefix                  The prefix of the pattern.
-	      * \param pOptExt                  The extension of the pattern.
-	      * \param pDoc                     The given document.
-	      * \param pResolvedPath            Filled with the first matching URL.
-	      * \return                         \c True if one matching file is found, returns \c false if no matching file is found.
-          */
-        bool GetFirstMatchingUrl(const char* pPrefix, const char* pOptExt, const FbxDocument* pDoc, FbxString& pResolvedPath) const;
-
-    /**
-      * \name XRef Resolve URL and Projects
-      */
-    //@{
-
-        /** Adds an XRef Project.
-          * Note:Only one URL is associated with a project. Calling 
-          * this on an existing project replaces the project's existing URL.
-          * \param pName                    The name of the project
-          * \param pUrl                     The URL to be associated with the project.
-          * \return                         \c True if the project is added successfully, \c false if no project is added.
-         */
-        bool        AddXRefProject   (const char *pName,const char *pUrl);
-
-        /** Adds an XRef Project.
-          * Note:Only one URL is associated with a project. Calling 
-          * this on an existing project replaces the project's existing URL.
-          * \param pName                    The name of the project
-		  * \param pExtension               The extension of the project.
-          * \param pUrl                     The URL to be associated with the project.
-          * \return                         \c True if the project is added successfully, returns \c false if no project is added.
-         */
-        bool        AddXRefProject   (const char *pName,const char *pExtension,const char *pUrl);
-
-        /** Adds an XRef project based on the document's EmbeddedUrl 
-          * property if set, if EmbeddedUrl is not set, based on its current URL property. 
-          * \param pDoc                     The document used to name the project and to specify the URL.
-          * \return                         \c True if the project is added successfully, returns \c false if no project is added.
-          * \remarks                        The project name is set as the document name and the URL is set as EmbeddedUrl or URL of the document.
-          */
-        bool        AddXRefProject   (FbxDocument* pDoc);
-
-		/** Removes an XRef Projects.
-		  * \param pName                    The name of the project to be removed.
-		  * \return                         \c True if the project is removed successfully, returns \c false if the project with the name does not exist.
-		  */
-        bool        RemoveXRefProject(const char *pName);
-
-		/** Removes all XRef Projects. 
-          * \return                         \c True always.
-          */
-        bool        RemoveAllXRefProjects();
-
-        /** Returns the number of XRef Projects.
-		  * \return                         The number of XRef Projects.
-		  */
-        int         GetXRefProjectCount() const;
-
-		/** Returns the name of the XRef project at the specified index.
-		  * \param pIndex                   The XRef project index.
-		  * \return                         The XRef project name.
-		  */
-        const char *GetXRefProjectName(int pIndex) const;
-
-        /** Returns the base URL for the given project.
-          * \param pName                    The name of the given project
-          * \return                         The base URL of the project or returns NULL if the project with the name is not found.
-          */
-        const char* GetXRefProjectUrl(const char* pName);   // FIXME: Should be const, will break AV.
-
-        /** Returns the base URL for the given project.
-          * \param pName                    The name of the given project
-          * \return                         The base URL of the project or returns NULL if the project with the name is not found.
-          */
-        const char* GetXRefProjectUrl(const char* pName) const;
-
-        /** Returns the base URL for the given project.
-          * \param pIndex                   The index of the project.
-          * \return                         The base URL of the project or NULL if the index is out of bounds.
-          */
-        const char* GetXRefProjectUrl(int pIndex) const;
-
-        /** Checks if a project with the given name is defined in this manager.
-		  * \param pName                    The name of the project.
-		  * \return                         \c True if the project is defined in this manager, returns \c false if it isn't defined in this manager.
-		  */
-        inline bool HasXRefProject( const char* pName ) { return GetXRefProjectUrl(pName) != NULL; }
-
-        /** Tries to resolve an relative URL
-		  * \param pUrl                     The relative URL to be resolved.
-		  * \param pResolvePath             Filled with the resolved path.
-          * \return                         \c True if the URL is resolved, returns \c false if the URL is not resolved.
-          */
-        bool GetResolvedUrl (const char* pUrl,FbxString & pResolvePath) const;
-
-    //@}
-private:
-    FbxArray<FbxXRefManagerProject*>    mProjects;
-
-    static bool UrlExist(const char* pUrl);
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_XREF_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxxref.h
+#ifndef _FBXSDK_CORE_XREF_H_
+#define _FBXSDK_CORE_XREF_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/base/fbxarray.h>
+#include <fbxsdk/core/base/fbxstring.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxProperty;
+class FbxDocument;
+class FbxXRefManagerProject;
+
+/** This class manages external references to files.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxXRefManager
+{
+public:
+    //! Default constructor.
+    FbxXRefManager();
+
+    //! Destructor.
+    virtual ~FbxXRefManager();
+
+    /**
+      * \name Predefined Project Types
+      */
+    //@{
+
+        //! This project represents an URL for storing temporary files.
+        static const char* sTemporaryFileProject;
+
+        //! This project represents an URL for configuration files.
+        static const char* sConfigurationProject;
+
+        //! This project represents an URL for storing localization files (that is not part of the asset library).
+        static const char* sLocalizationProject;
+
+        /** This project is used for creating the ".fbm" folders that are used for
+          * storing embedded resources in FBX files.
+          *  
+          * When not set, or if the folder is not writable, the ".fbm"
+          * folder is created alongside the FBX file.
+          *  
+          * If we cannot write in that folder, we look at the sTemporaryFileProject location.
+          * If no folder is set in the sTemporaryFileProject location, or it is not
+          * writable, the operating system's Temp folder becomes the location.
+          */
+        static const char* sEmbeddedFileProject;
+    //@}
+
+    /**
+      * \name XRef URL properties
+      */
+    //@{
+        /** Returns the number of URLs that are stored in a property.
+		  * \param pProperty                The property. 
+          * \return                         The URL count.
+          */
+        static int     GetUrlCount(FbxProperty const &pProperty);
+
+        /** Returns the number of URLs that are stored in a string.
+		  * \param pUrl                     The string.
+		  * \return                         The URL count.
+		  */
+		 
+        static int     GetUrlCount(FbxString const& pUrl);
+
+        /** Checks whether the URL at the given index stored in the property is relative or not.
+		  * \param pProperty                The property.
+		  * \param pIndex                   The URL index.
+          * \return                         \c True if the URL is relative, \c false if the URL is not relative.
+          */
+        static bool IsRelativeUrl  (FbxProperty const &pProperty,int pIndex);
+
+        /** Returns the URL stored in the property at the given index.
+		  * \param pProperty                The property.
+		  * \param pIndex                   The URL index.
+          * \return The URL
+          */
+        static FbxString GetUrl(FbxProperty const &pProperty,int pIndex);
+
+        /** Tries to resolve the URL stored in the property at the given index.
+		  * \param pProperty                The property.
+		  * \param pIndex                   The URL index.
+		  * \param pResolvedPath            Filled with the resolved path.
+          * \return                         \c True if the URL is resolved, return \c false if the URL is not resolved.
+          */
+        bool GetResolvedUrl (FbxProperty const &pProperty,int pIndex,FbxString & pResolvedPath) const;
+    
+        /** Tries to resolve the specified URL.
+		  * \param pUrl                     The specified URL.
+		  * \param pDoc                     The document whose ".fbm" folder is used to resolve the URL.
+		  * \param pResolvedPath            Filled with the resolved path.
+          * \return                         \c True if the URL is resolved, return \c false if the URL is not resolved.
+          */
+        bool GetResolvedUrl (const char* pUrl, FbxDocument* pDoc, FbxString& pResolvedPath) const;
+    //@}
+
+        /** Looks for the first file that matches a specified "pattern",
+          * which is built as:
+          *
+          * if pOptExt is given:         prefix*.ext
+          * If pOptExt is NULL:          prefix*
+          * if pOptExt is "" or ".":     prefix*.
+          *
+          * Returns the URL of the first matching files. This function cannot be
+          * used to resolve folders, only files.
+          *
+          * If a document is given, we start by looking at the document's ".fbm" folder.
+	      * \param pPrefix                  The prefix of the pattern.
+	      * \param pOptExt                  The extension of the pattern.
+	      * \param pDoc                     The given document.
+	      * \param pResolvedPath            Filled with the first matching URL.
+	      * \return                         \c True if one matching file is found, returns \c false if no matching file is found.
+          */
+        bool GetFirstMatchingUrl(const char* pPrefix, const char* pOptExt, const FbxDocument* pDoc, FbxString& pResolvedPath) const;
+
+    /**
+      * \name XRef Resolve URL and Projects
+      */
+    //@{
+
+        /** Adds an XRef Project.
+          * Note:Only one URL is associated with a project. Calling 
+          * this on an existing project replaces the project's existing URL.
+          * \param pName                    The name of the project
+          * \param pUrl                     The URL to be associated with the project.
+          * \return                         \c True if the project is added successfully, \c false if no project is added.
+         */
+        bool        AddXRefProject   (const char *pName,const char *pUrl);
+
+        /** Adds an XRef Project.
+          * Note:Only one URL is associated with a project. Calling 
+          * this on an existing project replaces the project's existing URL.
+          * \param pName                    The name of the project
+		  * \param pExtension               The extension of the project.
+          * \param pUrl                     The URL to be associated with the project.
+          * \return                         \c True if the project is added successfully, returns \c false if no project is added.
+         */
+        bool        AddXRefProject   (const char *pName,const char *pExtension,const char *pUrl);
+
+        /** Adds an XRef project based on the document's EmbeddedUrl 
+          * property if set, if EmbeddedUrl is not set, based on its current URL property. 
+          * \param pDoc                     The document used to name the project and to specify the URL.
+          * \return                         \c True if the project is added successfully, returns \c false if no project is added.
+          * \remarks                        The project name is set as the document name and the URL is set as EmbeddedUrl or URL of the document.
+          */
+        bool        AddXRefProject   (FbxDocument* pDoc);
+
+		/** Removes an XRef Projects.
+		  * \param pName                    The name of the project to be removed.
+		  * \return                         \c True if the project is removed successfully, returns \c false if the project with the name does not exist.
+		  */
+        bool        RemoveXRefProject(const char *pName);
+
+		/** Removes all XRef Projects. 
+          * \return                         \c True always.
+          */
+        bool        RemoveAllXRefProjects();
+
+        /** Returns the number of XRef Projects.
+		  * \return                         The number of XRef Projects.
+		  */
+        int         GetXRefProjectCount() const;
+
+		/** Returns the name of the XRef project at the specified index.
+		  * \param pIndex                   The XRef project index.
+		  * \return                         The XRef project name.
+		  */
+        const char *GetXRefProjectName(int pIndex) const;
+
+        /** Returns the base URL for the given project.
+          * \param pName                    The name of the given project
+          * \return                         The base URL of the project or returns NULL if the project with the name is not found.
+          */
+        const char* GetXRefProjectUrl(const char* pName);   // FIXME: Should be const, will break AV.
+
+        /** Returns the base URL for the given project.
+          * \param pName                    The name of the given project
+          * \return                         The base URL of the project or returns NULL if the project with the name is not found.
+          */
+        const char* GetXRefProjectUrl(const char* pName) const;
+
+        /** Returns the base URL for the given project.
+          * \param pIndex                   The index of the project.
+          * \return                         The base URL of the project or NULL if the index is out of bounds.
+          */
+        const char* GetXRefProjectUrl(int pIndex) const;
+
+        /** Checks if a project with the given name is defined in this manager.
+		  * \param pName                    The name of the project.
+		  * \return                         \c True if the project is defined in this manager, returns \c false if it isn't defined in this manager.
+		  */
+        inline bool HasXRefProject( const char* pName ) { return GetXRefProjectUrl(pName) != NULL; }
+
+        /** Tries to resolve an relative URL
+		  * \param pUrl                     The relative URL to be resolved.
+		  * \param pResolvePath             Filled with the resolved path.
+          * \return                         \c True if the URL is resolved, returns \c false if the URL is not resolved.
+          */
+        bool GetResolvedUrl (const char* pUrl,FbxString & pResolvePath) const;
+
+    //@}
+private:
+    FbxArray<FbxXRefManagerProject*>    mProjects;
+
+    static bool UrlExist(const char* pUrl);
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_XREF_H_ */

+ 340 - 340
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxaffinematrix.h

@@ -1,340 +1,340 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxaffinematrix.h
-#ifndef _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
-#define _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/math/fbxvector4.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/**	FBX SDK affine matrix class.
-  * \nosubgrouping
-  * Matrices are defined using the Column Major scheme. When a FbxAMatrix represents a transformation (translation, rotation and scale), 
-  * the last row of the matrix represents the translation part of the transformation.
-  *
-  * \remarks It is important to realize that an affine matrix must respect a certain structure.  To be sure the structure is respected,
-  * use SetT, SetR, SetS, SetQ, SetTRS or SetTQS.  If by mistake bad data is entered in this affine matrix, some functions such as 
-  * Inverse() will yield wrong results.  If a matrix is needed to hold values that aren't associate with an affine matrix, please use FbxMatrix instead.
-  */
-class FBXSDK_DLL FbxAMatrix : public FbxDouble4x4
-{
-public:
-	/**
-	  * \name Constructors and Destructor
-	  */
-	//@{
-		//! Constructor.
-		FbxAMatrix();
-
-		/** Copy constructor.
-		  * \param pOther FbxAMatrix copied to this one.
-		  */
-		FbxAMatrix(const FbxAMatrix& pOther);
-
-		/** Constructor.
-		  *	\param pT     Translation vector.
-		  *	\param pR     Euler rotation vector.
-		  *	\param pS     Scale vector.
-		  */
-		FbxAMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
-
-		//! Destructor.
-		~FbxAMatrix();
-	//@}
-
-	/**
-	  * \name Access
-	  */
-	//@{
-		/** Retrieve matrix element.
-		  *	\param pY     Row index.
-		  *	\param pX     Column index.
-		  * \return       Cell [ pX, pY ] value.
-		  */
-		double Get(int pY, int pX) const;
-
-		/** Extract translation vector.
-		  * \return     Translation vector.
-		  */
-		FbxVector4 GetT() const;
-
-		/** Extract rotation vector.
-		  * \return     Rotation vector.
-		  * \remarks    The returned rotation vector is in Euler angle and the rotation order is XYZ.
-		  */
-		FbxVector4 GetR() const;
-
-		/** Extract quaternion vector.
-		  * \return     Quaternion vector.
-		  */
-		FbxQuaternion GetQ() const;
-
-		/** Extract scale vector.
-		  * \return     Scale vector.
-		  */
-		FbxVector4 GetS() const;
-
-		/** Extract a row vector.
-		  *	\param pY     Row index.
-		  * \return       The row vector.
-		  */
-		FbxVector4 GetRow(int pY) const;
-
-		/** Extract a column vector.
-		  *	\param pX     Column index.
-		  * \return       The column vector.
-		  */
-		FbxVector4 GetColumn(int pX) const;
-
-		//! Set matrix to identity.
-		void SetIdentity();
-
-		/** Set matrix's translation.
-		  * \param pT     Translation vector.
-		  */
-		void SetT(const FbxVector4& pT);
-
-		/** Set matrix's Euler rotation.
-		  * \param pR     X, Y and Z rotation values expressed as a vector.
-		  * \remarks      The rotation transform is constructed in rotation order XYZ.
-		  */
-		void SetR(const FbxVector4& pR);
-
-		/** Set matrix's quaternion.
-		  * \param pQ     The new quaternion.
-		  */
-		void SetQ(const FbxQuaternion& pQ);
-
-		/** Set matrix's scale.
-		  * \param pS     X, Y and Z scaling factors expressed as a vector.
-		  */
-		void SetS(const FbxVector4& pS);
-
-		/** Set matrix.
-		  *	\param pT     Translation vector.
-		  *	\param pR     Rotation vector.
-		  *	\param pS     Scale vector.
-		  */
-		void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
-
-		/** Set matrix.
-		  *	\param pT     Translation vector.
-		  *	\param pQ     Quaternion vector.
-		  *	\param pS     Scale vector.
-		  */
-		void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
-
-		/** Assignment operator.
-		  * \param pM FbxAMatrix assigned to this one.
-		  */
-		FbxAMatrix& operator=(const FbxAMatrix& pM);
-	//@}
-
-	/**
-	  * \name Scalar Operations
-	  */
-	//@{
-		/** Multiply matrix by a scalar value.
-		  * \param pValue     Scalar value.
-		  * \return           The scaled matrix.
-		  * \remarks          The passed value is not checked. 
-		  *                   This operator operates on the first three rows and columns of the matrix. 
-		  *                   So only the rotation and scaling are scaled, not the translation part.
-		  *                   After operation, the translation vector will be set as (0,0,0,1);
-		  */
-		FbxAMatrix operator*(double pValue) const;
-
-		/** Divide matrix by a scalar value.
-		  * \param pValue     Scalar value.
-		  * \return           The divided matrix.
-		  * \remarks          The passed value is not checked.
-		  *                   This operator operates on the first three rows and columns of the matrix. 
-		  *                   So only the rotation and scaling are scaled, not the translation part. 
-		  *                   After operation, the translation vector will be set as (0,0,0,1);
-		  */
-		FbxAMatrix operator/(double pValue) const;
-
-		/** Multiply matrix by a scalar value.
-		  * \param pValue     Scalar value.
-		  * \return           \e this updated with the result of the multiplication.
-		  * \remarks          The passed value is not checked.
-		  *                   This operator operates on the first three rows and columns of the matrix. 
-		  *                   So only the rotation and scaling are scaled, not the translation part. 
-		  *                   After operation, the translation vector will keep original value.
-		  */
-		FbxAMatrix& operator*=(double pValue);
-
-		/** Divide matrix by a scalar value.
-		  * \param pValue     Scalar value.
-		  * \return           \e this updated with the result of the division.
-		  * \remarks          The passed value is not checked.
-		  *                   This operator operates on the first three rows and columns of the matrix. 
-		  *                   So only the rotation and scaling are scaled, not the translation part. 
-		  *                   After operation, the translation vector will keep original value.
-		  */
-		FbxAMatrix& operator/=(double pValue);
-	//@}
-
-	/**
-	  * \name Vector Operations
-	  */
-	//@{
-		/** Multiply matrix by a translation vector.
-		  * \param pVector4     Translation vector.
-		  * \return             t' = M * t
-		  */
-		FbxVector4 MultT(const FbxVector4& pVector4) const;
-
-		/** Multiply matrix by an Euler rotation vector.
-		  * \param pVector4     Euler Rotation vector.
-		  * \return             r' = M * r
-		  */
-		FbxVector4 MultR(const FbxVector4& pVector4) const;
-		
-		/** Multiply matrix by a quaternion.
-		  * \param pQuaternion     Rotation value.
-		  * \return                q' = M * q
-		  */
-		FbxQuaternion MultQ(const FbxQuaternion& pQuaternion) const;
-
-		/** Multiply matrix by a scale vector.
-		  * \param pVector4     Scaling vector.
-		  * \return             s' = M * s
-		  */
-		FbxVector4 MultS(const FbxVector4& pVector4) const;
-	//@}
-
-	/**
-	  * \name Matrix Operations
-	  */
-	//@{	
-		/**	Unary minus operator.
-		  * \return     A matrix where each element is multiplied by -1.
-		  */
-		FbxAMatrix operator-() const;
-		
-		/** Multiply two matrices together.
-		  * \param pOther     A Matrix.
-		  * \return             this * pMatrix.
-		  * \remarks            Transformations are pre-multiplied.
-		  *  That means to scale, then rotate, and then translate a vector V, the transform should be T * R * S * V. \n
-		  *  Below is an example of code that shows how to construct rotation transform in XYZ rotation order.
-		  *  \code
-		  *  FbxAMatrix lRotateXM, lRotateYM, lRotateZM, lRotateXYZM, lRotateM;
-		  *  // Construct rotation matrix around X, Y and Z axises separately and then combine them.
-		  *  FbxVector4 lRotateX(10, 0, 0);
-		  *  FbxVector4 lRotateY(0, 10, 0);
-		  *  FbxVector4 lRotateZ(0, 0, 10);
-		  *  lRotateXM.SetR(lRotateX);
-		  *  lRotateYM.SetR(lRotateY);
-		  *  lRotateZM.SetR(lRotateZ);
-		  *  lRotateXYZM = lRotateZM * lRotateYM * lRotateXM;
-		  *
-		  *  // Alternatively, we can use SetR() directly.
-		  *  // lRotateXYZM and lRotateM will be the same.
-		  *  FbxVector4 lRotateXYZ (10, 10, 10);
-		  *  lRotateM.SetR(lRotateXYZ);
-		  *  \endcode
-		  * \note                Please refer to the FBX SDK programmers guide for more details.
-		  */
-		FbxAMatrix operator*(const FbxAMatrix& pOther) const;
-
-		/** Multiply two matrices together.
-		  * \param pOther     A Matrix.
-		  * \return             \e this updated with the result of the multiplication.
-		  */
-		FbxAMatrix& operator*=(const FbxAMatrix& pOther);
-
-		/** Calculate the matrix inverse.
-		  * \return     The inverse matrix of \e this.
-		  */
-		FbxAMatrix Inverse() const;
-
-		/** Calculate the matrix transpose.
-		  * \return     The transposed matrix of \e this.
-		  */
-		FbxAMatrix Transpose() const;
-
-		/** Calculate a spherical linear interpolation matrix.
-		* \param pOther The other rotation matrix to interpolate with.
-		* \param pWeight A value between 0.0 and 1.0 to specify the interpolation amount.
-		* \remark This matrix and other matrix should contain only rotations, otherwise result may be undefined. */
-		FbxAMatrix Slerp(const FbxAMatrix& pOther, double pWeight) const;
-	//@}
-
-	/**
-	  * \name Boolean Operations
-	  */
-	//@{
-		/**	Equivalence operator.
-		  * \param pOther     The matrix to be compared to \e this.
-		  * \return             \c true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c false otherwise.
-		  */
-		bool operator==(const FbxAMatrix& pOther) const;
-
-		/**	Non-equivalence operator.
-		  * \param pOther     The matrix to be compared to \e this.
-		  * \return            \c false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c true otherwise.
-		  */
-		bool operator!=(const FbxAMatrix& pOther) const;
-	//@}
-
-	/**
-	  * \name Casting
-	  */
-	//@{
-		//! Cast the matrix in a double pointer.
-		operator double* ();
-		//! Cast the matrix in a const double pointer.
-		operator const double* () const;
-		//! Define 4*4 array as a new type 
-		typedef const double(kDouble44)[4][4] ;
-		//! Cast the matrix in a reference to a 4*4 array.
-		inline kDouble44 & Double44() const { return *((kDouble44 *)&mData[0][0]); }
-	//@}
-
-	/** Find out if the matrix is equal to identity matrix.
-	* \return \c true if the matrix is equal to identity matrix, \c false otherwise. */
-	bool IsIdentity(const double pThreshold=FBXSDK_TOLERANCE);
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	FbxAMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
-
-	void SetTRS(const FbxVector4& pT, const FbxAMatrix& pRM, const FbxVector4& pS);
-    void SetRow(int pY, const FbxVector4& pRow);
-    void SetTOnly(const FbxVector4& pT);
-    void SetROnly(const FbxVector4& pR);
-    void SetQOnly(const FbxQuaternion& pQ);
-	FbxVector4 GetROnly() const;
-    FbxQuaternion GetUnnormalizedQ() const;
-
-	// pOrd is assumed to be an FbxEuler::EOrder (or its synonym EFbxRotationOrder)
-    void SetR(const FbxVector4& pV, const int pOrd); 
-	FbxVector4 GetR(const int pOrd) const;
-
-    void MultRM(const FbxVector4& pR);
-    void MultSM(const FbxVector4& pS);
-    bool IsRightHand() const;
-    double Determinant() const;
-	int Compare(const FbxAMatrix pM, const double pThreshold=FBXSDK_TOLERANCE) const;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxaffinematrix.h
+#ifndef _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
+#define _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/math/fbxvector4.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/**	FBX SDK affine matrix class.
+  * \nosubgrouping
+  * Matrices are defined using the Column Major scheme. When a FbxAMatrix represents a transformation (translation, rotation and scale), 
+  * the last row of the matrix represents the translation part of the transformation.
+  *
+  * \remarks It is important to realize that an affine matrix must respect a certain structure.  To be sure the structure is respected,
+  * use SetT, SetR, SetS, SetQ, SetTRS or SetTQS.  If by mistake bad data is entered in this affine matrix, some functions such as 
+  * Inverse() will yield wrong results.  If a matrix is needed to hold values that aren't associate with an affine matrix, please use FbxMatrix instead.
+  */
+class FBXSDK_DLL FbxAMatrix : public FbxDouble4x4
+{
+public:
+	/**
+	  * \name Constructors and Destructor
+	  */
+	//@{
+		//! Constructor.
+		FbxAMatrix();
+
+		/** Copy constructor.
+		  * \param pOther FbxAMatrix copied to this one.
+		  */
+		FbxAMatrix(const FbxAMatrix& pOther);
+
+		/** Constructor.
+		  *	\param pT     Translation vector.
+		  *	\param pR     Euler rotation vector.
+		  *	\param pS     Scale vector.
+		  */
+		FbxAMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
+
+		//! Destructor.
+		~FbxAMatrix();
+	//@}
+
+	/**
+	  * \name Access
+	  */
+	//@{
+		/** Retrieve matrix element.
+		  *	\param pY     Row index.
+		  *	\param pX     Column index.
+		  * \return       Cell [ pX, pY ] value.
+		  */
+		double Get(int pY, int pX) const;
+
+		/** Extract translation vector.
+		  * \return     Translation vector.
+		  */
+		FbxVector4 GetT() const;
+
+		/** Extract rotation vector.
+		  * \return     Rotation vector.
+		  * \remarks    The returned rotation vector is in Euler angle and the rotation order is XYZ.
+		  */
+		FbxVector4 GetR() const;
+
+		/** Extract quaternion vector.
+		  * \return     Quaternion vector.
+		  */
+		FbxQuaternion GetQ() const;
+
+		/** Extract scale vector.
+		  * \return     Scale vector.
+		  */
+		FbxVector4 GetS() const;
+
+		/** Extract a row vector.
+		  *	\param pY     Row index.
+		  * \return       The row vector.
+		  */
+		FbxVector4 GetRow(int pY) const;
+
+		/** Extract a column vector.
+		  *	\param pX     Column index.
+		  * \return       The column vector.
+		  */
+		FbxVector4 GetColumn(int pX) const;
+
+		//! Set matrix to identity.
+		void SetIdentity();
+
+		/** Set matrix's translation.
+		  * \param pT     Translation vector.
+		  */
+		void SetT(const FbxVector4& pT);
+
+		/** Set matrix's Euler rotation.
+		  * \param pR     X, Y and Z rotation values expressed as a vector.
+		  * \remarks      The rotation transform is constructed in rotation order XYZ.
+		  */
+		void SetR(const FbxVector4& pR);
+
+		/** Set matrix's quaternion.
+		  * \param pQ     The new quaternion.
+		  */
+		void SetQ(const FbxQuaternion& pQ);
+
+		/** Set matrix's scale.
+		  * \param pS     X, Y and Z scaling factors expressed as a vector.
+		  */
+		void SetS(const FbxVector4& pS);
+
+		/** Set matrix.
+		  *	\param pT     Translation vector.
+		  *	\param pR     Rotation vector.
+		  *	\param pS     Scale vector.
+		  */
+		void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
+
+		/** Set matrix.
+		  *	\param pT     Translation vector.
+		  *	\param pQ     Quaternion vector.
+		  *	\param pS     Scale vector.
+		  */
+		void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
+
+		/** Assignment operator.
+		  * \param pM FbxAMatrix assigned to this one.
+		  */
+		FbxAMatrix& operator=(const FbxAMatrix& pM);
+	//@}
+
+	/**
+	  * \name Scalar Operations
+	  */
+	//@{
+		/** Multiply matrix by a scalar value.
+		  * \param pValue     Scalar value.
+		  * \return           The scaled matrix.
+		  * \remarks          The passed value is not checked. 
+		  *                   This operator operates on the first three rows and columns of the matrix. 
+		  *                   So only the rotation and scaling are scaled, not the translation part.
+		  *                   After operation, the translation vector will be set as (0,0,0,1);
+		  */
+		FbxAMatrix operator*(double pValue) const;
+
+		/** Divide matrix by a scalar value.
+		  * \param pValue     Scalar value.
+		  * \return           The divided matrix.
+		  * \remarks          The passed value is not checked.
+		  *                   This operator operates on the first three rows and columns of the matrix. 
+		  *                   So only the rotation and scaling are scaled, not the translation part. 
+		  *                   After operation, the translation vector will be set as (0,0,0,1);
+		  */
+		FbxAMatrix operator/(double pValue) const;
+
+		/** Multiply matrix by a scalar value.
+		  * \param pValue     Scalar value.
+		  * \return           \e this updated with the result of the multiplication.
+		  * \remarks          The passed value is not checked.
+		  *                   This operator operates on the first three rows and columns of the matrix. 
+		  *                   So only the rotation and scaling are scaled, not the translation part. 
+		  *                   After operation, the translation vector will keep original value.
+		  */
+		FbxAMatrix& operator*=(double pValue);
+
+		/** Divide matrix by a scalar value.
+		  * \param pValue     Scalar value.
+		  * \return           \e this updated with the result of the division.
+		  * \remarks          The passed value is not checked.
+		  *                   This operator operates on the first three rows and columns of the matrix. 
+		  *                   So only the rotation and scaling are scaled, not the translation part. 
+		  *                   After operation, the translation vector will keep original value.
+		  */
+		FbxAMatrix& operator/=(double pValue);
+	//@}
+
+	/**
+	  * \name Vector Operations
+	  */
+	//@{
+		/** Multiply matrix by a translation vector.
+		  * \param pVector4     Translation vector.
+		  * \return             t' = M * t
+		  */
+		FbxVector4 MultT(const FbxVector4& pVector4) const;
+
+		/** Multiply matrix by an Euler rotation vector.
+		  * \param pVector4     Euler Rotation vector.
+		  * \return             r' = M * r
+		  */
+		FbxVector4 MultR(const FbxVector4& pVector4) const;
+		
+		/** Multiply matrix by a quaternion.
+		  * \param pQuaternion     Rotation value.
+		  * \return                q' = M * q
+		  */
+		FbxQuaternion MultQ(const FbxQuaternion& pQuaternion) const;
+
+		/** Multiply matrix by a scale vector.
+		  * \param pVector4     Scaling vector.
+		  * \return             s' = M * s
+		  */
+		FbxVector4 MultS(const FbxVector4& pVector4) const;
+	//@}
+
+	/**
+	  * \name Matrix Operations
+	  */
+	//@{	
+		/**	Unary minus operator.
+		  * \return     A matrix where each element is multiplied by -1.
+		  */
+		FbxAMatrix operator-() const;
+		
+		/** Multiply two matrices together.
+		  * \param pOther     A Matrix.
+		  * \return             this * pMatrix.
+		  * \remarks            Transformations are pre-multiplied.
+		  *  That means to scale, then rotate, and then translate a vector V, the transform should be T * R * S * V. \n
+		  *  Below is an example of code that shows how to construct rotation transform in XYZ rotation order.
+		  *  \code
+		  *  FbxAMatrix lRotateXM, lRotateYM, lRotateZM, lRotateXYZM, lRotateM;
+		  *  // Construct rotation matrix around X, Y and Z axises separately and then combine them.
+		  *  FbxVector4 lRotateX(10, 0, 0);
+		  *  FbxVector4 lRotateY(0, 10, 0);
+		  *  FbxVector4 lRotateZ(0, 0, 10);
+		  *  lRotateXM.SetR(lRotateX);
+		  *  lRotateYM.SetR(lRotateY);
+		  *  lRotateZM.SetR(lRotateZ);
+		  *  lRotateXYZM = lRotateZM * lRotateYM * lRotateXM;
+		  *
+		  *  // Alternatively, we can use SetR() directly.
+		  *  // lRotateXYZM and lRotateM will be the same.
+		  *  FbxVector4 lRotateXYZ (10, 10, 10);
+		  *  lRotateM.SetR(lRotateXYZ);
+		  *  \endcode
+		  * \note                Please refer to the FBX SDK programmers guide for more details.
+		  */
+		FbxAMatrix operator*(const FbxAMatrix& pOther) const;
+
+		/** Multiply two matrices together.
+		  * \param pOther     A Matrix.
+		  * \return             \e this updated with the result of the multiplication.
+		  */
+		FbxAMatrix& operator*=(const FbxAMatrix& pOther);
+
+		/** Calculate the matrix inverse.
+		  * \return     The inverse matrix of \e this.
+		  */
+		FbxAMatrix Inverse() const;
+
+		/** Calculate the matrix transpose.
+		  * \return     The transposed matrix of \e this.
+		  */
+		FbxAMatrix Transpose() const;
+
+		/** Calculate a spherical linear interpolation matrix.
+		* \param pOther The other rotation matrix to interpolate with.
+		* \param pWeight A value between 0.0 and 1.0 to specify the interpolation amount.
+		* \remark This matrix and other matrix should contain only rotations, otherwise result may be undefined. */
+		FbxAMatrix Slerp(const FbxAMatrix& pOther, double pWeight) const;
+	//@}
+
+	/**
+	  * \name Boolean Operations
+	  */
+	//@{
+		/**	Equivalence operator.
+		  * \param pOther     The matrix to be compared to \e this.
+		  * \return             \c true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c false otherwise.
+		  */
+		bool operator==(const FbxAMatrix& pOther) const;
+
+		/**	Non-equivalence operator.
+		  * \param pOther     The matrix to be compared to \e this.
+		  * \return            \c false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c true otherwise.
+		  */
+		bool operator!=(const FbxAMatrix& pOther) const;
+	//@}
+
+	/**
+	  * \name Casting
+	  */
+	//@{
+		//! Cast the matrix in a double pointer.
+		operator double* ();
+		//! Cast the matrix in a const double pointer.
+		operator const double* () const;
+		//! Define 4*4 array as a new type 
+		typedef const double(kDouble44)[4][4] ;
+		//! Cast the matrix in a reference to a 4*4 array.
+		inline kDouble44 & Double44() const { return *((kDouble44 *)&mData[0][0]); }
+	//@}
+
+	/** Find out if the matrix is equal to identity matrix.
+	* \return \c true if the matrix is equal to identity matrix, \c false otherwise. */
+	bool IsIdentity(const double pThreshold=FBXSDK_TOLERANCE);
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	FbxAMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
+
+	void SetTRS(const FbxVector4& pT, const FbxAMatrix& pRM, const FbxVector4& pS);
+    void SetRow(int pY, const FbxVector4& pRow);
+    void SetTOnly(const FbxVector4& pT);
+    void SetROnly(const FbxVector4& pR);
+    void SetQOnly(const FbxQuaternion& pQ);
+	FbxVector4 GetROnly() const;
+    FbxQuaternion GetUnnormalizedQ() const;
+
+	// pOrd is assumed to be an FbxEuler::EOrder (or its synonym EFbxRotationOrder)
+    void SetR(const FbxVector4& pV, const int pOrd); 
+	FbxVector4 GetR(const int pOrd) const;
+
+    void MultRM(const FbxVector4& pR);
+    void MultSM(const FbxVector4& pS);
+    bool IsRightHand() const;
+    double Determinant() const;
+	int Compare(const FbxAMatrix pM, const double pThreshold=FBXSDK_TOLERANCE) const;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_AFFINE_MATRIX_H_ */

+ 325 - 325
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxdualquaternion.h

@@ -1,325 +1,325 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxdualquaternion.h
-#ifndef _FBXSDK_CORE_MATH_DUAL_QUATERNION_H_
-#define _FBXSDK_CORE_MATH_DUAL_QUATERNION_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/math/fbxquaternion.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/**	FBX SDK dual quaternion class to represent rigid transformation, which is combined by two quaternions.
-  * A transformation is said to be rigid if it preserves relative distances and angles.
-  * That means rotation and translation.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxDualQuaternion
-{
-public:
-	/**
-	  * \name Constructors and Destructor
-	  */
-	//@{
-		//! Constructor.
-		FbxDualQuaternion();
-
-		/** Constructor.
-		* \param pV1 FbxQuaternion object.
-		* \param pV2 FbxQuaternion object.
-		*/
-		FbxDualQuaternion(const FbxQuaternion& pV1, const FbxQuaternion& pV2);
-
-		/** Copy constructor.
-		  * \param pV FbxQuaternion object copied to this one.
-		  */
-		FbxDualQuaternion(const FbxDualQuaternion& pV);
-
-		/** Constructor.
-		* \param pRotation     The rotation the dual quaternion is going to represent.
-		* \param pTranslation  The translation the dual quaternion is going to represent.
-		*/
-		FbxDualQuaternion(const FbxQuaternion& pRotation, const FbxVector4& pTranslation);
-
-		/** Constructor.
-		  * \param pX1     The X component of the first quaternion.
-		  * \param pY1     The Y component of the first quaternion.
-		  * \param pZ1     The Z component of the first quaternion.
-		  * \param pW1     The W component of the first quaternion.
-		  * \param pX2     The X component of the second quaternion.
-		  * \param pY2     The Y component of the second quaternion.
-		  * \param pZ2     The Z component of the second quaternion.
-		  * \param pW2     The W component of the second quaternion.
-		  */
-		FbxDualQuaternion(double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2);
-
-		//! Destructor.
-		~FbxDualQuaternion();
-	//@}
-
-	/**
-	* \name Access
-	*/
-	//@{
-		/** Assignment operation.
-		* \param pDualQuaternion FbxDualQuaternion object assigned to this one.
-		*/
-		FbxDualQuaternion& operator=(const FbxDualQuaternion& pDualQuaternion);
-
-		/** Set vector.
-		* \param pX1     The X component of the first quaternion.
-		* \param pY1     The Y component of the first quaternion.
-		* \param pZ1     The Z component of the first quaternion.
-		* \param pW1     The W component of the first quaternion.
-		* \param pX2     The X component of the second quaternion.
-		* \param pY2     The Y component of the second quaternion.
-		* \param pZ2     The Z component of the second quaternion.
-		* \param pW2     The W component of the second quaternion.
-		*/
-		void Set(double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2);
-
-		/** Get the first quaternion of the dual quaternion.
-		* \return The first quaternion of the dual quaternion.
-		*/
-		FbxQuaternion& GetFirstQuaternion();
-
-		/** Get the second quaternion of the dual quaternion.
-		* \return The second quaternion of the dual quaternion.
-		*/
-		FbxQuaternion& GetSecondQuaternion();
-
-		/** Get the first quaternion of the dual quaternion.
-		* \return The first quaternion of the dual quaternion.
-		*/
-		const FbxQuaternion& GetFirstQuaternion() const;
-
-		/** Get the second quaternion of the dual quaternion.
-		* \return The second quaternion of the dual quaternion.
-		*/
-		const FbxQuaternion& GetSecondQuaternion() const;
-
-		/** Get the rotation part from the dual quaternion.
-		* \return FbxQuaternion object to represent rotation.
-		*/
-		FbxQuaternion GetRotation() const;
-
-		/** Get the translation part from the dual quaternion.
-		* \return FbxVector4 object to represent translation.
-		* \remarks A dual quaternion can represent rotation followed by translation, or translation followed by rotation.
-		* This method assumes that the rotation is expressed first, followed by translation, as is done by most DCC tools.
-		*/
-		FbxVector4 GetTranslation() const;
-	//@}
-
-	/**
-	  * \name Scalar Operations
-	  */
-	//@{
-		/** Add a value to all vector components.
-		  * \param pValue     The value to add to each component of the vector.
-		  * \return           New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion operator+(double pValue) const;
-
-		/** Subtract a value from all vector components.
-		  * \param pValue     The value to subtract from each component of the vector.
-		  * \return           New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion operator-(double pValue) const;
-
-		/** Multiply all vector components by a value.
-		  * \param pValue     The value multiplying each component of the vector.
-		  * \return           New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion operator*(double pValue) const;
-
-		/**	Divide all vector components by a value.
-		  * \param pValue     The value dividing each component of the vector.
-		  * \return           New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion operator/(double pValue) const;
-
-		/** Add a value to all vector components.
-		  * \param pValue     The value to add to each component of the vector.
-		  * \return           The result of adding pValue to each component of the vector, replacing this dual quaternion.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion& operator+=(double pValue);
-
-		/** Subtract a value from all vector components.
-		  * \param pValue     The value to subtract from each component of the vector.
-		  * \return           The result of subtracting pValue from each component of the vector, replacing this dual quaternion.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion& operator-=(double pValue);
-
-		/** Multiply a value to all vector elements.
-		  * \param pValue     The value multiplying each component of the vector.
-		  * \return           The result of multiplying each component of the vector by pValue, replacing this dual quaternion.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion& operator*=(double pValue);
-
-		/**	Divide all vector elements by a value.
-		  * \param pValue     The value dividing each component of the vector.
-		  * \return           The result of dividing each component of the vector by pValue, replacing this dual quaternion.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxDualQuaternion& operator/=(double pValue);
-	//@}
-
-	/**
-	  * \name Vector Operations
-	  */
-	//@{
-		/**	Unary minus operator.
-		  * \return      A dual quaternion where each component is multiplied by -1.
-		  */
-		FbxDualQuaternion operator-() const;
-
-		/** Add two vectors together.
-		  * \param pDualQuaternion     Dual quaternion to add.
-		  * \return                The dual quaternion v' = this + pDualQuaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion operator+(const FbxDualQuaternion& pDualQuaternion) const;
-
-		/** Subtract a quaternion from another quaternion.
-		  * \param pDualQuaternion     Dual quaternion to subtract.
-		  * \return                The dual quaternion v' = this - pDualQuaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion operator-(const FbxDualQuaternion& pDualQuaternion) const;
-
-		/** Memberwise multiplication of two vectors.
-		  * \param pDualQuaternion     Multiplying dual quaternion.
-		  * \return                The dual quaternion v' = this * pQuaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion operator*(const FbxDualQuaternion& pDualQuaternion) const;
-
-		/** Memberwise division of a dual quaternion with another dual quaternion.
-		  * \param pDualQuaternion     Dividing dual quaternion.
-		  * \return                The dual quaternion v' = this / pQuaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion operator/(const FbxDualQuaternion& pDualQuaternion) const;
-
-		/** Add two quaternions together.
-		  * \param pDualQuaternion     Dual quaternion to add.
-		  * \return                The dual quaternion v' = this + pQuaternion, replacing this dual quaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion& operator+=(const FbxDualQuaternion& pDualQuaternion);
-
-		/** Subtract a dual quaternion from another vector.
-		  * \param pDualQuaternion     Dual quaternion to subtract.
-		  * \return                The dual quaternion v' = this - pQuaternion, replacing this dual quaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion& operator-=(const FbxDualQuaternion& pDualQuaternion);
-
-		/** Memberwise multiplication of two quaternions.
-		  * \param pDualQuaternion     Multiplying dual quaternion.
-		  * \return                The dual quaternion v' = this * pQuaternion, replacing this dual quaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion& operator*=(const FbxDualQuaternion& pDualQuaternion);
-
-		/** Memberwise division of a dual quaternion by another dual quaternion.
-		  * \param pDualQuaternion     Dividing dual quaternion.
-		  * \return                The dual quaternion v' = this / pQuaternion, replacing this dual quaternion.
-		  * \remarks               The values in pDualQuaternion are not checked.
-		  */
-		FbxDualQuaternion& operator/=(const FbxDualQuaternion& pDualQuaternion);
-
-		/** Multiplication of a dual quaternion by a FbxVector4.
-		* \param pVector     The FbxVector4 to multiply with.
-		* \return            The dual quaternion v' = FbxDualQuaternion(mQ1, (mQ1 * pVector) + mQ2).
-		* \remarks           The values in pDualQuaternion are not checked.
-		*/
-		FbxDualQuaternion operator*(const FbxVector4 pVector) const;
-
-		/** Return dual quaternion product.
-		* \param pDualQuaternion	Product dual quaternion.
-		* \return					The dual quaternion that is the product of this and pDualQuaternion.
-		*/
-		FbxDualQuaternion Product(const FbxDualQuaternion& pDualQuaternion) const;
-
-		/** Normalize the dual quaternion, length set to 1.
-		*/
-		void Normalize();
-
-		/** Calculate the dual quaternion's inverse.
-		* \return      The inverse of this dual quaternion. 
-		*/
-		void Inverse();
-
-		/** Deform a point by this dual quaternion.
-		* \return      The inverse of this quaternion. 
-		*/
-		FbxVector4 Deform(FbxVector4& pPoint);
-	//@}
-
-	/**
-	* \name Conjugate Operations
-	* \brief Dual quaternion has three types of conjugate.
-	*/
-	//@{
-		/** Conjugate both quaternions of this dual quaternion.
-		*/
-		void Conjugate();
-
-		/** Conjugate in dual space.
-		*/
-		void Dual();
-
-		/** Conjugate both quaternions of this dual quaternion in dual space.
-		*/
-		void DualConjugate();
-	//@}
-
-	/**
-	  * \name Boolean Operations
-	  */
-	//@{
-		/**	Equivalence operator.
-		  * \param pV     The quaternion to be compared to this quaternion.
-		  * \return       \c true  if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false  otherwise.
-		  */
-		bool operator==(const FbxDualQuaternion & pV) const;
-
-		/**	Non equivalence operator.
-		  * \param pV     The quaternion to be compared to \e this.
-		  * \return       \c  false if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true  otherwise.
-		  */
-		bool operator!=(const FbxDualQuaternion & pV) const;
-	//@}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-	FbxQuaternion mQ1;
-	FbxQuaternion mQ2;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_DUAL_QUATERNION_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxdualquaternion.h
+#ifndef _FBXSDK_CORE_MATH_DUAL_QUATERNION_H_
+#define _FBXSDK_CORE_MATH_DUAL_QUATERNION_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/math/fbxquaternion.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/**	FBX SDK dual quaternion class to represent rigid transformation, which is combined by two quaternions.
+  * A transformation is said to be rigid if it preserves relative distances and angles.
+  * That means rotation and translation.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxDualQuaternion
+{
+public:
+	/**
+	  * \name Constructors and Destructor
+	  */
+	//@{
+		//! Constructor.
+		FbxDualQuaternion();
+
+		/** Constructor.
+		* \param pV1 FbxQuaternion object.
+		* \param pV2 FbxQuaternion object.
+		*/
+		FbxDualQuaternion(const FbxQuaternion& pV1, const FbxQuaternion& pV2);
+
+		/** Copy constructor.
+		  * \param pV FbxQuaternion object copied to this one.
+		  */
+		FbxDualQuaternion(const FbxDualQuaternion& pV);
+
+		/** Constructor.
+		* \param pRotation     The rotation the dual quaternion is going to represent.
+		* \param pTranslation  The translation the dual quaternion is going to represent.
+		*/
+		FbxDualQuaternion(const FbxQuaternion& pRotation, const FbxVector4& pTranslation);
+
+		/** Constructor.
+		  * \param pX1     The X component of the first quaternion.
+		  * \param pY1     The Y component of the first quaternion.
+		  * \param pZ1     The Z component of the first quaternion.
+		  * \param pW1     The W component of the first quaternion.
+		  * \param pX2     The X component of the second quaternion.
+		  * \param pY2     The Y component of the second quaternion.
+		  * \param pZ2     The Z component of the second quaternion.
+		  * \param pW2     The W component of the second quaternion.
+		  */
+		FbxDualQuaternion(double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2);
+
+		//! Destructor.
+		~FbxDualQuaternion();
+	//@}
+
+	/**
+	* \name Access
+	*/
+	//@{
+		/** Assignment operation.
+		* \param pDualQuaternion FbxDualQuaternion object assigned to this one.
+		*/
+		FbxDualQuaternion& operator=(const FbxDualQuaternion& pDualQuaternion);
+
+		/** Set vector.
+		* \param pX1     The X component of the first quaternion.
+		* \param pY1     The Y component of the first quaternion.
+		* \param pZ1     The Z component of the first quaternion.
+		* \param pW1     The W component of the first quaternion.
+		* \param pX2     The X component of the second quaternion.
+		* \param pY2     The Y component of the second quaternion.
+		* \param pZ2     The Z component of the second quaternion.
+		* \param pW2     The W component of the second quaternion.
+		*/
+		void Set(double pX1, double pY1, double pZ1, double pW1, double pX2, double pY2, double pZ2, double pW2);
+
+		/** Get the first quaternion of the dual quaternion.
+		* \return The first quaternion of the dual quaternion.
+		*/
+		FbxQuaternion& GetFirstQuaternion();
+
+		/** Get the second quaternion of the dual quaternion.
+		* \return The second quaternion of the dual quaternion.
+		*/
+		FbxQuaternion& GetSecondQuaternion();
+
+		/** Get the first quaternion of the dual quaternion.
+		* \return The first quaternion of the dual quaternion.
+		*/
+		const FbxQuaternion& GetFirstQuaternion() const;
+
+		/** Get the second quaternion of the dual quaternion.
+		* \return The second quaternion of the dual quaternion.
+		*/
+		const FbxQuaternion& GetSecondQuaternion() const;
+
+		/** Get the rotation part from the dual quaternion.
+		* \return FbxQuaternion object to represent rotation.
+		*/
+		FbxQuaternion GetRotation() const;
+
+		/** Get the translation part from the dual quaternion.
+		* \return FbxVector4 object to represent translation.
+		* \remarks A dual quaternion can represent rotation followed by translation, or translation followed by rotation.
+		* This method assumes that the rotation is expressed first, followed by translation, as is done by most DCC tools.
+		*/
+		FbxVector4 GetTranslation() const;
+	//@}
+
+	/**
+	  * \name Scalar Operations
+	  */
+	//@{
+		/** Add a value to all vector components.
+		  * \param pValue     The value to add to each component of the vector.
+		  * \return           New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion operator+(double pValue) const;
+
+		/** Subtract a value from all vector components.
+		  * \param pValue     The value to subtract from each component of the vector.
+		  * \return           New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion operator-(double pValue) const;
+
+		/** Multiply all vector components by a value.
+		  * \param pValue     The value multiplying each component of the vector.
+		  * \return           New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion operator*(double pValue) const;
+
+		/**	Divide all vector components by a value.
+		  * \param pValue     The value dividing each component of the vector.
+		  * \return           New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion operator/(double pValue) const;
+
+		/** Add a value to all vector components.
+		  * \param pValue     The value to add to each component of the vector.
+		  * \return           The result of adding pValue to each component of the vector, replacing this dual quaternion.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion& operator+=(double pValue);
+
+		/** Subtract a value from all vector components.
+		  * \param pValue     The value to subtract from each component of the vector.
+		  * \return           The result of subtracting pValue from each component of the vector, replacing this dual quaternion.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion& operator-=(double pValue);
+
+		/** Multiply a value to all vector elements.
+		  * \param pValue     The value multiplying each component of the vector.
+		  * \return           The result of multiplying each component of the vector by pValue, replacing this dual quaternion.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion& operator*=(double pValue);
+
+		/**	Divide all vector elements by a value.
+		  * \param pValue     The value dividing each component of the vector.
+		  * \return           The result of dividing each component of the vector by pValue, replacing this dual quaternion.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxDualQuaternion& operator/=(double pValue);
+	//@}
+
+	/**
+	  * \name Vector Operations
+	  */
+	//@{
+		/**	Unary minus operator.
+		  * \return      A dual quaternion where each component is multiplied by -1.
+		  */
+		FbxDualQuaternion operator-() const;
+
+		/** Add two vectors together.
+		  * \param pDualQuaternion     Dual quaternion to add.
+		  * \return                The dual quaternion v' = this + pDualQuaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion operator+(const FbxDualQuaternion& pDualQuaternion) const;
+
+		/** Subtract a quaternion from another quaternion.
+		  * \param pDualQuaternion     Dual quaternion to subtract.
+		  * \return                The dual quaternion v' = this - pDualQuaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion operator-(const FbxDualQuaternion& pDualQuaternion) const;
+
+		/** Memberwise multiplication of two vectors.
+		  * \param pDualQuaternion     Multiplying dual quaternion.
+		  * \return                The dual quaternion v' = this * pQuaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion operator*(const FbxDualQuaternion& pDualQuaternion) const;
+
+		/** Memberwise division of a dual quaternion with another dual quaternion.
+		  * \param pDualQuaternion     Dividing dual quaternion.
+		  * \return                The dual quaternion v' = this / pQuaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion operator/(const FbxDualQuaternion& pDualQuaternion) const;
+
+		/** Add two quaternions together.
+		  * \param pDualQuaternion     Dual quaternion to add.
+		  * \return                The dual quaternion v' = this + pQuaternion, replacing this dual quaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion& operator+=(const FbxDualQuaternion& pDualQuaternion);
+
+		/** Subtract a dual quaternion from another vector.
+		  * \param pDualQuaternion     Dual quaternion to subtract.
+		  * \return                The dual quaternion v' = this - pQuaternion, replacing this dual quaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion& operator-=(const FbxDualQuaternion& pDualQuaternion);
+
+		/** Memberwise multiplication of two quaternions.
+		  * \param pDualQuaternion     Multiplying dual quaternion.
+		  * \return                The dual quaternion v' = this * pQuaternion, replacing this dual quaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion& operator*=(const FbxDualQuaternion& pDualQuaternion);
+
+		/** Memberwise division of a dual quaternion by another dual quaternion.
+		  * \param pDualQuaternion     Dividing dual quaternion.
+		  * \return                The dual quaternion v' = this / pQuaternion, replacing this dual quaternion.
+		  * \remarks               The values in pDualQuaternion are not checked.
+		  */
+		FbxDualQuaternion& operator/=(const FbxDualQuaternion& pDualQuaternion);
+
+		/** Multiplication of a dual quaternion by a FbxVector4.
+		* \param pVector     The FbxVector4 to multiply with.
+		* \return            The dual quaternion v' = FbxDualQuaternion(mQ1, (mQ1 * pVector) + mQ2).
+		* \remarks           The values in pDualQuaternion are not checked.
+		*/
+		FbxDualQuaternion operator*(const FbxVector4 pVector) const;
+
+		/** Return dual quaternion product.
+		* \param pDualQuaternion	Product dual quaternion.
+		* \return					The dual quaternion that is the product of this and pDualQuaternion.
+		*/
+		FbxDualQuaternion Product(const FbxDualQuaternion& pDualQuaternion) const;
+
+		/** Normalize the dual quaternion, length set to 1.
+		*/
+		void Normalize();
+
+		/** Calculate the dual quaternion's inverse.
+		* \return      The inverse of this dual quaternion. 
+		*/
+		void Inverse();
+
+		/** Deform a point by this dual quaternion.
+		* \return      The inverse of this quaternion. 
+		*/
+		FbxVector4 Deform(FbxVector4& pPoint);
+	//@}
+
+	/**
+	* \name Conjugate Operations
+	* \brief Dual quaternion has three types of conjugate.
+	*/
+	//@{
+		/** Conjugate both quaternions of this dual quaternion.
+		*/
+		void Conjugate();
+
+		/** Conjugate in dual space.
+		*/
+		void Dual();
+
+		/** Conjugate both quaternions of this dual quaternion in dual space.
+		*/
+		void DualConjugate();
+	//@}
+
+	/**
+	  * \name Boolean Operations
+	  */
+	//@{
+		/**	Equivalence operator.
+		  * \param pV     The quaternion to be compared to this quaternion.
+		  * \return       \c true  if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false  otherwise.
+		  */
+		bool operator==(const FbxDualQuaternion & pV) const;
+
+		/**	Non equivalence operator.
+		  * \param pV     The quaternion to be compared to \e this.
+		  * \return       \c  false if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true  otherwise.
+		  */
+		bool operator!=(const FbxDualQuaternion & pV) const;
+	//@}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+	FbxQuaternion mQ1;
+	FbxQuaternion mQ2;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_DUAL_QUATERNION_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 512 - 501
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxmath.h


+ 281 - 281
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxmatrix.h

@@ -1,281 +1,281 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxmatrix.h
-#ifndef _FBXSDK_CORE_MATH_MATRIX_H_
-#define _FBXSDK_CORE_MATH_MATRIX_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/math/fbxvector4.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxAMatrix;
-
-/**	FBX SDK basic 4x4 double matrix class.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxMatrix : public FbxDouble4x4
-{
-public:
-	//! \name Constructors and Destructor
-	//@{
-		//! Constructor (initialize to an identity matrix)
-		FbxMatrix();
-
-		/** Copy constructor.
-		* \param pM Another FbxMatrix object copied to this one. */
-		FbxMatrix(const FbxMatrix& pM);
-
-		/** Copy constructor for affine matrix.
-		* \param pM Affine matrix */
-		FbxMatrix(const FbxAMatrix& pM);
-
-		/** TRS Constructor.
-		* \param pT Translation vector.
-		* \param pR Euler rotation vector.
-		* \param pS Scale vector. */
-		FbxMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
-
-		/** TQS Constructor.
-		* \param pT Translation vector.
-		* \param pQ Quaternion.
-		* \param pS Scale vector. */
-		FbxMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
-
-		/** 16 double constructor.
-		* \param p00 Value at column 0 row 0.
-		* \param p10 Value at column 1 row 0.
-		* \param p20 Value at column 2 row 0.
-		* \param p30 Value at column 3 row 0.
-		* \param p01 Value at column 0 row 1.
-		* \param p11 Value at column 1 row 1.
-		* \param p21 Value at column 2 row 1.
-		* \param p31 Value at column 3 row 1.
-		* \param p02 Value at column 0 row 2.
-		* \param p12 Value at column 1 row 2.
-		* \param p22 Value at column 2 row 2.
-		* \param p32 Value at column 3 row 2.
-		* \param p03 Value at column 0 row 3.
-		* \param p13 Value at column 1 row 3.
-		* \param p23 Value at column 2 row 3.
-		* \param p33 Value at column 3 row 3. */
-		FbxMatrix(	const double p00, const double p10, const double p20, const double p30,
-					const double p01, const double p11, const double p21, const double p31,
-					const double p02, const double p12, const double p22, const double p32,
-					const double p03, const double p13, const double p23, const double p33);
-			
-		//! Destructor.
-		~FbxMatrix();
-	//@}
-
-	//! \name Access
-	//@{
-		/** Retrieve matrix element.
-		* \param pY Row index.
-		* \param pX Column index.
-		* \return Value at element [ pX, pY ] of the matrix. */
-		double Get(int pY, int pX) const;
-
-		/** Extract a row vector.
-		* \param pY Row index.
-		* \return The row vector. */
-		FbxVector4 GetRow(int pY) const;
-
-		/** Extract a column vector.
-		* \param pX Column index.
-		* \return The column vector. */
-		FbxVector4 GetColumn(int pX) const;
-
-		/** Set matrix element.
-		* \param pY Row index.
-		* \param pX Column index.
-		* \param pValue New component value. */
-		void Set(int pY, int pX, double pValue);
-
-		/** Set matrix.
-		* \param pT Translation vector.
-		* \param pR Euler rotation vector.
-		* \param pS Scale vector. */
-		void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
-
-		/** Set matrix.
-		* \param pT Translation vector.
-		* \param pQ Quaternion.
-		* \param pS Scale vector. */
-		void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
-
-		/** Set a matrix row.
-		* \param pY Row index.
-		* \param pRow Row vector. */
-		void SetRow(int pY, const FbxVector4& pRow);
-
-		/** Set a matrix column.
-		* \param pX Column index.
-		* \param pColumn Column vector. */
-		void SetColumn(int pX, const FbxVector4& pColumn);
-
-		/** Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.
-		* \param pTranslation Translation element.
-		* \param pRotation Rotation element.
-		* \param pShearing Shearing element.
-		* \param pScaling Scaling element.
-		* \param pSign Sign of determinant. */
-		void GetElements(FbxVector4& pTranslation, FbxQuaternion& pRotation, FbxVector4& pShearing, FbxVector4& pScaling, double& pSign) const;
-		
-		/** Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.
-		* \param pTranslation Translation element.
-		* \param pRotation Rotation element.
-		* \param pShearing Shearing element.
-		* \param pScaling Scaling element.
-		* \param pSign Sign of determinant. */
-		void GetElements(FbxVector4& pTranslation, FbxVector4& pRotation, FbxVector4& pShearing, FbxVector4& pScaling, double& pSign) const;
-	//@}
-
-	//! \name Operators
-	//@{
-		/** Assignment operator.
-		* \param pMatrix Source matrix. */
-		FbxMatrix& operator=(const FbxMatrix& pMatrix);
-
-		/**	Unary minus operator.
-		* \return A matrix where each element is multiplied by -1. */
-		FbxMatrix operator-() const;
-
-		/** Add two matrices together.
-		* \param pMatrix A matrix.
-		* \return The result of this matrix + pMatrix. */
-		FbxMatrix operator+(const FbxMatrix& pMatrix) const;
-
-		/** Subtract a matrix from another matrix.
-		* \param pMatrix A matrix.
-		* \return The result of this matrix - pMatrix. */
-		FbxMatrix operator-(const FbxMatrix& pMatrix) const;
-
-		/** Multiply two matrices.
-		* \param pMatrix A matrix.
-		* \return The result of this matrix * pMatrix. */
-		FbxMatrix operator*(const FbxMatrix& pMatrix) const;
-
-		/** Add two matrices together.
-		* \param pMatrix A matrix.
-		* \return The result of this matrix + pMatrix, replacing this matrix. */
-		FbxMatrix& operator+=(const FbxMatrix& pMatrix);
-
-		/** Subtract a matrix from another matrix.
-		* \param pMatrix A matrix.
-		* \return The result of this matrix - pMatrix, replacing this matrix. */
-		FbxMatrix& operator-=(const FbxMatrix& pMatrix);
-
-		/** Multiply two matrices.
-		* \param pMatrix A matrix.
-		* \return The result of this matrix * pMatrix, replacing this matrix. */
-		FbxMatrix& operator*=(const FbxMatrix& pMatrix);
-
-		/**	Equivalence operator.
-		* \param pM The matrix to be compared against this matrix.
-		* \return \c true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false otherwise. */
-		bool operator==(const FbxMatrix& pM) const;
-
-		/**	Equivalence operator.
-		* \param pM The affine matrix to be compared against this matrix.
-		* \return \c true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false otherwise. */
-		bool operator==(const FbxAMatrix& pM) const;
-
-		/**	Non-equivalence operator.
-		* \param pM The matrix to be compared against this matrix.
-		* \return \c false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true otherwise. */
-		bool operator!=(const FbxMatrix& pM) const;
-
-		/**	Non-equivalence operator.
-		* \param pM The affine matrix to be compared against this matrix.
-		* \return \c false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true otherwise. */
-		bool operator!=(const FbxAMatrix& pM) const;
-	//@}
-
-	//! \name Casting
-	//@{
-		//! Cast the vector in a double pointer.
-		operator double* ();
-
-		//! Cast the vector in a const double pointer.
-		operator const double* () const;
-
-		//! Define 4*4 array as a new type.
-		typedef const double(kDouble44)[4][4] ;
-
-		//! Cast the matrix in a reference to a 4*4 array.
-		inline kDouble44 & Double44() const { return *((kDouble44 *)&mData[0][0]); }
-	//@}
-
-	//! \name Math Operations
-	//@{
-		/** Calculate the matrix inverse.
-		* \return The inverse matrix. */
-		FbxMatrix Inverse() const;
-
-		/** Calculate the matrix transpose.
-		* \return This matrix transposed. */
-		FbxMatrix Transpose() const;
-
-		//! Set matrix to identity.
-		void SetIdentity();
-
-		/** Set the matrix to a "Look To" left handed.
-		* \param pEyePosition The position of the eye.
-		* \param pEyeDirection The direction of the eye.
-		* \param pUpDirection The up direction of the eye. */
-		void SetLookToLH(const FbxVector4& pEyePosition, const FbxVector4& pEyeDirection, const FbxVector4& pUpDirection);
-
-		/** Set the matrix to a "Look To" right handed.
-		* \param pEyePosition The position of the eye.
-		* \param pEyeDirection The direction of the eye.
-		* \param pUpDirection The up direction of the eye. */
-		void SetLookToRH(const FbxVector4& pEyePosition, const FbxVector4& pEyeDirection, const FbxVector4& pUpDirection);
-
-		/** Set the matrix to a "Look At" left handed.
-		* \param pEyePosition The position of the eye.
-		* \param pLookAt The look at position of the eye focus.
-		* \param pUpDirection The up direction of the eye. */
-		void SetLookAtLH(const FbxVector4& pEyePosition, const FbxVector4& pLookAt, const FbxVector4& pUpDirection);
-
-		/** Set the matrix values as a "Look At" right handed.
-		* \param pEyePosition The position of the eye.
-		* \param pLookAt The look at position of the eye focus.
-		* \param pUpDirection The up direction of the eye. */
-		void SetLookAtRH(const FbxVector4& pEyePosition, const FbxVector4& pLookAt, const FbxVector4& pUpDirection);
-
-		/** Multiply this matrix by pVector, the w component is normalized to 1.
-		* \param pVector A vector.
-		* \return The result of this matrix * pVector. */
-		FbxVector4 MultNormalize(const FbxVector4& pVector) const;
-	//@}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	int Compare(const FbxMatrix pM, const double pThreshold = FBXSDK_TOLERANCE) const;
-	int Compare(const FbxAMatrix pM, const double pThreshold = FBXSDK_TOLERANCE) const;
-
-	FbxMatrix operator*(double pValue) const;
-	FbxMatrix& operator*=(double pValue);
-
-    double LUDecomposition(FbxVector4& pVector);
-    FbxMatrix LUMult(FbxMatrix pM, const FbxVector4& pVector) const;
-    double Determinant() const;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_MATRIX_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxmatrix.h
+#ifndef _FBXSDK_CORE_MATH_MATRIX_H_
+#define _FBXSDK_CORE_MATH_MATRIX_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/math/fbxvector4.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxAMatrix;
+
+/**	FBX SDK basic 4x4 double matrix class.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxMatrix : public FbxDouble4x4
+{
+public:
+	//! \name Constructors and Destructor
+	//@{
+		//! Constructor (initialize to an identity matrix)
+		FbxMatrix();
+
+		/** Copy constructor.
+		* \param pM Another FbxMatrix object copied to this one. */
+		FbxMatrix(const FbxMatrix& pM);
+
+		/** Copy constructor for affine matrix.
+		* \param pM Affine matrix */
+		FbxMatrix(const FbxAMatrix& pM);
+
+		/** TRS Constructor.
+		* \param pT Translation vector.
+		* \param pR Euler rotation vector.
+		* \param pS Scale vector. */
+		FbxMatrix(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
+
+		/** TQS Constructor.
+		* \param pT Translation vector.
+		* \param pQ Quaternion.
+		* \param pS Scale vector. */
+		FbxMatrix(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
+
+		/** 16 double constructor.
+		* \param p00 Value at column 0 row 0.
+		* \param p10 Value at column 1 row 0.
+		* \param p20 Value at column 2 row 0.
+		* \param p30 Value at column 3 row 0.
+		* \param p01 Value at column 0 row 1.
+		* \param p11 Value at column 1 row 1.
+		* \param p21 Value at column 2 row 1.
+		* \param p31 Value at column 3 row 1.
+		* \param p02 Value at column 0 row 2.
+		* \param p12 Value at column 1 row 2.
+		* \param p22 Value at column 2 row 2.
+		* \param p32 Value at column 3 row 2.
+		* \param p03 Value at column 0 row 3.
+		* \param p13 Value at column 1 row 3.
+		* \param p23 Value at column 2 row 3.
+		* \param p33 Value at column 3 row 3. */
+		FbxMatrix(	const double p00, const double p10, const double p20, const double p30,
+					const double p01, const double p11, const double p21, const double p31,
+					const double p02, const double p12, const double p22, const double p32,
+					const double p03, const double p13, const double p23, const double p33);
+			
+		//! Destructor.
+		~FbxMatrix();
+	//@}
+
+	//! \name Access
+	//@{
+		/** Retrieve matrix element.
+		* \param pY Row index.
+		* \param pX Column index.
+		* \return Value at element [ pX, pY ] of the matrix. */
+		double Get(int pY, int pX) const;
+
+		/** Extract a row vector.
+		* \param pY Row index.
+		* \return The row vector. */
+		FbxVector4 GetRow(int pY) const;
+
+		/** Extract a column vector.
+		* \param pX Column index.
+		* \return The column vector. */
+		FbxVector4 GetColumn(int pX) const;
+
+		/** Set matrix element.
+		* \param pY Row index.
+		* \param pX Column index.
+		* \param pValue New component value. */
+		void Set(int pY, int pX, double pValue);
+
+		/** Set matrix.
+		* \param pT Translation vector.
+		* \param pR Euler rotation vector.
+		* \param pS Scale vector. */
+		void SetTRS(const FbxVector4& pT, const FbxVector4& pR, const FbxVector4& pS);
+
+		/** Set matrix.
+		* \param pT Translation vector.
+		* \param pQ Quaternion.
+		* \param pS Scale vector. */
+		void SetTQS(const FbxVector4& pT, const FbxQuaternion& pQ, const FbxVector4& pS);
+
+		/** Set a matrix row.
+		* \param pY Row index.
+		* \param pRow Row vector. */
+		void SetRow(int pY, const FbxVector4& pRow);
+
+		/** Set a matrix column.
+		* \param pX Column index.
+		* \param pColumn Column vector. */
+		void SetColumn(int pX, const FbxVector4& pColumn);
+
+		/** Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.
+		* \param pTranslation Translation element.
+		* \param pRotation Rotation element.
+		* \param pShearing Shearing element.
+		* \param pScaling Scaling element.
+		* \param pSign Sign of determinant. */
+		void GetElements(FbxVector4& pTranslation, FbxQuaternion& pRotation, FbxVector4& pShearing, FbxVector4& pScaling, double& pSign) const;
+		
+		/** Decompose the affine matrix into elements of translation, rotation, shearing, scaling and sign of determinant.
+		* \param pTranslation Translation element.
+		* \param pRotation Rotation element.
+		* \param pShearing Shearing element.
+		* \param pScaling Scaling element.
+		* \param pSign Sign of determinant. */
+		void GetElements(FbxVector4& pTranslation, FbxVector4& pRotation, FbxVector4& pShearing, FbxVector4& pScaling, double& pSign) const;
+	//@}
+
+	//! \name Operators
+	//@{
+		/** Assignment operator.
+		* \param pMatrix Source matrix. */
+		FbxMatrix& operator=(const FbxMatrix& pMatrix);
+
+		/**	Unary minus operator.
+		* \return A matrix where each element is multiplied by -1. */
+		FbxMatrix operator-() const;
+
+		/** Add two matrices together.
+		* \param pMatrix A matrix.
+		* \return The result of this matrix + pMatrix. */
+		FbxMatrix operator+(const FbxMatrix& pMatrix) const;
+
+		/** Subtract a matrix from another matrix.
+		* \param pMatrix A matrix.
+		* \return The result of this matrix - pMatrix. */
+		FbxMatrix operator-(const FbxMatrix& pMatrix) const;
+
+		/** Multiply two matrices.
+		* \param pMatrix A matrix.
+		* \return The result of this matrix * pMatrix. */
+		FbxMatrix operator*(const FbxMatrix& pMatrix) const;
+
+		/** Add two matrices together.
+		* \param pMatrix A matrix.
+		* \return The result of this matrix + pMatrix, replacing this matrix. */
+		FbxMatrix& operator+=(const FbxMatrix& pMatrix);
+
+		/** Subtract a matrix from another matrix.
+		* \param pMatrix A matrix.
+		* \return The result of this matrix - pMatrix, replacing this matrix. */
+		FbxMatrix& operator-=(const FbxMatrix& pMatrix);
+
+		/** Multiply two matrices.
+		* \param pMatrix A matrix.
+		* \return The result of this matrix * pMatrix, replacing this matrix. */
+		FbxMatrix& operator*=(const FbxMatrix& pMatrix);
+
+		/**	Equivalence operator.
+		* \param pM The matrix to be compared against this matrix.
+		* \return \c true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false otherwise. */
+		bool operator==(const FbxMatrix& pM) const;
+
+		/**	Equivalence operator.
+		* \param pM The affine matrix to be compared against this matrix.
+		* \return \c true if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false otherwise. */
+		bool operator==(const FbxAMatrix& pM) const;
+
+		/**	Non-equivalence operator.
+		* \param pM The matrix to be compared against this matrix.
+		* \return \c false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true otherwise. */
+		bool operator!=(const FbxMatrix& pM) const;
+
+		/**	Non-equivalence operator.
+		* \param pM The affine matrix to be compared against this matrix.
+		* \return \c false if the two matrices are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true otherwise. */
+		bool operator!=(const FbxAMatrix& pM) const;
+	//@}
+
+	//! \name Casting
+	//@{
+		//! Cast the vector in a double pointer.
+		operator double* ();
+
+		//! Cast the vector in a const double pointer.
+		operator const double* () const;
+
+		//! Define 4*4 array as a new type.
+		typedef const double(kDouble44)[4][4] ;
+
+		//! Cast the matrix in a reference to a 4*4 array.
+		inline kDouble44 & Double44() const { return *((kDouble44 *)&mData[0][0]); }
+	//@}
+
+	//! \name Math Operations
+	//@{
+		/** Calculate the matrix inverse.
+		* \return The inverse matrix. */
+		FbxMatrix Inverse() const;
+
+		/** Calculate the matrix transpose.
+		* \return This matrix transposed. */
+		FbxMatrix Transpose() const;
+
+		//! Set matrix to identity.
+		void SetIdentity();
+
+		/** Set the matrix to a "Look To" left handed.
+		* \param pEyePosition The position of the eye.
+		* \param pEyeDirection The direction of the eye.
+		* \param pUpDirection The up direction of the eye. */
+		void SetLookToLH(const FbxVector4& pEyePosition, const FbxVector4& pEyeDirection, const FbxVector4& pUpDirection);
+
+		/** Set the matrix to a "Look To" right handed.
+		* \param pEyePosition The position of the eye.
+		* \param pEyeDirection The direction of the eye.
+		* \param pUpDirection The up direction of the eye. */
+		void SetLookToRH(const FbxVector4& pEyePosition, const FbxVector4& pEyeDirection, const FbxVector4& pUpDirection);
+
+		/** Set the matrix to a "Look At" left handed.
+		* \param pEyePosition The position of the eye.
+		* \param pLookAt The look at position of the eye focus.
+		* \param pUpDirection The up direction of the eye. */
+		void SetLookAtLH(const FbxVector4& pEyePosition, const FbxVector4& pLookAt, const FbxVector4& pUpDirection);
+
+		/** Set the matrix values as a "Look At" right handed.
+		* \param pEyePosition The position of the eye.
+		* \param pLookAt The look at position of the eye focus.
+		* \param pUpDirection The up direction of the eye. */
+		void SetLookAtRH(const FbxVector4& pEyePosition, const FbxVector4& pLookAt, const FbxVector4& pUpDirection);
+
+		/** Multiply this matrix by pVector, the w component is normalized to 1.
+		* \param pVector A vector.
+		* \return The result of this matrix * pVector. */
+		FbxVector4 MultNormalize(const FbxVector4& pVector) const;
+	//@}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	int Compare(const FbxMatrix pM, const double pThreshold = FBXSDK_TOLERANCE) const;
+	int Compare(const FbxAMatrix pM, const double pThreshold = FBXSDK_TOLERANCE) const;
+
+	FbxMatrix operator*(double pValue) const;
+	FbxMatrix& operator*=(double pValue);
+
+    double LUDecomposition(FbxVector4& pVector);
+    FbxMatrix LUMult(FbxMatrix pM, const FbxVector4& pVector) const;
+    double Determinant() const;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_MATRIX_H_ */

+ 333 - 333
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxquaternion.h

@@ -1,333 +1,333 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxquaternion.h
-#ifndef _FBXSDK_CORE_MATH_QUATERNION_H_
-#define _FBXSDK_CORE_MATH_QUATERNION_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/math/fbxvector4.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** FBX SDK quaternion class.
- * \nosubgrouping
- * Quaternions form a four-dimensional normed division algebra over the real numbers. 
- * It is for calculations involving three-dimensional rotations. 
- */
-class FBXSDK_DLL FbxQuaternion : public FbxDouble4
-{
-public:
-    /**
-      * \name Constructors and Destructor
-      */
-    //@{
-		/** Constructor.
-		  * Initialize to the multiplicative identity.
-		  */
-		FbxQuaternion();
-
-		/** Copy constructor.
-		  * \param pV FbxQuaternion object copied to this one.
-		  */
-		FbxQuaternion(const FbxQuaternion& pV);
-
-		/** Constructor.
-			* \param pX     The X component.
-			* \param pY     The Y component.
-			* \param pZ     The Z component.
-			* \param pW     The W component.
-			*/
-		FbxQuaternion(double pX, double pY, double pZ, double pW = 1.0);
-
-		/** From axis degree constructor
-		* \param pAxis The axis to rotate around.
-		* \param pDegree The amount of degree to rotate around the axis. */
-		FbxQuaternion(const FbxVector4& pAxis, double pDegree);
-		    
-		//! Destructor.
-		~FbxQuaternion();
-    //@}
-
-    /**
-      * \name Access
-      */
-    //@{
-		/** Assignment operation.
-		  * \param pQuaternion FbxQuaternion object assigned to this one.
-		  */
-		FbxQuaternion& operator=(const FbxQuaternion& pQuaternion);
-		    
-		/** Accessor.
-		  * \param pIndex     The index of the component to access.
-		  * \return           The reference to the indexed component.
-		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
-		  */
-		double& operator[](int pIndex);
-
-		/** Accessor.
-		  * \param pIndex     The index of the component to access.
-		  * \return           The const reference to the indexed component.
-		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
-		  */
-		const double& operator[](int pIndex) const;
-
-		/** Get a vector element.
-		  * \param pIndex     The index of the component to access.
-		  * \return           The value of the indexed component.
-		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
-		  */
-		double GetAt(int pIndex) const;
-
-		/** Set a vector element.
-		  * \param pIndex     The index of the component to set.
-		  * \param pValue     The new value to set the component.
-		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
-		  */
-		void SetAt(int pIndex, double pValue);
-
-		/** Set vector.
-		  * \param pX     The X component value.
-		  * \param pY     The Y component value.
-		  * \param pZ     The Z component value.
-		  * \param pW     The W component value.
-		  */
-		void Set(double pX, double pY, double pZ, double pW = 1.0);
-    //@}
-
-    /**
-      * \name Scalar Operations
-      */
-    //@{
-		/** The addition operator between the scalar part of this quaternion and a scalar value, no influence on the vector part of the quaternion.
-		  * \param pValue     The scalar value to be added.
-		  * \return           The sum of addition.
-		  */
-		FbxQuaternion operator+(double pValue) const;
-
-		/** The subtraction operator between the scalar part of this quaternion and a scalar value, no influence on the vector part of the quaternion.
-		  * \param pValue     The scalar subtrahend.
-		  * \return           The difference of subtraction.
-		  */
-		FbxQuaternion operator-(double pValue) const;
-
-		/** Multiply all vector components by a value.
-		  * \param pValue     The value multiplying each component of the vector.
-		  * \return           New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxQuaternion operator*(double pValue) const;
-
-		/**    Divide all vector components by a value.
-		  * \param pValue     The value dividing each component of the vector.
-		  * \return           New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxQuaternion operator/(double pValue) const;
-
-		/** The in place addition operator between the real part of this quaternion and a scalar value.
-		  * \param pValue     The value to be added.
-		  * \return           The sum of addition.
-		  */
-		FbxQuaternion& operator+=(double pValue);
-
-		/** The subtraction operator between the real part of this quaternion and a scalar value.
-		  * \param pValue     The scalar subtrahend.
-		  * \return           The difference of subtraction.
-		  */
-		FbxQuaternion& operator-=(double pValue);
-
-		/** Multiply a value to all vector elements.
-		  * \param pValue     The value multiplying each component of the vector.
-		  * \return           The result of multiplying each component of the vector by pValue, replacing this quaternion.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxQuaternion& operator*=(double pValue);
-
-		/**    Divide all vector elements by a value.
-		  * \param pValue     The value dividing each component of the vector.
-		  * \return           The result of dividing each component of the vector by pValue, replacing this quaternion.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxQuaternion& operator/=(double pValue);
-    //@}
-
-    /**
-      * \name Vector Operations
-      */
-    //@{
-		/**    Unary minus operator.
-		  * \return      A quaternion where each component is multiplied by -1.
-		  */
-		FbxQuaternion operator-() const;
-		    
-		/** Add two vectors together.
-		  * \param pQuaternion     Quaternion to add.
-		  * \return                The quaternion v' = this + pQuaternion.
-		  * \remarks               The values in pQuaternion are not checked.
-		  */
-		FbxQuaternion operator+(const FbxQuaternion& pQuaternion) const;
-
-		/** Subtract a quaternion from another quaternion.
-		  * \param pQuaternion     Quaternion to subtract.
-		  * \return                The quaternion v' = this - pQuaternion.
-		  * \remarks               The values in pQuaternion are not checked.
-		  */
-		FbxQuaternion operator-(const FbxQuaternion& pQuaternion) const;
-
-		/** The quaternion multiplication operator.
-		  * \param pOther          The quaternion to be multiplied with this quaternion.
-		  * \return                The product of two quaternions.
-		  * \remarks               In general, quaternion multiplication does not commute.
-		  */
-		FbxQuaternion operator*(const FbxQuaternion& pOther) const;
-
-		/** The quaternion division operator.
-		  * \param pOther          The divisor quaternion.
-		  * \return                The quotient quaternion.
-		  * \remarks               If the divisor has a zero length, return zero quaternion.
-			  */
-		FbxQuaternion operator/(const FbxQuaternion& pOther) const;
-
-		/** Add two quaternions together.
-		  * \param pQuaternion     Quaternion to add.
-		  * \return                The quaternion v' = this + pQuaternion, replacing this quaternion.
-		  * \remarks               The values in pQuaternion are not checked.
-		  */
-		FbxQuaternion& operator+=(const FbxQuaternion& pQuaternion);
-
-		/** Subtract a quaternion from another vector.
-		  * \param pQuaternion     Quaternion to subtract.
-		  * \return                The quaternion v' = this - pQuaternion, replacing this quaternion.
-		  * \remarks               The values in pQuaternion are not checked.
-		  */
-		FbxQuaternion& operator-=(const FbxQuaternion& pQuaternion);
-
-		/** The in place quaternion multiplication operator.
-		  * \param pOther          The quaternion to be multiplied with this quaternion.
-		  * \return                The product of two quaternions.
-		  * \remarks               In general, quaternion multiplication does not commute.
-		  */
-		FbxQuaternion& operator*=(const FbxQuaternion& pOther);
-			
-		/** The in place quaternion division operator.
-		  * \param pOther          The divisor quaternion.
-		  * \return                The quotient quaternion.
-		  * \remarks               If the divisor has a zero length, return zero quaternion.
-		  */
-		FbxQuaternion& operator/=(const FbxQuaternion& pOther);
-
-		/** Return quaternion product.
-		  * \param pOther          The quaternion to be multiplied with this quaternion.
-		  * \return                The product of two quaternions.
-		  */
-		FbxQuaternion Product(const FbxQuaternion& pOther) const;
-
-		/** Return quaternion dot product.
-		  * \param pQuaternion     Dot product quaternion.
-		  * \return                The dot product of this quaternion and pQuaternion.
-		  */
-		double DotProduct(const FbxQuaternion& pQuaternion) const;
-
-		/** Normalize the quaternion, length set to 1.
-		  */
-		void Normalize();
-
-		/** Calculate the quaternion conjugate.
-		  * \return      The conjugate of this quaternion.
-		  */
-		void Conjugate();
-
-		/** Calculate the length (norm) of the quaternion.
-		  * \return The length of the quaternion.
-		  */
-		double Length();
-
-		/** Calculate the inverse of the quaternion.
-		  * \return      The inverse of this quaternion. 
-		  * \remarks     If this quaternion has a zero length, retain the original value.
-		  * \remarks     If the quaternion is normalized, then its inverse is equal to its conjugate.
-		  */
-		void Inverse();
-
-		/** Set the quaternion rotation from an axis degree angle.
-		* \param pAxis The axis to rotate around.
-		* \param pDegree The amount of degree to rotate around the axis. */
-		void SetAxisAngle(const FbxVector4& pAxis, double pDegree);
-
-		/** Calculate a spherical linear interpolation quaternion.
-		* \param pOther The other quaternion to interpolate with.
-		* \param pWeight A value between 0.0 and 1.0 to specify the interpolation amount. */
-		FbxQuaternion Slerp(const FbxQuaternion& pOther, double pWeight) const;
-
-		/** Create a Quaternion equivalent to the supplied Euler XYZ in spherical coordinate.
-		  * \param pEuler   The Euler XYZ angle (in degrees).
-		  */
-		void ComposeSphericalXYZ(const FbxVector4 pEuler);
-
-		/** Create an Euler XYZ equivalent to the current quaternion.
-		  * \return     The Euler XYZ angle (in degrees) equivalent to the current quaternion in spherical coordinate.
-		  */
-		FbxVector4 DecomposeSphericalXYZ() const;
-    //@}
-
-    /**
-      * \name Boolean Operations
-      */
-    //@{
-		/**    Equivalence operator.
-		  * \param pV     The quaternion to be compared to this quaternion.
-		  * \return       \c true  if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false  otherwise.
-		  */
-		bool operator==(const FbxQuaternion & pV) const;
-		    
-		/**    Non equivalence operator.
-		  * \param pV     The quaternion to be compared to \e this.
-		  * \return       \c  false if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true  otherwise.
-		  */
-		bool operator!=(const FbxQuaternion & pV) const;
-    //@}
-
-    /**
-      * \name Casting
-      */
-    //@{
-		//! Cast the vector in a double pointer.
-		operator double* ();
-
-		//! Cast the vector in a const double pointer.
-		operator const double* () const;
-    //@}
-
-	/**
-	  * \name Comparison methods
-	  */
-	//@{
-		/** Comparison method.
-		  * \param pQ2 Quaternion to compare with this
-		  * \param pThreshold Epsilon for small number comparison
-		  * \return 0 if quaternions are equal, non-zero value otherwise.
-		  */
-		int Compare(const FbxQuaternion &pQ2, const double pThreshold = FBXSDK_TOLERANCE) const;
-	//@}
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-    void GetQuaternionFromPositionToPosition(const FbxVector4 &pP0, const FbxVector4 &pP1);
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_QUATERNION_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxquaternion.h
+#ifndef _FBXSDK_CORE_MATH_QUATERNION_H_
+#define _FBXSDK_CORE_MATH_QUATERNION_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/math/fbxvector4.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** FBX SDK quaternion class.
+ * \nosubgrouping
+ * Quaternions form a four-dimensional normed division algebra over the real numbers. 
+ * It is for calculations involving three-dimensional rotations. 
+ */
+class FBXSDK_DLL FbxQuaternion : public FbxDouble4
+{
+public:
+    /**
+      * \name Constructors and Destructor
+      */
+    //@{
+		/** Constructor.
+		  * Initialize to the multiplicative identity.
+		  */
+		FbxQuaternion();
+
+		/** Copy constructor.
+		  * \param pV FbxQuaternion object copied to this one.
+		  */
+		FbxQuaternion(const FbxQuaternion& pV);
+
+		/** Constructor.
+			* \param pX     The X component.
+			* \param pY     The Y component.
+			* \param pZ     The Z component.
+			* \param pW     The W component.
+			*/
+		FbxQuaternion(double pX, double pY, double pZ, double pW = 1.0);
+
+		/** From axis degree constructor
+		* \param pAxis The axis to rotate around.
+		* \param pDegree The amount of degree to rotate around the axis. */
+		FbxQuaternion(const FbxVector4& pAxis, double pDegree);
+		    
+		//! Destructor.
+		~FbxQuaternion();
+    //@}
+
+    /**
+      * \name Access
+      */
+    //@{
+		/** Assignment operation.
+		  * \param pQuaternion FbxQuaternion object assigned to this one.
+		  */
+		FbxQuaternion& operator=(const FbxQuaternion& pQuaternion);
+		    
+		/** Accessor.
+		  * \param pIndex     The index of the component to access.
+		  * \return           The reference to the indexed component.
+		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
+		  */
+		double& operator[](int pIndex);
+
+		/** Accessor.
+		  * \param pIndex     The index of the component to access.
+		  * \return           The const reference to the indexed component.
+		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
+		  */
+		const double& operator[](int pIndex) const;
+
+		/** Get a vector element.
+		  * \param pIndex     The index of the component to access.
+		  * \return           The value of the indexed component.
+		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
+		  */
+		double GetAt(int pIndex) const;
+
+		/** Set a vector element.
+		  * \param pIndex     The index of the component to set.
+		  * \param pValue     The new value to set the component.
+		  * \remarks          The index parameter is not checked for values out of bounds. The valid range is [0,3].
+		  */
+		void SetAt(int pIndex, double pValue);
+
+		/** Set vector.
+		  * \param pX     The X component value.
+		  * \param pY     The Y component value.
+		  * \param pZ     The Z component value.
+		  * \param pW     The W component value.
+		  */
+		void Set(double pX, double pY, double pZ, double pW = 1.0);
+    //@}
+
+    /**
+      * \name Scalar Operations
+      */
+    //@{
+		/** The addition operator between the scalar part of this quaternion and a scalar value, no influence on the vector part of the quaternion.
+		  * \param pValue     The scalar value to be added.
+		  * \return           The sum of addition.
+		  */
+		FbxQuaternion operator+(double pValue) const;
+
+		/** The subtraction operator between the scalar part of this quaternion and a scalar value, no influence on the vector part of the quaternion.
+		  * \param pValue     The scalar subtrahend.
+		  * \return           The difference of subtraction.
+		  */
+		FbxQuaternion operator-(double pValue) const;
+
+		/** Multiply all vector components by a value.
+		  * \param pValue     The value multiplying each component of the vector.
+		  * \return           New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxQuaternion operator*(double pValue) const;
+
+		/**    Divide all vector components by a value.
+		  * \param pValue     The value dividing each component of the vector.
+		  * \return           New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxQuaternion operator/(double pValue) const;
+
+		/** The in place addition operator between the real part of this quaternion and a scalar value.
+		  * \param pValue     The value to be added.
+		  * \return           The sum of addition.
+		  */
+		FbxQuaternion& operator+=(double pValue);
+
+		/** The subtraction operator between the real part of this quaternion and a scalar value.
+		  * \param pValue     The scalar subtrahend.
+		  * \return           The difference of subtraction.
+		  */
+		FbxQuaternion& operator-=(double pValue);
+
+		/** Multiply a value to all vector elements.
+		  * \param pValue     The value multiplying each component of the vector.
+		  * \return           The result of multiplying each component of the vector by pValue, replacing this quaternion.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxQuaternion& operator*=(double pValue);
+
+		/**    Divide all vector elements by a value.
+		  * \param pValue     The value dividing each component of the vector.
+		  * \return           The result of dividing each component of the vector by pValue, replacing this quaternion.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxQuaternion& operator/=(double pValue);
+    //@}
+
+    /**
+      * \name Vector Operations
+      */
+    //@{
+		/**    Unary minus operator.
+		  * \return      A quaternion where each component is multiplied by -1.
+		  */
+		FbxQuaternion operator-() const;
+		    
+		/** Add two vectors together.
+		  * \param pQuaternion     Quaternion to add.
+		  * \return                The quaternion v' = this + pQuaternion.
+		  * \remarks               The values in pQuaternion are not checked.
+		  */
+		FbxQuaternion operator+(const FbxQuaternion& pQuaternion) const;
+
+		/** Subtract a quaternion from another quaternion.
+		  * \param pQuaternion     Quaternion to subtract.
+		  * \return                The quaternion v' = this - pQuaternion.
+		  * \remarks               The values in pQuaternion are not checked.
+		  */
+		FbxQuaternion operator-(const FbxQuaternion& pQuaternion) const;
+
+		/** The quaternion multiplication operator.
+		  * \param pOther          The quaternion to be multiplied with this quaternion.
+		  * \return                The product of two quaternions.
+		  * \remarks               In general, quaternion multiplication does not commute.
+		  */
+		FbxQuaternion operator*(const FbxQuaternion& pOther) const;
+
+		/** The quaternion division operator.
+		  * \param pOther          The divisor quaternion.
+		  * \return                The quotient quaternion.
+		  * \remarks               If the divisor has a zero length, return zero quaternion.
+			  */
+		FbxQuaternion operator/(const FbxQuaternion& pOther) const;
+
+		/** Add two quaternions together.
+		  * \param pQuaternion     Quaternion to add.
+		  * \return                The quaternion v' = this + pQuaternion, replacing this quaternion.
+		  * \remarks               The values in pQuaternion are not checked.
+		  */
+		FbxQuaternion& operator+=(const FbxQuaternion& pQuaternion);
+
+		/** Subtract a quaternion from another vector.
+		  * \param pQuaternion     Quaternion to subtract.
+		  * \return                The quaternion v' = this - pQuaternion, replacing this quaternion.
+		  * \remarks               The values in pQuaternion are not checked.
+		  */
+		FbxQuaternion& operator-=(const FbxQuaternion& pQuaternion);
+
+		/** The in place quaternion multiplication operator.
+		  * \param pOther          The quaternion to be multiplied with this quaternion.
+		  * \return                The product of two quaternions.
+		  * \remarks               In general, quaternion multiplication does not commute.
+		  */
+		FbxQuaternion& operator*=(const FbxQuaternion& pOther);
+			
+		/** The in place quaternion division operator.
+		  * \param pOther          The divisor quaternion.
+		  * \return                The quotient quaternion.
+		  * \remarks               If the divisor has a zero length, return zero quaternion.
+		  */
+		FbxQuaternion& operator/=(const FbxQuaternion& pOther);
+
+		/** Return quaternion product.
+		  * \param pOther          The quaternion to be multiplied with this quaternion.
+		  * \return                The product of two quaternions.
+		  */
+		FbxQuaternion Product(const FbxQuaternion& pOther) const;
+
+		/** Return quaternion dot product.
+		  * \param pQuaternion     Dot product quaternion.
+		  * \return                The dot product of this quaternion and pQuaternion.
+		  */
+		double DotProduct(const FbxQuaternion& pQuaternion) const;
+
+		/** Normalize the quaternion, length set to 1.
+		  */
+		void Normalize();
+
+		/** Calculate the quaternion conjugate.
+		  * \return      The conjugate of this quaternion.
+		  */
+		void Conjugate();
+
+		/** Calculate the length (norm) of the quaternion.
+		  * \return The length of the quaternion.
+		  */
+		double Length();
+
+		/** Calculate the inverse of the quaternion.
+		  * \return      The inverse of this quaternion. 
+		  * \remarks     If this quaternion has a zero length, retain the original value.
+		  * \remarks     If the quaternion is normalized, then its inverse is equal to its conjugate.
+		  */
+		void Inverse();
+
+		/** Set the quaternion rotation from an axis degree angle.
+		* \param pAxis The axis to rotate around.
+		* \param pDegree The amount of degree to rotate around the axis. */
+		void SetAxisAngle(const FbxVector4& pAxis, double pDegree);
+
+		/** Calculate a spherical linear interpolation quaternion.
+		* \param pOther The other quaternion to interpolate with.
+		* \param pWeight A value between 0.0 and 1.0 to specify the interpolation amount. */
+		FbxQuaternion Slerp(const FbxQuaternion& pOther, double pWeight) const;
+
+		/** Create a Quaternion equivalent to the supplied Euler XYZ in spherical coordinate.
+		  * \param pEuler   The Euler XYZ angle (in degrees).
+		  */
+		void ComposeSphericalXYZ(const FbxVector4 pEuler);
+
+		/** Create an Euler XYZ equivalent to the current quaternion.
+		  * \return     The Euler XYZ angle (in degrees) equivalent to the current quaternion in spherical coordinate.
+		  */
+		FbxVector4 DecomposeSphericalXYZ() const;
+    //@}
+
+    /**
+      * \name Boolean Operations
+      */
+    //@{
+		/**    Equivalence operator.
+		  * \param pV     The quaternion to be compared to this quaternion.
+		  * \return       \c true  if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false  otherwise.
+		  */
+		bool operator==(const FbxQuaternion & pV) const;
+		    
+		/**    Non equivalence operator.
+		  * \param pV     The quaternion to be compared to \e this.
+		  * \return       \c  false if the two quaternions are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true  otherwise.
+		  */
+		bool operator!=(const FbxQuaternion & pV) const;
+    //@}
+
+    /**
+      * \name Casting
+      */
+    //@{
+		//! Cast the vector in a double pointer.
+		operator double* ();
+
+		//! Cast the vector in a const double pointer.
+		operator const double* () const;
+    //@}
+
+	/**
+	  * \name Comparison methods
+	  */
+	//@{
+		/** Comparison method.
+		  * \param pQ2 Quaternion to compare with this
+		  * \param pThreshold Epsilon for small number comparison
+		  * \return 0 if quaternions are equal, non-zero value otherwise.
+		  */
+		int Compare(const FbxQuaternion &pQ2, const double pThreshold = FBXSDK_TOLERANCE) const;
+	//@}
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+    void GetQuaternionFromPositionToPosition(const FbxVector4 &pP0, const FbxVector4 &pP1);
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_QUATERNION_H_ */

+ 282 - 282
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxtransforms.h

@@ -1,282 +1,282 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxtransforms.h
-#ifndef _FBXSDK_CORE_MATH_TRANSFORMS_H_
-#define _FBXSDK_CORE_MATH_TRANSFORMS_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/core/math/fbxmath.h>
-#include <fbxsdk/core/math/fbxquaternion.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** FbxLimits defines a limit range for one transform component, either translation, rotation or scaling.
-  * One transform component limit contains two part: a min value and a max value limit, which means
-  * that each value of the corresponding transform component cannot go beyond the range set by the
-  * min and max values. Although the members are identified as X, Y and Z (the W component is ignored)
-  * at this level, they are unitless values and will only have meaning within the context they are queried.
-  *
-  * For each limit, there is one flag to indicate if the limit is active or not. Before accessing the 
-  * limit info, the caller need to query the flag first to make sure that the retrieved values will be
-  * meaningful.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxLimits
-{
-public:
-	//! Constructor
-	FbxLimits();
-
-	//! Assignment Operator
-	FbxLimits& operator=(const FbxLimits& pLimits);
-
-	/** Retrieve the active state of this limit.
-	  * \return True if the limit is active.
-	  */
-	bool GetActive() const;
-
-	/** Set the active state of this limit.
-	  * \param pActive If true, this limit will become globally active.
-	  */
-	void SetActive(const bool pActive);
-
-	/** Get the active state of the minimum X component.
-	  * \return True if the X component minimum limit is active.
-	  */
-	bool GetMinXActive() const;
-
-	/** Get the active state of the minimum Y component.
-	  * \return True if the Y component minimum limit is active.
-	  */
-	bool GetMinYActive() const;
-
-	/** Get the active state of the minimum Z component.
-	  * \return True if the Z component minimum limit is active.
-	  */
-	bool GetMinZActive() const;
-
-	/** Get the active states of the three components of the minimum limit.
-	  * \param pXActive \c True if the X component minimum limit is active.
-	  * \param pYActive \c True if the Y component minimum limit is active.
-	  * \param pZActive \c True if the Z component minimum limit is active.
-	  */
-	void GetMinActive(bool& pXActive, bool& pYActive, bool& pZActive) const;
-
-	/** Get the minimum limits.
-	  * \return The current X, Y and Z values for the minimum limits.
-	  */
-	FbxDouble3 GetMin() const;
-
-	/** Set the active state of the minimum X component.
-	  * \param pActive If true, the X component minimum limit will be active.
-	  */
-	void SetMinXActive(bool pActive);
-
-	/** Set the active state of the minimum Y component.
-	  * \param pActive If true, the Y component minimum limit will be active.
-	  */
-	void SetMinYActive(bool pActive);
-
-	/** Set the active state of the minimum Z component.
-	  * \param pActive If true, the Z component minimum limit will be active.
-	  */
-	void SetMinZActive(bool pActive);
-
-	/** Set the active states of the three components of the minimum limits.
-	  * \param pXActive If true, the X component minimum limit will be active.
-	  * \param pYActive If true, the Y component minimum limit will be active.
-	  * \param pZActive If true, the Z component minimum limit will be active.
-	  */
-	void SetMinActive(bool pXActive, bool pYActive, bool pZActive);
-
-	/** Set the minimum limits.
-	  * \param pMin The X, Y and Z values for the minimum limits.
-	  */
-	void SetMin(const FbxDouble3& pMin);
-
-	/** Get the active state of the maximum X component.
-	  * \return True if the X component maximum limit is active.
-	  */
-	bool GetMaxXActive() const;
-
-	/** Get the active state of the maximum Y component.
-	  * \return True if the Y component maximum limit is active.
-	  */
-	bool GetMaxYActive() const;
-
-	/** Get the active state of the maximum Z component.
-	  * \return True if the Z component maximum limit is active.
-	  */
-	bool GetMaxZActive() const;
-
-	/** Get the active states of the three components of the maximum limit.
-	  * \param pXActive \c True if the X component maximum limit is active.
-	  * \param pYActive \c True if the Y component maximum limit is active.
-	  * \param pZActive \c True if the Z component maximum limit is active.
-	  */
-	void GetMaxActive(bool& pXActive, bool& pYActive, bool& pZActive) const;
-
-	/** Get the maximum limits.
-	  * \return The current X, Y and Z values for the maximum limits.
-	  */
-	FbxDouble3 GetMax() const;
-
-	/** Set the active state of the maximum X component.
-	  * \param pActive If true, the X component maximum limit will be active.
-	  */
-	void SetMaxXActive(bool pActive);
-
-	/** Set the active state of the maximum Y component.
-	  * \param pActive If true, the Y component maximum limit will be active.
-	  */
-	void SetMaxYActive(bool pActive);
-
-	/** Set the active state of the maximum Z component.
-	  * \param pActive If true, the Z component maximum limit will be active.
-	  */
-	void SetMaxZActive(bool pActive);
-
-	/** Set the active states of the three components of the maximum limits.
-	  * \param pXActive If true, the X component maximum limit will be active.
-	  * \param pYActive If true, the Y component maximum limit will be active.
-	  * \param pZActive If true, the Z component maximum limit will be active.
-	  */
-	void SetMaxActive(bool pXActive, bool pYActive, bool pZActive);
-
-	/** Set the maximum limits.
-	  * \param pMax The X, Y and Z values for the maximum limits.
-	  */
-	void SetMax(const FbxDouble3& pMax);
-
-	/** Find if any of the minimum or maximum active state are set.
-	  * \return If any component of the minimum or maximum active state are set, true is returned.
-	  * \remarks The global active state will not count when resolving this.
-	  */
-	bool GetAnyMinMaxActive() const;
-	
-	/** Apply the active limits to the components of the vector provided.
-	  * \return The new vector clamped by active limits.
-	  */
-	FbxDouble3 Apply(const FbxDouble3& pVector);
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-private:
-	enum EMask {eActive=1<<0, eMinX=1<<1, eMinY=1<<2, eMinZ=1<<3, eMaxX=1<<4, eMaxY=1<<5, eMaxZ=1<<6, eAll=eMinX|eMinY|eMinZ|eMaxX|eMaxY|eMaxZ};
-
-	FbxUInt8	mMask;
-	FbxDouble3	mMin;
-	FbxDouble3	mMax;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-class FBXSDK_DLL FbxRotationOrder
-{
-public:	
-	FbxRotationOrder(FbxEuler::EOrder pOrder=FbxEuler::eOrderXYZ);
-
-	FbxEuler::EOrder	GetOrder() const;
-	void				SetOrder(FbxEuler::EOrder pOrder);
-	void				V2M(FbxAMatrix& pRM, const FbxVector4& pV);
-	void				M2V(FbxVector4& pV, const FbxAMatrix& pRM);
-	bool				V2VRef(FbxVector4& pVOut, const FbxVector4& pVIn, const FbxVector4& pVRef);
-
-private:
-    FbxEuler::EOrder mOrder;
-};
-
-/** Handle transform behaviors such as pivots, limits and offets, etc.
-  */
-class FBXSDK_DLL FbxTransform
-{
-public:
-	enum EInheritType {eInheritRrSs, eInheritRSrs, eInheritRrs};
-
-	FbxTransform();
-
-	EInheritType		GetInheritType() const;
-	void				SetInheritType(EInheritType pType);
-	FbxLimits&			GetTranslationLimits();
-	FbxLimits&			GetRotationLimits();
-	FbxLimits&			GetScalingLimits();
-	FbxRotationOrder&	GetRotationOrder();
-	bool				HasROffset() const;
-	bool				HasRPivot() const;
-	bool				HasSOffset() const;
-	bool				HasSPivot() const;
-	bool				HasPreRM() const;
-	bool				HasPostRM() const;
-	void				SetROffset(const FbxVector4& pROffset);
-	void				SetRPivot(const FbxVector4& pRPivot);
-	void				SetSOffset(const FbxVector4& pSOffset);
-	void				SetSPivot(const FbxVector4& pSPivot);
-	void				SetPreRM(const FbxVector4& pPreR);
-	void				SetPostRM(const FbxVector4& pPostR);
-	bool				GetRotationSpaceForLimitOnly() const;
-	void				SetRotationSpaceForLimitOnly(bool pRotationSpaceForLimitOnly);
-
-	void				DoF2LT(FbxVector4& pLT, const FbxVector4& pDoF, const FbxAMatrix& pLRM, const FbxAMatrix& pLSM);
-	void				LT2DoF(FbxVector4& pDoF, const FbxVector4& pLT, const FbxAMatrix& pLRM, const FbxAMatrix& pLSM);
-	void				DoF2LRM(FbxAMatrix& pLRM, const FbxVector4& pRDoF, bool pForLimit=false);
-	void				LRM2DoF(FbxVector4& pRDoF, const FbxAMatrix& pLRM, bool pForLimit=false);
-	void				LSM2GSM(FbxAMatrix& pGSM, const FbxAMatrix& pPGSM, const FbxAMatrix& pLSM, const FbxAMatrix& pLRM, const FbxVector4& pPLS);
-	void				GTRSM2GX(FbxAMatrix& pGX, const FbxVector4& pGT, const FbxAMatrix& pGRM, const FbxAMatrix& pGSM);
-
-private:
-	void				SumPivots(FbxVector4& pSum, const FbxAMatrix& pLRM, const FbxAMatrix& pLSM);
-
-	class RotationSpace
-	{
-	public:
-		enum EMask {eHasNothing=0, eHasPreRotM=1<<0, eHasPostRotM=1<<1};
-
-		RotationSpace();
-
-		bool				HasPreRM() const;
-		bool				HasPostRM() const;
-		void				GetPreRM(FbxAMatrix& pPreRM) const;
-		void				GetPostRM(FbxAMatrix& pPostRM) const;
-		void				SetPreRM(const FbxVector4& pPreR);
-		void				SetPostRM(const FbxVector4& pPostR);
-		void				DoF2LRM(FbxAMatrix& pLRM, const FbxVector4& pRDoF);
-		void				LRM2DoF(FbxVector4& pRDoF, const FbxAMatrix& pLRM);
-
-		FbxUInt8			mMask;
-		FbxAMatrix			mPreRM;
-		FbxAMatrix			mPostRM;
-		FbxRotationOrder	mRotationOrder;
-	};
-
-    enum EMask {eHasNothing=0, eHasRotOffset=1<<0, eHasRotPivot=1<<1, eHasScaleOffset=1<<2, eHasScalePivot=1<<3};
-
-	FbxUInt8		mMask;
-	EInheritType	mInheritType;	
-	FbxVector4		mROffset;
-	FbxVector4		mRPivot;
-	FbxVector4		mSOffset;
-	FbxVector4		mSPivot;
-	FbxLimits		mTranslationLimits;
-	FbxLimits		mRotationLimits;
-	FbxLimits		mScalingLimits;
-	bool			mRotationSpaceForLimitOnly;
-	RotationSpace	mRotationSpace;
-};
-
-FBXSDK_DLL bool FbxGetContinuousRotation(FbxVector4& pRes, const FbxVector4& pRot, const FbxVector4& pRef, const int* pOrder);
-FBXSDK_DLL void FbxGetContinuousRotation(FbxVector4& pRes, const FbxVector4& pRot, const FbxVector4& pRef);
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_TRANSFORMS_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxtransforms.h
+#ifndef _FBXSDK_CORE_MATH_TRANSFORMS_H_
+#define _FBXSDK_CORE_MATH_TRANSFORMS_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/core/math/fbxmath.h>
+#include <fbxsdk/core/math/fbxquaternion.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** FbxLimits defines a limit range for one transform component, either translation, rotation or scaling.
+  * One transform component limit contains two part: a min value and a max value limit, which means
+  * that each value of the corresponding transform component cannot go beyond the range set by the
+  * min and max values. Although the members are identified as X, Y and Z (the W component is ignored)
+  * at this level, they are unitless values and will only have meaning within the context they are queried.
+  *
+  * For each limit, there is one flag to indicate if the limit is active or not. Before accessing the 
+  * limit info, the caller need to query the flag first to make sure that the retrieved values will be
+  * meaningful.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxLimits
+{
+public:
+	//! Constructor
+	FbxLimits();
+
+	//! Assignment Operator
+	FbxLimits& operator=(const FbxLimits& pLimits);
+
+	/** Retrieve the active state of this limit.
+	  * \return True if the limit is active.
+	  */
+	bool GetActive() const;
+
+	/** Set the active state of this limit.
+	  * \param pActive If true, this limit will become globally active.
+	  */
+	void SetActive(const bool pActive);
+
+	/** Get the active state of the minimum X component.
+	  * \return True if the X component minimum limit is active.
+	  */
+	bool GetMinXActive() const;
+
+	/** Get the active state of the minimum Y component.
+	  * \return True if the Y component minimum limit is active.
+	  */
+	bool GetMinYActive() const;
+
+	/** Get the active state of the minimum Z component.
+	  * \return True if the Z component minimum limit is active.
+	  */
+	bool GetMinZActive() const;
+
+	/** Get the active states of the three components of the minimum limit.
+	  * \param pXActive \c True if the X component minimum limit is active.
+	  * \param pYActive \c True if the Y component minimum limit is active.
+	  * \param pZActive \c True if the Z component minimum limit is active.
+	  */
+	void GetMinActive(bool& pXActive, bool& pYActive, bool& pZActive) const;
+
+	/** Get the minimum limits.
+	  * \return The current X, Y and Z values for the minimum limits.
+	  */
+	FbxDouble3 GetMin() const;
+
+	/** Set the active state of the minimum X component.
+	  * \param pActive If true, the X component minimum limit will be active.
+	  */
+	void SetMinXActive(bool pActive);
+
+	/** Set the active state of the minimum Y component.
+	  * \param pActive If true, the Y component minimum limit will be active.
+	  */
+	void SetMinYActive(bool pActive);
+
+	/** Set the active state of the minimum Z component.
+	  * \param pActive If true, the Z component minimum limit will be active.
+	  */
+	void SetMinZActive(bool pActive);
+
+	/** Set the active states of the three components of the minimum limits.
+	  * \param pXActive If true, the X component minimum limit will be active.
+	  * \param pYActive If true, the Y component minimum limit will be active.
+	  * \param pZActive If true, the Z component minimum limit will be active.
+	  */
+	void SetMinActive(bool pXActive, bool pYActive, bool pZActive);
+
+	/** Set the minimum limits.
+	  * \param pMin The X, Y and Z values for the minimum limits.
+	  */
+	void SetMin(const FbxDouble3& pMin);
+
+	/** Get the active state of the maximum X component.
+	  * \return True if the X component maximum limit is active.
+	  */
+	bool GetMaxXActive() const;
+
+	/** Get the active state of the maximum Y component.
+	  * \return True if the Y component maximum limit is active.
+	  */
+	bool GetMaxYActive() const;
+
+	/** Get the active state of the maximum Z component.
+	  * \return True if the Z component maximum limit is active.
+	  */
+	bool GetMaxZActive() const;
+
+	/** Get the active states of the three components of the maximum limit.
+	  * \param pXActive \c True if the X component maximum limit is active.
+	  * \param pYActive \c True if the Y component maximum limit is active.
+	  * \param pZActive \c True if the Z component maximum limit is active.
+	  */
+	void GetMaxActive(bool& pXActive, bool& pYActive, bool& pZActive) const;
+
+	/** Get the maximum limits.
+	  * \return The current X, Y and Z values for the maximum limits.
+	  */
+	FbxDouble3 GetMax() const;
+
+	/** Set the active state of the maximum X component.
+	  * \param pActive If true, the X component maximum limit will be active.
+	  */
+	void SetMaxXActive(bool pActive);
+
+	/** Set the active state of the maximum Y component.
+	  * \param pActive If true, the Y component maximum limit will be active.
+	  */
+	void SetMaxYActive(bool pActive);
+
+	/** Set the active state of the maximum Z component.
+	  * \param pActive If true, the Z component maximum limit will be active.
+	  */
+	void SetMaxZActive(bool pActive);
+
+	/** Set the active states of the three components of the maximum limits.
+	  * \param pXActive If true, the X component maximum limit will be active.
+	  * \param pYActive If true, the Y component maximum limit will be active.
+	  * \param pZActive If true, the Z component maximum limit will be active.
+	  */
+	void SetMaxActive(bool pXActive, bool pYActive, bool pZActive);
+
+	/** Set the maximum limits.
+	  * \param pMax The X, Y and Z values for the maximum limits.
+	  */
+	void SetMax(const FbxDouble3& pMax);
+
+	/** Find if any of the minimum or maximum active state are set.
+	  * \return If any component of the minimum or maximum active state are set, true is returned.
+	  * \remarks The global active state will not count when resolving this.
+	  */
+	bool GetAnyMinMaxActive() const;
+	
+	/** Apply the active limits to the components of the vector provided.
+	  * \return The new vector clamped by active limits.
+	  */
+	FbxDouble3 Apply(const FbxDouble3& pVector);
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+	enum EMask {eActive=1<<0, eMinX=1<<1, eMinY=1<<2, eMinZ=1<<3, eMaxX=1<<4, eMaxY=1<<5, eMaxZ=1<<6, eAll=eMinX|eMinY|eMinZ|eMaxX|eMaxY|eMaxZ};
+
+	FbxUInt8	mMask;
+	FbxDouble3	mMin;
+	FbxDouble3	mMax;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+class FBXSDK_DLL FbxRotationOrder
+{
+public:	
+	FbxRotationOrder(FbxEuler::EOrder pOrder=FbxEuler::eOrderXYZ);
+
+	FbxEuler::EOrder	GetOrder() const;
+	void				SetOrder(FbxEuler::EOrder pOrder);
+	void				V2M(FbxAMatrix& pRM, const FbxVector4& pV);
+	void				M2V(FbxVector4& pV, const FbxAMatrix& pRM);
+	bool				V2VRef(FbxVector4& pVOut, const FbxVector4& pVIn, const FbxVector4& pVRef);
+
+private:
+    FbxEuler::EOrder mOrder;
+};
+
+/** Handle transform behaviors such as pivots, limits and offets, etc.
+  */
+class FBXSDK_DLL FbxTransform
+{
+public:
+	enum EInheritType {eInheritRrSs, eInheritRSrs, eInheritRrs};
+
+	FbxTransform();
+
+	EInheritType		GetInheritType() const;
+	void				SetInheritType(EInheritType pType);
+	FbxLimits&			GetTranslationLimits();
+	FbxLimits&			GetRotationLimits();
+	FbxLimits&			GetScalingLimits();
+	FbxRotationOrder&	GetRotationOrder();
+	bool				HasROffset() const;
+	bool				HasRPivot() const;
+	bool				HasSOffset() const;
+	bool				HasSPivot() const;
+	bool				HasPreRM() const;
+	bool				HasPostRM() const;
+	void				SetROffset(const FbxVector4& pROffset);
+	void				SetRPivot(const FbxVector4& pRPivot);
+	void				SetSOffset(const FbxVector4& pSOffset);
+	void				SetSPivot(const FbxVector4& pSPivot);
+	void				SetPreRM(const FbxVector4& pPreR);
+	void				SetPostRM(const FbxVector4& pPostR);
+	bool				GetRotationSpaceForLimitOnly() const;
+	void				SetRotationSpaceForLimitOnly(bool pRotationSpaceForLimitOnly);
+
+	void				DoF2LT(FbxVector4& pLT, const FbxVector4& pDoF, const FbxAMatrix& pLRM, const FbxAMatrix& pLSM);
+	void				LT2DoF(FbxVector4& pDoF, const FbxVector4& pLT, const FbxAMatrix& pLRM, const FbxAMatrix& pLSM);
+	void				DoF2LRM(FbxAMatrix& pLRM, const FbxVector4& pRDoF, bool pForLimit=false);
+	void				LRM2DoF(FbxVector4& pRDoF, const FbxAMatrix& pLRM, bool pForLimit=false);
+	void				LSM2GSM(FbxAMatrix& pGSM, const FbxAMatrix& pPGSM, const FbxAMatrix& pLSM, const FbxAMatrix& pLRM, const FbxVector4& pPLS);
+	void				GTRSM2GX(FbxAMatrix& pGX, const FbxVector4& pGT, const FbxAMatrix& pGRM, const FbxAMatrix& pGSM);
+
+private:
+	void				SumPivots(FbxVector4& pSum, const FbxAMatrix& pLRM, const FbxAMatrix& pLSM);
+
+	class RotationSpace
+	{
+	public:
+		enum EMask {eHasNothing=0, eHasPreRotM=1<<0, eHasPostRotM=1<<1};
+
+		RotationSpace();
+
+		bool				HasPreRM() const;
+		bool				HasPostRM() const;
+		void				GetPreRM(FbxAMatrix& pPreRM) const;
+		void				GetPostRM(FbxAMatrix& pPostRM) const;
+		void				SetPreRM(const FbxVector4& pPreR);
+		void				SetPostRM(const FbxVector4& pPostR);
+		void				DoF2LRM(FbxAMatrix& pLRM, const FbxVector4& pRDoF);
+		void				LRM2DoF(FbxVector4& pRDoF, const FbxAMatrix& pLRM);
+
+		FbxUInt8			mMask;
+		FbxAMatrix			mPreRM;
+		FbxAMatrix			mPostRM;
+		FbxRotationOrder	mRotationOrder;
+	};
+
+    enum EMask {eHasNothing=0, eHasRotOffset=1<<0, eHasRotPivot=1<<1, eHasScaleOffset=1<<2, eHasScalePivot=1<<3};
+
+	FbxUInt8		mMask;
+	EInheritType	mInheritType;	
+	FbxVector4		mROffset;
+	FbxVector4		mRPivot;
+	FbxVector4		mSOffset;
+	FbxVector4		mSPivot;
+	FbxLimits		mTranslationLimits;
+	FbxLimits		mRotationLimits;
+	FbxLimits		mScalingLimits;
+	bool			mRotationSpaceForLimitOnly;
+	RotationSpace	mRotationSpace;
+};
+
+FBXSDK_DLL bool FbxGetContinuousRotation(FbxVector4& pRes, const FbxVector4& pRot, const FbxVector4& pRef, const int* pOrder);
+FBXSDK_DLL void FbxGetContinuousRotation(FbxVector4& pRes, const FbxVector4& pRot, const FbxVector4& pRef);
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_TRANSFORMS_H_ */

+ 259 - 259
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxvector2.h

@@ -1,259 +1,259 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxvector2.h
-#ifndef _FBXSDK_CORE_MATH_VECTOR_2_H_
-#define _FBXSDK_CORE_MATH_VECTOR_2_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/**	A two double mathematic vector class.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxVector2 : public FbxDouble2
-{
-public:
-	/**
-	  * \name Constructors and Destructor
-	  */
-	//@{
-		//! Constructor.
-		FbxVector2();
-
-		/** Copy constructor.
-		  * \param pVector2 The vector copied to this one.
-		  */
-		FbxVector2(const FbxVector2& pVector2);
-
-		/** Constructor.
-		  *	\param pX X component.
-		  *	\param pY Y component.
-		  */
-		FbxVector2(double pX, double pY);
-	//@}
-
-	/**
-	  * \name Access
-	  */
-	//@{
-		/** Assignment operation.
-		  * \param pVector2   The vector assigned to this one.
-		  * \return           This vector after assignment. 
-		  */
-		FbxVector2& operator=(const FbxVector2& pVector2);
-
-		/** Set vector.
-	  * \param pX The X component value.
-	  * \param pY The Y component value.
-	  */
-		void Set(double pX, double pY);
-	//@}
-
-	/**
-	  * \name Scalar Operations
-	  */
-	//@{
-		/** Add a value to all vector components.
-		  * \param pValue The value to add to each component of the vector.
-		  * \return           A new vector with the result of adding pValue to each component of this vector.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2 operator+(double pValue) const;
-
-		/** Subtract a value from all vector components.
-		  * \param pValue The value to subtract from each component of the vector.
-		  * \return           A new vector with the result of subtracting pValue from each component of this vector.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2 operator-(double pValue) const;
-
-		/** Multiply a value to all vector components.
-		  * \param pValue The value multiplying each component of the vector.
-		  * \return           A new vector with the result of multiplying each component of this vector by pValue.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2 operator*(double pValue) const;
-
-		/**	Divide all vector components by a value.
-		  * \param pValue The value dividing each component of the vector.
-		  * \return           A new vector with the result of dividing each component of this vector by pValue.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2 operator/(double pValue) const;
-
-		/** Add a value to all vector components.
-		  * \param pValue The value to add to each component of the vector.
-		  * \return           The result of adding pValue to each component of this vector, replacing this vector.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2& operator+=(double pValue);
-
-		/** Subtract a value from all vector components.
-		  * \param pValue The value to subtract from each component of the vector.
-		  * \return           The result of subtracting pValue from each component of this vector, replacing this vector.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2& operator-=(double pValue);
-
-		/** Multiply a value to all vector elements.
-		  * \param pValue The value multiplying each component of the vector.
-		  * \return           The result of multiplying each component of this vector by pValue, replacing this vector.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2& operator*=(double pValue);
-
-		/**	Divide all vector elements by a value.
-		  * \param pValue The value dividing each component of the vector.
-		  * \return           The result of multiplying each component of this vector by pValue, replacing this vector.
-		  * \remarks          The pValue parameter is not checked.
-		  */
-		FbxVector2& operator/=(double pValue);
-	//@}
-
-	/**
-	  * \name Vector Operations
-	  */
-	//@{
-		/**	Unary minus operator.
-		  * \return The vector that is the negation of \c this.
-		  */
-		FbxVector2 operator-() const;
-
-		/** Add two vectors together.
-		  * \param pVector Vector to add.
-		  * \return            The result of this vector + pVector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2 operator+(const FbxVector2& pVector) const;
-
-		/** Subtract a vector from another vector.
-		  * \param pVector Vector to subtract.
-		  * \return            The result of this vector - pVector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2 operator-(const FbxVector2& pVector) const;
-
-		/** Memberwise multiplication of two vectors.
-		  * \param pVector      Multiplying vector.
-		  * \return             The result of this vector * pVector.
-		  * \remarks            The values in pVector are not checked.
-		  */
-		FbxVector2 operator*(const FbxVector2& pVector) const;
-
-		/** Memberwise division of a vector with another vector.
-		  * \param pVector     Dividing vector.
-		  * \return            The result of this vector / pVector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2 operator/(const FbxVector2& pVector) const;
-
-		/** Add two vectors together.
-		  * \param pVector Vector to add.
-		  * \return            The result of this vector + pVector, replacing this vector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2& operator+=(const FbxVector2& pVector);
-
-		/** Subtract a vector from another vector.
-		  * \param pVector Vector to subtract.
-		  * \return            The result of this vector - pVector, replacing this vector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2& operator-=(const FbxVector2& pVector);
-
-		/** Memberwise multiplication of two vectors.
-		  * \param pVector Multiplying vector.
-		  * \return            The result of this vector * pVector, replacing this vector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2& operator*=(const FbxVector2& pVector);
-
-		/** Memberwise division of a vector with another vector.
-		  * \param pVector Dividing vector.
-		  * \remarks           The values in pVector are not checked.
-		  * \return            The result of this vector / pVector, replacing this vector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector2& operator/=(const FbxVector2& pVector);
-
-		/** Calculate the dot product of two vectors.
-		  * \param pVector The second vector.
-		  * \return The dot product value.
-		  */
-		double DotProduct(const FbxVector2& pVector) const;
-	//@}
-
-	/**
-	  * \name Boolean Operations
-	  */
-	//@{
-		/**	Equivalence operator.
-		  * \param pVector The vector to be compared to \e this.
-		  * \return            \c true if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false otherwise.
-		  */
-		bool operator==(const FbxVector2 & pVector) const;
-
-		/**	Non-equivalence operator.
-		  * \param pVector The vector to be compared to \e this.
-		  * \return            \c false if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true otherwise.
-		  */
-		bool operator!=(const FbxVector2 & pVector) const;
-	//@}
-
-	/**
-	  * \name Length
-	  */
-	//@{
-		/** Get the vector's length.
-		  * \return The mathematical length of the vector.
-		  */
-		double Length() const;
-
-		/** Get the vector's length squared.
-		  * \return The mathematical square length of the vector.
-		  */
-		double SquareLength() const;
-
-		/** Find the distance between 2 vectors.
-		  * \param pVector The second vector.
-		  * \return The mathematical distance between the two vectors.
-		  */
-		double Distance(const FbxVector2& pVector) const;
-
-		//! Normalize the vector, length set to 1.
-		void Normalize();
-	//@}
-
-	/**
-	  * \name Casting
-	  */
-	//@{
-		//! Cast the vector in a double pointer.
-		operator double* ();
-
-		//! Cast the vector in a const double pointer.
-		operator const double* () const;
-	//@}
-
-	/** Find out if the vector is equal to zero.
-	* \param pSize The number of element to test, starting at beginning. Value must range between [1, 2].
-	* \return \c true if all elements of the vector are zero, \c false otherwise. */
-	bool IsZero(int pSize=2) const;
-
-	// Fix value like 1.#IND, 1.#INF, nan, and inf
-	void FixIncorrectValue();
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_VECTOR_2_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxvector2.h
+#ifndef _FBXSDK_CORE_MATH_VECTOR_2_H_
+#define _FBXSDK_CORE_MATH_VECTOR_2_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/**	A two double mathematic vector class.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxVector2 : public FbxDouble2
+{
+public:
+	/**
+	  * \name Constructors and Destructor
+	  */
+	//@{
+		//! Constructor.
+		FbxVector2();
+
+		/** Copy constructor.
+		  * \param pVector2 The vector copied to this one.
+		  */
+		FbxVector2(const FbxVector2& pVector2);
+
+		/** Constructor.
+		  *	\param pX X component.
+		  *	\param pY Y component.
+		  */
+		FbxVector2(double pX, double pY);
+	//@}
+
+	/**
+	  * \name Access
+	  */
+	//@{
+		/** Assignment operation.
+		  * \param pVector2   The vector assigned to this one.
+		  * \return           This vector after assignment. 
+		  */
+		FbxVector2& operator=(const FbxVector2& pVector2);
+
+		/** Set vector.
+	  * \param pX The X component value.
+	  * \param pY The Y component value.
+	  */
+		void Set(double pX, double pY);
+	//@}
+
+	/**
+	  * \name Scalar Operations
+	  */
+	//@{
+		/** Add a value to all vector components.
+		  * \param pValue The value to add to each component of the vector.
+		  * \return           A new vector with the result of adding pValue to each component of this vector.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2 operator+(double pValue) const;
+
+		/** Subtract a value from all vector components.
+		  * \param pValue The value to subtract from each component of the vector.
+		  * \return           A new vector with the result of subtracting pValue from each component of this vector.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2 operator-(double pValue) const;
+
+		/** Multiply a value to all vector components.
+		  * \param pValue The value multiplying each component of the vector.
+		  * \return           A new vector with the result of multiplying each component of this vector by pValue.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2 operator*(double pValue) const;
+
+		/**	Divide all vector components by a value.
+		  * \param pValue The value dividing each component of the vector.
+		  * \return           A new vector with the result of dividing each component of this vector by pValue.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2 operator/(double pValue) const;
+
+		/** Add a value to all vector components.
+		  * \param pValue The value to add to each component of the vector.
+		  * \return           The result of adding pValue to each component of this vector, replacing this vector.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2& operator+=(double pValue);
+
+		/** Subtract a value from all vector components.
+		  * \param pValue The value to subtract from each component of the vector.
+		  * \return           The result of subtracting pValue from each component of this vector, replacing this vector.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2& operator-=(double pValue);
+
+		/** Multiply a value to all vector elements.
+		  * \param pValue The value multiplying each component of the vector.
+		  * \return           The result of multiplying each component of this vector by pValue, replacing this vector.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2& operator*=(double pValue);
+
+		/**	Divide all vector elements by a value.
+		  * \param pValue The value dividing each component of the vector.
+		  * \return           The result of multiplying each component of this vector by pValue, replacing this vector.
+		  * \remarks          The pValue parameter is not checked.
+		  */
+		FbxVector2& operator/=(double pValue);
+	//@}
+
+	/**
+	  * \name Vector Operations
+	  */
+	//@{
+		/**	Unary minus operator.
+		  * \return The vector that is the negation of \c this.
+		  */
+		FbxVector2 operator-() const;
+
+		/** Add two vectors together.
+		  * \param pVector Vector to add.
+		  * \return            The result of this vector + pVector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2 operator+(const FbxVector2& pVector) const;
+
+		/** Subtract a vector from another vector.
+		  * \param pVector Vector to subtract.
+		  * \return            The result of this vector - pVector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2 operator-(const FbxVector2& pVector) const;
+
+		/** Memberwise multiplication of two vectors.
+		  * \param pVector      Multiplying vector.
+		  * \return             The result of this vector * pVector.
+		  * \remarks            The values in pVector are not checked.
+		  */
+		FbxVector2 operator*(const FbxVector2& pVector) const;
+
+		/** Memberwise division of a vector with another vector.
+		  * \param pVector     Dividing vector.
+		  * \return            The result of this vector / pVector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2 operator/(const FbxVector2& pVector) const;
+
+		/** Add two vectors together.
+		  * \param pVector Vector to add.
+		  * \return            The result of this vector + pVector, replacing this vector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2& operator+=(const FbxVector2& pVector);
+
+		/** Subtract a vector from another vector.
+		  * \param pVector Vector to subtract.
+		  * \return            The result of this vector - pVector, replacing this vector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2& operator-=(const FbxVector2& pVector);
+
+		/** Memberwise multiplication of two vectors.
+		  * \param pVector Multiplying vector.
+		  * \return            The result of this vector * pVector, replacing this vector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2& operator*=(const FbxVector2& pVector);
+
+		/** Memberwise division of a vector with another vector.
+		  * \param pVector Dividing vector.
+		  * \remarks           The values in pVector are not checked.
+		  * \return            The result of this vector / pVector, replacing this vector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector2& operator/=(const FbxVector2& pVector);
+
+		/** Calculate the dot product of two vectors.
+		  * \param pVector The second vector.
+		  * \return The dot product value.
+		  */
+		double DotProduct(const FbxVector2& pVector) const;
+	//@}
+
+	/**
+	  * \name Boolean Operations
+	  */
+	//@{
+		/**	Equivalence operator.
+		  * \param pVector The vector to be compared to \e this.
+		  * \return            \c true if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c false otherwise.
+		  */
+		bool operator==(const FbxVector2 & pVector) const;
+
+		/**	Non-equivalence operator.
+		  * \param pVector The vector to be compared to \e this.
+		  * \return            \c false if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance), \c true otherwise.
+		  */
+		bool operator!=(const FbxVector2 & pVector) const;
+	//@}
+
+	/**
+	  * \name Length
+	  */
+	//@{
+		/** Get the vector's length.
+		  * \return The mathematical length of the vector.
+		  */
+		double Length() const;
+
+		/** Get the vector's length squared.
+		  * \return The mathematical square length of the vector.
+		  */
+		double SquareLength() const;
+
+		/** Find the distance between 2 vectors.
+		  * \param pVector The second vector.
+		  * \return The mathematical distance between the two vectors.
+		  */
+		double Distance(const FbxVector2& pVector) const;
+
+		//! Normalize the vector, length set to 1.
+		void Normalize();
+	//@}
+
+	/**
+	  * \name Casting
+	  */
+	//@{
+		//! Cast the vector in a double pointer.
+		operator double* ();
+
+		//! Cast the vector in a const double pointer.
+		operator const double* () const;
+	//@}
+
+	/** Find out if the vector is equal to zero.
+	* \param pSize The number of element to test, starting at beginning. Value must range between [1, 2].
+	* \return \c true if all elements of the vector are zero, \c false otherwise. */
+	bool IsZero(int pSize=2) const;
+
+	// Fix value like 1.#IND, 1.#INF, nan, and inf
+	void FixIncorrectValue();
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_VECTOR_2_H_ */

+ 324 - 324
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/math/fbxvector4.h

@@ -1,324 +1,324 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxvector4.h
-#ifndef _FBXSDK_CORE_MATH_VECTOR_4_H_
-#define _FBXSDK_CORE_MATH_VECTOR_4_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxQuaternion;
-
-/**	A four double mathematic vector class.
-  * \nosubgrouping
-  */
-class FBXSDK_DLL FbxVector4 : public FbxDouble4
-{
-public:
-	/**
-	  * \name Constructors and Destructor
-	  */
-	//@{
-		//! Constructor.
-		FbxVector4();
-
-		/** Copy constructor.
-		  * \param pVector4   The vector copied to this one.
-		  */
-		FbxVector4(const FbxVector4& pVector4);
-
-		/** Constructor.
-		  *	\param pX X component.
-		  *	\param pY Y component.
-		  *	\param pZ Z component.
-		  *	\param pW W component.
-		  */
-		FbxVector4(double pX, double pY, double pZ, double pW=1.0);
-
-		/** Constructor.
-		  *	\param pValue X,Y,Z,W components.
-		  */
-		FbxVector4(const double pValue[4]);
-
-		/** Constructor.
-		  * \param pValue X,Y,Z components.
-		  * \remarks The fourth component of this object is assigned 1.
-		  */
-		FbxVector4(const FbxDouble3& pValue);
-	//@}
-
-	/**
-	  * \name Access
-	  */
-	//@{
-		/** Assignment operation.
-		  * \param pVector4  The vector assigned to this one.
-		  * \return          This vector after assignment.
-		  */
-		FbxVector4& operator=(const FbxVector4& pVector4);
-
-		/** Assignment operation.
-		  * \param pValue    The pointer to an array whose elements are assigned to this vector.
-		  * \return          This vector after assignment.
-		  */
-		FbxVector4& operator=(const double* pValue);
-
-		/** Assignment operation.
-		  * \param pValue    The vector with 3 elements assigned to this vector.
-		  * \return          This vector after assignment.
-		  * \remarks         The first three elements are assigned with pValue. The fourth element is set as 1.0 
-		  */
-		FbxVector4& operator=(const FbxDouble3& pValue);
-
-		/** Set vector.
-		  * \param pX The X component value.
-		  * \param pY The Y component value.
-		  * \param pZ The Z component value.
-		  * \param pW The W component value.
-		  */
-		void Set(double pX, double pY, double pZ, double pW=1.0);
-	//@}
-
-	/**
-	  * \name Scalar Operations
-	  */
-	//@{
-		/** Add a value to all vector components.
-		  * \param pValue The value to add to each component of the vector.
-		  * \return New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4 operator+(double pValue) const;
-
-		/** Subtract a value from all vector components.
-		  * \param pValue The value to subtract from each component of the vector.
-		  * \return New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4 operator-(double pValue) const;
-
-		/** Multiply a value to all vector components.
-		  * \param pValue The value multiplying each component of the vector.
-		  * \return New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4 operator*(double pValue) const;
-
-		/**	Divide all vector components by a value.
-		  * \param pValue The value dividing each component of the vector.
-		  * \return New vector.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4 operator/(double pValue) const;
-
-		/** Add a value to all vector components.
-		  * \param pValue The value to add to each component of the vector.
-		  * \return \e this updated with the operation result.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4& operator+=(double pValue);
-
-		/** Subtract a value from all vector components.
-		  * \param pValue The value to subtract from each component of the vector.
-		  * \return \e this updated with the operation result.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4& operator-=(double pValue);
-
-		/** Multiply a value to all vector elements.
-		  * \param pValue The value multiplying each component of the vector.
-		  * \return \e this updated with the operation result.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4& operator*=(double pValue);
-
-		/**	Divide all vector elements by a value.
-		  * \param pValue The value dividing each component of the vector.
-		  * \return \e this updated with the operation result.
-		  * \remarks          The passed value is not checked.
-		  */
-		FbxVector4& operator/=(double pValue);
-	//@}
-
-	/**
-	  * \name Vector Operations
-	  */
-	//@{
-		/**	Unary minus operator.
-		  * \return The vector that is the negation of \c this.
-		  */
-		FbxVector4 operator-() const;
-
-		/** Add two vectors together.
-		  * \param pVector Vector to add.
-		  * \return The vector v' = this + pVector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4 operator+(const FbxVector4& pVector) const;
-
-		/** Subtract a vector from another vector.
-		  * \param pVector Vector to subtract.
-		  * \return The vector v' = this - pVector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4 operator-(const FbxVector4& pVector) const;
-
-		/** Memberwise multiplication of two vectors.
-		  * \param pVector Multiplying vector.
-		  * \return The vector v' = this * pVector.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4 operator*(const FbxVector4& pVector) const;
-
-		/** Memberwise division of a vector with another vector.
-		  * \param pVector Dividing vector.
-		  * \return The vector v[i]' = this[i] / pVector[i].
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4 operator/(const FbxVector4& pVector) const;
-
-		/** Add two vectors together.
-		  * \param pVector Vector to add.
-		  * \return \e this updated with the operation result.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4& operator+=(const FbxVector4& pVector);
-
-		/** Subtract a vector from another vector.
-		  * \param pVector Vector to subtract.
-		  * \return \e this updated with the operation result.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4& operator-=(const FbxVector4& pVector);
-
-		/** Memberwise multiplication of two vectors.
-		  * \param pVector Multiplying vector.
-		  * \return \e this updated with the operation result.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4& operator*=(const FbxVector4& pVector);
-
-		/** Memberwise division of a vector with another vector.
-		  * \param pVector Dividing vector.
-		  * \return \e this updated with the operation result.
-		  * \remarks           The values in pVector are not checked.
-		  */
-		FbxVector4& operator/=(const FbxVector4& pVector);
-
-		/** Calculate the dot product of two vectors.
-		  * \param pVector The second vector.
-		  * \return The dot product value.
-		  * \remarks           Being considered as a XYZ vector with a weight, only the 3 first elements are considered in this operation.
-		  */
-		double DotProduct(const FbxVector4& pVector) const;
-
-		/** Calculate the cross product of two vectors.
-		  * \param pVector The second vector.
-		  * \return The cross product vector.
-		  * \remarks           Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
-		  */
-		FbxVector4 CrossProduct(const FbxVector4& pVector) const;
-
-		/** Calculate the Euler rotation required to align axis pAB-pA on pAB-pB.
-		  *	\param pAB The intersection of the 2 axis.
-		  *	\param pA A point on axis to be aligned.
-		  *	\param pB A point on reference axis.
-		  *	\param pAngles Resulting euler angles.
-		  *	\return \c true on success.
-		  * \remarks           Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
-		  */
-		static bool AxisAlignmentInEulerAngle(const FbxVector4& pAB, const FbxVector4& pA, const FbxVector4& pB, FbxVector4& pAngles);
-	//@}
-
-	/**
-	  * \name Boolean Operations
-	  */
-	//@{
-		/**	Equivalence operator.
-		  * \param pVector The vector to be compared to \e this.
-		  * \return            \c true if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c false otherwise.
-		  */
-		bool operator==(const FbxVector4 & pVector) const;
-
-		/**	Non equivalence operator.
-		  * \param pVector The vector to be compared to \e this.
-		  * \return            \c false if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c true otherwise.
-		  */
-		bool operator!=(const FbxVector4 & pVector) const;
-	//@}
-
-	/**
-	  * \name Length
-	  */
-	//@{
-		/** Get the vector's length.
-		  * \return The mathematical length of the vector.
-		  * \remarks     Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
-		  */
-		double Length() const;
-
-		/** Get the vector's length squared.
-		  * \return The mathematical square length of the vector.
-		  * \remarks     Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
-		  */
-		double SquareLength() const;
-
-		/** Find the distance between 2 vectors.
-		  * \param pVector The second vector.
-		  * \return The mathematical distance between the two vectors.
-		  * \remarks           Being considered as a XYZ vector with a weight, only the 3 first elements are considered in this operation.
-		  */
-		double Distance(const FbxVector4& pVector) const;
-
-		/** Normalize the vector, length set to 1.
-		  * \remarks     Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
-		  */
-		void Normalize();
-
-
-		/** Set the Euler XYZ from a Quaternion.
-		  *\param pQuat    Quaternion from which Euler XYZ information is got.
-		  */
-		void SetXYZ(const FbxQuaternion pQuat);
-	//@}
-
-	/**
-	  * \name Casting
-	  */
-	//@{
-		//! Cast the vector in a double pointer.
-		operator double* ();
-
-		//! Cast the vector in a const double pointer.
-		operator const double* () const;
-	//@}
-
-	/** Find out if the vector is equal to zero.
-	* \param pSize The number of element to test, starting at beginning. Value must range between [1, 4].
-	* \return \c true if all elements of the vector are zero, \c false otherwise. */
-	bool IsZero(int pSize=4) const;
-
-	// Fix value like 1.#IND, 1.#INF, nan, and inf
-	void FixIncorrectValue();
-
-/*****************************************************************************************************************************
-** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
-*****************************************************************************************************************************/
-#ifndef DOXYGEN_SHOULD_SKIP_THIS
-	int Compare(const FbxVector4& pV, const double pThreshold=FBXSDK_TOLERANCE) const;
-#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_CORE_MATH_VECTOR_4_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxvector4.h
+#ifndef _FBXSDK_CORE_MATH_VECTOR_4_H_
+#define _FBXSDK_CORE_MATH_VECTOR_4_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxQuaternion;
+
+/**	A four double mathematic vector class.
+  * \nosubgrouping
+  */
+class FBXSDK_DLL FbxVector4 : public FbxDouble4
+{
+public:
+	/**
+	  * \name Constructors and Destructor
+	  */
+	//@{
+		//! Constructor.
+		FbxVector4();
+
+		/** Copy constructor.
+		  * \param pVector4   The vector copied to this one.
+		  */
+		FbxVector4(const FbxVector4& pVector4);
+
+		/** Constructor.
+		  *	\param pX X component.
+		  *	\param pY Y component.
+		  *	\param pZ Z component.
+		  *	\param pW W component.
+		  */
+		FbxVector4(double pX, double pY, double pZ, double pW=1.0);
+
+		/** Constructor.
+		  *	\param pValue X,Y,Z,W components.
+		  */
+		FbxVector4(const double pValue[4]);
+
+		/** Constructor.
+		  * \param pValue X,Y,Z components.
+		  * \remarks The fourth component of this object is assigned 1.
+		  */
+		FbxVector4(const FbxDouble3& pValue);
+	//@}
+
+	/**
+	  * \name Access
+	  */
+	//@{
+		/** Assignment operation.
+		  * \param pVector4  The vector assigned to this one.
+		  * \return          This vector after assignment.
+		  */
+		FbxVector4& operator=(const FbxVector4& pVector4);
+
+		/** Assignment operation.
+		  * \param pValue    The pointer to an array whose elements are assigned to this vector.
+		  * \return          This vector after assignment.
+		  */
+		FbxVector4& operator=(const double* pValue);
+
+		/** Assignment operation.
+		  * \param pValue    The vector with 3 elements assigned to this vector.
+		  * \return          This vector after assignment.
+		  * \remarks         The first three elements are assigned with pValue. The fourth element is set as 1.0 
+		  */
+		FbxVector4& operator=(const FbxDouble3& pValue);
+
+		/** Set vector.
+		  * \param pX The X component value.
+		  * \param pY The Y component value.
+		  * \param pZ The Z component value.
+		  * \param pW The W component value.
+		  */
+		void Set(double pX, double pY, double pZ, double pW=1.0);
+	//@}
+
+	/**
+	  * \name Scalar Operations
+	  */
+	//@{
+		/** Add a value to all vector components.
+		  * \param pValue The value to add to each component of the vector.
+		  * \return New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4 operator+(double pValue) const;
+
+		/** Subtract a value from all vector components.
+		  * \param pValue The value to subtract from each component of the vector.
+		  * \return New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4 operator-(double pValue) const;
+
+		/** Multiply a value to all vector components.
+		  * \param pValue The value multiplying each component of the vector.
+		  * \return New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4 operator*(double pValue) const;
+
+		/**	Divide all vector components by a value.
+		  * \param pValue The value dividing each component of the vector.
+		  * \return New vector.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4 operator/(double pValue) const;
+
+		/** Add a value to all vector components.
+		  * \param pValue The value to add to each component of the vector.
+		  * \return \e this updated with the operation result.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4& operator+=(double pValue);
+
+		/** Subtract a value from all vector components.
+		  * \param pValue The value to subtract from each component of the vector.
+		  * \return \e this updated with the operation result.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4& operator-=(double pValue);
+
+		/** Multiply a value to all vector elements.
+		  * \param pValue The value multiplying each component of the vector.
+		  * \return \e this updated with the operation result.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4& operator*=(double pValue);
+
+		/**	Divide all vector elements by a value.
+		  * \param pValue The value dividing each component of the vector.
+		  * \return \e this updated with the operation result.
+		  * \remarks          The passed value is not checked.
+		  */
+		FbxVector4& operator/=(double pValue);
+	//@}
+
+	/**
+	  * \name Vector Operations
+	  */
+	//@{
+		/**	Unary minus operator.
+		  * \return The vector that is the negation of \c this.
+		  */
+		FbxVector4 operator-() const;
+
+		/** Add two vectors together.
+		  * \param pVector Vector to add.
+		  * \return The vector v' = this + pVector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4 operator+(const FbxVector4& pVector) const;
+
+		/** Subtract a vector from another vector.
+		  * \param pVector Vector to subtract.
+		  * \return The vector v' = this - pVector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4 operator-(const FbxVector4& pVector) const;
+
+		/** Memberwise multiplication of two vectors.
+		  * \param pVector Multiplying vector.
+		  * \return The vector v' = this * pVector.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4 operator*(const FbxVector4& pVector) const;
+
+		/** Memberwise division of a vector with another vector.
+		  * \param pVector Dividing vector.
+		  * \return The vector v[i]' = this[i] / pVector[i].
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4 operator/(const FbxVector4& pVector) const;
+
+		/** Add two vectors together.
+		  * \param pVector Vector to add.
+		  * \return \e this updated with the operation result.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4& operator+=(const FbxVector4& pVector);
+
+		/** Subtract a vector from another vector.
+		  * \param pVector Vector to subtract.
+		  * \return \e this updated with the operation result.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4& operator-=(const FbxVector4& pVector);
+
+		/** Memberwise multiplication of two vectors.
+		  * \param pVector Multiplying vector.
+		  * \return \e this updated with the operation result.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4& operator*=(const FbxVector4& pVector);
+
+		/** Memberwise division of a vector with another vector.
+		  * \param pVector Dividing vector.
+		  * \return \e this updated with the operation result.
+		  * \remarks           The values in pVector are not checked.
+		  */
+		FbxVector4& operator/=(const FbxVector4& pVector);
+
+		/** Calculate the dot product of two vectors.
+		  * \param pVector The second vector.
+		  * \return The dot product value.
+		  * \remarks           Being considered as a XYZ vector with a weight, only the 3 first elements are considered in this operation.
+		  */
+		double DotProduct(const FbxVector4& pVector) const;
+
+		/** Calculate the cross product of two vectors.
+		  * \param pVector The second vector.
+		  * \return The cross product vector.
+		  * \remarks           Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
+		  */
+		FbxVector4 CrossProduct(const FbxVector4& pVector) const;
+
+		/** Calculate the Euler rotation required to align axis pAB-pA on pAB-pB.
+		  *	\param pAB The intersection of the 2 axis.
+		  *	\param pA A point on axis to be aligned.
+		  *	\param pB A point on reference axis.
+		  *	\param pAngles Resulting euler angles.
+		  *	\return \c true on success.
+		  * \remarks           Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
+		  */
+		static bool AxisAlignmentInEulerAngle(const FbxVector4& pAB, const FbxVector4& pA, const FbxVector4& pB, FbxVector4& pAngles);
+	//@}
+
+	/**
+	  * \name Boolean Operations
+	  */
+	//@{
+		/**	Equivalence operator.
+		  * \param pVector The vector to be compared to \e this.
+		  * \return            \c true if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c false otherwise.
+		  */
+		bool operator==(const FbxVector4 & pVector) const;
+
+		/**	Non equivalence operator.
+		  * \param pVector The vector to be compared to \e this.
+		  * \return            \c false if the two vectors are equal (each element is within a FBXSDK_TOLERANCE tolerance) and \c true otherwise.
+		  */
+		bool operator!=(const FbxVector4 & pVector) const;
+	//@}
+
+	/**
+	  * \name Length
+	  */
+	//@{
+		/** Get the vector's length.
+		  * \return The mathematical length of the vector.
+		  * \remarks     Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
+		  */
+		double Length() const;
+
+		/** Get the vector's length squared.
+		  * \return The mathematical square length of the vector.
+		  * \remarks     Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
+		  */
+		double SquareLength() const;
+
+		/** Find the distance between 2 vectors.
+		  * \param pVector The second vector.
+		  * \return The mathematical distance between the two vectors.
+		  * \remarks           Being considered as a XYZ vector with a weight, only the 3 first elements are considered in this operation.
+		  */
+		double Distance(const FbxVector4& pVector) const;
+
+		/** Normalize the vector, length set to 1.
+		  * \remarks     Being considered as a XYZ vector with a weight, only the first 3 elements are considered in this operation.
+		  */
+		void Normalize();
+
+
+		/** Set the Euler XYZ from a Quaternion.
+		  *\param pQuat    Quaternion from which Euler XYZ information is got.
+		  */
+		void SetXYZ(const FbxQuaternion pQuat);
+	//@}
+
+	/**
+	  * \name Casting
+	  */
+	//@{
+		//! Cast the vector in a double pointer.
+		operator double* ();
+
+		//! Cast the vector in a const double pointer.
+		operator const double* () const;
+	//@}
+
+	/** Find out if the vector is equal to zero.
+	* \param pSize The number of element to test, starting at beginning. Value must range between [1, 4].
+	* \return \c true if all elements of the vector are zero, \c false otherwise. */
+	bool IsZero(int pSize=4) const;
+
+	// Fix value like 1.#IND, 1.#INF, nan, and inf
+	void FixIncorrectValue();
+
+/*****************************************************************************************************************************
+** WARNING! Anything beyond these lines is for internal use, may not be documented and is subject to change without notice! **
+*****************************************************************************************************************************/
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+	int Compare(const FbxVector4& pV, const double pThreshold=FBXSDK_TOLERANCE) const;
+#endif /* !DOXYGEN_SHOULD_SKIP_THIS *****************************************************************************************/
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_CORE_MATH_VECTOR_4_H_ */

+ 58 - 58
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxatomic.h

@@ -1,58 +1,58 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxatomic.h
-#ifndef _FBXSDK_CORE_SYNC_ATOMIC_H_
-#define _FBXSDK_CORE_SYNC_ATOMIC_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FBXSDK_DLL FbxAtomOp
-{
-public:
-	static void			Inc(volatile FbxAtomic* pPtr);
-	static void			Dec(volatile FbxAtomic* pPtr);
-	static bool			Add(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static bool			Sub(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static bool			And(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static bool			Or(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static bool			Nand(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static bool			Xor(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static bool			CompareAndSwap(volatile FbxAtomic* pPtr, FbxAtomic pOld, FbxAtomic pSwap);
-	static FbxAtomic	TestAndSet(volatile FbxAtomic* pPtr);
-	static FbxAtomic	FetchAndSwap(volatile FbxAtomic* pPtr, FbxAtomic pSwap);
-	static FbxAtomic	FetchAndInc(volatile FbxAtomic* pPtr);
-	static FbxAtomic	FetchAndDec(volatile FbxAtomic* pPtr);
-	static FbxAtomic	FetchAndAdd(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	FetchAndSub(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	FetchAndOr(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	FetchAndAnd(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	FetchAndXor(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	FetchAndNand(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	IncAndFetch(volatile FbxAtomic* pPtr);
-	static FbxAtomic	DecAndFetch(volatile FbxAtomic* pPtr);
-	static FbxAtomic	AddAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	SubAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	OrAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	AndAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	XorAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-	static FbxAtomic	NandAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
-
-#endif /* _FBXSDK_CORE_SYNC_ATOMIC_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxatomic.h
+#ifndef _FBXSDK_CORE_SYNC_ATOMIC_H_
+#define _FBXSDK_CORE_SYNC_ATOMIC_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FBXSDK_DLL FbxAtomOp
+{
+public:
+	static void			Inc(volatile FbxAtomic* pPtr);
+	static void			Dec(volatile FbxAtomic* pPtr);
+	static bool			Add(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static bool			Sub(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static bool			And(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static bool			Or(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static bool			Nand(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static bool			Xor(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static bool			CompareAndSwap(volatile FbxAtomic* pPtr, FbxAtomic pOld, FbxAtomic pSwap);
+	static FbxAtomic	TestAndSet(volatile FbxAtomic* pPtr);
+	static FbxAtomic	FetchAndSwap(volatile FbxAtomic* pPtr, FbxAtomic pSwap);
+	static FbxAtomic	FetchAndInc(volatile FbxAtomic* pPtr);
+	static FbxAtomic	FetchAndDec(volatile FbxAtomic* pPtr);
+	static FbxAtomic	FetchAndAdd(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	FetchAndSub(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	FetchAndOr(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	FetchAndAnd(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	FetchAndXor(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	FetchAndNand(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	IncAndFetch(volatile FbxAtomic* pPtr);
+	static FbxAtomic	DecAndFetch(volatile FbxAtomic* pPtr);
+	static FbxAtomic	AddAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	SubAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	OrAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	AndAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	XorAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+	static FbxAtomic	NandAndFetch(volatile FbxAtomic* pPtr, FbxAtomic pVal);
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
+
+#endif /* _FBXSDK_CORE_SYNC_ATOMIC_H_ */

+ 44 - 44
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxclock.h

@@ -1,44 +1,44 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxclock.h
-#ifndef _FBXSDK_CORE_SYNC_CLOCK_H_
-#define _FBXSDK_CORE_SYNC_CLOCK_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#ifndef FBXSDK_ENV_WINSTORE
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Put the current thread to sleep.
-  * \param pMilliseconds The duration of the sleep in milli-seconds.
-  */
-FBXSDK_DLL void FbxSleep(int pMilliseconds);
-
-/** Retrieves the current value of the high-resolution performance counter.
-  * \return The current value of the high-resolution performance counter, in "counts".
-  * \remarks To convert "counts" into time, divide it by the frequency available from FbxGetHighResFrequency().
-  */
-FBXSDK_DLL FbxLongLong FbxGetHighResCounter();
-
-/** Retrieves the frequency of the high-resolution performance counter.
-  * \return The frequency of the high-resolution performance counter value, in "counts" per second.
-  * \remarks The first time this function is called, the frequency is queried from the system and then cached
-  * so that further requests are fast. This means it is guaranteed to not change during run-time.
-  */
-FBXSDK_DLL FbxLongLong FbxGetHighResFrequency();
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE */
-
-#endif /* _FBXSDK_CORE_SYNC_CLOCK_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxclock.h
+#ifndef _FBXSDK_CORE_SYNC_CLOCK_H_
+#define _FBXSDK_CORE_SYNC_CLOCK_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#ifndef FBXSDK_ENV_WINSTORE
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Put the current thread to sleep.
+  * \param pMilliseconds The duration of the sleep in milli-seconds.
+  */
+FBXSDK_DLL void FbxSleep(int pMilliseconds);
+
+/** Retrieves the current value of the high-resolution performance counter.
+  * \return The current value of the high-resolution performance counter, in "counts".
+  * \remarks To convert "counts" into time, divide it by the frequency available from FbxGetHighResFrequency().
+  */
+FBXSDK_DLL FbxLongLong FbxGetHighResCounter();
+
+/** Retrieves the frequency of the high-resolution performance counter.
+  * \return The frequency of the high-resolution performance counter value, in "counts" per second.
+  * \remarks The first time this function is called, the frequency is queried from the system and then cached
+  * so that further requests are fast. This means it is guaranteed to not change during run-time.
+  */
+FBXSDK_DLL FbxLongLong FbxGetHighResFrequency();
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE */
+
+#endif /* _FBXSDK_CORE_SYNC_CLOCK_H_ */

+ 188 - 188
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxsync.h

@@ -1,188 +1,188 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxsync.h
-#ifndef _FBXSDK_CORE_SYNC_H_
-#define _FBXSDK_CORE_SYNC_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
-
-#include <fbxsdk/core/sync/fbxclock.h>
-#include <fbxsdk/core/sync/fbxthread.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxMutexImpl;
-class FbxSemaphoreImpl;
-class FbxGateImpl;
-
-/** A spinlock is the fastest and most simple thread lock mechanism available.
-  * It is very efficient since it does not use any operating system calls; it is only a test and set on an atomic variable,
-  * thus it is the fastest thread lock available. Spinlocks are efficient if threads are only likely to be blocked for a
-  * short period of time, as they avoid overhead from operating system process re-scheduling or context switching. However,
-  * spinlocks become wasteful if held for longer durations, both preventing other threads from running and requiring
-  * re-scheduling.
-  * \note Spinlocks does not support recursive locking. A thread attempting to lock the same spinlock twice will wait
-  * indefinitely.
-  */
-class FBXSDK_DLL FbxSpinLock
-{
-public:
-    FbxSpinLock();
-
-	/** Acquire the lock; thread will wait indefinitely until it is available. */
-    void Acquire();
-
-	/** Release the lock; this will allow other threads to acquire the lock if they are waiting. */
-    void Release();
-
-private:
-    FbxAtomic mSpinLock;
-};
-
-/** Mutually excluding thread lock mechanism.
-  *	While the mutex is a much heavier implementation than a spinlock, it supports recursive locking; the same thread
-  * can safely lock the same mutex more than once without blocking. But it will have to be released as many times as
-  * it as been acquired before other threads can acquire the context. It is sometimes referred as a critical section.
-  * This is the heaviest thread lock implementation, but also the most secure.
-  */
-class FBXSDK_DLL FbxMutex
-{
-public:
-	/** Constructor
-	  * \param pInitialOwnership If pInitialOwnership is true, the lock will be initialized as being locked by the
-	  * current thread.
-	  */
-	FbxMutex(bool pInitialOwnership=false);
-	virtual ~FbxMutex(); //!< Destructor
-
-	/** Acquire the lock; thread will wait indefinitely until it is available.
-	  * \remarks The same thread can acquire the lock multiple times without blocking.
-	  */
-	void Acquire();
-
-	/** Try acquiring the lock; thread will not wait if it is not available.
-	  * \param pRetryCount The number of retries in case the lock is not available.
-	  * \return True if the lock is acquired, false otherwise.
-	  * \remarks The same thread can acquire the lock multiple times without blocking.
-	  */
-	bool TryAcquire(unsigned int pRetryCount);
-
-	/** Release the lock; this will allow other threads to acquire the lock if they are waiting.
-	  * \remarks Only the owner thread should call Release(), and it needs to be released as many times as it was
-	  * acquired.
-	  */
-	void Release();
-
-private:
-	FbxMutexImpl* mImpl;
-};
-
-/** Mutually excluding thread waiting mechanism with a counter.
-  * Semaphore are generally used in situations when the current thread needs to wait for other threads before
-  * proceeding to the next step. In other words, that thread waits a number of signals from other threads. This
-  * is the best mechanism to use to synchronize threads since it doesn't require an heavy critical section.
-  */
-class FBXSDK_DLL FbxSemaphore
-{
-public:
-	FbxSemaphore(); //!< Constructor
-	virtual ~FbxSemaphore(); //!< Destructor
-
-	/** Wait indefinitely until the semaphore as been signaled as many times as specified.
-	  * \param pCount Number of signal to wait before this function returns.
-	  * \return True if the wait exit without errors.
-	  * \remarks If pCount is set to zero, this function returns immediately without waiting.
-	  */
-	bool Wait(unsigned int pCount=1);
-
-	/** Signal the semaphore as many times as specified.
-	  * \param pCount The number of signal to send to the semaphore.
-	  * \return True if the semaphore was signaled without errors.
-	  */
-	bool Signal(unsigned int pCount=1);
-
-private:
-	FbxSemaphoreImpl* mImpl;
-};
-
-/** A gate thread locking mechanism is very similar to a semaphore, except that when it is opened, any
-  * further call to wait will not wait until it is closed. It is generally used to block multiple threads
-  * until one of them open the gate to release them all.
-  */
-class FBXSDK_DLL FbxGate
-{
-public:
-    FbxGate(); //!< Constructor
-    virtual ~FbxGate(); //!< Destructor
-
-	/** Open the gate to release all threads waiting.
-	  * \remarks All waiting threads will unblock until the gate is closed.
-	  */
-    void Open();
-
-	/** Close the gate so that the next time a thread call Wait() it will be blocked. */
-    void Close();
-
-	/** Check if the gate is open.
-	  * \return True if the gate is open, otherwise false.
-	  */
-    bool IsOpen();
-
-	/** Wait indefinitely until the gate open.
-	  * \return True if the wait completed without errors.
-	  * \remarks If the gate is already open, this function returns immediately.
-	  */
-    bool Wait();
-
-private:
-	FbxGateImpl* mImpl;
-};
-
-/** A simple stack of linked items that is multi-thread safe, protected by a spinlock.
-  */
-class FBXSDK_DLL FbxSyncStack
-{
-public:
-	//! A single link item to be used to construct the stack
-	struct Item
-	{
-		Item* mNext;
-		inline Item(){ mNext = NULL; }
-		inline Item* Set(Item* pNext){ return mNext = pNext; }
-		inline Item* Next(){ return mNext; }
-	};
-
-	//! Constructor
-	FbxSyncStack();
-
-	/** Add an item on the top of the stack.
-	  * \param pItem The item to add on top of the stack.
-	  */
-	void Push(Item* pItem);
-
-	/** Remove the item on the top of the stack.
-	  * \return Returns the item on top of the stack, otherwise NULL if stack empty.
-	  */
-	Item* Pop();
-
-private:
-	FbxSpinLock	mLock;
-	Item*		mTop;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
-
-#endif /* _FBXSDK_CORE_SYNC_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxsync.h
+#ifndef _FBXSDK_CORE_SYNC_H_
+#define _FBXSDK_CORE_SYNC_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
+
+#include <fbxsdk/core/sync/fbxclock.h>
+#include <fbxsdk/core/sync/fbxthread.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxMutexImpl;
+class FbxSemaphoreImpl;
+class FbxGateImpl;
+
+/** A spinlock is the fastest and most simple thread lock mechanism available.
+  * It is very efficient since it does not use any operating system calls; it is only a test and set on an atomic variable,
+  * thus it is the fastest thread lock available. Spinlocks are efficient if threads are only likely to be blocked for a
+  * short period of time, as they avoid overhead from operating system process re-scheduling or context switching. However,
+  * spinlocks become wasteful if held for longer durations, both preventing other threads from running and requiring
+  * re-scheduling.
+  * \note Spinlocks does not support recursive locking. A thread attempting to lock the same spinlock twice will wait
+  * indefinitely.
+  */
+class FBXSDK_DLL FbxSpinLock
+{
+public:
+    FbxSpinLock();
+
+	/** Acquire the lock; thread will wait indefinitely until it is available. */
+    void Acquire();
+
+	/** Release the lock; this will allow other threads to acquire the lock if they are waiting. */
+    void Release();
+
+private:
+    FbxAtomic mSpinLock;
+};
+
+/** Mutually excluding thread lock mechanism.
+  *	While the mutex is a much heavier implementation than a spinlock, it supports recursive locking; the same thread
+  * can safely lock the same mutex more than once without blocking. But it will have to be released as many times as
+  * it as been acquired before other threads can acquire the context. It is sometimes referred as a critical section.
+  * This is the heaviest thread lock implementation, but also the most secure.
+  */
+class FBXSDK_DLL FbxMutex
+{
+public:
+	/** Constructor
+	  * \param pInitialOwnership If pInitialOwnership is true, the lock will be initialized as being locked by the
+	  * current thread.
+	  */
+	FbxMutex(bool pInitialOwnership=false);
+	virtual ~FbxMutex(); //!< Destructor
+
+	/** Acquire the lock; thread will wait indefinitely until it is available.
+	  * \remarks The same thread can acquire the lock multiple times without blocking.
+	  */
+	void Acquire();
+
+	/** Try acquiring the lock; thread will not wait if it is not available.
+	  * \param pRetryCount The number of retries in case the lock is not available.
+	  * \return True if the lock is acquired, false otherwise.
+	  * \remarks The same thread can acquire the lock multiple times without blocking.
+	  */
+	bool TryAcquire(unsigned int pRetryCount);
+
+	/** Release the lock; this will allow other threads to acquire the lock if they are waiting.
+	  * \remarks Only the owner thread should call Release(), and it needs to be released as many times as it was
+	  * acquired.
+	  */
+	void Release();
+
+private:
+	FbxMutexImpl* mImpl;
+};
+
+/** Mutually excluding thread waiting mechanism with a counter.
+  * Semaphore are generally used in situations when the current thread needs to wait for other threads before
+  * proceeding to the next step. In other words, that thread waits a number of signals from other threads. This
+  * is the best mechanism to use to synchronize threads since it doesn't require an heavy critical section.
+  */
+class FBXSDK_DLL FbxSemaphore
+{
+public:
+	FbxSemaphore(); //!< Constructor
+	virtual ~FbxSemaphore(); //!< Destructor
+
+	/** Wait indefinitely until the semaphore as been signaled as many times as specified.
+	  * \param pCount Number of signal to wait before this function returns.
+	  * \return True if the wait exit without errors.
+	  * \remarks If pCount is set to zero, this function returns immediately without waiting.
+	  */
+	bool Wait(unsigned int pCount=1);
+
+	/** Signal the semaphore as many times as specified.
+	  * \param pCount The number of signal to send to the semaphore.
+	  * \return True if the semaphore was signaled without errors.
+	  */
+	bool Signal(unsigned int pCount=1);
+
+private:
+	FbxSemaphoreImpl* mImpl;
+};
+
+/** A gate thread locking mechanism is very similar to a semaphore, except that when it is opened, any
+  * further call to wait will not wait until it is closed. It is generally used to block multiple threads
+  * until one of them open the gate to release them all.
+  */
+class FBXSDK_DLL FbxGate
+{
+public:
+    FbxGate(); //!< Constructor
+    virtual ~FbxGate(); //!< Destructor
+
+	/** Open the gate to release all threads waiting.
+	  * \remarks All waiting threads will unblock until the gate is closed.
+	  */
+    void Open();
+
+	/** Close the gate so that the next time a thread call Wait() it will be blocked. */
+    void Close();
+
+	/** Check if the gate is open.
+	  * \return True if the gate is open, otherwise false.
+	  */
+    bool IsOpen();
+
+	/** Wait indefinitely until the gate open.
+	  * \return True if the wait completed without errors.
+	  * \remarks If the gate is already open, this function returns immediately.
+	  */
+    bool Wait();
+
+private:
+	FbxGateImpl* mImpl;
+};
+
+/** A simple stack of linked items that is multi-thread safe, protected by a spinlock.
+  */
+class FBXSDK_DLL FbxSyncStack
+{
+public:
+	//! A single link item to be used to construct the stack
+	struct Item
+	{
+		Item* mNext;
+		inline Item(){ mNext = NULL; }
+		inline Item* Set(Item* pNext){ return mNext = pNext; }
+		inline Item* Next(){ return mNext; }
+	};
+
+	//! Constructor
+	FbxSyncStack();
+
+	/** Add an item on the top of the stack.
+	  * \param pItem The item to add on top of the stack.
+	  */
+	void Push(Item* pItem);
+
+	/** Remove the item on the top of the stack.
+	  * \return Returns the item on top of the stack, otherwise NULL if stack empty.
+	  */
+	Item* Pop();
+
+private:
+	FbxSpinLock	mLock;
+	Item*		mTop;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
+
+#endif /* _FBXSDK_CORE_SYNC_H_ */

+ 99 - 99
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/core/sync/fbxthread.h

@@ -1,99 +1,99 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxthread.h
-#ifndef _FBXSDK_CORE_SYNC_THREAD_H_
-#define _FBXSDK_CORE_SYNC_THREAD_H_
-
-#include <fbxsdk/fbxsdk_def.h>
-
-#if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-class FbxThreadImpl;
-
-//! Definition of a thread procedure function signature.
-typedef void (*FbxThreadProc)(void*);
-
-/** This class implement a standard way to use threads across platforms.
-  */
-class FBXSDK_DLL FbxThread
-{
-public:
-	enum EState {eUnknown, eRunning, eDead};
-	enum EPriority {eNone, eIdle, eLowest, eLow, eNormal, eHigh, eHighest, eRealTime};
-
-	/** Constructor
-	  * \param pProc The procedure called upon thread startup.
-	  * \param pArg The arguments passed to the procedure.
-	  * \param pSuspend Start the thread suspended.
-	  */
-	FbxThread(FbxThreadProc pProc, void* pArg, bool pSuspend=false);
-
-	/** Constructor
-	  * \param pProc The procedure called upon thread startup.
-	  * \param pArg The arguments passed to the procedure.
-	  * \param pPriority The thread priority to set upon creation.
-	  * \param pSuspend Start the thread suspended.
-	  */
-	FbxThread(FbxThreadProc pProc, void* pArg, EPriority pPriority, bool pSuspend=false);
-
-	//! Destructor
-	virtual ~FbxThread();
-
-	/** Suspend the execution of the thread.
-	  * \return Return true if the thread was successfully suspended, otherwise false.
-	  * \remarks It should be used only if you can control where the thread will be suspended in its procedure,
-	  * otherwise the state of the thread and its memory is unknown, since the code will stop anywhere.
-	  */
-	bool Suspend();
-
-	/** Resume the execution of the thread.
-	  * \return Return true if the thread was successfully resumed, otherwise false.
-	  */
-	bool Resume();
-
-	/** Wait for the thread completion.
-	  * \return True if the thread successfully returned from its procedure.
-	  */
-	bool Join();
-
-	/** Do not wait for the thread completion and terminate it.
-	  * \return True if the thread successfully died.
-	  */
-	bool Kill();
-
-	/** Retrieve the priority of the thread.
-	  * \return The thread's priority.
-	  */
-	EPriority GetPriority();
-
-	/** Set the thread priority.
-	  * \param pPriority The priority to set to this thread.
-	  * \return True if the thread priority was successfully changed.
-	  */
-	bool SetPriority(EPriority pPriority);
-
-	/** Retrieve the thread current state.
-	  * \return The state of the thread.
-	  */
-	EState GetState();
-
-private:
-	FbxThreadImpl* mImpl;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
-
-#endif /* _FBXSDK_CORE_SYNC_THREAD_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxthread.h
+#ifndef _FBXSDK_CORE_SYNC_THREAD_H_
+#define _FBXSDK_CORE_SYNC_THREAD_H_
+
+#include <fbxsdk/fbxsdk_def.h>
+
+#if !defined(FBXSDK_ENV_WINSTORE) && !defined(FBXSDK_ENV_EMSCRIPTEN)
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+class FbxThreadImpl;
+
+//! Definition of a thread procedure function signature.
+typedef void (*FbxThreadProc)(void*);
+
+/** This class implement a standard way to use threads across platforms.
+  */
+class FBXSDK_DLL FbxThread
+{
+public:
+	enum EState {eUnknown, eRunning, eDead};
+	enum EPriority {eNone, eIdle, eLowest, eLow, eNormal, eHigh, eHighest, eRealTime};
+
+	/** Constructor
+	  * \param pProc The procedure called upon thread startup.
+	  * \param pArg The arguments passed to the procedure.
+	  * \param pSuspend Start the thread suspended.
+	  */
+	FbxThread(FbxThreadProc pProc, void* pArg, bool pSuspend=false);
+
+	/** Constructor
+	  * \param pProc The procedure called upon thread startup.
+	  * \param pArg The arguments passed to the procedure.
+	  * \param pPriority The thread priority to set upon creation.
+	  * \param pSuspend Start the thread suspended.
+	  */
+	FbxThread(FbxThreadProc pProc, void* pArg, EPriority pPriority, bool pSuspend=false);
+
+	//! Destructor
+	virtual ~FbxThread();
+
+	/** Suspend the execution of the thread.
+	  * \return Return true if the thread was successfully suspended, otherwise false.
+	  * \remarks It should be used only if you can control where the thread will be suspended in its procedure,
+	  * otherwise the state of the thread and its memory is unknown, since the code will stop anywhere.
+	  */
+	bool Suspend();
+
+	/** Resume the execution of the thread.
+	  * \return Return true if the thread was successfully resumed, otherwise false.
+	  */
+	bool Resume();
+
+	/** Wait for the thread completion.
+	  * \return True if the thread successfully returned from its procedure.
+	  */
+	bool Join();
+
+	/** Do not wait for the thread completion and terminate it.
+	  * \return True if the thread successfully died.
+	  */
+	bool Kill();
+
+	/** Retrieve the priority of the thread.
+	  * \return The thread's priority.
+	  */
+	EPriority GetPriority();
+
+	/** Set the thread priority.
+	  * \param pPriority The priority to set to this thread.
+	  * \return True if the thread priority was successfully changed.
+	  */
+	bool SetPriority(EPriority pPriority);
+
+	/** Retrieve the thread current state.
+	  * \return The state of the thread.
+	  */
+	EState GetState();
+
+private:
+	FbxThreadImpl* mImpl;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* !FBXSDK_ENV_WINSTORE && !FBXSDK_ENV_EMSCRIPTEN */
+
+#endif /* _FBXSDK_CORE_SYNC_THREAD_H_ */

+ 55 - 55
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_def.h

@@ -1,55 +1,55 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxsdk_def.h
-  * FBX SDK environment definition.
-  *
-  * This file is the principal FBX SDK environment definition. It is used at the top of
-  * every header and source file so that every unit is using the same definitions.
-  */
-#ifndef _FBXSDK_DEFINITION_H_
-#define _FBXSDK_DEFINITION_H_
-
-//---------------------------------------------------------------------------------------
-//System Includes
-#include <stdlib.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-#include <wchar.h>
-#include <locale.h>
-#include <float.h>
-#include <math.h>
-#include <time.h>
-
-//---------------------------------------------------------------------------------------
-//Define Version and Namespace
-#include <fbxsdk/fbxsdk_version.h>
-
-//---------------------------------------------------------------------------------------
-//Define Architecture
-#include <fbxsdk/core/arch/fbxarch.h>
-#include <fbxsdk/core/arch/fbxtypes.h>
-#include <fbxsdk/core/arch/fbxdebug.h>
-#include <fbxsdk/core/arch/fbxalloc.h>
-#include <fbxsdk/core/arch/fbxnew.h>
-#include <fbxsdk/core/arch/fbxstdcompliant.h>
-
-//---------------------------------------------------------------------------------------
-//Useful Macros
-#define FBX_SAFE_DELETE(p)			{FbxDelete(p);(p)=NULL;}
-#define FBX_SAFE_DELETE_ARRAY(a)	{FbxDeleteArray(a);(a)=NULL;}
-#define FBX_SAFE_DESTROY(p)			if(p){(p)->Destroy();(p)=NULL;}
-#define FBX_SAFE_FREE(p)			if(p){FbxFree(p);(p)=NULL;}
-
-#endif /* _FBXSDK_DEFINITION_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxsdk_def.h
+  * FBX SDK environment definition.
+  *
+  * This file is the principal FBX SDK environment definition. It is used at the top of
+  * every header and source file so that every unit is using the same definitions.
+  */
+#ifndef _FBXSDK_DEFINITION_H_
+#define _FBXSDK_DEFINITION_H_
+
+//---------------------------------------------------------------------------------------
+//System Includes
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <wchar.h>
+#include <locale.h>
+#include <float.h>
+#include <math.h>
+#include <time.h>
+
+//---------------------------------------------------------------------------------------
+//Define Version and Namespace
+#include <fbxsdk/fbxsdk_version.h>
+
+//---------------------------------------------------------------------------------------
+//Define Architecture
+#include <fbxsdk/core/arch/fbxarch.h>
+#include <fbxsdk/core/arch/fbxtypes.h>
+#include <fbxsdk/core/arch/fbxdebug.h>
+#include <fbxsdk/core/arch/fbxalloc.h>
+#include <fbxsdk/core/arch/fbxnew.h>
+#include <fbxsdk/core/arch/fbxstdcompliant.h>
+
+//---------------------------------------------------------------------------------------
+//Useful Macros
+#define FBX_SAFE_DELETE(p)			{FbxDelete(p);(p)=NULL;}
+#define FBX_SAFE_DELETE_ARRAY(a)	{FbxDeleteArray(a);(a)=NULL;}
+#define FBX_SAFE_DESTROY(p)			if(p){(p)->Destroy();(p)=NULL;}
+#define FBX_SAFE_FREE(p)			if(p){FbxFree(p);(p)=NULL;}
+
+#endif /* _FBXSDK_DEFINITION_H_ */

+ 17 - 17
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_nsbegin.h

@@ -1,17 +1,17 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxsdk_nsbegin.h
-#include <fbxsdk/fbxsdk_version.h>
-
-#if FBXSDK_DEFINE_NAMESPACE == 1
-	namespace FBXSDK_NAMESPACE {
-#endif
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxsdk_nsbegin.h
+#include <fbxsdk/fbxsdk_version.h>
+
+#if FBXSDK_DEFINE_NAMESPACE == 1
+	namespace FBXSDK_NAMESPACE {
+#endif

+ 16 - 16
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_nsend.h

@@ -1,16 +1,16 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxsdk_nsend.h
-
-#if FBXSDK_DEFINE_NAMESPACE == 1
-	}
-#endif
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxsdk_nsend.h
+
+#if FBXSDK_DEFINE_NAMESPACE == 1
+	}
+#endif

+ 62 - 62
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fbxsdk_version.h

@@ -1,62 +1,62 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-/** \file fbxsdk_version.h
-  * FBX SDK version definition.
-  *
-  * This file defines the version string and numbers for this release of the FBX SDK.
-  * \note This file should never be included directly, please include fbxsdk_def.h
-  * instead.
-  */
-#ifndef _FBXSDK_VERSION_H_
-#define _FBXSDK_VERSION_H_
-
-//FBX SDK version defines
-#define FBXSDK_VERSION_MAJOR	2016		//<! Integer, version major number
-#define FBXSDK_VERSION_MINOR	0			//<! Integer, version minor number
-#define FBXSDK_VERSION_POINT	0			//<! Integer, version point number
-#define FBXSDK_VERSION_NAME		"Release"	//<! String, version name, example: Alpha, Beta, RC, Release
-
-#define FBXSDK_VERSION_YEAR     2015		//<! Integer, release date year
-#define FBXSDK_VERSION_MONTH	01			//<! Integer, release date month
-#define FBXSDK_VERSION_DAY		19			//<! Integer, release date day
-
-#ifndef FBXSDK_VERSION_REVISION
-	#define FBXSDK_VERSION_REVISION	0		//<! Integer, version revision number, set by build environment. Do not edit here!
-#endif
-
-//FBX SDK version string macros
-#define FBX_STRING(x)		#x
-#define FBX_STRINGIFY(x)	FBX_STRING(x)
-
-#if FBXSDK_VERSION_POINT == 0
-	#define FBXSDK_VER_TO_STR(a, b, c)	FBX_STRING(a.b)
-#else
-	#define FBXSDK_VER_TO_STR(a, b, c)	FBX_STRING(a.b.c)
-#endif
-
-//FBX SDK version strings
-#define FBXSDK_VERSION_STRING		FBXSDK_VER_TO_STR(FBXSDK_VERSION_MAJOR, FBXSDK_VERSION_MINOR, FBXSDK_VERSION_POINT)
-#define FBXSDK_VERSION_STRING_FULL	FBXSDK_VERSION_STRING " " FBXSDK_VERSION_NAME " (" FBX_STRINGIFY(FBXSDK_VERSION_REVISION) ")"
-#define FBXSDK_VERSION_DATE			FBX_STRINGIFY(FBXSDK_VERSION_YEAR) "" FBX_STRINGIFY(FBXSDK_VERSION_MONTH) "" FBX_STRINGIFY(FBXSDK_VERSION_DAY)
-
-//FBX SDK namespace definition
-#ifndef FBXSDK_DEFINE_NAMESPACE
-	#define FBXSDK_DEFINE_NAMESPACE 1
-#endif
-
-#if FBXSDK_DEFINE_NAMESPACE == 1
-	#define FBXSDK_NAMESPACE fbxsdk
-#else
-	#define FBXSDK_NAMESPACE
-#endif
-
-#endif /* _FBXSDK_VERSION_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+/** \file fbxsdk_version.h
+  * FBX SDK version definition.
+  *
+  * This file defines the version string and numbers for this release of the FBX SDK.
+  * \note This file should never be included directly, please include fbxsdk_def.h
+  * instead.
+  */
+#ifndef _FBXSDK_VERSION_H_
+#define _FBXSDK_VERSION_H_
+
+//FBX SDK version defines
+#define FBXSDK_VERSION_MAJOR	2016		//<! Integer, version major number
+#define FBXSDK_VERSION_MINOR	1			//<! Integer, version minor number
+#define FBXSDK_VERSION_POINT	0			//<! Integer, version point number
+#define FBXSDK_VERSION_NAME		"Release"	//<! String, version name, example: Alpha, Beta, RC, Release
+
+#define FBXSDK_VERSION_YEAR     2015		//<! Integer, release date year
+#define FBXSDK_VERSION_MONTH	06			//<! Integer, release date month
+#define FBXSDK_VERSION_DAY		30			//<! Integer, release date day
+
+#ifndef FBXSDK_VERSION_REVISION
+	#define FBXSDK_VERSION_REVISION	0		//<! Integer, version revision number, set by build environment. Do not edit here!
+#endif
+
+//FBX SDK version string macros
+#define FBX_STRING(x)		#x
+#define FBX_STRINGIFY(x)	FBX_STRING(x)
+
+#if FBXSDK_VERSION_POINT == 0
+	#define FBXSDK_VER_TO_STR(a, b, c)	FBX_STRING(a.b)
+#else
+	#define FBXSDK_VER_TO_STR(a, b, c)	FBX_STRING(a.b.c)
+#endif
+
+//FBX SDK version strings
+#define FBXSDK_VERSION_STRING		FBXSDK_VER_TO_STR(FBXSDK_VERSION_MAJOR, FBXSDK_VERSION_MINOR, FBXSDK_VERSION_POINT)
+#define FBXSDK_VERSION_STRING_FULL	FBXSDK_VERSION_STRING " " FBXSDK_VERSION_NAME " (" FBX_STRINGIFY(FBXSDK_VERSION_REVISION) ")"
+#define FBXSDK_VERSION_DATE			FBX_STRINGIFY(FBXSDK_VERSION_YEAR) "" FBX_STRINGIFY(FBXSDK_VERSION_MONTH) "" FBX_STRINGIFY(FBXSDK_VERSION_DAY)
+
+//FBX SDK namespace definition
+#ifndef FBXSDK_DEFINE_NAMESPACE
+	#define FBXSDK_DEFINE_NAMESPACE 1
+#endif
+
+#if FBXSDK_DEFINE_NAMESPACE == 1
+	#define FBXSDK_NAMESPACE fbxsdk
+#else
+	#define FBXSDK_NAMESPACE
+#endif
+
+#endif /* _FBXSDK_VERSION_H_ */

+ 90 - 90
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladaanimationelement.h

@@ -1,90 +1,90 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcolladaanimationelement.h
-#ifndef _FBXSDK_FILEIO_COLLADA_ANIMATION_ELEMENT_H_
-#define _FBXSDK_FILEIO_COLLADA_ANIMATION_ELEMENT_H_
-
-#include <fbxsdk.h>
-
-#include <fbxsdk/fileio/collada/fbxcolladaelement.h>
-
-#include <map>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Representing a COLLADA animation element.
-  */
-class AnimationElement : public ElementBase
-{
-public:
-    typedef ElementBase base_type;
-
-    AnimationElement();
-    virtual ~AnimationElement();
-
-    /** Get the count of animation channels in the element.
-      * \return Return the channel count.
-      */
-    int GetChannelCount() const;
-
-    /** Initialize with the content of a COLLADA element.
-      * This method should be called before ToFBX.
-      */
-    void FromCOLLADA(xmlNode * pElement, const SourceElementMapType & pSourceElements);
-
-    /** Initialize with an animation curve.
-      * This method should be called before ToCOLLADA.
-      * \param pCurve The specific animation curve.
-      * \param pUnitConversion The unit conversion for key value.
-      */
-    void FromFBX(const FbxAnimCurve * pCurve, double pUnitConversion = 1.0);
-
-    /** Copy the channel with specific index to the FBX animation curve.
-      * \param pFBXCurve The destination FBX animation curve.
-      * \param pChannelIndex The index of the source channel.
-      * \param pUnitConversion The unit conversion from local element to global.
-      */
-    void ToFBX(FbxAnimCurve * pFBXCurve, int pChannelIndex,
-        double pUnitConversion = 1.0) const;
-
-    /** Copy the matrix animation to the FBX node TRS properties.
-      * \param pFBXNode The destination FBX node.
-      * \param pAnimLayer The animation layer whose X, Y and Z curves will be set up.
-      * \param pUnitConversion The unit conversion from local element to global.
-      */
-    void ToFBX(FbxNode * pFBXNode, FbxAnimLayer * pAnimLayer,
-        double pUnitConversion = 1.0) const;
-
-    /** Add the content to COLLADA animation library.
-      * \param pAnimationLibrary The COLLADA animation library element.
-      * \param pNodeID The ID of the element to who this curve is belong.
-      * \param pAttributeSID The ID the attribute to who this curve is belong.
-      */
-    void ToCOLLADA(xmlNode * pAnimationLibrary, const char * pNodeID,
-        const char * pAttributeSID);
-
-private:
-    int mKeyCount;
-    double * mInputArray;
-    double * mOutputArray;
-    int mOutputStride;
-    FbxString * mInterpolationArray;
-    int mInterpolationStride;
-    double * mInTangentArray;
-    int mInTangentStride;
-    double * mOutTangentArray;
-    int mOutTangentStride;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_FILEIO_COLLADA_ANIMATION_ELEMENT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcolladaanimationelement.h
+#ifndef _FBXSDK_FILEIO_COLLADA_ANIMATION_ELEMENT_H_
+#define _FBXSDK_FILEIO_COLLADA_ANIMATION_ELEMENT_H_
+
+#include <fbxsdk.h>
+
+#include <fbxsdk/fileio/collada/fbxcolladaelement.h>
+
+#include <map>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Representing a COLLADA animation element.
+  */
+class AnimationElement : public ElementBase
+{
+public:
+    typedef ElementBase base_type;
+
+    AnimationElement();
+    virtual ~AnimationElement();
+
+    /** Get the count of animation channels in the element.
+      * \return Return the channel count.
+      */
+    int GetChannelCount() const;
+
+    /** Initialize with the content of a COLLADA element.
+      * This method should be called before ToFBX.
+      */
+    void FromCOLLADA(xmlNode * pElement, const SourceElementMapType & pSourceElements);
+
+    /** Initialize with an animation curve.
+      * This method should be called before ToCOLLADA.
+      * \param pCurve The specific animation curve.
+      * \param pUnitConversion The unit conversion for key value.
+      */
+    void FromFBX(const FbxAnimCurve * pCurve, double pUnitConversion = 1.0);
+
+    /** Copy the channel with specific index to the FBX animation curve.
+      * \param pFBXCurve The destination FBX animation curve.
+      * \param pChannelIndex The index of the source channel.
+      * \param pUnitConversion The unit conversion from local element to global.
+      */
+    void ToFBX(FbxAnimCurve * pFBXCurve, int pChannelIndex,
+        double pUnitConversion = 1.0) const;
+
+    /** Copy the matrix animation to the FBX node TRS properties.
+      * \param pFBXNode The destination FBX node.
+      * \param pAnimLayer The animation layer whose X, Y and Z curves will be set up.
+      * \param pUnitConversion The unit conversion from local element to global.
+      */
+    void ToFBX(FbxNode * pFBXNode, FbxAnimLayer * pAnimLayer,
+        double pUnitConversion = 1.0) const;
+
+    /** Add the content to COLLADA animation library.
+      * \param pAnimationLibrary The COLLADA animation library element.
+      * \param pNodeID The ID of the element to who this curve is belong.
+      * \param pAttributeSID The ID the attribute to who this curve is belong.
+      */
+    void ToCOLLADA(xmlNode * pAnimationLibrary, const char * pNodeID,
+        const char * pAttributeSID);
+
+private:
+    int mKeyCount;
+    double * mInputArray;
+    double * mOutputArray;
+    int mOutputStride;
+    FbxString * mInterpolationArray;
+    int mInterpolationStride;
+    double * mInTangentArray;
+    int mInTangentStride;
+    double * mOutTangentArray;
+    int mOutTangentStride;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_FILEIO_COLLADA_ANIMATION_ELEMENT_H_ */

+ 277 - 277
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladaelement.h

@@ -1,277 +1,277 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcolladaelement.h
-#ifndef _FBXSDK_FILEIO_COLLADA_ELEMENT_H_
-#define _FBXSDK_FILEIO_COLLADA_ELEMENT_H_
-
-#include <fbxsdk.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-// Utility functions to convert type to array tag used in COLLADA source element
-template <typename T>
-inline const FbxString TypeToArrayTag()
-{
-    return COLLADA_FLOAT_ARRAY_STRUCTURE;
-}
-
-template <>
-inline const FbxString TypeToArrayTag<bool>()
-{
-    return COLLADA_BOOL_ARRAY_STRUCTURE;
-}
-
-template <>
-inline const FbxString TypeToArrayTag<int>()
-{
-    return COLLADA_INT_ARRAY_STRUCTURE;
-}
-
-template <>
-inline const FbxString TypeToArrayTag<FbxString>()
-{
-    return COLLADA_NAME_ARRAY_STRUCTURE;
-}
-
-// Utility functions to convert type to parameter tag used in COLLADA source element
-template <typename T>
-inline const FbxString TypeToParameterTag()
-{
-    return COLLADA_FLOAT_TYPE;
-}
-
-template <>
-inline const FbxString TypeToParameterTag<bool>()
-{
-    return COLLADA_BOOL_TYPE;
-}
-
-template <>
-inline const FbxString TypeToParameterTag<int>()
-{
-    return COLLADA_INT_TYPE;
-}
-
-template <>
-inline const FbxString TypeToParameterTag<FbxString>()
-{
-    return COLLADA_NAME_TYPE;
-}
-
-//----------------------------------------------------------------------------//
-
-/** A struct for convenient access to the content of common COLLADA element.
-  */
-struct ElementContentAccessor
-{
-    ElementContentAccessor();
-    ElementContentAccessor(xmlNode * pElement);
-    virtual ~ElementContentAccessor();
-
-    template <typename TYPE>
-    bool GetNext(TYPE * pData)
-    {
-        return FromString(pData, mPointer, &mPointer);
-    }
-
-    template <typename TYPE>
-    int GetArray(TYPE * pArray,
-        int pSourceUnitOffset = 0, int pSourceUnitValidCount = 1, int pSourceUnitSize = 1,
-        int pDestUnitOffset = 0, int pDestUnitValidCount = 1, int pDestUnitSize = 1,
-        TYPE pDefaultValue = TYPE())
-    {
-        if (pArray)
-        {
-            return FromStringToArray(mPointer, pArray,
-                pSourceUnitOffset, pSourceUnitValidCount, pSourceUnitSize,
-                pDestUnitOffset, pDestUnitValidCount, pDestUnitSize, pDefaultValue);
-        }
-        return 0;
-    }
-
-    xmlChar * mContent;
-    const char * mPointer;
-};
-
-//----------------------------------------------------------------------------//
-
-/** A struct for convenient access to the content of COLLADA source element.
-  */
-template <typename TYPE>
-struct SourceElementContentAccessor : public ElementContentAccessor
-{
-    SourceElementContentAccessor(xmlNode * pSourceElement)
-        : mCount(0), mStride(1), mOffset(0)
-    {
-        bool lReadCount = true;
-        xmlNode* lTechniqueElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_TECHNIQUE_COMMON_ELEMENT);
-        if (lTechniqueElement)
-        {
-            xmlNode* lAccessorElement = DAE_FindChildElementByTag(lTechniqueElement, COLLADA_ACCESSOR_STRUCTURE);
-            FBX_ASSERT(lAccessorElement);
-            if (!lAccessorElement)
-                return;
-
-            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_COUNT_PROPERTY, mCount);
-            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_STRIDE_PROPERTY, mStride);
-            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_OFFSET_PROPERTY, mOffset);
-            lReadCount = false;
-        }
-
-        xmlNode * lDataArrayElement = DAE_FindChildElementByTag(pSourceElement,
-            TypeToArrayTag<TYPE>());
-        // Some COLLADA exporters use IDREF_array instead of Name_array
-        if (!lDataArrayElement && TypeToArrayTag<TYPE>() == COLLADA_NAME_ARRAY_STRUCTURE)
-            lDataArrayElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_IDREF_ARRAY_STRUCTURE);
-        FBX_ASSERT(lDataArrayElement);
-
-        if (lDataArrayElement && lReadCount)
-            DAE_GetElementAttributeValue(lDataArrayElement, COLLADA_COUNT_PROPERTY, mCount);
-
-        mContent = xmlNodeGetContent(lDataArrayElement);
-        mPointer = (const char *)mContent;
-    }
-
-    int mCount;
-    int mStride;
-    int mOffset;
-};
-
-//----------------------------------------------------------------------------//
-
-/** Representing a common COLLADA element.
-  */
-class ElementBase
-{
-public:
-    enum
-    {
-        MATRIX_STRIDE = 16,
-    };
-
-    // The name of user property in FBX which is used to preserve the ID of COLLADA element
-    static const char* smID_PROPERTY_NAME;    
-
-    /** Constructor & Destructor.
-      */
-    ElementBase();
-    virtual ~ElementBase();
-
-    /** Access for XML element.
-      */
-    void SetXMLElement(xmlNode * pElement) { mXMLElement = pElement; }
-    xmlNode * GetXMLElement() const { return mXMLElement; }
-
-    /** Get the ID of the element.
-      * \return Return the ID string.
-      */
-    const FbxString & GetID() const;
-
-    /** Get the unit of the element,
-      * which takes effect in this element and its children elements.
-      * \return Return the unit.
-      */
-    const FbxSystemUnit * GetUnit() const;
-
-private:
-    xmlNode * mXMLElement;
-    mutable FbxString * mID;
-    mutable FbxSystemUnit * mUnit;
-};
-
-/** Convert from ID to URL, just add a prefix "#".
-  * \param pID The ID string.
-  * \return Return the URL string.
-  */
-inline const FbxString URL(const FbxString & pID)
-{
-    return FbxString("#") + pID;
-}
-
-/** Convert the array data to a source element under specific parent element.
-  * \param pParentElement The parent element.
-  * \param pID The ID of the new source element.
-  * \param pData The array data.
-  * \param pCount The length of the array.
-  * \param pStride The stride of each unit in the array. For example, when you
-  * export an array of FbxDouble3 of size 10, you convert it to a double array
-  * of size 30 with a stride 3 and call this method.
-  * \return The new source element.
-  */
-template <typename T>
-xmlNode * AddSourceElement(xmlNode * pParentElement, const char * pID,
-                           const T * pData, int pCount, int pStride = 1)
-{
-    FBX_ASSERT(pParentElement && pData);
-    if (!pParentElement || !pData)
-        return NULL;
-
-    xmlNode * lSourceElement = DAE_AddChildElement(pParentElement, COLLADA_SOURCE_STRUCTURE);
-    DAE_AddAttribute(lSourceElement, COLLADA_ID_PROPERTY, pID);
-
-    FbxString lContent;
-    const int lDataCount = pCount * pStride;
-    for (int lIndex = 0; lIndex < lDataCount; ++lIndex)
-    {
-        lContent += ToString(pData[lIndex]);
-        if (lIndex != lDataCount - 1)
-            lContent += " ";
-    }
-    const FbxString lArrayID = FbxString(pID) + "-array";
-    xmlNode * lArrayElement = DAE_AddChildElement(lSourceElement, TypeToArrayTag<T>(), lContent);
-    DAE_AddAttribute(lArrayElement, COLLADA_ID_PROPERTY, lArrayID);
-    DAE_AddAttribute(lArrayElement, COLLADA_COUNT_PROPERTY, lDataCount);
-
-    xmlNode * lTechniqueCommonElement = DAE_AddChildElement(lSourceElement,
-        COLLADA_TECHNIQUE_COMMON_ELEMENT);
-    xmlNode * lAccessElement = DAE_AddChildElement(lTechniqueCommonElement, 
-        COLLADA_ACCESSOR_STRUCTURE);
-    DAE_AddAttribute(lAccessElement, COLLADA_SOURCE_PROPERTY, URL(lArrayID));
-    DAE_AddAttribute(lAccessElement, COLLADA_COUNT_PROPERTY, pCount);
-    DAE_AddAttribute(lAccessElement, COLLADA_STRIDE_PROPERTY, pStride);
-
-    for (int lStrideIndex = 0; lStrideIndex < pStride; ++lStrideIndex)
-    {
-        xmlNode * lParamElement = DAE_AddChildElement(lAccessElement, COLLADA_PARAMETER_STRUCTURE);
-        DAE_AddAttribute(lParamElement, COLLADA_TYPE_PROPERTY, TypeToParameterTag<T>());
-    }
-
-    return lSourceElement;
-}
-
-/** Populate the layer element with direct array and return index array for later use.
-  * \param pLayerElement The layer element to be populated.
-  * \param pSourceElement The source element containing the direct array data.
-  * \param pSize The count of double data of direct array element.
-  * \return Return the index array of the layer element.
-  */
-template <typename TYPE> FbxLayerElementArray * PopulateLayerElementDirectArray(FbxLayerElement * pLayerElement, xmlNode * pSourceElement, int pSize)
-{
-    SourceElementContentAccessor<TYPE> lSourceElementAccessor(pSourceElement);
-
-    FbxLayerElementTemplate<TYPE> * lLayerElement = (FbxLayerElementTemplate<TYPE> *)pLayerElement;
-    lLayerElement->SetMappingMode(FbxLayerElement::eByPolygonVertex);
-    lLayerElement->SetReferenceMode(FbxLayerElement::eIndexToDirect);
-    lLayerElement->GetDirectArray().SetCount(lSourceElementAccessor.mCount);
-
-    TYPE * lArray = NULL;
-    lArray = lLayerElement->GetDirectArray().GetLocked(lArray);
-    lSourceElementAccessor.GetArray((double *)lArray, 0, pSize,
-        lSourceElementAccessor.mStride, 0, pSize, sizeof(TYPE)/sizeof(double), 1.0);
-    lLayerElement->GetDirectArray().Release(&lArray, lArray);
-
-    return &(lLayerElement->GetIndexArray());
-}
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_FILEIO_COLLADA_ELEMENT_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcolladaelement.h
+#ifndef _FBXSDK_FILEIO_COLLADA_ELEMENT_H_
+#define _FBXSDK_FILEIO_COLLADA_ELEMENT_H_
+
+#include <fbxsdk.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+// Utility functions to convert type to array tag used in COLLADA source element
+template <typename T>
+inline const FbxString TypeToArrayTag()
+{
+    return COLLADA_FLOAT_ARRAY_STRUCTURE;
+}
+
+template <>
+inline const FbxString TypeToArrayTag<bool>()
+{
+    return COLLADA_BOOL_ARRAY_STRUCTURE;
+}
+
+template <>
+inline const FbxString TypeToArrayTag<int>()
+{
+    return COLLADA_INT_ARRAY_STRUCTURE;
+}
+
+template <>
+inline const FbxString TypeToArrayTag<FbxString>()
+{
+    return COLLADA_NAME_ARRAY_STRUCTURE;
+}
+
+// Utility functions to convert type to parameter tag used in COLLADA source element
+template <typename T>
+inline const FbxString TypeToParameterTag()
+{
+    return COLLADA_FLOAT_TYPE;
+}
+
+template <>
+inline const FbxString TypeToParameterTag<bool>()
+{
+    return COLLADA_BOOL_TYPE;
+}
+
+template <>
+inline const FbxString TypeToParameterTag<int>()
+{
+    return COLLADA_INT_TYPE;
+}
+
+template <>
+inline const FbxString TypeToParameterTag<FbxString>()
+{
+    return COLLADA_NAME_TYPE;
+}
+
+//----------------------------------------------------------------------------//
+
+/** A struct for convenient access to the content of common COLLADA element.
+  */
+struct ElementContentAccessor
+{
+    ElementContentAccessor();
+    ElementContentAccessor(xmlNode * pElement);
+    virtual ~ElementContentAccessor();
+
+    template <typename TYPE>
+    bool GetNext(TYPE * pData)
+    {
+        return FromString(pData, mPointer, &mPointer);
+    }
+
+    template <typename TYPE>
+    int GetArray(TYPE * pArray,
+        int pSourceUnitOffset = 0, int pSourceUnitValidCount = 1, int pSourceUnitSize = 1,
+        int pDestUnitOffset = 0, int pDestUnitValidCount = 1, int pDestUnitSize = 1,
+        TYPE pDefaultValue = TYPE())
+    {
+        if (pArray)
+        {
+            return FromStringToArray(mPointer, pArray,
+                pSourceUnitOffset, pSourceUnitValidCount, pSourceUnitSize,
+                pDestUnitOffset, pDestUnitValidCount, pDestUnitSize, pDefaultValue);
+        }
+        return 0;
+    }
+
+    xmlChar * mContent;
+    const char * mPointer;
+};
+
+//----------------------------------------------------------------------------//
+
+/** A struct for convenient access to the content of COLLADA source element.
+  */
+template <typename TYPE>
+struct SourceElementContentAccessor : public ElementContentAccessor
+{
+    SourceElementContentAccessor(xmlNode * pSourceElement)
+        : mCount(0), mStride(1), mOffset(0)
+    {
+        bool lReadCount = true;
+        xmlNode* lTechniqueElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_TECHNIQUE_COMMON_ELEMENT);
+        if (lTechniqueElement)
+        {
+            xmlNode* lAccessorElement = DAE_FindChildElementByTag(lTechniqueElement, COLLADA_ACCESSOR_STRUCTURE);
+            FBX_ASSERT(lAccessorElement);
+            if (!lAccessorElement)
+                return;
+
+            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_COUNT_PROPERTY, mCount);
+            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_STRIDE_PROPERTY, mStride);
+            DAE_GetElementAttributeValue(lAccessorElement, COLLADA_OFFSET_PROPERTY, mOffset);
+            lReadCount = false;
+        }
+
+        xmlNode * lDataArrayElement = DAE_FindChildElementByTag(pSourceElement,
+            TypeToArrayTag<TYPE>());
+        // Some COLLADA exporters use IDREF_array instead of Name_array
+        if (!lDataArrayElement && TypeToArrayTag<TYPE>() == COLLADA_NAME_ARRAY_STRUCTURE)
+            lDataArrayElement = DAE_FindChildElementByTag(pSourceElement, COLLADA_IDREF_ARRAY_STRUCTURE);
+        FBX_ASSERT(lDataArrayElement);
+
+        if (lDataArrayElement && lReadCount)
+            DAE_GetElementAttributeValue(lDataArrayElement, COLLADA_COUNT_PROPERTY, mCount);
+
+        mContent = xmlNodeGetContent(lDataArrayElement);
+        mPointer = (const char *)mContent;
+    }
+
+    int mCount;
+    int mStride;
+    int mOffset;
+};
+
+//----------------------------------------------------------------------------//
+
+/** Representing a common COLLADA element.
+  */
+class ElementBase
+{
+public:
+    enum
+    {
+        MATRIX_STRIDE = 16,
+    };
+
+    // The name of user property in FBX which is used to preserve the ID of COLLADA element
+    static const char* smID_PROPERTY_NAME;    
+
+    /** Constructor & Destructor.
+      */
+    ElementBase();
+    virtual ~ElementBase();
+
+    /** Access for XML element.
+      */
+    void SetXMLElement(xmlNode * pElement) { mXMLElement = pElement; }
+    xmlNode * GetXMLElement() const { return mXMLElement; }
+
+    /** Get the ID of the element.
+      * \return Return the ID string.
+      */
+    const FbxString & GetID() const;
+
+    /** Get the unit of the element,
+      * which takes effect in this element and its children elements.
+      * \return Return the unit.
+      */
+    const FbxSystemUnit * GetUnit() const;
+
+private:
+    xmlNode * mXMLElement;
+    mutable FbxString * mID;
+    mutable FbxSystemUnit * mUnit;
+};
+
+/** Convert from ID to URL, just add a prefix "#".
+  * \param pID The ID string.
+  * \return Return the URL string.
+  */
+inline const FbxString URL(const FbxString & pID)
+{
+    return FbxString("#") + pID;
+}
+
+/** Convert the array data to a source element under specific parent element.
+  * \param pParentElement The parent element.
+  * \param pID The ID of the new source element.
+  * \param pData The array data.
+  * \param pCount The length of the array.
+  * \param pStride The stride of each unit in the array. For example, when you
+  * export an array of FbxDouble3 of size 10, you convert it to a double array
+  * of size 30 with a stride 3 and call this method.
+  * \return The new source element.
+  */
+template <typename T>
+xmlNode * AddSourceElement(xmlNode * pParentElement, const char * pID,
+                           const T * pData, int pCount, int pStride = 1)
+{
+    FBX_ASSERT(pParentElement && pData);
+    if (!pParentElement || !pData)
+        return NULL;
+
+    xmlNode * lSourceElement = DAE_AddChildElement(pParentElement, COLLADA_SOURCE_STRUCTURE);
+    DAE_AddAttribute(lSourceElement, COLLADA_ID_PROPERTY, pID);
+
+    FbxString lContent;
+    const int lDataCount = pCount * pStride;
+    for (int lIndex = 0; lIndex < lDataCount; ++lIndex)
+    {
+        lContent += ToString(pData[lIndex]);
+        if (lIndex != lDataCount - 1)
+            lContent += " ";
+    }
+    const FbxString lArrayID = FbxString(pID) + "-array";
+    xmlNode * lArrayElement = DAE_AddChildElement(lSourceElement, TypeToArrayTag<T>(), lContent);
+    DAE_AddAttribute(lArrayElement, COLLADA_ID_PROPERTY, lArrayID);
+    DAE_AddAttribute(lArrayElement, COLLADA_COUNT_PROPERTY, lDataCount);
+
+    xmlNode * lTechniqueCommonElement = DAE_AddChildElement(lSourceElement,
+        COLLADA_TECHNIQUE_COMMON_ELEMENT);
+    xmlNode * lAccessElement = DAE_AddChildElement(lTechniqueCommonElement, 
+        COLLADA_ACCESSOR_STRUCTURE);
+    DAE_AddAttribute(lAccessElement, COLLADA_SOURCE_PROPERTY, URL(lArrayID));
+    DAE_AddAttribute(lAccessElement, COLLADA_COUNT_PROPERTY, pCount);
+    DAE_AddAttribute(lAccessElement, COLLADA_STRIDE_PROPERTY, pStride);
+
+    for (int lStrideIndex = 0; lStrideIndex < pStride; ++lStrideIndex)
+    {
+        xmlNode * lParamElement = DAE_AddChildElement(lAccessElement, COLLADA_PARAMETER_STRUCTURE);
+        DAE_AddAttribute(lParamElement, COLLADA_TYPE_PROPERTY, TypeToParameterTag<T>());
+    }
+
+    return lSourceElement;
+}
+
+/** Populate the layer element with direct array and return index array for later use.
+  * \param pLayerElement The layer element to be populated.
+  * \param pSourceElement The source element containing the direct array data.
+  * \param pSize The count of double data of direct array element.
+  * \return Return the index array of the layer element.
+  */
+template <typename TYPE> FbxLayerElementArray * PopulateLayerElementDirectArray(FbxLayerElement * pLayerElement, xmlNode * pSourceElement, int pSize)
+{
+    SourceElementContentAccessor<TYPE> lSourceElementAccessor(pSourceElement);
+
+    FbxLayerElementTemplate<TYPE> * lLayerElement = (FbxLayerElementTemplate<TYPE> *)pLayerElement;
+    lLayerElement->SetMappingMode(FbxLayerElement::eByPolygonVertex);
+    lLayerElement->SetReferenceMode(FbxLayerElement::eIndexToDirect);
+    lLayerElement->GetDirectArray().SetCount(lSourceElementAccessor.mCount);
+
+    TYPE * lArray = NULL;
+    lArray = lLayerElement->GetDirectArray().GetLocked(lArray);
+    lSourceElementAccessor.GetArray((double *)lArray, 0, pSize,
+        lSourceElementAccessor.mStride, 0, pSize, sizeof(TYPE)/sizeof(double), 1.0);
+    lLayerElement->GetDirectArray().Release(&lArray, lArray);
+
+    return &(lLayerElement->GetIndexArray());
+}
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_FILEIO_COLLADA_ELEMENT_H_ */

+ 127 - 127
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladaiostream.h

@@ -1,127 +1,127 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcolladaiostream.h
-#ifndef _FBXSDK_FILEIO_COLLADA_IO_STREAM_H_
-#define _FBXSDK_FILEIO_COLLADA_IO_STREAM_H_
-
-#include <fbxsdk.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-//----------------------------------------------------------------------------//
-
-/** Convert part of the source string into destination type.
-  * \param pDest The destination with a specific type.
-  * \param pSourceBegin The begin of the source string.
-  * \param pSourceEnd Return the end of the part of the source string.
-  * \return Return \c true on success and \c false if else.
-  */
-template <typename T> bool FromString(T * pDest, const char * pSourceBegin, const char ** pSourceEnd = NULL);
-template <> bool FromString(int * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(double * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxString * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxDouble2 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxDouble3 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxDouble4 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxVector4 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxAMatrix * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-template <> bool FromString(FbxAMatrix * pDest, const char * pSourceBegin, const char ** pSourceEnd);
-
-
-
-/** Parse the string into an array.
-  * The source string is made up with many groups and each group contains pSourceGroupSize units separated by spaces;
-  * The destination array is also made up with many groups and each unit contains pDestGroupSize units.
-  * The valid unit range in each source group is [pSourceUnitOffset, pSourceUnitOffset + pSourceValidUnitCount).
-  * The valid unit range in each destination unit is [pDestUnitOffset, pDestUnitOffset + pDestValidUnitCount).
-  * The units in invalid range of destination is set to a default value.
-  */
-template <typename TYPE> int FromStringToArray(const char * pString, TYPE * pArray, int pSourceUnitOffset, int pSourceValidUnitCount, int pSourceGroupSize, int pDestUnitOffset, int pDestValidUnitCount, int pDestGroupSize, TYPE pDefaultValue = TYPE())
-{
-    if (pString == 0 || pArray == 0)
-        return 0;
-
-    FBX_ASSERT(pSourceUnitOffset >= 0 && pSourceUnitOffset < pSourceGroupSize);
-    FBX_ASSERT(pSourceValidUnitCount >= 0 && pSourceUnitOffset + pSourceValidUnitCount <= pSourceGroupSize);
-    FBX_ASSERT(pDestUnitOffset >= 0 && pDestUnitOffset < pDestGroupSize);
-    FBX_ASSERT(pDestValidUnitCount >= 0 && pDestUnitOffset + pDestValidUnitCount <= pDestGroupSize);
-    const char * lSource = pString;
-    TYPE * lDest = pArray;
-
-    int lReadCount = 0;
-    int lSourceCounter = 0;
-    int lDestCounter = 0;
-    const int lSourceUnitValidEnd = pSourceUnitOffset + pSourceValidUnitCount;
-    const int lDestUnitGap = pDestGroupSize - pDestValidUnitCount - pDestUnitOffset;
-    while (lSource && *lSource)
-    {
-        TYPE lData;
-        const char * lSourceStart = lSource;
-        if (FromString(&lData, lSource, &lSource) && lSourceCounter >= pSourceUnitOffset && lSourceCounter < lSourceUnitValidEnd)
-        {
-            if (lDestCounter == 0)
-            {
-                for (int lIndex = 0; lIndex < pDestUnitOffset; ++lIndex)
-                    *(lDest++) = pDefaultValue;
-            }
-
-            *lDest++ = lData;
-            ++lReadCount;
-            ++lDestCounter;
-            if (lDestCounter == pDestValidUnitCount)
-            {
-                lDestCounter = 0;
-                for (int lIndex = 0; lIndex < lDestUnitGap; ++lIndex)
-                    *lDest++ = pDefaultValue;
-            }
-        }
-        else
-        {
-            // we met a stop condition of FromString. In the normal case, lSource should now be "" or ' '. If not,
-            // the converted string is corrupted and we have to break the loop. We can detect this by checking
-            // if lSource pointer has moved.
-            if (lSource == lSourceStart)
-            {
-                break;
-            }
-        }
-        ++lSourceCounter;
-        if (lSourceCounter == pSourceGroupSize)
-            lSourceCounter = 0;
-    }
-    return lReadCount;
-}
-
-//----------------------------------------------------------------------------//
-
-template <typename T>
-const FbxString ToString(const T & pValue)
-{
-    return FbxString(pValue);
-}
-template <>
-const FbxString ToString(const FbxVector4 & pValue);
-template <>
-const FbxString ToString(const FbxAMatrix & pValue);
-
-//----------------------------------------------------------------------------//
-
-/** Decode percent encoded characters, returns an empty string if there's an error.
-  * For example, a string like "abc%20abc" is converted into "abc abc".
-  * \param pEncodedString The percent encoded string.
-  * \return The decoded string.
-  */
-const FbxString DecodePercentEncoding(const FbxString & pEncodedString);
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_FILEIO_COLLADA_IO_STREAM_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcolladaiostream.h
+#ifndef _FBXSDK_FILEIO_COLLADA_IO_STREAM_H_
+#define _FBXSDK_FILEIO_COLLADA_IO_STREAM_H_
+
+#include <fbxsdk.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+//----------------------------------------------------------------------------//
+
+/** Convert part of the source string into destination type.
+  * \param pDest The destination with a specific type.
+  * \param pSourceBegin The begin of the source string.
+  * \param pSourceEnd Return the end of the part of the source string.
+  * \return Return \c true on success and \c false if else.
+  */
+template <typename T> bool FromString(T * pDest, const char * pSourceBegin, const char ** pSourceEnd = NULL);
+template <> bool FromString(int * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(double * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxString * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxDouble2 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxDouble3 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxDouble4 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxVector4 * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxAMatrix * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+template <> bool FromString(FbxAMatrix * pDest, const char * pSourceBegin, const char ** pSourceEnd);
+
+
+
+/** Parse the string into an array.
+  * The source string is made up with many groups and each group contains pSourceGroupSize units separated by spaces;
+  * The destination array is also made up with many groups and each unit contains pDestGroupSize units.
+  * The valid unit range in each source group is [pSourceUnitOffset, pSourceUnitOffset + pSourceValidUnitCount).
+  * The valid unit range in each destination unit is [pDestUnitOffset, pDestUnitOffset + pDestValidUnitCount).
+  * The units in invalid range of destination is set to a default value.
+  */
+template <typename TYPE> int FromStringToArray(const char * pString, TYPE * pArray, int pSourceUnitOffset, int pSourceValidUnitCount, int pSourceGroupSize, int pDestUnitOffset, int pDestValidUnitCount, int pDestGroupSize, TYPE pDefaultValue = TYPE())
+{
+    if (pString == 0 || pArray == 0)
+        return 0;
+
+    FBX_ASSERT(pSourceUnitOffset >= 0 && pSourceUnitOffset < pSourceGroupSize);
+    FBX_ASSERT(pSourceValidUnitCount >= 0 && pSourceUnitOffset + pSourceValidUnitCount <= pSourceGroupSize);
+    FBX_ASSERT(pDestUnitOffset >= 0 && pDestUnitOffset < pDestGroupSize);
+    FBX_ASSERT(pDestValidUnitCount >= 0 && pDestUnitOffset + pDestValidUnitCount <= pDestGroupSize);
+    const char * lSource = pString;
+    TYPE * lDest = pArray;
+
+    int lReadCount = 0;
+    int lSourceCounter = 0;
+    int lDestCounter = 0;
+    const int lSourceUnitValidEnd = pSourceUnitOffset + pSourceValidUnitCount;
+    const int lDestUnitGap = pDestGroupSize - pDestValidUnitCount - pDestUnitOffset;
+    while (lSource && *lSource)
+    {
+        TYPE lData;
+        const char * lSourceStart = lSource;
+        if (FromString(&lData, lSource, &lSource) && lSourceCounter >= pSourceUnitOffset && lSourceCounter < lSourceUnitValidEnd)
+        {
+            if (lDestCounter == 0)
+            {
+                for (int lIndex = 0; lIndex < pDestUnitOffset; ++lIndex)
+                    *(lDest++) = pDefaultValue;
+            }
+
+            *lDest++ = lData;
+            ++lReadCount;
+            ++lDestCounter;
+            if (lDestCounter == pDestValidUnitCount)
+            {
+                lDestCounter = 0;
+                for (int lIndex = 0; lIndex < lDestUnitGap; ++lIndex)
+                    *lDest++ = pDefaultValue;
+            }
+        }
+        else
+        {
+            // we met a stop condition of FromString. In the normal case, lSource should now be "" or ' '. If not,
+            // the converted string is corrupted and we have to break the loop. We can detect this by checking
+            // if lSource pointer has moved.
+            if (lSource == lSourceStart)
+            {
+                break;
+            }
+        }
+        ++lSourceCounter;
+        if (lSourceCounter == pSourceGroupSize)
+            lSourceCounter = 0;
+    }
+    return lReadCount;
+}
+
+//----------------------------------------------------------------------------//
+
+template <typename T>
+const FbxString ToString(const T & pValue)
+{
+    return FbxString(pValue);
+}
+template <>
+const FbxString ToString(const FbxVector4 & pValue);
+template <>
+const FbxString ToString(const FbxAMatrix & pValue);
+
+//----------------------------------------------------------------------------//
+
+/** Decode percent encoded characters, returns an empty string if there's an error.
+  * For example, a string like "abc%20abc" is converted into "abc abc".
+  * \param pEncodedString The percent encoded string.
+  * \return The decoded string.
+  */
+const FbxString DecodePercentEncoding(const FbxString & pEncodedString);
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_FILEIO_COLLADA_IO_STREAM_H_ */

+ 71 - 71
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladanamespace.h

@@ -1,71 +1,71 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcolladanamespace.h
-#ifndef _FBXSDK_FILEIO_COLLADA_NAMESPACE_H_
-#define _FBXSDK_FILEIO_COLLADA_NAMESPACE_H_
-
-#include <fbxsdk.h>
-
-#include <components/libxml2-2.7.8/include/libxml/globals.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-/** Containing the valid parameter definition and modification in local scope.
-  */
-struct FbxColladaNamespace
-{
-public:
-    /** Push the newparam and setparam elements found in this element.
-      * Call this method at the beginning of importing an element.
-      * \param pElement The specific element.
-      */
-    void Push(xmlNode * pElement);
-
-    /** Pop the newparam and setparam elements found in this element.
-      * Call this method at the end of importing an element.
-      */
-    void Pop();
-
-    /** Find the specific newparam element with given SID.
-      * \param pSID The given SID.
-      * \return Return the found element or NULL if fail.
-      */
-    xmlNode * FindParamDefinition(const char * pSID) const;
-
-    /** Find the specific setparam element with given SID.
-      * \param pSID The given SID.
-      * \return Return the found element or NULL if fail.
-      */
-    xmlNode * FindParamModification(const char * pSID) const;
-
-    /** Get the count of all the setparam elements in local scope.
-      * \return The count.
-      */
-    int GetParamModificationCount() const;
-
-    /** Get the setparam element with given index.
-      * \param pIndex The given index.
-      * \return The element.
-      */
-    xmlNode * GetParamModification(int pIndex) const;
-
-private:
-    FbxArray<xmlNode*> mParamDefinition;
-    FbxArray<int> mParamDefinitionCount;
-
-    FbxArray<xmlNode*> mParamModification;
-    FbxArray<int> mParamModificationCount;
-};
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_FILEIO_COLLADA_NAMESPACE_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcolladanamespace.h
+#ifndef _FBXSDK_FILEIO_COLLADA_NAMESPACE_H_
+#define _FBXSDK_FILEIO_COLLADA_NAMESPACE_H_
+
+#include <fbxsdk.h>
+
+#include <components/libxml2-2.7.8/include/libxml/globals.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+/** Containing the valid parameter definition and modification in local scope.
+  */
+struct FbxColladaNamespace
+{
+public:
+    /** Push the newparam and setparam elements found in this element.
+      * Call this method at the beginning of importing an element.
+      * \param pElement The specific element.
+      */
+    void Push(xmlNode * pElement);
+
+    /** Pop the newparam and setparam elements found in this element.
+      * Call this method at the end of importing an element.
+      */
+    void Pop();
+
+    /** Find the specific newparam element with given SID.
+      * \param pSID The given SID.
+      * \return Return the found element or NULL if fail.
+      */
+    xmlNode * FindParamDefinition(const char * pSID) const;
+
+    /** Find the specific setparam element with given SID.
+      * \param pSID The given SID.
+      * \return Return the found element or NULL if fail.
+      */
+    xmlNode * FindParamModification(const char * pSID) const;
+
+    /** Get the count of all the setparam elements in local scope.
+      * \return The count.
+      */
+    int GetParamModificationCount() const;
+
+    /** Get the setparam element with given index.
+      * \param pIndex The given index.
+      * \return The element.
+      */
+    xmlNode * GetParamModification(int pIndex) const;
+
+private:
+    FbxArray<xmlNode*> mParamDefinition;
+    FbxArray<int> mParamDefinitionCount;
+
+    FbxArray<xmlNode*> mParamModification;
+    FbxArray<int> mParamModificationCount;
+};
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_FILEIO_COLLADA_NAMESPACE_H_ */

+ 472 - 472
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladatokens.h

@@ -1,472 +1,472 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcolladatokens.h
-#ifndef _FBXSDK_FILEIO_COLLADA_TOKENS_H_
-#define _FBXSDK_FILEIO_COLLADA_TOKENS_H_
-
-#define XML_STR (const xmlChar*) 
-
-// In COLLADA, 1 means total control, while 100 means total control in FBX.
-const int COLLADA_MORPH_WEIGHT_TO_FBX_RATIO = 100;
-
-#define COLLADA_VERSION_PROPERTY			"version"
-#define COLLADA_VERSION						"1.4.1"
-#define COLLADA_SCHEMA						"http://www.collada.org/2005/11/COLLADASchema"
-
-// COLLADA 1.4 elements
-#define COLLADA_LIBRARY_ANIMATION_ELEMENT			"library_animations"
-#define COLLADA_LIBRARY_ANIMATION_CLIP_ELEMENT		"library_animation_clips"
-#define COLLADA_LIBRARY_CAMERA_ELEMENT				"library_cameras"
-#define COLLADA_LIBRARY_CONTROLLER_ELEMENT			"library_controllers"
-#define COLLADA_LIBRARY_EFFECT_ELEMENT				"library_effects"
-#define COLLADA_LIBRARY_FFIELDS_ELEMENT				"library_force_fields"
-#define COLLADA_LIBRARY_GEOMETRY_ELEMENT			"library_geometries"
-#define COLLADA_LIBRARY_IMAGE_ELEMENT				"library_images"
-#define COLLADA_LIBRARY_LIGHT_ELEMENT				"library_lights"
-#define COLLADA_LIBRARY_MATERIAL_ELEMENT			"library_materials"
-#define COLLADA_LIBRARY_NODE_ELEMENT				"library_nodes"
-#define COLLADA_LIBRARY_PMATERIAL_ELEMENT			"library_physics_materials"
-#define COLLADA_LIBRARY_PMODEL_ELEMENT				"library_physics_models"
-#define COLLADA_LIBRARY_PSCENE_ELEMENT				"library_physics_scenes"
-#define COLLADA_LIBRARY_VSCENE_ELEMENT				"library_visual_scenes"
-
-#define COLLADA_INSTANCE_ANIMATION_ELEMENT				"instance_animation"
-#define COLLADA_INSTANCE_CAMERA_ELEMENT					"instance_camera"
-#define COLLADA_INSTANCE_CONTROLLER_ELEMENT				"instance_controller"
-#define COLLADA_INSTANCE_EFFECT_ELEMENT					"instance_effect"
-#define COLLADA_INSTANCE_GEOMETRY_ELEMENT				"instance_geometry"
-#define COLLADA_INSTANCE_LIGHT_ELEMENT					"instance_light"
-#define COLLADA_INSTANCE_NODE_ELEMENT					"instance_node"
-#define COLLADA_INSTANCE_VSCENE_ELEMENT					"instance_visual_scene"
-#define COLLADA_INSTANCE_PSCENE_ELEMENT					"instance_physics_scene"
-#define COLLADA_INSTANCE_MATERIAL_ELEMENT				"instance_material"
-
-#define COLLADA_ANIMCLIP_ELEMENT						"animation_clip"
-#define COLLADA_BINDMATERIAL_ELEMENT					"bind_material"
-#define COLLADA_EFFECT_ELEMENT							"effect"
-#define COLLADA_INITFROM_ELEMENT						"init_from"
-#define COLLADA_SAMPLER_ELEMENT							"sampler"
-#define COLLADA_SKELETON_ELEMENT						"skeleton"
-#define COLLADA_TARGETS_ELEMENT							"targets"
-#define COLLADA_TECHNIQUE_COMMON_ELEMENT				"technique_common"
-#define COLLADA_VSCENE_ELEMENT							"visual_scene"
-#define COLLADA_WEIGHTS_ELEMENT							"vertex_weights"
-#define COLLADA_VERTEXCOUNT_ELEMENT						"vcount"
-
-#define COLLADA_FX_PROFILE_COMMON_ELEMENT				"profile_COMMON"
-#define COLLADA_FX_PROFILE_CG_ELEMENT					"profile_CG"
-#define COLLADA_FX_PROFILE_HLSL_ELEMENT					"profile_HLSL"
-#define COLLADA_FX_PROFILE_GLSL_ELEMENT					"profile_GLSL"
-#define COLLADA_FX_PROFILE_GLES_ELEMENT					"profile_GLES"
-
-#define COLLADA_FXCMN_FLOAT_ELEMENT						"float"
-#define COLLADA_FXCMN_FLOAT4_ELEMENT					"float4"
-#define COLLADA_FXCMN_FLOAT4X4_ELEMENT					"float4x4"
-#define COLLADA_FXCMN_INCLUDE_ELEMENT					"include"
-#define COLLADA_FXCMN_SURFACE_ELEMENT					"surface"
-#define COLLADA_FXCMN_SAMPLER1D_ELEMENT					"sampler1D"
-#define COLLADA_FXCMN_SAMPLER2D_ELEMENT					"sampler2D"
-#define COLLADA_FXCMN_SAMPLER3D_ELEMENT					"sampler3D"
-#define COLLADA_FXCMN_SAMPLERCUBE_ELEMENT				"samplerCUBE"
-#define COLLADA_FXCMN_NEWPARAM_ELEMENT					"newparam"
-#define COLLADA_FXCMN_SETPARAM_ELEMENT					"setparam"
-#define COLLADA_FXCMN_STRING_ELEMENT					"string"
-
-#define COLLADA_TECHNIQUE_STANDARD_PARAMETER			"standard"
-
-#define COLLADA_FXSTD_CONSTANT_ELEMENT					"constant"
-#define COLLADA_FXSTD_LAMBERT_ELEMENT					"lambert"
-#define COLLADA_FXSTD_PHONG_ELEMENT						"phong"
-#define COLLADA_FXSTD_BLINN_ELEMENT						"blinn"
-#define COLLADA_FXSTD_COLOR_ELEMENT						"color"
-#define COLLADA_FXSTD_FLOAT_ELEMENT						"float"
-#define COLLADA_FXSTD_SAMPLER_ELEMENT					"texture"
-#define COLLADA_FXSTD_TEXTURE_ATTRIBUTE					"texture"
-#define COLLADA_FXSTD_TEXTURESET_ATTRIBUTE				"texcoord"
-
-#define COLLADA_CONTROLLER_SKIN_ELEMENT					"skin"
-#define COLLADA_CONTROLLER_MORPH_ELEMENT				"morph"
-
-#define COLLADA_CAMERA_PERSP_ELEMENT					"perspective"
-#define COLLADA_CAMERA_ORTHO_ELEMENT					"orthographic"
-
-#define COLLADA_ASPECT_CAMERA_PARAMETER					"aspect_ratio"
-#define COLLADA_XFOV_CAMERA_PARAMETER					"xfov"	
-#define COLLADA_YFOV_CAMERA_PARAMETER					"yfov"	
-#define COLLADA_ZNEAR_CAMERA_PARAMETER					"znear"	
-#define COLLADA_ZFAR_CAMERA_PARAMETER					"zfar"	
-#define COLLADA_XMAG_CAMERA_PARAMETER					"xmag"	
-#define COLLADA_YMAG_CAMERA_PARAMETER					"ymag"
-#define COLLADA_CAMERA_VERTICAL_APERTURE_PARAMETER      "vertical_aperture"
-#define COLLADA_CAMERA_HORIZONTAL_APERTURE_PARAMETER    "horizontal_aperture"
-#define COLLADA_CAMERA_LENS_SQUEEZE_PARAMETER           "lens_squeeze"
-
-#define COLLADA_AMBIENT_MATERIAL_PARAMETER				"ambient"
-#define COLLADA_BUMP_MATERIAL_PARAMETER					"bump"
-#define COLLADA_DIFFUSE_MATERIAL_PARAMETER				"diffuse"
-#define COLLADA_EMISSION_MATERIAL_PARAMETER				"emission"
-#define COLLADA_TRANSPARENCY_MATERIAL_PARAMETER			"transparency"
-#define COLLADA_TRANSPARENT_MATERIAL_PARAMETER			"transparent"
-#define COLLADA_REFLECTIVE_MATERIAL_PARAMETER			"reflective"
-#define COLLADA_REFLECTIVITY_MATERIAL_PARAMETER			"reflectivity"
-#define COLLADA_SHININESS_MATERIAL_PARAMETER			"shininess"
-#define COLLADA_SPECULAR_MATERIAL_PARAMETER				"specular"
-#define COLLADA_INDEXOFREFRACTION_MATERIAL_PARAMETER	"index_of_refraction"
-#define COLLADA_OPAQUE_MODE_ATTRIBUTE                   "opaque"
-#define COLLADA_OPAQUE_MODE_A_ONE                       "A_ONE"
-#define COLLADA_OPAQUE_MODE_RGB_ONE                     "RGB_ONE"
-#define COLLADA_OPAQUE_MODE_A_ZERO                      "A_ZERO"
-#define COLLADA_OPAQUE_MODE_RGB_ZERO                    "RGB_ZERO"
-
-#define COLLADA_LIGHT_AMBIENT_ELEMENT					"ambient"		
-#define COLLADA_LIGHT_POINT_ELEMENT						"point"
-#define COLLADA_LIGHT_DIRECTIONAL_ELEMENT				"directional"
-#define COLLADA_LIGHT_SPOT_ELEMENT						"spot"
-
-#define COLLADA_COLOR_LIGHT_PARAMETER					"color"
-#define COLLADA_CONST_ATTENUATION_LIGHT_PARAMETER		"constant_attenuation"
-#define COLLADA_LIN_ATTENUATION_LIGHT_PARAMETER			"linear_attenuation"
-#define COLLADA_QUAD_ATTENUATION_LIGHT_PARAMETER		"quadratic_attenuation"
-#define COLLADA_FALLOFFEXPONENT_LIGHT_PARAMETER			"falloff_exponent"
-#define COLLADA_FALLOFFANGLE_LIGHT_PARAMETER			"falloff_angle"
-
-#define COLLADA_BINDSHAPEMX_SKIN_PARAMETER				"bind_shape_matrix"
-
-#define COLLADA_CONTRIBUTOR_ASSET_ELEMENT				"contributor"
-#define COLLADA_AUTHOR_ASSET_PARAMETER					"author"
-#define COLLADA_AUTHORINGTOOL_ASSET_PARAMETER			"authoring_tool"
-#define COLLADA_CREATED_ASSET_PARAMETER					"created"
-#define COLLADA_MODIFIED_ASSET_PARAMETER				"modified"
-#define COLLADA_REVISION_ASSET_PARAMETER				"revision"
-#define COLLADA_SOURCEDATA_ASSET_PARAMETER				"source_data"
-#define COLLADA_UNITS_ASSET_PARAMETER					"unit"
-#define COLLADA_UPAXIS_ASSET_PARAMETER					"up_axis"
-
-#define COLLADA_SYMBOL_PROPERTY				"symbol"
-
-// From Collada 1.3
-#define COLLADA_DOCUMENT_STRUCTURE			"COLLADA"
-#define COLLADA_ASSET_STRUCTURE				"asset"
-#define COLLADA_REVISION_STRUCTURE			"revision"
-#define COLLADA_AUTHORING_TOOL_STRUCTURE	"authoring_tool"
-#define COLLADA_CREATED_STRUCTURE			"created"
-#define COLLADA_MODIFIED_STRUCTURE			"modified"
-#define COLLADA_AUTHOR_STRUCTURE			"author"
-#define COLLADA_TITLE_STRUCTURE				"title"
-#define COLLADA_SUBJECT_STRUCTURE			"subject"
-#define COLLADA_KEYWORDS_STRUCTURE			"keywords"
-#define COLLADA_COMMENTS_STRUCTURE			"comments"
-#define COLLADA_UNIT_STRUCTURE				"unit"
-#define COLLADA_SOURCE_DATA_STRUCTURE		"source_data"
-#define COLLADA_UP_AXIS_STRUCTURE			"up_axis"
-#define COLLADA_LIBRARY_STRUCTURE			"library"		// Deprecated 1.4
-#define COLLADA_SCENE_STRUCTURE				"scene"
-#define COLLADA_NODE_STRUCTURE				"node"
-#define COLLADA_MATRIX_STRUCTURE			"matrix"
-#define COLLADA_TRANSFORM_STRUCTURE         "transform"
-#define COLLADA_TRANSLATE_STRUCTURE			"translate"
-#define COLLADA_TRANSLATION_STRUCTURE       "translation"   // For ColladaMax
-#define COLLADA_TRANSLATE_ORIGIN			"origin"        //A fix for Poser(Bug 309548). Handle translate origin info exported from Poser.
-#define COLLADA_TRANSLATE_LOCATION			"location"      //A fix for ? (Bug BARB-154). "location" is synonyn of "translate" ?
-#define COLLADA_ROTATE_STRUCTURE			"rotate"
-#define COLLADA_SCALE_STRUCTURE				"scale"
-#define COLLADA_SKEW_STRUCTURE				"skew"
-#define COLLADA_ROTATE_X					"rotateX"
-#define COLLADA_ROTATE_Y					"rotateY"
-#define COLLADA_ROTATE_Z					"rotateZ"
-#define COLLADA_ROT_X                       "RotX"          // For ColladaMax
-#define COLLADA_ROT_Y                       "RotY"
-#define COLLADA_ROT_Z                       "RotZ"
-#define COLLADA_ROTATION_X                  "rotation_x"    // For XSI
-#define COLLADA_ROTATION_Y                  "rotation_y"
-#define COLLADA_ROTATION_Z                  "rotation_z"
-#define COLLADA_ROTATIONX                   "rotationX"     // BARB-154
-#define COLLADA_ROTATIONY                   "rotationY"
-#define COLLADA_ROTATIONZ                   "rotationZ"
-
-#define COLLADA_ROTATE_PIVOT				"rotatePivot"	// the next 6 subids are recognized by ColladaMaya
-#define COLLADA_SCALE_PIVOT					"scalePivot"
-#define COLLADA_ROTATE_PIVOT_INVERSE		"rotatePivotInverse"
-#define COLLADA_SCALE_PIVOT_INVERSE			"scalePivotInverse"
-#define COLLADA_ROTATE_PIVOT_OFFSET			"rotatePivotTranslation"
-#define COLLADA_SCALE_PIVOT_OFFSET			"scalePivotTranslation"
-#define COLLADA_PRE_ROTATION_X				"jointOrientX"	// these 3 subids recognized by ColladaMaya
-#define COLLADA_PRE_ROTATION_Y				"jointOrientY"
-#define COLLADA_PRE_ROTATION_Z				"jointOrientZ"
-#define COLLADA_POST_ROTATION_X				"post-rotationX"	// these 3 subids NOT recognized by ColladaMaya
-#define COLLADA_POST_ROTATION_Y				"post-rotationY"
-#define COLLADA_POST_ROTATION_Z				"post-rotationZ"
-#define COLLADA_ROTATE_AXIS_X               "rotateAxisX"       // these 3 subids recognized by ColladaMaya
-#define COLLADA_ROTATE_AXIS_Y               "rotateAxisY"
-#define COLLADA_ROTATE_AXIS_Z               "rotateAxisZ"
-#define COLLADA_LOOKAT_STRUCTURE			"lookat"
-#define COLLADA_PERSPECTIVE_STRUCTURE		"perspective"
-#define COLLADA_GEOMETRY_STRUCTURE			"geometry"
-#define COLLADA_MESH_STRUCTURE				"mesh"
-#define COLLADA_VERTICES_STRUCTURE			"vertices"
-#define COLLADA_POLYGONS_STRUCTURE			"polygons"
-#define COLLADA_POLYLIST_STRUCTURE			"polylist" 
-#define COLLADA_TRIANGLES_STRUCTURE			"triangles"
-#define COLLADA_P_STRUCTURE                 "p"
-#define COLLADA_ANIMATION_STRUCTURE			"animation"
-#define COLLADA_CONTROLLER_STRUCTURE		"controller"
-#define COLLADA_SKIN_STRUCTURE				"skin"
-#define COLLADA_COMBINER_STRUCTURE			"combiner"
-#define COLLADA_JOINTS_STRUCTURE			"joints"
-#define COLLADA_VALUE_STRUCTURE				"v"
-#define COLLADA_MATERIAL_STRUCTURE			"material"
-#define COLLADA_SHADER_STRUCTURE			"shader"
-#define COLLADA_PASS_STRUCTURE				"pass"
-#define COLLADA_PROGRAM_STRUCTURE			"program"
-#define COLLADA_TEXTURE_STRUCTURE			"texture"
-#define COLLADA_IMAGE_STRUCTURE				"image"
-#define COLLADA_INPUT_STRUCTURE				"input"
-#define COLLADA_TECHNIQUE_STRUCTURE			"technique"
-#define COLLADA_SOURCE_STRUCTURE			"source"
-#define COLLADA_ACCESSOR_STRUCTURE			"accessor"
-#define COLLADA_EXTRA_STRUCTURE				"extra"
-#define COLLADA_BOUNDINGBOX_STRUCTURE		"boundingbox"
-#define COLLADA_MIN_STRUCTURE				"min"
-#define COLLADA_MAX_STRUCTURE				"max"
-
-#define COLLADA_ARRAY_STRUCTURE				"array"
-#define COLLADA_FLOAT_ARRAY_STRUCTURE		"float_array"
-#define COLLADA_INT_ARRAY_STRUCTURE			"int_array"
-#define COLLADA_NAME_ARRAY_STRUCTURE		"Name_array"
-#define COLLADA_IDREF_ARRAY_STRUCTURE		"IDREF_array"
-#define COLLADA_BOOL_ARRAY_STRUCTURE		"bool_array"
-
-#define COLLADA_SAMPLER_STRUCTURE			"sampler"
-#define COLLADA_CHANNEL_STRUCTURE			"channel"
-#define COLLADA_CAMERA_STRUCTURE			"camera"
-#define COLLADA_LIGHT_STRUCTURE				"light"
-#define COLLADA_OPTICS_STRUCTURE			"optics"
-#define COLLADA_PROGRAM_STRUCTURE			"program"
-#define COLLADA_PARAMETER_STRUCTURE			"param"
-
-#define COLLADA_TYPE_PROPERTY				"type"
-#define COLLADA_ID_PROPERTY					"id"
-#define COLLADA_SUBID_PROPERTY				"sid"
-#define COLLADA_NAME_PROPERTY				"name"
-#define COLLADA_LAYER_PROPERTY              "layer"
-#define COLLADA_COUNT_PROPERTY				"count"
-#define COLLADA_STRIDE_PROPERTY				"stride"
-#define COLLADA_URL_PROPERTY				"url"
-#define COLLADA_SEMANTIC_PROPERTY			"semantic"
-#define COLLADA_SOURCE_PROPERTY				"source"
-#define COLLADA_TARGET_PROPERTY				"target"
-#define COLLADA_PROFILE_PROPERTY			"profile"
-#define COLLADA_MATERIAL_PROPERTY			"material"
-#define COLLADA_METER_PROPERTY				"meter"
-#define COLLADA_IDX_PROPERTY				"idx"
-#define COLLADA_SET_PROPERTY				"set"
-#define COLLADA_OFFSET_PROPERTY				"offset"
-#define COLLADA_FLOW_PROPERTY				"flow"
-#define COLLADA_FORMAT_PROPERTY				"format"
-#define COLLADA_HEIGHT_PROPERTY				"height"
-#define COLLADA_WIDTH_PROPERTY				"width"
-#define COLLADA_DEPTH_PROPERTY				"depth"
-#define COLLADA_REF_PROPERTY                "ref"
-
-#define COLLADA_GEOMETRY_LIBRARY_TYPE		"GEOMETRY"
-#define COLLADA_CONTROLLER_LIBRARY_TYPE		"CONTROLLER"
-#define COLLADA_ANIMATION_LIBRARY_TYPE		"ANIMATION"
-#define COLLADA_MATERIAL_LIBRARY_TYPE		"MATERIAL"
-#define COLLADA_TEXTURE_LIBRARY_TYPE		"TEXTURE"
-#define COLLADA_IMAGE_LIBRARY_TYPE			"IMAGE"
-#define COLLADA_LIGHT_LIBRARY_TYPE			"LIGHT"
-#define COLLADA_CAMERA_LIBRARY_TYPE			"CAMERA"
-
-#define COLLADA_LAMBERT_SHADER_TYPE			"LAMBERT"
-#define COLLADA_PHONG_SHADER_TYPE			"PHONG"
-#define COLLADA_CONSTANT_SHADER_TYPE		"CONSTANT"
-
-#define COLLADA_NAME_TYPE					"name"
-#define COLLADA_IDREF_TYPE					"IDREF"
-#define COLLADA_FLOAT_TYPE					"float"
-#define COLLADA_BOOL_TYPE					"bool"
-#define COLLADA_INT_TYPE					"int"
-#define COLLADA_FLOAT3_TYPE					"float3"
-#define COLLADA_FLOAT4_TYPE					"float4"
-#define COLLADA_FUNCTION_TYPE				"function"
-#define COLLADA_MATRIX_TYPE					"float4x4"
-#define COLLADA_STRING_TYPE                 "string"
-
-#define COLLADA_JOINT_NODE_TYPE				"JOINT"
-#define COLLADA_NODE_NODE_TYPE				"NODE"
-
-#define COLLADA_TEXTURE_SEMANTIC			"TEXTURE"
-#define COLLADA_IMAGE_SEMANTIC				"IMAGE"
-#define COLLADA_INPUT_SEMANTIC				"INPUT"
-#define COLLADA_OUTPUT_SEMANTIC				"OUTPUT"
-#define COLLADA_IN_TANGENT_SEMANTIC			"IN_TANGENT"
-#define COLLADA_OUT_TANGENT_SEMANTIC		"OUT_TANGENT"
-#define COLLADA_INTERPOLATION_SEMANTIC		"INTERPOLATION"
-#define COLLADA_JOINT_SEMANTIC				"JOINT"
-#define COLLADA_BIND_POSITION_SEMANTIC		"BIND_SHAPE_POSITION"
-#define COLLADA_BIND_NORMAL_SEMANTIC		"BIND_SHAPE_NORMAL"
-#define COLLADA_JOINT_AND_WEIGHT_SEMANTIC	"JOINTS_AND_WEIGHTS"
-#define COLLADA_BIND_MATRIX_SEMANTIC		"INV_BIND_MATRIX"
-#define COLLADA_JOINT_PARAMETER				"JOINT"
-#define COLLADA_WEIGHT_PARAMETER			"WEIGHT"
-#define COLLADA_MORPH_TARGET_SEMANTIC		"MORPH_TARGET"
-#define COLLADA_MORPH_WEIGHT_SEMANTIC		"MORPH_WEIGHT"
-
-#define COLLADA_GENERIC_TECHNIQUE			"COMMON"
-
-#define COLLADA_TIME_TARGET					"TIME"
-
-#define COLLADA_VERTEX_INPUT				"VERTEX"
-#define COLLADA_POSITION_INPUT				"POSITION"
-#define COLLADA_NORMAL_INPUT				"NORMAL"
-#define COLLADA_COLOR_INPUT					"COLOR"
-#define COLLADA_MAPPING_INPUT				"UV"
-#define COLLADA_TEXCOORD_INPUT				"TEXCOORD"
-#define COLLADA_TEXTANGENT_INPUT            "TEXTANGENT"
-#define COLLADA_TEXBINORMAL_INPUT           "TEXBINORMAL"
-
-#define COLLADA_LIGHT_INTENSITY_PARAMETER_14			"intensity"
-#define COLLADA_LIGHT_PENUMBRA_ANGLE_PARAMETER_14		"penumbra_angle"
-#define COLLADA_LIGHT_DROPOFF_PARAMETER					"dropoff"
-
-#define COLLADA_CAMERA_YFOV_PARAMETER			"YFOV"
-#define COLLADA_CAMERA_ZNEAR_PARAMETER			"ZNEAR"
-#define COLLADA_CAMERA_ZFAR_PARAMETER			"ZFAR"
-#define COLLADA_CAMERA_ORTHO_BOTTOM_PARAMETER	"BOTTOM"
-#define COLLADA_CAMERA_ORTHO_TOP_PARAMETER		"TOP"
-#define COLLADA_CAMERA_ORTHO_LEFT_PARAMETER		"LEFT"
-#define COLLADA_CAMERA_ORTHO_RIGHT_PARAMETER	"RIGHT"
-
-#define COLLADA_TEXTURE_WRAPU_PARAMETER					"wrapU"
-#define COLLADA_TEXTURE_WRAPV_PARAMETER					"wrapV"
-#define COLLADA_TEXTURE_MIRRORU_PARAMETER				"mirrorU"
-#define COLLADA_TEXTURE_MIRRORV_PARAMETER				"mirrorV"
-#define COLLADA_TEXTURE_BLEND_MODE_PARAMETER			"BLEND_MODE"
-#define COLLADA_TEXTURE_BLEND_MODE_PARAMETER_14			"blend_mode"
-#define COLLADA_TEXTURE_REPEATU_PARAMETER				"repeatU"
-#define COLLADA_TEXTURE_REPEATV_PARAMETER				"repeatV"
-
-#define COLLADA_CONSTANT_FUNCTION			"CONSTANT"
-#define COLLADA_LINEAR_FUNCTION				"LINEAR"
-#define COLLADA_QUADRATIC_FUNCTION			"QUADRATIC"
-
-#define COLLADA_INTERPOLATION_TYPE_LINEAR	"LINEAR"
-#define COLLADA_INTERPOLATION_TYPE_BEZIER	"BEZIER"
-#define COLLADA_INTERPOLATION_TYPE_CARDINAL	"CARDINAL"
-#define COLLADA_INTERPOLATION_TYPE_HERMITE	"HERMITE"
-#define COLLADA_INTERPOLATION_TYPE_BSPLINE	"BSPLINE"
-#define COLLADA_INTERPOLATION_TYPE_STEP		"STEP"
-
-#define COLLADA_X_UP						"X_UP"
-#define COLLADA_Y_UP						"Y_UP"
-#define COLLADA_Z_UP						"Z_UP"
-
-#define COLLADA_IN_FLOW						"IN"
-#define COLLADA_OUT_FLOW					"OUT"
-#define COLLADA_INOUT_FLOW					"INOUT"
-
-// Obsolete, but kept here for backward compatibility.
-#define COLLADA_RGB_TYPE					"ColorRGB"  // use float3 instead
-#define COLLADA_RGBA_TYPE					"ColorRGBA" // use float4 instead
-#define COLLADA_RGB_INPUT					"COLORRGB"	// beta MAX exporter has been known to generate them
-#define COLLADA_RGBA_INPUT					"COLORRGBA"	// beta MAX exporter has been known to generate them
-
-// Physics extension. Currently in prototype phase.
-#define COLLADA_PHYSICS_LIBRARY_TYPE		"PHYSICS"
-#define COLLADA_SHAPE_STRUCTURE				"shape"
-#define	COLLADA_RIGID_BODY_STRUCTURE		"rigidbody"
-#define COLLADA_DYNAMIC_STRUCTURE			"dynamic"
-#define COLLADA_MASS_STRUCTURE				"mass"
-#define COLLADA_PHYSICS_MATERIAL_STRUCTURE	"physics_material"
-#define COLLADA_STATIC_FRICTION_ATTRIBUTE	"STATIC_FRICTION"
-#define COLLADA_DYNAMIC_FRICTION_ATTRIBUTE	"DYNAMIC_FRICTION"
-#define COLLADA_ELASTICITY_ATTRIBUTE		"ELASTICITY"
-#define COLLADA_BOX_STRUCTURE				"box"
-#define COLLADA_SPHERE_STRUCTURE			"sphere"
-#define COLLADA_CAPSULE_STRUCTURE			"capsule"
-#define COLLADA_CYLINDER_STRUCTURE			"cylinder"
-#define COLLADA_ELLIPSOID_STRUCTURE			"ellipsoid"
-#define COLLADA_SIZE_STRUCTURE				"size"
-#define COLLADA_RADIUS_STRUCTURE			"radius"
-#define COLLADA_PHYSICS_ENVIRONMENT_STRUCTURE	"physics_environment"
-#define COLLADA_ENVIRONMENT_ID				"Environment"
-#define COLLADA_TIMESTEP_ATTRIBUTE			"TIMESTEP"
-#define COLLADA_GRAVITY_ATTRIBUTE			"gravity"
-#define COLLADA_INITIAL_VELOCITY_STRUCTURE	"initial_velocity"
-#define COLLADA_INITIAL_ANGULAR_VELOCITY_STRUCTURE	"initial_angular_velocity"
-#define COLLADA_CONVEX_MESH_STRUCTURE		"convex_mesh"
-#define COLLADA_INERTIA_STRUCTURE			"inertia"
-#define COLLADA_DENSITY_STRUCTURE			"density"
-#define COLLADA_CENTER_OF_MASS_STRUCTURE	"center_of_mass"
-#define COLLADA_DYNAMICS_STRUCTURE			"dynamics"
-#define COLLADA_RIGID_CONSTRAINT_STRUCTURE	"rigid_constraint"
-#define COLLADA_BODY_PROPERTY				"body"
-#define COLLADA_ATTACHMENT_STRUCTURE		"attachment"
-#define COLLADA_ROT_LIMIT_MIN_STRUCTURE		"rot_limit_min"
-#define COLLADA_ROT_LIMIT_MAX_STRUCTURE		"rot_limit_max"
-#define COLLADA_TRANS_LIMIT_MIN_STRUCTURE	"trans_limit_min"
-#define COLLADA_TRANS_LIMIT_MAX_STRUCTURE	"trans_limit_max"
-#define COLLADA_ENABLED_STRUCTURE			"enabled"
-#define COLLADA_INTERPENETRATE_STRUCTURE	"interpenetrate"
-#define COLLADA_SPRING_STRUCTURE			"spring"
-#define COLLADA_STIFFNESS_STRUCTURE			"stiffness"
-#define COLLADA_DAMPING_STRUCTURE			"damping"
-#define COLLADA_REST_LENGTH_STRUCTURE		"rest_length"
-#define COLLADA_P0_STRUCTURE				"p0"
-#define COLLADA_P1_STRUCTURE				"p1"
-#define COLLADA_TRUE_KEYWORD				"TRUE"
-#define COLLADA_FALSE_KEYWORD				"FALSE"
-
-#define COLLADA_LINES_STRUCTURE				"lines"
-#define COLLADA_LINESTRIP_STRUCTURE			"linestrips"
-#define COLLADA_TRIFANS_STRUCTURE			"trifans"
-#define COLLADA_TRISTRIPS_STRUCTURE			"tristrips"
-
-// Extensions
-
-// Feeling Software ColladaMaya extensions
-#define COLLADA_MAYA_PROFILE                "MAYA"
-
-#define COLLADA_MAYA_LAYER_ELEMENT          "layer"
-
-// Feeling Software ColladaMax extensions
-#define COLLADA_MAX3D_PROFILE               "MAX3D"
-
-#define COLLADA_MAX3D_FRAMERATE_ELEMENT     "frame_rate"
-
-// Feeling Software FCollada extensions
-#define COLLADA_FCOLLADA_PROFILE            "FCOLLADA"
-
-#define COLLADA_FCOLLADA_STARTTIME_ELEMENT  "start_time"
-#define COLLADA_FCOLLADA_ENDTIME_ELEMENT    "end_time"
-#define COLLADA_FCOLLADA_VISIBILITY_ELEMENT "visibility"
-
-// XSI COLLADA extensions
-#define COLLADA_XSI_PROFILE                 "XSI"
-
-#define COLLADA_XSI_VISIBILITY_ELEMENT      "SI_Visibility"
-
-// FBX COLLADA extensions
-#define COLLADA_FBX_PROFILE                 "FBX"
-
-#define COLLADA_FBX_TARGET_ELEMENT          "target"
-
-// NVidia FXComposer extension -----------------------------------------------//
-
-#define COLLADA_NVIDIA_FXCOMPOSER_PROFILE           "NVIDIA_FXCOMPOSER"
-
-#define COLLADA_NVIDIA_FXCOMPOSER_IMPORT_ELEMENT    "import"
-#define COLLADA_NVIDIA_FXCOMPOSER_URL_ATTRIBUTE     "url"
-#define COLLADA_NVIDIA_FXCOMPOSER_COMPILER_OPTIONS_ATTRIBUTE  "compiler_options"
-#define COLLADA_NVIDIA_FXCOMPOSER_PROFILE_ATTRIBUTE "profile"
-
-#endif /* _FBXSDK_FILEIO_COLLADA_TOKENS_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcolladatokens.h
+#ifndef _FBXSDK_FILEIO_COLLADA_TOKENS_H_
+#define _FBXSDK_FILEIO_COLLADA_TOKENS_H_
+
+#define XML_STR (const xmlChar*) 
+
+// In COLLADA, 1 means total control, while 100 means total control in FBX.
+const int COLLADA_MORPH_WEIGHT_TO_FBX_RATIO = 100;
+
+#define COLLADA_VERSION_PROPERTY			"version"
+#define COLLADA_VERSION						"1.4.1"
+#define COLLADA_SCHEMA						"http://www.collada.org/2005/11/COLLADASchema"
+
+// COLLADA 1.4 elements
+#define COLLADA_LIBRARY_ANIMATION_ELEMENT			"library_animations"
+#define COLLADA_LIBRARY_ANIMATION_CLIP_ELEMENT		"library_animation_clips"
+#define COLLADA_LIBRARY_CAMERA_ELEMENT				"library_cameras"
+#define COLLADA_LIBRARY_CONTROLLER_ELEMENT			"library_controllers"
+#define COLLADA_LIBRARY_EFFECT_ELEMENT				"library_effects"
+#define COLLADA_LIBRARY_FFIELDS_ELEMENT				"library_force_fields"
+#define COLLADA_LIBRARY_GEOMETRY_ELEMENT			"library_geometries"
+#define COLLADA_LIBRARY_IMAGE_ELEMENT				"library_images"
+#define COLLADA_LIBRARY_LIGHT_ELEMENT				"library_lights"
+#define COLLADA_LIBRARY_MATERIAL_ELEMENT			"library_materials"
+#define COLLADA_LIBRARY_NODE_ELEMENT				"library_nodes"
+#define COLLADA_LIBRARY_PMATERIAL_ELEMENT			"library_physics_materials"
+#define COLLADA_LIBRARY_PMODEL_ELEMENT				"library_physics_models"
+#define COLLADA_LIBRARY_PSCENE_ELEMENT				"library_physics_scenes"
+#define COLLADA_LIBRARY_VSCENE_ELEMENT				"library_visual_scenes"
+
+#define COLLADA_INSTANCE_ANIMATION_ELEMENT				"instance_animation"
+#define COLLADA_INSTANCE_CAMERA_ELEMENT					"instance_camera"
+#define COLLADA_INSTANCE_CONTROLLER_ELEMENT				"instance_controller"
+#define COLLADA_INSTANCE_EFFECT_ELEMENT					"instance_effect"
+#define COLLADA_INSTANCE_GEOMETRY_ELEMENT				"instance_geometry"
+#define COLLADA_INSTANCE_LIGHT_ELEMENT					"instance_light"
+#define COLLADA_INSTANCE_NODE_ELEMENT					"instance_node"
+#define COLLADA_INSTANCE_VSCENE_ELEMENT					"instance_visual_scene"
+#define COLLADA_INSTANCE_PSCENE_ELEMENT					"instance_physics_scene"
+#define COLLADA_INSTANCE_MATERIAL_ELEMENT				"instance_material"
+
+#define COLLADA_ANIMCLIP_ELEMENT						"animation_clip"
+#define COLLADA_BINDMATERIAL_ELEMENT					"bind_material"
+#define COLLADA_EFFECT_ELEMENT							"effect"
+#define COLLADA_INITFROM_ELEMENT						"init_from"
+#define COLLADA_SAMPLER_ELEMENT							"sampler"
+#define COLLADA_SKELETON_ELEMENT						"skeleton"
+#define COLLADA_TARGETS_ELEMENT							"targets"
+#define COLLADA_TECHNIQUE_COMMON_ELEMENT				"technique_common"
+#define COLLADA_VSCENE_ELEMENT							"visual_scene"
+#define COLLADA_WEIGHTS_ELEMENT							"vertex_weights"
+#define COLLADA_VERTEXCOUNT_ELEMENT						"vcount"
+
+#define COLLADA_FX_PROFILE_COMMON_ELEMENT				"profile_COMMON"
+#define COLLADA_FX_PROFILE_CG_ELEMENT					"profile_CG"
+#define COLLADA_FX_PROFILE_HLSL_ELEMENT					"profile_HLSL"
+#define COLLADA_FX_PROFILE_GLSL_ELEMENT					"profile_GLSL"
+#define COLLADA_FX_PROFILE_GLES_ELEMENT					"profile_GLES"
+
+#define COLLADA_FXCMN_FLOAT_ELEMENT						"float"
+#define COLLADA_FXCMN_FLOAT4_ELEMENT					"float4"
+#define COLLADA_FXCMN_FLOAT4X4_ELEMENT					"float4x4"
+#define COLLADA_FXCMN_INCLUDE_ELEMENT					"include"
+#define COLLADA_FXCMN_SURFACE_ELEMENT					"surface"
+#define COLLADA_FXCMN_SAMPLER1D_ELEMENT					"sampler1D"
+#define COLLADA_FXCMN_SAMPLER2D_ELEMENT					"sampler2D"
+#define COLLADA_FXCMN_SAMPLER3D_ELEMENT					"sampler3D"
+#define COLLADA_FXCMN_SAMPLERCUBE_ELEMENT				"samplerCUBE"
+#define COLLADA_FXCMN_NEWPARAM_ELEMENT					"newparam"
+#define COLLADA_FXCMN_SETPARAM_ELEMENT					"setparam"
+#define COLLADA_FXCMN_STRING_ELEMENT					"string"
+
+#define COLLADA_TECHNIQUE_STANDARD_PARAMETER			"standard"
+
+#define COLLADA_FXSTD_CONSTANT_ELEMENT					"constant"
+#define COLLADA_FXSTD_LAMBERT_ELEMENT					"lambert"
+#define COLLADA_FXSTD_PHONG_ELEMENT						"phong"
+#define COLLADA_FXSTD_BLINN_ELEMENT						"blinn"
+#define COLLADA_FXSTD_COLOR_ELEMENT						"color"
+#define COLLADA_FXSTD_FLOAT_ELEMENT						"float"
+#define COLLADA_FXSTD_SAMPLER_ELEMENT					"texture"
+#define COLLADA_FXSTD_TEXTURE_ATTRIBUTE					"texture"
+#define COLLADA_FXSTD_TEXTURESET_ATTRIBUTE				"texcoord"
+
+#define COLLADA_CONTROLLER_SKIN_ELEMENT					"skin"
+#define COLLADA_CONTROLLER_MORPH_ELEMENT				"morph"
+
+#define COLLADA_CAMERA_PERSP_ELEMENT					"perspective"
+#define COLLADA_CAMERA_ORTHO_ELEMENT					"orthographic"
+
+#define COLLADA_ASPECT_CAMERA_PARAMETER					"aspect_ratio"
+#define COLLADA_XFOV_CAMERA_PARAMETER					"xfov"	
+#define COLLADA_YFOV_CAMERA_PARAMETER					"yfov"	
+#define COLLADA_ZNEAR_CAMERA_PARAMETER					"znear"	
+#define COLLADA_ZFAR_CAMERA_PARAMETER					"zfar"	
+#define COLLADA_XMAG_CAMERA_PARAMETER					"xmag"	
+#define COLLADA_YMAG_CAMERA_PARAMETER					"ymag"
+#define COLLADA_CAMERA_VERTICAL_APERTURE_PARAMETER      "vertical_aperture"
+#define COLLADA_CAMERA_HORIZONTAL_APERTURE_PARAMETER    "horizontal_aperture"
+#define COLLADA_CAMERA_LENS_SQUEEZE_PARAMETER           "lens_squeeze"
+
+#define COLLADA_AMBIENT_MATERIAL_PARAMETER				"ambient"
+#define COLLADA_BUMP_MATERIAL_PARAMETER					"bump"
+#define COLLADA_DIFFUSE_MATERIAL_PARAMETER				"diffuse"
+#define COLLADA_EMISSION_MATERIAL_PARAMETER				"emission"
+#define COLLADA_TRANSPARENCY_MATERIAL_PARAMETER			"transparency"
+#define COLLADA_TRANSPARENT_MATERIAL_PARAMETER			"transparent"
+#define COLLADA_REFLECTIVE_MATERIAL_PARAMETER			"reflective"
+#define COLLADA_REFLECTIVITY_MATERIAL_PARAMETER			"reflectivity"
+#define COLLADA_SHININESS_MATERIAL_PARAMETER			"shininess"
+#define COLLADA_SPECULAR_MATERIAL_PARAMETER				"specular"
+#define COLLADA_INDEXOFREFRACTION_MATERIAL_PARAMETER	"index_of_refraction"
+#define COLLADA_OPAQUE_MODE_ATTRIBUTE                   "opaque"
+#define COLLADA_OPAQUE_MODE_A_ONE                       "A_ONE"
+#define COLLADA_OPAQUE_MODE_RGB_ONE                     "RGB_ONE"
+#define COLLADA_OPAQUE_MODE_A_ZERO                      "A_ZERO"
+#define COLLADA_OPAQUE_MODE_RGB_ZERO                    "RGB_ZERO"
+
+#define COLLADA_LIGHT_AMBIENT_ELEMENT					"ambient"		
+#define COLLADA_LIGHT_POINT_ELEMENT						"point"
+#define COLLADA_LIGHT_DIRECTIONAL_ELEMENT				"directional"
+#define COLLADA_LIGHT_SPOT_ELEMENT						"spot"
+
+#define COLLADA_COLOR_LIGHT_PARAMETER					"color"
+#define COLLADA_CONST_ATTENUATION_LIGHT_PARAMETER		"constant_attenuation"
+#define COLLADA_LIN_ATTENUATION_LIGHT_PARAMETER			"linear_attenuation"
+#define COLLADA_QUAD_ATTENUATION_LIGHT_PARAMETER		"quadratic_attenuation"
+#define COLLADA_FALLOFFEXPONENT_LIGHT_PARAMETER			"falloff_exponent"
+#define COLLADA_FALLOFFANGLE_LIGHT_PARAMETER			"falloff_angle"
+
+#define COLLADA_BINDSHAPEMX_SKIN_PARAMETER				"bind_shape_matrix"
+
+#define COLLADA_CONTRIBUTOR_ASSET_ELEMENT				"contributor"
+#define COLLADA_AUTHOR_ASSET_PARAMETER					"author"
+#define COLLADA_AUTHORINGTOOL_ASSET_PARAMETER			"authoring_tool"
+#define COLLADA_CREATED_ASSET_PARAMETER					"created"
+#define COLLADA_MODIFIED_ASSET_PARAMETER				"modified"
+#define COLLADA_REVISION_ASSET_PARAMETER				"revision"
+#define COLLADA_SOURCEDATA_ASSET_PARAMETER				"source_data"
+#define COLLADA_UNITS_ASSET_PARAMETER					"unit"
+#define COLLADA_UPAXIS_ASSET_PARAMETER					"up_axis"
+
+#define COLLADA_SYMBOL_PROPERTY				"symbol"
+
+// From Collada 1.3
+#define COLLADA_DOCUMENT_STRUCTURE			"COLLADA"
+#define COLLADA_ASSET_STRUCTURE				"asset"
+#define COLLADA_REVISION_STRUCTURE			"revision"
+#define COLLADA_AUTHORING_TOOL_STRUCTURE	"authoring_tool"
+#define COLLADA_CREATED_STRUCTURE			"created"
+#define COLLADA_MODIFIED_STRUCTURE			"modified"
+#define COLLADA_AUTHOR_STRUCTURE			"author"
+#define COLLADA_TITLE_STRUCTURE				"title"
+#define COLLADA_SUBJECT_STRUCTURE			"subject"
+#define COLLADA_KEYWORDS_STRUCTURE			"keywords"
+#define COLLADA_COMMENTS_STRUCTURE			"comments"
+#define COLLADA_UNIT_STRUCTURE				"unit"
+#define COLLADA_SOURCE_DATA_STRUCTURE		"source_data"
+#define COLLADA_UP_AXIS_STRUCTURE			"up_axis"
+#define COLLADA_LIBRARY_STRUCTURE			"library"		// Deprecated 1.4
+#define COLLADA_SCENE_STRUCTURE				"scene"
+#define COLLADA_NODE_STRUCTURE				"node"
+#define COLLADA_MATRIX_STRUCTURE			"matrix"
+#define COLLADA_TRANSFORM_STRUCTURE         "transform"
+#define COLLADA_TRANSLATE_STRUCTURE			"translate"
+#define COLLADA_TRANSLATION_STRUCTURE       "translation"   // For ColladaMax
+#define COLLADA_TRANSLATE_ORIGIN			"origin"        //A fix for Poser(Bug 309548). Handle translate origin info exported from Poser.
+#define COLLADA_TRANSLATE_LOCATION			"location"      //A fix for ? (Bug BARB-154). "location" is synonyn of "translate" ?
+#define COLLADA_ROTATE_STRUCTURE			"rotate"
+#define COLLADA_SCALE_STRUCTURE				"scale"
+#define COLLADA_SKEW_STRUCTURE				"skew"
+#define COLLADA_ROTATE_X					"rotateX"
+#define COLLADA_ROTATE_Y					"rotateY"
+#define COLLADA_ROTATE_Z					"rotateZ"
+#define COLLADA_ROT_X                       "RotX"          // For ColladaMax
+#define COLLADA_ROT_Y                       "RotY"
+#define COLLADA_ROT_Z                       "RotZ"
+#define COLLADA_ROTATION_X                  "rotation_x"    // For XSI
+#define COLLADA_ROTATION_Y                  "rotation_y"
+#define COLLADA_ROTATION_Z                  "rotation_z"
+#define COLLADA_ROTATIONX                   "rotationX"     // BARB-154
+#define COLLADA_ROTATIONY                   "rotationY"
+#define COLLADA_ROTATIONZ                   "rotationZ"
+
+#define COLLADA_ROTATE_PIVOT				"rotatePivot"	// the next 6 subids are recognized by ColladaMaya
+#define COLLADA_SCALE_PIVOT					"scalePivot"
+#define COLLADA_ROTATE_PIVOT_INVERSE		"rotatePivotInverse"
+#define COLLADA_SCALE_PIVOT_INVERSE			"scalePivotInverse"
+#define COLLADA_ROTATE_PIVOT_OFFSET			"rotatePivotTranslation"
+#define COLLADA_SCALE_PIVOT_OFFSET			"scalePivotTranslation"
+#define COLLADA_PRE_ROTATION_X				"jointOrientX"	// these 3 subids recognized by ColladaMaya
+#define COLLADA_PRE_ROTATION_Y				"jointOrientY"
+#define COLLADA_PRE_ROTATION_Z				"jointOrientZ"
+#define COLLADA_POST_ROTATION_X				"post-rotationX"	// these 3 subids NOT recognized by ColladaMaya
+#define COLLADA_POST_ROTATION_Y				"post-rotationY"
+#define COLLADA_POST_ROTATION_Z				"post-rotationZ"
+#define COLLADA_ROTATE_AXIS_X               "rotateAxisX"       // these 3 subids recognized by ColladaMaya
+#define COLLADA_ROTATE_AXIS_Y               "rotateAxisY"
+#define COLLADA_ROTATE_AXIS_Z               "rotateAxisZ"
+#define COLLADA_LOOKAT_STRUCTURE			"lookat"
+#define COLLADA_PERSPECTIVE_STRUCTURE		"perspective"
+#define COLLADA_GEOMETRY_STRUCTURE			"geometry"
+#define COLLADA_MESH_STRUCTURE				"mesh"
+#define COLLADA_VERTICES_STRUCTURE			"vertices"
+#define COLLADA_POLYGONS_STRUCTURE			"polygons"
+#define COLLADA_POLYLIST_STRUCTURE			"polylist" 
+#define COLLADA_TRIANGLES_STRUCTURE			"triangles"
+#define COLLADA_P_STRUCTURE                 "p"
+#define COLLADA_ANIMATION_STRUCTURE			"animation"
+#define COLLADA_CONTROLLER_STRUCTURE		"controller"
+#define COLLADA_SKIN_STRUCTURE				"skin"
+#define COLLADA_COMBINER_STRUCTURE			"combiner"
+#define COLLADA_JOINTS_STRUCTURE			"joints"
+#define COLLADA_VALUE_STRUCTURE				"v"
+#define COLLADA_MATERIAL_STRUCTURE			"material"
+#define COLLADA_SHADER_STRUCTURE			"shader"
+#define COLLADA_PASS_STRUCTURE				"pass"
+#define COLLADA_PROGRAM_STRUCTURE			"program"
+#define COLLADA_TEXTURE_STRUCTURE			"texture"
+#define COLLADA_IMAGE_STRUCTURE				"image"
+#define COLLADA_INPUT_STRUCTURE				"input"
+#define COLLADA_TECHNIQUE_STRUCTURE			"technique"
+#define COLLADA_SOURCE_STRUCTURE			"source"
+#define COLLADA_ACCESSOR_STRUCTURE			"accessor"
+#define COLLADA_EXTRA_STRUCTURE				"extra"
+#define COLLADA_BOUNDINGBOX_STRUCTURE		"boundingbox"
+#define COLLADA_MIN_STRUCTURE				"min"
+#define COLLADA_MAX_STRUCTURE				"max"
+
+#define COLLADA_ARRAY_STRUCTURE				"array"
+#define COLLADA_FLOAT_ARRAY_STRUCTURE		"float_array"
+#define COLLADA_INT_ARRAY_STRUCTURE			"int_array"
+#define COLLADA_NAME_ARRAY_STRUCTURE		"Name_array"
+#define COLLADA_IDREF_ARRAY_STRUCTURE		"IDREF_array"
+#define COLLADA_BOOL_ARRAY_STRUCTURE		"bool_array"
+
+#define COLLADA_SAMPLER_STRUCTURE			"sampler"
+#define COLLADA_CHANNEL_STRUCTURE			"channel"
+#define COLLADA_CAMERA_STRUCTURE			"camera"
+#define COLLADA_LIGHT_STRUCTURE				"light"
+#define COLLADA_OPTICS_STRUCTURE			"optics"
+#define COLLADA_PROGRAM_STRUCTURE			"program"
+#define COLLADA_PARAMETER_STRUCTURE			"param"
+
+#define COLLADA_TYPE_PROPERTY				"type"
+#define COLLADA_ID_PROPERTY					"id"
+#define COLLADA_SUBID_PROPERTY				"sid"
+#define COLLADA_NAME_PROPERTY				"name"
+#define COLLADA_LAYER_PROPERTY              "layer"
+#define COLLADA_COUNT_PROPERTY				"count"
+#define COLLADA_STRIDE_PROPERTY				"stride"
+#define COLLADA_URL_PROPERTY				"url"
+#define COLLADA_SEMANTIC_PROPERTY			"semantic"
+#define COLLADA_SOURCE_PROPERTY				"source"
+#define COLLADA_TARGET_PROPERTY				"target"
+#define COLLADA_PROFILE_PROPERTY			"profile"
+#define COLLADA_MATERIAL_PROPERTY			"material"
+#define COLLADA_METER_PROPERTY				"meter"
+#define COLLADA_IDX_PROPERTY				"idx"
+#define COLLADA_SET_PROPERTY				"set"
+#define COLLADA_OFFSET_PROPERTY				"offset"
+#define COLLADA_FLOW_PROPERTY				"flow"
+#define COLLADA_FORMAT_PROPERTY				"format"
+#define COLLADA_HEIGHT_PROPERTY				"height"
+#define COLLADA_WIDTH_PROPERTY				"width"
+#define COLLADA_DEPTH_PROPERTY				"depth"
+#define COLLADA_REF_PROPERTY                "ref"
+
+#define COLLADA_GEOMETRY_LIBRARY_TYPE		"GEOMETRY"
+#define COLLADA_CONTROLLER_LIBRARY_TYPE		"CONTROLLER"
+#define COLLADA_ANIMATION_LIBRARY_TYPE		"ANIMATION"
+#define COLLADA_MATERIAL_LIBRARY_TYPE		"MATERIAL"
+#define COLLADA_TEXTURE_LIBRARY_TYPE		"TEXTURE"
+#define COLLADA_IMAGE_LIBRARY_TYPE			"IMAGE"
+#define COLLADA_LIGHT_LIBRARY_TYPE			"LIGHT"
+#define COLLADA_CAMERA_LIBRARY_TYPE			"CAMERA"
+
+#define COLLADA_LAMBERT_SHADER_TYPE			"LAMBERT"
+#define COLLADA_PHONG_SHADER_TYPE			"PHONG"
+#define COLLADA_CONSTANT_SHADER_TYPE		"CONSTANT"
+
+#define COLLADA_NAME_TYPE					"name"
+#define COLLADA_IDREF_TYPE					"IDREF"
+#define COLLADA_FLOAT_TYPE					"float"
+#define COLLADA_BOOL_TYPE					"bool"
+#define COLLADA_INT_TYPE					"int"
+#define COLLADA_FLOAT3_TYPE					"float3"
+#define COLLADA_FLOAT4_TYPE					"float4"
+#define COLLADA_FUNCTION_TYPE				"function"
+#define COLLADA_MATRIX_TYPE					"float4x4"
+#define COLLADA_STRING_TYPE                 "string"
+
+#define COLLADA_JOINT_NODE_TYPE				"JOINT"
+#define COLLADA_NODE_NODE_TYPE				"NODE"
+
+#define COLLADA_TEXTURE_SEMANTIC			"TEXTURE"
+#define COLLADA_IMAGE_SEMANTIC				"IMAGE"
+#define COLLADA_INPUT_SEMANTIC				"INPUT"
+#define COLLADA_OUTPUT_SEMANTIC				"OUTPUT"
+#define COLLADA_IN_TANGENT_SEMANTIC			"IN_TANGENT"
+#define COLLADA_OUT_TANGENT_SEMANTIC		"OUT_TANGENT"
+#define COLLADA_INTERPOLATION_SEMANTIC		"INTERPOLATION"
+#define COLLADA_JOINT_SEMANTIC				"JOINT"
+#define COLLADA_BIND_POSITION_SEMANTIC		"BIND_SHAPE_POSITION"
+#define COLLADA_BIND_NORMAL_SEMANTIC		"BIND_SHAPE_NORMAL"
+#define COLLADA_JOINT_AND_WEIGHT_SEMANTIC	"JOINTS_AND_WEIGHTS"
+#define COLLADA_BIND_MATRIX_SEMANTIC		"INV_BIND_MATRIX"
+#define COLLADA_JOINT_PARAMETER				"JOINT"
+#define COLLADA_WEIGHT_PARAMETER			"WEIGHT"
+#define COLLADA_MORPH_TARGET_SEMANTIC		"MORPH_TARGET"
+#define COLLADA_MORPH_WEIGHT_SEMANTIC		"MORPH_WEIGHT"
+
+#define COLLADA_GENERIC_TECHNIQUE			"COMMON"
+
+#define COLLADA_TIME_TARGET					"TIME"
+
+#define COLLADA_VERTEX_INPUT				"VERTEX"
+#define COLLADA_POSITION_INPUT				"POSITION"
+#define COLLADA_NORMAL_INPUT				"NORMAL"
+#define COLLADA_COLOR_INPUT					"COLOR"
+#define COLLADA_MAPPING_INPUT				"UV"
+#define COLLADA_TEXCOORD_INPUT				"TEXCOORD"
+#define COLLADA_TEXTANGENT_INPUT            "TEXTANGENT"
+#define COLLADA_TEXBINORMAL_INPUT           "TEXBINORMAL"
+
+#define COLLADA_LIGHT_INTENSITY_PARAMETER_14			"intensity"
+#define COLLADA_LIGHT_PENUMBRA_ANGLE_PARAMETER_14		"penumbra_angle"
+#define COLLADA_LIGHT_DROPOFF_PARAMETER					"dropoff"
+
+#define COLLADA_CAMERA_YFOV_PARAMETER			"YFOV"
+#define COLLADA_CAMERA_ZNEAR_PARAMETER			"ZNEAR"
+#define COLLADA_CAMERA_ZFAR_PARAMETER			"ZFAR"
+#define COLLADA_CAMERA_ORTHO_BOTTOM_PARAMETER	"BOTTOM"
+#define COLLADA_CAMERA_ORTHO_TOP_PARAMETER		"TOP"
+#define COLLADA_CAMERA_ORTHO_LEFT_PARAMETER		"LEFT"
+#define COLLADA_CAMERA_ORTHO_RIGHT_PARAMETER	"RIGHT"
+
+#define COLLADA_TEXTURE_WRAPU_PARAMETER					"wrapU"
+#define COLLADA_TEXTURE_WRAPV_PARAMETER					"wrapV"
+#define COLLADA_TEXTURE_MIRRORU_PARAMETER				"mirrorU"
+#define COLLADA_TEXTURE_MIRRORV_PARAMETER				"mirrorV"
+#define COLLADA_TEXTURE_BLEND_MODE_PARAMETER			"BLEND_MODE"
+#define COLLADA_TEXTURE_BLEND_MODE_PARAMETER_14			"blend_mode"
+#define COLLADA_TEXTURE_REPEATU_PARAMETER				"repeatU"
+#define COLLADA_TEXTURE_REPEATV_PARAMETER				"repeatV"
+
+#define COLLADA_CONSTANT_FUNCTION			"CONSTANT"
+#define COLLADA_LINEAR_FUNCTION				"LINEAR"
+#define COLLADA_QUADRATIC_FUNCTION			"QUADRATIC"
+
+#define COLLADA_INTERPOLATION_TYPE_LINEAR	"LINEAR"
+#define COLLADA_INTERPOLATION_TYPE_BEZIER	"BEZIER"
+#define COLLADA_INTERPOLATION_TYPE_CARDINAL	"CARDINAL"
+#define COLLADA_INTERPOLATION_TYPE_HERMITE	"HERMITE"
+#define COLLADA_INTERPOLATION_TYPE_BSPLINE	"BSPLINE"
+#define COLLADA_INTERPOLATION_TYPE_STEP		"STEP"
+
+#define COLLADA_X_UP						"X_UP"
+#define COLLADA_Y_UP						"Y_UP"
+#define COLLADA_Z_UP						"Z_UP"
+
+#define COLLADA_IN_FLOW						"IN"
+#define COLLADA_OUT_FLOW					"OUT"
+#define COLLADA_INOUT_FLOW					"INOUT"
+
+// Obsolete, but kept here for backward compatibility.
+#define COLLADA_RGB_TYPE					"ColorRGB"  // use float3 instead
+#define COLLADA_RGBA_TYPE					"ColorRGBA" // use float4 instead
+#define COLLADA_RGB_INPUT					"COLORRGB"	// beta MAX exporter has been known to generate them
+#define COLLADA_RGBA_INPUT					"COLORRGBA"	// beta MAX exporter has been known to generate them
+
+// Physics extension. Currently in prototype phase.
+#define COLLADA_PHYSICS_LIBRARY_TYPE		"PHYSICS"
+#define COLLADA_SHAPE_STRUCTURE				"shape"
+#define	COLLADA_RIGID_BODY_STRUCTURE		"rigidbody"
+#define COLLADA_DYNAMIC_STRUCTURE			"dynamic"
+#define COLLADA_MASS_STRUCTURE				"mass"
+#define COLLADA_PHYSICS_MATERIAL_STRUCTURE	"physics_material"
+#define COLLADA_STATIC_FRICTION_ATTRIBUTE	"STATIC_FRICTION"
+#define COLLADA_DYNAMIC_FRICTION_ATTRIBUTE	"DYNAMIC_FRICTION"
+#define COLLADA_ELASTICITY_ATTRIBUTE		"ELASTICITY"
+#define COLLADA_BOX_STRUCTURE				"box"
+#define COLLADA_SPHERE_STRUCTURE			"sphere"
+#define COLLADA_CAPSULE_STRUCTURE			"capsule"
+#define COLLADA_CYLINDER_STRUCTURE			"cylinder"
+#define COLLADA_ELLIPSOID_STRUCTURE			"ellipsoid"
+#define COLLADA_SIZE_STRUCTURE				"size"
+#define COLLADA_RADIUS_STRUCTURE			"radius"
+#define COLLADA_PHYSICS_ENVIRONMENT_STRUCTURE	"physics_environment"
+#define COLLADA_ENVIRONMENT_ID				"Environment"
+#define COLLADA_TIMESTEP_ATTRIBUTE			"TIMESTEP"
+#define COLLADA_GRAVITY_ATTRIBUTE			"gravity"
+#define COLLADA_INITIAL_VELOCITY_STRUCTURE	"initial_velocity"
+#define COLLADA_INITIAL_ANGULAR_VELOCITY_STRUCTURE	"initial_angular_velocity"
+#define COLLADA_CONVEX_MESH_STRUCTURE		"convex_mesh"
+#define COLLADA_INERTIA_STRUCTURE			"inertia"
+#define COLLADA_DENSITY_STRUCTURE			"density"
+#define COLLADA_CENTER_OF_MASS_STRUCTURE	"center_of_mass"
+#define COLLADA_DYNAMICS_STRUCTURE			"dynamics"
+#define COLLADA_RIGID_CONSTRAINT_STRUCTURE	"rigid_constraint"
+#define COLLADA_BODY_PROPERTY				"body"
+#define COLLADA_ATTACHMENT_STRUCTURE		"attachment"
+#define COLLADA_ROT_LIMIT_MIN_STRUCTURE		"rot_limit_min"
+#define COLLADA_ROT_LIMIT_MAX_STRUCTURE		"rot_limit_max"
+#define COLLADA_TRANS_LIMIT_MIN_STRUCTURE	"trans_limit_min"
+#define COLLADA_TRANS_LIMIT_MAX_STRUCTURE	"trans_limit_max"
+#define COLLADA_ENABLED_STRUCTURE			"enabled"
+#define COLLADA_INTERPENETRATE_STRUCTURE	"interpenetrate"
+#define COLLADA_SPRING_STRUCTURE			"spring"
+#define COLLADA_STIFFNESS_STRUCTURE			"stiffness"
+#define COLLADA_DAMPING_STRUCTURE			"damping"
+#define COLLADA_REST_LENGTH_STRUCTURE		"rest_length"
+#define COLLADA_P0_STRUCTURE				"p0"
+#define COLLADA_P1_STRUCTURE				"p1"
+#define COLLADA_TRUE_KEYWORD				"TRUE"
+#define COLLADA_FALSE_KEYWORD				"FALSE"
+
+#define COLLADA_LINES_STRUCTURE				"lines"
+#define COLLADA_LINESTRIP_STRUCTURE			"linestrips"
+#define COLLADA_TRIFANS_STRUCTURE			"trifans"
+#define COLLADA_TRISTRIPS_STRUCTURE			"tristrips"
+
+// Extensions
+
+// Feeling Software ColladaMaya extensions
+#define COLLADA_MAYA_PROFILE                "MAYA"
+
+#define COLLADA_MAYA_LAYER_ELEMENT          "layer"
+
+// Feeling Software ColladaMax extensions
+#define COLLADA_MAX3D_PROFILE               "MAX3D"
+
+#define COLLADA_MAX3D_FRAMERATE_ELEMENT     "frame_rate"
+
+// Feeling Software FCollada extensions
+#define COLLADA_FCOLLADA_PROFILE            "FCOLLADA"
+
+#define COLLADA_FCOLLADA_STARTTIME_ELEMENT  "start_time"
+#define COLLADA_FCOLLADA_ENDTIME_ELEMENT    "end_time"
+#define COLLADA_FCOLLADA_VISIBILITY_ELEMENT "visibility"
+
+// XSI COLLADA extensions
+#define COLLADA_XSI_PROFILE                 "XSI"
+
+#define COLLADA_XSI_VISIBILITY_ELEMENT      "SI_Visibility"
+
+// FBX COLLADA extensions
+#define COLLADA_FBX_PROFILE                 "FBX"
+
+#define COLLADA_FBX_TARGET_ELEMENT          "target"
+
+// NVidia FXComposer extension -----------------------------------------------//
+
+#define COLLADA_NVIDIA_FXCOMPOSER_PROFILE           "NVIDIA_FXCOMPOSER"
+
+#define COLLADA_NVIDIA_FXCOMPOSER_IMPORT_ELEMENT    "import"
+#define COLLADA_NVIDIA_FXCOMPOSER_URL_ATTRIBUTE     "url"
+#define COLLADA_NVIDIA_FXCOMPOSER_COMPILER_OPTIONS_ATTRIBUTE  "compiler_options"
+#define COLLADA_NVIDIA_FXCOMPOSER_PROFILE_ATTRIBUTE "profile"
+
+#endif /* _FBXSDK_FILEIO_COLLADA_TOKENS_H_ */

+ 370 - 370
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxcolladautils.h

@@ -1,370 +1,370 @@
-/****************************************************************************************
- 
-   Copyright (C) 2015 Autodesk, Inc.
-   All rights reserved.
- 
-   Use of this software is subject to the terms of the Autodesk license agreement
-   provided at the time of installation or download, or which otherwise accompanies
-   this software in either electronic or hard copy form.
- 
-****************************************************************************************/
-
-//! \file fbxcolladautils.h
-#ifndef _FBXSDK_FILEIO_COLLADA_UTILS_H_
-#define _FBXSDK_FILEIO_COLLADA_UTILS_H_
-
-#include <fbxsdk.h>
-
-#include <fbxsdk/fileio/collada/fbxcolladatokens.h>
-#include <fbxsdk/fileio/collada/fbxcolladaiostream.h>
-
-#include <components/libxml2-2.7.8/include/libxml/globals.h>
-
-#include <fbxsdk/fbxsdk_nsbegin.h>
-
-#ifndef INT_MAX
-	#define INT_MAX 0x7FFFFFFF
-#endif
-
-#ifndef CENTIMETERS_TO_INCHES
-	#define CENTIMETERS_TO_INCHES 2.54f
-#endif
-
-#ifndef RADIANS_TO_DEGREES
-	#define RADIANS_TO_DEGREES 57.295799f
-#endif
-
-enum DAE_Flow { kCOLLADAFlowIn, kCOLLADAFlowOut, kCOLLADAFlowInOut };
-
-const int MATRIX_STRIDE = 16;
-const int VECTOR_STRIDE = 3;
-
-#define COLLADA_ID_PROPERTY_NAME "COLLADA_ID"
-
-class XmlNodeDeletionPolicy
-{
-public:
-    static inline void DeleteIt(xmlNode ** ptr)
-    {
-        if (*ptr != NULL)
-        {
-            xmlFreeNode(*ptr);
-            *ptr = NULL;
-        }
-    }
-};
-
-typedef FbxAutoPtr<xmlNode, XmlNodeDeletionPolicy> XmlNodePtr;
-typedef FbxMap< FbxString, xmlNode* > SourceElementMapType;
-typedef FbxMap< FbxString, xmlNode* > SkinMapType;
-
-// Some information connecting COLLADA layer string, such as "NORMAL" or "UV", to FBX layer element type.
-struct ColladaLayerTraits
-{
-    ColladaLayerTraits() 
-		: mLayerType(FbxLayerElement::eUnknown), mLayerElementLength(0) {}
-		
-    ColladaLayerTraits(FbxLayerElement::EType pType, int pLength)
-        : mLayerType(pType), mLayerElementLength(pLength) {}
-
-    // Type of FBX element layer
-    FbxLayerElement::EType mLayerType;
-    // Count of double of each element in FBX element layer
-    int mLayerElementLength;
-
-    /** Construct traits according to COLLADA layer string.
-      * \param pLabel COLLADA layer string.
-      * \return Return created traits.
-      */
-    static const ColladaLayerTraits GetLayerTraits(const FbxString & pLabel);
-};
-
-/** Emit error message.
-  * \param pSdkManger The SDK manager used to access user notification object.
-  * \param pErrorMessage The message to be presented.
-  */
-void DAE_AddNotificationError(const FbxManager * pSdkManger, const FbxString & pErrorMessage);
-
-/** Emit warning message.
-  * \param pSdkManger The SDK manager used to access user notification object.
-  * \param pWarningMessage The message to be presented.
-  */
-void DAE_AddNotificationWarning(const FbxManager * pSdkManger, const FbxString & pWarningMessage);
-
-void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector4>& arr);
-void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector2>& arr);
-void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<FbxColor>& arr);
-void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<double>& arr);
-void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxStringList& arr);
-
-// Syntax modification - for COLLADA 1.4
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxStringList& accessorParams, FbxArray<double>& arr, bool isCommonProfile=true); 
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector4>& arr);
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector2>& arr);
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxColor>& arr);
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxAMatrix>& arr); 
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxMatrix>& arr);
-xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxStringList& arr, const char* type, bool isCommonProfile=true);
-
-
-void DAE_ExportSourceArray(xmlNode* sourceNode, const char* id, FbxArray<FbxColor>& arr);
-void DAE_ExportSourceArray14(xmlNode* sourceNode, const char* id, FbxArray<FbxColor>& arr);
-
-xmlNode* DAE_ExportAccessor(xmlNode* parentXmlNode, const char* id, const char* arrayRef, int count, int stride, const char* name, const char* type);
-xmlNode* DAE_ExportAccessor14(xmlNode* parentXmlNode, const char* id, const char* arrayRef, int count, int stride, const char* name, const char* type);
-
-void DAE_AddXYZAccessor(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
-void DAE_AddSTAccessor(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
-void DAE_AddFlow(xmlNode* node, DAE_Flow flow);
-void DAE_AddXYZAccessor14(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
-void DAE_AddSTAccessor14(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
-
-// AddParameter functions for COLLADA 1.3.
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxColor& color, DAE_Flow flow);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxVector4& vector, DAE_Flow flow);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, double value, DAE_Flow flow);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, bool value, DAE_Flow flow);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const char* type, const char* value, DAE_Flow flow);
-
-// Overload functions without DAE_Flow, for COLLADA 1.4.
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxDouble3& color);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxColor& color);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxVector4& vector);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, double value);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, bool value);
-xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const char* type, const char* value);
-xmlNode* DAE_AddTechnique(xmlNode* parentXmlNode, const char* technique);
-void DAE_AddInput(xmlNode* parentXmlNode, const char* semantic, const char* source, int idx = -1);
-void DAE_AddInput14(xmlNode* parentXmlNode, const char* semantic, const char* source, int offset = -1, int set=-1);
-
-FbxString matrixToString(const FbxAMatrix& mx);
-
-typedef FbxArray<xmlNode*> CNodeList;
-
-/** Find children elements whose type is included in a list of type.
-  * \param pParentElement The parent element.
-  * \param pTypes The list of types.
-  * \param pChildrenElements The found children elements.
-  */
-void findChildrenByType(xmlNode* pParentElement, const FbxSet<FbxString>& pTypes, CNodeList& pChildrenElements);
-
-/** Find children elements of a specific type.
-  * \param pParentElement The parent element.
-  * \param pType The type.
-  * \param pChildrenElements The found children elements.
-  */
-void findChildrenByType(xmlNode* pParentElement, const char * pType, CNodeList& pChildrenElements);
-
-xmlNode* getSourceAccessor(xmlNode* sourceNode);
-xmlNode* getTechniqueNode(xmlNode* parent, const char * profile);
-
-// Conversions
-inline double inchesToCentimeters(double val) { return FbxFloor(val / CENTIMETERS_TO_INCHES * 100000) / 100000; }
-inline double centimetersToInches(double val) { return FbxFloor(val * CENTIMETERS_TO_INCHES * 100000) / 100000; }
-
-inline double degreesToRadians(double val) { return FbxFloor(val / RADIANS_TO_DEGREES * 100000) / 100000; }
-inline double radiansToDegrees(double val) { return FbxFloor(val * RADIANS_TO_DEGREES * 100000) / 100000; }
-
-/** Find a child element with a given attribute value.
-  * \param pParentElement The parent element.
-  * \param pAttributeName The name of the attribute.
-  * \param pAttributeValue The value of the attribute.
-  * \param pDefaultAttributeValue The default value of the attribute used when the attribute is not found explicitly.
-  * \return Return NULL if no child element has the given attribute value.
-  */
-xmlNode* DAE_FindChildElementByAttribute(xmlNode* pParentElement, const char * pAttributeName,
-                                        const char * pAttributeValue, const char * pDefaultAttributeValue = "");
-
-/** Find a child element with a given tag.
-  * \param pParentElement The parent element.
-  * \param pTag The value of the tag.
-  * \param pFindFrom Find from the next child after pFindFrom if pFindFrom is not NULL.
-  * \return Return NULL if no child element has the given tag.
-  */
-xmlNode* DAE_FindChildElementByTag(xmlNode* pParentElement, const char * pTag, xmlNode* pFindFrom = NULL);
-
-/** Get the content of a XML element.
-  * \param pElement The element whose content is returned.
-  * \param pData The returned data.
-  */
-template <typename TYPE>
-void DAE_GetElementContent(xmlNode * pElement, TYPE & pData)
-{
-    if (pElement != NULL)
-    {
-        FbxAutoFreePtr<xmlChar> lContent(xmlNodeGetContent(pElement));
-        FromString(&pData, (const char *)lContent.Get());
-    }
-}
-
-/** Check whether this node is compatible to FBX transform structure.
-  * \param pNodeElement The specific node element.
-  * \return Return true if it is compatible.
-  */
-bool DAE_CheckCompatibility(xmlNode * pNodeElement);
-
-/** Get the tag of the specific element.
-  * \param pElement The specific element.
-  * \param pTag Return the tag of the element.
-  */
-void DAE_GetElementTag(xmlNode * pElement, FbxString & pTag);
-
-/** Get the value of an attribute of an element.
-  * \param pElement The specific XML element.
-  * \param pAttributeName The name of the specific attribute.
-  * \return The value of the attribute in the form of a string. If the attribute is not available, an empty string is returned.
-  */
-const FbxString DAE_GetElementAttributeValue(xmlNode * pElement, const char * pAttributeName);
-
-/** Get the value of an attribute of an element.
-  * \param pElement The specific XML element.
-  * \param pAttributeName The name of the specific attribute.
-  * \param pData The returned data.
-  * \return Return \c true on success and \c false if no attribute has the given name.
-  */
-template <typename TYPE>
-bool DAE_GetElementAttributeValue(xmlNode * pElement, const char * pAttributeName, TYPE & pData)
-{
-    if (!pElement || !pAttributeName)
-        return false;
-
-    FbxAutoFreePtr<xmlChar> lPropertyValue(xmlGetProp(pElement, (const xmlChar *)pAttributeName));
-    if (lPropertyValue)
-    {
-        FromString(&pData, (const char *)lPropertyValue.Get());
-        return true;
-    }
-    return false;
-}
-
-// Special instantiation for string;
-// Omit the whitespaces, just return the whole string
-template <>
-inline bool DAE_GetElementAttributeValue(xmlNode * pElement,
-                                         const char * pAttributeName,
-                                         FbxString & pData)
-{
-    if (!pElement || !pAttributeName)
-        return false;
-
-    FbxAutoFreePtr<xmlChar> lPropertyValue(xmlGetProp(pElement, (const xmlChar *)pAttributeName));
-    if (lPropertyValue)
-    {
-        pData = (const char *)lPropertyValue.Get();
-        return true;
-    }
-    return false;
-}
-
-/** Compare the value of specific attribute of specific element with given value.
-  * \param pElement The specific element.
-  * \param pAttributeName The name of the specific attribute.
-  * \param pValue The value to compare with.
-  * \return Return true if values equal.
-  */
-bool DAE_CompareAttributeValue(xmlNode * pElement,
-                                      const char * pAttributeName,
-                                      const char * pValue);
-
-/** Get the ID of another element from the url attribute of the given element.
-  * \param pElement The specific XML element in which the ID is looked for.
-  * \return The ID of another element if success, or an empty string if no url attributes are found.
-  */
-const FbxString DAE_GetIDFromUrlAttribute(xmlNode * pElement);
-
-/** Get the ID of another element from the source attribute of the given element.
-  * \param pElement The specific XML element in which the ID is looked for.
-  * \return The ID of another element if success, or an empty string if no source attributes are found.
-  */
-const FbxString DAE_GetIDFromSourceAttribute(xmlNode * pElement);
-
-/** Get the ID of another element from the target attribute of the given element.
-  * Note that in target attribute, the URI identifier may or may not preceded with the pound sign.
-  * \param pElement The specific XML element in which the ID is looked for.
-  * \return The ID of another element if success, or an empty string if no target attributes are found.
-  */
-const FbxString DAE_GetIDFromTargetAttribute(xmlNode * pElement);
-
-/** Set the name of the object with a given name. If the name is empty, use the ID.
-  * \param pObject The object whose name is to be set.
-  * \param pName The name string.
-  * \param pID The ID string.
-  */
-void DAE_SetName(FbxObject * pObject, const FbxString & pName, const FbxString & pID);
-
-/** Get the COLLADA source element with a semantic meaning and a consumer element;
-  * The COLLADA input element declares the input connections to a data source that a consumer requires.
-  * A data source is a container of raw data that lacks semantic meaning so that the data can be reused within the
-  * document. To use the data, a consumer declares a connection to it with the desired semantic information.
-  * \param pConsumerElement A consumer element, like sampler element in animation system or joints element in controller system.
-  * \param pSemantic A semantic meaning, like "INPUT", "OUTPUT" or "INTERPOLATION" in animation system.
-  * \param pSourceElements The container of raw data.
-  * \return Return \c NULL is failed.
-  */
-xmlNode * DAE_GetSourceWithSemantic(xmlNode * pConsumerElement, const char * pSemantic,
-                                    const SourceElementMapType & pSourceElements);
-
-/** Add a child element with specific content.
-  * \param pParentElement The parent element.
-  * \param pTag The tag string of the new child element.
-  * \param pContent The content of the child element.
-  * \return The created child element.
-  */
-template <typename T>
-xmlNode * DAE_AddChildElement(xmlNode * pParentElement, const char * pTag,
-                              const T & pContent)
-{
-    const FbxString lRepr = ToString(pContent);
-    return xmlNewChild(pParentElement, NULL, (xmlChar *)pTag,
-        (xmlChar *)lRepr.Buffer());
-}
-
-// Create a child element with empty content.
-inline xmlNode * DAE_AddChildElement(xmlNode * pParentElement, const char * pTag)
-{
-    return DAE_AddChildElement(pParentElement, pTag, FbxString());
-}
-
-// Create a new element with empty content.
-inline xmlNode * DAE_NewElement(const char * pTag)
-{
-    return xmlNewNode(NULL, reinterpret_cast<xmlChar*>(const_cast<char *>(pTag)));
-}
-
-/** Add an attribute for a element.
-  * \param pElement The element where the attribute is added.
-  * \param pAttributeName The name of the attribute.
-  * \param pAttributeValue The value of the attribute.
-  * \return The created attribute.
-  */
-template <typename T>
-xmlAttr * DAE_AddAttribute(xmlNode * pElement, const FbxString & pAttributeName,
-                           const T & pAttributeValue)
-{
-    const FbxString lRepr = ToString(pAttributeValue);
-    return xmlNewProp(pElement, (xmlChar *)pAttributeName.Buffer(),
-        (xmlChar *)lRepr.Buffer());
-}
-
-/** Import a COLLADA unit element into a FBX system unit.
-  * \param pUnitElement The COLLADA unit element.
-  * \return The created FBX system unit.
-  */
-const FbxSystemUnit DAE_ImportUnit(xmlNode * pUnitElement);
-
-/** If the specific node has animation on its local translation, increase every key by the offset.
-  * \param pNode The specific node.
-  * \param pOffset The specific offset value.
-  */
-void IncreaseLclTranslationAnimation(FbxNode * pNode, FbxDouble3 & pOffset);
-
-/** Search the elements with given tag, push the found results to the end of the given array.
-  * \param pBaseElement Search from this element.
-  * \param pTag The given tag.
-  * \param pResult The array to return the found results.
-  */
-void RecursiveSearchElement(xmlNode * pBaseElement, const char * pTag, FbxArray<xmlNode*> & pResult);
-
-#include <fbxsdk/fbxsdk_nsend.h>
-
-#endif /* _FBXSDK_FILEIO_COLLADA_UTILS_H_ */
+/****************************************************************************************
+ 
+   Copyright (C) 2015 Autodesk, Inc.
+   All rights reserved.
+ 
+   Use of this software is subject to the terms of the Autodesk license agreement
+   provided at the time of installation or download, or which otherwise accompanies
+   this software in either electronic or hard copy form.
+ 
+****************************************************************************************/
+
+//! \file fbxcolladautils.h
+#ifndef _FBXSDK_FILEIO_COLLADA_UTILS_H_
+#define _FBXSDK_FILEIO_COLLADA_UTILS_H_
+
+#include <fbxsdk.h>
+
+#include <fbxsdk/fileio/collada/fbxcolladatokens.h>
+#include <fbxsdk/fileio/collada/fbxcolladaiostream.h>
+
+#include <components/libxml2-2.7.8/include/libxml/globals.h>
+
+#include <fbxsdk/fbxsdk_nsbegin.h>
+
+#ifndef INT_MAX
+	#define INT_MAX 0x7FFFFFFF
+#endif
+
+#ifndef CENTIMETERS_TO_INCHES
+	#define CENTIMETERS_TO_INCHES 2.54f
+#endif
+
+#ifndef RADIANS_TO_DEGREES
+	#define RADIANS_TO_DEGREES 57.295799f
+#endif
+
+enum DAE_Flow { kCOLLADAFlowIn, kCOLLADAFlowOut, kCOLLADAFlowInOut };
+
+const int MATRIX_STRIDE = 16;
+const int VECTOR_STRIDE = 3;
+
+#define COLLADA_ID_PROPERTY_NAME "COLLADA_ID"
+
+class XmlNodeDeletionPolicy
+{
+public:
+    static inline void DeleteIt(xmlNode ** ptr)
+    {
+        if (*ptr != NULL)
+        {
+            xmlFreeNode(*ptr);
+            *ptr = NULL;
+        }
+    }
+};
+
+typedef FbxAutoPtr<xmlNode, XmlNodeDeletionPolicy> XmlNodePtr;
+typedef FbxMap< FbxString, xmlNode* > SourceElementMapType;
+typedef FbxMap< FbxString, xmlNode* > SkinMapType;
+
+// Some information connecting COLLADA layer string, such as "NORMAL" or "UV", to FBX layer element type.
+struct ColladaLayerTraits
+{
+    ColladaLayerTraits() 
+		: mLayerType(FbxLayerElement::eUnknown), mLayerElementLength(0) {}
+		
+    ColladaLayerTraits(FbxLayerElement::EType pType, int pLength)
+        : mLayerType(pType), mLayerElementLength(pLength) {}
+
+    // Type of FBX element layer
+    FbxLayerElement::EType mLayerType;
+    // Count of double of each element in FBX element layer
+    int mLayerElementLength;
+
+    /** Construct traits according to COLLADA layer string.
+      * \param pLabel COLLADA layer string.
+      * \return Return created traits.
+      */
+    static const ColladaLayerTraits GetLayerTraits(const FbxString & pLabel);
+};
+
+/** Emit error message.
+  * \param pSdkManger The SDK manager used to access user notification object.
+  * \param pErrorMessage The message to be presented.
+  */
+void DAE_AddNotificationError(const FbxManager * pSdkManger, const FbxString & pErrorMessage);
+
+/** Emit warning message.
+  * \param pSdkManger The SDK manager used to access user notification object.
+  * \param pWarningMessage The message to be presented.
+  */
+void DAE_AddNotificationWarning(const FbxManager * pSdkManger, const FbxString & pWarningMessage);
+
+void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector4>& arr);
+void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector2>& arr);
+void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<FbxColor>& arr);
+void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxArray<double>& arr);
+void DAE_ExportArray(xmlNode* parentXmlNode, const char* id, FbxStringList& arr);
+
+// Syntax modification - for COLLADA 1.4
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxStringList& accessorParams, FbxArray<double>& arr, bool isCommonProfile=true); 
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector4>& arr);
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxVector2>& arr);
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxColor>& arr);
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxAMatrix>& arr); 
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxArray<FbxMatrix>& arr);
+xmlNode* DAE_ExportSource14(xmlNode* parentXmlNode, const char* id, FbxStringList& arr, const char* type, bool isCommonProfile=true);
+
+
+void DAE_ExportSourceArray(xmlNode* sourceNode, const char* id, FbxArray<FbxColor>& arr);
+void DAE_ExportSourceArray14(xmlNode* sourceNode, const char* id, FbxArray<FbxColor>& arr);
+
+xmlNode* DAE_ExportAccessor(xmlNode* parentXmlNode, const char* id, const char* arrayRef, int count, int stride, const char* name, const char* type);
+xmlNode* DAE_ExportAccessor14(xmlNode* parentXmlNode, const char* id, const char* arrayRef, int count, int stride, const char* name, const char* type);
+
+void DAE_AddXYZAccessor(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
+void DAE_AddSTAccessor(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
+void DAE_AddFlow(xmlNode* node, DAE_Flow flow);
+void DAE_AddXYZAccessor14(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
+void DAE_AddSTAccessor14(xmlNode* parentXmlNode, const char* profile, const char* arrayName, const char* arrayRef, int count);
+
+// AddParameter functions for COLLADA 1.3.
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxColor& color, DAE_Flow flow);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxVector4& vector, DAE_Flow flow);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, double value, DAE_Flow flow);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, bool value, DAE_Flow flow);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const char* type, const char* value, DAE_Flow flow);
+
+// Overload functions without DAE_Flow, for COLLADA 1.4.
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxDouble3& color);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxColor& color);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const FbxVector4& vector);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, double value);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, bool value);
+xmlNode* DAE_AddParameter(xmlNode* parentXmlNode, const char* name, const char* type, const char* value);
+xmlNode* DAE_AddTechnique(xmlNode* parentXmlNode, const char* technique);
+void DAE_AddInput(xmlNode* parentXmlNode, const char* semantic, const char* source, int idx = -1);
+void DAE_AddInput14(xmlNode* parentXmlNode, const char* semantic, const char* source, int offset = -1, int set=-1);
+
+FbxString matrixToString(const FbxAMatrix& mx);
+
+typedef FbxArray<xmlNode*> CNodeList;
+
+/** Find children elements whose type is included in a list of type.
+  * \param pParentElement The parent element.
+  * \param pTypes The list of types.
+  * \param pChildrenElements The found children elements.
+  */
+void findChildrenByType(xmlNode* pParentElement, const FbxSet<FbxString>& pTypes, CNodeList& pChildrenElements);
+
+/** Find children elements of a specific type.
+  * \param pParentElement The parent element.
+  * \param pType The type.
+  * \param pChildrenElements The found children elements.
+  */
+void findChildrenByType(xmlNode* pParentElement, const char * pType, CNodeList& pChildrenElements);
+
+xmlNode* getSourceAccessor(xmlNode* sourceNode);
+xmlNode* getTechniqueNode(xmlNode* parent, const char * profile);
+
+// Conversions
+inline double inchesToCentimeters(double val) { return FbxFloor(val / CENTIMETERS_TO_INCHES * 100000) / 100000; }
+inline double centimetersToInches(double val) { return FbxFloor(val * CENTIMETERS_TO_INCHES * 100000) / 100000; }
+
+inline double degreesToRadians(double val) { return FbxFloor(val / RADIANS_TO_DEGREES * 100000) / 100000; }
+inline double radiansToDegrees(double val) { return FbxFloor(val * RADIANS_TO_DEGREES * 100000) / 100000; }
+
+/** Find a child element with a given attribute value.
+  * \param pParentElement The parent element.
+  * \param pAttributeName The name of the attribute.
+  * \param pAttributeValue The value of the attribute.
+  * \param pDefaultAttributeValue The default value of the attribute used when the attribute is not found explicitly.
+  * \return Return NULL if no child element has the given attribute value.
+  */
+xmlNode* DAE_FindChildElementByAttribute(xmlNode* pParentElement, const char * pAttributeName,
+                                        const char * pAttributeValue, const char * pDefaultAttributeValue = "");
+
+/** Find a child element with a given tag.
+  * \param pParentElement The parent element.
+  * \param pTag The value of the tag.
+  * \param pFindFrom Find from the next child after pFindFrom if pFindFrom is not NULL.
+  * \return Return NULL if no child element has the given tag.
+  */
+xmlNode* DAE_FindChildElementByTag(xmlNode* pParentElement, const char * pTag, xmlNode* pFindFrom = NULL);
+
+/** Get the content of a XML element.
+  * \param pElement The element whose content is returned.
+  * \param pData The returned data.
+  */
+template <typename TYPE>
+void DAE_GetElementContent(xmlNode * pElement, TYPE & pData)
+{
+    if (pElement != NULL)
+    {
+        FbxAutoFreePtr<xmlChar> lContent(xmlNodeGetContent(pElement));
+        FromString(&pData, (const char *)lContent.Get());
+    }
+}
+
+/** Check whether this node is compatible to FBX transform structure.
+  * \param pNodeElement The specific node element.
+  * \return Return true if it is compatible.
+  */
+bool DAE_CheckCompatibility(xmlNode * pNodeElement);
+
+/** Get the tag of the specific element.
+  * \param pElement The specific element.
+  * \param pTag Return the tag of the element.
+  */
+void DAE_GetElementTag(xmlNode * pElement, FbxString & pTag);
+
+/** Get the value of an attribute of an element.
+  * \param pElement The specific XML element.
+  * \param pAttributeName The name of the specific attribute.
+  * \return The value of the attribute in the form of a string. If the attribute is not available, an empty string is returned.
+  */
+const FbxString DAE_GetElementAttributeValue(xmlNode * pElement, const char * pAttributeName);
+
+/** Get the value of an attribute of an element.
+  * \param pElement The specific XML element.
+  * \param pAttributeName The name of the specific attribute.
+  * \param pData The returned data.
+  * \return Return \c true on success and \c false if no attribute has the given name.
+  */
+template <typename TYPE>
+bool DAE_GetElementAttributeValue(xmlNode * pElement, const char * pAttributeName, TYPE & pData)
+{
+    if (!pElement || !pAttributeName)
+        return false;
+
+    FbxAutoFreePtr<xmlChar> lPropertyValue(xmlGetProp(pElement, (const xmlChar *)pAttributeName));
+    if (lPropertyValue)
+    {
+        FromString(&pData, (const char *)lPropertyValue.Get());
+        return true;
+    }
+    return false;
+}
+
+// Special instantiation for string;
+// Omit the whitespaces, just return the whole string
+template <>
+inline bool DAE_GetElementAttributeValue(xmlNode * pElement,
+                                         const char * pAttributeName,
+                                         FbxString & pData)
+{
+    if (!pElement || !pAttributeName)
+        return false;
+
+    FbxAutoFreePtr<xmlChar> lPropertyValue(xmlGetProp(pElement, (const xmlChar *)pAttributeName));
+    if (lPropertyValue)
+    {
+        pData = (const char *)lPropertyValue.Get();
+        return true;
+    }
+    return false;
+}
+
+/** Compare the value of specific attribute of specific element with given value.
+  * \param pElement The specific element.
+  * \param pAttributeName The name of the specific attribute.
+  * \param pValue The value to compare with.
+  * \return Return true if values equal.
+  */
+bool DAE_CompareAttributeValue(xmlNode * pElement,
+                                      const char * pAttributeName,
+                                      const char * pValue);
+
+/** Get the ID of another element from the url attribute of the given element.
+  * \param pElement The specific XML element in which the ID is looked for.
+  * \return The ID of another element if success, or an empty string if no url attributes are found.
+  */
+const FbxString DAE_GetIDFromUrlAttribute(xmlNode * pElement);
+
+/** Get the ID of another element from the source attribute of the given element.
+  * \param pElement The specific XML element in which the ID is looked for.
+  * \return The ID of another element if success, or an empty string if no source attributes are found.
+  */
+const FbxString DAE_GetIDFromSourceAttribute(xmlNode * pElement);
+
+/** Get the ID of another element from the target attribute of the given element.
+  * Note that in target attribute, the URI identifier may or may not preceded with the pound sign.
+  * \param pElement The specific XML element in which the ID is looked for.
+  * \return The ID of another element if success, or an empty string if no target attributes are found.
+  */
+const FbxString DAE_GetIDFromTargetAttribute(xmlNode * pElement);
+
+/** Set the name of the object with a given name. If the name is empty, use the ID.
+  * \param pObject The object whose name is to be set.
+  * \param pName The name string.
+  * \param pID The ID string.
+  */
+void DAE_SetName(FbxObject * pObject, const FbxString & pName, const FbxString & pID);
+
+/** Get the COLLADA source element with a semantic meaning and a consumer element;
+  * The COLLADA input element declares the input connections to a data source that a consumer requires.
+  * A data source is a container of raw data that lacks semantic meaning so that the data can be reused within the
+  * document. To use the data, a consumer declares a connection to it with the desired semantic information.
+  * \param pConsumerElement A consumer element, like sampler element in animation system or joints element in controller system.
+  * \param pSemantic A semantic meaning, like "INPUT", "OUTPUT" or "INTERPOLATION" in animation system.
+  * \param pSourceElements The container of raw data.
+  * \return Return \c NULL is failed.
+  */
+xmlNode * DAE_GetSourceWithSemantic(xmlNode * pConsumerElement, const char * pSemantic,
+                                    const SourceElementMapType & pSourceElements);
+
+/** Add a child element with specific content.
+  * \param pParentElement The parent element.
+  * \param pTag The tag string of the new child element.
+  * \param pContent The content of the child element.
+  * \return The created child element.
+  */
+template <typename T>
+xmlNode * DAE_AddChildElement(xmlNode * pParentElement, const char * pTag,
+                              const T & pContent)
+{
+    const FbxString lRepr = ToString(pContent);
+    return xmlNewChild(pParentElement, NULL, (xmlChar *)pTag,
+        (xmlChar *)lRepr.Buffer());
+}
+
+// Create a child element with empty content.
+inline xmlNode * DAE_AddChildElement(xmlNode * pParentElement, const char * pTag)
+{
+    return DAE_AddChildElement(pParentElement, pTag, FbxString());
+}
+
+// Create a new element with empty content.
+inline xmlNode * DAE_NewElement(const char * pTag)
+{
+    return xmlNewNode(NULL, reinterpret_cast<xmlChar*>(const_cast<char *>(pTag)));
+}
+
+/** Add an attribute for a element.
+  * \param pElement The element where the attribute is added.
+  * \param pAttributeName The name of the attribute.
+  * \param pAttributeValue The value of the attribute.
+  * \return The created attribute.
+  */
+template <typename T>
+xmlAttr * DAE_AddAttribute(xmlNode * pElement, const FbxString & pAttributeName,
+                           const T & pAttributeValue)
+{
+    const FbxString lRepr = ToString(pAttributeValue);
+    return xmlNewProp(pElement, (xmlChar *)pAttributeName.Buffer(),
+        (xmlChar *)lRepr.Buffer());
+}
+
+/** Import a COLLADA unit element into a FBX system unit.
+  * \param pUnitElement The COLLADA unit element.
+  * \return The created FBX system unit.
+  */
+const FbxSystemUnit DAE_ImportUnit(xmlNode * pUnitElement);
+
+/** If the specific node has animation on its local translation, increase every key by the offset.
+  * \param pNode The specific node.
+  * \param pOffset The specific offset value.
+  */
+void IncreaseLclTranslationAnimation(FbxNode * pNode, FbxDouble3 & pOffset);
+
+/** Search the elements with given tag, push the found results to the end of the given array.
+  * \param pBaseElement Search from this element.
+  * \param pTag The given tag.
+  * \param pResult The array to return the found results.
+  */
+void RecursiveSearchElement(xmlNode * pBaseElement, const char * pTag, FbxArray<xmlNode*> & pResult);
+
+#include <fbxsdk/fbxsdk_nsend.h>
+
+#endif /* _FBXSDK_FILEIO_COLLADA_UTILS_H_ */

Fichier diff supprimé car celui-ci est trop grand
+ 557 - 557
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxreadercollada14.h


Fichier diff supprimé car celui-ci est trop grand
+ 570 - 570
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/collada/fbxwritercollada14.h


+ 0 - 0
Exporters/FBX/3rdParty/Fbx2016/include/fbxsdk/fileio/fbx/fbxio.h


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff