├── LICENSE ├── README.md ├── doc └── additional_cmds.md ├── figs ├── .DS_Store ├── blender.png └── teaser.png ├── openvdb ├── CHANGES ├── CMakeLists.txt ├── CODEOWNERS ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── MAINTAINERS.md ├── README.md ├── ci │ ├── build.sh │ ├── build_sonar.sh │ ├── download_houdini.py │ ├── download_houdini.sh │ ├── download_vdb_caches.py │ ├── extract_test_examples.sh │ ├── install_blosc.sh │ ├── install_cmake.sh │ ├── install_doxygen.sh │ ├── install_gtest.sh │ ├── install_llvm_windows.sh │ ├── install_macos.sh │ ├── install_macos_ax.sh │ ├── install_windows.sh │ ├── install_windows_cuda.ps1 │ ├── test_install.sh │ └── test_sonar.sh ├── cmake │ ├── FindBlosc.cmake │ ├── FindCppUnit.cmake │ ├── FindIlmBase.cmake │ ├── FindJemalloc.cmake │ ├── FindLog4cplus.cmake │ ├── FindOpenEXR.cmake │ ├── FindOpenVDB.cmake │ ├── FindTBB.cmake │ ├── OpenVDBGLFW3Setup.cmake │ ├── OpenVDBHoudiniSetup.cmake │ ├── OpenVDBMayaSetup.cmake │ ├── OpenVDBUtils.cmake │ ├── Uninstall.cmake │ ├── config │ │ ├── OpenVDBCXX.cmake │ │ └── OpenVDBVersions.cmake │ └── scripts │ │ └── ubsan.supp ├── doc │ ├── CMakeLists.txt │ ├── ax │ │ ├── ax.txt │ │ ├── axcplusplus.txt │ │ ├── axexamples.txt │ │ ├── axfunctionlist.txt │ │ ├── doc.txt │ │ ├── gen_function_docs │ │ └── gen_function_houdini_docs │ ├── build.txt │ ├── changes.txt │ ├── codingstyle.txt │ ├── dependencies.txt │ ├── doc.txt │ ├── examplecode.txt │ ├── faq.txt │ ├── houdini.txt │ ├── img │ │ ├── multiparm.png │ │ └── tabmenu.png │ ├── math.txt │ ├── nanovdb │ │ ├── FAQ.md │ │ ├── HelloWorld.md │ │ ├── HowToBuild.md │ │ ├── SourceTree.md │ │ └── doc.md │ ├── points.txt │ └── python.txt ├── nanovdb │ └── nanovdb │ │ ├── CMakeLists.txt │ │ ├── CNanoVDB.h │ │ ├── NanoVDB.h │ │ ├── PNanoVDB.h │ │ ├── Readme.md │ │ ├── cmd │ │ ├── CMakeLists.txt │ │ ├── convert │ │ │ └── nanovdb_convert.cc │ │ ├── print │ │ │ └── nanovdb_print.cc │ │ └── validate │ │ │ └── nanovdb_validate.cc │ │ ├── docs │ │ ├── CMakeLists.txt │ │ ├── codingstyle.txt │ │ └── doxygen-config │ │ ├── examples │ │ ├── CMakeLists.txt │ │ ├── benchmark │ │ │ ├── BenchKernels_dense.cu │ │ │ ├── BenchKernels_nano.cu │ │ │ ├── Benchmark.cc │ │ │ ├── Benchmark_dense.cc │ │ │ ├── Benchmark_nano.cc │ │ │ ├── CMakeLists.txt │ │ │ ├── Camera.h │ │ │ ├── DenseGrid.h │ │ │ └── Image.h │ │ ├── ex_bump_pool_buffer │ │ │ └── bump_pool_buffer.cc │ │ ├── ex_collide_level_set │ │ │ ├── common.h │ │ │ ├── main.cc │ │ │ ├── nanovdb.cu │ │ │ └── openvdb.cc │ │ ├── ex_make_custom_nanovdb │ │ │ └── make_custom_nanovdb.cc │ │ ├── ex_make_funny_nanovdb │ │ │ └── make_funny_nanovdb.cc │ │ ├── ex_make_nanovdb_sphere │ │ │ └── make_nanovdb_sphere.cc │ │ ├── ex_make_typed_grids │ │ │ └── make_typed_grids.cc │ │ ├── ex_map_pool_buffer │ │ │ └── map_pool_buffer.cc │ │ ├── ex_modify_nanovdb_thrust │ │ │ └── modify_nanovdb_thrust.cu │ │ ├── ex_openvdb_to_nanovdb │ │ │ └── openvdb_to_nanovdb.cc │ │ ├── ex_openvdb_to_nanovdb_accessor │ │ │ └── openvdb_to_nanovdb_accessor.cc │ │ ├── ex_openvdb_to_nanovdb_cuda │ │ │ ├── openvdb_to_nanovdb_cuda.cc │ │ │ └── openvdb_to_nanovdb_cuda.cu │ │ ├── ex_raytrace_fog_volume │ │ │ ├── common.h │ │ │ ├── main.cc │ │ │ ├── nanovdb.cu │ │ │ └── openvdb.cc │ │ ├── ex_raytrace_level_set │ │ │ ├── common.h │ │ │ ├── main.cc │ │ │ ├── nanovdb.cu │ │ │ └── openvdb.cc │ │ ├── ex_read_nanovdb_sphere │ │ │ └── read_nanovdb_sphere.cc │ │ ├── ex_read_nanovdb_sphere_accessor │ │ │ └── read_nanovdb_sphere_accessor.cc │ │ ├── ex_read_nanovdb_sphere_accessor_cuda │ │ │ ├── read_nanovdb_sphere_accessor_cuda.cc │ │ │ └── read_nanovdb_sphere_accessor_cuda.cu │ │ ├── ex_util │ │ │ ├── ComputePrimitives.h │ │ │ └── CpuTimer.h │ │ ├── ex_vox_to_nanovdb │ │ │ ├── VoxToNanoVDB.h │ │ │ └── vox_to_nanovdb.cc │ │ └── ex_write_nanovdb_grids │ │ │ └── write_nanovdb_grids.cc │ │ ├── unittest │ │ ├── CMakeLists.txt │ │ ├── TestNanoVDB.cc │ │ ├── TestOpenVDB.cc │ │ └── pnanovdb_validate_strides.h │ │ └── util │ │ ├── CSampleFromVoxels.h │ │ ├── CudaDeviceBuffer.h │ │ ├── DitherLUT.h │ │ ├── ForEach.h │ │ ├── GridBuilder.h │ │ ├── GridChecksum.h │ │ ├── GridHandle.h │ │ ├── GridStats.h │ │ ├── GridValidator.h │ │ ├── HDDA.h │ │ ├── HostBuffer.h │ │ ├── IO.h │ │ ├── Invoke.h │ │ ├── NanoToOpenVDB.h │ │ ├── NodeManager.h │ │ ├── OpenToNanoVDB.h │ │ ├── Primitives.h │ │ ├── Range.h │ │ ├── Ray.h │ │ ├── Reduce.h │ │ ├── SampleFromVoxels.h │ │ └── Stencils.h ├── openvdb │ └── openvdb │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── Exceptions.h │ │ ├── Grid.cc │ │ ├── Grid.h │ │ ├── LICENSE │ │ ├── MetaMap.cc │ │ ├── MetaMap.h │ │ ├── Metadata.cc │ │ ├── Metadata.h │ │ ├── Platform.cc │ │ ├── Platform.h │ │ ├── PlatformConfig.h │ │ ├── README │ │ ├── TypeList.h │ │ ├── Types.h │ │ ├── io │ │ ├── Archive.cc │ │ ├── Archive.h │ │ ├── Compression.cc │ │ ├── Compression.h │ │ ├── DelayedLoadMetadata.cc │ │ ├── DelayedLoadMetadata.h │ │ ├── File.cc │ │ ├── File.h │ │ ├── GridDescriptor.cc │ │ ├── GridDescriptor.h │ │ ├── Queue.cc │ │ ├── Queue.h │ │ ├── Stream.cc │ │ ├── Stream.h │ │ ├── TempFile.cc │ │ ├── TempFile.h │ │ └── io.h │ │ ├── math │ │ ├── BBox.h │ │ ├── ConjGradient.h │ │ ├── Coord.h │ │ ├── DDA.h │ │ ├── FiniteDifference.h │ │ ├── Half.cc │ │ ├── Half.h │ │ ├── HalfLimits.h │ │ ├── LegacyFrustum.h │ │ ├── Maps.cc │ │ ├── Maps.h │ │ ├── Mat.h │ │ ├── Mat3.h │ │ ├── Mat4.h │ │ ├── Math.h │ │ ├── Operators.h │ │ ├── Proximity.cc │ │ ├── Proximity.h │ │ ├── QuantizedUnitVec.cc │ │ ├── QuantizedUnitVec.h │ │ ├── Quat.h │ │ ├── Ray.h │ │ ├── Stats.h │ │ ├── Stencils.h │ │ ├── Transform.cc │ │ ├── Transform.h │ │ ├── Tuple.h │ │ ├── Vec2.h │ │ ├── Vec3.h │ │ └── Vec4.h │ │ ├── openvdb.cc │ │ ├── openvdb.h │ │ ├── points │ │ ├── AttributeArray.cc │ │ ├── AttributeArray.h │ │ ├── AttributeArrayString.cc │ │ ├── AttributeArrayString.h │ │ ├── AttributeGroup.cc │ │ ├── AttributeGroup.h │ │ ├── AttributeSet.cc │ │ ├── AttributeSet.h │ │ ├── IndexFilter.h │ │ ├── IndexIterator.h │ │ ├── PointAdvect.h │ │ ├── PointAttribute.h │ │ ├── PointConversion.h │ │ ├── PointCount.h │ │ ├── PointDataGrid.h │ │ ├── PointDelete.h │ │ ├── PointGroup.h │ │ ├── PointMask.h │ │ ├── PointMove.h │ │ ├── PointRasterizeFrustum.h │ │ ├── PointRasterizeSDF.h │ │ ├── PointRasterizeTrilinear.h │ │ ├── PointSample.h │ │ ├── PointScatter.h │ │ ├── PointStatistics.h │ │ ├── PointTransfer.h │ │ ├── StreamCompression.cc │ │ ├── StreamCompression.h │ │ ├── impl │ │ │ ├── PointRasterizeFrustumImpl.h │ │ │ ├── PointRasterizeSDFImpl.h │ │ │ └── PointRasterizeTrilinearImpl.h │ │ └── points.cc │ │ ├── python │ │ ├── CMakeLists.txt │ │ ├── pyAccessor.h │ │ ├── pyFloatGrid.cc │ │ ├── pyGrid.h │ │ ├── pyIntGrid.cc │ │ ├── pyMetadata.cc │ │ ├── pyOpenVDBModule.cc │ │ ├── pyPointGrid.cc │ │ ├── pyTransform.cc │ │ ├── pyVec3Grid.cc │ │ ├── pyopenvdb.h │ │ ├── pyutil.h │ │ └── test │ │ │ └── TestOpenVDB.py │ │ ├── thread │ │ └── Threading.h │ │ ├── tools │ │ ├── Activate.h │ │ ├── ChangeBackground.h │ │ ├── Clip.h │ │ ├── Composite.h │ │ ├── Count.h │ │ ├── Dense.h │ │ ├── DenseSparseTools.h │ │ ├── Diagnostics.h │ │ ├── FastSweeping.h │ │ ├── Filter.h │ │ ├── FindActiveValues.h │ │ ├── GridOperators.h │ │ ├── GridTransformer.h │ │ ├── Interpolation.h │ │ ├── LevelSetAdvect.h │ │ ├── LevelSetFilter.h │ │ ├── LevelSetFracture.h │ │ ├── LevelSetMeasure.h │ │ ├── LevelSetMorph.h │ │ ├── LevelSetPlatonic.h │ │ ├── LevelSetRebuild.h │ │ ├── LevelSetSphere.h │ │ ├── LevelSetTracker.h │ │ ├── LevelSetUtil.h │ │ ├── Mask.h │ │ ├── Merge.h │ │ ├── MeshToVolume.h │ │ ├── Morphology.h │ │ ├── MultiResGrid.h │ │ ├── NodeVisitor.h │ │ ├── ParticleAtlas.h │ │ ├── ParticlesToLevelSet.h │ │ ├── PointAdvect.h │ │ ├── PointIndexGrid.h │ │ ├── PointPartitioner.h │ │ ├── PointScatter.h │ │ ├── PointsToMask.h │ │ ├── PoissonSolver.h │ │ ├── PotentialFlow.h │ │ ├── Prune.h │ │ ├── RayIntersector.h │ │ ├── RayTracer.h │ │ ├── SignedFloodFill.h │ │ ├── Statistics.h │ │ ├── TopologyToLevelSet.h │ │ ├── ValueTransformer.h │ │ ├── VectorTransformer.h │ │ ├── VelocityFields.h │ │ ├── VolumeAdvect.h │ │ ├── VolumeToMesh.h │ │ └── VolumeToSpheres.h │ │ ├── tree │ │ ├── InternalNode.h │ │ ├── Iterator.h │ │ ├── LeafBuffer.h │ │ ├── LeafManager.h │ │ ├── LeafNode.h │ │ ├── LeafNodeBool.h │ │ ├── LeafNodeMask.h │ │ ├── NodeManager.h │ │ ├── NodeUnion.h │ │ ├── RootNode.h │ │ ├── Tree.h │ │ ├── TreeIterator.h │ │ └── ValueAccessor.h │ │ ├── unittest │ │ ├── CMakeLists.txt │ │ ├── PointBuilder.h │ │ ├── TestActivate.cc │ │ ├── TestAttributeArray.cc │ │ ├── TestAttributeArrayString.cc │ │ ├── TestAttributeGroup.cc │ │ ├── TestAttributeSet.cc │ │ ├── TestBBox.cc │ │ ├── TestClip.cc │ │ ├── TestConjGradient.cc │ │ ├── TestCoord.cc │ │ ├── TestCount.cc │ │ ├── TestCpt.cc │ │ ├── TestCurl.cc │ │ ├── TestDelayedLoadMetadata.cc │ │ ├── TestDense.cc │ │ ├── TestDenseSparseTools.cc │ │ ├── TestDiagnostics.cc │ │ ├── TestDivergence.cc │ │ ├── TestDoubleMetadata.cc │ │ ├── TestExceptions.cc │ │ ├── TestFastSweeping.cc │ │ ├── TestFile.cc │ │ ├── TestFilter.cc │ │ ├── TestFindActiveValues.cc │ │ ├── TestFloatMetadata.cc │ │ ├── TestGradient.cc │ │ ├── TestGrid.cc │ │ ├── TestGridBbox.cc │ │ ├── TestGridDescriptor.cc │ │ ├── TestGridIO.cc │ │ ├── TestGridTransformer.cc │ │ ├── TestIndexFilter.cc │ │ ├── TestIndexIterator.cc │ │ ├── TestInit.cc │ │ ├── TestInt32Metadata.cc │ │ ├── TestInt64Metadata.cc │ │ ├── TestInternalOrigin.cc │ │ ├── TestLaplacian.cc │ │ ├── TestLeaf.cc │ │ ├── TestLeafBool.cc │ │ ├── TestLeafIO.cc │ │ ├── TestLeafManager.cc │ │ ├── TestLeafMask.cc │ │ ├── TestLeafOrigin.cc │ │ ├── TestLevelSetRayIntersector.cc │ │ ├── TestLevelSetUtil.cc │ │ ├── TestLinearInterp.cc │ │ ├── TestMaps.cc │ │ ├── TestMat4Metadata.cc │ │ ├── TestMath.cc │ │ ├── TestMeanCurvature.cc │ │ ├── TestMerge.cc │ │ ├── TestMeshToVolume.cc │ │ ├── TestMetaMap.cc │ │ ├── TestMetadata.cc │ │ ├── TestMetadataIO.cc │ │ ├── TestMorphology.cc │ │ ├── TestMultiResGrid.cc │ │ ├── TestName.cc │ │ ├── TestNodeIterator.cc │ │ ├── TestNodeManager.cc │ │ ├── TestNodeMask.cc │ │ ├── TestNodeVisitor.cc │ │ ├── TestParticleAtlas.cc │ │ ├── TestParticlesToLevelSet.cc │ │ ├── TestPointAdvect.cc │ │ ├── TestPointAttribute.cc │ │ ├── TestPointConversion.cc │ │ ├── TestPointCount.cc │ │ ├── TestPointDataLeaf.cc │ │ ├── TestPointDelete.cc │ │ ├── TestPointGroup.cc │ │ ├── TestPointIndexGrid.cc │ │ ├── TestPointInstantiate.cc │ │ ├── TestPointMask.cc │ │ ├── TestPointMove.cc │ │ ├── TestPointPartitioner.cc │ │ ├── TestPointRasterizeFrustum.cc │ │ ├── TestPointRasterizeSDF.cc │ │ ├── TestPointRasterizeTrilinear.cc │ │ ├── TestPointSample.cc │ │ ├── TestPointScatter.cc │ │ ├── TestPointStatistics.cc │ │ ├── TestPointsToMask.cc │ │ ├── TestPoissonSolver.cc │ │ ├── TestPotentialFlow.cc │ │ ├── TestPrePostAPI.cc │ │ ├── TestQuadraticInterp.cc │ │ ├── TestQuantizedUnitVec.cc │ │ ├── TestQuat.cc │ │ ├── TestRay.cc │ │ ├── TestStats.cc │ │ ├── TestStream.cc │ │ ├── TestStreamCompression.cc │ │ ├── TestStringMetadata.cc │ │ ├── TestTools.cc │ │ ├── TestTopologyToLevelSet.cc │ │ ├── TestTransform.cc │ │ ├── TestTree.cc │ │ ├── TestTreeCombine.cc │ │ ├── TestTreeGetSetValues.cc │ │ ├── TestTreeIterators.cc │ │ ├── TestTreeVisitor.cc │ │ ├── TestTypes.cc │ │ ├── TestUtil.cc │ │ ├── TestValueAccessor.cc │ │ ├── TestVec2Metadata.cc │ │ ├── TestVec3Metadata.cc │ │ ├── TestVolumeRayIntersector.cc │ │ ├── TestVolumeToMesh.cc │ │ ├── TestVolumeToSpheres.cc │ │ ├── main.cc │ │ └── util.h │ │ ├── util │ │ ├── CpuTimer.h │ │ ├── ExplicitInstantiation.h │ │ ├── Formats.cc │ │ ├── Formats.h │ │ ├── MapsUtil.h │ │ ├── Name.h │ │ ├── NodeMasks.h │ │ ├── NullInterrupter.h │ │ ├── PagedArray.h │ │ ├── Util.cc │ │ ├── Util.h │ │ └── logging.h │ │ └── version.h.in ├── openvdb_ax │ └── openvdb_ax │ │ ├── CMakeLists.txt │ │ ├── Exceptions.h │ │ ├── ast │ │ ├── AST.h │ │ ├── Parse.cc │ │ ├── Parse.h │ │ ├── PrintTree.cc │ │ ├── PrintTree.h │ │ ├── Scanners.cc │ │ ├── Scanners.h │ │ ├── Tokens.h │ │ └── Visitor.h │ │ ├── ax.cc │ │ ├── ax.h │ │ ├── codegen │ │ ├── Codecs.cc │ │ ├── Codecs.h │ │ ├── ComputeGenerator.cc │ │ ├── ComputeGenerator.h │ │ ├── ConstantFolding.h │ │ ├── FunctionRegistry.cc │ │ ├── FunctionRegistry.h │ │ ├── FunctionTypes.cc │ │ ├── FunctionTypes.h │ │ ├── Functions.h │ │ ├── PointComputeGenerator.cc │ │ ├── PointComputeGenerator.h │ │ ├── PointFunctions.cc │ │ ├── PointLeafLocalData.h │ │ ├── StandardFunctions.cc │ │ ├── String.h │ │ ├── StringFunctions.cc │ │ ├── SymbolTable.h │ │ ├── Types.cc │ │ ├── Types.h │ │ ├── Utils.h │ │ ├── VolumeComputeGenerator.cc │ │ ├── VolumeComputeGenerator.h │ │ └── VolumeFunctions.cc │ │ ├── compiler │ │ ├── AttributeBindings.h │ │ ├── AttributeRegistry.h │ │ ├── Compiler.cc │ │ ├── Compiler.h │ │ ├── CompilerOptions.h │ │ ├── CustomData.h │ │ ├── Logger.cc │ │ ├── Logger.h │ │ ├── PointExecutable.cc │ │ ├── PointExecutable.h │ │ ├── VolumeExecutable.cc │ │ └── VolumeExecutable.h │ │ ├── grammar │ │ ├── axlexer.l │ │ ├── axparser.y │ │ └── generated │ │ │ ├── README │ │ │ ├── axlexer.cc │ │ │ ├── axparser.cc │ │ │ └── axparser.h │ │ ├── math │ │ ├── OpenSimplexNoise.cc │ │ └── OpenSimplexNoise.h │ │ └── test │ │ ├── CMakeLists.txt │ │ ├── TestAXCmd.cmake │ │ ├── ast │ │ ├── TestPrinters.cc │ │ └── TestScanners.cc │ │ ├── backend │ │ ├── TestAttributeBindings.cc │ │ ├── TestCodecs.cc │ │ ├── TestComputeGeneratorFailures.cc │ │ ├── TestFunctionGroup.cc │ │ ├── TestFunctionRegistry.cc │ │ ├── TestFunctionTypes.cc │ │ ├── TestLogger.cc │ │ ├── TestStringIR.cc │ │ ├── TestSymbolTable.cc │ │ ├── TestTypes.cc │ │ └── util.h │ │ ├── cmd │ │ ├── vdb_ax_test_attr_create │ │ ├── vdb_ax_test_fail_1 │ │ ├── vdb_ax_test_fail_10 │ │ ├── vdb_ax_test_fail_11 │ │ ├── vdb_ax_test_fail_12 │ │ ├── vdb_ax_test_fail_13 │ │ ├── vdb_ax_test_fail_14 │ │ ├── vdb_ax_test_fail_15 │ │ ├── vdb_ax_test_fail_16 │ │ ├── vdb_ax_test_fail_17 │ │ ├── vdb_ax_test_fail_18 │ │ ├── vdb_ax_test_fail_19 │ │ ├── vdb_ax_test_fail_2 │ │ ├── vdb_ax_test_fail_20 │ │ ├── vdb_ax_test_fail_3 │ │ ├── vdb_ax_test_fail_4 │ │ ├── vdb_ax_test_fail_5 │ │ ├── vdb_ax_test_fail_6 │ │ ├── vdb_ax_test_fail_7 │ │ ├── vdb_ax_test_fail_8 │ │ ├── vdb_ax_test_fail_9 │ │ ├── vdb_ax_test_ls_sphere_1 │ │ ├── vdb_ax_test_ls_sphere_2 │ │ ├── vdb_ax_test_ls_sphere_3 │ │ ├── vdb_ax_test_pass_1 │ │ ├── vdb_ax_test_pass_10 │ │ ├── vdb_ax_test_pass_11 │ │ ├── vdb_ax_test_pass_12 │ │ ├── vdb_ax_test_pass_13 │ │ ├── vdb_ax_test_pass_14 │ │ ├── vdb_ax_test_pass_15 │ │ ├── vdb_ax_test_pass_2 │ │ ├── vdb_ax_test_pass_3 │ │ ├── vdb_ax_test_pass_4 │ │ ├── vdb_ax_test_pass_5 │ │ ├── vdb_ax_test_pass_6 │ │ ├── vdb_ax_test_pass_7 │ │ ├── vdb_ax_test_pass_8 │ │ ├── vdb_ax_test_pass_9 │ │ ├── vdb_ax_test_uuid │ │ └── vdb_ax_test_vol_bind │ │ ├── compiler │ │ ├── TestAXRun.cc │ │ ├── TestPointExecutable.cc │ │ └── TestVolumeExecutable.cc │ │ ├── frontend │ │ ├── TestArrayPack.cc │ │ ├── TestArrayUnpackNode.cc │ │ ├── TestAssignExpressionNode.cc │ │ ├── TestAttributeNode.cc │ │ ├── TestBinaryOperatorNode.cc │ │ ├── TestCastNode.cc │ │ ├── TestCommaOperator.cc │ │ ├── TestConditionalStatementNode.cc │ │ ├── TestCrementNode.cc │ │ ├── TestDeclareLocalNode.cc │ │ ├── TestExternalVariableNode.cc │ │ ├── TestFunctionCallNode.cc │ │ ├── TestKeywordNode.cc │ │ ├── TestLocalNode.cc │ │ ├── TestLoopNode.cc │ │ ├── TestStatementListNode.cc │ │ ├── TestSyntaxFailures.cc │ │ ├── TestTernaryOperatorNode.cc │ │ ├── TestUnaryOperatorNode.cc │ │ └── TestValueNode.cc │ │ ├── integration │ │ ├── CompareGrids.cc │ │ ├── CompareGrids.h │ │ ├── TestArrayUnpack.cc │ │ ├── TestArrayUnpack │ │ │ ├── array_unpack.mat.double.ax │ │ │ ├── array_unpack.mat.float.ax │ │ │ ├── array_unpack.vec.double.ax │ │ │ ├── array_unpack.vec.double.rgb.ax │ │ │ ├── array_unpack.vec.double.xyz.ax │ │ │ ├── array_unpack.vec.float.ax │ │ │ ├── array_unpack.vec.float.rgb.ax │ │ │ ├── array_unpack.vec.float.xyz.ax │ │ │ ├── array_unpack.vec.int.ax │ │ │ ├── array_unpack.vec.int.rgb.ax │ │ │ └── array_unpack.vec.int.xyz.ax │ │ ├── TestAssign.cc │ │ ├── TestAssign │ │ │ ├── assign.bool.ax │ │ │ ├── assign.double.ax │ │ │ ├── assign.float.ax │ │ │ ├── assign.int32.ax │ │ │ ├── assign.int64.ax │ │ │ ├── assign.mat3d.ax │ │ │ ├── assign.mat3f.ax │ │ │ ├── assign.mat4d.ax │ │ │ ├── assign.mat4f.ax │ │ │ ├── assign.string.ax │ │ │ ├── assign.vec2d.ax │ │ │ ├── assign.vec2f.ax │ │ │ ├── assign.vec2i.ax │ │ │ ├── assign.vec3d.ax │ │ │ ├── assign.vec3f.ax │ │ │ ├── assign.vec3i.ax │ │ │ ├── assign.vec4d.ax │ │ │ ├── assign.vec4f.ax │ │ │ ├── assign.vec4i.ax │ │ │ ├── assign_compound.bool.ax │ │ │ ├── assign_compound.double.ax │ │ │ ├── assign_compound.float.ax │ │ │ ├── assign_compound.int32.ax │ │ │ ├── assign_compound.int64.ax │ │ │ ├── assign_compound.mat3d.ax │ │ │ ├── assign_compound.mat3f.ax │ │ │ ├── assign_compound.mat4d.ax │ │ │ ├── assign_compound.mat4f.ax │ │ │ ├── assign_compound.string.ax │ │ │ ├── assign_compound.vec2d.ax │ │ │ ├── assign_compound.vec2f.ax │ │ │ ├── assign_compound.vec2i.ax │ │ │ ├── assign_compound.vec3d.ax │ │ │ ├── assign_compound.vec3f.ax │ │ │ ├── assign_compound.vec3i.ax │ │ │ ├── assign_compound.vec4d.ax │ │ │ ├── assign_compound.vec4f.ax │ │ │ ├── assign_compound.vec4i.ax │ │ │ ├── assign_implicit_container.mat3d.ax │ │ │ ├── assign_implicit_container.mat3f.ax │ │ │ ├── assign_implicit_container.mat4d.ax │ │ │ ├── assign_implicit_container.mat4f.ax │ │ │ ├── assign_implicit_container.vec2d.ax │ │ │ ├── assign_implicit_container.vec2f.ax │ │ │ ├── assign_implicit_container.vec2i.ax │ │ │ ├── assign_implicit_container.vec3d.ax │ │ │ ├── assign_implicit_container.vec3f.ax │ │ │ ├── assign_implicit_container.vec3i.ax │ │ │ ├── assign_implicit_container.vec4d.ax │ │ │ ├── assign_implicit_container.vec4f.ax │ │ │ ├── assign_implicit_container.vec4i.ax │ │ │ ├── assign_implicit_container_scalar.bool.ax │ │ │ ├── assign_implicit_container_scalar.double.ax │ │ │ ├── assign_implicit_container_scalar.float.ax │ │ │ ├── assign_implicit_container_scalar.int32.ax │ │ │ ├── assign_implicit_container_scalar.int64.ax │ │ │ ├── assign_implicit_scalar.bool.ax │ │ │ ├── assign_implicit_scalar.double.ax │ │ │ ├── assign_implicit_scalar.float.ax │ │ │ ├── assign_implicit_scalar.int32.ax │ │ │ ├── assign_implicit_scalar.int64.ax │ │ │ └── assign_scoped.float.ax │ │ ├── TestBinary.cc │ │ ├── TestBinary │ │ │ ├── binary_bitand.ax │ │ │ ├── binary_bitor.ax │ │ │ ├── binary_bitxor.ax │ │ │ ├── binary_div.ax │ │ │ ├── binary_logicaland.ax │ │ │ ├── binary_logicaland_scircuit.ax │ │ │ ├── binary_logicalor.ax │ │ │ ├── binary_logicalor_scircuit.ax │ │ │ ├── binary_minus.ax │ │ │ ├── binary_mod.ax │ │ │ ├── binary_mult.ax │ │ │ ├── binary_plus.ax │ │ │ ├── binary_relational_equalsequals.ax │ │ │ ├── binary_relational_greaterthan.ax │ │ │ ├── binary_relational_greaterthanequals.ax │ │ │ ├── binary_relational_lessthan.ax │ │ │ ├── binary_relational_lessthanequals.ax │ │ │ ├── binary_relational_notequals.ax │ │ │ ├── binary_shiftleft.ax │ │ │ └── binary_shiftright.ax │ │ ├── TestCast.cc │ │ ├── TestCast │ │ │ ├── cast_explicit.bool.ax │ │ │ ├── cast_explicit.double.ax │ │ │ ├── cast_explicit.float.ax │ │ │ ├── cast_explicit.int32.ax │ │ │ └── cast_explicit.int64.ax │ │ ├── TestConditional.cc │ │ ├── TestCrement.cc │ │ ├── TestCrement │ │ │ ├── crement_dec.component.ax │ │ │ ├── crement_dec.double.ax │ │ │ ├── crement_dec.float.ax │ │ │ ├── crement_dec.int16.ax │ │ │ ├── crement_dec.int32.ax │ │ │ ├── crement_dec.int64.ax │ │ │ ├── crement_inc.component.ax │ │ │ ├── crement_inc.double.ax │ │ │ ├── crement_inc.float.ax │ │ │ ├── crement_inc.int16.ax │ │ │ ├── crement_inc.int32.ax │ │ │ └── crement_inc.int64.ax │ │ ├── TestDeclare.cc │ │ ├── TestEmpty.cc │ │ ├── TestExternals.cc │ │ ├── TestExternals │ │ │ ├── external_assign_from.bool.ax │ │ │ ├── external_assign_from.double.ax │ │ │ ├── external_assign_from.float.ax │ │ │ ├── external_assign_from.int32.ax │ │ │ ├── external_assign_from.int64.ax │ │ │ ├── external_assign_from.mat3d.ax │ │ │ ├── external_assign_from.mat3f.ax │ │ │ ├── external_assign_from.mat4d.ax │ │ │ ├── external_assign_from.mat4f.ax │ │ │ ├── external_assign_from.string.ax │ │ │ ├── external_assign_from.vec2d.ax │ │ │ ├── external_assign_from.vec2f.ax │ │ │ ├── external_assign_from.vec2i.ax │ │ │ ├── external_assign_from.vec3d.ax │ │ │ ├── external_assign_from.vec3f.ax │ │ │ ├── external_assign_from.vec3i.ax │ │ │ ├── external_assign_from.vec4d.ax │ │ │ ├── external_assign_from.vec4f.ax │ │ │ └── external_assign_from.vec4i.ax │ │ ├── TestHarness.cc │ │ ├── TestHarness.h │ │ ├── TestKeyword.cc │ │ ├── TestLoop.cc │ │ ├── TestStandardFunctions.cc │ │ ├── TestString.cc │ │ ├── TestTernary.cc │ │ ├── TestUnary.cc │ │ ├── TestVDBFunctions.cc │ │ └── TestWorldSpaceAccessors.cc │ │ ├── main.cc │ │ ├── snippets │ │ ├── conditional │ │ │ ├── conditionalErrors │ │ │ ├── conditionalIfWithinElse │ │ │ ├── conditionalScopingStatement │ │ │ ├── conditionalSimpleElseIf │ │ │ └── conditionalSimpleStatement │ │ ├── declare │ │ │ ├── declareAmbiguousScalarAttributes │ │ │ ├── declareAmbiguousScalarExternals │ │ │ ├── declareAmbiguousVectorAttributes │ │ │ ├── declareAmbiguousVectorExternals │ │ │ ├── declareAttributes │ │ │ ├── declareAttributesVolume │ │ │ ├── declareLocalVariables │ │ │ ├── declareLocalVectorVariables │ │ │ ├── declareNewVectorAttributes │ │ │ ├── declareVectorAttributeImplicit │ │ │ └── declareVectorAttributes │ │ ├── empty │ │ │ └── empty │ │ ├── function │ │ │ ├── abs │ │ │ ├── acos │ │ │ ├── adjoint │ │ │ ├── argsort │ │ │ ├── asin │ │ │ ├── atan │ │ │ ├── atan2 │ │ │ ├── atof │ │ │ ├── atoi │ │ │ ├── cbrt │ │ │ ├── clamp │ │ │ ├── cofactor │ │ │ ├── cosh │ │ │ ├── cross │ │ │ ├── curlnoise │ │ │ ├── curlsimplexnoise │ │ │ ├── degrees │ │ │ ├── determinant │ │ │ ├── diag │ │ │ ├── dot │ │ │ ├── euclideanmod │ │ │ ├── external │ │ │ ├── fit │ │ │ ├── floormod │ │ │ ├── hash │ │ │ ├── hsvtorgb │ │ │ ├── identity3 │ │ │ ├── identity4 │ │ │ ├── intrinsic │ │ │ ├── inverse │ │ │ ├── isfinite │ │ │ ├── isinf │ │ │ ├── isnan │ │ │ ├── length │ │ │ ├── lengthsq │ │ │ ├── lerp │ │ │ ├── max │ │ │ ├── min │ │ │ ├── noise │ │ │ ├── normalize │ │ │ ├── polardecompose │ │ │ ├── postscale │ │ │ ├── pow │ │ │ ├── prescale │ │ │ ├── pretransform │ │ │ ├── print │ │ │ ├── radians │ │ │ ├── rand │ │ │ ├── rand32 │ │ │ ├── rgbtohsv │ │ │ ├── sign │ │ │ ├── signbit │ │ │ ├── simplexnoise │ │ │ ├── sinh │ │ │ ├── sort │ │ │ ├── svd │ │ │ ├── tan │ │ │ ├── tanh │ │ │ ├── trace │ │ │ ├── transform │ │ │ ├── transpose │ │ │ └── truncatemod │ │ ├── keyword │ │ │ ├── conditionalReturn │ │ │ ├── doWhileLoopKeywords │ │ │ ├── forLoopKeywords │ │ │ ├── returnBranchIf │ │ │ ├── returnBranchLoop │ │ │ ├── simpleReturn │ │ │ └── whileLoopKeywords │ │ ├── loop │ │ │ ├── doWhileLoop │ │ │ ├── forLoop │ │ │ ├── loopErrors │ │ │ ├── loopOverflow │ │ │ └── whileLoop │ │ ├── string │ │ │ ├── assignCompound │ │ │ ├── assignFromAttributes │ │ │ ├── assignFromLocals │ │ │ ├── assignNewOverwrite │ │ │ ├── binaryConcat │ │ │ └── declare │ │ ├── ternary │ │ │ ├── ternary │ │ │ ├── ternaryErrors │ │ │ └── ternaryVoid │ │ ├── unary │ │ │ ├── unaryBitwiseNot │ │ │ ├── unaryNegate │ │ │ ├── unaryNot │ │ │ └── unaryVector │ │ ├── vdb_functions │ │ │ ├── addremovefromgroup │ │ │ ├── deletepoint │ │ │ ├── getcoord │ │ │ ├── getvoxelpws │ │ │ └── ingroup │ │ └── worldspace │ │ │ ├── worldSpaceAssign │ │ │ ├── worldSpaceAssignBound │ │ │ ├── worldSpaceAssignComponent │ │ │ ├── worldSpaceAssignFromP │ │ │ ├── worldSpaceDecrementComponentByZero │ │ │ ├── worldSpaceDivideComponentByOne │ │ │ ├── worldSpaceIncrement │ │ │ ├── worldSpaceIncrementComponent │ │ │ ├── worldSpaceIncrementComponentByZero │ │ │ └── worldSpaceMultiplyComponentByOne │ │ └── util.h ├── openvdb_cmd │ ├── CMakeLists.txt │ ├── vdb_ax │ │ ├── CMakeLists.txt │ │ ├── cli.h │ │ └── main.cc │ ├── vdb_lod │ │ ├── CMakeLists.txt │ │ └── main.cc │ ├── vdb_print │ │ ├── CMakeLists.txt │ │ └── main.cc │ ├── vdb_render │ │ ├── CMakeLists.txt │ │ └── main.cc │ └── vdb_view │ │ ├── CMakeLists.txt │ │ ├── Camera.cc │ │ ├── Camera.h │ │ ├── ClipBox.cc │ │ ├── ClipBox.h │ │ ├── Font.cc │ │ ├── Font.h │ │ ├── RenderModules.cc │ │ ├── RenderModules.h │ │ ├── Viewer.cc │ │ ├── Viewer.h │ │ └── main.cc ├── openvdb_houdini │ └── openvdb_houdini │ │ ├── AXUtils.h │ │ ├── AttributeTransferUtil.h │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── DW_OpenVDBRasterizePoints.cmd │ │ ├── GEO_PrimVDB.cc │ │ ├── GEO_PrimVDB.h │ │ ├── GEO_VDBTranslator.cc │ │ ├── GR_PrimVDBPoints.cc │ │ ├── GT_GEOPrimCollectVDB.cc │ │ ├── GT_GEOPrimCollectVDB.h │ │ ├── GU_PrimVDB.cc │ │ ├── GU_PrimVDB.h │ │ ├── GU_VDBPointTools.cc │ │ ├── GU_VDBPointTools.h │ │ ├── GeometryUtil.cc │ │ ├── GeometryUtil.h │ │ ├── LICENSE │ │ ├── ParmFactory.cc │ │ ├── ParmFactory.h │ │ ├── PointUtils.cc │ │ ├── PointUtils.h │ │ ├── SHOP_OpenVDB_Points.cc │ │ ├── SOP_NodeVDB.cc │ │ ├── SOP_NodeVDB.h │ │ ├── SOP_OpenVDB.svg │ │ ├── SOP_OpenVDB_AX.cc │ │ ├── SOP_OpenVDB_Activate.cc │ │ ├── SOP_OpenVDB_Advect.cc │ │ ├── SOP_OpenVDB_Advect_Points.cc │ │ ├── SOP_OpenVDB_Analysis.cc │ │ ├── SOP_OpenVDB_Clip.cc │ │ ├── SOP_OpenVDB_Combine.cc │ │ ├── SOP_OpenVDB_Convert.cc │ │ ├── SOP_OpenVDB_Create.cc │ │ ├── SOP_OpenVDB_Densify.cc │ │ ├── SOP_OpenVDB_Diagnostics.cc │ │ ├── SOP_OpenVDB_Extrapolate.cc │ │ ├── SOP_OpenVDB_Fill.cc │ │ ├── SOP_OpenVDB_Filter.cc │ │ ├── SOP_OpenVDB_Filter_Level_Set.cc │ │ ├── SOP_OpenVDB_Fracture.cc │ │ ├── SOP_OpenVDB_From_Particles.cc │ │ ├── SOP_OpenVDB_From_Polygons.cc │ │ ├── SOP_OpenVDB_LOD.cc │ │ ├── SOP_OpenVDB_Merge.cc │ │ ├── SOP_OpenVDB_Metadata.cc │ │ ├── SOP_OpenVDB_Morph_Level_Set.cc │ │ ├── SOP_OpenVDB_Noise.cc │ │ ├── SOP_OpenVDB_Occlusion_Mask.cc │ │ ├── SOP_OpenVDB_Platonic.cc │ │ ├── SOP_OpenVDB_Points_Convert.cc │ │ ├── SOP_OpenVDB_Points_Delete.cc │ │ ├── SOP_OpenVDB_Points_Group.cc │ │ ├── SOP_OpenVDB_Potential_Flow.cc │ │ ├── SOP_OpenVDB_Prune.cc │ │ ├── SOP_OpenVDB_Rasterize_Frustum.cc │ │ ├── SOP_OpenVDB_Rasterize_Points.cc │ │ ├── SOP_OpenVDB_Ray.cc │ │ ├── SOP_OpenVDB_Read.cc │ │ ├── SOP_OpenVDB_Rebuild_Level_Set.cc │ │ ├── SOP_OpenVDB_Remap.cc │ │ ├── SOP_OpenVDB_Remove_Divergence.cc │ │ ├── SOP_OpenVDB_Resample.cc │ │ ├── SOP_OpenVDB_Sample_Points.cc │ │ ├── SOP_OpenVDB_Scatter.cc │ │ ├── SOP_OpenVDB_Segment.cc │ │ ├── SOP_OpenVDB_Sort_Points.cc │ │ ├── SOP_OpenVDB_To_Polygons.cc │ │ ├── SOP_OpenVDB_To_Spheres.cc │ │ ├── SOP_OpenVDB_Topology_To_Level_Set.cc │ │ ├── SOP_OpenVDB_Transform.cc │ │ ├── SOP_OpenVDB_Vector_Merge.cc │ │ ├── SOP_OpenVDB_Vector_Split.cc │ │ ├── SOP_OpenVDB_Visualize.cc │ │ ├── SOP_OpenVDB_Write.cc │ │ ├── SOP_VDBVerbUtils.h │ │ ├── UT_VDBTools.h │ │ ├── UT_VDBUtils.cc │ │ ├── UT_VDBUtils.h │ │ ├── Utils.cc │ │ ├── Utils.h │ │ ├── VRAY_OpenVDB_Points.cc │ │ ├── abitest │ │ ├── CMakeLists.txt │ │ ├── TestABI.cc │ │ ├── TestABI.h │ │ └── main.cc │ │ ├── geometry.cc │ │ ├── geometry.h │ │ ├── help │ │ └── ax │ │ │ └── functions.txt │ │ └── pythonrc.py ├── openvdb_maya │ └── openvdb_maya │ │ ├── AEOpenVDBCopyTemplate.mel │ │ ├── AEOpenVDBFilterTemplate.mel │ │ ├── AEOpenVDBFromMayaFluidTemplate.mel │ │ ├── AEOpenVDBFromPolygonsTemplate.mel │ │ ├── AEOpenVDBReadTemplate.mel │ │ ├── AEOpenVDBToPolygonsTemplate.mel │ │ ├── AEOpenVDBTransformTemplate.mel │ │ ├── AEOpenVDBVisualizeTemplate.mel │ │ ├── AEOpenVDBWriteTemplate.mel │ │ ├── CMakeLists.txt │ │ ├── COPYRIGHT │ │ ├── LICENSE │ │ ├── OpenVDBCopyNode.cc │ │ ├── OpenVDBData.cc │ │ ├── OpenVDBData.h │ │ ├── OpenVDBFilterNode.cc │ │ ├── OpenVDBFromMayaFluidNode.cc │ │ ├── OpenVDBFromPolygonsNode.cc │ │ ├── OpenVDBPlugin.cc │ │ ├── OpenVDBPlugin.h │ │ ├── OpenVDBReadNode.cc │ │ ├── OpenVDBToPolygonsNode.cc │ │ ├── OpenVDBTransformNode.cc │ │ ├── OpenVDBUtil.cc │ │ ├── OpenVDBUtil.h │ │ ├── OpenVDBVisualizeNode.cc │ │ └── OpenVDBWriteNode.cc ├── pendingchanges │ ├── README │ ├── ax_cli.txt │ ├── math.txt │ └── volume2mesh_perf.txt └── tsc │ ├── ccla.md │ ├── charter.md │ ├── icla.md │ ├── meetings │ ├── 2018-11-17.md │ ├── 2018-11-30.md │ ├── 2018-12-06.md │ ├── 2018-12-13.md │ ├── 2019-01-17.md │ ├── 2019-01-24.md │ ├── 2019-01-31.md │ ├── 2019-02-14.md │ ├── 2019-02-28.md │ ├── 2019-03-07.md │ ├── 2019-03-21.md │ ├── 2019-03-28.md │ ├── 2019-04-18.md │ ├── 2019-04-25.md │ ├── 2019-05-02.md │ ├── 2019-05-09.md │ ├── 2019-05-23.md │ ├── 2019-05-30.md │ ├── 2019-06-06.md │ ├── 2019-06-13.md │ ├── 2019-06-20.md │ ├── 2019-06-27.md │ ├── 2019-07-11.md │ ├── 2019-07-25.md │ ├── 2019-08-22.md │ ├── 2019-08-29.md │ ├── 2019-09-12.md │ ├── 2019-09-26.md │ ├── 2019-10-10.md │ ├── 2019-10-24.md │ ├── 2019-10-31.md │ ├── 2019-11-14.md │ ├── 2019-11-21.md │ ├── 2019-11-28.md │ ├── 2019-12-05.md │ ├── 2019-12-19.md │ ├── 2020-01-09.md │ ├── 2020-01-16.md │ ├── 2020-01-23.md │ ├── 2020-02-13.md │ ├── 2020-02-20.md │ ├── 2020-03-05.md │ ├── 2020-03-19.md │ ├── 2020-04-02.md │ ├── 2020-04-09.md │ ├── 2020-04-16.md │ ├── 2020-04-30.md │ ├── 2020-05-07.md │ ├── 2020-05-14.md │ ├── 2020-05-21.md │ ├── 2020-05-28.md │ ├── 2020-06-04.md │ ├── 2020-06-18.md │ ├── 2020-06-25.md │ ├── 2020-06-30.md │ ├── 2020-07-07.md │ ├── 2020-07-14.md │ ├── 2020-07-21.md │ ├── 2020-07-28.md │ ├── 2020-08-04.md │ ├── 2020-08-11.md │ ├── 2020-08-18.md │ ├── 2020-08-25.md │ ├── 2020-09-01.md │ ├── 2020-09-22.md │ ├── 2020-09-29.md │ ├── 2020-10-13.md │ ├── 2020-10-20.md │ ├── 2020-10-27.md │ ├── 2020-11-03.md │ ├── 2020-11-10.md │ ├── 2020-11-17.md │ ├── 2020-12-01.md │ ├── 2020-12-15.md │ ├── 2021-01-05.md │ ├── 2021-01-12.md │ ├── 2021-01-19.md │ ├── 2021-01-26.md │ ├── 2021-02-02.md │ ├── 2021-02-09.md │ ├── 2021-02-16.md │ ├── 2021-02-23.md │ ├── 2021-03-02.md │ ├── 2021-03-16.md │ ├── 2021-03-23.md │ ├── 2021-04-06.md │ ├── 2021-04-13.md │ ├── 2021-04-20.md │ ├── 2021-04-27.md │ ├── 2021-05-04.md │ ├── 2021-05-11.md │ ├── 2021-05-18.md │ ├── 2021-05-25.md │ ├── 2021-06-01.md │ ├── 2021-06-08.md │ ├── 2021-06-15.md │ ├── 2021-06-22.md │ ├── 2021-06-29.md │ ├── 2021-07-13.md │ ├── 2021-07-20.md │ ├── 2021-08-03.md │ ├── 2021-08-17.md │ ├── 2021-08-31.md │ ├── 2021-09-07.md │ ├── 2021-09-14.md │ ├── 2021-09-28.md │ ├── 2021-10-05.md │ ├── 2021-10-12.md │ ├── 2021-10-19.md │ ├── 2021-10-26.md │ ├── 2021-11-02.md │ ├── 2021-11-09.md │ ├── 2021-11-16.md │ ├── 2021-11-23.md │ ├── 2021-12-07.md │ ├── 2022-01-11.md │ ├── 2022-01-18.md │ ├── 2022-01-25.md │ ├── 2022-02-02.md │ ├── 2022-02-08.md │ ├── 2022-02-22.md │ ├── 2022-03-01.md │ ├── 2022-03-15.md │ ├── 2022-03-22.md │ ├── 2022-03-29.md │ ├── 2022-04-05.md │ ├── 2022-04-12.md │ ├── 2022-04-26.md │ ├── 2022-05-03.md │ ├── 2022-05-10.md │ ├── 2022-05-17.md │ ├── 2022-05-24.md │ ├── 2022-06-14.md │ ├── 2022-06-28.md │ └── 2022-07-12.md │ └── process │ ├── codereview.md │ ├── deprecation.md │ ├── release.md │ └── security.md └── plenvdb ├── .DS_Store ├── LICENSE ├── configs ├── .DS_Store ├── blendedmvs │ ├── Character.py │ ├── Fountain.py │ ├── Jade.py │ └── Statues.py ├── co3d │ └── donut_369_40208_78816.py ├── custom │ ├── Madoka.py │ ├── Otobai.py │ ├── default_forward_facing.py │ └── default_ubd_inward_facing.py ├── deepvoxels │ ├── armchair.py │ ├── cube.py │ ├── greek.py │ └── vase.py ├── default.py ├── lf │ ├── africa.py │ ├── basket.py │ ├── lf_default.py │ ├── ship.py │ ├── statue.py │ └── torch.py ├── llff │ ├── fern.py │ ├── fern_lg.py │ ├── flower.py │ ├── flower_lg.py │ ├── fortress.py │ ├── fortress_lg.py │ ├── horns.py │ ├── horns_lg.py │ ├── leaves.py │ ├── leaves_lg.py │ ├── llff_default.py │ ├── llff_default_lg.py │ ├── orchids.py │ ├── orchids_lg.py │ ├── room.py │ ├── room_lg.py │ ├── trex.py │ └── trex_lg.py ├── nerf │ ├── chair.py │ ├── drums.py │ ├── ficus.py │ ├── hotdog.py │ ├── lego.py │ ├── materials.py │ ├── mic.py │ ├── ship.py │ └── ship.tensorf.py ├── nerf_unbounded │ ├── bicycle.py │ ├── bonsai.py │ ├── counter.py │ ├── garden.py │ ├── kitchen.py │ ├── nerf_unbounded_default.py │ ├── room.py │ └── stump.py ├── nsvf │ ├── Bike.py │ ├── Lifestyle.py │ ├── Palace.py │ ├── Robot.py │ ├── Spaceship.py │ ├── Steamtrain.py │ ├── Toad.py │ └── Wineholder.py ├── tankstemple │ ├── Barn.py │ ├── Barn_lg.py │ ├── Caterpillar.py │ ├── Caterpillar_lg.py │ ├── Family.py │ ├── Family_lg.py │ ├── Ignatius.py │ ├── Ignatius_lg.py │ ├── Truck.py │ └── Truck_lg.py └── tankstemple_unbounded │ ├── M60.py │ ├── Playground.py │ ├── Train.py │ ├── Truck.py │ └── tt_default.py ├── cuda ├── render_utils.cpp └── render_utils_kernel.cu ├── lib ├── .DS_Store ├── __pycache__ │ ├── dcvgo.cpython-37.pyc │ ├── dmpigo.cpython-37.pyc │ ├── dvgo.cpython-37.pyc │ ├── grid.cpython-37.pyc │ ├── load_blendedmvs.cpython-37.pyc │ ├── load_blender.cpython-37.pyc │ ├── load_co3d.cpython-37.pyc │ ├── load_data.cpython-37.pyc │ ├── load_deepvoxels.cpython-37.pyc │ ├── load_llff.cpython-37.pyc │ ├── load_nerfpp.cpython-37.pyc │ ├── load_nsvf.cpython-37.pyc │ ├── load_tankstemple.cpython-37.pyc │ ├── masked_adam.cpython-37.pyc │ ├── sh.cpython-37.pyc │ └── utils.cpython-37.pyc ├── cuda │ ├── adam_upd.cpp │ ├── adam_upd_kernel.cu │ ├── render_utils.cpp │ ├── render_utils_kernel.cu │ ├── total_variation.cpp │ ├── total_variation_kernel.cu │ ├── ub360_utils.cpp │ └── ub360_utils_kernel.cu ├── dbvgo.py ├── dcvgo.py ├── dmpigo.py ├── dvgo.py ├── grid.py ├── load_blendedmvs.py ├── load_blender.py ├── load_co3d.py ├── load_data.py ├── load_deepvoxels.py ├── load_llff.py ├── load_nerfpp.py ├── load_nsvf.py ├── load_tankstemple.py ├── masked_adam.py ├── sh.py ├── utils.py └── vdb │ ├── .DS_Store │ ├── CMakeLists.txt │ ├── colorvdb.cu │ ├── densityvdb.cu │ ├── plenvdb.cpp │ ├── plenvdb.cu │ ├── plenvdb.cuh │ ├── plenvdb.h │ └── renderer.cu ├── requirements.txt ├── run.py ├── tools ├── .DS_Store ├── colmap_utils │ ├── colmap_read_model.py │ ├── colmap_wrapper.py │ └── pose_utils.py ├── imgs2poses.py ├── vis_train.py └── vis_volume.py └── vdb_compression.py /figs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/figs/.DS_Store -------------------------------------------------------------------------------- /figs/blender.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/figs/blender.png -------------------------------------------------------------------------------- /figs/teaser.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/figs/teaser.png -------------------------------------------------------------------------------- /openvdb/CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | All participants agree to abide by LF Projects Code of Conduct (as defined in the [charter](tsc/charter.md)) available at https://lfprojects.org/policies/code-of-conduct/ 2 | -------------------------------------------------------------------------------- /openvdb/MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # OpenVDB Committers 5 | 6 | The current OpenVDB maintainers are: 7 | 8 | 9 | | Name | Email | 10 | | ---------------- | ----------------- 11 | | Jeff Lait | jlait@sidefx.com 12 | | Dan Bailey | danbailey@ilm.com 13 | | Nick Avramoussis | navramoussis@wetafx.co.nz 14 | | Ken Museth | ken.museth@gmail.com 15 | | Andre Pradhana | andre.pradhana@gmail.com 16 | | Richard Jones | richardj@ilm.com 17 | -------------------------------------------------------------------------------- /openvdb/ci/build_sonar.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | wget -q https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip 6 | unzip build-wrapper-linux-x86.zip 7 | 8 | mkdir build 9 | cd build 10 | cmake \ 11 | -DCMAKE_CXX_COMPILER=g++ \ 12 | -DOPENVDB_ABI_VERSION_NUMBER=6 \ 13 | -DUSE_BLOSC=ON \ 14 | -DOPENVDB_CXX_STRICT=ON \ 15 | -DOPENVDB_BUILD_UNITTESTS=ON \ 16 | -DOPENVDB_BUILD_BINARIES=OFF \ 17 | -DOPENVDB_CORE_STATIC=OFF \ 18 | -DOPENVDB_BUILD_PYTHON_MODULE=OFF \ 19 | -DOPENVDB_CODE_COVERAGE=ON \ 20 | .. 21 | 22 | ../build-wrapper-linux-x86/build-wrapper-linux-x86-64 --out-dir bw_output make -j2 23 | -------------------------------------------------------------------------------- /openvdb/ci/install_blosc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | BLOSC_VERSION="$1" 6 | INSTALL_ROOT="$2" 7 | CMAKE_EXTRA=() 8 | if [ ! -z "${INSTALL_ROOT}" ]; then 9 | CMAKE_EXTRA+=("-DCMAKE_INSTALL_PREFIX=${INSTALL_ROOT}") 10 | fi 11 | 12 | git clone https://github.com/Blosc/c-blosc.git 13 | cd c-blosc 14 | 15 | if [ "$BLOSC_VERSION" != "latest" ]; then 16 | git checkout tags/v${BLOSC_VERSION} -b v${BLOSC_VERSION} 17 | fi 18 | 19 | mkdir build 20 | cd build 21 | 22 | # On MacOS there's a bug between blosc 1.14-1.20 where unistd isn't included 23 | # in zlib-1.2.8/gzlib.c. Provide -DPREFER_EXTERNAL_ZLIB to use the installed 24 | # version of zlib. 25 | # https://github.com/Blosc/python-blosc/issues/229 26 | cmake \ 27 | -DPREFER_EXTERNAL_ZLIB=ON \ 28 | -DBUILD_STATIC=OFF \ 29 | -DBUILD_TESTS=OFF \ 30 | -DBUILD_FUZZERS=OFF \ 31 | -DBUILD_BENCHMARKS=OFF \ 32 | "${CMAKE_EXTRA[@]}" \ 33 | .. 34 | 35 | make -j4 36 | make install 37 | -------------------------------------------------------------------------------- /openvdb/ci/install_cmake.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | CMAKE_VERSION="$1" 6 | CMAKE_PACKAGE=cmake-${CMAKE_VERSION}-Linux-x86_64 7 | 8 | wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_PACKAGE}.tar.gz 9 | 10 | tar -xf ${CMAKE_PACKAGE}.tar.gz 11 | cp ${CMAKE_PACKAGE}/bin/* /usr/local/bin/ 12 | cp -r ${CMAKE_PACKAGE}/share/* /usr/local/share/ 13 | 14 | rm -rf ${CMAKE_PACKAGE} 15 | rm -rf ${CMAKE_PACKAGE}.tar.gz 16 | -------------------------------------------------------------------------------- /openvdb/ci/install_doxygen.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | DOXYGEN_VERSION="$1" 6 | 7 | git clone https://github.com/doxygen/doxygen.git 8 | cd doxygen 9 | 10 | if [ "$DOXYGEN_VERSION" != "latest" ]; then 11 | git checkout Release_${DOXYGEN_VERSION} -b v${DOXYGEN_VERSION} 12 | fi 13 | 14 | mkdir build 15 | cd build 16 | cmake ../. 17 | make -j4 18 | make install 19 | -------------------------------------------------------------------------------- /openvdb/ci/install_gtest.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | GTEST_VERSION="$1" 6 | 7 | git clone https://github.com/google/googletest.git 8 | cd googletest 9 | 10 | if [ "$GTEST_VERSION" != "latest" ]; then 11 | git checkout release-${GTEST_VERSION} -b v${GTEST_VERSION} 12 | fi 13 | 14 | mkdir build 15 | cd build 16 | cmake ../. 17 | make -j4 18 | make install 19 | -------------------------------------------------------------------------------- /openvdb/ci/install_llvm_windows.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | LLVM_CRT="$1" 6 | 7 | git clone -b llvmorg-12.0.0 --depth 1 https://github.com/llvm/llvm-project.git llvm 8 | cd llvm 9 | 10 | mkdir .build 11 | cd .build 12 | 13 | # @note currently only test static builds with MT 14 | cmake -B . -S ../llvm -A x64 -G "Visual Studio 16 2019" -Thost=x64 \ 15 | -DCMAKE_INSTALL_PREFIX="${HOME}/llvm_install" \ 16 | -DLLVM_TARGETS_TO_BUILD="host" \ 17 | -DLLVM_BUILD_TOOLS=OFF \ 18 | -DLLVM_INCLUDE_BENCHMARKS=OFF \ 19 | -DLLVM_INCLUDE_EXAMPLES=OFF \ 20 | -DLLVM_INCLUDE_TESTS=OFF \ 21 | -DLLVM_INCLUDE_TOOLS=OFF \ 22 | -DLLVM_USE_CRT_RELEASE=${LLVM_CRT} 23 | 24 | cmake --build . --config Release --target install 25 | 26 | cd .. 27 | 28 | du -h .build -d0 29 | du -h ${HOME}/llvm_install -d0 30 | 31 | rm -rf .build 32 | -------------------------------------------------------------------------------- /openvdb/ci/install_macos_ax.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Download and install deps from homebrew on macos 4 | 5 | LLVM_VERSION=$1 6 | if [ -z $LLVM_VERSION ]; then 7 | echo "No LLVM version provided for LLVM installation" 8 | exit -1 9 | fi 10 | 11 | brew update 12 | brew install bash gnu-getopt # for CI scripts 13 | brew install cmake 14 | brew install boost 15 | brew install cppunit 16 | brew install c-blosc 17 | brew install tbb@2020 18 | brew install llvm@$LLVM_VERSION 19 | brew install zlib 20 | 21 | # Export TBB paths which are no longer installed to /usr/local (as v2020 is deprecated) 22 | echo "TBB_ROOT=/usr/local/opt/tbb@2020" >> $GITHUB_ENV 23 | echo "/usr/local/opt/tbb@2020/bin" >> $GITHUB_PATH 24 | 25 | # use gnu-getopt 26 | echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH 27 | -------------------------------------------------------------------------------- /openvdb/ci/install_windows.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -ex 4 | 5 | vcpkg update 6 | vcpkg install zlib libpng openexr tbb gtest blosc glfw3 glew \ 7 | boost-iostreams boost-any boost-uuid boost-interprocess boost-algorithm \ 8 | --clean-after-build 9 | -------------------------------------------------------------------------------- /openvdb/ci/test_install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # Various tests to test the FindOpenVDB CMake modules and 5 | # general VDB installation 6 | 7 | # 1) Test basic CMakeLists is able to build vdb_print with 8 | # the expected VDB installation 9 | 10 | cmakelists=" 11 | cmake_minimum_required(VERSION 3.15) 12 | project(TestInstall LANGUAGES CXX) 13 | find_package(OpenVDB REQUIRED COMPONENTS openvdb) 14 | add_executable(test_vdb_print \"../openvdb_cmd/vdb_print/main.cc\") 15 | target_link_libraries(test_vdb_print OpenVDB::openvdb) 16 | " 17 | mkdir tmp 18 | cd tmp 19 | echo -e "$cmakelists" > CMakeLists.txt 20 | cmake -DCMAKE_MODULE_PATH=/usr/local/lib64/cmake/OpenVDB/ . 21 | cmake --build . --config Release --target test_vdb_print 22 | -------------------------------------------------------------------------------- /openvdb/doc/img/multiparm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/openvdb/doc/img/multiparm.png -------------------------------------------------------------------------------- /openvdb/doc/img/tabmenu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/openvdb/doc/img/tabmenu.png -------------------------------------------------------------------------------- /openvdb/doc/nanovdb/doc.md: -------------------------------------------------------------------------------- 1 | # NanoVDB {#NanoVDB_MainPage} 2 | 3 | Welcome to the NanoVDB documentation page. 4 | 5 | * @subpage NanoVDB_HowToBuild 6 | * @subpage NanoVDB_FAQ 7 | * @subpage NanoVDB_SourceTree 8 | * @subpage NanoVDB_HelloWorld 9 | -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/Readme.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | # NanoVDB: 4 | A lightweight GPU friendly version of VDB initially targeting rendering applications. 5 | 6 | * [Build instructions for make and cmake](docs/HowToBuild.md) 7 | * [Frequently asked questions](docs/FAQ.md) 8 | * [Grid cells vs grid nodes](docs/GridCells_vs_GridNodes/Main.pdf) 9 | * [Source tree](docs/SourceTree.md) 10 | * [Examples](docs/HelloWorld.md) 11 | 12 | ### Copyright Contributors to the OpenVDB Project 13 | ### SPDX-License-Identifier: MPL-2.0 14 | 15 | [![CircleCI](https://circleci.com/gh/NVIDIA-Omniverse/NanoVDB.svg?style=svg&circle-token=6c3b9bb166841033a0e0c1a9ee5ac49f73d89152)](https://circleci.com/gh/NVIDIA-Omniverse/NanoVDB) 16 | -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # find_package(doxygen REQUIRED dot ) 2 | if(WIN32) 3 | set(DOXYGEN_EXECUTABLE "C:/Program Files/doxygen/bin/doxygen.exe") 4 | else() 5 | set(DOXYGEN_EXECUTABLE "doxygen") 6 | endif() 7 | 8 | message(STATUS "DOXYGEN_EXECUTABLE = ${DOXYGEN_EXECUTABLE}") 9 | 10 | file(READ ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-config DOXYGEN_CONFIG_CONTENT) 11 | file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config 12 | ${DOXYGEN_CONFIG_CONTENT}) 13 | file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config 14 | "OUTPUT_DIRECTORY=\"${CMAKE_CURRENT_BINARY_DIR}/docs\"\n") 15 | 16 | add_custom_target( 17 | nanovdb_docs 18 | SOURCES doxygen-config 19 | doc.md 20 | codingstyle.txt 21 | FAQ.md 22 | SourceTree.md 23 | HowToBuild.md 24 | HelloWorld.md 25 | COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/cmake-doxygen-config 26 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} 27 | COMMENT "Generating API documentation with Doxygen" 28 | VERBATIM) 29 | 30 | install( 31 | CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build \"${PROJECT_BINARY_DIR}\" --target nanovdb_docs)" 32 | ) 33 | install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs/html DESTINATION docs) 34 | -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_collide_level_set/common.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #pragma once 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "ComputePrimitives.h" 11 | 12 | // http://www.burtleburtle.net/bob/hash/doobs.html 13 | inline __hostdev__ uint32_t hash(uint32_t x) 14 | { 15 | x += (x << 10u); 16 | x ^= (x >> 6u); 17 | x += (x << 3u); 18 | x ^= (x >> 11u); 19 | x += (x << 15u); 20 | return x; 21 | } 22 | 23 | inline __hostdev__ float randomf(uint32_t s) 24 | { 25 | return hash(s) / float(0xffffffffu); 26 | } 27 | -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_collide_level_set/openvdb.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #if defined(NANOVDB_USE_OPENVDB) 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | #include "common.h" 16 | 17 | #if defined(NANOVDB_USE_CUDA) 18 | using BufferT = nanovdb::CudaDeviceBuffer; 19 | #else 20 | using BufferT = nanovdb::HostBuffer; 21 | #endif 22 | 23 | void runOpenVDB(nanovdb::GridHandle& handle, int numIterations, int numPoints, BufferT& positionBuffer, BufferT& velocityBuffer) 24 | { 25 | using GridT = openvdb::FloatGrid; 26 | using CoordT = openvdb::Coord; 27 | using RealT = float; 28 | using Vec3T = openvdb::math::Vec3; 29 | using RayT = openvdb::math::Ray; 30 | 31 | auto srcGrid = nanovdb::nanoToOpenVDB(handle); 32 | std::cout << "Exporting to OpenVDB grid[" << srcGrid->getName() << "]...\n"; 33 | 34 | auto h_grid = (GridT*)srcGrid.get(); 35 | 36 | // Not yet implemented... 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_make_nanovdb_sphere/make_nanovdb_sphere.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | 6 | #include 7 | 8 | /// @brief Creates a NanoVDB grids of a level set sphere and accesses a value. 9 | /// 10 | /// @note This example only depends on NanoVDB. 11 | int main() 12 | { 13 | try { 14 | auto handle = nanovdb::createLevelSetSphere(100.0f); 15 | 16 | auto* dstGrid = handle.grid(); // Get a (raw) pointer to the NanoVDB grid form the GridManager. 17 | if (!dstGrid) 18 | throw std::runtime_error("GridHandle does not contain a grid with value type float"); 19 | 20 | // Access and print out a single value (inside the level set) from both grids 21 | printf("NanoVDB cpu: %4.2f\n", dstGrid->tree().getValue(nanovdb::Coord(99, 0, 0))); 22 | } 23 | catch (const std::exception& e) { 24 | std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl; 25 | } 26 | return 0; 27 | } -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_openvdb_to_nanovdb_cuda/openvdb_to_nanovdb_cuda.cu: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include // this defined the core tree data structure of NanoVDB accessable on both the host and device 5 | #include // for printf 6 | 7 | // This is called by the host only 8 | void cpu_kernel(const nanovdb::NanoGrid* cpuGrid) 9 | { 10 | printf("NanoVDB cpu; %4.2f\n", cpuGrid->tree().getValue(nanovdb::Coord(99, 0, 0))); 11 | } 12 | 13 | // This is called by the device only 14 | __global__ void gpu_kernel(const nanovdb::NanoGrid* deviceGrid) 15 | { 16 | printf("NanoVDB gpu: %4.2f\n", deviceGrid->tree().getValue(nanovdb::Coord(99, 0, 0))); 17 | } 18 | 19 | // This is called by the client code on the host 20 | extern "C" void launch_kernels(const nanovdb::NanoGrid* deviceGrid, 21 | const nanovdb::NanoGrid* cpuGrid, 22 | cudaStream_t stream) 23 | { 24 | gpu_kernel<<<1, 1, 0, stream>>>(deviceGrid); // Launch the device kernel asynchronously 25 | 26 | cpu_kernel(cpuGrid); // Launch the host "kernel" (synchronously) 27 | } -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere/read_nanovdb_sphere.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | 6 | /// @brief Read a NanoVDB grid form file, check pointer and access a single value 7 | /// 8 | /// @note This example does NOT dpend on OpenVDB (or CUDA), only NanoVDB. 9 | int main() 10 | { 11 | try { 12 | auto handle = nanovdb::io::readGrid("data/sphere.nvdb"); // read first grid in file 13 | 14 | auto* grid = handle.grid(); // get a (raw) pointer to the first NanoVDB grid of value type float 15 | 16 | if (grid == nullptr) 17 | throw std::runtime_error("File did not contain a grid with value type float"); 18 | 19 | // Access and print out a single value in the NanoVDB grid 20 | printf("NanoVDB cpu: %4.2f\n", grid->tree().getValue(nanovdb::Coord(99, 0, 0))); 21 | } 22 | catch (const std::exception& e) { 23 | std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl; 24 | } 25 | 26 | return 0; 27 | } -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_read_nanovdb_sphere_accessor/read_nanovdb_sphere_accessor.cc: -------------------------------------------------------------------------------- 1 | #include // this is required to read (and write) NanoVDB files on the host 2 | 3 | /// @brief Read a NanoVDB grid from a file and print out multiple values. 4 | /// 5 | /// @note Note This example does NOT depend on OpenVDB (nor CUDA), only NanoVDB. 6 | int main() 7 | { 8 | try { 9 | auto handle = nanovdb::io::readGrid("data/sphere.nvdb"); // reads first grid from file 10 | 11 | auto* grid = handle.grid(); // get a (raw) pointer to a NanoVDB grid of value type float 12 | 13 | if (!grid) 14 | throw std::runtime_error("File did not contain a grid with value type float"); 15 | 16 | auto acc = grid->getAccessor(); // create an accessor for fast access to multiple values 17 | for (int i = 97; i < 104; ++i) { 18 | printf("(%3i,0,0) NanoVDB cpu: % -4.2f\n", i, acc.getValue(nanovdb::Coord(i, 0, 0))); 19 | } 20 | } 21 | catch (const std::exception& e) { 22 | std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl; 23 | } 24 | return 0; 25 | } -------------------------------------------------------------------------------- /openvdb/nanovdb/nanovdb/examples/ex_vox_to_nanovdb/vox_to_nanovdb.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | #include "VoxToNanoVDB.h" 6 | 7 | /// @brief Convert an .vox file into a .nvdb file. 8 | /// 9 | /// @note This example only depends on NanoVDB. 10 | int main(int argc, char* argv[]) 11 | { 12 | if (argc < 2) { 13 | std::cerr << "Usage: " << argv[0] << " " 14 | << " ()" << std::endl; 15 | return 1; 16 | } 17 | 18 | std::string inFilename(argv[1]), gridName("Vox model"); 19 | std::string outFilename("vox_to_nanovdb_output.nvdb"); 20 | if (argc > 2) 21 | outFilename = std::string(argv[2]); 22 | 23 | try { 24 | auto handle = convertVoxToNanoVDB(inFilename, gridName); 25 | nanovdb::io::writeGrid(outFilename, handle, nanovdb::io::Codec::ZIP, 1); // Write the NanoVDB grid to file and throw if writing fails 26 | } 27 | catch (const std::exception& e) { 28 | std::cerr << "An exception occurred: \"" << e.what() << "\"" << std::endl; 29 | } 30 | return 0; 31 | } 32 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright Contributors to the OpenVDB Project 2 | SPDX-License-Identifier: MPL-2.0 -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/Platform.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | // For Windows, we need these includes to ensure all OPENVDB_API 5 | // functions/classes are compiled into the shared library. 6 | #include "openvdb.h" 7 | #include "Exceptions.h" 8 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/PlatformConfig.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | /// 4 | /// @file PlatformConfig.h 5 | /// @note PlatformConfig.h will be marked as deprecated in the future 6 | 7 | #include "Platform.h" 8 | 9 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/README: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | OpenVDB 3 | ======================================================================== 4 | 5 | The OpenVDB library comprises a hierarchical data structure and a suite 6 | of tools for the efficient manipulation of sparse, possibly time-varying, 7 | volumetric data discretized on a three-dimensional grid. 8 | 9 | For instructions on library installation and dependencies see INSTALL 10 | 11 | For documentation of the library and code examples see: 12 | https://www.openvdb.org/documentation/doxygen 13 | 14 | For more details visit the project's home page: 15 | www.openvdb.org 16 | 17 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/math/Half.cc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/openvdb/openvdb/openvdb/math/Half.cc -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/points/points.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | /// @file points/points.cc 5 | 6 | #include "openvdb.h" 7 | #include "PointDataGrid.h" 8 | 9 | namespace openvdb { 10 | OPENVDB_USE_VERSION_NAMESPACE 11 | namespace OPENVDB_VERSION_NAME { 12 | namespace points { 13 | 14 | template struct RegisterArray { inline void operator()() { ArrayT::registerType(); } }; 15 | 16 | void 17 | internal::initialize() 18 | { 19 | AttributeTypes::foreach(); 20 | 21 | // Register types associated with point data grids. 22 | Metadata::registerType(typeNameAsString(), Int32Metadata::createMetadata); 23 | Metadata::registerType(typeNameAsString(), Int64Metadata::createMetadata); 24 | if (!PointDataGrid::isRegistered()) PointDataGrid::registerGrid(); 25 | } 26 | 27 | 28 | void 29 | internal::uninitialize() 30 | { 31 | AttributeArray::clearRegistry(); 32 | } 33 | 34 | } // namespace points 35 | } // namespace OPENVDB_VERSION_NAME 36 | } // namespace openvdb 37 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/python/pyIntGrid.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | // 4 | /// @file pyIntGrid.cc 5 | /// @brief Boost.Python wrappers for scalar, integer-valued openvdb::Grid types 6 | 7 | #include "pyGrid.h" 8 | 9 | 10 | void exportIntGrid(); 11 | 12 | 13 | void 14 | exportIntGrid() 15 | { 16 | pyGrid::exportGrid(); 17 | #ifdef PY_OPENVDB_WRAP_ALL_GRID_TYPES 18 | pyGrid::exportGrid(); 19 | pyGrid::exportGrid(); 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/python/pyPointGrid.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | // 4 | /// @file pyPointGrid.cc 5 | /// @brief Boost.Python wrappers for point openvdb::Grid types 6 | 7 | #include 8 | 9 | #include "pyGrid.h" 10 | 11 | namespace py = boost::python; 12 | 13 | 14 | void exportPointGrid(); 15 | 16 | 17 | void 18 | exportPointGrid() 19 | { 20 | #ifdef PY_OPENVDB_WRAP_ALL_GRID_TYPES 21 | pyGrid::exportGrid(); 22 | #endif 23 | } 24 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/python/pyVec3Grid.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | // 4 | /// @file pyVec3Grid.cc 5 | /// @brief Boost.Python wrappers for vector-valued openvdb::Grid types 6 | 7 | #include "pyGrid.h" 8 | 9 | 10 | void exportVec3Grid(); 11 | 12 | 13 | void 14 | exportVec3Grid() 15 | { 16 | pyGrid::exportGrid(); 17 | #ifdef PY_OPENVDB_WRAP_ALL_GRID_TYPES 18 | pyGrid::exportGrid(); 19 | pyGrid::exportGrid(); 20 | #endif 21 | } 22 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/unittest/TestDoubleMetadata.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | class TestDoubleMetadata : public ::testing::Test 10 | { 11 | }; 12 | 13 | TEST_F(TestDoubleMetadata, test) 14 | { 15 | using namespace openvdb; 16 | 17 | Metadata::Ptr m(new DoubleMetadata(1.23)); 18 | Metadata::Ptr m2 = m->copy(); 19 | 20 | EXPECT_TRUE(dynamic_cast(m.get()) != 0); 21 | EXPECT_TRUE(dynamic_cast(m2.get()) != 0); 22 | 23 | EXPECT_TRUE(m->typeName().compare("double") == 0); 24 | EXPECT_TRUE(m2->typeName().compare("double") == 0); 25 | 26 | DoubleMetadata *s = dynamic_cast(m.get()); 27 | //EXPECT_TRUE(s->value() == 1.23); 28 | EXPECT_NEAR(1.23,s->value(),0); 29 | s->value() = 4.56; 30 | //EXPECT_TRUE(s->value() == 4.56); 31 | EXPECT_NEAR(4.56,s->value(),0); 32 | 33 | m2->copy(*s); 34 | 35 | s = dynamic_cast(m2.get()); 36 | //EXPECT_TRUE(s->value() == 4.56); 37 | EXPECT_NEAR(4.56,s->value(),0); 38 | } 39 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/unittest/TestFloatMetadata.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | 10 | class TestFloatMetadata : public ::testing::Test 11 | { 12 | }; 13 | 14 | TEST_F(TestFloatMetadata, test) 15 | { 16 | using namespace openvdb; 17 | 18 | Metadata::Ptr m(new FloatMetadata(1.0)); 19 | Metadata::Ptr m2 = m->copy(); 20 | 21 | EXPECT_TRUE(dynamic_cast(m.get()) != 0); 22 | EXPECT_TRUE(dynamic_cast(m2.get()) != 0); 23 | 24 | EXPECT_TRUE(m->typeName().compare("float") == 0); 25 | EXPECT_TRUE(m2->typeName().compare("float") == 0); 26 | 27 | FloatMetadata *s = dynamic_cast(m.get()); 28 | //EXPECT_TRUE(s->value() == 1.0); 29 | EXPECT_NEAR(1.0f,s->value(),0); 30 | s->value() = 2.0; 31 | //EXPECT_TRUE(s->value() == 2.0); 32 | EXPECT_NEAR(2.0f,s->value(),0); 33 | m2->copy(*s); 34 | 35 | s = dynamic_cast(m2.get()); 36 | //EXPECT_TRUE(s->value() == 2.0); 37 | EXPECT_NEAR(2.0f,s->value(),0); 38 | } 39 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/unittest/TestInt32Metadata.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | class TestInt32Metadata : public ::testing::Test 10 | { 11 | }; 12 | 13 | 14 | TEST_F(TestInt32Metadata, test) 15 | { 16 | using namespace openvdb; 17 | 18 | Metadata::Ptr m(new Int32Metadata(123)); 19 | Metadata::Ptr m2 = m->copy(); 20 | 21 | EXPECT_TRUE(dynamic_cast(m.get()) != 0); 22 | EXPECT_TRUE(dynamic_cast(m2.get()) != 0); 23 | 24 | EXPECT_TRUE(m->typeName().compare("int32") == 0); 25 | EXPECT_TRUE(m2->typeName().compare("int32") == 0); 26 | 27 | Int32Metadata *s = dynamic_cast(m.get()); 28 | EXPECT_TRUE(s->value() == 123); 29 | s->value() = 456; 30 | EXPECT_TRUE(s->value() == 456); 31 | 32 | m2->copy(*s); 33 | 34 | s = dynamic_cast(m2.get()); 35 | EXPECT_TRUE(s->value() == 456); 36 | } 37 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/unittest/TestInt64Metadata.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | 10 | class TestInt64Metadata : public ::testing::Test 11 | { 12 | }; 13 | 14 | 15 | TEST_F(TestInt64Metadata, test) 16 | { 17 | using namespace openvdb; 18 | 19 | Metadata::Ptr m(new Int64Metadata(123)); 20 | Metadata::Ptr m2 = m->copy(); 21 | 22 | EXPECT_TRUE(dynamic_cast(m.get()) != 0); 23 | EXPECT_TRUE(dynamic_cast(m2.get()) != 0); 24 | 25 | EXPECT_TRUE(m->typeName().compare("int64") == 0); 26 | EXPECT_TRUE(m2->typeName().compare("int64") == 0); 27 | 28 | Int64Metadata *s = dynamic_cast(m.get()); 29 | EXPECT_TRUE(s->value() == 123); 30 | s->value() = 456; 31 | EXPECT_TRUE(s->value() == 456); 32 | 33 | m2->copy(*s); 34 | 35 | s = dynamic_cast(m2.get()); 36 | EXPECT_TRUE(s->value() == 456); 37 | } 38 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/unittest/TestStringMetadata.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | 10 | class TestStringMetadata : public ::testing::Test 11 | { 12 | }; 13 | 14 | 15 | TEST_F(TestStringMetadata, test) 16 | { 17 | using namespace openvdb; 18 | 19 | Metadata::Ptr m(new StringMetadata("testing")); 20 | Metadata::Ptr m2 = m->copy(); 21 | 22 | EXPECT_TRUE(dynamic_cast(m.get()) != 0); 23 | EXPECT_TRUE(dynamic_cast(m2.get()) != 0); 24 | 25 | EXPECT_TRUE(m->typeName().compare("string") == 0); 26 | EXPECT_TRUE(m2->typeName().compare("string") == 0); 27 | 28 | StringMetadata *s = dynamic_cast(m.get()); 29 | EXPECT_TRUE(s->value().compare("testing") == 0); 30 | s->value() = "testing2"; 31 | EXPECT_TRUE(s->value().compare("testing2") == 0); 32 | 33 | m2->copy(*s); 34 | 35 | s = dynamic_cast(m2.get()); 36 | EXPECT_TRUE(s->value().compare("testing2") == 0); 37 | } 38 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/unittest/main.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include // for std::shuffle() 5 | #include // for std::round() 6 | #include // for EXIT_SUCCESS 7 | #include // for strrchr() 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "gtest/gtest.h" 16 | 17 | int 18 | main(int argc, char *argv[]) 19 | { 20 | ::testing::InitGoogleTest(&argc, argv); 21 | return RUN_ALL_TESTS(); 22 | } 23 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/util/ExplicitInstantiation.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #ifndef OPENVDB_UTIL_EXPLICIT_INSTANTIATION_HAS_BEEN_INCLUDED 5 | #define OPENVDB_UTIL_EXPLICIT_INSTANTIATION_HAS_BEEN_INCLUDED 6 | 7 | #undef OPENVDB_INSTANTIATE 8 | #undef OPENVDB_INSTANTIATE_CLASS 9 | #undef OPENVDB_INSTANTIATE_STRUCT 10 | 11 | #define OPENVDB_INSTANTIATE template OPENVDB_TEMPLATE_EXPORT 12 | #define OPENVDB_INSTANTIATE_CLASS template class OPENVDB_TEMPLATE_EXPORT 13 | #define OPENVDB_INSTANTIATE_STRUCT template struct OPENVDB_TEMPLATE_EXPORT 14 | 15 | #endif // OPENVDB_UTIL_EXPLICIT_INSTANTIATION_HAS_BEEN_INCLUDED 16 | -------------------------------------------------------------------------------- /openvdb/openvdb/openvdb/util/Name.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #ifndef OPENVDB_UTIL_NAME_HAS_BEEN_INCLUDED 5 | #define OPENVDB_UTIL_NAME_HAS_BEEN_INCLUDED 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | namespace openvdb { 14 | OPENVDB_USE_VERSION_NAMESPACE 15 | namespace OPENVDB_VERSION_NAME { 16 | 17 | typedef std::string Name; 18 | 19 | inline Name 20 | readString(std::istream& is) 21 | { 22 | uint32_t size; 23 | is.read(reinterpret_cast(&size), sizeof(uint32_t)); 24 | std::string buffer(size, ' '); 25 | if (size>0) is.read(&buffer[0], size); 26 | return buffer; 27 | } 28 | 29 | 30 | inline void 31 | writeString(std::ostream& os, const Name& name) 32 | { 33 | uint32_t size = uint32_t(name.size()); 34 | os.write(reinterpret_cast(&size), sizeof(uint32_t)); 35 | os.write(&name[0], size); 36 | } 37 | 38 | } // namespace OPENVDB_VERSION_NAME 39 | } // namespace openvdb 40 | 41 | #endif // OPENVDB_UTIL_NAME_HAS_BEEN_INCLUDED 42 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/grammar/generated/README: -------------------------------------------------------------------------------- 1 | This folder contains pre-generated grammar source and header files for 2 | OpenVDB AX. The grammar can be re-generated by using the OpenVDB AX 3 | CMake variable OPENVDB_BUILD_AX_GRAMMAR during the first run of CMake, 4 | in which case these files are ignored in favour of the new files from 5 | CMakes temporary build folder. 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_attr_create: -------------------------------------------------------------------------------- 1 | WARNING: position arguments [input.vdb ] are deprecated. use -i and -o 2 | WARNING: no output VDB File specified - nothing will be written to disk 3 | FATAL: Execution error! 4 | Errors: 5 | AXExecutionError: [1] error: Attribute "nonexist" does not exist on grid "points". 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_10: -------------------------------------------------------------------------------- 1 | ERROR: AXCompilerError: Function "ax.compute.voxel.k1" cannot be called for the current target:"ax.volume.module". This function only runs on OpenVDB Point Grids. 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_11: -------------------------------------------------------------------------------- 1 | WARNING: position arguments [input.vdb ] are deprecated. use -i and -o 2 | FATAL: analyze does not take input vdb files. See 'vdb_ax --help' 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_12: -------------------------------------------------------------------------------- 1 | FATAL: CLIError: positional argument 'execute' used after optional argument. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_13: -------------------------------------------------------------------------------- 1 | FATAL: CLIError: positional argument 'execute' used after optional argument. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_14: -------------------------------------------------------------------------------- 1 | FATAL: analyze does not take input vdb files. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_15: -------------------------------------------------------------------------------- 1 | FATAL: vdb_ax functions requires a valid option. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_16: -------------------------------------------------------------------------------- 1 | FATAL: functions does not take input vdb files. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_17: -------------------------------------------------------------------------------- 1 | FATAL: position arguments [input.vdb ] are deprecated and cannot be used with -i and -o. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_18: -------------------------------------------------------------------------------- 1 | FATAL: position arguments [input.vdb ] are deprecated and cannot be used with -i and -o. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_19: -------------------------------------------------------------------------------- 1 | FATAL: CLIError: Unable to convert argument: 'nan' to a valid interger. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_2: -------------------------------------------------------------------------------- 1 | FATAL: no vdb files have been provided. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_20: -------------------------------------------------------------------------------- 1 | FATAL: CLIError: Unable to convert argument: 'nan' to a valid interger. See 'vdb_ax --help' 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_4: -------------------------------------------------------------------------------- 1 | FATAL: File Load Error: invalid_file 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_5: -------------------------------------------------------------------------------- 1 | [1] error: implicit conversion in assignment (possible truncation) [warning-as-error] 1:1 2 | int a = 1.0; 3 | ^ 4 | [2] error: implicit conversion in assignment (possible truncation) [warning-as-error] 1:1 5 | int a = 1.0; 6 | ^ 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_6: -------------------------------------------------------------------------------- 1 | [1] error: implicit conversion in assignment (possible truncation) [warning-as-error] 1:1 2 | int a = 1.0; int a = 1.0; 3 | ^ 4 | [2] error: local variable "a" has already been declared 1:14 5 | int a = 1.0; int a = 1.0; 6 | -------------^ 7 | [3] error: implicit conversion in assignment (possible truncation) [warning-as-error] 1:1 8 | int a = 1.0; int a = 1.0; 9 | ^ 10 | [4] error: local variable "a" has already been declared 1:14 11 | int a = 1.0; int a = 1.0; 12 | -------------^ 13 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_7: -------------------------------------------------------------------------------- 1 | [1] error: implicit conversion in assignment (possible truncation) [warning-as-error] 1:1 2 | int a = 1.0; int a = 1.0; 3 | ^ 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_8: -------------------------------------------------------------------------------- 1 | [1] error: implicit conversion in assignment (possible truncation) [warning-as-error] 1:1 2 | int a = 1.0; int a = 1.0; 3 | ^ 4 | [2] error: local variable "a" has already been declared 1:14 5 | int a = 1.0; int a = 1.0; 6 | -------------^ 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_fail_9: -------------------------------------------------------------------------------- 1 | [1] error: unexpected IDENTIFIER, expecting SEMICOLON 1:9 2 | invalid code; 3 | --------^ 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_ls_sphere_1: -------------------------------------------------------------------------------- 1 | WARNING: position arguments [input.vdb ] are deprecated. use -i and -o 2 | WARNING: no output VDB File specified - nothing will be written to disk 3 | 0.0508118 4 | 0.10083 5 | 0.050415 6 | 0.0508118 7 | 0.100403 8 | 0.10083 9 | 0.050415 10 | 0.100403 11 | 0.0508118 12 | 0.10083 13 | 0.0499878 14 | 0.050415 15 | 0.0999756 16 | 0.100403 17 | 0.050415 18 | 0.0508118 19 | 0.100403 20 | 0.10083 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_ls_sphere_2: -------------------------------------------------------------------------------- 1 | WARNING: position arguments [input.vdb ] are deprecated. use -i and -o 2 | WARNING: no output VDB File specified - nothing will be written to disk 3 | 0.0508118 4 | 0.10083 5 | 0.050415 6 | 0.0508118 7 | 0.100403 8 | 0.10083 9 | 0.050415 10 | 0.100403 11 | 0.0508118 12 | 0.10083 13 | 0.0499878 14 | 0.050415 15 | 0.0999756 16 | 0.100403 17 | 0.050415 18 | 0.0508118 19 | 0.100403 20 | 0.10083 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_10: -------------------------------------------------------------------------------- 1 | [1] warning: declaration of variable "i" shadows a previous declaration 24:9 2 | for(int32 i = 0; i < 3;) { 3 | --------^ 4 | [2] warning: implicit conversion in function call 61:33 5 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 6 | --------------------------------^ 7 | [3] warning: implicit conversion in assignment (possible truncation) 61:23 8 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 9 | ----------------------^ 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_11: -------------------------------------------------------------------------------- 1 | [1] warning: declaration of variable "i" shadows a previous declaration 24:9 2 | for(int32 i = 0; i < 3;) { 3 | --------^ 4 | [2] warning: implicit conversion in function call 61:33 5 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 6 | --------------------------------^ 7 | [3] warning: implicit conversion in assignment (possible truncation) 61:23 8 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 9 | ----------------------^ 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_12: -------------------------------------------------------------------------------- 1 | usage: vdb_ax [functions] [] 2 | [functions] query available function information: 3 | 4 | Examples: 5 | vdb_ax functions --list log // print functions with 'log' in the name 6 | 7 | --list list functions, their documentation and their signatures. optionally 8 | only list those whose name includes a provided string. 9 | --list-names list all available functions names only. 10 | 11 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_13: -------------------------------------------------------------------------------- 1 | log 2 | | 3 | | - Computes the natural (base e) logarithm of arg. 4 | | 5 | | - double(double n) 6 | | - float(float n) 7 | 8 | log10 9 | | 10 | | - Computes the common (base-10) logarithm of arg. 11 | | 12 | | - double(double n) 13 | | - float(float n) 14 | 15 | log2 16 | | 17 | | - Computes the binary (base-2) logarithm of arg. 18 | | 19 | | - double(double n) 20 | | - float(float n) 21 | 22 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_14: -------------------------------------------------------------------------------- 1 | abs, acos, acosh, addtogroup, adjoint, argsort, asin, asinh, atan, atan2, atanh, atof, atoi, cbrt, ceil, 2 | clamp, cofactor, cos, cosh, cross, curlsimplexnoise, degrees, deletepoint, determinant, diag, dot, euclideanmod, 3 | exp, exp2, external, externalv, fabs, fit, floor, floormod, getcoord, getcoordx, getcoordy, getcoordz, 4 | getvoxelpws, hash, hsvtorgb, identity3, identity4, ingroup, inverse, isfinite, isinf, isnan, length, lengthsq, 5 | lerp, log, log10, log2, max, min, normalize, polardecompose, postscale, pow, prescale, pretransform, print, 6 | radians, rand, rand32, removefromgroup, rgbtohsv, round, sign, signbit, simplexnoise, sin, sinh, sort, 7 | sqrt, tan, tanh, trace, transform, transpose,truncatemod 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_2: -------------------------------------------------------------------------------- 1 | usage: vdb_ax [analyze] [] 2 | [analyze] parse code and run analysis: 3 | 4 | Examples: 5 | vdb_ax analyze -s "@density += 1;" --try-compile points // compile code for points 6 | 7 | --ast-print print the generated abstract syntax tree. 8 | --re-print re-interpret print of the code post ast traversal. 9 | --reg-print print the attribute registry (name, types, access, dependencies). 10 | --try-compile 11 | attempt compilation for points, volumes or both if no option is 12 | provided. 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_3: -------------------------------------------------------------------------------- 1 | scoped block: 1 statement(s) 2 | [0] assignment expression: += 3 | attribute: @(float - inferred) a 4 | attribute: @(float - inferred) b 5 | 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_4: -------------------------------------------------------------------------------- 1 | { 2 | float@a += float@b; 3 | } 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_5: -------------------------------------------------------------------------------- 1 | Attribute: b, type: float 2 | Index : 0 3 | Reads From : true 4 | Writes To : false 5 | Dependencies : 0 6 | Usage : 1 7 | Attribute: a type: float 8 | 9 | Attribute: a, type: float 10 | Index : 1 11 | Reads From : true 12 | Writes To : true 13 | Dependencies : 2 14 | Attribute: a type: float 15 | Attribute: b type: float 16 | Usage : 1 17 | Attribute: a type: float 18 | 19 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_pass_9: -------------------------------------------------------------------------------- 1 | [1] warning: declaration of variable "i" shadows a previous declaration 24:9 2 | for(int32 i = 0; i < 3;) { 3 | --------^ 4 | [2] warning: implicit conversion in function call 61:33 5 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 6 | --------------------------------^ 7 | [3] warning: implicit conversion in assignment (possible truncation) 61:23 8 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 9 | ----------------------^ 10 | [4] warning: declaration of variable "i" shadows a previous declaration 24:9 11 | for(int32 i = 0; i < 3;) { 12 | --------^ 13 | [5] warning: implicit conversion in function call 61:33 14 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 15 | --------------------------------^ 16 | [6] warning: implicit conversion in assignment (possible truncation) 61:23 17 | for (int32 i = 5; int32 k = floor(i - 1); --i) j++; 18 | ----------------------^ 19 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_uuid: -------------------------------------------------------------------------------- 1 | WARNING: position arguments [input.vdb ] are deprecated. use -i and -o 2 | WARNING: no output VDB File specified - nothing will be written to disk 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/cmd/vdb_ax_test_vol_bind: -------------------------------------------------------------------------------- 1 | WARNING: position arguments [input.vdb ] are deprecated. use -i and -o 2 | WARNING: no output VDB File specified - nothing will be written to disk 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.double.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2d@test1[0] = vec2d@test2[1]; 3 | vec2d@test2[1] = vec2d@test1[0]; 4 | 5 | vec3d@test3[1] = vec3d@test3[2]; 6 | vec3d@test4[2] = vec3d@test4[0]; 7 | vec3d@test3[0] = vec3d@test4[1]; 8 | 9 | vec4d@test5[0] = vec4d@test6[2]; 10 | vec4d@test5[3] = vec4d@test5[1]; 11 | vec4d@test5[2] = vec4d@test6[3]; 12 | vec4d@test6[1] = vec4d@test6[0]; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.double.rgb.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2d@test1.r = vec2d@test2.g; 3 | vec2d@test2.g = vec2d@test1.r; 4 | 5 | vec3d@test3.g = vec3d@test3.b; 6 | vec3d@test4.b = vec3d@test4.r; 7 | vec3d@test3.r = vec3d@test4.g; 8 | 9 | vec4d@test5.r = vec4d@test6.b; 10 | vec4d@test5[3] = vec4d@test5.g; 11 | vec4d@test5.b = vec4d@test6[3]; 12 | vec4d@test6.g = vec4d@test6.r; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.double.xyz.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2d@test1.x = vec2d@test2.y; 3 | vec2d@test2.y = vec2d@test1.x; 4 | 5 | vec3d@test3.y = vec3d@test3.z; 6 | vec3d@test4.z = vec3d@test4.x; 7 | vec3d@test3.x = vec3d@test4.y; 8 | 9 | vec4d@test5.x = vec4d@test6.z; 10 | vec4d@test5[3] = vec4d@test5.y; 11 | vec4d@test5.z = vec4d@test6[3]; 12 | vec4d@test6.y = vec4d@test6.x; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.float.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2f@test1[0] = vec2f@test2[1]; 3 | vec2f@test2[1] = vec2f@test1[0]; 4 | 5 | vec3f@test3[1] = vec3f@test3[2]; 6 | vec3f@test4[2] = vec3f@test4[0]; 7 | vec3f@test3[0] = vec3f@test4[1]; 8 | 9 | vec4f@test5[0] = vec4f@test6[2]; 10 | vec4f@test5[3] = vec4f@test5[1]; 11 | vec4f@test5[2] = vec4f@test6[3]; 12 | vec4f@test6[1] = vec4f@test6[0]; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.float.rgb.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2f@test1.r = vec2f@test2.g; 3 | vec2f@test2.g = vec2f@test1.r; 4 | 5 | vec3f@test3.g = vec3f@test3.b; 6 | vec3f@test4.b = vec3f@test4.r; 7 | vec3f@test3.r = vec3f@test4.g; 8 | 9 | vec4f@test5.r = vec4f@test6.b; 10 | vec4f@test5[3] = vec4f@test5.g; 11 | vec4f@test5.b = vec4f@test6[3]; 12 | vec4f@test6.g = vec4f@test6.r; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.float.xyz.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2f@test1.x = vec2f@test2.y; 3 | vec2f@test2.y = vec2f@test1.x; 4 | 5 | vec3f@test3.y = vec3f@test3.z; 6 | vec3f@test4.z = vec3f@test4.x; 7 | vec3f@test3.x = vec3f@test4.y; 8 | 9 | vec4f@test5.x = vec4f@test6.z; 10 | vec4f@test5[3] = vec4f@test5.y; 11 | vec4f@test5.z = vec4f@test6[3]; 12 | vec4f@test6.y = vec4f@test6.x; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.int.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2i@test1[0] = vec2i@test2[1]; 3 | vec2i@test2[1] = vec2i@test1[0]; 4 | 5 | vec3i@test3[1] = vec3i@test3[2]; 6 | vec3i@test4[2] = vec3i@test4[0]; 7 | vec3i@test3[0] = vec3i@test4[1]; 8 | 9 | vec4i@test5[0] = vec4i@test6[2]; 10 | vec4i@test5[3] = vec4i@test5[1]; 11 | vec4i@test5[2] = vec4i@test6[3]; 12 | vec4i@test6[1] = vec4i@test6[0]; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.int.rgb.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2i@test1.r = vec2i@test2.g; 3 | vec2i@test2.g = vec2i@test1.r; 4 | 5 | vec3i@test3.g = vec3i@test3.b; 6 | vec3i@test4.b = vec3i@test4.r; 7 | vec3i@test3.r = vec3i@test4.g; 8 | 9 | vec4i@test5.r = vec4i@test6.b; 10 | vec4i@test5[3] = vec4i@test5.g; 11 | vec4i@test5.b = vec4i@test6[3]; 12 | vec4i@test6.g = vec4i@test6.r; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestArrayUnpack/array_unpack.vec.int.xyz.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2i@test1.x = vec2i@test2.y; 3 | vec2i@test2.y = vec2i@test1.x; 4 | 5 | vec3i@test3.y = vec3i@test3.z; 6 | vec3i@test4.z = vec3i@test4.x; 7 | vec3i@test3.x = vec3i@test4.y; 8 | 9 | vec4i@test5.x = vec4i@test6.z; 10 | vec4i@test5[3] = vec4i@test5.y; 11 | vec4i@test5.z = vec4i@test6[3]; 12 | vec4i@test6.y = vec4i@test6.x; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.bool.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 = true; 3 | bool local1 = true; 4 | bool@test2 = local1; 5 | bool@test3 = 6 | bool@test4 = 7 | bool@test2; 8 | bool local3, 9 | local2 = false; 10 | bool@test5 = 11 | local3 = 12 | local2; 13 | bool@test6 = false, 14 | bool@test7 = true; 15 | bool@test8 = false; 16 | bool@test8 = true; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.double.ax: -------------------------------------------------------------------------------- 1 | 2 | double@test1 = 1.1; 3 | double local1 = 1.1; 4 | double@test2 = local1; 5 | double@test3 = 6 | double@test4 = 7 | double@test2; 8 | double local3, 9 | local2 = 2.3; 10 | double@test5 = 11 | local3 = 12 | local2; 13 | double@test6 = 2.3, 14 | double@test7 = 1.1; 15 | double@test8 = 2.3; 16 | double@test8 = 1.1; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.float.ax: -------------------------------------------------------------------------------- 1 | 2 | float@test1 = 1.1f; 3 | float local1 = 1.1f; 4 | float@test2 = local1; 5 | float@test3 = 6 | float@test4 = 7 | float@test2; 8 | float local3, 9 | local2 = 2.3f; 10 | float@test5 = 11 | local3 = 12 | local2; 13 | float@test6 = 2.3f, 14 | float@test7 = 1.1f; 15 | float@test8 = 2.3f; 16 | float@test8 = 1.1f; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.int32.ax: -------------------------------------------------------------------------------- 1 | 2 | int32@test1 = 2; 3 | int32 local1 = 2; 4 | int32@test2 = local1; 5 | int32@test3 = 6 | int32@test4 = 7 | int32@test2; 8 | int32 local3, 9 | local2 = 3; 10 | int32@test5 = 11 | local3 = 12 | local2; 13 | int32@test6 = 3, 14 | int32@test7 = 2; 15 | int32@test8 = 3; 16 | int32@test8 = 2; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.int64.ax: -------------------------------------------------------------------------------- 1 | 2 | int64@test1 = 2l; 3 | int64 local1 = 2l; 4 | int64@test2 = local1; 5 | int64@test3 = 6 | int64@test4 = 7 | int64@test2; 8 | int64 local3, 9 | local2 = 3l; 10 | int64@test5 = 11 | local3 = 12 | local2; 13 | int64@test6 = 3l, 14 | int64@test7 = 2l; 15 | int64@test8 = 3l; 16 | int64@test8 = 2l; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.mat3d.ax: -------------------------------------------------------------------------------- 1 | 2 | mat3d@test1 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 3 | mat3d local1 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 4 | mat3d@test2 = local1; 5 | mat3d@test3 = 6 | mat3d@test4 = 7 | mat3d@test2; 8 | mat3d local3, 9 | local2 = {9.1, 7.3, -1.3, 4.4, -6.7, 0.8, 9.1,-0.5, 8.2 }; 10 | mat3d@test5 = 11 | local3 = 12 | local2; 13 | mat3d@test6 = {9.1, 7.3, -1.3, 4.4, -6.7, 0.8, 9.1,-0.5, 8.2 }, 14 | mat3d@test7 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 15 | mat3d@test8 = {9.1, 7.3, -1.3, 4.4, -6.7, 0.8, 9.1,-0.5, 8.2 }; 16 | mat3d@test8 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.mat3f.ax: -------------------------------------------------------------------------------- 1 | 2 | mat3f@test1 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 3 | mat3f local1 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 4 | mat3f@test2 = local1; 5 | mat3f@test3 = 6 | mat3f@test4 = 7 | mat3f@test2; 8 | mat3f local3, 9 | local2 = {9.1f, 7.3f, -1.3f, 4.4f, -6.7f, 0.8f, 9.1f,-0.5f, 8.2f }; 10 | mat3f@test5 = 11 | local3 = 12 | local2; 13 | mat3f@test6 = {9.1f, 7.3f, -1.3f, 4.4f, -6.7f, 0.8f, 9.1f,-0.5f, 8.2f }, 14 | mat3f@test7 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 15 | mat3f@test8 = {9.1f, 7.3f, -1.3f, 4.4f, -6.7f, 0.8f, 9.1f,-0.5f, 8.2f }; 16 | mat3f@test8 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.mat4d.ax: -------------------------------------------------------------------------------- 1 | 2 | mat4d@test1 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 3 | mat4d local1 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 4 | mat4d@test2 = local1; 5 | mat4d@test3 = 6 | mat4d@test4 = 7 | mat4d@test2; 8 | mat4d local3, 9 | local2 = {0.1, 2.3,-9.3, 4.5, -1.7, 7.8, 2.1, 3.3, 3.3,-3.3,-0.3, 2.5, 5.1, 0.5, 8.1,-1.7}; 10 | mat4d@test5 = 11 | local3 = 12 | local2; 13 | mat4d@test6 = {0.1, 2.3,-9.3, 4.5, -1.7, 7.8, 2.1, 3.3, 3.3,-3.3,-0.3, 2.5, 5.1, 0.5, 8.1,-1.7}, 14 | mat4d@test7 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 15 | mat4d@test8 = {0.1, 2.3,-9.3, 4.5, -1.7, 7.8, 2.1, 3.3, 3.3,-3.3,-0.3, 2.5, 5.1, 0.5, 8.1,-1.7}; 16 | mat4d@test8 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.mat4f.ax: -------------------------------------------------------------------------------- 1 | 2 | mat4f@test1 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 3 | mat4f local1 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 4 | mat4f@test2 = local1; 5 | mat4f@test3 = 6 | mat4f@test4 = 7 | mat4f@test2; 8 | mat4f local3, 9 | local2 = {0.1f, 2.3f,-9.3f, 4.5f, -1.7f, 7.8f, 2.1f, 3.3f, 3.3f,-3.3f,-0.3f, 2.5f, 5.1f, 0.5f, 8.1f,-1.7f}; 10 | mat4f@test5 = 11 | local3 = 12 | local2; 13 | mat4f@test6 = {0.1f, 2.3f,-9.3f, 4.5f, -1.7f, 7.8f, 2.1f, 3.3f, 3.3f,-3.3f,-0.3f, 2.5f, 5.1f, 0.5f, 8.1f,-1.7f}, 14 | mat4f@test7 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 15 | mat4f@test8 = {0.1f, 2.3f,-9.3f, 4.5f, -1.7f, 7.8f, 2.1f, 3.3f, 3.3f,-3.3f,-0.3f, 2.5f, 5.1f, 0.5f, 8.1f,-1.7f}; 16 | mat4f@test8 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.string.ax: -------------------------------------------------------------------------------- 1 | 2 | string@test1 = "foo"; 3 | string local1 = "foo"; 4 | string@test2 = local1; 5 | string@test3 = 6 | string@test4 = 7 | string@test2; 8 | string local3, 9 | local2 = "bar"; 10 | string@test5 = 11 | local3 = 12 | local2; 13 | string@test6 = "bar", 14 | string@test7 = "foo"; 15 | string@test8 = "bar"; 16 | string@test8 = "foo"; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec2d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2d@test1 = {1.1, 2.3}; 3 | vec2d local1 = {1.1, 2.3}; 4 | vec2d@test2 = local1; 5 | vec2d@test3 = 6 | vec2d@test4 = 7 | vec2d@test2; 8 | vec2d local3, 9 | local2 = {4.1, 5.3}; 10 | vec2d@test5 = 11 | local3 = 12 | local2; 13 | vec2d@test6 = {4.1, 5.3}, 14 | vec2d@test7 = {1.1, 2.3}; 15 | vec2d@test8 = {4.1, 5.3}; 16 | vec2d@test8 = {1.1, 2.3}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec2f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2f@test1 = {1.1f, 2.3f}; 3 | vec2f local1 = {1.1f, 2.3f}; 4 | vec2f@test2 = local1; 5 | vec2f@test3 = 6 | vec2f@test4 = 7 | vec2f@test2; 8 | vec2f local3, 9 | local2 = {4.1f, 5.3f}; 10 | vec2f@test5 = 11 | local3 = 12 | local2; 13 | vec2f@test6 = {4.1f, 5.3f}, 14 | vec2f@test7 = {1.1f, 2.3f}; 15 | vec2f@test8 = {4.1f, 5.3f}; 16 | vec2f@test8 = {1.1f, 2.3f}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec2i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2i@test1 = {1, 2}; 3 | vec2i local1 = {1, 2}; 4 | vec2i@test2 = local1; 5 | vec2i@test3 = 6 | vec2i@test4 = 7 | vec2i@test2; 8 | vec2i local3, 9 | local2 = {3, 4}; 10 | vec2i@test5 = 11 | local3 = 12 | local2; 13 | vec2i@test6 = {3, 4}, 14 | vec2i@test7 = {1, 2}; 15 | vec2i@test8 = {3, 4}; 16 | vec2i@test8 = {1, 2}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec3d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3d@test1 = {1.1, 2.3 , 4.3}; 3 | vec3d local1 = {1.1, 2.3 , 4.3}; 4 | vec3d@test2 = local1; 5 | vec3d@test3 = 6 | vec3d@test4 = 7 | vec3d@test2; 8 | vec3d local3, 9 | local2 = {4.1, 5.3, 6.3}; 10 | vec3d@test5 = 11 | local3 = 12 | local2; 13 | vec3d@test6 = {4.1, 5.3, 6.3}, 14 | vec3d@test7 = {1.1, 2.3 , 4.3}; 15 | vec3d@test8 = {4.1, 5.3, 6.3}; 16 | vec3d@test8 = {1.1, 2.3 , 4.3}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec3f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3f@test1 = {1.1f, 2.3f, 4.3f}; 3 | vec3f local1 = {1.1f, 2.3f, 4.3f}; 4 | vec3f@test2 = local1; 5 | vec3f@test3 = 6 | vec3f@test4 = 7 | vec3f@test2; 8 | vec3f local3, 9 | local2 = {4.1f, 5.3f, 6.3f}; 10 | vec3f@test5 = 11 | local3 = 12 | local2; 13 | vec3f@test6 = {4.1f, 5.3f, 6.3f}, 14 | vec3f@test7 = {1.1f, 2.3f, 4.3f}; 15 | vec3f@test8 = {4.1f, 5.3f, 6.3f}; 16 | vec3f@test8 = {1.1f, 2.3f, 4.3f}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec3i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3i@test1 = {1, 2, 3}; 3 | vec3i local1 = {1, 2, 3}; 4 | vec3i@test2 = local1; 5 | vec3i@test3 = 6 | vec3i@test4 = 7 | vec3i@test2; 8 | vec3i local3, 9 | local2 = {4, 5, 6}; 10 | vec3i@test5 = 11 | local3 = 12 | local2; 13 | vec3i@test6 = {4, 5, 6}, 14 | vec3i@test7 = {1, 2, 3}; 15 | vec3i@test8 = {4, 5, 6}; 16 | vec3i@test8 = {1, 2, 3}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec4d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4d@test1 = {1.1, 2.3, 4.3, 5.4}; 3 | vec4d local1 = {1.1, 2.3, 4.3, 5.4}; 4 | vec4d@test2 = local1; 5 | vec4d@test3 = 6 | vec4d@test4 = 7 | vec4d@test2; 8 | vec4d local3, 9 | local2 = {5.1, 6.3, 7.3, 8.4}; 10 | vec4d@test5 = 11 | local3 = 12 | local2; 13 | vec4d@test6 = {5.1, 6.3, 7.3, 8.4}, 14 | vec4d@test7 = {1.1, 2.3, 4.3, 5.4}; 15 | vec4d@test8 = {5.1, 6.3, 7.3, 8.4}; 16 | vec4d@test8 = {1.1, 2.3, 4.3, 5.4}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec4f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4f@test1 = {1.1f, 2.3f, 4.3f, 5.4f}; 3 | vec4f local1 = {1.1f, 2.3f, 4.3f, 5.4f}; 4 | vec4f@test2 = local1; 5 | vec4f@test3 = 6 | vec4f@test4 = 7 | vec4f@test2; 8 | vec4f local3, 9 | local2 = {5.1f, 6.3f, 7.3f, 8.4f}; 10 | vec4f@test5 = 11 | local3 = 12 | local2; 13 | vec4f@test6 = {5.1f, 6.3f, 7.3f, 8.4f}, 14 | vec4f@test7 = {1.1f, 2.3f, 4.3f, 5.4f}; 15 | vec4f@test8 = {5.1f, 6.3f, 7.3f, 8.4f}; 16 | vec4f@test8 = {1.1f, 2.3f, 4.3f, 5.4f}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign.vec4i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4i@test1 = {1, 2, 3, 4}; 3 | vec4i local1 = {1, 2, 3, 4}; 4 | vec4i@test2 = local1; 5 | vec4i@test3 = 6 | vec4i@test4 = 7 | vec4i@test2; 8 | vec4i local3, 9 | local2 = {5, 6, 7, 8}; 10 | vec4i@test5 = 11 | local3 = 12 | local2; 13 | vec4i@test6 = {5, 6, 7, 8}, 14 | vec4i@test7 = {1, 2, 3, 4}; 15 | vec4i@test8 = {5, 6, 7, 8}; 16 | vec4i@test8 = {1, 2, 3, 4}; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.bool.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 += true; 3 | bool@test2 -= true; 4 | bool@test3 *= true; 5 | bool@test4 /= true; 6 | bool@test5 %= true; 7 | bool@test6 <<= true; 8 | bool@test7 >>= true; 9 | bool@test8 &= true; 10 | bool@test9 ^= true; 11 | bool@test10 |= true; 12 | 13 | bool local1 = true, 14 | local2 = false; 15 | 16 | local1 += local2; 17 | bool@test11 = local1; 18 | bool@test12 += bool@test13; 19 | bool@test14 += local2; 20 | 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.double.ax: -------------------------------------------------------------------------------- 1 | 2 | double@test1 += 1.1; 3 | double@test2 -= 1.1; 4 | double@test3 *= 1.1; 5 | double@test4 /= 1.1; 6 | double@test5 %= 1.1; 7 | 8 | double local1 = 1.1, 9 | local2 = 2.3; 10 | 11 | local1 += local2; 12 | double@test6 = local1; 13 | double@test7 += double@test8; 14 | double@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.float.ax: -------------------------------------------------------------------------------- 1 | 2 | float@test1 += 1.1f; 3 | float@test2 -= 1.1f; 4 | float@test3 *= 1.1f; 5 | float@test4 /= 1.1f; 6 | float@test5 %= 1.1f; 7 | 8 | float local1 = 1.1f, 9 | local2 = 2.3f; 10 | 11 | local1 += local2; 12 | float@test6 = local1; 13 | float@test7 += float@test8; 14 | float@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.int32.ax: -------------------------------------------------------------------------------- 1 | 2 | int32@test1 += 2; 3 | int32@test2 -= 2; 4 | int32@test3 *= 2; 5 | int32@test4 /= 2; 6 | int32@test5 %= 2; 7 | int32@test6 <<= 2; 8 | int32@test7 >>= 2; 9 | int32@test8 &= 2; 10 | int32@test9 ^= 2; 11 | int32@test10 |= 2; 12 | 13 | int32 local1 = 2, 14 | local2 = 3; 15 | 16 | local1 += local2; 17 | int32@test11 = local1; 18 | int32@test12 += int32@test13; 19 | int32@test14 += local2; 20 | 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.int64.ax: -------------------------------------------------------------------------------- 1 | 2 | int64@test1 += 2l; 3 | int64@test2 -= 2l; 4 | int64@test3 *= 2l; 5 | int64@test4 /= 2l; 6 | int64@test5 %= 2l; 7 | int64@test6 <<= 2l; 8 | int64@test7 >>= 2l; 9 | int64@test8 &= 2l; 10 | int64@test9 ^= 2l; 11 | int64@test10 |= 2l; 12 | 13 | int64 local1 = 2l, 14 | local2 = 3l; 15 | 16 | local1 += local2; 17 | int64@test11 = local1; 18 | int64@test12 += int64@test13; 19 | int64@test14 += local2; 20 | 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.mat3d.ax: -------------------------------------------------------------------------------- 1 | 2 | mat3d@test1 += {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 3 | mat3d@test2 -= {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 4 | mat3d@test3 *= {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 5 | 6 | mat3d local1 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }, 7 | local2 = {9.1, 7.3, -1.3, 4.4, -6.7, 0.8, 9.1,-0.5, 8.2 }; 8 | 9 | local1 += local2; 10 | mat3d@test4 = local1; 11 | mat3d@test5 += mat3d@test6; 12 | mat3d@test7 += local2; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.mat3f.ax: -------------------------------------------------------------------------------- 1 | 2 | mat3f@test1 += {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 3 | mat3f@test2 -= {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 4 | mat3f@test3 *= {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 5 | 6 | mat3f local1 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }, 7 | local2 = {9.1f, 7.3f, -1.3f, 4.4f, -6.7f, 0.8f, 9.1f,-0.5f, 8.2f }; 8 | 9 | local1 += local2; 10 | mat3f@test4 = local1; 11 | mat3f@test5 += mat3f@test6; 12 | mat3f@test7 += local2; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.mat4d.ax: -------------------------------------------------------------------------------- 1 | 2 | mat4d@test1 += {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 3 | mat4d@test2 -= {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 4 | mat4d@test3 *= {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 5 | 6 | mat4d local1 = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}, 7 | local2 = {0.1, 2.3,-9.3, 4.5, -1.7, 7.8, 2.1, 3.3, 3.3,-3.3,-0.3, 2.5, 5.1, 0.5, 8.1,-1.7}; 8 | 9 | local1 += local2; 10 | mat4d@test4 = local1; 11 | mat4d@test5 += mat4d@test6; 12 | mat4d@test7 += local2; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.mat4f.ax: -------------------------------------------------------------------------------- 1 | 2 | mat4f@test1 += {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 3 | mat4f@test2 -= {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 4 | mat4f@test3 *= {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 5 | 6 | mat4f local1 = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}, 7 | local2 = {0.1f, 2.3f,-9.3f, 4.5f, -1.7f, 7.8f, 2.1f, 3.3f, 3.3f,-3.3f,-0.3f, 2.5f, 5.1f, 0.5f, 8.1f,-1.7f}; 8 | 9 | local1 += local2; 10 | mat4f@test4 = local1; 11 | mat4f@test5 += mat4f@test6; 12 | mat4f@test7 += local2; 13 | 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.string.ax: -------------------------------------------------------------------------------- 1 | 2 | string@test1 += "foo"; 3 | 4 | string local1 = "foo", 5 | local2 = "bar"; 6 | 7 | // test default init and empty string 8 | string empty = ""; 9 | string defaultstr; 10 | local1 += local2; 11 | defaultstr += local1; 12 | defaultstr += empty; 13 | 14 | string@test2 = defaultstr; 15 | string@test3 += string@test4; 16 | string@test5 += local2; 17 | 18 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec2d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2d@test1 += {1.1, 2.3}; 3 | vec2d@test2 -= {1.1, 2.3}; 4 | vec2d@test3 *= {1.1, 2.3}; 5 | vec2d@test4 /= {1.1, 2.3}; 6 | vec2d@test5 %= {1.1, 2.3}; 7 | 8 | vec2d local1 = {1.1, 2.3}, 9 | local2 = {4.1, 5.3}; 10 | 11 | local1 += local2; 12 | vec2d@test6 = local1; 13 | vec2d@test7 += vec2d@test8; 14 | vec2d@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec2f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2f@test1 += {1.1f, 2.3f}; 3 | vec2f@test2 -= {1.1f, 2.3f}; 4 | vec2f@test3 *= {1.1f, 2.3f}; 5 | vec2f@test4 /= {1.1f, 2.3f}; 6 | vec2f@test5 %= {1.1f, 2.3f}; 7 | 8 | vec2f local1 = {1.1f, 2.3f}, 9 | local2 = {4.1f, 5.3f}; 10 | 11 | local1 += local2; 12 | vec2f@test6 = local1; 13 | vec2f@test7 += vec2f@test8; 14 | vec2f@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec2i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2i@test1 += {1, 2}; 3 | vec2i@test2 -= {1, 2}; 4 | vec2i@test3 *= {1, 2}; 5 | vec2i@test4 /= {1, 2}; 6 | vec2i@test5 %= {1, 2}; 7 | 8 | vec2i local1 = {1, 2}, 9 | local2 = {3, 4}; 10 | 11 | local1 += local2; 12 | vec2i@test6 = local1; 13 | vec2i@test7 += vec2i@test8; 14 | vec2i@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec3d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3d@test1 += {1.1, 2.3 , 4.3}; 3 | vec3d@test2 -= {1.1, 2.3 , 4.3}; 4 | vec3d@test3 *= {1.1, 2.3 , 4.3}; 5 | vec3d@test4 /= {1.1, 2.3 , 4.3}; 6 | vec3d@test5 %= {1.1, 2.3 , 4.3}; 7 | 8 | vec3d local1 = {1.1, 2.3 , 4.3}, 9 | local2 = {4.1, 5.3, 6.3}; 10 | 11 | local1 += local2; 12 | vec3d@test6 = local1; 13 | vec3d@test7 += vec3d@test8; 14 | vec3d@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec3f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3f@test1 += {1.1f, 2.3f, 4.3f}; 3 | vec3f@test2 -= {1.1f, 2.3f, 4.3f}; 4 | vec3f@test3 *= {1.1f, 2.3f, 4.3f}; 5 | vec3f@test4 /= {1.1f, 2.3f, 4.3f}; 6 | vec3f@test5 %= {1.1f, 2.3f, 4.3f}; 7 | 8 | vec3f local1 = {1.1f, 2.3f, 4.3f}, 9 | local2 = {4.1f, 5.3f, 6.3f}; 10 | 11 | local1 += local2; 12 | vec3f@test6 = local1; 13 | vec3f@test7 += vec3f@test8; 14 | vec3f@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec3i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3i@test1 += {1, 2, 3}; 3 | vec3i@test2 -= {1, 2, 3}; 4 | vec3i@test3 *= {1, 2, 3}; 5 | vec3i@test4 /= {1, 2, 3}; 6 | vec3i@test5 %= {1, 2, 3}; 7 | 8 | vec3i local1 = {1, 2, 3}, 9 | local2 = {4, 5, 6}; 10 | 11 | local1 += local2; 12 | vec3i@test6 = local1; 13 | vec3i@test7 += vec3i@test8; 14 | vec3i@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec4d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4d@test1 += {1.1, 2.3, 4.3, 5.4}; 3 | vec4d@test2 -= {1.1, 2.3, 4.3, 5.4}; 4 | vec4d@test3 *= {1.1, 2.3, 4.3, 5.4}; 5 | vec4d@test4 /= {1.1, 2.3, 4.3, 5.4}; 6 | vec4d@test5 %= {1.1, 2.3, 4.3, 5.4}; 7 | 8 | vec4d local1 = {1.1, 2.3, 4.3, 5.4}, 9 | local2 = {5.1, 6.3, 7.3, 8.4}; 10 | 11 | local1 += local2; 12 | vec4d@test6 = local1; 13 | vec4d@test7 += vec4d@test8; 14 | vec4d@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec4f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4f@test1 += {1.1f, 2.3f, 4.3f, 5.4f}; 3 | vec4f@test2 -= {1.1f, 2.3f, 4.3f, 5.4f}; 4 | vec4f@test3 *= {1.1f, 2.3f, 4.3f, 5.4f}; 5 | vec4f@test4 /= {1.1f, 2.3f, 4.3f, 5.4f}; 6 | vec4f@test5 %= {1.1f, 2.3f, 4.3f, 5.4f}; 7 | 8 | vec4f local1 = {1.1f, 2.3f, 4.3f, 5.4f}, 9 | local2 = {5.1f, 6.3f, 7.3f, 8.4f}; 10 | 11 | local1 += local2; 12 | vec4f@test6 = local1; 13 | vec4f@test7 += vec4f@test8; 14 | vec4f@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_compound.vec4i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4i@test1 += {1, 2, 3, 4}; 3 | vec4i@test2 -= {1, 2, 3, 4}; 4 | vec4i@test3 *= {1, 2, 3, 4}; 5 | vec4i@test4 /= {1, 2, 3, 4}; 6 | vec4i@test5 %= {1, 2, 3, 4}; 7 | 8 | vec4i local1 = {1, 2, 3, 4}, 9 | local2 = {5, 6, 7, 8}; 10 | 11 | local1 += local2; 12 | vec4i@test6 = local1; 13 | vec4i@test7 += vec4i@test8; 14 | vec4i@test9 += local2; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.mat3d.ax: -------------------------------------------------------------------------------- 1 | mat3d local = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2 }; 2 | mat3f@testmat3f = local; 3 | 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.mat3f.ax: -------------------------------------------------------------------------------- 1 | mat3f local = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f }; 2 | mat3d@testmat3d = local; 3 | 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.mat4d.ax: -------------------------------------------------------------------------------- 1 | mat4d local = {1.1, 2.3, 4.3, 5.4, 6.7, 7.8, 9.1, 4.5, 8.2, 3.3, 2.9, 5.9, 0.1, 0.3, 5.1, 1.9}; 2 | mat4f@testmat4f = local; 3 | 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.mat4f.ax: -------------------------------------------------------------------------------- 1 | mat4f local = {1.1f, 2.3f, 4.3f, 5.4f, 6.7f, 7.8f, 9.1f, 4.5f, 8.2f, 3.3f, 2.9f, 5.9f, 0.1f, 0.3f, 5.1f, 1.9f}; 2 | mat4d@testmat4d = local; 3 | 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec2d.ax: -------------------------------------------------------------------------------- 1 | vec2d local = {1.1, 2.3}; 2 | vec2f@testvec2f = local; 3 | vec2i@testvec2i = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec2f.ax: -------------------------------------------------------------------------------- 1 | vec2f local = {1.1f, 2.3f}; 2 | vec2d@testvec2d = local; 3 | vec2i@testvec2i = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec2i.ax: -------------------------------------------------------------------------------- 1 | vec2i local = {1, 2}; 2 | vec2d@testvec2d = local; 3 | vec2f@testvec2f = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec3d.ax: -------------------------------------------------------------------------------- 1 | vec3d local = {1.1, 2.3 , 4.3}; 2 | vec3f@testvec3f = local; 3 | vec3i@testvec3i = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec3f.ax: -------------------------------------------------------------------------------- 1 | vec3f local = {1.1f, 2.3f, 4.3f}; 2 | vec3d@testvec3d = local; 3 | vec3i@testvec3i = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec3i.ax: -------------------------------------------------------------------------------- 1 | vec3i local = {1, 2, 3}; 2 | vec3d@testvec3d = local; 3 | vec3f@testvec3f = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec4d.ax: -------------------------------------------------------------------------------- 1 | vec4d local = {1.1, 2.3, 4.3, 5.4}; 2 | vec4f@testvec4f = local; 3 | vec4i@testvec4i = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec4f.ax: -------------------------------------------------------------------------------- 1 | vec4f local = {1.1f, 2.3f, 4.3f, 5.4f}; 2 | vec4d@testvec4d = local; 3 | vec4i@testvec4i = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container.vec4i.ax: -------------------------------------------------------------------------------- 1 | vec4i local = {1, 2, 3, 4}; 2 | vec4d@testvec4d = local; 3 | vec4f@testvec4f = local; 4 | 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container_scalar.bool.ax: -------------------------------------------------------------------------------- 1 | bool local = true; 2 | vec2d@testvec2d = local; 3 | vec2f@testvec2f = local; 4 | vec2i@testvec2i = local; 5 | vec3d@testvec3d = local; 6 | vec3f@testvec3f = local; 7 | vec3i@testvec3i = local; 8 | vec4d@testvec4d = local; 9 | vec4f@testvec4f = local; 10 | vec4i@testvec4i = local; 11 | mat3d@testmat3d = local; 12 | mat3f@testmat3f = local; 13 | mat4d@testmat4d = local; 14 | mat4f@testmat4f = local; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container_scalar.double.ax: -------------------------------------------------------------------------------- 1 | double local = 1.1; 2 | vec2d@testvec2d = local; 3 | vec2f@testvec2f = local; 4 | vec2i@testvec2i = local; 5 | vec3d@testvec3d = local; 6 | vec3f@testvec3f = local; 7 | vec3i@testvec3i = local; 8 | vec4d@testvec4d = local; 9 | vec4f@testvec4f = local; 10 | vec4i@testvec4i = local; 11 | mat3d@testmat3d = local; 12 | mat3f@testmat3f = local; 13 | mat4d@testmat4d = local; 14 | mat4f@testmat4f = local; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container_scalar.float.ax: -------------------------------------------------------------------------------- 1 | float local = 1.1f; 2 | vec2d@testvec2d = local; 3 | vec2f@testvec2f = local; 4 | vec2i@testvec2i = local; 5 | vec3d@testvec3d = local; 6 | vec3f@testvec3f = local; 7 | vec3i@testvec3i = local; 8 | vec4d@testvec4d = local; 9 | vec4f@testvec4f = local; 10 | vec4i@testvec4i = local; 11 | mat3d@testmat3d = local; 12 | mat3f@testmat3f = local; 13 | mat4d@testmat4d = local; 14 | mat4f@testmat4f = local; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container_scalar.int32.ax: -------------------------------------------------------------------------------- 1 | int32 local = 2; 2 | vec2d@testvec2d = local; 3 | vec2f@testvec2f = local; 4 | vec2i@testvec2i = local; 5 | vec3d@testvec3d = local; 6 | vec3f@testvec3f = local; 7 | vec3i@testvec3i = local; 8 | vec4d@testvec4d = local; 9 | vec4f@testvec4f = local; 10 | vec4i@testvec4i = local; 11 | mat3d@testmat3d = local; 12 | mat3f@testmat3f = local; 13 | mat4d@testmat4d = local; 14 | mat4f@testmat4f = local; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_container_scalar.int64.ax: -------------------------------------------------------------------------------- 1 | int64 local = 2l; 2 | vec2d@testvec2d = local; 3 | vec2f@testvec2f = local; 4 | vec2i@testvec2i = local; 5 | vec3d@testvec3d = local; 6 | vec3f@testvec3f = local; 7 | vec3i@testvec3i = local; 8 | vec4d@testvec4d = local; 9 | vec4f@testvec4f = local; 10 | vec4i@testvec4i = local; 11 | mat3d@testmat3d = local; 12 | mat3f@testmat3f = local; 13 | mat4d@testmat4d = local; 14 | mat4f@testmat4f = local; 15 | 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_scalar.bool.ax: -------------------------------------------------------------------------------- 1 | bool local = true; 2 | int32@testint32 = local; 3 | int64@testint64 = local; 4 | double@testdouble = local; 5 | float@testfloat = local; 6 | 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_scalar.double.ax: -------------------------------------------------------------------------------- 1 | double local = 1.1; 2 | bool@testbool = local; 3 | int32@testint32 = local; 4 | int64@testint64 = local; 5 | float@testfloat = local; 6 | 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_scalar.float.ax: -------------------------------------------------------------------------------- 1 | float local = 1.1f; 2 | bool@testbool = local; 3 | int32@testint32 = local; 4 | int64@testint64 = local; 5 | double@testdouble = local; 6 | 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_scalar.int32.ax: -------------------------------------------------------------------------------- 1 | int32 local = 2; 2 | bool@testbool = local; 3 | int64@testint64 = local; 4 | double@testdouble = local; 5 | float@testfloat = local; 6 | 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_implicit_scalar.int64.ax: -------------------------------------------------------------------------------- 1 | int64 local = 2l; 2 | bool@testbool = local; 3 | int32@testint32 = local; 4 | double@testdouble = local; 5 | float@testfloat = local; 6 | 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestAssign/assign_scoped.float.ax: -------------------------------------------------------------------------------- 1 | 2 | float var = 30.0f; 3 | 4 | { 5 | float var = 3.0f; 6 | } 7 | { 8 | float var = 1.0f; 9 | float@test2 = var; 10 | { 11 | float var = -10.0f; 12 | float@test3 = var; 13 | } 14 | { 15 | float@test7 = var; 16 | } 17 | } 18 | { 19 | float var = -100.0f; 20 | } 21 | { 22 | float var = 50.0f; 23 | { 24 | float var = -15.0f; 25 | float@test4 = var; 26 | } 27 | { 28 | float var = -10.0f; 29 | } 30 | { 31 | float@test5 = var; 32 | } 33 | 34 | float@test6 = var; 35 | } 36 | 37 | float@test1 = var; 38 | 39 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_bitand.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = true & false; 3 | int16@testint16 = 2 & 3; 4 | int32@testint32 = 2 & 3; 5 | int64@testint64 = 2l & 3l; 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_bitor.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = true | false; 3 | int16@testint16 = 2 | 3; 4 | int32@testint32 = 2 | 3; 5 | int64@testint64 = 2l | 3l; 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_bitxor.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = true ^ false; 3 | int16@testint16 = 2 ^ 3; 4 | int32@testint32 = 2 ^ 3; 5 | int64@testint64 = 2l ^ 3l; 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_div.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = false / true; 3 | int16@testint16 = 3 / 2; 4 | int32@testint32 = 3 / 2; 5 | int64@testint64 = 3l / 2l; 6 | double@testdouble = 2.3 / 1.1; 7 | float@testfloat = 2.3f / 1.1f; 8 | vec2d@testvec2d = {4.1, 5.3} / {1.1, 2.3}; 9 | vec2f@testvec2f = {4.1f, 5.3f} / {1.1f, 2.3f}; 10 | vec2i@testvec2i = {3, 4} / {1, 2}; 11 | vec3d@testvec3d = {4.1, 5.3, 6.3} / {1.1, 2.3 , 4.3}; 12 | vec3f@testvec3f = {4.1f, 5.3f, 6.3f} / {1.1f, 2.3f, 4.3f}; 13 | vec3i@testvec3i = {4, 5, 6} / {1, 2, 3}; 14 | vec4d@testvec4d = {5.1, 6.3, 7.3, 8.4} / {1.1, 2.3, 4.3, 5.4}; 15 | vec4f@testvec4f = {5.1f, 6.3f, 7.3f, 8.4f} / {1.1f, 2.3f, 4.3f, 5.4f}; 16 | vec4i@testvec4i = {5, 6, 7, 8} / {1, 2, 3, 4}; 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_logicaland.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = true && false; 3 | int16@testint16 = 2 && 3; 4 | int32@testint32 = 2 && 3; 5 | int64@testint64 = 2l && 3l; 6 | double@testdouble = 1.1 && 2.3; 7 | float@testfloat = 1.1f && 2.3f; 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_logicaland_scircuit.ax: -------------------------------------------------------------------------------- 1 | 2 | int@scircuit1 = 0; 3 | int@scircuit2 = 1; 4 | int@scircuit3 = 2; 5 | int@scircuit1++ && ++int@scircuit2; 6 | ++int@scircuit1 && ++int@scircuit3; 7 | int@scircuit4 = 1; 8 | int@scircuit5 = 1; 9 | true && int@scircuit4 = 2; 10 | false && int@scircuit5 = 2; 11 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_logicalor.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = true || false; 3 | int16@testint16 = 2 || 3; 4 | int32@testint32 = 2 || 3; 5 | int64@testint64 = 2l || 3l; 6 | double@testdouble = 1.1 || 2.3; 7 | float@testfloat = 1.1f || 2.3f; 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_logicalor_scircuit.ax: -------------------------------------------------------------------------------- 1 | 2 | int@scircuit1 = 0; 3 | int@scircuit2 = 1; 4 | int@scircuit3 = 2; 5 | int@scircuit1++ || ++int@scircuit2; 6 | ++int@scircuit1 || ++int@scircuit3; 7 | int@scircuit4 = 1; 8 | int@scircuit5 = 1; 9 | true || int@scircuit4 = 2; 10 | false || int@scircuit5 = 2; 11 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_mod.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool = false % true; 3 | int16@testint16 = 3 % 2; 4 | int32@testint32 = 3 % 2; 5 | int64@testint64 = 3l % 2l; 6 | double@testdouble = 2.3 % 1.1; 7 | float@testfloat = 2.3f % 1.1f; 8 | vec2d@testvec2d = {4.1, 5.3} % {1.1, 2.3}; 9 | vec2f@testvec2f = {4.1f, 5.3f} % {1.1f, 2.3f}; 10 | vec2i@testvec2i = {3, 4} % {1, 2}; 11 | vec3d@testvec3d = {4.1, 5.3, 6.3} % {1.1, 2.3 , 4.3}; 12 | vec3f@testvec3f = {4.1f, 5.3f, 6.3f} % {1.1f, 2.3f, 4.3f}; 13 | vec3i@testvec3i = {4, 5, 6} % {1, 2, 3}; 14 | vec4d@testvec4d = {5.1, 6.3, 7.3, 8.4} % {1.1, 2.3, 4.3, 5.4}; 15 | vec4f@testvec4f = {5.1f, 6.3f, 7.3f, 8.4f} % {1.1f, 2.3f, 4.3f, 5.4f}; 16 | vec4i@testvec4i = {5, 6, 7, 8} % {1, 2, 3, 4}; 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_relational_greaterthan.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 = true > false; 3 | bool@test2 = false > true; 4 | bool@test3 = false > false; 5 | bool@test4 = 2 > 3; 6 | bool@test5 = 3 > 2; 7 | bool@test6 = 3 > 3; 8 | bool@test7 = 2 > 3; 9 | bool@test8 = 3 > 2; 10 | bool@test9 = 3 > 3; 11 | bool@test10 = 2l > 3l; 12 | bool@test11 = 3l > 2l; 13 | bool@test12 = 3l > 3l; 14 | bool@test13 = 1.1 > 2.3; 15 | bool@test14 = 2.3 > 1.1; 16 | bool@test15 = 2.3 > 2.3; 17 | bool@test16 = 1.1f > 2.3f; 18 | bool@test17 = 2.3f > 1.1f; 19 | bool@test18 = 2.3f > 2.3f; 20 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_relational_greaterthanequals.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 = true >= false; 3 | bool@test2 = false >= true; 4 | bool@test3 = false >= false; 5 | bool@test4 = 2 >= 3; 6 | bool@test5 = 3 >= 2; 7 | bool@test6 = 3 >= 3; 8 | bool@test7 = 2 >= 3; 9 | bool@test8 = 3 >= 2; 10 | bool@test9 = 3 >= 3; 11 | bool@test10 = 2l >= 3l; 12 | bool@test11 = 3l >= 2l; 13 | bool@test12 = 3l >= 3l; 14 | bool@test13 = 1.1 >= 2.3; 15 | bool@test14 = 2.3 >= 1.1; 16 | bool@test15 = 2.3 >= 2.3; 17 | bool@test16 = 1.1f >= 2.3f; 18 | bool@test17 = 2.3f >= 1.1f; 19 | bool@test18 = 2.3f >= 2.3f; 20 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_relational_lessthan.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 = true < false; 3 | bool@test2 = false < true; 4 | bool@test3 = false < false; 5 | bool@test4 = 2 < 3; 6 | bool@test5 = 3 < 2; 7 | bool@test6 = 3 < 3; 8 | bool@test7 = 2 < 3; 9 | bool@test8 = 3 < 2; 10 | bool@test9 = 3 < 3; 11 | bool@test10 = 2l < 3l; 12 | bool@test11 = 3l < 2l; 13 | bool@test12 = 3l < 3l; 14 | bool@test13 = 1.1 < 2.3; 15 | bool@test14 = 2.3 < 1.1; 16 | bool@test15 = 2.3 < 2.3; 17 | bool@test16 = 1.1f < 2.3f; 18 | bool@test17 = 2.3f < 1.1f; 19 | bool@test18 = 2.3f < 2.3f; 20 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_relational_lessthanequals.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 = true <= false; 3 | bool@test2 = false <= true; 4 | bool@test3 = false <= false; 5 | bool@test4 = 2 <= 3; 6 | bool@test5 = 3 <= 2; 7 | bool@test6 = 3 <= 3; 8 | bool@test7 = 2 <= 3; 9 | bool@test8 = 3 <= 2; 10 | bool@test9 = 3 <= 3; 11 | bool@test10 = 2l <= 3l; 12 | bool@test11 = 3l <= 2l; 13 | bool@test12 = 3l <= 3l; 14 | bool@test13 = 1.1 <= 2.3; 15 | bool@test14 = 2.3 <= 1.1; 16 | bool@test15 = 2.3 <= 2.3; 17 | bool@test16 = 1.1f <= 2.3f; 18 | bool@test17 = 2.3f <= 1.1f; 19 | bool@test18 = 2.3f <= 2.3f; 20 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_shiftleft.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool1 = true << false; 3 | bool@testbool2 = false << true; 4 | int16@testint161 = 2 << 3; 5 | int16@testint162 = 3 << 2; 6 | int32@testint321 = 2 << 3; 7 | int32@testint322 = 3 << 2; 8 | int64@testint641 = 2l << 3l; 9 | int64@testint642 = 3l << 2l; 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestBinary/binary_shiftright.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@testbool1 = true >> false; 3 | bool@testbool2 = false >> true; 4 | int16@testint161 = 2 >> 3; 5 | int16@testint162 = 3 >> 2; 6 | int32@testint321 = 2 >> 3; 7 | int32@testint322 = 3 >> 2; 8 | int64@testint641 = 2l >> 3l; 9 | int64@testint642 = 3l >> 2l; 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCast/cast_explicit.bool.ax: -------------------------------------------------------------------------------- 1 | bool@test1 = bool(int32@testint32); 2 | bool@test2 = bool(int64@testint64); 3 | bool@test3 = bool(float@testfloat); 4 | bool@test4 = bool(double@testdouble); 5 | 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCast/cast_explicit.double.ax: -------------------------------------------------------------------------------- 1 | double@test1 = double(bool@testbool); 2 | double@test2 = double(int32@testint32); 3 | double@test3 = double(int64@testint64); 4 | double@test4 = double(float@testfloat); 5 | 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCast/cast_explicit.float.ax: -------------------------------------------------------------------------------- 1 | float@test1 = float(bool@testbool); 2 | float@test2 = float(int32@testint32); 3 | float@test3 = float(int64@testint64); 4 | float@test4 = float(double@testdouble); 5 | 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCast/cast_explicit.int32.ax: -------------------------------------------------------------------------------- 1 | int32@test1 = int32(bool@testbool); 2 | int32@test2 = int32(int64@testint64); 3 | int32@test3 = int32(float@testfloat); 4 | int32@test4 = int32(double@testdouble); 5 | 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCast/cast_explicit.int64.ax: -------------------------------------------------------------------------------- 1 | int64@test1 = int64(bool@testbool); 2 | int64@test2 = int64(int32@testint32); 3 | int64@test3 = int64(float@testfloat); 4 | int64@test4 = int64(double@testdouble); 5 | 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_dec.double.ax: -------------------------------------------------------------------------------- 1 | 2 | double@test1 = --double@test2; 3 | double@test3 = double@test4--; 4 | double@test5 = (double@test6--, double@test7--, --double@test6); 5 | double@test8 = (--double@test6, --double@test7, double@test6--); 6 | --double@test9 = double@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_dec.float.ax: -------------------------------------------------------------------------------- 1 | 2 | float@test1 = --float@test2; 3 | float@test3 = float@test4--; 4 | float@test5 = (float@test6--, float@test7--, --float@test6); 5 | float@test8 = (--float@test6, --float@test7, float@test6--); 6 | --float@test9 = float@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_dec.int16.ax: -------------------------------------------------------------------------------- 1 | 2 | int16@test1 = --int16@test2; 3 | int16@test3 = int16@test4--; 4 | int16@test5 = (int16@test6--, int16@test7--, --int16@test6); 5 | int16@test8 = (--int16@test6, --int16@test7, int16@test6--); 6 | --int16@test9 = int16@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_dec.int32.ax: -------------------------------------------------------------------------------- 1 | 2 | int32@test1 = --int32@test2; 3 | int32@test3 = int32@test4--; 4 | int32@test5 = (int32@test6--, int32@test7--, --int32@test6); 5 | int32@test8 = (--int32@test6, --int32@test7, int32@test6--); 6 | --int32@test9 = int32@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_dec.int64.ax: -------------------------------------------------------------------------------- 1 | 2 | int64@test1 = --int64@test2; 3 | int64@test3 = int64@test4--; 4 | int64@test5 = (int64@test6--, int64@test7--, --int64@test6); 5 | int64@test8 = (--int64@test6, --int64@test7, int64@test6--); 6 | --int64@test9 = int64@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_inc.double.ax: -------------------------------------------------------------------------------- 1 | 2 | double@test1 = ++double@test2; 3 | double@test3 = double@test4++; 4 | double@test5 = (double@test6++, double@test7++, ++double@test6); 5 | double@test8 = (++double@test6, ++double@test7, double@test6++); 6 | ++double@test9 = double@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_inc.float.ax: -------------------------------------------------------------------------------- 1 | 2 | float@test1 = ++float@test2; 3 | float@test3 = float@test4++; 4 | float@test5 = (float@test6++, float@test7++, ++float@test6); 5 | float@test8 = (++float@test6, ++float@test7, float@test6++); 6 | ++float@test9 = float@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_inc.int16.ax: -------------------------------------------------------------------------------- 1 | 2 | int16@test1 = ++int16@test2; 3 | int16@test3 = int16@test4++; 4 | int16@test5 = (int16@test6++, int16@test7++, ++int16@test6); 5 | int16@test8 = (++int16@test6, ++int16@test7, int16@test6++); 6 | ++int16@test9 = int16@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_inc.int32.ax: -------------------------------------------------------------------------------- 1 | 2 | int32@test1 = ++int32@test2; 3 | int32@test3 = int32@test4++; 4 | int32@test5 = (int32@test6++, int32@test7++, ++int32@test6); 5 | int32@test8 = (++int32@test6, ++int32@test7, int32@test6++); 6 | ++int32@test9 = int32@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestCrement/crement_inc.int64.ax: -------------------------------------------------------------------------------- 1 | 2 | int64@test1 = ++int64@test2; 3 | int64@test3 = int64@test4++; 4 | int64@test5 = (int64@test6++, int64@test7++, ++int64@test6); 5 | int64@test8 = (++int64@test6, ++int64@test7, int64@test6++); 6 | ++int64@test9 = int64@test9; 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestEmpty.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include "TestHarness.h" 5 | 6 | #include 7 | 8 | #include 9 | 10 | using namespace openvdb::points; 11 | 12 | class TestEmpty : public unittest_util::AXTestCase 13 | { 14 | 15 | public: 16 | CPPUNIT_TEST_SUITE(TestEmpty); 17 | CPPUNIT_TEST(testEmpty); 18 | CPPUNIT_TEST_SUITE_END(); 19 | void testEmpty(); 20 | }; 21 | 22 | CPPUNIT_TEST_SUITE_REGISTRATION(TestEmpty); 23 | 24 | void 25 | TestEmpty::testEmpty() 26 | { 27 | unittest_util::AXTestHarness harness; 28 | harness.executeCode("test/snippets/empty/empty"); 29 | AXTESTS_STANDARD_ASSERT_HARNESS(harness); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.bool.ax: -------------------------------------------------------------------------------- 1 | 2 | bool@test1 = bool$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.double.ax: -------------------------------------------------------------------------------- 1 | 2 | double@test1 = double$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.float.ax: -------------------------------------------------------------------------------- 1 | 2 | float@test1 = float$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.int32.ax: -------------------------------------------------------------------------------- 1 | 2 | int32@test1 = int32$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.int64.ax: -------------------------------------------------------------------------------- 1 | 2 | int64@test1 = int64$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.mat3d.ax: -------------------------------------------------------------------------------- 1 | 2 | mat3d@test1 = mat3d$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.mat3f.ax: -------------------------------------------------------------------------------- 1 | 2 | mat3f@test1 = mat3f$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.mat4d.ax: -------------------------------------------------------------------------------- 1 | 2 | mat4d@test1 = mat4d$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.mat4f.ax: -------------------------------------------------------------------------------- 1 | 2 | mat4f@test1 = mat4f$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.string.ax: -------------------------------------------------------------------------------- 1 | 2 | string@test1 = string$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec2d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2d@test1 = vec2d$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec2f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2f@test1 = vec2f$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec2i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec2i@test1 = vec2i$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec3d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3d@test1 = vec3d$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec3f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3f@test1 = vec3f$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec3i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec3i@test1 = vec3i$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec4d.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4d@test1 = vec4d$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec4f.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4f@test1 = vec4f$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/integration/TestExternals/external_assign_from.vec4i.ax: -------------------------------------------------------------------------------- 1 | 2 | vec4i@test1 = vec4i$ext1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/conditional/conditionalErrors: -------------------------------------------------------------------------------- 1 | if ({1,1,1}) { 2 | true; 3 | } 4 | 5 | if (false) { 6 | true; 7 | } else if ("foo") { 8 | true; 9 | } 10 | 11 | if ({1,1,1} < 1) { 12 | true; 13 | } -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/conditional/conditionalIfWithinElse: -------------------------------------------------------------------------------- 1 | bool@bool_test = false; 2 | 3 | if (false) {} 4 | else 5 | { 6 | if (false) ; 7 | else if (true) { 8 | if (true) 9 | { 10 | bool@bool_test = true; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/conditional/conditionalScopingStatement: -------------------------------------------------------------------------------- 1 | int32@int_test = 0; 2 | 3 | if(true) { 4 | if (true) { 5 | int@int_test = 1; 6 | } 7 | else if(true) { 8 | int@int_test = 2; 9 | } 10 | else { 11 | int@int_test = 3; 12 | } 13 | } 14 | else { 15 | int@int_test = 4; 16 | } 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/conditional/conditionalSimpleElseIf: -------------------------------------------------------------------------------- 1 | int32@int_test = 2; 2 | bool@bool_test = false; 3 | 4 | if(int32@int_test == 0) ; 5 | else if (int32@int_test == 1) ; 6 | else if (int32@int_test == 2) bool@bool_test = true; 7 | else 8 | 9 | int32@int_test = 0; 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/conditional/conditionalSimpleStatement: -------------------------------------------------------------------------------- 1 | @float_test = 5.f; 2 | bool@bool_test = false; 3 | 4 | if (!bool@bool_test) @float_test = 1.f; 5 | 6 | if(!bool@bool_test) if(true) bool@bool_test = true; 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareAmbiguousScalarAttributes: -------------------------------------------------------------------------------- 1 | @float_test; 2 | i@float_test; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareAmbiguousScalarExternals: -------------------------------------------------------------------------------- 1 | $float_test; 2 | i$float_test; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareAmbiguousVectorAttributes: -------------------------------------------------------------------------------- 1 | v@vector_float; 2 | vec3i@vector_float; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareAmbiguousVectorExternals: -------------------------------------------------------------------------------- 1 | v$vector_float; 2 | vec3i$vector_float; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareAttributes: -------------------------------------------------------------------------------- 1 | @float_test1; 2 | int32@int_test1; 3 | 4 | int16@short_test = 1s; 5 | int32@int_test2 = 5; 6 | int64@long_test = 3l; 7 | 8 | float@float_test2 = 0.2f; 9 | double@double_test = 0.3; 10 | 11 | f@float_test3 = 10.0f; 12 | @float_test4 = 10.0f; 13 | 14 | i@int_test3 = 10; 15 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareAttributesVolume: -------------------------------------------------------------------------------- 1 | // Same as declareAttributes without short data. Used for volume tests since "short" volumes 2 | // are not supported at the moment. Can be deprecated if this ever changes 3 | 4 | @float_test1; 5 | int32@int_test1; 6 | 7 | int32@int_test2 = 5; 8 | int64@long_test = 3l; 9 | 10 | float@float_test2 = 0.2f; 11 | double@double_test = 0.3; 12 | 13 | f@float_test3 = 10.0f; 14 | @float_test4 = 10.0f; 15 | 16 | i@int_test3 = 10; 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareLocalVariables: -------------------------------------------------------------------------------- 1 | float a_float; 2 | int32 a_int; 3 | 4 | int16 a_short = 1s; 5 | int32 b_int = 5; 6 | int64 a_long = 3l; 7 | 8 | float b_float = 0.2f; 9 | double a_double = 0.3; 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareLocalVectorVariables: -------------------------------------------------------------------------------- 1 | vec3f a_float; 2 | vec3i a_int; 3 | 4 | vec3i b_int = {5, 6, 7}; 5 | 6 | vec3f b_float = {0.2f, 0.3f, 0.4f}; 7 | vec3d a_double = {0.3, 0.4, 0.5}; 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareNewVectorAttributes: -------------------------------------------------------------------------------- 1 | v@vec_float_test; 2 | vec3i@vec_int_test; 3 | 4 | vec3i@vec_int_test2 = {5, 6, 7}; 5 | 6 | vec3f@vec_float_test2 = {0.2f, 0.3f, 0.4f}; 7 | vec3d@vec_double_test = {0.3, 0.4, 0.5}; 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareVectorAttributeImplicit: -------------------------------------------------------------------------------- 1 | 2 | vec3d@vec_double_test = {1.f, 0.3, 0.4}; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/declare/declareVectorAttributes: -------------------------------------------------------------------------------- 1 | v@vec_float_test; 2 | vec3i@vec_int_test; 3 | 4 | vec3i@vec_int_test2 = {5, 6, 7}; 5 | 6 | vec3f@vec_float_test2 = {0.2f, 0.3f, 0.4f}; 7 | vec3d@vec_double_test = {0.3, 0.4, 0.5}; 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/empty/empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/openvdb/openvdb_ax/openvdb_ax/test/snippets/empty/empty -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/abs: -------------------------------------------------------------------------------- 1 | int32@test1 = abs(-3); 2 | int32@test2 = abs(3); 3 | int32@test3 = abs(0); 4 | int64@test4 = abs(-2147483649l); 5 | float@test5 = abs(0.3f); 6 | float@test6 = abs(-0.3f); 7 | double@test7 = abs(1.79769e+308); 8 | double@test8 = abs(-1.79769e+308); 9 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/acos: -------------------------------------------------------------------------------- 1 | double@test1 = acos(0.5); 2 | float@test2 = acos(0.5f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/adjoint: -------------------------------------------------------------------------------- 1 | 2 | mat3d inputd = { 3 | 1.0, -1.0, 0.0, 4 | 2.0, 2.0, 0.0, 5 | 0.0, 0.0, -1.0 6 | }; 7 | 8 | mat3d add; 9 | add = adjoint(inputd); 10 | 11 | mat3f inputf = { 12 | 1.0f, -1.0f, 0.0f, 13 | 2.0f, 2.0f, 0.0f, 14 | 0.0f, 0.0f, -1.0f 15 | }; 16 | 17 | mat3f adf; 18 | adf = adjoint(inputf); 19 | 20 | mat3d@test1 = add; 21 | mat3f@test2 = adf; 22 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/argsort: -------------------------------------------------------------------------------- 1 | 2 | vec3d input3d = {1.0, -1.0, 0.0}; 3 | vec3f input3f = {1.0f, -1.0f, 0.0f}; 4 | vec3i input3i = {1, -1, 0}; 5 | 6 | vec4d input4d = {1.0, -1.0, 0.0, 5.0}; 7 | vec4f input4f = {1.0f, -1.0f, 0.0f, 5.0f}; 8 | vec4i input4i = {1, -1, 0, 5}; 9 | 10 | vec3i sorted3d; 11 | sorted3d = argsort(input3d); 12 | 13 | vec3i sorted3f; 14 | sorted3f = argsort(input3f); 15 | 16 | vec3i sorted3i; 17 | sorted3i = argsort(input3i); 18 | 19 | vec4i sorted4d; 20 | sorted4d = argsort(input4d); 21 | 22 | vec4i sorted4f; 23 | sorted4f = argsort(input4f); 24 | 25 | vec4i sorted4i; 26 | sorted4i = argsort(input4i); 27 | 28 | vec3i@test1 = sorted3d; 29 | vec3i@test2 = sorted3f; 30 | vec3i@test3 = sorted3i; 31 | vec4i@test4 = sorted4d; 32 | vec4i@test5 = sorted4f; 33 | vec4i@test6 = sorted4i; 34 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/asin: -------------------------------------------------------------------------------- 1 | double@test1 = asin(-0.5); 2 | float@test2 = asin(-0.5f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/atan: -------------------------------------------------------------------------------- 1 | double@test1 = atan(1.0); 2 | float@test2 = atan(1.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/atan2: -------------------------------------------------------------------------------- 1 | double@test1 = atan2(1.0, 1.0); 2 | float@test2 = atan2(1.0f, 1.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/atof: -------------------------------------------------------------------------------- 1 | double@test1 = atof(""); 2 | double@test2 = atof("-0.0"); 3 | double@test3 = atof("+0.0"); 4 | double@test4 = atof("-1.1"); 5 | double@test5 = atof("1.5"); 6 | double@test6 = atof("1.s9"); 7 | double@test7 = atof("1s.9"); 8 | double@test8 = atof(" 1.6"); 9 | double@test9 = atof("1.5s1"); 10 | double@test10 = atof("1. 1.3"); 11 | double@test11 = atof("11.11"); 12 | double@test12 = atof("1.79769e+308"); 13 | double@test13 = atof("2.22507e-308"); 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/atoi: -------------------------------------------------------------------------------- 1 | i@test1 = atoi(""); 2 | i@test2 = atoi("-0"); 3 | i@test3 = atoi("+0"); 4 | i@test4 = atoi("-1"); 5 | i@test5 = atoi("1"); 6 | i@test6 = atoi("1s"); 7 | i@test7 = atoi("1s"); 8 | i@test8 = atoi(" 1"); 9 | i@test9 = atoi("1s1"); 10 | i@test10 = atoi("1 1"); 11 | i@test11 = atoi("11"); 12 | i@test12 = atoi("2147483647"); // int max 13 | i@test13 = atoi("-2147483648"); 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/cbrt: -------------------------------------------------------------------------------- 1 | double@test1 = cbrt(729.0); 2 | float@test2 = cbrt(729.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/clamp: -------------------------------------------------------------------------------- 1 | 2 | double@double_test1 = clamp(-2.5, -1.5, 1.5); 3 | double@double_test2 = clamp(0.0, -1.5, 1.5); 4 | double@double_test3 = clamp(2.5, -1.5, 1.5); 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/cofactor: -------------------------------------------------------------------------------- 1 | 2 | mat3d inputd = { 3 | 1.0, -1.0, 0.0, 4 | 2.0, 2.0, 0.0, 5 | 0.0, 0.0, -1.0 6 | }; 7 | 8 | mat3d cd; 9 | cd = cofactor(inputd); 10 | 11 | mat3f inputf = { 12 | 1.0f, -1.0f, 0.0f, 13 | 2.0f, 2.0f, 0.0f, 14 | 0.0f, 0.0f, -1.0f 15 | }; 16 | 17 | mat3f cf; 18 | cf = cofactor(inputf); 19 | 20 | mat3d@test1 = cd; 21 | mat3f@test2 = cf; 22 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/cosh: -------------------------------------------------------------------------------- 1 | double@test1 = cosh(1.0); 2 | float@test2 = cosh(1.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/cross: -------------------------------------------------------------------------------- 1 | vec3d ad = {1.0,2.2,3.4}; 2 | vec3d bd = {4.1,5.3,6.2}; 3 | vec3d@test1 = cross(ad, bd); 4 | vec3f af = {1.0f,2.2f,3.4f}; 5 | vec3f bf = {4.1f,5.3f,6.2f}; 6 | vec3f@test2 = cross(af, bf); 7 | vec3f ai = {1,2,3}; 8 | vec3f bi = {4,5,6}; 9 | vec3i@test3 = cross(ai, bi); 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/curlsimplexnoise: -------------------------------------------------------------------------------- 1 | vec3d p = {4.3,5.7,-6.2}; 2 | vec3d@test1 = curlsimplexnoise(p); 3 | vec3d@test2 = curlsimplexnoise(4.3,5.7,-6.2); 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/degrees: -------------------------------------------------------------------------------- 1 | double@test1 = degrees(1.5708); 2 | float@test2 = degrees(-1.1344f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/determinant: -------------------------------------------------------------------------------- 1 | 2 | mat3f m3f = { 1.0f, 0.0f, 0.0f, 3 | 0.0f, 200.0f, 0.0f, 4 | 0.0f, 0.0f, 3.0f }; 5 | 6 | mat3d m3d = { 100.0, 0.0, 0.0, 7 | 0.0, 2.0, 0.0, 8 | 0.0, 0.0, 3.0 }; 9 | 10 | mat4f m4f = { 1.0f, 0.0f, 0.0f, 0.0f, 11 | 0.0f, 2.0f, 0.0f, 0.0f, 12 | 0.0f, 0.0f, 3.0f, 0.0f, 13 | 0.0f, 0.0f, 0.0f, 4.0f }; 14 | 15 | mat4d m4d = { 1.0, 0.0, 0.0, 0.0, 16 | 0.0, 2.0, 0.0, 0.0, 17 | 0.0, 0.0, 3.0, 0.0, 18 | 0.0, 0.0, 0.0, 400.0 }; 19 | 20 | float@det3_float = determinant(m3f); 21 | double@det3_double = determinant(m3d); 22 | float@det4_float = determinant(m4f); 23 | double@det4_double = determinant(m4d); 24 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/diag: -------------------------------------------------------------------------------- 1 | vec3d diag1 = {-1.0,-2.0,-3.0}; 2 | vec3f diag2 = {-1.0f,-2.0f,-3.0f}; 3 | mat3d@test1 = diag(diag1); 4 | mat3f@test2 = diag(diag2); 5 | 6 | vec4d diag3 = {-1.0,-2.0,-3.0,-4.0}; 7 | vec4f diag4 = {-1.0f,-2.0f,-3.0f,-4.0f}; 8 | mat4d@test3 = diag(diag3); 9 | mat4f@test4 = diag(diag4); 10 | 11 | mat3d diag5 = {-1.0,2.0,3.0, 4.0,-5.0,6.0, 7.0,8.0,-9.0}; 12 | mat3f diag6 = {-1.0f,2.0f,3.0f, 4.0f,-5.0f,6.0f, 7.0f,8.0f,-9.0f}; 13 | vec3d@test5 = diag(diag5); 14 | vec3f@test6 = diag(diag6); 15 | 16 | mat4d diag7 = {-1.0,2.0,3.0,4.0, 5.0,-6.0,7.0,8.0, 9.0,10.0,-11.0,12.0, 13.0,14.0,15.0,-16.0}; 17 | mat4f diag8 = {-1.0f,2.0f,3.0f,4.0f, 5.0f,-6.0f,7.0f,8.0f, 9.0f,10.0f,-11.0f,12.0f, 13.0f,14.0f,15.0f,-16.0f}; 18 | 19 | vec4d@test7 = diag(diag7); 20 | vec4f@test8 = diag(diag8); 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/dot: -------------------------------------------------------------------------------- 1 | vec3d ad = {1.0,2.2,3.4}; 2 | vec3d bd = {4.1,5.3,6.2}; 3 | double@test1 = dot(ad, bd); 4 | vec3f af = {1.0f,2.2f,3.4f}; 5 | vec3f bf = {4.1f,5.3f,6.2f}; 6 | float@test2 = dot(af, bf); 7 | vec3f ai = {1,2,3}; 8 | vec3f bi = {4,5,6}; 9 | int@test3 = dot(ai, bi); 10 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/euclideanmod: -------------------------------------------------------------------------------- 1 | 2 | int@itest1 = euclideanmod(7,5); 3 | int@itest2 = euclideanmod(-7,5); 4 | int@itest3 = euclideanmod(7,-5); 5 | int@itest4 = euclideanmod(-7,-5); 6 | 7 | float@ftest1 = euclideanmod(7.2f,5.7f); 8 | float@ftest2 = euclideanmod(-7.2f,5.7f); 9 | float@ftest3 = euclideanmod(7.2f,-5.7f); 10 | float@ftest4 = euclideanmod(-7.2f,-5.7f); 11 | 12 | double@dtest1 = euclideanmod(7.2,5.7); 13 | double@dtest2 = euclideanmod(-7.2,5.7); 14 | double@dtest3 = euclideanmod(7.2,-5.7); 15 | double@dtest4 = euclideanmod(-7.2,-5.7); 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/external: -------------------------------------------------------------------------------- 1 | @foo = external("float1"); 2 | v@v = externalv("vector1"); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/floormod: -------------------------------------------------------------------------------- 1 | 2 | int@itest1 = floormod(7,5); 3 | int@itest2 = 7%5; 4 | int@itest3 = floormod(-7,5); 5 | int@itest4 = -7%5; 6 | int@itest5 = floormod(7,-5); 7 | int@itest6 = 7%-5; 8 | int@itest7 = floormod(-7,-5); 9 | int@itest8 = -7%-5; 10 | 11 | float@ftest1 = floormod(7.2f,5.7f); 12 | float@ftest2 = 7.2f%5.7f; 13 | float@ftest3 = floormod(-7.2f,5.7f); 14 | float@ftest4 = -7.2f%5.7f; 15 | float@ftest5 = floormod(7.2f,-5.7f); 16 | float@ftest6 = 7.2f%-5.7f; 17 | float@ftest7 = floormod(-7.2f,-5.7f); 18 | float@ftest8 = -7.2f%-5.7f; 19 | 20 | double@dtest1 = floormod(7.2,5.7); 21 | double@dtest2 = 7.2%5.7; 22 | double@dtest3 = floormod(-7.2,5.7); 23 | double@dtest4 = -7.2%5.7; 24 | double@dtest5 = floormod(7.2,-5.7); 25 | double@dtest6 = 7.2%-5.7; 26 | double@dtest7 = floormod(-7.2,-5.7); 27 | double@dtest8 = -7.2%-5.7; 28 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/hash: -------------------------------------------------------------------------------- 1 | 2 | int64@test1 = hash(""); 3 | int64@test2 = hash("0"); 4 | int64@test3 = hash("abc"); 5 | int64@test4 = hash("123"); 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/hsvtorgb: -------------------------------------------------------------------------------- 1 | vec3d@test1 = hsvtorgb({0,0,0}); 2 | vec3d@test2 = hsvtorgb({1,1,1}); 3 | vec3d@test3 = hsvtorgb({5.8,1,1}); 4 | vec3d@test4 = hsvtorgb({-0.1,-0.5,10}); 5 | vec3d@test5 = hsvtorgb({-5.1,10.5,-5}); 6 | vec3d@test6 = hsvtorgb({-7,-11.5,5}); 7 | vec3d@test7 = hsvtorgb({0.5,0.5,0.5}); 8 | vec3d@test8 = hsvtorgb({0.3,1.0,10.0}); 9 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/identity3: -------------------------------------------------------------------------------- 1 | mat3d@test = identity3(); 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/identity4: -------------------------------------------------------------------------------- 1 | mat4d@test = identity4(); 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/intrinsic: -------------------------------------------------------------------------------- 1 | double@dtest1 = sqrt(9.0); 2 | double@dtest2 = cos(0.0); 3 | double@dtest3 = sin(0.0); 4 | double@dtest4 = log(1.0); 5 | double@dtest5 = log10(1.0); 6 | double@dtest6 = log2(2.0); 7 | double@dtest7 = exp(0.0); 8 | double@dtest8 = exp2(4.0); 9 | double@dtest9 = fabs(-10.321); 10 | double@dtest10 = floor(2194.213); 11 | double@dtest11 = ceil(2194.213); 12 | double@dtest12 = round(0.5); 13 | 14 | float@ftest1 = sqrt(9.0f); 15 | float@ftest2 = cos(0.0f); 16 | float@ftest3 = sin(0.0f); 17 | float@ftest4 = log(1.0f); 18 | float@ftest5 = log10(1.0f); 19 | float@ftest6 = log2(2.0f); 20 | float@ftest7 = exp(0.0f); 21 | float@ftest8 = exp2(4.0f); 22 | float@ftest9 = fabs(-10.321f); 23 | float@ftest10 = floor(2194.213f); 24 | float@ftest11 = ceil(2194.213f); 25 | float@ftest12 = round(0.5f); 26 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/inverse: -------------------------------------------------------------------------------- 1 | 2 | mat3d inputd = { 3 | 1.0, -1.0, 0.0, 4 | 2.0, 2.0, 0.0, 5 | 0.0, 0.0, -1.0 6 | }; 7 | 8 | mat3d singulard = { 9 | 1.0, 2.0, 3.0, 10 | 4.0, 5.0, 6.0, 11 | 7.0, 8.0, 9.0 12 | }; 13 | 14 | mat3d invd; 15 | invd = inverse(inputd); 16 | mat3d sind; 17 | sind = inverse(singulard); 18 | 19 | mat3f inputf = { 20 | 1.0f, -1.0f, 0.0f, 21 | 2.0f, 2.0f, 0.0f, 22 | 0.0f, 0.0f, -1.0f 23 | }; 24 | 25 | mat3f singularf = { 26 | 1.0f, 2.0f, 3.0f, 27 | 4.0f, 5.0f, 6.0f, 28 | 7.0f, 8.0f, 9.0f 29 | }; 30 | 31 | mat3f invf; 32 | invf = inverse(inputf); 33 | mat3f sinf; 34 | sinf = inverse(singularf); 35 | 36 | mat3d@test1 = invd; 37 | mat3f@test2 = invf; 38 | mat3d@test3 = sind; 39 | mat3f@test4 = sinf; 40 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/length: -------------------------------------------------------------------------------- 1 | vec2d test1 = {2.2, 3.3}; 2 | double@test1 = length(test1); 3 | vec2f test2 = {2.2f, 3.3f}; 4 | float@test2 = length(test2); 5 | vec2i test3 = {2, 3}; 6 | double@test3 = length(test3); 7 | 8 | vec3d test4 = {2.2, 3.3, 6.6}; 9 | double@test4 = length(test4); 10 | vec3f test5 = {2.2f, 3.3f, 6.6f}; 11 | float@test5 = length(test5); 12 | vec3i test6 = {2, 3, 6}; 13 | double@test6 = length(test6); 14 | 15 | vec4d test7 = {2.2, 3.3, 6.6, 7.7}; 16 | double@test7 = length(test7); 17 | vec4f test8 = {2.2f, 3.3f, 6.6f, 7.7f}; 18 | float@test8 = length(test8); 19 | vec4i test9 = {2, 3, 6, 7}; 20 | double@test9 = length(test9); 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/lengthsq: -------------------------------------------------------------------------------- 1 | vec2d test1 = {2.2, 3.3}; 2 | double@test1 = lengthsq(test1); 3 | vec2f test2 = {2.2f, 3.3f}; 4 | float@test2 = lengthsq(test2); 5 | vec2i test3 = {2, 3}; 6 | int@test3 = lengthsq(test3); 7 | 8 | vec3d test4 = {2.2, 3.3, 6.6}; 9 | double@test4 = lengthsq(test4); 10 | vec3f test5 = {2.2f, 3.3f, 6.6f}; 11 | float@test5 = lengthsq(test5); 12 | vec3i test6 = {2, 3, 6}; 13 | int@test6 = lengthsq(test6); 14 | 15 | vec4d test7 = {2.2, 3.3, 6.6, 7.7}; 16 | double@test7 = lengthsq(test7); 17 | vec4f test8 = {2.2f, 3.3f, 6.6f, 7.7f}; 18 | float@test8 = lengthsq(test8); 19 | vec4i test9 = {2, 3, 6, 7}; 20 | int@test9 = lengthsq(test9); 21 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/lerp: -------------------------------------------------------------------------------- 1 | double@test1 = lerp(-1.1, 1.0000001, 0.0); 2 | // test formulation returns b when t = 1.0 3 | double@test2 = lerp(-1.1, 1.0000001, 1.0); 4 | double@test3 = lerp(1.1, 1.0000001, 1.0); 5 | double@test4 = lerp(-1.1, -1.0000001, 1.0); 6 | // test formulation returns exact input when a==b 7 | double@test5 = lerp(1.1, 1.1, 100.0); 8 | double@test6 = lerp(-1.1, -1.1, 100.0); 9 | // 10 | double@test7 = lerp(1.0, 11.0, 0.5); 11 | double@test8 = lerp(1.0, 11.0, 2.0); 12 | double@test9 = lerp(1.0, 11.0,-2.0); 13 | float@test10 = lerp(1.0f, 11.0f, 0.5f); 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/max: -------------------------------------------------------------------------------- 1 | double@test1 = max(-1.5, 1.5); 2 | float@test2 = max(-1.5f, 1.5f); 3 | int@test3 = max(-1, 1); 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/min: -------------------------------------------------------------------------------- 1 | double@test1 = min(-1.5, 1.5); 2 | float@test2 = min(-1.5f, 1.5f); 3 | int@test3 = min(-1, 1); 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/normalize: -------------------------------------------------------------------------------- 1 | 2 | vec3f test3f = {1.f, 2.f, 3.f}; 3 | vec3d test3d = {1., 2., 3.}; 4 | vec3i test3i = {1, 2, 3}; 5 | 6 | vec4f test4f = {1.f, 2.f, 3.f, 4.f}; 7 | vec4d test4d = {1., 2., 3., 4.}; 8 | vec4i test4i = {1, 2, 3, 4}; 9 | 10 | vec3f@test1 = normalize(test3f); 11 | vec3d@test2 = normalize(test3d); 12 | vec3d@test3 = normalize(test3i); 13 | 14 | vec4f@test4 = normalize(test4f); 15 | vec4d@test5 = normalize(test4d); 16 | vec4d@test6 = normalize(test4i); 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/polardecompose: -------------------------------------------------------------------------------- 1 | // inputs to create combination matrix: 2 | // 3 | // mat3d scale = { 4 | // 2, 0, 0, 5 | // 0, 3.3, 0, 6 | // 0, 0, -7.2 7 | // }; 8 | // 9 | // 45 deg around 0,1,0 10 | // mat3d rotation = { 11 | // 0.7071067811847432, 0.0000000, 0.7071067811883519, 12 | // 0.0000000, 1.0000000, 0.0000000, 13 | // -0.7071067811883519, 0.0000000, 0.7071067811847432 14 | // }; 15 | 16 | // r*s 17 | mat3d transform = { 18 | 1.41421456236949, 0, -5.09116882455613, 19 | 0, 3.3, 0.0, 20 | -1.41421356237670, 0, -5.09116882453015 21 | }; 22 | polardecompose(transform, mat3d@rotation, mat3d@symm); 23 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/pow: -------------------------------------------------------------------------------- 1 | 2 | float temp1 = 4.7f; 3 | float temp2 = -4.3f; 4 | int temp3 = 3; 5 | 6 | @float_test1 = pow(1.0, 1.0); 7 | @float_test2 = pow(3.0, -2.1); 8 | i@int_test1 = pow(temp3, 5); 9 | @float_test3 = pow(temp1, temp2); 10 | @float_test4 = pow(temp1, temp3); 11 | @float_test5 = pow(5, -5); 12 | 13 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/pretransform: -------------------------------------------------------------------------------- 1 | 2 | mat3d m3d1 = { 3 | 1.0, 2.0, 3.0, 4 | 4.0, 5.0, 6.0, 5 | 7.0, 8.0, 9.0 6 | }; 7 | 8 | mat4d m4d1 = { 9 | 1.0, 2.0, 3.0, 4.0, 10 | 5.0, 6.0, 7.0, 8.0, 11 | 9.0, 10.0,11.0,12.0, 12 | 13.0,14.0,15.0,16.0 13 | }; 14 | 15 | mat3d m3f1 = { 16 | 1.0f, 2.0f, 3.0f, 17 | 4.0f, 5.0f, 6.0f, 18 | 7.0f, 8.0f, 9.0f 19 | }; 20 | 21 | mat4d m4f1 = { 22 | 1.0f, 2.0f, 3.0f, 4.0f, 23 | 5.0f, 6.0f, 7.0f, 8.0f, 24 | 9.0f, 10.0f,11.0f,12.0f, 25 | 13.0f,14.0f,15.0f,16.0f 26 | }; 27 | 28 | vec3d@test1 = pretransform(m3d1, {1.0,2.0,3.0}); 29 | vec3f@test2 = pretransform(m3f1, {1.0f,2.0f,3.0f}); 30 | vec3d@test3 = pretransform(m4d1, {1.0,2.0,3.0}); 31 | vec3f@test4 = pretransform(m4f1, {1.0f,2.0f,3.0f}); 32 | 33 | vec4d@test5 = pretransform(m4d1, {1.0,2.0,3.0,4.0}); 34 | vec4f@test6 = pretransform(m4f1, {1.0f,2.0f,3.0f,4.0f}); 35 | 36 | vec3i v3i = {1,2,3}; 37 | vec3d@test7 = pretransform(m4d1, v3i); 38 | vec3f@test8 = pretransform(m4f1, v3i); 39 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/print: -------------------------------------------------------------------------------- 1 | 2 | print("a"); 3 | print(1); 4 | print(2e-10); 5 | print({3,4,5,6}); 6 | print("bcd"); 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/radians: -------------------------------------------------------------------------------- 1 | double@test1 = radians(90.0); 2 | float@test2 = radians(-65.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/rand: -------------------------------------------------------------------------------- 1 | 2 | double seed = 2.0; 3 | double@test0 = rand(seed); 4 | double@test1 = rand(seed); // should be the same as test0 5 | double@test2 = rand(seed + 1.0); // should be different to test0 and test1 6 | double@test3 = rand(); // should advance the generator from seed+1 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/rand32: -------------------------------------------------------------------------------- 1 | 2 | double seed = 2.0; 3 | double@test0 = rand32(seed); 4 | double@test1 = rand32(seed); // should be the same as test0 5 | double@test2 = rand32(seed + 1.0); // should be different to test0 and test1 6 | double@test3 = rand32(); // should advance the generator from seed+1 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/rgbtohsv: -------------------------------------------------------------------------------- 1 | vec3d@test1 = rgbtohsv({0,0,0}); 2 | vec3d@test2 = rgbtohsv({1,1,1}); 3 | vec3d@test3 = rgbtohsv({20.5,40.3,100.1}); 4 | vec3d@test4 = rgbtohsv({-10,1.3,0.25}); 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/sign: -------------------------------------------------------------------------------- 1 | i@test1 = sign(-0.0); 2 | i@test2 = sign(+0.0); 3 | i@test3 = sign(-0.0f); 4 | i@test4 = sign(+0.0f); 5 | i@test5 = sign(0.0); 6 | i@test6 = sign(0.0f); 7 | i@test7 = sign(0); 8 | i@test8 = sign(-0.1); 9 | i@test9 = sign(-0.1f); 10 | i@test10 = sign(-1); 11 | i@test11 = sign(0.1); 12 | i@test12 = sign(0.1f); 13 | i@test13 = sign(1); 14 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/signbit: -------------------------------------------------------------------------------- 1 | bool@test1 = signbit(-0.0); 2 | bool@test2 = signbit(+0.0); 3 | bool@test3 = signbit(-0.0f); 4 | bool@test4 = signbit(+0.0f); 5 | bool@test5 = signbit(0); 6 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/simplexnoise: -------------------------------------------------------------------------------- 1 | double@noise1 = simplexnoise(1.0, 2.0, 3.0); 2 | double@noise2 = simplexnoise(1.0, 2.0); 3 | double@noise3 = simplexnoise(1.0); 4 | 5 | vec3d x = {4.0, 14.0, 114.0}; 6 | double@noise4 = simplexnoise(x); 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/sinh: -------------------------------------------------------------------------------- 1 | double@test1 = sinh(1.0); 2 | float@test2 = sinh(1.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/sort: -------------------------------------------------------------------------------- 1 | 2 | vec3d input3d = {1.0, -1.0, 0.0}; 3 | vec3f input3f = {1.0f, -1.0f, 0.0f}; 4 | vec3i input3i = {1, -1, 0}; 5 | 6 | vec4d input4d = {1.0, -1.0, 0.0, 5.0}; 7 | vec4f input4f = {1.0f, -1.0f, 0.0f, 5.0f}; 8 | vec4i input4i = {1, -1, 0, 5}; 9 | 10 | vec3d sorted3d; 11 | sorted3d = sort(input3d); 12 | 13 | vec3f sorted3f; 14 | sorted3f = sort(input3f); 15 | 16 | vec3i sorted3i; 17 | sorted3i = sort(input3i); 18 | 19 | vec4d sorted4d; 20 | sorted4d = sort(input4d); 21 | 22 | vec4f sorted4f; 23 | sorted4f = sort(input4f); 24 | 25 | vec4i sorted4i; 26 | sorted4i = sort(input4i); 27 | 28 | vec3d@test1 = sorted3d; 29 | vec3f@test2 = sorted3f; 30 | vec3i@test3 = sorted3i; 31 | vec4d@test4 = sorted4d; 32 | vec4f@test5 = sorted4f; 33 | vec4i@test6 = sorted4i; 34 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/svd: -------------------------------------------------------------------------------- 1 | 2 | mat3d inputd = { 3 | 1.0, -1.0, 0.0, 4 | 2.0, 2.0, 0.0, 5 | 0.0, 0.0, -1.0 6 | }; 7 | 8 | mat3d ud,vd; 9 | vec3d sigmad; 10 | svd(inputd, ud, sigmad, vd); 11 | 12 | mat3f inputf = { 13 | 1.0f, -1.0f, 0.0f, 14 | 2.0f, 2.0f, 0.0f, 15 | 0.0f, 0.0f, -1.0f 16 | }; 17 | 18 | mat3f uf,vf; 19 | vec3f sigmaf; 20 | svd(inputf, uf, sigmaf, vf); 21 | 22 | mat3d@test1 = ud; 23 | mat3d@test2 = vd; 24 | 25 | mat3f@test3 = uf; 26 | mat3f@test4 = vf; 27 | 28 | vec3d@test5 = sigmad; 29 | vec3f@test6 = sigmaf; 30 | 31 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/tan: -------------------------------------------------------------------------------- 1 | double@test1 = tan(1.0); 2 | float@test2 = tan(1.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/tanh: -------------------------------------------------------------------------------- 1 | double@test1 = tanh(1.0); 2 | float@test2 = tanh(1.0f); 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/trace: -------------------------------------------------------------------------------- 1 | mat3d testm3d = { 2 | 1.0,-100.0,-100.0, 3 | -100.0, 2.0,-100.0, 4 | -100.0,-100.0, 3.0 5 | }; 6 | 7 | double@test1 = trace(testm3d); 8 | 9 | mat3f testm3f = { 10 | 1.0f,-100.0f,-100.0f, 11 | -100.0f, 2.0f,-100.0f, 12 | -100.0f,-100.0f, 3.0f 13 | }; 14 | 15 | float@test2 = trace(testm3f); 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/transform: -------------------------------------------------------------------------------- 1 | 2 | mat3d m3d1 = { 3 | 1.0, 2.0, 3.0, 4 | 4.0, 5.0, 6.0, 5 | 7.0, 8.0, 9.0 6 | }; 7 | 8 | mat4d m4d1 = { 9 | 1.0, 2.0, 3.0, 4.0, 10 | 5.0, 6.0, 7.0, 8.0, 11 | 9.0, 10.0,11.0,12.0, 12 | 13.0,14.0,15.0,16.0 13 | }; 14 | 15 | mat3d m3f1 = { 16 | 1.0f, 2.0f, 3.0f, 17 | 4.0f, 5.0f, 6.0f, 18 | 7.0f, 8.0f, 9.0f 19 | }; 20 | 21 | mat4d m4f1 = { 22 | 1.0f, 2.0f, 3.0f, 4.0f, 23 | 5.0f, 6.0f, 7.0f, 8.0f, 24 | 9.0f, 10.0f,11.0f,12.0f, 25 | 13.0f,14.0f,15.0f,16.0f 26 | }; 27 | 28 | vec3d@test1 = transform({1.0,2.0,3.0}, m3d1); 29 | vec3f@test2 = transform({1.0f,2.0f,3.0f}, m3f1); 30 | vec3d@test3 = transform({1.0,2.0,3.0}, m4d1); 31 | vec3f@test4 = transform({1.0f,2.0f,3.0f}, m4f1); 32 | 33 | vec4d@test5 = transform({1.0,2.0,3.0,4.0}, m4d1); 34 | vec4f@test6 = transform({1.0f,2.0f,3.0f,4.0f}, m4f1); 35 | 36 | vec3i v3i = {1,2,3}; 37 | vec3d@test7 = transform(v3i, m4d1); 38 | vec3f@test8 = transform(v3i, m4f1); 39 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/transpose: -------------------------------------------------------------------------------- 1 | 2 | mat3d m3d1 = { 3 | 1.0, 2.0, 3.0, 4 | 4.0, 5.0, 6.0, 5 | 7.0, 8.0, 9.0 6 | }; 7 | 8 | mat3d@test1 = transpose(m3d1); 9 | 10 | mat3f m3f1 = { 11 | 1.0f, 2.0f, 3.0f, 12 | 4.0f, 5.0f, 6.0f, 13 | 7.0f, 8.0f, 9.0f 14 | }; 15 | 16 | mat3f@test2 = transpose(m3f1); 17 | 18 | mat4d m4d1 = { 19 | 1.0, 2.0, 3.0, 4.0, 20 | 5.0, 6.0, 7.0, 8.0, 21 | 9.0, 10.0,11.0,12.0, 22 | 13.0,14.0,15.0,16.0 23 | }; 24 | 25 | mat4d@test3 = transpose(m4d1); 26 | 27 | mat4f m4f1 = { 28 | 1.0f, 2.0f, 3.0f, 4.0f, 29 | 5.0f, 6.0f, 7.0f, 8.0f, 30 | 9.0f, 10.0f,11.0f,12.0f, 31 | 13.0f,14.0f,15.0f,16.0f 32 | }; 33 | 34 | mat4f@test4 = transpose(m4f1); 35 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/function/truncatemod: -------------------------------------------------------------------------------- 1 | 2 | int@itest1 = truncatemod(7,5); 3 | int@itest2 = truncatemod(-7,5); 4 | int@itest3 = truncatemod(7,-5); 5 | int@itest4 = truncatemod(-7,-5); 6 | 7 | float@ftest1 = truncatemod(7.2f,5.7f); 8 | float@ftest2 = truncatemod(-7.2f,5.7f); 9 | float@ftest3 = truncatemod(7.2f,-5.7f); 10 | float@ftest4 = truncatemod(-7.2f,-5.7f); 11 | 12 | double@dtest1 = truncatemod(7.2,5.7); 13 | double@dtest2 = truncatemod(-7.2,5.7); 14 | double@dtest3 = truncatemod(7.2,-5.7); 15 | double@dtest4 = truncatemod(-7.2,-5.7); 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/keyword/conditionalReturn: -------------------------------------------------------------------------------- 1 | if (false) 2 | { 3 | int@return_test3 = 1; 4 | return; 5 | int@return_test3 = 2; 6 | } 7 | else 8 | { 9 | int@return_test3 = 3; 10 | return; 11 | int@return_test3 = 4; 12 | } 13 | 14 | int@return_test3 = 5; 15 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/keyword/doWhileLoopKeywords: -------------------------------------------------------------------------------- 1 | // do loop with break 2 | { 3 | vec3f v = 0.0f; 4 | int i = 0; 5 | do { 6 | if (i == 1) break; 7 | v[i] = i+1; 8 | i++; 9 | } 10 | while(i < 3) 11 | 12 | vec3f@loop_test13 = v; 13 | } 14 | 15 | // do loop with continue 16 | { 17 | vec3f v = 0.0f; 18 | int i = 0; 19 | 20 | do { 21 | i++; 22 | if (i == 1) continue; 23 | v[i] = i; 24 | } 25 | while(i < 2) 26 | 27 | vec3f@loop_test14 = v; 28 | } 29 | 30 | // do loop with return 31 | { 32 | vec3f v = 0.0f; 33 | int i = 0; 34 | vec3f@return_test7 = 100; 35 | 36 | do { 37 | if (i == 1) return; 38 | v[i] = i+1; 39 | i++; 40 | } 41 | while(i < 3) 42 | 43 | vec3f@return_test7 = v; 44 | } 45 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/keyword/returnBranchIf: -------------------------------------------------------------------------------- 1 | int@return_test1 = 1; 2 | return; 3 | 4 | int@return_test1 = 1000; 5 | if (1 != 0) int@return_test1 = 3; 6 | else int@return_test1 = 5; 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/keyword/returnBranchLoop: -------------------------------------------------------------------------------- 1 | int@return_test2 = 1; 2 | return; 3 | 4 | for(int i = 0; i < 10; ++i) { 5 | int@return_test2 = i; 6 | } 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/keyword/simpleReturn: -------------------------------------------------------------------------------- 1 | return; 2 | int@return_test0 = 1; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/keyword/whileLoopKeywords: -------------------------------------------------------------------------------- 1 | 2 | // while loop with break 3 | { 4 | vec3f v = 0.0f; 5 | int i = 0; 6 | while(i < 3) { 7 | if (i == 1) break; 8 | v[i] = i+1; 9 | i++; 10 | } 11 | vec3f@loop_test10 = v; 12 | } 13 | 14 | // while loop with continue 15 | { 16 | vec3f v = 0.0f; 17 | int i = 0; 18 | while(i < 2) { 19 | i++; 20 | if (i == 1) continue; 21 | v[i] = i; 22 | } 23 | vec3f@loop_test11 = v; 24 | } 25 | 26 | // while loop with return 27 | { 28 | vec3f v = 0.0f; 29 | int i = 0; 30 | vec3f@return_test6 = 100; 31 | 32 | while(i < 3) { 33 | if (i == 1) return; 34 | v[i] = i+1; 35 | i++; 36 | } 37 | vec3f@return_test6 = v; 38 | } 39 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/loop/doWhileLoop: -------------------------------------------------------------------------------- 1 | // do loop 2 | { 3 | vec3f v = 0.0f; 4 | int32 i = 0; 5 | do { 6 | v[i] = i+1; 7 | i++; 8 | } 9 | while(i < 3); 10 | 11 | vec3f@loop_test12 = v; 12 | } 13 | 14 | // do loop false condition 15 | { 16 | vec3f v = 0.0f; 17 | int32 i = 0; 18 | do { 19 | v[i] = i + 1; 20 | } 21 | while(false) 22 | 23 | vec3f@loop_test17 = v; 24 | } 25 | 26 | // do loop multi expression false condition 27 | { 28 | vec3f v = 0.0f; 29 | int32 i = 0; 30 | do { 31 | v[i] = i + 1; 32 | } 33 | while(true, true, true, false) 34 | 35 | vec3f@loop_test29 = v; 36 | } 37 | 38 | // do while loop declaration condition 39 | { 40 | int32 k = 1; 41 | float j = 1.1f; 42 | do { 43 | k++; 44 | j--; 45 | } 46 | while(int32 i = floor(j)) 47 | 48 | int32@loop_test32 = k; 49 | } 50 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/loop/loopErrors: -------------------------------------------------------------------------------- 1 | for (int i; {1,1,1}; ++i) { 2 | true; 3 | } 4 | 5 | for (int i; {1,1,1} < 1; ++i) { 6 | true; 7 | } 8 | 9 | do { 10 | true; 11 | } while ("foo") 12 | 13 | mat3f mat = identity3(); 14 | while (mat) { 15 | true; 16 | } -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/loop/loopOverflow: -------------------------------------------------------------------------------- 1 | mat4d m1=0; 2 | vec3f v1=1; 3 | for (int32 i = 0; i < 10000000; ++i) { 4 | // 10000000 x alloca inside of loop 5 | mat4d m2 = m1; 6 | // sret function, 10000000 x alloca of result 7 | vec3f v2 = normalize(v1); 8 | // strings 9 | string a = "foo" + "bar"; 10 | } 11 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/loop/whileLoop: -------------------------------------------------------------------------------- 1 | // while loop 2 | { 3 | vec3f v = 0.0f; 4 | int32 i = 0; 5 | while(i < 3) { 6 | v[i] = i+1; 7 | i++; 8 | } 9 | vec3f@loop_test9 = v; 10 | } 11 | 12 | // while loop false condition 13 | { 14 | vec3f v = 0.0f; 15 | int32 i = 0; 16 | while(false) { 17 | v[i] = i + 1; 18 | } 19 | vec3f@loop_test16 = v; 20 | } 21 | 22 | // while loop multi expression false condition 23 | { 24 | vec3f v = 0.0f; 25 | int32 i = 0; 26 | while(true, true, true, false) { 27 | v[i] = i + 1; 28 | } 29 | vec3f@loop_test28 = v; 30 | } 31 | 32 | // while loop declaration condition 33 | { 34 | int32 k = 1; 35 | float j = 1.1f; 36 | while(int32 i = floor(j)) { 37 | k++; 38 | j--; 39 | 40 | } 41 | int32@loop_test31 = k; 42 | } 43 | 44 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/string/assignCompound: -------------------------------------------------------------------------------- 1 | // uninitialized string should be set to "" 2 | 3 | string test1; 4 | test1 += "foo"; 5 | string test2 = "foo"; 6 | test2 += "bar"; 7 | 8 | s@test1 = test1; 9 | s@test2 = test2; 10 | 11 | for (int i = 0; i < 10; i++) { 12 | s@test3 += "a"; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/string/assignFromAttributes: -------------------------------------------------------------------------------- 1 | 2 | string@string_test2 = string@string_test1; // set to test - string_test only existing string attribute 3 | 4 | string@string_test1 = "new value"; 5 | 6 | string@string_test3 = string@string_test1; // "new value", string_test3 created 7 | string@string_test4 = string@string_test3; // "new value" 8 | 9 | string@string_test6 = string@string_test5; // empty strings, both created 10 | 11 | 12 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/string/assignFromLocals: -------------------------------------------------------------------------------- 1 | string test = "test"; 2 | string test2 = test; 3 | string@string_test1 = test2; // test 4 | 5 | test2 = "new string size"; 6 | string@string_test2 = test; // test 7 | string@string_test3 = test2; // new string size 8 | 9 | test = ""; 10 | string@string_test4 = test; // empty string 11 | 12 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/string/assignNewOverwrite: -------------------------------------------------------------------------------- 1 | 2 | string value = "new_value"; // A value which shouldn't exist on the string attribute 3 | string@string_test1 = value; 4 | string@string_test2 = value; 5 | 6 | string@string_test1 = "next_value"; // re-assign the value to one of the strings 7 | 8 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/string/binaryConcat: -------------------------------------------------------------------------------- 1 | 2 | string test = "test"; 3 | string space = " "; 4 | string test2 = "new value"; 5 | string result = test + space + test2; 6 | 7 | string@string_test1 = result; // "test new value" 8 | string@string_test2 = test + space + test2; // "test new value" 9 | 10 | result = test + " " + test2; 11 | 12 | string@string_test3 = result; // "test new value" 13 | string@string_test4 = test + " " + test2; // "test new value" 14 | string@string_test5 = "" + ""; // "" 15 | string@string_test6 = "" + result; // "test new value" 16 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/string/declare: -------------------------------------------------------------------------------- 1 | string test = "test"; 2 | string@string_test = test; 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/ternary/ternaryErrors: -------------------------------------------------------------------------------- 1 | {1,1,1} ? 0 : 1; 2 | 3 | {1,0,0,0,1,0,0,0,1} & 1 ? 0 : 1; 4 | 5 | "foo" ? : "bar"; 6 | 7 | "foo" ? : 1; 8 | 9 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/ternary/ternaryVoid: -------------------------------------------------------------------------------- 1 | 2 | bool b = false; 3 | b ? removefromgroup("notdead") : addtogroup("notdead"); 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/unary/unaryBitwiseNot: -------------------------------------------------------------------------------- 1 | 2 | int int_value = 8; 3 | int int_value2 = 7; 4 | 5 | int@int_test = ~int_value; 6 | int@int_test2 = ~int_value2; 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/unary/unaryNegate: -------------------------------------------------------------------------------- 1 | 2 | int int_value = 3; 3 | 4 | int_value = - int_value; 5 | int_value = - int_value; 6 | int_value = - int_value; 7 | int_value = + int_value; 8 | 9 | int@int_test = int_value; 10 | 11 | float float_value = 5.5f; 12 | 13 | float_value = - float_value; 14 | float_value = - float_value; 15 | float_value = - float_value; 16 | float_value = + float_value; 17 | 18 | float@float_test = float_value; 19 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/unary/unaryNot: -------------------------------------------------------------------------------- 1 | 2 | bool t = true; 3 | bool f = false; 4 | 5 | bool@bool_test = !t; 6 | bool@bool_test2 = !f; 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/unary/unaryVector: -------------------------------------------------------------------------------- 1 | 2 | vec3i v3i = {0, 1, -1}; 3 | vec3f v3f = {0.0f, 1.1f, -1.1f}; 4 | vec3d v3d = {0.0, 1.1, -1.1}; 5 | 6 | vec4i v4i = {0, 1, -1, 2}; 7 | vec4f v4f = {0.0f, 1.1f, -1.1f, 2.1f}; 8 | vec4d v4d = {0.0, 1.1, -1.1, 2.1}; 9 | 10 | // vec3 11 | 12 | vec3i@v3i1 = +v3i; 13 | vec3i@v3i2 = -v3i; 14 | vec3i@v3i3 = ~v3i; 15 | vec3i@v3i4 = !v3i; 16 | 17 | vec3f@v3f1 = +v3f; 18 | vec3f@v3f2 = -v3f; 19 | 20 | vec3d@v3d1 = +v3d; 21 | vec3d@v3d2 = -v3d; 22 | 23 | // vec4 24 | 25 | vec4i@v4i1 = +v4i; 26 | vec4i@v4i2 = -v4i; 27 | vec4i@v4i3 = ~v4i; 28 | vec4i@v4i4 = !v4i; 29 | 30 | vec4f@v4f1 = +v4f; 31 | vec4f@v4f2 = -v4f; 32 | 33 | vec4d@v4d1 = +v4d; 34 | vec4d@v4d2 = -v4d; 35 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/vdb_functions/addremovefromgroup: -------------------------------------------------------------------------------- 1 | // both adds and removes from groups 2 | // we use 9 groups as a stress test since 8 groups can be stored 3 | // using a single attribute 4 | 5 | addtogroup("newTestGroup1"); 6 | int@newTestAttribute1 = ingroup("newTestGroup1"); 7 | addtogroup("newTestGroup2"); 8 | addtogroup("newTestGroup3"); 9 | addtogroup("newTestGroup4"); 10 | addtogroup("newTestGroup5"); 11 | addtogroup("newTestGroup6"); 12 | addtogroup("newTestGroup7"); 13 | addtogroup("newTestGroup8"); 14 | addtogroup("newTestGroup9"); 15 | 16 | // should already exist 17 | 18 | if(ingroup("existingTestGroup")) 19 | { 20 | removefromgroup("newTestGroup9"); 21 | addtogroup("existingTestGroup2"); 22 | int@newTestAttribute2 = 1; 23 | } 24 | 25 | // remove from a group that neither exists nor will be added 26 | // nothing should be done in this case 27 | removefromgroup("nonExistentGroup"); 28 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/vdb_functions/deletepoint: -------------------------------------------------------------------------------- 1 | if (i@delete) deletepoint(); 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/vdb_functions/getcoord: -------------------------------------------------------------------------------- 1 | int@a0 = getcoordx(); 2 | int@a1 = getcoordy(); 3 | int@a2 = getcoordz(); 4 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/vdb_functions/getvoxelpws: -------------------------------------------------------------------------------- 1 | vector@a = getvoxelpws(); 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/vdb_functions/ingroup: -------------------------------------------------------------------------------- 1 | 2 | // create an attribute from groups so that we can check their values in 3 | // the C++ test code. We add "1" since data is often initialized to 0 and 4 | // this can cause misleading test results. 5 | 6 | if (ingroup("a")) i@test = 1; 7 | 8 | int@groupTest = ingroup("testGroup") + 1; 9 | int@groupTest2 = ingroup("testGroup2") + 1; 10 | 11 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceAssign: -------------------------------------------------------------------------------- 1 | 2 | v@P_original = @P; // access @P - should return original world-space position 3 | @P = {2.22f, 3.33f, 4.44f}; // store @P - value given in world-space should be turned into voxel-space 4 | v@P_new = @P; // access @P - should return @P in world-space and store in P_new 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceAssignBound: -------------------------------------------------------------------------------- 1 | 2 | v@P_original = v@pos; // access @P through binding to v@pos - should return original world-space position 3 | v@pos = {2.22f, 3.33f, 4.44f}; // store @P through binding to v@pos - value given in world-space should be turned into voxel-space 4 | v@P_new = v@pos; // access @P through binding to v@pos- should return @P in world-space and store in P_new 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceAssignComponent: -------------------------------------------------------------------------------- 1 | 2 | @Px_original = @P.x; // access @P.x - should return original world-space position x component 3 | @P.x = 5.22f; // store @P.x - value given in world-space should be turned into voxel-space 4 | @Px_new = @P.x; // access @P.x - should return world-space value and store in Px_new 5 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceAssignFromP: -------------------------------------------------------------------------------- 1 | v@test = v@P; // the point of this test is that we are using a world-space accessor but not writing to P 2 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceDecrementComponentByZero: -------------------------------------------------------------------------------- 1 | 2 | v@P.y -= 0.0f; // decrement @P.y in world-space by zero. 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceDivideComponentByOne: -------------------------------------------------------------------------------- 1 | 2 | v@P.y /= 1.0f; // divide @P.y in world-space by one. 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceIncrement: -------------------------------------------------------------------------------- 1 | 2 | v@P += {5.0f, 6.0f, 7.0f}; // increment @P in world-space 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceIncrementComponent: -------------------------------------------------------------------------------- 1 | 2 | v@P.x += 7.0f; // increment @P.x in world-space 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceIncrementComponentByZero: -------------------------------------------------------------------------------- 1 | 2 | v@P.y += 0.0f; // increment @P.y in world-space by zero. 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_ax/openvdb_ax/test/snippets/worldspace/worldSpaceMultiplyComponentByOne: -------------------------------------------------------------------------------- 1 | 2 | v@P.y *= 1.0f; // multiply @P.y in world-space by one. 3 | -------------------------------------------------------------------------------- /openvdb/openvdb_cmd/vdb_ax/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright Contributors to the OpenVDB Project 2 | # SPDX-License-Identifier: MPL-2.0 3 | # 4 | #[=======================================================================[ 5 | 6 | CMake Configuration for VDB AX Binary 7 | 8 | #]=======================================================================] 9 | 10 | cmake_minimum_required(VERSION 3.15) 11 | project(VDBAX LANGUAGES CXX) 12 | 13 | include(GNUInstallDirs) 14 | 15 | if(NOT OPENVDB_BUILD_AX) 16 | set(OPENVDBAX_LIB OpenVDB::openvdb_ax) 17 | else() 18 | set(OPENVDBAX_LIB openvdb_ax) 19 | endif() 20 | 21 | set(OPENVDB_BINARIES_DEPENDENT_LIBS 22 | ${OPENVDBAX_LIB} 23 | ) 24 | 25 | if(CONCURRENT_MALLOC STREQUAL "Jemalloc") 26 | find_package(Jemalloc REQUIRED) 27 | list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS Jemalloc::jemalloc) 28 | elseif(CONCURRENT_MALLOC STREQUAL "Tbbmalloc") 29 | find_package(TBB ${MINIMUM_TBB_VERSION} REQUIRED COMPONENTS tbbmalloc) 30 | list(APPEND OPENVDB_BINARIES_DEPENDENT_LIBS TBB::tbbmalloc) 31 | endif() 32 | 33 | set(SOURCE_FILES main.cc) 34 | add_executable(vdb_ax ${SOURCE_FILES}) 35 | target_link_libraries(vdb_ax ${OPENVDB_BINARIES_DEPENDENT_LIBS}) 36 | 37 | install(TARGETS vdb_ax RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 38 | -------------------------------------------------------------------------------- /openvdb/openvdb_cmd/vdb_lod/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright Contributors to the OpenVDB Project 2 | # SPDX-License-Identifier: MPL-2.0 3 | # 4 | #[=======================================================================[ 5 | 6 | CMake Configuration for VDB LOD 7 | 8 | #]=======================================================================] 9 | 10 | cmake_minimum_required(VERSION 3.15) 11 | project(VDBLOD LANGUAGES CXX) 12 | 13 | include(GNUInstallDirs) 14 | 15 | set(SOURCE_FILES main.cc) 16 | add_executable(vdb_lod ${SOURCE_FILES}) 17 | target_link_libraries(vdb_lod ${OPENVDB_BINARIES_DEPENDENT_LIBS}) 18 | 19 | install(TARGETS vdb_lod RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 20 | -------------------------------------------------------------------------------- /openvdb/openvdb_cmd/vdb_print/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright Contributors to the OpenVDB Project 2 | # SPDX-License-Identifier: MPL-2.0 3 | # 4 | #[=======================================================================[ 5 | 6 | CMake Configuration for VDB Print 7 | 8 | #]=======================================================================] 9 | 10 | cmake_minimum_required(VERSION 3.15) 11 | project(VDBPrint LANGUAGES CXX) 12 | 13 | include(GNUInstallDirs) 14 | 15 | set(SOURCE_FILES main.cc) 16 | add_executable(vdb_print ${SOURCE_FILES}) 17 | target_link_libraries(vdb_print ${OPENVDB_BINARIES_DEPENDENT_LIBS}) 18 | 19 | install(TARGETS vdb_print RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 20 | -------------------------------------------------------------------------------- /openvdb/openvdb_cmd/vdb_view/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright Contributors to the OpenVDB Project 2 | # SPDX-License-Identifier: MPL-2.0 3 | # 4 | #[=======================================================================[ 5 | 6 | CMake Configuration for VDB View 7 | 8 | #]=======================================================================] 9 | 10 | cmake_minimum_required(VERSION 3.15) 11 | project(VDBView LANGUAGES CXX) 12 | 13 | include(GNUInstallDirs) 14 | 15 | find_package(OpenGL REQUIRED) 16 | 17 | if(WIN32) 18 | find_package(GLEW REQUIRED) 19 | endif() 20 | 21 | # wraps find_package(glfw3) and sets the glfw target 22 | include(OpenVDBGLFW3Setup) 23 | 24 | set(SOURCE_FILES 25 | main.cc 26 | Camera.cc 27 | ClipBox.cc 28 | Font.cc 29 | RenderModules.cc 30 | Viewer.cc 31 | ) 32 | 33 | add_executable(vdb_view ${SOURCE_FILES}) 34 | 35 | target_link_libraries(vdb_view 36 | ${OPENVDB_BINARIES_DEPENDENT_LIBS} 37 | OpenGL::GL 38 | OpenGL::GLU 39 | glfw 40 | ) 41 | 42 | if(WIN32) 43 | target_link_libraries(vdb_view GLEW::GLEW) 44 | endif() 45 | 46 | target_compile_definitions(vdb_view PRIVATE -DGL_GLEXT_PROTOTYPES=1) 47 | 48 | install(TARGETS vdb_view RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) 49 | -------------------------------------------------------------------------------- /openvdb/openvdb_cmd/vdb_view/Font.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #ifndef OPENVDB_VIEWER_FONT_HAS_BEEN_INCLUDED 5 | #define OPENVDB_VIEWER_FONT_HAS_BEEN_INCLUDED 6 | 7 | #include 8 | 9 | #if defined(__APPLE__) || defined(MACOSX) 10 | #include 11 | #include 12 | #elif defined(_WIN32) 13 | #include 14 | #else 15 | #include 16 | #include 17 | #endif 18 | 19 | 20 | namespace openvdb_viewer { 21 | 22 | class BitmapFont13 23 | { 24 | public: 25 | BitmapFont13() {} 26 | 27 | static void initialize(); 28 | 29 | static void enableFontRendering(); 30 | static void disableFontRendering(); 31 | 32 | static void print(GLint px, GLint py, const std::string&); 33 | 34 | private: 35 | static GLuint sOffset; 36 | static GLubyte sCharacters[95][13]; 37 | }; 38 | 39 | } // namespace openvdb_viewer 40 | 41 | #endif // OPENVDB_VIEWER_FONT_HAS_BEEN_INCLUDED 42 | -------------------------------------------------------------------------------- /openvdb/openvdb_houdini/openvdb_houdini/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright Contributors to the OpenVDB Project 2 | SPDX-License-Identifier: MPL-2.0 -------------------------------------------------------------------------------- /openvdb/openvdb_houdini/openvdb_houdini/GU_VDBPointTools.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | #include "GU_VDBPointTools.h" 5 | 6 | 7 | -------------------------------------------------------------------------------- /openvdb/openvdb_houdini/openvdb_houdini/UT_VDBUtils.cc: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | /* 5 | * Copyright (c) Side Effects Software Inc. 6 | * 7 | * Produced by: 8 | * Side Effects Software Inc 9 | * 477 Richmond Street West 10 | * Toronto, Ontario 11 | * Canada M5V 3E7 12 | * 416-504-9876 13 | * 14 | * NAME: UT_VDBUtils.h (UT Library, C++) 15 | * 16 | * COMMENTS: 17 | */ 18 | 19 | #include "UT_VDBUtils.h" 20 | 21 | namespace openvdb_houdini { 22 | // empty 23 | } 24 | -------------------------------------------------------------------------------- /openvdb/openvdb_houdini/openvdb_houdini/abitest/TestABI.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | const char* getABI(); 5 | const char* getNamespace(); 6 | void* createFloatGrid(); 7 | void* createPointsGrid(); 8 | void cleanupFloatGrid(void*); 9 | void cleanupPointsGrid(void*); 10 | int validateFloatGrid(void*); 11 | int validatePointsGrid(void*); 12 | -------------------------------------------------------------------------------- /openvdb/openvdb_maya/openvdb_maya/AEOpenVDBCopyTemplate.mel: -------------------------------------------------------------------------------- 1 | global proc AEOpenVDBCopyTemplate( string $nodeAttr ) 2 | { 3 | editorTemplate -beginScrollLayout; 4 | { 5 | editorTemplate -beginLayout "OpenVDB Copy" -collapse 0; 6 | editorTemplate 7 | -annotation "Shallow copy selected grids form the A input." 8 | -addControl "GridsFromA"; 9 | editorTemplate 10 | -annotation "Shallow copy selected grids form the B input." 11 | -addControl "GridsFromB"; 12 | editorTemplate -endLayout; 13 | editorTemplate -addExtraControls; 14 | } 15 | editorTemplate -endScrollLayout; 16 | } 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_maya/openvdb_maya/AEOpenVDBFilterTemplate.mel: -------------------------------------------------------------------------------- 1 | global proc AEOpenVDBFilterTemplate( string $nodeAttr ) 2 | { 3 | editorTemplate -beginScrollLayout; 4 | { 5 | editorTemplate -beginLayout "OpenVDB Filter" -collapse 0; 6 | editorTemplate -addControl "Filter" "AEAT_OpenVDBFilterUpdateEnabled"; 7 | editorTemplate -addControl "FilterVoxelRadius"; 8 | editorTemplate -addControl "Iterations"; 9 | editorTemplate -addControl "Offset"; 10 | editorTemplate -endLayout; 11 | editorTemplate -addExtraControls; 12 | } 13 | editorTemplate -endScrollLayout; 14 | } 15 | 16 | global proc 17 | AEAT_OpenVDBFilterUpdateEnabled( string $node ) 18 | { 19 | int $operation = `getAttr ($node+".Filter")`; 20 | 21 | if ($operation < 3) { 22 | editorTemplate -dimControl $node "FilterVoxelRadius" 0; 23 | editorTemplate -dimControl $node "Iterations" 0; 24 | editorTemplate -dimControl $node "Offset" 1; 25 | } else { 26 | editorTemplate -dimControl $node "FilterVoxelRadius" 1; 27 | editorTemplate -dimControl $node "Iterations" 1; 28 | editorTemplate -dimControl $node "Offset" 0; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /openvdb/openvdb_maya/openvdb_maya/AEOpenVDBTransformTemplate.mel: -------------------------------------------------------------------------------- 1 | global proc AEOpenVDBTransformTemplate( string $nodeAttr ) 2 | { 3 | editorTemplate -beginScrollLayout; 4 | { 5 | editorTemplate -beginLayout "OpenVDB Transform" -collapse 0; 6 | editorTemplate -addControl "Translate"; 7 | editorTemplate -addControl "Rotate"; 8 | editorTemplate -addControl "Scale"; 9 | editorTemplate -addControl "Pivot"; 10 | editorTemplate -addControl "UniformScale"; 11 | editorTemplate -addControl "InvertTransformation"; 12 | editorTemplate -endLayout; 13 | editorTemplate -addExtraControls; 14 | } 15 | editorTemplate -endScrollLayout; 16 | } 17 | -------------------------------------------------------------------------------- /openvdb/openvdb_maya/openvdb_maya/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Copyright Contributors to the OpenVDB Project 2 | SPDX-License-Identifier: MPL-2.0 -------------------------------------------------------------------------------- /openvdb/openvdb_maya/openvdb_maya/OpenVDBPlugin.h: -------------------------------------------------------------------------------- 1 | // Copyright Contributors to the OpenVDB Project 2 | // SPDX-License-Identifier: MPL-2.0 3 | 4 | /// @author FX R&D OpenVDB team 5 | 6 | 7 | #ifndef OPENVDB_MAYA_PLUGIN_HAS_BEEN_INCLUDED 8 | #define OPENVDB_MAYA_PLUGIN_HAS_BEEN_INCLUDED 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | #define MNoVersionString 15 | #include 16 | 17 | //////////////////////////////////////// 18 | 19 | 20 | namespace openvdb_maya { 21 | 22 | struct NodeRegistry 23 | { 24 | NodeRegistry(const MString& typeName, const MTypeId& typeId, 25 | MCreatorFunction creatorFunction, 26 | MInitializeFunction initFunction, 27 | MPxNode::Type type = MPxNode::kDependNode, 28 | const MString* classification = NULL); 29 | 30 | static void registerNodes(MFnPlugin& plugin, MStatus& status); 31 | static void deregisterNodes(MFnPlugin& plugin, MStatus& status); 32 | }; 33 | 34 | } // namespace openvdb_maya 35 | 36 | 37 | //////////////////////////////////////// 38 | 39 | 40 | #endif // OPENVDB_MAYA_NODE_REGISTRY_HAS_BEEN_INCLUDED 41 | -------------------------------------------------------------------------------- /openvdb/pendingchanges/README: -------------------------------------------------------------------------------- 1 | This directory stores pending changes to our CHANGES and changes.txt 2 | files. The idea is that PRs can have their proposed changes audited 3 | without triggering false merges. We periodically collapse these into 4 | the CHANGES and changes.txt. 5 | 6 | Release versions should have this directory empty, but if you 7 | checkout the latest version you may see changes reflected here that 8 | haven't been merged into the CHANGES file yet. 9 | 10 | This README must be maintained or git removes the directory and we 11 | won't remember what directory to put changes into. 12 | -------------------------------------------------------------------------------- /openvdb/pendingchanges/ax_cli.txt: -------------------------------------------------------------------------------- 1 | Improvements: 2 | - Major updates to the command line interface of the vdb_ax binary, exposing 3 | more controls such as tile streaming, value iterator types and attribute 4 | bindings. 5 | -------------------------------------------------------------------------------- /openvdb/pendingchanges/math.txt: -------------------------------------------------------------------------------- 1 | Bug Fixes: 2 | - Fixed a bug on Windows where math::Abs could truncate 64bit integer values [Contributed by Edward Lam] 3 | - Fixed an occurance of undefined behaviour with math::floatToInt32 and math::doubleToInt64 [Reported by Vojtěch Bubník] 4 | -------------------------------------------------------------------------------- /openvdb/pendingchanges/volume2mesh_perf.txt: -------------------------------------------------------------------------------- 1 | Improvements: 2 | - Improved the performance of volumeToMesh by 10-15% 3 | -------------------------------------------------------------------------------- /openvdb/tsc/icla.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Individual Contributor License Agreement ("Agreement") 5 | 6 | Thank you for your interest in the OpenVDB Project a Series of LF Projects, LLC (hereinafter "Project") which has selected the Mozilla Public License Version 2.0 (hereinafter "MPL-2.0") license for its inbound contributions. The terms You, Contributor and Contribution are used here as defined in the MPL-2.0 license. 7 | 8 | The Project is required to have a Contributor License Agreement (CLA) on file that binds each Contributor. 9 | 10 | You agree that all Contributions to the Project made by You shall be submitted pursuant to the Developer Certificate of Origin Version (DCO, current version available at https://developercertificate.org) accompanying the contribution and licensed to the project under the MPL-2.0, and that You agree to, and shall be bound by, the terms of the MPL-2.0. 11 | 12 | 13 | 14 | Signature: __________________________________________ 15 | 16 | 17 | Name: _______________________________________________ 18 | 19 | 20 | Date: _______________________________________________ 21 | -------------------------------------------------------------------------------- /openvdb/tsc/meetings/2022-03-29.md: -------------------------------------------------------------------------------- 1 | Minutes from 127th OpenVDB TSC meeting, March 29th, 2022, (EDT) 2 | 3 | Attendees: *Ken* M., *Jeff* L., *Andre* P., *Nick* A., *Dan* B., *Rich* J. 4 | 5 | Additional Attendees: Greg Hurst (United Therapeutics) 6 | 7 | Agenda: 8 | 9 | 1) Confirm Quorum 10 | 2) Secretary 11 | 3) Forum 12 | 4) OpenVDBLink 13 | 5) Next meeting 14 | 15 | ------------------------ 16 | 1) Confirm Quorum 17 | 18 | Quorum is present. 19 | 20 | 2) Secretary 21 | 22 | Secretary is Richard Jones. 23 | 24 | 3) Forum 25 | 26 | Request (Issue #1337) for forward declarations of grid types in Grid.h. Consensus is that this would be a good addition but some care might need to be taken with nested typedefs/sharedptrs. 27 | 28 | 4) OpenVDBLink 29 | 30 | Greg has go-ahead to contribute OpenVDBLink (Mathematica OpenVDB plugin). Needs updates for docs and error handling. Has a lot of unittests already. Need to figure out CI and some dependency issues. This will be made into a feature branch to iterate upon. 31 | 32 | 5) Next meeting 33 | 34 | Next meeting is in one week, April 4th, 2022. 12pm-1pm EST (GMT-5). -------------------------------------------------------------------------------- /openvdb/tsc/process/deprecation.md: -------------------------------------------------------------------------------- 1 | **Deprecation Strategy for OpenVDB** 2 | 3 | OpenVDB is committed to supporting three years of 4 | [VFX Reference Platform](http://www.vfxplatform.com/) and all releases of 5 | Houdini and Maya based on those versions of the platform. The latest supported 6 | year is that in which the VDB version listed matches the major version. 7 | 8 | For example, version 6.1.0 of OpenVDB supports VFX Reference Platform years 9 | 2019, 2018 and 2017. 10 | 11 | This infers the following support: 12 | 13 | * OpenVDB ABI=4, ABI=5 and ABI=6 14 | * C++11 and C++14 15 | * Houdini 16.5, 17.0 and 17.5 16 | 17 | When version 7.0.0 is released, OpenVDB will support VFX Reference Platform 18 | years 2020, 2019 and 2018. Support for Houdini 16.5 and C++11 will be dropped. 19 | 20 | Support for obsolete ABIs will not be dropped until the first minor release 21 | after the introduction of a new ABI. For example, the latest version to retain 22 | support for ABI=4 will be the release prior to 7.1.0. 23 | -------------------------------------------------------------------------------- /plenvdb/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/.DS_Store -------------------------------------------------------------------------------- /plenvdb/configs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/configs/.DS_Store -------------------------------------------------------------------------------- /plenvdb/configs/blendedmvs/Character.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Character' 4 | basedir = './logs/blended_mvs' 5 | 6 | data = dict( 7 | datadir='./data/BlendedMVS/Character/', 8 | dataset_type='blendedmvs', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/blendedmvs/Fountain.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Fountain' 4 | basedir = './logs/blended_mvs' 5 | 6 | data = dict( 7 | datadir='./data/BlendedMVS/Fountain/', 8 | dataset_type='blendedmvs', 9 | inverse_y=True, 10 | white_bkgd=False, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/blendedmvs/Jade.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Jade' 4 | basedir = './logs/blended_mvs' 5 | 6 | data = dict( 7 | datadir='./data/BlendedMVS/Jade/', 8 | dataset_type='blendedmvs', 9 | inverse_y=True, 10 | white_bkgd=False, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/blendedmvs/Statues.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Statues' 4 | basedir = './logs/blended_mvs' 5 | 6 | data = dict( 7 | datadir='./data/BlendedMVS/Statues/', 8 | dataset_type='blendedmvs', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/co3d/donut_369_40208_78816.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_donut_369_40208_78816' 4 | basedir = './logs/co3d' 5 | 6 | data = dict( 7 | datadir='./data/co3d/', 8 | dataset_type='co3d', 9 | annot_path='./data/co3d/donut/frame_annotations.jgz', 10 | split_path='./data/co3d/donut/set_lists.json', 11 | sequence_name='369_40208_78816', 12 | flip_x=True, 13 | flip_y=True, 14 | inverse_y=True, 15 | white_bkgd=False, 16 | ) 17 | 18 | coarse_train = dict( 19 | ray_sampler='flatten', 20 | ) 21 | 22 | -------------------------------------------------------------------------------- /plenvdb/configs/custom/Madoka.py: -------------------------------------------------------------------------------- 1 | _base_ = './default_forward_facing.py' 2 | 3 | expname = 'Madoka' 4 | 5 | data = dict( 6 | datadir='./data/custom/Madoka/dense', 7 | factor=2, 8 | movie_render_kwargs={ 9 | 'scale_r': 1.0, 10 | 'scale_f': 0.8, 11 | 'zrate': 2.0, 12 | 'zdelta': 0.5, 13 | } 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /plenvdb/configs/custom/Otobai.py: -------------------------------------------------------------------------------- 1 | _base_ = './default_forward_facing.py' 2 | 3 | expname = 'Otobai' 4 | 5 | data = dict( 6 | datadir='./data/custom/Otobai/dense', 7 | factor=2, 8 | movie_render_kwargs={ 9 | 'scale_r': 0.8, 10 | 'scale_f': 10.0, 11 | 'zrate': 6.0, 12 | 'zdelta': 0.5, 13 | } 14 | ) 15 | 16 | -------------------------------------------------------------------------------- /plenvdb/configs/deepvoxels/armchair.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_armchair' 4 | basedir = './logs/deepvoxels' 5 | 6 | data = dict( 7 | datadir='./data/deepvoxels/', 8 | dataset_type='deepvoxels', 9 | scene='armchair', 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/deepvoxels/cube.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_cube' 4 | basedir = './logs/deepvoxels' 5 | 6 | data = dict( 7 | datadir='./data/deepvoxels/', 8 | dataset_type='deepvoxels', 9 | scene='cube', 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/deepvoxels/greek.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_greek' 4 | basedir = './logs/deepvoxels' 5 | 6 | data = dict( 7 | datadir='./data/deepvoxels/', 8 | dataset_type='deepvoxels', 9 | scene='greek', 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/deepvoxels/vase.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_vase' 4 | basedir = './logs/deepvoxels' 5 | 6 | data = dict( 7 | datadir='./data/deepvoxels/', 8 | dataset_type='deepvoxels', 9 | scene='vase', 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/lf/africa.py: -------------------------------------------------------------------------------- 1 | _base_ = './lf_default.py' 2 | 3 | expname = 'vdb_Africa_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/lf_data/africa', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/lf/basket.py: -------------------------------------------------------------------------------- 1 | _base_ = './lf_default.py' 2 | 3 | expname = 'vdb_Basket_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/lf_data/basket', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/lf/lf_default.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | basedir = './logs/lf' 4 | 5 | data = dict( 6 | dataset_type='nerfpp', 7 | inverse_y=True, 8 | white_bkgd=False, 9 | rand_bkgd=True, 10 | unbounded_inward=True, 11 | ) 12 | 13 | coarse_train = dict(N_iters=0) 14 | 15 | fine_train = dict( 16 | N_iters=25000, 17 | N_rand=4096, 18 | ray_sampler='flatten', 19 | weight_distortion=1e-2, 20 | pg_scale=[1000,2000,3000,4000,5000,6000], 21 | decay_after_scale=1.0, 22 | tv_before=1e9, 23 | tv_dense_before=10000, 24 | weight_tv_density=1e-6, 25 | weight_tv_k0=1e-7, 26 | ) 27 | 28 | alpha_init = 1e-4 29 | stepsize = 0.5 30 | 31 | fine_model_and_render = dict( 32 | num_voxels=256**3, 33 | num_voxels_base=256**3, 34 | alpha_init=alpha_init, 35 | stepsize=stepsize, 36 | fast_color_thres={ 37 | '_delete_': True, 38 | 0 : alpha_init*stepsize/10, 39 | 1500: min(alpha_init, 1e-4)*stepsize/5, 40 | 2500: min(alpha_init, 1e-4)*stepsize/2, 41 | 3500: min(alpha_init, 1e-4)*stepsize/1.5, 42 | 4500: min(alpha_init, 1e-4)*stepsize, 43 | 5500: min(alpha_init, 1e-4), 44 | 6500: 1e-4, 45 | }, 46 | world_bound_scale=1, 47 | ) 48 | 49 | -------------------------------------------------------------------------------- /plenvdb/configs/lf/ship.py: -------------------------------------------------------------------------------- 1 | _base_ = './lf_default.py' 2 | 3 | expname = 'vdb_Ship_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/lf_data/ship', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/lf/statue.py: -------------------------------------------------------------------------------- 1 | _base_ = './lf_default.py' 2 | 3 | expname = 'vdb_Statue_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/lf_data/statue', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/lf/torch.py: -------------------------------------------------------------------------------- 1 | _base_ = './lf_default.py' 2 | 3 | expname = 'vdb_Torch_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/lf_data/torch', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/fern.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_fern' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/fern', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/fern_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'fern_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/fern', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/flower.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_flower' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/flower', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/flower_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'flower_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/flower', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/fortress.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_fortress' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/fortress', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/fortress_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'fortress_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/fortress', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/horns.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_horns' 4 | 5 | data = dict( 6 | datadir='/data2/hyan/data/horns', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/horns_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'horns_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/horns', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/leaves.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_leaves' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/leaves', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/leaves_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'leaves_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/leaves', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/llff_default.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | basedir = './logs/llff' 4 | 5 | data = dict( 6 | dataset_type='llff', 7 | ndc=True, 8 | width=1008, 9 | height=756, 10 | ) 11 | 12 | coarse_train = dict( 13 | N_iters=0, 14 | ) 15 | 16 | fine_train = dict( 17 | N_iters=30000, 18 | N_rand=4096, 19 | weight_distortion=0.01, 20 | pg_scale=[2000,4000,6000,8000], 21 | ray_sampler='flatten', 22 | tv_before=1e9, 23 | tv_dense_before=10000, 24 | weight_tv_density=1e-5, 25 | weight_tv_k0=1e-6, 26 | ) 27 | 28 | fine_model_and_render = dict( 29 | num_voxels=256**3, 30 | mpi_depth=128, 31 | rgbnet_dim=9, 32 | rgbnet_width=64, 33 | world_bound_scale=1, 34 | fast_color_thres=1e-3, 35 | ) 36 | 37 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/llff_default_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | basedir = './logs/llff' 4 | 5 | data = dict( 6 | dataset_type='llff', 7 | ndc=True, 8 | width=1008, 9 | height=756, 10 | rand_bkgd=True, 11 | ) 12 | 13 | coarse_train = dict( 14 | N_iters=0, 15 | ) 16 | 17 | fine_train = dict( 18 | N_iters=30000, 19 | N_rand=4096, 20 | weight_distortion=0.01, 21 | pg_scale=[2000,4000,6000,8000], 22 | decay_after_scale=0.1, 23 | ray_sampler='flatten', 24 | tv_before=1e9, 25 | tv_dense_before=10000, 26 | weight_tv_density=1e-5, 27 | weight_tv_k0=1e-6, 28 | ) 29 | 30 | _mpi_depth = 256 31 | _stepsize = 1.0 32 | 33 | fine_model_and_render = dict( 34 | num_voxels=384*384*_mpi_depth, 35 | mpi_depth=_mpi_depth, 36 | stepsize=_stepsize, 37 | rgbnet_dim=9, 38 | rgbnet_width=64, 39 | world_bound_scale=1, 40 | fast_color_thres=_stepsize/_mpi_depth/5, 41 | ) 42 | 43 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/orchids.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_orchids' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/orchids', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/orchids_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'orchids_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/orchids', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/room.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_room' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/room', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/room_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'room_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/room', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/trex.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default.py' 2 | 3 | expname = 'vdb_trex' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/trex', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/llff/trex_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = './llff_default_lg.py' 2 | 3 | expname = 'trex_lg' 4 | 5 | data = dict( 6 | datadir='./data/nerf_llff_data/trex', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/chair.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_chair' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/chair', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/drums.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_drums' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/drums', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/ficus.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_ficus' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/ficus', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/hotdog.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_hotdog' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/hotdog', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/lego.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_lego' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/lego', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/materials.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_materials' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/materials', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/mic.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_mic' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/mic', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/ship.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_ship' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='/data2/hyan/data/nerf_synthetic/ship', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf/ship.tensorf.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'dvgo_ship_tensorf' 4 | basedir = './logs/nerf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/nerf_synthetic/ship', 8 | dataset_type='blender', 9 | white_bkgd=True, 10 | ) 11 | 12 | fine_train = dict( 13 | lrate_density=0.02, 14 | lrate_k0=0.02, 15 | pg_scale=[1000,2000,3000,4000,5000,6000], 16 | ) 17 | 18 | fine_model_and_render = dict( 19 | num_voxels=384**3, 20 | density_type='TensoRFGrid', 21 | density_config=dict(n_comp=8), 22 | k0_type='TensoRFGrid', 23 | k0_config=dict(n_comp=24), 24 | ) 25 | 26 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/bicycle.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_bicycle_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/360_v2/bicycle', 7 | factor=4, # 1237x822 8 | movie_render_kwargs=dict( 9 | shift_x=0.0, # positive right 10 | shift_y=0, # negative down 11 | shift_z=0, 12 | scale_r=1.0, 13 | pitch_deg=-10, # negative look downward 14 | ), 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/bonsai.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_bonsai_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/360_v2/bonsai', 7 | factor=2, # 1559x1039 8 | movie_render_kwargs=dict( 9 | shift_x=0.0, # positive right 10 | shift_y=0, # negative down 11 | shift_z=0, 12 | scale_r=1.0, 13 | pitch_deg=-30, # negative look downward 14 | ), 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/counter.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_counter_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/360_v2/counter', 7 | factor=2, # 1558x1038 8 | movie_render_kwargs=dict( 9 | shift_x=0.0, # positive right 10 | shift_y=-0.2, # negative down 11 | shift_z=0, 12 | scale_r=0.9, 13 | pitch_deg=-30, # negative look downward 14 | ), 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/garden.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_garden_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/360_v2/garden', 7 | factor=4, # 1297x840 8 | movie_render_kwargs=dict( 9 | shift_x=0.0, # positive right 10 | shift_y=-0.0, # negative down 11 | shift_z=0, 12 | scale_r=0.9, 13 | pitch_deg=-30, 14 | ), 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/kitchen.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_kitchen_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/360_v2/kitchen', 7 | factor=2, # 1558x1039 8 | movie_render_kwargs=dict( 9 | shift_y=-0.0, 10 | scale_r=0.9, 11 | pitch_deg=-40, 12 | ), 13 | ) 14 | 15 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/room.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_room_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/360_v2/room', 7 | factor=2, # 1557x1038 8 | movie_render_kwargs=dict( 9 | shift_x=0.0, # positive right 10 | shift_y=-0.3, # negative down 11 | shift_z=0, 12 | scale_r=0.2, 13 | pitch_deg=-40, # negative look downward 14 | ), 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /plenvdb/configs/nerf_unbounded/stump.py: -------------------------------------------------------------------------------- 1 | _base_ = './nerf_unbounded_default.py' 2 | 3 | expname = 'vdb_stump_unbounded' 4 | 5 | data = dict( 6 | datadir='/data2/hyan/data/stump', 7 | factor=4, 8 | movie_render_kwargs=dict( 9 | shift_x=0.0, # positive right 10 | shift_y=-0.2, # negative down 11 | shift_z=0, 12 | scale_r=0.8, 13 | pitch_deg=-20, # negative look downward 14 | ), 15 | ) 16 | 17 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Bike.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Bike' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Bike', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Lifestyle.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Lifestyle' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Lifestyle', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Palace.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Palace' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Palace', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Robot.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Robot' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Robot', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Spaceship.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Spaceship' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Spaceship', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Steamtrain.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Steamtrain' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Steamtrain', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Toad.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Toad' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Toad', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/nsvf/Wineholder.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Wineholder' 4 | basedir = './logs/nsvf_synthetic' 5 | 6 | data = dict( 7 | datadir='./data/Synthetic_NSVF/Wineholder', 8 | dataset_type='nsvf', 9 | inverse_y=True, 10 | white_bkgd=True, 11 | ) 12 | 13 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Barn.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Barn' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Barn', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Barn_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Barn_lg' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Barn', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | movie_render_kwargs={'flip_up_vec': True}, 13 | ) 14 | 15 | coarse_train = dict( 16 | pervoxel_lr_downrate=2, 17 | ) 18 | 19 | fine_train = dict(pg_scale=[1000,2000,3000,4000,5000,6000]) 20 | fine_model_and_render = dict(num_voxels=256**3) 21 | 22 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Caterpillar.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Caterpillar' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Caterpillar', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Caterpillar_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Caterpillar_lg' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Caterpillar', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | fine_train = dict(pg_scale=[1000,2000,3000,4000,5000,6000]) 19 | fine_model_and_render = dict(num_voxels=256**3) 20 | 21 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Family.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Family' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Family', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Family_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Family_lg' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Family', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | movie_render_kwargs={'pitch_deg': 20}, 13 | ) 14 | 15 | coarse_train = dict( 16 | pervoxel_lr_downrate=2, 17 | ) 18 | 19 | fine_train = dict(pg_scale=[1000,2000,3000,4000,5000,6000]) 20 | fine_model_and_render = dict(num_voxels=256**3) 21 | 22 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Ignatius.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Ignatius' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Ignatius', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Ignatius_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Ignatius_lg' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Ignatius', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | fine_train = dict(pg_scale=[1000,2000,3000,4000,5000,6000]) 19 | fine_model_and_render = dict(num_voxels=256**3) 20 | 21 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Truck.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Truck' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Truck', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | ) 13 | 14 | coarse_train = dict( 15 | pervoxel_lr_downrate=2, 16 | ) 17 | 18 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple/Truck_lg.py: -------------------------------------------------------------------------------- 1 | _base_ = '../default.py' 2 | 3 | expname = 'vdb_Truck_lg' 4 | basedir = './logs/tanks_and_temple' 5 | 6 | data = dict( 7 | datadir='./data/TanksAndTemple/Truck', 8 | dataset_type='tankstemple', 9 | inverse_y=True, 10 | load2gpu_on_the_fly=True, 11 | white_bkgd=True, 12 | movie_render_kwargs={'flip_up_vec': True, 'shift_y': -0.1}, 13 | ) 14 | 15 | coarse_train = dict( 16 | pervoxel_lr_downrate=2, 17 | ) 18 | 19 | fine_train = dict(pg_scale=[1000,2000,3000,4000,5000,6000]) 20 | fine_model_and_render = dict(num_voxels=256**3) 21 | 22 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple_unbounded/M60.py: -------------------------------------------------------------------------------- 1 | _base_ = './tt_default.py' 2 | 3 | expname = 'vdb_M60_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/tanks_and_temples/tat_intermediate_M60', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple_unbounded/Playground.py: -------------------------------------------------------------------------------- 1 | _base_ = './tt_default.py' 2 | 3 | expname = 'vdb_Playground_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/tanks_and_temples/tat_intermediate_Playground', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple_unbounded/Train.py: -------------------------------------------------------------------------------- 1 | _base_ = './tt_default.py' 2 | 3 | expname = 'vdb_Train_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/tanks_and_temples/tat_intermediate_Train', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/configs/tankstemple_unbounded/Truck.py: -------------------------------------------------------------------------------- 1 | _base_ = './tt_default.py' 2 | 3 | expname = 'vdb_Truck_unbounded' 4 | 5 | data = dict( 6 | datadir='./data/tanks_and_temples/tat_training_Truck', 7 | ) 8 | 9 | -------------------------------------------------------------------------------- /plenvdb/lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/.DS_Store -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/dcvgo.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/dcvgo.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/dmpigo.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/dmpigo.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/dvgo.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/dvgo.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/grid.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/grid.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_blendedmvs.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_blendedmvs.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_blender.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_blender.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_co3d.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_co3d.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_data.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_data.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_deepvoxels.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_deepvoxels.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_llff.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_llff.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_nerfpp.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_nerfpp.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_nsvf.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_nsvf.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/load_tankstemple.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/load_tankstemple.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/masked_adam.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/masked_adam.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/sh.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/sh.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/__pycache__/utils.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/__pycache__/utils.cpython-37.pyc -------------------------------------------------------------------------------- /plenvdb/lib/cuda/total_variation.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | // CUDA forward declarations 6 | 7 | void total_variation_add_grad_cuda(torch::Tensor param, torch::Tensor grad, float wx, float wy, float wz, bool dense_mode); 8 | 9 | 10 | // C++ interface 11 | 12 | #define CHECK_CUDA(x) TORCH_CHECK(x.is_cuda(), #x " must be a CUDA tensor") 13 | #define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous") 14 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x) 15 | 16 | void total_variation_add_grad(torch::Tensor param, torch::Tensor grad, float wx, float wy, float wz, bool dense_mode) { 17 | CHECK_INPUT(param); 18 | CHECK_INPUT(grad); 19 | total_variation_add_grad_cuda(param, grad, wx, wy, wz, dense_mode); 20 | } 21 | 22 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 23 | m.def("total_variation_add_grad", &total_variation_add_grad, "Add total variation grad"); 24 | } 25 | 26 | -------------------------------------------------------------------------------- /plenvdb/lib/cuda/ub360_utils.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | // CUDA forward declarations 6 | 7 | torch::Tensor cumdist_thres_cuda(torch::Tensor dist, float thres); 8 | 9 | // C++ interface 10 | 11 | #define CHECK_CUDA(x) TORCH_CHECK(x.is_cuda(), #x " must be a CUDA tensor") 12 | #define CHECK_CONTIGUOUS(x) TORCH_CHECK(x.is_contiguous(), #x " must be contiguous") 13 | #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x) 14 | 15 | torch::Tensor cumdist_thres(torch::Tensor dist, float thres) { 16 | CHECK_INPUT(dist); 17 | return cumdist_thres_cuda(dist, thres); 18 | } 19 | 20 | PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) { 21 | m.def("cumdist_thres", &cumdist_thres, "Generate mask for cumulative dist."); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /plenvdb/lib/vdb/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/lib/vdb/.DS_Store -------------------------------------------------------------------------------- /plenvdb/lib/vdb/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | project(plenvdb) 2 | cmake_minimum_required(VERSION 2.8) 3 | list(APPEND CUDA_NVCC_FLAGS "--extended-lambda") 4 | 5 | find_package(CUDA) 6 | find_package(PythonLibs 3.7 REQUIRED) 7 | 8 | include_directories( 9 | ${CMAKE_INSTALL_PREFIX}/include 10 | ${PYTHON_INCLUDE_DIRS} 11 | /home/hyan/.conda/envs/plenvdb/lib/python3.7/site-packages/pybind11/include # change to your pybind path 12 | ) 13 | 14 | LINK_DIRECTORIES( 15 | ${CMAKE_INSTALL_PREFIX}/lib 16 | /usr/lib/x86_64-linux-gnu 17 | /usr/local/cuda/lib64 18 | ) 19 | 20 | # add_executable 21 | cuda_add_library( 22 | plenvdb SHARED 23 | plenvdb.cpp 24 | plenvdb.h 25 | plenvdb.cuh 26 | plenvdb.cu 27 | densityvdb.cu 28 | colorvdb.cu 29 | renderer.cu 30 | OPTIONS -arch sm_70 31 | ) 32 | 33 | target_link_libraries( 34 | plenvdb 35 | libtbb.so 36 | libpthread.so 37 | libopenvdb.so 38 | ${PYTHON_LIBRARIES} 39 | ${CUDA_LIBRARIES} 40 | -lcublas -lcurand 41 | ) 42 | set_target_properties(plenvdb PROPERTIES PREFIX "") 43 | -------------------------------------------------------------------------------- /plenvdb/lib/vdb/plenvdb.cu: -------------------------------------------------------------------------------- 1 | #include "plenvdb.cuh" 2 | 3 | void gpuAssert(cudaError_t code, const char *file, int line, bool abort=false) 4 | { 5 | if (code != cudaSuccess) 6 | { 7 | fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line); 8 | if( abort ) 9 | exit(code); 10 | } 11 | } 12 | 13 | void gpuCheckKernelExecutionError( const char *file, int line) 14 | { 15 | gpuAssert( cudaPeekAtLastError(), file, line); 16 | gpuAssert( cudaDeviceSynchronize(), file, line); 17 | } -------------------------------------------------------------------------------- /plenvdb/requirements.txt: -------------------------------------------------------------------------------- 1 | einops==0.4.1 2 | imageio==2.21.1 3 | lpips==0.1.4 4 | matplotlib==3.5.3 5 | mmcv==1.6.1 6 | numpy==1.21.6 7 | opencv_python==4.7.0.68 8 | scipy==1.7.3 9 | torch_efficient_distloss==0.1.3 10 | tqdm==4.64.1 11 | pybind11==2.10.3 12 | -------------------------------------------------------------------------------- /plenvdb/tools/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wolfball/PlenVDB/7e4933191f94a224c7f620457d0acd53111c6111/plenvdb/tools/.DS_Store --------------------------------------------------------------------------------