{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}{\f1\fswiss\fprq2\fcharset0 Arial;}{\f2\fnil\fprq1\fcharset0 Courier New;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\b\f0\fs20 Author:\par \b0 Jason Zelsnack, All rights reserved.\par \par \par \b Version:\b0\par This wrapper is for Novodex 2.5.1\par \par \par \b Requirements:\b0\par The Novodex Wrapper consists of two DLLs, Novodex_C_Wrapper.dll and Novodex_NET_wrapper.dll.\par There's also a DirectX specific version of the NET dll called DirectX_Novodex_NET_Wrapper.dll.\par Besides the wrapper DLLs you will need PhysXLoader.dll and PhysXCore.dll.\par If you use any meshes of any type you will need NxCooking.dll.\par If you use certain classes like the Controller classes you will need NxCharacter.dll.\par All those DLLs are located in the project bin directories.\par Make sure you have at least 2.5.1 SystemSoftware driver installed.\par \par \b\par Differences from 2.4.4 to 2.5.1\b0\par Cloths do not tear anymore. You have to manually describe which vertices are tearible with\par NxClothMeshDesc and that isn't supported in an easily usable way yet.\par Some methods have been dropped and some new methods and classes have been added.\par The new methods and classes are listed in the "Missing Methods" and "Missing Classes" sections below.\par \par \par \b DirectX Stuff:\par \b0 The only difference between the DirectX version and the non-DirectX version is the use of\par Vector3 and Matrix in place of NxVec3 and NxMat34/NxMat33 in most places. NxVec3/NxMat34/NxMat33\par still appear in the DirectX version but mostly buried deep inside classes where you should \par never have to use them.\par In both the DirectX and non-DirectX versions the NovodexUtil class provides methods to convert\par NxVec3/Vector3 and NxMat34/Matrix back and forth.\par Both versions have extra methods added to NxMat34 and NxMat33. Some like getXaxis() and\par transformWorldPointIntoLocalSpace() are my own and others are taken from DirectX like the static\par methods of Translation(), RotationX() and RotationYawPitchRoll(). Be warned though there is a\par difference with RotationX() RotationY() and RotationZ(). They rotate the opposite direction\par as in DirectX. That's because there are very similar non-static methods rotX() rotY() and rotZ().\par I felt it made more sense to maintain the rotation direction that Novodex uses.\par RotationYawPitchRoll() does behave the same in the wrapper as it does in DirectX.\par Another issue is that Novodex seems to use the opposite order of operation for multiplying\par matrices. Below is an example of creating a global pose from a position and an angle.\par DirectX = Matrix.RotationY(angle)*Matrix.Translation(pos)\par Novodex = NxMat34.Translation(pos)*NxMat34.RotationY(angle)\par The DirectX version has implicit conversion operators for NxVec3, NxMat33/NxMat34 to Vector3 and Matrix\par \par \b\par Info:\par \b0 Novodex_C_Wrapper acts as an interface to the Novodex code. Having NET talk directly\par with C++ code is possible but it seemed simpler to add the extra layer.\par In the future I might release headers for the C wrapper for people interested in using\par Novodex from C or other languages which can easily talk with C. At the moment the C wrapper\par is specific for the needs of the NET wrapper.\par \par Novodex_NET_Wrapper is written in C# and should be usable by any of the .NET languages.\par The NET calls look very similar to the native C++ calls. The main differences are added\par functionality to the objects. Novodex does most everything using separate descriptor\par classes which you pass back and forth. The NET wrapper has constructors and utility\par functions which simplify the creation and editing of objects.\par So far there are no comments assigned to the classes, variables, or methods.\par For now you need look at the Novodex headers and sample code for help.\par Also, the C# code is on my site for you to look at.\par \par The classes with names starting with "Novodex" are not natively part of Novodex. They\par are mostly utility classes I wrote.\par \par \par \b Non-compliance:\par \b0 All the basic data types are directly used. Instead of NxReal and NxU32 I use float and uint.\par Also uint and int are used inconsistently. The wrapper tends to replace uints with ints.\par In the few places that NxExtendedVec3 appears I use NxVec3 (or Vector3 for the DirectX version).\par NxExtendedVec3 is a double precision version of NxVec3.\par \par \par \b Missing Methods:\par \b0\f1 NxActor is missing linearSweep().\par NxCloth is missing 18 new methods added with version 2.5.\par NxScene is missing 11 new methods added with version 2.5.\par NxFoundationSDK is missing setErrorStream(), getErrorStream() and getAllocator().\par \f0 NxRemoteDebugger is missing createObject(), removeObject(), addChild(), removeChild(),\par getPickedObject() and all ten versions of writeParameter().\par \par \f2\par \b\f0 Missing Classes:\par \b0 NxUtilLib (Most those methods exist in NxExportedUtils)\par NxActiveTransform\par NxSweepCache\par NxImplicitScreenMesh\par NxImplicitScreenMeshDesc\par NxAllocateable\par NxUserAllocator\par NxUserAllocatorDefault\par NxExtendedVec3\par And a bunch of little obscure classes never used which you should never need.\par Also nothing in CharacterController.h is implemented.\par \par \par \b Unfinished Stuff:\b0\par Full bug testing.\par 16-bit indices aren't suppoted by meshes.\par Grabbing the mesh data is also slow. Not a big deal in most cases but horrible for cloths\par which you have to grab every frame.\par NxMeshData, NxParticleData, NxFluidEmitterDesc: You can't get or set the name.\par NxShapeDesc: You can't set the name in the descriptor. You can set it in NxShape after\par the shape is created.\par \par \par \b Differences:\par \b0 NxHeightField.saveCells()\par Novodex returns the number of bytes written to the destination buffer.\par The wrapper returns the number of samples copied to the destination array.\par \par \par \b Issues:\par \b0 The UserData and AppData contained in many objects merely set a pointer on the C side.\par If you set those to point to managed data make sure you keep a reference or else that\par data will be garbage collected.\par \par NxTriangleMesh.loadPMap() seems to only like pmaps created with densities of 32 and 64.\par PMaps with other densities can be successfully created but they fail with loadPMap().\par This shouldn't be a problem because you shouldn't use pmaps in the first place.\par \par HeightFields contain an unusual number of triangles. A 16x16 triangle grid does not contain the\par expected 16*16*2=512 triangles. It has extra triangles somewhere. Maybe as slivers, I don't know.\par Anyways NxHeightField.getNumTriangles() returns the proper number of triangles which is described\par by this formula\f1 : (( (getNbColumns()) * (getNbRows()-1) - 1) * 2)\par getNbColumns() and getNbRows() return the number of vertex rows and columns. So for that 16x16\par triangle grid it will have 17x17 vertices. Also, Novodex uses "Column" to describe the xAxis and "Row"\par to describe the zAxis.\par \par Be careful setting values in returned objects. Often methods return a \b COPY\b0 of the data and not a reference to it.\par If you're changing a value in the returned object and it isn't doing anything call a set method with the changed data.\par \par \par \b Possible Problems:\par \b0\f0 I don't know if this will run properly on 64 bit computers. I use IntPtrs in place of pointers\par so hopefully it works.\par Not every existing class or method has been tested and verified to work properly.\par \par \par \b Bugs:\par \b0 There are some memory leak issues with triangleMeshes, convexMeshes, and cloths when they are released.\par Managed memory isn't leaking but there seams to be issues with Novodex not fully releasing memory\par when meshes are released. I've noticed the same problem in the SDK samples.\par \par Fluids have been coded but aren't tested yet so they probably don't work. I don't have the hardware so I can't test fluids.\par \par And many more bugs I'm sure.\par \par \par \b Source Code:\par \b0 Any released source code is not open source. It is property of Jason Zelsnack.\par It is released for informational purposes only.\par \par \par \b Examples:\par \b0 Look at the SimpleTutorial project. It actually isn't so simple anymore. It contains\par example usage of many things required to make a sophisticated simulation.\par \par \par \b Compiling and Running:\par \b0 Look at the SimpleTutorial project.\par It contains Novodex_C_Wrapper.dll, Novodex_NET_Wrapper.dll, PhysXLoader.dll, PhysXCore.dll,\par NxCooking.dll and NxCharacter.dll in the executable directory.\par It references Microsoft.DirectX, Microsoft.DirectX.Direct3D and Novodex_NET_Wrapper\par If you're using something besides D3D to render you can exclude the DirectX references.\par \par \par \b Licensing:\par \b0 You can freely distribute the wrapper if it is not used for a commercial program and you\par give me credit for the wrapper somewhere.\par If you would really like to use it commercially please email me. jason_zelsnack@yahoo.com\par \par \par \par \par }