diff options
| author | sschirm <[email protected]> | 2016-12-27 13:43:54 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2016-12-27 13:43:54 +0100 |
| commit | 64566804758e08a4c1d13fc1f8f7cb9ea8c674c8 (patch) | |
| tree | ff28d36ab8f2023176d84ba397ad5aaf508dcff6 /APEX_1.4/snippets | |
| parent | PhysX 3.4 / APEX 1.4 release candidate @21506124 (diff) | |
| download | physx-3.4-64566804758e08a4c1d13fc1f8f7cb9ea8c674c8.tar.xz physx-3.4-64566804758e08a4c1d13fc1f8f7cb9ea8c674c8.zip | |
PhysX 3.4, APEX 1.4 release candidate update: @21511067-21511214
Diffstat (limited to 'APEX_1.4/snippets')
7 files changed, 485 insertions, 14 deletions
diff --git a/APEX_1.4/snippets/SnippetCommon/concreteChunkMesh.apx b/APEX_1.4/snippets/SnippetCommon/concreteChunkMesh.apx new file mode 100644 index 00000000..d09343e5 --- /dev/null +++ b/APEX_1.4/snippets/SnippetCommon/concreteChunkMesh.apx @@ -0,0 +1,139 @@ +<!DOCTYPE NvParameters> +<NvParameters numObjects="1" version="1.0" > +<value name="" type="Ref" className="RenderMeshAssetParameters" version="0.0" checksum="0x119d6f62 0x8d1ff03d 0x19864d20 0x93421fd0"> + <struct name=""> + <array name="submeshes" size="1" type="Ref"> + <value type="Ref" included="1" className="SubmeshParameters" version="0.1" checksum="0xb2b4f308 0x5f4b8da6 0x4d45daeb 0xbfc7d9b0"> + <struct name=""> + <value name="vertexBuffer" type="Ref" included="1" className="VertexBufferParameters" version="0.1" checksum="0x14ae7314 0xe50741cb 0x15eb480c 0x63f6c571"> + <struct name=""> + <value name="vertexCount" type="U32">39</value> + <value name="vertexFormat" type="Ref" included="1" className="VertexFormatParameters" version="0.0" checksum="0xa7c1ed95 0x570ed2b1 0x55717659 0x9951d139"> + <struct name=""> + <value name="winding" type="U32">0</value> + <value name="hasSeparateBoneBuffer" type="Bool">false</value> + <array name="bufferFormats" size="5" type="Struct"> + <struct> + <value name="name" type="String">SEMANTIC_POSITION</value> + <value name="semantic" type="I32">0</value> + <value name="id" type="U32">4058349641</value> + <value name="format" type="U32">43</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_NORMAL</value> + <value name="semantic" type="I32">1</value> + <value name="id" type="U32">628990755</value> + <value name="format" type="U32">43</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_TANGENT</value> + <value name="semantic" type="I32">2</value> + <value name="id" type="U32">1201849363</value> + <value name="format" type="U32">43</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_TEXCOORD0</value> + <value name="semantic" type="I32">5</value> + <value name="id" type="U32">1229059356</value> + <value name="format" type="U32">42</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_BONE_INDEX</value> + <value name="semantic" type="I32">9</value> + <value name="id" type="U32">284127831</value> + <value name="format" type="U32">5</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + </array> + </struct> + </value> + <array name="buffers" size="5" type="Ref"> + <value type="Ref" included="1" className="BufferF32x3" version="0.0" checksum="0x458b554a 0x7ed3e930 0x299ff33 0x9d69c11b"> + <struct name=""> + <array name="data" size="39" type="Vec3"> + -0.364130497 2.66402292 0.364130497, 1.26146817 0.345973611 0.0074711442, -0.364130497 2.66402292 0.364130497, -1.44097877 0.996801496 -1.11203122, -0.364130497 2.66402292 0.364130497, -1.44097877 0.996801496 -1.11203122, -1.46290278 0.908331275 0.990893245, -0.364130497 2.66402292 0.364130497, 0.965793669 1.14915216 2.30289936, -0.364130497 2.66402292 0.364130497, 0.965793669 1.14915216 2.30289936, 1.3478291 -0.594062209 -1.2495563, 0.645709097 1.25258398 -1.09970403, 1.3478291 -0.594062209 -1.2495563, -1.44097877 0.996801496 -1.11203122, -0.199409813 -1.11824167 -1.69384122, + -1.3750509 -0.336048484 0.0381300226, -1.3750509 -0.336048484 0.0381300226, -0.645953119 -1.12115359 1.70876193, 0.965793669 1.14915216 2.30289936, -0.645953119 -1.12115359 1.70876193, 1.41451252 -0.784505486 0.853367567, 0.645709097 1.25258398 -1.09970403, -0.199409813 -1.11824167 -1.69384122, -1.46290278 0.908331275 0.990893245, -1.44097877 0.996801496 -1.11203122, -0.645953119 -1.12115359 1.70876193, -1.46290278 0.908331275 0.990893245, 1.41451252 -0.784505486 0.853367567, -0.353983968 -1.33597696 0.353983968, -0.199409813 -1.11824167 -1.69384122, -0.353983968 -1.33597696 0.353983968, + -0.353983968 -1.33597696 0.353983968, -0.645953119 -1.12115359 1.70876193, -0.353983968 -1.33597696 0.353983968, -0.645953119 -1.12115359 1.70876193, -0.353983968 -1.33597696 0.353983968, 1.3478291 -0.594062209 -1.2495563, 1.41451252 -0.784505486 0.853367567 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferF32x3" version="0.0" checksum="0x458b554a 0x7ed3e930 0x299ff33 0x9d69c11b"> + <struct name=""> + <array name="data" size="39" type="Vec3"> + 0.813440025 0.578992009 -0.0555297583, 0.937989235 0.34226203 -0.0550712533, -0.0802419856 0.689318359 -0.720001042, -0.0525157042 0.470867634 -0.880639434, -0.845402777 0.533954918 0.0136497961, -0.845402777 0.533954918 0.0136497961, -0.845402777 0.533954918 0.0136497952, -0.442227632 0.534008801 0.720603406, -0.474114865 0.326351583 0.817746758, 0.813440025 0.578992009 -0.0555297583, 0.888472736 0.456683159 -0.0453507565, 0.95900923 0.254567593 -0.124485515, 0.0115250321 0.421666086 -0.906677961, 0.221204966 0.162141755 -0.961654007, -0.835644007 -0.381956398 -0.39472577, -0.779270113 -0.563353717 -0.274537176, + -0.768225431 -0.600096047 -0.222967327, -0.976027906 -0.171503827 0.13399972, -0.921930611 -0.274410367 0.273391545, 0.401491791 -0.487872988 0.775102735, 0.401491791 -0.487872988 0.775102735, 0.401491791 -0.487872988 0.775102735, 0.860740066 0.504836679 -0.0653178766, 0.100666098 0.207940027 -0.972947717, -0.975387335 -0.173272178 0.136368409, -0.998081326 -0.0605462193 -0.0129526723, -0.480918109 0.113911636 0.869334161, -0.473537356 0.332733721 0.815506399, 0.987288535 0.156086415 0.0299723279, 0.2909123 -0.955614686 0.0465893261, 0.339015961 -0.937855661 -0.0741280094, -0.684956908 -0.724314392 -0.078756839, + -0.684956908 -0.724314392 -0.078756839, -0.693622947 -0.719467938 -0.0353991538, 0.2909123 -0.955614686 0.0465893261, 0.239080772 -0.949730337 0.202120528, 0.2909123 -0.955614686 0.0465893261, 0.330571294 -0.940026939 -0.0840947181, 0.296364903 -0.955060959 0.00514343102 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferF32x3" version="0.0" checksum="0x458b554a 0x7ed3e930 0x299ff33 0x9d69c11b"> + <struct name=""> + <array name="data" size="39" type="Vec3"> + -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, + -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, + -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferF32x2" version="0.0" checksum="0x788349ee 0x95c560e2 0x9633945e 0x8cc784a0"> + <struct name=""> + <array name="data" size="39" type="Struct" structElements="x(F32),y(F32)"> + 0.600000024 1,0.5 0.647583663,0.800000012 1,0.900000036 0.647583663, + 3.7252903e-008 1,-0.0999999642 0.647583663,0.100000039 0.647583544,0.200000018 1, + 0.300000012 0.647583544,0.400000006 1,0.300000012 0.647583544,0.600000024 0.352416396, + 0.699999988 0.647583544,0.600000024 0.352416396,-0.0999999642 0.647583663,-0.199999988 0.352416396, + 3.79454939e-008 0.352416396,3.79454939e-008 0.352416396,0.200000003 0.352416396,0.300000012 0.647583544, + 0.200000003 0.352416396,0.400000066 0.352416396,0.699999988 0.647583544,0.800000012 0.352416396, + 0.100000039 0.647583544,-0.0999999642 0.647583663,0.200000003 0.352416396,0.100000039 0.647583544, + 0.400000066 0.352416396,0.700000048 0,0.800000012 0.352416396,-0.0999999717 0, + 0.100000024 0,0.200000003 0.352416396,0.300000042 0,0.200000003 0.352416396, + 0.50000006 0,0.600000024 0.352416396,0.400000066 0.352416396 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferU16x1" version="0.0" checksum="0x3c20aee2 0x4e6abe8c 0x8c1e5625 0x7cabf8fc"> + <struct name=""> + <array name="data" size="39" type="U16"> + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + </array> + </struct> + </value> + </array> + </struct> + </value> + <array name="indexBuffer" size="60" type="U32"> + 0 1 22 2 12 3 4 5 6 7 27 8 9 10 1 1 28 11 12 13 23 14 15 16 24 17 18 19 20 21 11 22 + 1 23 3 12 17 24 25 26 8 27 28 1 10 29 30 37 31 16 15 32 33 16 34 38 35 36 37 38 + </array> + <array name="vertexPartition" size="2" type="U32"> + 0 39 + </array> + <array name="indexPartition" size="2" type="U32"> + 0 60 + </array> + <array name="smoothingGroups" size="0" type="U32"></array> + </struct> + </value> + </array> + <array name="materialNames" size="1" type="String"> + <value type="String">materials/concrete_debris.xml</value> + </array> + <array name="partBounds" size="1" type="Bounds3"> + -1.46290278 -1.33597696 -1.69384122 1.41451252 2.66402292 2.30289936 + </array> + <value name="textureUVOrigin" type="U32">0</value> + <value name="boneCount" type="U32">1</value> + <value name="deleteStaticBuffersAfterUse" type="Bool">false</value> + <value name="isReferenced" type="Bool">false</value> + </struct> +</value> +</NvParameters> diff --git a/APEX_1.4/snippets/SnippetCommon/meshBasicIos6.apx b/APEX_1.4/snippets/SnippetCommon/meshBasicIos6.apx new file mode 100644 index 00000000..4b4a0e10 --- /dev/null +++ b/APEX_1.4/snippets/SnippetCommon/meshBasicIos6.apx @@ -0,0 +1,48 @@ +<!DOCTYPE NvParameters> +<NvParameters numObjects="1" version="1.0" > +<value name="" type="Ref" className="BasicIOSAssetParam" version="1.4" checksum="0xd1ae20ca 0xe79f585e 0x9ab86d65 0x9964607a"> + <struct name=""> + <value name="restDensity" type="F32">1</value> + <value name="particleRadius" type="F32">0.100000001</value> + <value name="maxParticleCount" type="U32">16384</value> + <value name="maxInjectedParticleCount" type="F32">0.100000001</value> + <value name="maxCollidingObjects" type="U32">32</value> + <value name="sceneGravityScale" type="F32">1</value> + <value name="externalAcceleration" type="Vec3">0 0 0</value> + <struct name="particleMass"> + <value name="center" type="F32">1</value> + <value name="spread" type="F32">0</value> + <value name="type" type="Enum">uniform</value> + </struct> + <value name="collisionFilterDataName" type="String">MESH_COL_GRP_MASK</value> + <value name="fieldSamplerFilterDataName" type="String">MESH_COL_GRP_MASK</value> + <value name="staticCollision" type="Bool">true</value> + <value name="restitutionForStaticShapes" type="F32">0.5</value> + <value name="dynamicCollision" type="Bool">true</value> + <value name="restitutionForDynamicShapes" type="F32">0.5</value> + <value name="collisionDistanceMultiplier" type="F32">1</value> + <value name="collisionThreshold" type="F32">0.00100000005</value> + <value name="collisionWithConvex" type="Bool">true</value> + <value name="collisionWithTriangleMesh" type="Bool">true</value> + <struct name="GridDensity"> + <value name="Enabled" type="Bool">false</value> + <value name="Resolution" type="Enum">GDG_16</value> + <value name="GridSize" type="F32">10</value> + <value name="MaxCellCount" type="U32">16</value> + </struct> + <value name="enableTemperatureBuffer" type="Bool">false</value> + <value name="enableDensityBuffer" type="Bool">false</value> + <value name="enableCouplingOverride" type="Bool">false</value> + <struct name="particleToGridCoupling"> + <value name="accelTimeConstant" type="F32">0.00999999978</value> + <value name="decelTimeConstant" type="F32">10</value> + <value name="thresholdMultiplier" type="F32">2</value> + </struct> + <struct name="gridToParticleCoupling"> + <value name="accelTimeConstant" type="F32">0.00999999978</value> + <value name="decelTimeConstant" type="F32">0.00999999978</value> + <value name="thresholdMultiplier" type="F32">1</value> + </struct> + </struct> +</value> +</NvParameters> diff --git a/APEX_1.4/snippets/SnippetCommon/spriteBasicIos6.apx b/APEX_1.4/snippets/SnippetCommon/spriteBasicIos6.apx new file mode 100644 index 00000000..b4030184 --- /dev/null +++ b/APEX_1.4/snippets/SnippetCommon/spriteBasicIos6.apx @@ -0,0 +1,48 @@ +<!DOCTYPE NvParameters> +<NvParameters numObjects="1" version="1.0" > +<value name="" type="Ref" className="BasicIOSAssetParam" version="1.4" checksum="0xd1ae20ca 0xe79f585e 0x9ab86d65 0x9964607a"> + <struct name=""> + <value name="restDensity" type="F32">1</value> + <value name="particleRadius" type="F32">0.100000001</value> + <value name="maxParticleCount" type="U32">16384</value> + <value name="maxInjectedParticleCount" type="F32">0.100000001</value> + <value name="maxCollidingObjects" type="U32">32</value> + <value name="sceneGravityScale" type="F32">1</value> + <value name="externalAcceleration" type="Vec3">0 0 0</value> + <struct name="particleMass"> + <value name="center" type="F32">1</value> + <value name="spread" type="F32">0</value> + <value name="type" type="Enum">uniform</value> + </struct> + <value name="collisionFilterDataName" type="String">SPRITE_COL_GRP_MASK</value> + <value name="fieldSamplerFilterDataName" type="String">SPRITE_COL_GRP_MASK</value> + <value name="staticCollision" type="Bool">true</value> + <value name="restitutionForStaticShapes" type="F32">0.5</value> + <value name="dynamicCollision" type="Bool">true</value> + <value name="restitutionForDynamicShapes" type="F32">0.5</value> + <value name="collisionDistanceMultiplier" type="F32">1</value> + <value name="collisionThreshold" type="F32">0.00100000005</value> + <value name="collisionWithConvex" type="Bool">true</value> + <value name="collisionWithTriangleMesh" type="Bool">true</value> + <struct name="GridDensity"> + <value name="Enabled" type="Bool">false</value> + <value name="Resolution" type="Enum">GDG_16</value> + <value name="GridSize" type="F32">10</value> + <value name="MaxCellCount" type="U32">16</value> + </struct> + <value name="enableTemperatureBuffer" type="Bool">false</value> + <value name="enableDensityBuffer" type="Bool">false</value> + <value name="enableCouplingOverride" type="Bool">false</value> + <struct name="particleToGridCoupling"> + <value name="accelTimeConstant" type="F32">0.00999999978</value> + <value name="decelTimeConstant" type="F32">10</value> + <value name="thresholdMultiplier" type="F32">2</value> + </struct> + <struct name="gridToParticleCoupling"> + <value name="accelTimeConstant" type="F32">0.00999999978</value> + <value name="decelTimeConstant" type="F32">0.00999999978</value> + <value name="thresholdMultiplier" type="F32">1</value> + </struct> + </struct> +</value> +</NvParameters> diff --git a/APEX_1.4/snippets/SnippetCommon/testMeshIofx.apx b/APEX_1.4/snippets/SnippetCommon/testMeshIofx.apx new file mode 100644 index 00000000..2bf51f80 --- /dev/null +++ b/APEX_1.4/snippets/SnippetCommon/testMeshIofx.apx @@ -0,0 +1,61 @@ +<!DOCTYPE NvParameters> +<NvParameters numObjects="1" version="1.0" > +<value name="" type="Ref" className="IofxAssetParameters" version="0.2" checksum="0xbb5add57 0xf771d298 0xcd7c3bc3 0x921baa57"> + <struct name=""> + <value name="iofxType" type="Ref" included="1" className="MeshIofxParameters" version="0.4" checksum="0x823a573c 0xd18e2215 0x6fc4db63 0x3df0022a"> + <struct name=""> + <array name="renderMeshList" size="2" type="Struct"> + <struct> + <value name="meshAssetName" type="Ref" included="0" className="ApexRenderMesh" objectName="woodChunkmesh"></value> + <value name="weight" type="U32">1</value> + </struct> + <struct> + <value name="meshAssetName" type="Ref" included="0" className="ApexRenderMesh" objectName="concreteChunkMesh"></value> + <value name="weight" type="U32">1</value> + </struct> + </array> + <array name="spawnModifierList" size="2" type="Ref"> + <value type="Ref" included="1" className="SimpleScaleModifierParams" version="0.0" checksum="0x7a1ac6ca 0x76ef1cd2 0x991bfe05 0x30c11a09"> + <struct name=""> + <value name="scaleFactor" type="Vec3">0.0250000004 0.0250000004 0.0250000004</value> + </struct> + </value> + <value type="Ref" included="1" className="RotationModifierParams" version="0.2" checksum="0xd2cf5d27 0xa1732803 0xcaa84b84 0x18ed9e7c"> + <struct name=""> + <value name="rollType" type="Enum">SPHERICAL</value> + <value name="maxRotationRatePerSec" type="F32">0</value> + <value name="maxSettleRatePerSec" type="F32">1</value> + <value name="inAirRotationMultiplier" type="F32">1</value> + <value name="collisionRotationMultiplier" type="F32">1</value> + <value name="includeVerticalDirection" type="Bool">false</value> + </struct> + </value> + </array> + <array name="continuousModifierList" size="2" type="Ref"> + <value type="Ref" included="1" className="RotationModifierParams" version="0.2" checksum="0xd2cf5d27 0xa1732803 0xcaa84b84 0x18ed9e7c"> + <struct name=""> + <value name="rollType" type="Enum">SPHERICAL</value> + <value name="maxRotationRatePerSec" type="F32">300</value> + <value name="maxSettleRatePerSec" type="F32">100</value> + <value name="inAirRotationMultiplier" type="F32">1</value> + <value name="collisionRotationMultiplier" type="F32">80</value> + <value name="includeVerticalDirection" type="Bool">false</value> + </struct> + </value> + <value type="Ref" included="1" className="ScaleVsLife3DModifierParams" version="0.0" checksum="0xbaddcfda 0x2f4deda9 0x2c23286e 0xf19659fd"> + <struct name=""> + <array name="controlPoints" size="3" type="Struct" structElements="lifeRemaining(F32),scale(Vec3)"> + 1 1.52666676 1.52666676 1.52666676,0.337500036 1.00666666 1.00666666 1.00666666,0 0.0133333337 0.0133333337 0.0133333337 + </array> + </struct> + </value> + </array> + </struct> + </value> + <struct name="renderOutput"> + <value name="useUserSemantic" type="Bool">false</value> + <value name="useFloat4Color" type="Bool">false</value> + </struct> + </struct> +</value> +</NvParameters> diff --git a/APEX_1.4/snippets/SnippetCommon/testSpriteIofx.apx b/APEX_1.4/snippets/SnippetCommon/testSpriteIofx.apx new file mode 100644 index 00000000..22a044e3 --- /dev/null +++ b/APEX_1.4/snippets/SnippetCommon/testSpriteIofx.apx @@ -0,0 +1,37 @@ +<!DOCTYPE NvParameters> +<NvParameters numObjects="1" version="1.0" > +<value name="" type="Ref" className="IofxAssetParameters" version="0.2" checksum="0xbb5add57 0xf771d298 0xcd7c3bc3 0x921baa57"> + <struct name=""> + <value name="iofxType" type="Ref" included="1" className="SpriteIofxParameters" version="0.4" checksum="0x9763d523 0x7dae1ae1 0x3bb7aa9d 0x67a8d368"> + <struct name=""> + <value name="spriteMaterialName" type="Ref" included="0" className="ApexMaterials" objectName="materials/particle_dust.xml"></value> + <array name="spawnModifierList" size="1" type="Ref"> + <value type="Ref" included="1" className="SimpleScaleModifierParams" version="0.0" checksum="0x7a1ac6ca 0x76ef1cd2 0x991bfe05 0x30c11a09"> + <struct name=""> + <value name="scaleFactor" type="Vec3">1 1 1</value> + </struct> + </value> + </array> + <array name="continuousModifierList" size="2" type="Ref"> + <value type="Ref" included="1" className="ViewDirectionSortingModifierParams" version="0.0" checksum="0x273be54c 0xc9bfbfeb 0x523921d 0x48c3bc2d"> + <struct name=""> + <value name="sortType" type="Enum">default</value> + </struct> + </value> + <value type="Ref" included="1" className="ColorVsLifeCompositeModifierParams" version="0.0" checksum="0x2ee279f3 0x6440bf5b 0x26d89b02 0xc90fa659"> + <struct name=""> + <array name="controlPoints" size="4" type="Struct" structElements="lifeRemaining(F32),color(Vec4)"> + 1 1 1 0 0.813333333,0.795000017 1 1 0 0.786666691,0.460000038 1 0 0 0.613333344,0 1 0.501960814 0.501960814 0 + </array> + </struct> + </value> + </array> + </struct> + </value> + <struct name="renderOutput"> + <value name="useUserSemantic" type="Bool">false</value> + <value name="useFloat4Color" type="Bool">false</value> + </struct> + </struct> +</value> +</NvParameters> diff --git a/APEX_1.4/snippets/SnippetCommon/woodChunkMesh.apx b/APEX_1.4/snippets/SnippetCommon/woodChunkMesh.apx new file mode 100644 index 00000000..1cb1c67a --- /dev/null +++ b/APEX_1.4/snippets/SnippetCommon/woodChunkMesh.apx @@ -0,0 +1,140 @@ +<!DOCTYPE NvParameters> +<NvParameters numObjects="1" version="1.0" > +<value name="" type="Ref" className="RenderMeshAssetParameters" version="0.0" checksum="0x119d6f62 0x8d1ff03d 0x19864d20 0x93421fd0"> + <struct name=""> + <array name="submeshes" size="1" type="Ref"> + <value type="Ref" included="1" className="SubmeshParameters" version="0.1" checksum="0xb2b4f308 0x5f4b8da6 0x4d45daeb 0xbfc7d9b0"> + <struct name=""> + <value name="vertexBuffer" type="Ref" included="1" className="VertexBufferParameters" version="0.1" checksum="0x14ae7314 0xe50741cb 0x15eb480c 0x63f6c571"> + <struct name=""> + <value name="vertexCount" type="U32">42</value> + <value name="vertexFormat" type="Ref" included="1" className="VertexFormatParameters" version="0.0" checksum="0xa7c1ed95 0x570ed2b1 0x55717659 0x9951d139"> + <struct name=""> + <value name="winding" type="U32">0</value> + <value name="hasSeparateBoneBuffer" type="Bool">false</value> + <array name="bufferFormats" size="5" type="Struct"> + <struct> + <value name="name" type="String">SEMANTIC_POSITION</value> + <value name="semantic" type="I32">0</value> + <value name="id" type="U32">4058349641</value> + <value name="format" type="U32">43</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_NORMAL</value> + <value name="semantic" type="I32">1</value> + <value name="id" type="U32">628990755</value> + <value name="format" type="U32">43</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_TANGENT</value> + <value name="semantic" type="I32">2</value> + <value name="id" type="U32">1201849363</value> + <value name="format" type="U32">43</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_TEXCOORD0</value> + <value name="semantic" type="I32">5</value> + <value name="id" type="U32">1229059356</value> + <value name="format" type="U32">42</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + <struct> + <value name="name" type="String">SEMANTIC_BONE_INDEX</value> + <value name="semantic" type="I32">9</value> + <value name="id" type="U32">284127831</value> + <value name="format" type="U32">5</value> + <value name="access" type="U32">0</value> + <value name="serialize" type="Bool">true</value> + </struct> + </array> + </struct> + </value> + <array name="buffers" size="5" type="Ref"> + <value type="Ref" included="1" className="BufferF32x3" version="0.0" checksum="0x458b554a 0x7ed3e930 0x299ff33 0x9d69c11b"> + <struct name=""> + <array name="data" size="42" type="Vec3"> + 0.917652905 1.39755607 -1.74857867, 1.75835502 -0.790473998 -1.69701755, 0.463630676 -0.892709196 -1.83695698, 0.917652905 1.39755607 -1.74857867, -1.71991479 1.01655877 -2.04397082, 0.917652905 1.39755607 -1.74857867, 0.917652905 1.39755607 -1.74857867, 0.917652905 1.39755607 -1.74857867, 2.22486591 1.05889297 0.350000352, 1.75835502 -0.790473998 -1.69701755, 1.75835502 -0.790473998 -1.69701755, -1.71991479 1.01655877 -2.04397082, -2.15937686 -0.697531104 -0.141648188, -1.71508968 1.45576775 1.66929317, -1.71508968 1.45576775 1.66929317, 2.22486591 1.05889297 0.350000352, + -0.431987733 1.4448123 1.88640809, 1.31827283 -0.6010741 1.86405253, 0.0984536931 -1.2783947 0.11041493, 0.463630676 -0.892709196 -1.83695698, -2.15937686 -0.697531104 -0.141648188, -1.71991479 1.01655877 -2.04397082, 0.463630676 -0.892709196 -1.83695698, -0.124700285 0.899509192 0.130390018, -1.71991479 1.01655877 -2.04397082, -0.431987733 1.4448123 1.88640809, 2.22486591 1.05889297 0.350000352, 1.31827283 -0.6010741 1.86405253, 1.75835502 -0.790473998 -1.69701755, 2.22486591 1.05889297 0.350000352, -0.653737783 -0.727878451 1.30856299, -2.15937686 -0.697531104 -0.141648188, + -0.653737783 -0.727878451 1.30856299, -1.71508968 1.45576775 1.66929317, -2.15937686 -0.697531104 -0.141648188, -0.653737783 -0.727878451 1.30856299, -1.71508968 1.45576775 1.66929317, -0.653737783 -0.727878451 1.30856299, 1.31827283 -0.6010741 1.86405253, -0.431987733 1.4448123 1.88640809, -0.653737783 -0.727878451 1.30856299, 1.31827283 -0.6010741 1.86405253 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferF32x3" version="0.0" checksum="0x458b554a 0x7ed3e930 0x299ff33 0x9d69c11b"> + <struct name=""> + <array name="data" size="42" type="Vec3"> + 0.10800793 0.0169458687 -0.99400562, 0.106089324 0.017333962 -0.994205534, 0.107346155 0.0170797184 -0.994075, 0.10800793 0.0169458687 -0.99400562, 0.108890347 0.0167673361 -0.993912339, -0.124515004 0.974030256 0.189105928, -0.124515004 0.974030256 0.189105928, 0.829133689 0.307575256 -0.466834843, 0.829133689 0.307575226 -0.466834843, 0.829133689 0.307575256 -0.466834843, 0.216390029 -0.974190056 -0.0642577261, -0.974694073 0.222139612 -0.0250083692, -0.974694073 0.222139567 -0.0250083599, -0.974694133 0.222139537 -0.0250083618, 0.135358378 0.968263268 -0.210105523, 0.499392122 0.418944597 0.758348823, + 0.499392122 0.418944597 0.758348823, 0.499392122 0.418944597 0.758348823, 0.0011438824 -0.997402489 0.0720204562, -0.0100265006 -0.980536699 -0.196079761, -0.464622378 -0.601800025 -0.649586618, -0.464622408 -0.601800025 -0.649586558, -0.464622408 -0.601800025 -0.649586558, 0.0131254243 0.997426748 -0.0704812109, 0.00909063686 0.998848796 0.0471004136, 0.0237103924 0.955912173 -0.292693973, -0.0678592846 0.997693062 0.00192889338, 0.915901303 -0.378614724 0.133325487, 0.915901303 -0.378614724 0.133325487, 0.915901303 -0.378614724 0.133325487, -0.162812233 -0.93134433 0.325714499, -0.250514716 -0.968022585 0.0132140536, + -0.635125875 -0.416191965 0.65069145, -0.635125875 -0.416191965 0.65069145, -0.635125875 -0.416191965 0.65069145, -0.225682765 -0.228815019 0.94694823, -0.164024517 -0.23787348 0.957346439, -0.225682765 -0.228815019 0.94694823, -0.250773042 -0.224825561 0.94157654, -0.196126327 -0.233287886 0.952423871, -0.162812233 -0.93134433 0.325714499, 0.174069047 -0.953229129 0.247091532 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferF32x3" version="0.0" checksum="0x458b554a 0x7ed3e930 0x299ff33 0x9d69c11b"> + <struct name=""> + <array name="data" size="42" type="Vec3"> + -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, + -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, + -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932, -0.00132703932 -0.00132703932 -0.00132703932 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferF32x2" version="0.0" checksum="0x788349ee 0x95c560e2 0x9633945e 0x8cc784a0"> + <struct name=""> + <array name="data" size="42" type="Struct" structElements="x(F32),y(F32)"> + 0.600000024 1,0.5 0.647583663,0.699999988 0.647583544,0.800000012 1, + 0.900000036 0.647583663,3.7252903e-008 1,0.200000018 1,0.400000006 1, + 0.300000012 0.647583544,0.5 0.647583663,0.5 0.647583663,-0.0999999642 0.647583663, + -0.199999988 0.352416396,3.79454939e-008 0.352416396,3.79454939e-008 0.352416396,0.300000012 0.647583544, + 0.200000003 0.352416396,0.400000066 0.352416396,0.600000024 0.352416396,0.699999988 0.647583544, + 0.800000012 0.352416396,0.900000036 0.647583663,0.699999988 0.647583544,0.100000039 0.647583544, + -0.0999999642 0.647583663,0.200000003 0.352416396,0.300000012 0.647583544,0.400000066 0.352416396, + 0.5 0.647583663,0.300000012 0.647583544,0.700000048 0,0.800000012 0.352416396, + -0.0999999717 0,3.79454939e-008 0.352416396,-0.199999988 0.352416396,0.100000024 0, + 3.79454939e-008 0.352416396,0.300000042 0,0.400000066 0.352416396,0.200000003 0.352416396, + 0.50000006 0,0.400000066 0.352416396 + </array> + </struct> + </value> + <value type="Ref" included="1" className="BufferU16x1" version="0.0" checksum="0x3c20aee2 0x4e6abe8c 0x8c1e5625 0x7cabf8fc"> + <struct name=""> + <array name="data" size="42" type="U16"> + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + </array> + </struct> + </value> + </array> + </struct> + </value> + <array name="indexBuffer" size="60" type="U32"> + 0 1 2 3 2 4 5 24 23 6 23 26 7 8 9 10 41 18 19 18 31 11 12 13 23 14 25 15 16 17 18 19 + 10 20 21 22 14 23 24 25 26 23 27 28 29 30 31 18 32 33 34 35 39 36 37 38 39 40 18 41 + </array> + <array name="vertexPartition" size="2" type="U32"> + 0 42 + </array> + <array name="indexPartition" size="2" type="U32"> + 0 60 + </array> + <array name="smoothingGroups" size="0" type="U32"></array> + </struct> + </value> + </array> + <array name="materialNames" size="1" type="String"> + <value type="String">materials/wood_debris.xml</value> + </array> + <array name="partBounds" size="1" type="Bounds3"> + -2.15937686 -1.2783947 -2.04397082 2.22486591 1.45576775 1.88640809 + </array> + <value name="textureUVOrigin" type="U32">0</value> + <value name="boneCount" type="U32">1</value> + <value name="deleteStaticBuffersAfterUse" type="Bool">false</value> + <value name="isReferenced" type="Bool">false</value> + </struct> +</value> +</NvParameters> diff --git a/APEX_1.4/snippets/SnippetResourcesLoading/SnippetResourcesLoading.cpp b/APEX_1.4/snippets/SnippetResourcesLoading/SnippetResourcesLoading.cpp index 6fec78be..39e85349 100644 --- a/APEX_1.4/snippets/SnippetResourcesLoading/SnippetResourcesLoading.cpp +++ b/APEX_1.4/snippets/SnippetResourcesLoading/SnippetResourcesLoading.cpp @@ -22,6 +22,7 @@ #include "PsString.h" #include <sys/stat.h> +#include "Shlwapi.h" using namespace nvidia::apex; @@ -31,6 +32,7 @@ ApexSDK* gApexSDK = NULL; DummyRenderResourceManager* gDummyRenderResourceManager = NULL; MyResourceCallback* gMyResourceCallback = NULL; +LPTSTR gMediaPath; class MyMaterial { @@ -56,7 +58,11 @@ public: { Asset* asset = 0; - const char* path = name; + CHAR buf[256]; + strcpy(buf, gMediaPath); + strcat(buf, name); + strcat(buf, ".apx"); + const char* path = &buf[1]; // does file exists? struct stat info; @@ -172,9 +178,6 @@ void releaseAPEX() delete gMyResourceCallback; } - -#include "Shlwapi.h" - int main(int, char**) { initPhysX(); @@ -182,21 +185,16 @@ int main(int, char**) Asset* asset; - LPTSTR cmd = GetCommandLine(); - PathRemoveFileSpec(cmd); - strcat(cmd, "/../../snippets/SnippetCommon/"); + gMediaPath = GetCommandLine(); + PathRemoveFileSpec(gMediaPath); + strcat(gMediaPath, "/../../snippets/SnippetCommon/"); - CHAR buf[256]; - strcpy(buf, cmd); - strcat(buf, "testMeshEmitter4BasicIos6.apx"); - asset = loadApexAsset(EMITTER_AUTHORING_TYPE_NAME, &buf[1]); + asset = loadApexAsset(EMITTER_AUTHORING_TYPE_NAME, "testMeshEmitter4BasicIos6"); asset->forceLoadAssets(); gApexSDK->forceLoadAssets(); asset->release(); - strcpy(buf, cmd); - strcat(buf, "testSpriteEmitter4BasicIos6.apx"); - asset = loadApexAsset(EMITTER_AUTHORING_TYPE_NAME, &buf[1]); + asset = loadApexAsset(EMITTER_AUTHORING_TYPE_NAME, "testSpriteEmitter4BasicIos6"); asset->forceLoadAssets(); gApexSDK->forceLoadAssets(); asset->release(); |