├── KAIMyEntitySaba ├── KAIMyEntitySaba.sln └── KAIMyEntitySaba │ ├── KAIMyEntitySaba.cpp │ ├── KAIMyEntitySaba.h │ ├── KAIMyEntitySaba.vcxproj │ ├── KAIMyEntitySaba.vcxproj.filters │ ├── KAIMyEntitySaba.vcxproj.user │ ├── Saba │ ├── Base │ │ ├── File.cpp │ │ ├── File.h │ │ ├── Log.cpp │ │ ├── Log.h │ │ ├── Path.cpp │ │ ├── Path.h │ │ ├── Singleton.cpp │ │ ├── Singleton.h │ │ ├── Time.cpp │ │ ├── Time.h │ │ ├── UnicodeUtil.cpp │ │ └── UnicodeUtil.h │ └── Model │ │ └── MMD │ │ ├── MMDCamera.cpp │ │ ├── MMDCamera.h │ │ ├── MMDFileString.h │ │ ├── MMDIkSolver.cpp │ │ ├── MMDIkSolver.h │ │ ├── MMDMaterial.cpp │ │ ├── MMDMaterial.h │ │ ├── MMDModel.cpp │ │ ├── MMDModel.h │ │ ├── MMDMorph.cpp │ │ ├── MMDMorph.h │ │ ├── MMDNode.cpp │ │ ├── MMDNode.h │ │ ├── MMDPhysics.cpp │ │ ├── MMDPhysics.h │ │ ├── PMDFile.cpp │ │ ├── PMDFile.h │ │ ├── PMDModel.cpp │ │ ├── PMDModel.h │ │ ├── PMXFile.cpp │ │ ├── PMXFile.h │ │ ├── PMXModel.cpp │ │ ├── PMXModel.h │ │ ├── SjisToUnicode.cpp │ │ ├── SjisToUnicode.h │ │ ├── VMDAnimation.cpp │ │ ├── VMDAnimation.h │ │ ├── VMDAnimationCommon.h │ │ ├── VMDCameraAnimation.cpp │ │ ├── VMDCameraAnimation.h │ │ ├── VMDFile.cpp │ │ ├── VMDFile.h │ │ ├── VPDFile.cpp │ │ └── VPDFile.h │ ├── bullet │ ├── Bullet3Collision │ │ ├── BroadPhaseCollision │ │ │ ├── b3BroadphaseCallback.h │ │ │ ├── b3DynamicBvh.cpp │ │ │ ├── b3DynamicBvh.h │ │ │ ├── b3DynamicBvhBroadphase.cpp │ │ │ ├── b3DynamicBvhBroadphase.h │ │ │ ├── b3OverlappingPair.h │ │ │ ├── b3OverlappingPairCache.cpp │ │ │ ├── b3OverlappingPairCache.h │ │ │ └── shared │ │ │ │ └── b3Aabb.h │ │ ├── CMakeLists.txt │ │ ├── NarrowPhaseCollision │ │ │ ├── b3Config.h │ │ │ ├── b3Contact4.h │ │ │ ├── b3ConvexUtility.cpp │ │ │ ├── b3ConvexUtility.h │ │ │ ├── b3CpuNarrowPhase.cpp │ │ │ ├── b3CpuNarrowPhase.h │ │ │ ├── b3RaycastInfo.h │ │ │ ├── b3RigidBodyCL.h │ │ │ └── shared │ │ │ │ ├── b3BvhSubtreeInfoData.h │ │ │ │ ├── b3BvhTraversal.h │ │ │ │ ├── b3ClipFaces.h │ │ │ │ ├── b3Collidable.h │ │ │ │ ├── b3Contact4Data.h │ │ │ │ ├── b3ContactConvexConvexSAT.h │ │ │ │ ├── b3ContactSphereSphere.h │ │ │ │ ├── b3ConvexPolyhedronData.h │ │ │ │ ├── b3FindConcaveSatAxis.h │ │ │ │ ├── b3FindSeparatingAxis.h │ │ │ │ ├── b3MprPenetration.h │ │ │ │ ├── b3NewContactReduction.h │ │ │ │ ├── b3QuantizedBvhNodeData.h │ │ │ │ ├── b3ReduceContacts.h │ │ │ │ ├── b3RigidBodyData.h │ │ │ │ └── b3UpdateAabbs.h │ │ └── premake4.lua │ ├── Bullet3Common │ │ ├── CMakeLists.txt │ │ ├── b3AlignedAllocator.cpp │ │ ├── b3AlignedAllocator.h │ │ ├── b3AlignedObjectArray.h │ │ ├── b3CommandLineArgs.h │ │ ├── b3FileUtils.h │ │ ├── b3HashMap.h │ │ ├── b3Logging.cpp │ │ ├── b3Logging.h │ │ ├── b3Matrix3x3.h │ │ ├── b3MinMax.h │ │ ├── b3PoolAllocator.h │ │ ├── b3QuadWord.h │ │ ├── b3Quaternion.h │ │ ├── b3Random.h │ │ ├── b3ResizablePool.h │ │ ├── b3Scalar.h │ │ ├── b3StackAlloc.h │ │ ├── b3Transform.h │ │ ├── b3TransformUtil.h │ │ ├── b3Vector3.cpp │ │ ├── b3Vector3.h │ │ ├── premake4.lua │ │ └── shared │ │ │ ├── b3Float4.h │ │ │ ├── b3Int2.h │ │ │ ├── b3Int4.h │ │ │ ├── b3Mat3x3.h │ │ │ ├── b3PlatformDefinitions.h │ │ │ └── b3Quat.h │ ├── Bullet3Dynamics │ │ ├── CMakeLists.txt │ │ ├── ConstraintSolver │ │ │ ├── b3ContactSolverInfo.h │ │ │ ├── b3FixedConstraint.cpp │ │ │ ├── b3FixedConstraint.h │ │ │ ├── b3Generic6DofConstraint.cpp │ │ │ ├── b3Generic6DofConstraint.h │ │ │ ├── b3JacobianEntry.h │ │ │ ├── b3PgsJacobiSolver.cpp │ │ │ ├── b3PgsJacobiSolver.h │ │ │ ├── b3Point2PointConstraint.cpp │ │ │ ├── b3Point2PointConstraint.h │ │ │ ├── b3SolverBody.h │ │ │ ├── b3SolverConstraint.h │ │ │ ├── b3TypedConstraint.cpp │ │ │ └── b3TypedConstraint.h │ │ ├── b3CpuRigidBodyPipeline.cpp │ │ ├── b3CpuRigidBodyPipeline.h │ │ ├── premake4.lua │ │ └── shared │ │ │ ├── b3ContactConstraint4.h │ │ │ ├── b3ConvertConstraint4.h │ │ │ ├── b3Inertia.h │ │ │ └── b3IntegrateTransforms.h │ ├── Bullet3Geometry │ │ ├── CMakeLists.txt │ │ ├── b3AabbUtil.h │ │ ├── b3ConvexHullComputer.cpp │ │ ├── b3ConvexHullComputer.h │ │ ├── b3GeometryUtil.cpp │ │ ├── b3GeometryUtil.h │ │ ├── b3GrahamScan2dConvexHull.h │ │ └── premake4.lua │ ├── Bullet3OpenCL │ │ ├── BroadphaseCollision │ │ │ ├── b3GpuBroadphaseInterface.h │ │ │ ├── b3GpuGridBroadphase.cpp │ │ │ ├── b3GpuGridBroadphase.h │ │ │ ├── b3GpuParallelLinearBvh.cpp │ │ │ ├── b3GpuParallelLinearBvh.h │ │ │ ├── b3GpuParallelLinearBvhBroadphase.cpp │ │ │ ├── b3GpuParallelLinearBvhBroadphase.h │ │ │ ├── b3GpuSapBroadphase.cpp │ │ │ ├── b3GpuSapBroadphase.h │ │ │ ├── b3SapAabb.h │ │ │ └── kernels │ │ │ │ ├── gridBroadphase.cl │ │ │ │ ├── gridBroadphaseKernels.h │ │ │ │ ├── parallelLinearBvh.cl │ │ │ │ ├── parallelLinearBvhKernels.h │ │ │ │ ├── sap.cl │ │ │ │ └── sapKernels.h │ │ ├── CMakeLists.txt │ │ ├── Initialize │ │ │ ├── b3OpenCLInclude.h │ │ │ ├── b3OpenCLUtils.cpp │ │ │ └── b3OpenCLUtils.h │ │ ├── NarrowphaseCollision │ │ │ ├── b3BvhInfo.h │ │ │ ├── b3ContactCache.cpp │ │ │ ├── b3ContactCache.h │ │ │ ├── b3ConvexHullContact.cpp │ │ │ ├── b3ConvexHullContact.h │ │ │ ├── b3ConvexPolyhedronCL.h │ │ │ ├── b3GjkEpa.cpp │ │ │ ├── b3GjkEpa.h │ │ │ ├── b3OptimizedBvh.cpp │ │ │ ├── b3OptimizedBvh.h │ │ │ ├── b3QuantizedBvh.cpp │ │ │ ├── b3QuantizedBvh.h │ │ │ ├── b3StridingMeshInterface.cpp │ │ │ ├── b3StridingMeshInterface.h │ │ │ ├── b3SupportMappings.h │ │ │ ├── b3TriangleCallback.cpp │ │ │ ├── b3TriangleCallback.h │ │ │ ├── b3TriangleIndexVertexArray.cpp │ │ │ ├── b3TriangleIndexVertexArray.h │ │ │ ├── b3VectorFloat4.h │ │ │ ├── b3VoronoiSimplexSolver.cpp │ │ │ ├── b3VoronoiSimplexSolver.h │ │ │ └── kernels │ │ │ │ ├── bvhTraversal.cl │ │ │ │ ├── bvhTraversal.h │ │ │ │ ├── mpr.cl │ │ │ │ ├── mprKernels.h │ │ │ │ ├── primitiveContacts.cl │ │ │ │ ├── primitiveContacts.h │ │ │ │ ├── sat.cl │ │ │ │ ├── satClipHullContacts.cl │ │ │ │ ├── satClipHullContacts.h │ │ │ │ ├── satConcave.cl │ │ │ │ ├── satConcaveKernels.h │ │ │ │ └── satKernels.h │ │ ├── ParallelPrimitives │ │ │ ├── b3BoundSearchCL.cpp │ │ │ ├── b3BoundSearchCL.h │ │ │ ├── b3BufferInfoCL.h │ │ │ ├── b3FillCL.cpp │ │ │ ├── b3FillCL.h │ │ │ ├── b3LauncherCL.cpp │ │ │ ├── b3LauncherCL.h │ │ │ ├── b3OpenCLArray.h │ │ │ ├── b3PrefixScanCL.cpp │ │ │ ├── b3PrefixScanCL.h │ │ │ ├── b3PrefixScanFloat4CL.cpp │ │ │ ├── b3PrefixScanFloat4CL.h │ │ │ ├── b3RadixSort32CL.cpp │ │ │ ├── b3RadixSort32CL.h │ │ │ └── kernels │ │ │ │ ├── BoundSearchKernels.cl │ │ │ │ ├── BoundSearchKernelsCL.h │ │ │ │ ├── CopyKernels.cl │ │ │ │ ├── CopyKernelsCL.h │ │ │ │ ├── FillKernels.cl │ │ │ │ ├── FillKernelsCL.h │ │ │ │ ├── PrefixScanFloat4Kernels.cl │ │ │ │ ├── PrefixScanKernels.cl │ │ │ │ ├── PrefixScanKernelsCL.h │ │ │ │ ├── PrefixScanKernelsFloat4CL.h │ │ │ │ ├── RadixSort32Kernels.cl │ │ │ │ └── RadixSort32KernelsCL.h │ │ ├── Raycast │ │ │ ├── b3GpuRaycast.cpp │ │ │ ├── b3GpuRaycast.h │ │ │ └── kernels │ │ │ │ ├── rayCastKernels.cl │ │ │ │ └── rayCastKernels.h │ │ ├── RigidBody │ │ │ ├── b3GpuConstraint4.h │ │ │ ├── b3GpuGenericConstraint.cpp │ │ │ ├── b3GpuGenericConstraint.h │ │ │ ├── b3GpuJacobiContactSolver.cpp │ │ │ ├── b3GpuJacobiContactSolver.h │ │ │ ├── b3GpuNarrowPhase.cpp │ │ │ ├── b3GpuNarrowPhase.h │ │ │ ├── b3GpuNarrowPhaseInternalData.h │ │ │ ├── b3GpuPgsConstraintSolver.cpp │ │ │ ├── b3GpuPgsConstraintSolver.h │ │ │ ├── b3GpuPgsContactSolver.cpp │ │ │ ├── b3GpuPgsContactSolver.h │ │ │ ├── b3GpuRigidBodyPipeline.cpp │ │ │ ├── b3GpuRigidBodyPipeline.h │ │ │ ├── b3GpuRigidBodyPipelineInternalData.h │ │ │ ├── b3GpuSolverBody.h │ │ │ ├── b3GpuSolverConstraint.h │ │ │ ├── b3Solver.cpp │ │ │ ├── b3Solver.h │ │ │ └── kernels │ │ │ │ ├── batchingKernels.cl │ │ │ │ ├── batchingKernels.h │ │ │ │ ├── batchingKernelsNew.cl │ │ │ │ ├── batchingKernelsNew.h │ │ │ │ ├── integrateKernel.cl │ │ │ │ ├── integrateKernel.h │ │ │ │ ├── jointSolver.cl │ │ │ │ ├── jointSolver.h │ │ │ │ ├── solveContact.cl │ │ │ │ ├── solveContact.h │ │ │ │ ├── solveFriction.cl │ │ │ │ ├── solveFriction.h │ │ │ │ ├── solverSetup.cl │ │ │ │ ├── solverSetup.h │ │ │ │ ├── solverSetup2.cl │ │ │ │ ├── solverSetup2.h │ │ │ │ ├── solverUtils.cl │ │ │ │ ├── solverUtils.h │ │ │ │ ├── updateAabbsKernel.cl │ │ │ │ └── updateAabbsKernel.h │ │ └── premake4.lua │ ├── Bullet3Serialize │ │ └── Bullet2FileLoader │ │ │ ├── CMakeLists.txt │ │ │ ├── autogenerated │ │ │ └── bullet2.h │ │ │ ├── b3BulletFile.cpp │ │ │ ├── b3BulletFile.h │ │ │ ├── b3Chunk.cpp │ │ │ ├── b3Chunk.h │ │ │ ├── b3Common.h │ │ │ ├── b3DNA.cpp │ │ │ ├── b3DNA.h │ │ │ ├── b3Defines.h │ │ │ ├── b3File.cpp │ │ │ ├── b3File.h │ │ │ ├── b3Serializer.cpp │ │ │ ├── b3Serializer.h │ │ │ └── premake4.lua │ ├── BulletCollision │ │ ├── BroadphaseCollision │ │ │ ├── btAxisSweep3.cpp │ │ │ ├── btAxisSweep3.h │ │ │ ├── btAxisSweep3Internal.h │ │ │ ├── btBroadphaseInterface.h │ │ │ ├── btBroadphaseProxy.cpp │ │ │ ├── btBroadphaseProxy.h │ │ │ ├── btCollisionAlgorithm.cpp │ │ │ ├── btCollisionAlgorithm.h │ │ │ ├── btDbvt.cpp │ │ │ ├── btDbvt.h │ │ │ ├── btDbvtBroadphase.cpp │ │ │ ├── btDbvtBroadphase.h │ │ │ ├── btDispatcher.cpp │ │ │ ├── btDispatcher.h │ │ │ ├── btOverlappingPairCache.cpp │ │ │ ├── btOverlappingPairCache.h │ │ │ ├── btOverlappingPairCallback.h │ │ │ ├── btQuantizedBvh.cpp │ │ │ ├── btQuantizedBvh.h │ │ │ ├── btSimpleBroadphase.cpp │ │ │ └── btSimpleBroadphase.h │ │ ├── CMakeLists.txt │ │ ├── CollisionDispatch │ │ │ ├── SphereTriangleDetector.cpp │ │ │ ├── SphereTriangleDetector.h │ │ │ ├── btActivatingCollisionAlgorithm.cpp │ │ │ ├── btActivatingCollisionAlgorithm.h │ │ │ ├── btBox2dBox2dCollisionAlgorithm.cpp │ │ │ ├── btBox2dBox2dCollisionAlgorithm.h │ │ │ ├── btBoxBoxCollisionAlgorithm.cpp │ │ │ ├── btBoxBoxCollisionAlgorithm.h │ │ │ ├── btBoxBoxDetector.cpp │ │ │ ├── btBoxBoxDetector.h │ │ │ ├── btCollisionConfiguration.h │ │ │ ├── btCollisionCreateFunc.h │ │ │ ├── btCollisionDispatcher.cpp │ │ │ ├── btCollisionDispatcher.h │ │ │ ├── btCollisionDispatcherMt.cpp │ │ │ ├── btCollisionDispatcherMt.h │ │ │ ├── btCollisionObject.cpp │ │ │ ├── btCollisionObject.h │ │ │ ├── btCollisionObjectWrapper.h │ │ │ ├── btCollisionWorld.cpp │ │ │ ├── btCollisionWorld.h │ │ │ ├── btCollisionWorldImporter.cpp │ │ │ ├── btCollisionWorldImporter.h │ │ │ ├── btCompoundCollisionAlgorithm.cpp │ │ │ ├── btCompoundCollisionAlgorithm.h │ │ │ ├── btCompoundCompoundCollisionAlgorithm.cpp │ │ │ ├── btCompoundCompoundCollisionAlgorithm.h │ │ │ ├── btConvex2dConvex2dAlgorithm.cpp │ │ │ ├── btConvex2dConvex2dAlgorithm.h │ │ │ ├── btConvexConcaveCollisionAlgorithm.cpp │ │ │ ├── btConvexConcaveCollisionAlgorithm.h │ │ │ ├── btConvexConvexAlgorithm.cpp │ │ │ ├── btConvexConvexAlgorithm.h │ │ │ ├── btConvexPlaneCollisionAlgorithm.cpp │ │ │ ├── btConvexPlaneCollisionAlgorithm.h │ │ │ ├── btDefaultCollisionConfiguration.cpp │ │ │ ├── btDefaultCollisionConfiguration.h │ │ │ ├── btEmptyCollisionAlgorithm.cpp │ │ │ ├── btEmptyCollisionAlgorithm.h │ │ │ ├── btGhostObject.cpp │ │ │ ├── btGhostObject.h │ │ │ ├── btHashedSimplePairCache.cpp │ │ │ ├── btHashedSimplePairCache.h │ │ │ ├── btInternalEdgeUtility.cpp │ │ │ ├── btInternalEdgeUtility.h │ │ │ ├── btManifoldResult.cpp │ │ │ ├── btManifoldResult.h │ │ │ ├── btSimulationIslandManager.cpp │ │ │ ├── btSimulationIslandManager.h │ │ │ ├── btSphereBoxCollisionAlgorithm.cpp │ │ │ ├── btSphereBoxCollisionAlgorithm.h │ │ │ ├── btSphereSphereCollisionAlgorithm.cpp │ │ │ ├── btSphereSphereCollisionAlgorithm.h │ │ │ ├── btSphereTriangleCollisionAlgorithm.cpp │ │ │ ├── btSphereTriangleCollisionAlgorithm.h │ │ │ ├── btUnionFind.cpp │ │ │ └── btUnionFind.h │ │ ├── CollisionShapes │ │ │ ├── btBox2dShape.cpp │ │ │ ├── btBox2dShape.h │ │ │ ├── btBoxShape.cpp │ │ │ ├── btBoxShape.h │ │ │ ├── btBvhTriangleMeshShape.cpp │ │ │ ├── btBvhTriangleMeshShape.h │ │ │ ├── btCapsuleShape.cpp │ │ │ ├── btCapsuleShape.h │ │ │ ├── btCollisionMargin.h │ │ │ ├── btCollisionShape.cpp │ │ │ ├── btCollisionShape.h │ │ │ ├── btCompoundShape.cpp │ │ │ ├── btCompoundShape.h │ │ │ ├── btConcaveShape.cpp │ │ │ ├── btConcaveShape.h │ │ │ ├── btConeShape.cpp │ │ │ ├── btConeShape.h │ │ │ ├── btConvex2dShape.cpp │ │ │ ├── btConvex2dShape.h │ │ │ ├── btConvexHullShape.cpp │ │ │ ├── btConvexHullShape.h │ │ │ ├── btConvexInternalShape.cpp │ │ │ ├── btConvexInternalShape.h │ │ │ ├── btConvexPointCloudShape.cpp │ │ │ ├── btConvexPointCloudShape.h │ │ │ ├── btConvexPolyhedron.cpp │ │ │ ├── btConvexPolyhedron.h │ │ │ ├── btConvexShape.cpp │ │ │ ├── btConvexShape.h │ │ │ ├── btConvexTriangleMeshShape.cpp │ │ │ ├── btConvexTriangleMeshShape.h │ │ │ ├── btCylinderShape.cpp │ │ │ ├── btCylinderShape.h │ │ │ ├── btEmptyShape.cpp │ │ │ ├── btEmptyShape.h │ │ │ ├── btHeightfieldTerrainShape.cpp │ │ │ ├── btHeightfieldTerrainShape.h │ │ │ ├── btMaterial.h │ │ │ ├── btMiniSDF.cpp │ │ │ ├── btMiniSDF.h │ │ │ ├── btMinkowskiSumShape.cpp │ │ │ ├── btMinkowskiSumShape.h │ │ │ ├── btMultiSphereShape.cpp │ │ │ ├── btMultiSphereShape.h │ │ │ ├── btMultimaterialTriangleMeshShape.cpp │ │ │ ├── btMultimaterialTriangleMeshShape.h │ │ │ ├── btOptimizedBvh.cpp │ │ │ ├── btOptimizedBvh.h │ │ │ ├── btPolyhedralConvexShape.cpp │ │ │ ├── btPolyhedralConvexShape.h │ │ │ ├── btScaledBvhTriangleMeshShape.cpp │ │ │ ├── btScaledBvhTriangleMeshShape.h │ │ │ ├── btSdfCollisionShape.cpp │ │ │ ├── btSdfCollisionShape.h │ │ │ ├── btShapeHull.cpp │ │ │ ├── btShapeHull.h │ │ │ ├── btSphereShape.cpp │ │ │ ├── btSphereShape.h │ │ │ ├── btStaticPlaneShape.cpp │ │ │ ├── btStaticPlaneShape.h │ │ │ ├── btStridingMeshInterface.cpp │ │ │ ├── btStridingMeshInterface.h │ │ │ ├── btTetrahedronShape.cpp │ │ │ ├── btTetrahedronShape.h │ │ │ ├── btTriangleBuffer.cpp │ │ │ ├── btTriangleBuffer.h │ │ │ ├── btTriangleCallback.cpp │ │ │ ├── btTriangleCallback.h │ │ │ ├── btTriangleIndexVertexArray.cpp │ │ │ ├── btTriangleIndexVertexArray.h │ │ │ ├── btTriangleIndexVertexMaterialArray.cpp │ │ │ ├── btTriangleIndexVertexMaterialArray.h │ │ │ ├── btTriangleInfoMap.h │ │ │ ├── btTriangleMesh.cpp │ │ │ ├── btTriangleMesh.h │ │ │ ├── btTriangleMeshShape.cpp │ │ │ ├── btTriangleMeshShape.h │ │ │ ├── btTriangleShape.h │ │ │ ├── btUniformScalingShape.cpp │ │ │ └── btUniformScalingShape.h │ │ ├── Gimpact │ │ │ ├── btBoxCollision.h │ │ │ ├── btClipPolygon.h │ │ │ ├── btCompoundFromGimpact.h │ │ │ ├── btContactProcessing.cpp │ │ │ ├── btContactProcessing.h │ │ │ ├── btContactProcessingStructs.h │ │ │ ├── btGImpactBvh.cpp │ │ │ ├── btGImpactBvh.h │ │ │ ├── btGImpactBvhStructs.h │ │ │ ├── btGImpactCollisionAlgorithm.cpp │ │ │ ├── btGImpactCollisionAlgorithm.h │ │ │ ├── btGImpactMassUtil.h │ │ │ ├── btGImpactQuantizedBvh.cpp │ │ │ ├── btGImpactQuantizedBvh.h │ │ │ ├── btGImpactQuantizedBvhStructs.h │ │ │ ├── btGImpactShape.cpp │ │ │ ├── btGImpactShape.h │ │ │ ├── btGenericPoolAllocator.cpp │ │ │ ├── btGenericPoolAllocator.h │ │ │ ├── btGeometryOperations.h │ │ │ ├── btQuantization.h │ │ │ ├── btTriangleShapeEx.cpp │ │ │ ├── btTriangleShapeEx.h │ │ │ ├── gim_array.h │ │ │ ├── gim_basic_geometry_operations.h │ │ │ ├── gim_bitset.h │ │ │ ├── gim_box_collision.h │ │ │ ├── gim_box_set.cpp │ │ │ ├── gim_box_set.h │ │ │ ├── gim_clip_polygon.h │ │ │ ├── gim_contact.cpp │ │ │ ├── gim_contact.h │ │ │ ├── gim_geom_types.h │ │ │ ├── gim_geometry.h │ │ │ ├── gim_hash_table.h │ │ │ ├── gim_linear_math.h │ │ │ ├── gim_math.h │ │ │ ├── gim_memory.cpp │ │ │ ├── gim_memory.h │ │ │ ├── gim_pair.h │ │ │ ├── gim_radixsort.h │ │ │ ├── gim_tri_collision.cpp │ │ │ └── gim_tri_collision.h │ │ ├── NarrowPhaseCollision │ │ │ ├── btComputeGjkEpaPenetration.h │ │ │ ├── btContinuousConvexCollision.cpp │ │ │ ├── btContinuousConvexCollision.h │ │ │ ├── btConvexCast.cpp │ │ │ ├── btConvexCast.h │ │ │ ├── btConvexPenetrationDepthSolver.h │ │ │ ├── btDiscreteCollisionDetectorInterface.h │ │ │ ├── btGjkCollisionDescription.h │ │ │ ├── btGjkConvexCast.cpp │ │ │ ├── btGjkConvexCast.h │ │ │ ├── btGjkEpa2.cpp │ │ │ ├── btGjkEpa2.h │ │ │ ├── btGjkEpa3.h │ │ │ ├── btGjkEpaPenetrationDepthSolver.cpp │ │ │ ├── btGjkEpaPenetrationDepthSolver.h │ │ │ ├── btGjkPairDetector.cpp │ │ │ ├── btGjkPairDetector.h │ │ │ ├── btManifoldPoint.h │ │ │ ├── btMinkowskiPenetrationDepthSolver.cpp │ │ │ ├── btMinkowskiPenetrationDepthSolver.h │ │ │ ├── btMprPenetration.h │ │ │ ├── btPersistentManifold.cpp │ │ │ ├── btPersistentManifold.h │ │ │ ├── btPointCollector.h │ │ │ ├── btPolyhedralContactClipping.cpp │ │ │ ├── btPolyhedralContactClipping.h │ │ │ ├── btRaycastCallback.cpp │ │ │ ├── btRaycastCallback.h │ │ │ ├── btSimplexSolverInterface.h │ │ │ ├── btSubSimplexConvexCast.cpp │ │ │ ├── btSubSimplexConvexCast.h │ │ │ ├── btVoronoiSimplexSolver.cpp │ │ │ └── btVoronoiSimplexSolver.h │ │ └── premake4.lua │ ├── BulletDynamics │ │ ├── CMakeLists.txt │ │ ├── Character │ │ │ ├── btCharacterControllerInterface.h │ │ │ ├── btKinematicCharacterController.cpp │ │ │ └── btKinematicCharacterController.h │ │ ├── ConstraintSolver │ │ │ ├── btBatchedConstraints.cpp │ │ │ ├── btBatchedConstraints.h │ │ │ ├── btConeTwistConstraint.cpp │ │ │ ├── btConeTwistConstraint.h │ │ │ ├── btConstraintSolver.h │ │ │ ├── btContactConstraint.cpp │ │ │ ├── btContactConstraint.h │ │ │ ├── btContactSolverInfo.h │ │ │ ├── btFixedConstraint.cpp │ │ │ ├── btFixedConstraint.h │ │ │ ├── btGearConstraint.cpp │ │ │ ├── btGearConstraint.h │ │ │ ├── btGeneric6DofConstraint.cpp │ │ │ ├── btGeneric6DofConstraint.h │ │ │ ├── btGeneric6DofSpring2Constraint.cpp │ │ │ ├── btGeneric6DofSpring2Constraint.h │ │ │ ├── btGeneric6DofSpringConstraint.cpp │ │ │ ├── btGeneric6DofSpringConstraint.h │ │ │ ├── btHinge2Constraint.cpp │ │ │ ├── btHinge2Constraint.h │ │ │ ├── btHingeConstraint.cpp │ │ │ ├── btHingeConstraint.h │ │ │ ├── btJacobianEntry.h │ │ │ ├── btNNCGConstraintSolver.cpp │ │ │ ├── btNNCGConstraintSolver.h │ │ │ ├── btPoint2PointConstraint.cpp │ │ │ ├── btPoint2PointConstraint.h │ │ │ ├── btSequentialImpulseConstraintSolver.cpp │ │ │ ├── btSequentialImpulseConstraintSolver.h │ │ │ ├── btSequentialImpulseConstraintSolverMt.cpp │ │ │ ├── btSequentialImpulseConstraintSolverMt.h │ │ │ ├── btSliderConstraint.cpp │ │ │ ├── btSliderConstraint.h │ │ │ ├── btSolve2LinearConstraint.cpp │ │ │ ├── btSolve2LinearConstraint.h │ │ │ ├── btSolverBody.h │ │ │ ├── btSolverConstraint.h │ │ │ ├── btTypedConstraint.cpp │ │ │ ├── btTypedConstraint.h │ │ │ ├── btUniversalConstraint.cpp │ │ │ └── btUniversalConstraint.h │ │ ├── Dynamics │ │ │ ├── btActionInterface.h │ │ │ ├── btDiscreteDynamicsWorld.cpp │ │ │ ├── btDiscreteDynamicsWorld.h │ │ │ ├── btDiscreteDynamicsWorldMt.cpp │ │ │ ├── btDiscreteDynamicsWorldMt.h │ │ │ ├── btDynamicsWorld.h │ │ │ ├── btRigidBody.cpp │ │ │ ├── btRigidBody.h │ │ │ ├── btSimpleDynamicsWorld.cpp │ │ │ ├── btSimpleDynamicsWorld.h │ │ │ ├── btSimulationIslandManagerMt.cpp │ │ │ └── btSimulationIslandManagerMt.h │ │ ├── Featherstone │ │ │ ├── btMultiBody.cpp │ │ │ ├── btMultiBody.h │ │ │ ├── btMultiBodyConstraint.cpp │ │ │ ├── btMultiBodyConstraint.h │ │ │ ├── btMultiBodyConstraintSolver.cpp │ │ │ ├── btMultiBodyConstraintSolver.h │ │ │ ├── btMultiBodyDynamicsWorld.cpp │ │ │ ├── btMultiBodyDynamicsWorld.h │ │ │ ├── btMultiBodyFixedConstraint.cpp │ │ │ ├── btMultiBodyFixedConstraint.h │ │ │ ├── btMultiBodyGearConstraint.cpp │ │ │ ├── btMultiBodyGearConstraint.h │ │ │ ├── btMultiBodyInplaceSolverIslandCallback.h │ │ │ ├── btMultiBodyJointFeedback.h │ │ │ ├── btMultiBodyJointLimitConstraint.cpp │ │ │ ├── btMultiBodyJointLimitConstraint.h │ │ │ ├── btMultiBodyJointMotor.cpp │ │ │ ├── btMultiBodyJointMotor.h │ │ │ ├── btMultiBodyLink.h │ │ │ ├── btMultiBodyLinkCollider.h │ │ │ ├── btMultiBodyMLCPConstraintSolver.cpp │ │ │ ├── btMultiBodyMLCPConstraintSolver.h │ │ │ ├── btMultiBodyPoint2Point.cpp │ │ │ ├── btMultiBodyPoint2Point.h │ │ │ ├── btMultiBodySliderConstraint.cpp │ │ │ ├── btMultiBodySliderConstraint.h │ │ │ ├── btMultiBodySolverConstraint.h │ │ │ ├── btMultiBodySphericalJointMotor.cpp │ │ │ └── btMultiBodySphericalJointMotor.h │ │ ├── MLCPSolvers │ │ │ ├── btDantzigLCP.cpp │ │ │ ├── btDantzigLCP.h │ │ │ ├── btDantzigSolver.h │ │ │ ├── btLemkeAlgorithm.cpp │ │ │ ├── btLemkeAlgorithm.h │ │ │ ├── btLemkeSolver.h │ │ │ ├── btMLCPSolver.cpp │ │ │ ├── btMLCPSolver.h │ │ │ ├── btMLCPSolverInterface.h │ │ │ ├── btPATHSolver.h │ │ │ └── btSolveProjectedGaussSeidel.h │ │ ├── Vehicle │ │ │ ├── btRaycastVehicle.cpp │ │ │ ├── btRaycastVehicle.h │ │ │ ├── btVehicleRaycaster.h │ │ │ ├── btWheelInfo.cpp │ │ │ └── btWheelInfo.h │ │ └── premake4.lua │ ├── BulletInverseDynamics │ │ ├── CMakeLists.txt │ │ ├── IDConfig.hpp │ │ ├── IDConfigBuiltin.hpp │ │ ├── IDConfigEigen.hpp │ │ ├── IDErrorMessages.hpp │ │ ├── IDMath.cpp │ │ ├── IDMath.hpp │ │ ├── MultiBodyTree.cpp │ │ ├── MultiBodyTree.hpp │ │ ├── details │ │ │ ├── IDEigenInterface.hpp │ │ │ ├── IDLinearMathInterface.hpp │ │ │ ├── IDMatVec.hpp │ │ │ ├── MultiBodyTreeImpl.cpp │ │ │ ├── MultiBodyTreeImpl.hpp │ │ │ ├── MultiBodyTreeInitCache.cpp │ │ │ └── MultiBodyTreeInitCache.hpp │ │ └── premake4.lua │ ├── BulletSoftBody │ │ ├── CMakeLists.txt │ │ ├── DeformableBodyInplaceSolverIslandCallback.h │ │ ├── btCGProjection.h │ │ ├── btConjugateGradient.h │ │ ├── btConjugateResidual.h │ │ ├── btDefaultSoftBodySolver.cpp │ │ ├── btDefaultSoftBodySolver.h │ │ ├── btDeformableBackwardEulerObjective.cpp │ │ ├── btDeformableBackwardEulerObjective.h │ │ ├── btDeformableBodySolver.cpp │ │ ├── btDeformableBodySolver.h │ │ ├── btDeformableContactConstraint.cpp │ │ ├── btDeformableContactConstraint.h │ │ ├── btDeformableContactProjection.cpp │ │ ├── btDeformableContactProjection.h │ │ ├── btDeformableCorotatedForce.h │ │ ├── btDeformableGravityForce.h │ │ ├── btDeformableLagrangianForce.h │ │ ├── btDeformableLinearElasticityForce.h │ │ ├── btDeformableMassSpringForce.h │ │ ├── btDeformableMousePickingForce.h │ │ ├── btDeformableMultiBodyConstraintSolver.cpp │ │ ├── btDeformableMultiBodyConstraintSolver.h │ │ ├── btDeformableMultiBodyDynamicsWorld.cpp │ │ ├── btDeformableMultiBodyDynamicsWorld.h │ │ ├── btDeformableNeoHookeanForce.h │ │ ├── btKrylovSolver.h │ │ ├── btPreconditioner.h │ │ ├── btSoftBody.cpp │ │ ├── btSoftBody.h │ │ ├── btSoftBodyConcaveCollisionAlgorithm.cpp │ │ ├── btSoftBodyConcaveCollisionAlgorithm.h │ │ ├── btSoftBodyData.h │ │ ├── btSoftBodyHelpers.cpp │ │ ├── btSoftBodyHelpers.h │ │ ├── btSoftBodyInternals.h │ │ ├── btSoftBodyRigidBodyCollisionConfiguration.cpp │ │ ├── btSoftBodyRigidBodyCollisionConfiguration.h │ │ ├── btSoftBodySolverVertexBuffer.h │ │ ├── btSoftBodySolvers.h │ │ ├── btSoftMultiBodyDynamicsWorld.cpp │ │ ├── btSoftMultiBodyDynamicsWorld.h │ │ ├── btSoftRigidCollisionAlgorithm.cpp │ │ ├── btSoftRigidCollisionAlgorithm.h │ │ ├── btSoftRigidDynamicsWorld.cpp │ │ ├── btSoftRigidDynamicsWorld.h │ │ ├── btSoftSoftCollisionAlgorithm.cpp │ │ ├── btSoftSoftCollisionAlgorithm.h │ │ ├── btSparseSDF.h │ │ ├── poly34.cpp │ │ ├── poly34.h │ │ └── premake4.lua │ ├── CMakeLists.txt │ ├── LinearMath │ │ ├── CMakeLists.txt │ │ ├── TaskScheduler │ │ │ ├── btTaskScheduler.cpp │ │ │ ├── btThreadSupportInterface.h │ │ │ ├── btThreadSupportPosix.cpp │ │ │ └── btThreadSupportWin32.cpp │ │ ├── btAabbUtil2.h │ │ ├── btAlignedAllocator.cpp │ │ ├── btAlignedAllocator.h │ │ ├── btAlignedObjectArray.h │ │ ├── btConvexHull.cpp │ │ ├── btConvexHull.h │ │ ├── btConvexHullComputer.cpp │ │ ├── btConvexHullComputer.h │ │ ├── btCpuFeatureUtility.h │ │ ├── btDefaultMotionState.h │ │ ├── btGeometryUtil.cpp │ │ ├── btGeometryUtil.h │ │ ├── btGrahamScan2dConvexHull.h │ │ ├── btHashMap.h │ │ ├── btIDebugDraw.h │ │ ├── btImplicitQRSVD.h │ │ ├── btList.h │ │ ├── btMatrix3x3.h │ │ ├── btMatrixX.h │ │ ├── btMinMax.h │ │ ├── btModifiedGramSchmidt.h │ │ ├── btMotionState.h │ │ ├── btPolarDecomposition.cpp │ │ ├── btPolarDecomposition.h │ │ ├── btPoolAllocator.h │ │ ├── btQuadWord.h │ │ ├── btQuaternion.h │ │ ├── btQuickprof.cpp │ │ ├── btQuickprof.h │ │ ├── btRandom.h │ │ ├── btReducedVector.cpp │ │ ├── btReducedVector.h │ │ ├── btScalar.h │ │ ├── btSerializer.cpp │ │ ├── btSerializer.h │ │ ├── btSerializer64.cpp │ │ ├── btSpatialAlgebra.h │ │ ├── btStackAlloc.h │ │ ├── btThreads.cpp │ │ ├── btThreads.h │ │ ├── btTransform.h │ │ ├── btTransformUtil.h │ │ ├── btVector3.cpp │ │ ├── btVector3.h │ │ └── premake4.lua │ ├── btBulletCollisionAll.cpp │ ├── btBulletCollisionCommon.h │ ├── btBulletDynamicsAll.cpp │ ├── btBulletDynamicsCommon.h │ ├── btLinearMathAll.cpp │ ├── clew │ │ ├── clew.c │ │ └── clew.h │ └── lib │ │ ├── Bullet3Common.lib │ │ ├── BulletCollision.lib │ │ ├── BulletDynamics.lib │ │ ├── BulletInverseDynamics.lib │ │ ├── BulletSoftBody.lib │ │ └── LinearMath.lib │ ├── com_kAIS_KAIMyEntity_NativeFunc.cpp │ ├── com_kAIS_KAIMyEntity_NativeFunc.h │ ├── glm │ ├── CMakeLists.txt │ ├── common.hpp │ ├── detail │ │ ├── _features.hpp │ │ ├── _fixes.hpp │ │ ├── _noise.hpp │ │ ├── _swizzle.hpp │ │ ├── _swizzle_func.hpp │ │ ├── _vectorize.hpp │ │ ├── compute_vector_relational.hpp │ │ ├── dummy.cpp │ │ ├── func_common.inl │ │ ├── func_common_simd.inl │ │ ├── func_exponential.inl │ │ ├── func_exponential_simd.inl │ │ ├── func_geometric.inl │ │ ├── func_geometric_simd.inl │ │ ├── func_integer.inl │ │ ├── func_integer_simd.inl │ │ ├── func_matrix.inl │ │ ├── func_matrix_simd.inl │ │ ├── func_packing.inl │ │ ├── func_packing_simd.inl │ │ ├── func_trigonometric.inl │ │ ├── func_trigonometric_simd.inl │ │ ├── func_vector_relational.inl │ │ ├── func_vector_relational_simd.inl │ │ ├── glm.cpp │ │ ├── qualifier.hpp │ │ ├── setup.hpp │ │ ├── type_float.hpp │ │ ├── type_gentype.hpp │ │ ├── type_gentype.inl │ │ ├── type_half.hpp │ │ ├── type_half.inl │ │ ├── type_int.hpp │ │ ├── type_mat.hpp │ │ ├── type_mat.inl │ │ ├── type_mat2x2.hpp │ │ ├── type_mat2x2.inl │ │ ├── type_mat2x3.hpp │ │ ├── type_mat2x3.inl │ │ ├── type_mat2x4.hpp │ │ ├── type_mat2x4.inl │ │ ├── type_mat3x2.hpp │ │ ├── type_mat3x2.inl │ │ ├── type_mat3x3.hpp │ │ ├── type_mat3x3.inl │ │ ├── type_mat3x4.hpp │ │ ├── type_mat3x4.inl │ │ ├── type_mat4x2.hpp │ │ ├── type_mat4x2.inl │ │ ├── type_mat4x3.hpp │ │ ├── type_mat4x3.inl │ │ ├── type_mat4x4.hpp │ │ ├── type_mat4x4.inl │ │ ├── type_mat4x4_simd.inl │ │ ├── type_vec.hpp │ │ ├── type_vec.inl │ │ ├── type_vec1.hpp │ │ ├── type_vec1.inl │ │ ├── type_vec2.hpp │ │ ├── type_vec2.inl │ │ ├── type_vec3.hpp │ │ ├── type_vec3.inl │ │ ├── type_vec4.hpp │ │ ├── type_vec4.inl │ │ └── type_vec4_simd.inl │ ├── exponential.hpp │ ├── ext.hpp │ ├── ext │ │ ├── vec1.hpp │ │ ├── vec1.inl │ │ ├── vector_relational.hpp │ │ └── vector_relational.inl │ ├── fwd.hpp │ ├── geometric.hpp │ ├── glm.hpp │ ├── gtc │ │ ├── bitfield.hpp │ │ ├── bitfield.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── constants.hpp │ │ ├── constants.inl │ │ ├── epsilon.hpp │ │ ├── epsilon.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── matrix_access.hpp │ │ ├── matrix_access.inl │ │ ├── matrix_integer.hpp │ │ ├── matrix_inverse.hpp │ │ ├── matrix_inverse.inl │ │ ├── matrix_transform.hpp │ │ ├── matrix_transform.inl │ │ ├── noise.hpp │ │ ├── noise.inl │ │ ├── packing.hpp │ │ ├── packing.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── quaternion_simd.inl │ │ ├── random.hpp │ │ ├── random.inl │ │ ├── reciprocal.hpp │ │ ├── reciprocal.inl │ │ ├── round.hpp │ │ ├── round.inl │ │ ├── type_aligned.hpp │ │ ├── type_precision.hpp │ │ ├── type_precision.inl │ │ ├── type_ptr.hpp │ │ ├── type_ptr.inl │ │ ├── ulp.hpp │ │ ├── ulp.inl │ │ ├── vec1.hpp │ │ └── vec1.inl │ ├── gtx │ │ ├── associated_min_max.hpp │ │ ├── associated_min_max.inl │ │ ├── bit.hpp │ │ ├── bit.inl │ │ ├── closest_point.hpp │ │ ├── closest_point.inl │ │ ├── color_encoding.hpp │ │ ├── color_encoding.inl │ │ ├── color_space.hpp │ │ ├── color_space.inl │ │ ├── color_space_YCoCg.hpp │ │ ├── color_space_YCoCg.inl │ │ ├── common.hpp │ │ ├── common.inl │ │ ├── compatibility.hpp │ │ ├── compatibility.inl │ │ ├── component_wise.hpp │ │ ├── component_wise.inl │ │ ├── dual_quaternion.hpp │ │ ├── dual_quaternion.inl │ │ ├── easing.hpp │ │ ├── easing.inl │ │ ├── euler_angles.hpp │ │ ├── euler_angles.inl │ │ ├── extend.hpp │ │ ├── extend.inl │ │ ├── extended_min_max.hpp │ │ ├── extended_min_max.inl │ │ ├── exterior_product.hpp │ │ ├── exterior_product.inl │ │ ├── fast_exponential.hpp │ │ ├── fast_exponential.inl │ │ ├── fast_square_root.hpp │ │ ├── fast_square_root.inl │ │ ├── fast_trigonometry.hpp │ │ ├── fast_trigonometry.inl │ │ ├── float_notmalize.inl │ │ ├── functions.hpp │ │ ├── functions.inl │ │ ├── gradient_paint.hpp │ │ ├── gradient_paint.inl │ │ ├── handed_coordinate_space.hpp │ │ ├── handed_coordinate_space.inl │ │ ├── hash.hpp │ │ ├── hash.inl │ │ ├── integer.hpp │ │ ├── integer.inl │ │ ├── intersect.hpp │ │ ├── intersect.inl │ │ ├── io.hpp │ │ ├── io.inl │ │ ├── log_base.hpp │ │ ├── log_base.inl │ │ ├── matrix_cross_product.hpp │ │ ├── matrix_cross_product.inl │ │ ├── matrix_decompose.hpp │ │ ├── matrix_decompose.inl │ │ ├── matrix_factorisation.hpp │ │ ├── matrix_factorisation.inl │ │ ├── matrix_interpolation.hpp │ │ ├── matrix_interpolation.inl │ │ ├── matrix_major_storage.hpp │ │ ├── matrix_major_storage.inl │ │ ├── matrix_operation.hpp │ │ ├── matrix_operation.inl │ │ ├── matrix_query.hpp │ │ ├── matrix_query.inl │ │ ├── matrix_transform_2d.hpp │ │ ├── matrix_transform_2d.inl │ │ ├── mixed_product.hpp │ │ ├── mixed_product.inl │ │ ├── norm.hpp │ │ ├── norm.inl │ │ ├── normal.hpp │ │ ├── normal.inl │ │ ├── normalize_dot.hpp │ │ ├── normalize_dot.inl │ │ ├── number_precision.hpp │ │ ├── number_precision.inl │ │ ├── optimum_pow.hpp │ │ ├── optimum_pow.inl │ │ ├── orthonormalize.hpp │ │ ├── orthonormalize.inl │ │ ├── perpendicular.hpp │ │ ├── perpendicular.inl │ │ ├── polar_coordinates.hpp │ │ ├── polar_coordinates.inl │ │ ├── projection.hpp │ │ ├── projection.inl │ │ ├── quaternion.hpp │ │ ├── quaternion.inl │ │ ├── range.hpp │ │ ├── raw_data.hpp │ │ ├── raw_data.inl │ │ ├── rotate_normalized_axis.hpp │ │ ├── rotate_normalized_axis.inl │ │ ├── rotate_vector.hpp │ │ ├── rotate_vector.inl │ │ ├── scalar_multiplication.hpp │ │ ├── scalar_relational.hpp │ │ ├── scalar_relational.inl │ │ ├── spline.hpp │ │ ├── spline.inl │ │ ├── std_based_type.hpp │ │ ├── std_based_type.inl │ │ ├── string_cast.hpp │ │ ├── string_cast.inl │ │ ├── texture.hpp │ │ ├── texture.inl │ │ ├── transform.hpp │ │ ├── transform.inl │ │ ├── transform2.hpp │ │ ├── transform2.inl │ │ ├── type_aligned.hpp │ │ ├── type_aligned.inl │ │ ├── type_trait.hpp │ │ ├── type_trait.inl │ │ ├── vec_swizzle.hpp │ │ ├── vector_angle.hpp │ │ ├── vector_angle.inl │ │ ├── vector_query.hpp │ │ ├── vector_query.inl │ │ ├── wrap.hpp │ │ └── wrap.inl │ ├── integer.hpp │ ├── mat2x2.hpp │ ├── mat2x3.hpp │ ├── mat2x4.hpp │ ├── mat3x2.hpp │ ├── mat3x3.hpp │ ├── mat3x4.hpp │ ├── mat4x2.hpp │ ├── mat4x3.hpp │ ├── mat4x4.hpp │ ├── matrix.hpp │ ├── packing.hpp │ ├── simd │ │ ├── common.h │ │ ├── exponential.h │ │ ├── geometric.h │ │ ├── integer.h │ │ ├── matrix.h │ │ ├── packing.h │ │ ├── platform.h │ │ ├── trigonometric.h │ │ └── vector_relational.h │ ├── trigonometric.hpp │ ├── vec2.hpp │ ├── vec3.hpp │ ├── vec4.hpp │ └── vector_relational.hpp │ ├── jni.h │ ├── jni_md.h │ ├── spdlog │ ├── async_logger.h │ ├── common.h │ ├── details │ │ ├── async_log_helper.h │ │ ├── async_logger_impl.h │ │ ├── file_helper.h │ │ ├── log_msg.h │ │ ├── logger_impl.h │ │ ├── mpmc_bounded_q.h │ │ ├── null_mutex.h │ │ ├── os.h │ │ ├── pattern_formatter_impl.h │ │ ├── registry.h │ │ └── spdlog_impl.h │ ├── fmt │ │ ├── bundled │ │ │ ├── format.cc │ │ │ ├── format.h │ │ │ ├── ostream.cc │ │ │ ├── ostream.h │ │ │ ├── posix.cc │ │ │ ├── posix.h │ │ │ ├── printf.h │ │ │ └── time.h │ │ ├── fmt.h │ │ └── ostr.h │ ├── formatter.h │ ├── logger.h │ ├── sinks │ │ ├── android_sink.h │ │ ├── ansicolor_sink.h │ │ ├── base_sink.h │ │ ├── dist_sink.h │ │ ├── file_sinks.h │ │ ├── msvc_sink.h │ │ ├── null_sink.h │ │ ├── ostream_sink.h │ │ ├── sink.h │ │ ├── stdout_sinks.h │ │ ├── syslog_sink.h │ │ └── wincolor_sink.h │ ├── spdlog.h │ └── tweakme.h │ └── stb │ ├── stb.h │ ├── stb_c_lexer.h │ ├── stb_connected_components.h │ ├── stb_divide.h │ ├── stb_dxt.h │ ├── stb_easy_font.h │ ├── stb_herringbone_wang_tile.h │ ├── stb_image.h │ ├── stb_image_resize.h │ ├── stb_image_write.h │ ├── stb_leakcheck.h │ ├── stb_perlin.h │ ├── stb_rect_pack.h │ ├── stb_sprintf.h │ ├── stb_textedit.h │ ├── stb_tilemap_editor.h │ ├── stb_truetype.h │ ├── stb_vorbis.c │ ├── stb_voxel_render.h │ └── stretchy_buffer.h ├── KAIMyEntity_1.12.2_1.4b13 ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── java │ └── com │ │ └── kAIS │ │ └── KAIMyEntity │ │ ├── KAIMyEntity.java │ │ ├── NativeFunc.java │ │ ├── config │ │ ├── KAIMyEntityConfig.java │ │ └── KAIMyEntityConfigGUIFactory.java │ │ ├── network │ │ └── KAIMyEntityNetworkPack.java │ │ ├── register │ │ ├── KAIMyEntityRegisterClient.java │ │ └── KAIMyEntityRegisterCommon.java │ │ └── renderer │ │ ├── IMMDModel.java │ │ ├── KAIMyEntityRenderFactory.java │ │ ├── KAIMyEntityRenderer.java │ │ ├── KAIMyEntityRendererPlayer.java │ │ ├── MMDAnimManager.java │ │ ├── MMDModelManager.java │ │ ├── MMDModelOpenGL.java │ │ ├── MMDTextureManager.java │ │ └── RenderTimer.java │ └── resources │ ├── assets │ └── kaimyentity │ │ └── lang │ │ └── zh_cn.lang │ ├── mcmod.info │ └── pack.mcmeta ├── KAIMyEntity_1.16.5_1.4b14 ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src │ └── main │ ├── java │ └── com │ │ └── kAIS │ │ └── KAIMyEntity │ │ ├── KAIMyEntity.java │ │ ├── NativeFunc.java │ │ ├── config │ │ └── KAIMyEntityConfig.java │ │ ├── network │ │ └── KAIMyEntityNetworkPack.java │ │ ├── register │ │ ├── KAIMyEntityRegisterClient.java │ │ └── KAIMyEntityRegisterCommon.java │ │ └── renderer │ │ ├── IMMDModel.java │ │ ├── KAIMyEntityRenderFactory.java │ │ ├── KAIMyEntityRenderer.java │ │ ├── KAIMyEntityRendererPlayer.java │ │ ├── MMDAnimManager.java │ │ ├── MMDModelManager.java │ │ ├── MMDModelOpenGL.java │ │ ├── MMDTextureManager.java │ │ └── RenderTimer.java │ └── resources │ ├── META-INF │ └── mods.toml │ ├── assets │ └── kaimyentity │ │ └── lang │ │ └── zh_cn.json │ └── pack.mcmeta ├── LICENSE └── README.md /KAIMyEntitySaba/KAIMyEntitySaba.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30907.101 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KAIMyEntitySaba", "KAIMyEntitySaba\KAIMyEntitySaba.vcxproj", "{1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Debug|x64.ActiveCfg = Debug|x64 17 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Debug|x64.Build.0 = Debug|x64 18 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Debug|x86.ActiveCfg = Debug|Win32 19 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Debug|x86.Build.0 = Debug|Win32 20 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Release|x64.ActiveCfg = Release|x64 21 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Release|x64.Build.0 = Release|x64 22 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Release|x86.ActiveCfg = Release|Win32 23 | {1D1627E8-D6C3-49BF-8C63-EA75FCFCDC38}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {CCB6896B-76F1-4CC9-B20D-55AE26976B3C} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/KAIMyEntitySaba.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/Log.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #include "Log.h" 7 | #include "UnicodeUtil.h" 8 | 9 | #include 10 | 11 | #if _WIN32 12 | 13 | #include 14 | 15 | #endif // _WIN32 16 | 17 | namespace saba 18 | { 19 | DefaultSink::DefaultSink() 20 | { 21 | m_defaultLogger = spdlog::stdout_color_mt("default"); 22 | #if _WIN32 23 | SetConsoleOutputCP(CP_UTF8); 24 | #endif // _WIN32 25 | } 26 | 27 | void DefaultSink::log(const spdlog::details::log_msg & msg) 28 | { 29 | m_defaultLogger->log(msg.level, msg.raw.c_str()); 30 | } 31 | 32 | void DefaultSink::flush() 33 | { 34 | m_defaultLogger->flush(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/Path.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_BASE_PATH_H_ 7 | #define SABA_BASE_PATH_H_ 8 | 9 | #include 10 | #include 11 | 12 | namespace saba { 13 | class PathUtil 14 | { 15 | public: 16 | PathUtil() = delete; 17 | PathUtil(const PathUtil&) = delete; 18 | PathUtil& operator = (const PathUtil&) = delete; 19 | 20 | static std::string GetCWD(); 21 | static std::string GetExecutablePath(); 22 | static std::string Combine(const std::vector& parts); 23 | static std::string Combine(const std::string& a, const std::string& b); 24 | static std::string GetDirectoryName(const std::string& path); 25 | static std::string GetFilename(const std::string& path); 26 | static std::string GetFilenameWithoutExt(const std::string& path); 27 | static std::string GetExt(const std::string& path); 28 | static std::string GetDelimiter(); 29 | static std::string Normalize(const std::string& path); 30 | }; 31 | } 32 | 33 | #endif // !SABA_BASE_PATH_H_ 34 | 35 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/Singleton.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #include "Singleton.h" 7 | 8 | #include 9 | 10 | namespace saba 11 | { 12 | namespace 13 | { 14 | const size_t MaxFinalizerNum = 256; 15 | size_t g_finalizerSize = 0; 16 | 17 | SingletonFinalizer::FinalizerFunc g_finalizers[MaxFinalizerNum]; 18 | } 19 | 20 | void SingletonFinalizer::AddFinalizer(FinalizerFunc finalizer) 21 | { 22 | if (g_finalizerSize >= MaxFinalizerNum) 23 | { 24 | exit(-1); 25 | } 26 | 27 | g_finalizers[g_finalizerSize] = finalizer; 28 | g_finalizerSize += 1; 29 | } 30 | 31 | void SingletonFinalizer::Finalize() 32 | { 33 | for (size_t i = 0; i < g_finalizerSize; i++) 34 | { 35 | size_t idx = g_finalizerSize - i - 1; 36 | (g_finalizers[idx])(); 37 | } 38 | g_finalizerSize = 0; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/Singleton.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_BASE_SINGLETON_H_ 7 | #define SABA_BASE_SINGLETON_H_ 8 | 9 | #include 10 | #include 11 | 12 | namespace saba 13 | { 14 | class SingletonFinalizer 15 | { 16 | public: 17 | using FinalizerFunc = std::function; 18 | 19 | static void AddFinalizer(FinalizerFunc finalizer); 20 | static void Finalize(); 21 | }; 22 | 23 | template 24 | class Singleton final 25 | { 26 | public: 27 | static T* Get() 28 | { 29 | std::call_once(m_initFlag, Create); 30 | return m_instance; 31 | } 32 | 33 | private: 34 | static void Create() 35 | { 36 | m_instance = new T(); 37 | SingletonFinalizer::AddFinalizer(&Singleton::Destroy); 38 | } 39 | 40 | static void Destroy() 41 | { 42 | delete m_instance; 43 | m_instance = nullptr; 44 | } 45 | 46 | private: 47 | static std::once_flag m_initFlag; 48 | static T* m_instance; 49 | }; 50 | template std::once_flag Singleton::m_initFlag; 51 | template T* Singleton::m_instance = nullptr; 52 | } 53 | 54 | #endif // !SABA_BASE_SINGLETON_H_ 55 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/Time.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #include "Time.h" 7 | 8 | #include 9 | 10 | namespace saba 11 | { 12 | double GetTime() 13 | { 14 | auto now = std::chrono::high_resolution_clock::now(); 15 | return std::chrono::duration(now.time_since_epoch()).count(); 16 | } 17 | 18 | double GetTimeMSec() 19 | { 20 | auto now = std::chrono::high_resolution_clock::now(); 21 | return std::chrono::duration(now.time_since_epoch()).count(); 22 | } 23 | 24 | double GetTimeUSec() 25 | { 26 | auto now = std::chrono::high_resolution_clock::now(); 27 | return std::chrono::duration(now.time_since_epoch()).count(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/Time.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_BASE_TIME_H_ 7 | #define SABA_BASE_TIME_H_ 8 | 9 | namespace saba 10 | { 11 | double GetTime(); 12 | double GetTimeMSec(); 13 | double GetTimeUSec(); 14 | } 15 | 16 | #endif // !SABA_BASE_TIME_H_ 17 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Base/UnicodeUtil.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_BASE_UNICODEUTIL_H_ 7 | #define SABA_BASE_UNICODEUTIL_H_ 8 | 9 | #include 10 | #include 11 | 12 | namespace saba 13 | { 14 | std::wstring ToWString(const std::string& utf8Str); 15 | std::string ToUtf8String(const std::wstring& wStr); 16 | 17 | bool TryToWString(const std::string& utf8Str, std::wstring& wStr); 18 | bool TryToUtf8String(const std::wstring& wStr, std::string& utf8Str); 19 | 20 | bool ConvChU8ToU16(const std::array& u8Ch, std::array& u16Ch); 21 | bool ConvChU8ToU32(const std::array& u8Ch, char32_t& u32Ch); 22 | 23 | bool ConvChU16ToU8(const std::array& u16Ch, std::array& u8Ch); 24 | bool ConvChU16ToU32(const std::array& u16Ch, char32_t& u32Ch); 25 | 26 | bool ConvChU32ToU8(const char32_t u32Ch, std::array& u8Ch); 27 | bool ConvChU32ToU16(const char32_t u32Ch, std::array& u16Ch); 28 | 29 | bool ConvU8ToU16(const std::string& u8Str, std::u16string& u16Str); 30 | bool ConvU8ToU32(const std::string& u8Str, std::u32string& u32Str); 31 | 32 | bool ConvU16ToU8(const std::u16string& u16Str, std::string& u8Str); 33 | bool ConvU16ToU32(const std::u16string& u16Str, std::u32string& u32Str); 34 | 35 | bool ConvU32ToU8(const std::u32string& u32Str, std::string& u8Str); 36 | bool ConvU32ToU16(const std::u32string& u32Str, std::u16string& u16Str); 37 | } 38 | 39 | #endif // !SABA_BASE_UNICODEUTIL_H_ 40 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDCamera.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #include "MMDCamera.h" 7 | 8 | #include 9 | 10 | namespace saba 11 | { 12 | MMDCamera::MMDCamera() 13 | { 14 | m_interest = glm::vec3(0, 10, 0); 15 | m_rotate = glm::vec3(0, 0, 0); 16 | m_distance = 50; 17 | m_fov = glm::radians(30.0f); 18 | } 19 | 20 | MMDLookAtCamera::MMDLookAtCamera(const MMDCamera & cam) 21 | { 22 | glm::mat4 view(1.0f); 23 | view = glm::translate(view, glm::vec3(0, 0, std::abs(cam.m_distance))); 24 | //view = glm::mat4_cast(cam.m_rotate) * view; 25 | //glm::mat4 rot; 26 | auto degree = glm::degrees(cam.m_rotate); 27 | glm::mat4 rot(1.0f); 28 | rot = glm::rotate(rot, cam.m_rotate.y, glm::vec3(0, 1, 0)); 29 | rot = glm::rotate(rot, cam.m_rotate.z, glm::vec3(0, 0, -1)); 30 | rot = glm::rotate(rot, cam.m_rotate.x, glm::vec3(1, 0, 0)); 31 | view = rot * view; 32 | 33 | m_eye = glm::vec3(view[3]) + cam.m_interest; 34 | m_center = glm::mat3(view) * glm::vec3(0, 0, -1) + m_eye; 35 | m_up = glm::mat3(view) * glm::vec3(0, 1, 0); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDCamera.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_MMDCAMERA_H_ 7 | #define SABA_MODEL_MMD_MMDCAMERA_H_ 8 | 9 | #include 10 | #include 11 | 12 | namespace saba 13 | { 14 | struct MMDCamera 15 | { 16 | MMDCamera(); 17 | 18 | glm::vec3 m_interest; 19 | glm::vec3 m_rotate; 20 | float m_distance; 21 | float m_fov; 22 | }; 23 | 24 | struct MMDLookAtCamera 25 | { 26 | explicit MMDLookAtCamera(const MMDCamera& cam); 27 | 28 | glm::vec3 m_center; 29 | glm::vec3 m_eye; 30 | glm::vec3 m_up; 31 | }; 32 | } 33 | 34 | #endif // !SABA_MODEL_MMD_MMDCAMERA_H_ 35 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDFileString.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_MMDFILESTRING_H_ 7 | #define SABA_MODEL_MMD_MMDFILESTRING_H_ 8 | 9 | #include 10 | #include 11 | 12 | #include "SjisToUnicode.h" 13 | 14 | #include 15 | 16 | 17 | namespace saba 18 | { 19 | template 20 | struct MMDFileString 21 | { 22 | MMDFileString() 23 | { 24 | Clear(); 25 | } 26 | 27 | void Clear() 28 | { 29 | for (auto& ch : m_buffer) 30 | { 31 | ch = '\0'; 32 | } 33 | } 34 | 35 | void Set(const char* str) 36 | { 37 | size_t i = 0; 38 | while (i < Size && str[i] != '\0') 39 | { 40 | m_buffer[i] = str[i]; 41 | i++; 42 | } 43 | 44 | for (; i < Size + 1; i++) 45 | { 46 | m_buffer[i] = '\0'; 47 | } 48 | } 49 | 50 | const char* ToCString() const { return m_buffer; } 51 | std::string ToString() const { return std::string(m_buffer); } 52 | //std::wstring ToWString() const { return ConvertSjisToWString(m_buffer); } 53 | std::string ToUtf8String() const; 54 | 55 | char m_buffer[Size + 1]; 56 | }; 57 | 58 | template 59 | bool Read(MMDFileString* str, File& file) 60 | { 61 | return file.Read(str->m_buffer, Size); 62 | } 63 | 64 | template 65 | inline std::string MMDFileString::ToUtf8String() const 66 | { 67 | std::u16string u16Str = saba::ConvertSjisToU16String(m_buffer); 68 | std::string u8Str; 69 | saba::ConvU16ToU8(u16Str, u8Str); 70 | return u8Str; 71 | } 72 | } 73 | 74 | #endif // !SABA_MODEL_MMD_MMDFILESTRING_H_ 75 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDMaterial.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #include "MMDMaterial.h" 7 | 8 | namespace saba 9 | { 10 | MMDMaterial::MMDMaterial() 11 | : m_diffuse(1) 12 | , m_alpha(1) 13 | , m_specular(0) 14 | , m_specularPower(1) 15 | , m_ambient(0.2f) 16 | , m_edgeFlag(0) 17 | , m_edgeSize(0) 18 | , m_edgeColor(0.0f, 0.0f, 0.0f, 1.0f) 19 | , m_spTextureMode(SphereTextureMode::None) 20 | , m_textureMulFactor(1) 21 | , m_spTextureMulFactor(1) 22 | , m_toonTextureMulFactor(1) 23 | , m_textureAddFactor(0) 24 | , m_spTextureAddFactor(0) 25 | , m_toonTextureAddFactor(0) 26 | , m_bothFace(false) 27 | , m_groundShadow(true) 28 | , m_shadowCaster(true) 29 | , m_shadowReceiver(true) 30 | { 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDMaterial.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_MMDMATERIAL_H_ 7 | #define SABA_MODEL_MMD_MMDMATERIAL_H_ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | namespace saba 15 | { 16 | struct MMDMaterial 17 | { 18 | MMDMaterial(); 19 | enum class SphereTextureMode 20 | { 21 | None, 22 | Mul, 23 | Add, 24 | }; 25 | 26 | glm::vec3 m_diffuse; 27 | float m_alpha; 28 | glm::vec3 m_specular; 29 | float m_specularPower; 30 | glm::vec3 m_ambient; 31 | uint8_t m_edgeFlag; 32 | float m_edgeSize; 33 | glm::vec4 m_edgeColor; 34 | std::string m_texture; 35 | std::string m_spTexture; 36 | SphereTextureMode m_spTextureMode; 37 | std::string m_toonTexture; 38 | glm::vec4 m_textureMulFactor; 39 | glm::vec4 m_spTextureMulFactor; 40 | glm::vec4 m_toonTextureMulFactor; 41 | glm::vec4 m_textureAddFactor; 42 | glm::vec4 m_spTextureAddFactor; 43 | glm::vec4 m_toonTextureAddFactor; 44 | bool m_bothFace; 45 | bool m_groundShadow; 46 | bool m_shadowCaster; 47 | bool m_shadowReceiver; 48 | }; 49 | } 50 | 51 | #endif // !SABA_MODEL_MMD_MMDMATERIAL_H_ 52 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDMorph.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #include "MMDMorph.h" 7 | 8 | namespace saba 9 | { 10 | MMDMorph::MMDMorph() 11 | : m_weight(0) 12 | , m_saveAnimWeight(0) 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/MMDMorph.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_MMDMORPH_H 7 | #define SABA_MODEL_MMD_MMDMORPH_H 8 | 9 | #include 10 | 11 | namespace saba 12 | { 13 | class MMDMorph 14 | { 15 | public: 16 | MMDMorph(); 17 | 18 | void SetName(const std::string& name) { m_name = name; } 19 | const std::string& GetName() const { return m_name; } 20 | 21 | void SetWeight(float weight) { m_weight = weight; } 22 | float GetWeight() const { return m_weight; } 23 | 24 | void SaveBaseAnimation() { m_saveAnimWeight = m_weight; } 25 | void LoadBaseAnimation() { m_weight = m_saveAnimWeight; } 26 | void ClearBaseAnimation() { m_saveAnimWeight = 0; } 27 | float GetBaseAnimationWeight() const { return m_saveAnimWeight; } 28 | 29 | private: 30 | std::string m_name; 31 | float m_weight; 32 | float m_saveAnimWeight; 33 | }; 34 | } 35 | 36 | #endif // !SABA_MODEL_MMD_MMDMORPH_H 37 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/SjisToUnicode.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_SJISTOUNICODE_H_ 7 | #define SABA_MODEL_MMD_SJISTOUNICODE_H_ 8 | 9 | #include 10 | 11 | namespace saba 12 | { 13 | char16_t ConvertSjisToU16Char(int ch); 14 | std::u16string ConvertSjisToU16String(const char* sjisCode); 15 | std::u32string ConvertSjisToU32String(const char* sjisCode); 16 | } 17 | 18 | #endif // !SABA_MODEL_MMD_SJISTOUNICODE_H_ 19 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/VMDAnimationCommon.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2019 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_VMDANIMATIONCOMMON_H_ 7 | #define SABA_MODEL_MMD_VMDANIMATIONCOMMON_H_ 8 | 9 | #include 10 | #include 11 | 12 | namespace saba 13 | { 14 | template 15 | typename std::vector::const_iterator FindBoundKey( 16 | const std::vector& keys, 17 | int32_t t, 18 | size_t startIdx 19 | ) { 20 | if (keys.empty() || keys.size() <= startIdx) 21 | { 22 | return keys.end(); 23 | } 24 | 25 | const auto& key0 = keys[startIdx]; 26 | if (key0.m_time <= t) 27 | { 28 | if (startIdx + 1 < keys.size()) 29 | { 30 | const auto& key1 = keys[startIdx + 1]; 31 | if (key1.m_time > t) 32 | { 33 | return keys.begin() + startIdx + 1; 34 | } 35 | } 36 | else 37 | { 38 | return keys.end(); 39 | } 40 | } 41 | else 42 | { 43 | if (startIdx != 0) 44 | { 45 | const auto& key1 = keys[startIdx - 1]; 46 | if (key1.m_time <= t) 47 | { 48 | return keys.begin() + startIdx; 49 | } 50 | } 51 | else 52 | { 53 | return keys.begin(); 54 | } 55 | } 56 | 57 | auto bundIt = std::upper_bound(keys.begin(), keys.end(), t, [](int32_t lhs, const KeyType& rhs) { 58 | return lhs < rhs.m_time; 59 | }); 60 | return bundIt; 61 | } 62 | } 63 | 64 | #endif // !SABA_MODEL_MMD_VMDANIMATIONCOMMON_H_ 65 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/VMDCameraAnimation.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_VMDCAMERAANIMATION_H_ 7 | #define SABA_MODEL_MMD_VMDCAMERAANIMATION_H_ 8 | 9 | #include "MMDCamera.h" 10 | #include "VMDAnimation.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace saba 16 | { 17 | struct VMDCameraAnimationKey 18 | { 19 | int32_t m_time; 20 | glm::vec3 m_interest; 21 | glm::vec3 m_rotate; 22 | float m_distance; 23 | float m_fov; 24 | 25 | VMDBezier m_ixBezier; 26 | VMDBezier m_iyBezier; 27 | VMDBezier m_izBezier; 28 | VMDBezier m_rotateBezier; 29 | VMDBezier m_distanceBezier; 30 | VMDBezier m_fovBezier; 31 | }; 32 | 33 | class VMDCameraController 34 | { 35 | public: 36 | using KeyType = VMDCameraAnimationKey; 37 | 38 | VMDCameraController(); 39 | 40 | void Evaluate(float t); 41 | const MMDCamera& GetCamera() { return m_camera; } 42 | 43 | void AddKey(const KeyType& key) 44 | { 45 | m_keys.push_back(key); 46 | } 47 | void SortKeys(); 48 | 49 | private: 50 | std::vector m_keys; 51 | MMDCamera m_camera; 52 | size_t m_startKeyIndex; 53 | }; 54 | 55 | class VMDCameraAnimation 56 | { 57 | public: 58 | VMDCameraAnimation(); 59 | 60 | bool Create(const VMDFile& vmd); 61 | void Destroy(); 62 | 63 | void Evaluate(float t); 64 | 65 | const MMDCamera& GetCamera() const { return m_camera; } 66 | 67 | private: 68 | using CameraControllerPtr = std::unique_ptr; 69 | 70 | CameraControllerPtr m_cameraController; 71 | 72 | MMDCamera m_camera; 73 | }; 74 | 75 | } 76 | 77 | #endif // !SABA_MODEL_MMD_VMDCAMERAANIMATION_H_ 78 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/Saba/Model/MMD/VPDFile.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016-2017 benikabocha. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #ifndef SABA_MODEL_MMD_VPDFILE_H_ 7 | #define SABA_MODEL_MMD_VPDFILE_H_ 8 | 9 | #include 10 | #include 11 | 12 | #include 13 | #include 14 | 15 | namespace saba 16 | { 17 | struct VPDBone 18 | { 19 | std::string m_boneName; 20 | glm::vec3 m_translate; 21 | glm::quat m_quaternion; 22 | }; 23 | 24 | struct VPDMorph 25 | { 26 | std::string m_morphName; 27 | float m_weight; 28 | }; 29 | 30 | struct VPDFile 31 | { 32 | std::vector m_bones; 33 | std::vector m_morphs; 34 | }; 35 | 36 | bool ReadVPDFile(VPDFile* vpd, const char* filename); 37 | } 38 | 39 | #endif // !SABA_MODEL_MMD_VPDFILE_H_ 40 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/BroadPhaseCollision/b3BroadphaseCallback.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef B3_BROADPHASE_CALLBACK_H 17 | #define B3_BROADPHASE_CALLBACK_H 18 | 19 | #include "Bullet3Common/b3Vector3.h" 20 | struct b3BroadphaseProxy; 21 | 22 | struct b3BroadphaseAabbCallback 23 | { 24 | virtual ~b3BroadphaseAabbCallback() {} 25 | virtual bool process(const b3BroadphaseProxy* proxy) = 0; 26 | }; 27 | 28 | struct b3BroadphaseRayCallback : public b3BroadphaseAabbCallback 29 | { 30 | ///added some cached data to accelerate ray-AABB tests 31 | b3Vector3 m_rayDirectionInverse; 32 | unsigned int m_signs[3]; 33 | b3Scalar m_lambda_max; 34 | 35 | virtual ~b3BroadphaseRayCallback() {} 36 | }; 37 | 38 | #endif //B3_BROADPHASE_CALLBACK_H 39 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/b3Config.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_CONFIG_H 2 | #define B3_CONFIG_H 3 | 4 | struct b3Config 5 | { 6 | int m_maxConvexBodies; 7 | int m_maxConvexShapes; 8 | int m_maxBroadphasePairs; 9 | int m_maxContactCapacity; 10 | int m_compoundPairCapacity; 11 | 12 | int m_maxVerticesPerFace; 13 | int m_maxFacesPerShape; 14 | int m_maxConvexVertices; 15 | int m_maxConvexIndices; 16 | int m_maxConvexUniqueEdges; 17 | 18 | int m_maxCompoundChildShapes; 19 | 20 | int m_maxTriConvexPairCapacity; 21 | 22 | b3Config() 23 | : m_maxConvexBodies(128 * 1024), 24 | m_maxVerticesPerFace(64), 25 | m_maxFacesPerShape(12), 26 | m_maxConvexVertices(8192), 27 | m_maxConvexIndices(81920), 28 | m_maxConvexUniqueEdges(8192), 29 | m_maxCompoundChildShapes(8192), 30 | m_maxTriConvexPairCapacity(256 * 1024) 31 | { 32 | m_maxConvexShapes = m_maxConvexBodies; 33 | m_maxBroadphasePairs = 16 * m_maxConvexBodies; 34 | m_maxContactCapacity = m_maxBroadphasePairs; 35 | m_compoundPairCapacity = 1024 * 1024; 36 | } 37 | }; 38 | 39 | #endif //B3_CONFIG_H 40 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_RAYCAST_INFO_H 3 | #define B3_RAYCAST_INFO_H 4 | 5 | #include "Bullet3Common/b3Vector3.h" 6 | 7 | B3_ATTRIBUTE_ALIGNED16(struct) 8 | b3RayInfo 9 | { 10 | b3Vector3 m_from; 11 | b3Vector3 m_to; 12 | }; 13 | 14 | B3_ATTRIBUTE_ALIGNED16(struct) 15 | b3RayHit 16 | { 17 | b3Scalar m_hitFraction; 18 | int m_hitBody; 19 | int m_hitResult1; 20 | int m_hitResult2; 21 | b3Vector3 m_hitPoint; 22 | b3Vector3 m_hitNormal; 23 | }; 24 | 25 | #endif //B3_RAYCAST_INFO_H 26 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/b3RigidBodyCL.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef B3_RIGID_BODY_CL 17 | #define B3_RIGID_BODY_CL 18 | 19 | #include "Bullet3Common/b3Scalar.h" 20 | #include "Bullet3Common/b3Matrix3x3.h" 21 | #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h" 22 | 23 | inline float b3GetInvMass(const b3RigidBodyData& body) 24 | { 25 | return body.m_invMass; 26 | } 27 | 28 | #endif //B3_RIGID_BODY_CL 29 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/shared/b3BvhSubtreeInfoData.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_BVH_SUBTREE_INFO_DATA_H 3 | #define B3_BVH_SUBTREE_INFO_DATA_H 4 | 5 | typedef struct b3BvhSubtreeInfoData b3BvhSubtreeInfoData_t; 6 | 7 | struct b3BvhSubtreeInfoData 8 | { 9 | //12 bytes 10 | unsigned short int m_quantizedAabbMin[3]; 11 | unsigned short int m_quantizedAabbMax[3]; 12 | //4 bytes, points to the root of the subtree 13 | int m_rootNodeIndex; 14 | //4 bytes 15 | int m_subtreeSize; 16 | int m_padding[3]; 17 | }; 18 | 19 | #endif //B3_BVH_SUBTREE_INFO_DATA_H 20 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_COLLIDABLE_H 3 | #define B3_COLLIDABLE_H 4 | 5 | #include "Bullet3Common/shared/b3Float4.h" 6 | #include "Bullet3Common/shared/b3Quat.h" 7 | 8 | enum b3ShapeTypes 9 | { 10 | SHAPE_HEIGHT_FIELD = 1, 11 | 12 | SHAPE_CONVEX_HULL = 3, 13 | SHAPE_PLANE = 4, 14 | SHAPE_CONCAVE_TRIMESH = 5, 15 | SHAPE_COMPOUND_OF_CONVEX_HULLS = 6, 16 | SHAPE_SPHERE = 7, 17 | MAX_NUM_SHAPE_TYPES, 18 | }; 19 | 20 | typedef struct b3Collidable b3Collidable_t; 21 | 22 | struct b3Collidable 23 | { 24 | union { 25 | int m_numChildShapes; 26 | int m_bvhIndex; 27 | }; 28 | union { 29 | float m_radius; 30 | int m_compoundBvhIndex; 31 | }; 32 | 33 | int m_shapeType; 34 | union { 35 | int m_shapeIndex; 36 | float m_height; 37 | }; 38 | }; 39 | 40 | typedef struct b3GpuChildShape b3GpuChildShape_t; 41 | struct b3GpuChildShape 42 | { 43 | b3Float4 m_childPosition; 44 | b3Quat m_childOrientation; 45 | union { 46 | int m_shapeIndex; //used for SHAPE_COMPOUND_OF_CONVEX_HULLS 47 | int m_capsuleAxis; 48 | }; 49 | union { 50 | float m_radius; //used for childshape of SHAPE_COMPOUND_OF_SPHERES or SHAPE_COMPOUND_OF_CAPSULES 51 | int m_numChildShapes; //used for compound shape 52 | }; 53 | union { 54 | float m_height; //used for childshape of SHAPE_COMPOUND_OF_CAPSULES 55 | int m_collidableShapeIndex; 56 | }; 57 | int m_shapeType; 58 | }; 59 | 60 | struct b3CompoundOverlappingPair 61 | { 62 | int m_bodyIndexA; 63 | int m_bodyIndexB; 64 | // int m_pairType; 65 | int m_childShapeIndexA; 66 | int m_childShapeIndexB; 67 | }; 68 | 69 | #endif //B3_COLLIDABLE_H 70 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/shared/b3Contact4Data.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_CONTACT4DATA_H 2 | #define B3_CONTACT4DATA_H 3 | 4 | #include "Bullet3Common/shared/b3Float4.h" 5 | 6 | typedef struct b3Contact4Data b3Contact4Data_t; 7 | 8 | struct b3Contact4Data 9 | { 10 | b3Float4 m_worldPosB[4]; 11 | // b3Float4 m_localPosA[4]; 12 | // b3Float4 m_localPosB[4]; 13 | b3Float4 m_worldNormalOnB; // w: m_nPoints 14 | unsigned short m_restituitionCoeffCmp; 15 | unsigned short m_frictionCoeffCmp; 16 | int m_batchIdx; 17 | int m_bodyAPtrAndSignBit; //x:m_bodyAPtr, y:m_bodyBPtr 18 | int m_bodyBPtrAndSignBit; 19 | 20 | int m_childIndexA; 21 | int m_childIndexB; 22 | int m_unused1; 23 | int m_unused2; 24 | }; 25 | 26 | inline int b3Contact4Data_getNumPoints(const struct b3Contact4Data* contact) 27 | { 28 | return (int)contact->m_worldNormalOnB.w; 29 | }; 30 | 31 | inline void b3Contact4Data_setNumPoints(struct b3Contact4Data* contact, int numPoints) 32 | { 33 | contact->m_worldNormalOnB.w = (float)numPoints; 34 | }; 35 | 36 | #endif //B3_CONTACT4DATA_H -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/shared/b3ConvexPolyhedronData.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_CONVEX_POLYHEDRON_DATA_H 3 | #define B3_CONVEX_POLYHEDRON_DATA_H 4 | 5 | #include "Bullet3Common/shared/b3Float4.h" 6 | #include "Bullet3Common/shared/b3Quat.h" 7 | 8 | typedef struct b3GpuFace b3GpuFace_t; 9 | struct b3GpuFace 10 | { 11 | b3Float4 m_plane; 12 | int m_indexOffset; 13 | int m_numIndices; 14 | int m_unusedPadding1; 15 | int m_unusedPadding2; 16 | }; 17 | 18 | typedef struct b3ConvexPolyhedronData b3ConvexPolyhedronData_t; 19 | 20 | struct b3ConvexPolyhedronData 21 | { 22 | b3Float4 m_localCenter; 23 | b3Float4 m_extents; 24 | b3Float4 mC; 25 | b3Float4 mE; 26 | 27 | float m_radius; 28 | int m_faceOffset; 29 | int m_numFaces; 30 | int m_numVertices; 31 | 32 | int m_vertexOffset; 33 | int m_uniqueEdgesOffset; 34 | int m_numUniqueEdges; 35 | int m_unused; 36 | }; 37 | 38 | #endif //B3_CONVEX_POLYHEDRON_DATA_H 39 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_RIGIDBODY_DATA_H 2 | #define B3_RIGIDBODY_DATA_H 3 | 4 | #include "Bullet3Common/shared/b3Float4.h" 5 | #include "Bullet3Common/shared/b3Quat.h" 6 | #include "Bullet3Common/shared/b3Mat3x3.h" 7 | 8 | typedef struct b3RigidBodyData b3RigidBodyData_t; 9 | 10 | struct b3RigidBodyData 11 | { 12 | b3Float4 m_pos; 13 | b3Quat m_quat; 14 | b3Float4 m_linVel; 15 | b3Float4 m_angVel; 16 | 17 | int m_collidableIdx; 18 | float m_invMass; 19 | float m_restituitionCoeff; 20 | float m_frictionCoeff; 21 | }; 22 | 23 | typedef struct b3InertiaData b3InertiaData_t; 24 | 25 | struct b3InertiaData 26 | { 27 | b3Mat3x3 m_invInertiaWorld; 28 | b3Mat3x3 m_initInvInertia; 29 | }; 30 | 31 | #endif //B3_RIGIDBODY_DATA_H 32 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/NarrowPhaseCollision/shared/b3UpdateAabbs.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_UPDATE_AABBS_H 2 | #define B3_UPDATE_AABBS_H 3 | 4 | #include "Bullet3Collision/BroadPhaseCollision/shared/b3Aabb.h" 5 | #include "Bullet3Collision/NarrowPhaseCollision/shared/b3Collidable.h" 6 | #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h" 7 | 8 | void b3ComputeWorldAabb(int bodyId, __global const b3RigidBodyData_t* bodies, __global const b3Collidable_t* collidables, __global const b3Aabb_t* localShapeAABB, __global b3Aabb_t* worldAabbs) 9 | { 10 | __global const b3RigidBodyData_t* body = &bodies[bodyId]; 11 | 12 | b3Float4 position = body->m_pos; 13 | b3Quat orientation = body->m_quat; 14 | 15 | int collidableIndex = body->m_collidableIdx; 16 | int shapeIndex = collidables[collidableIndex].m_shapeIndex; 17 | 18 | if (shapeIndex >= 0) 19 | { 20 | b3Aabb_t localAabb = localShapeAABB[collidableIndex]; 21 | b3Aabb_t worldAabb; 22 | 23 | b3Float4 aabbAMinOut, aabbAMaxOut; 24 | float margin = 0.f; 25 | b3TransformAabb2(localAabb.m_minVec, localAabb.m_maxVec, margin, position, orientation, &aabbAMinOut, &aabbAMaxOut); 26 | 27 | worldAabb.m_minVec = aabbAMinOut; 28 | worldAabb.m_minIndices[3] = bodyId; 29 | worldAabb.m_maxVec = aabbAMaxOut; 30 | worldAabb.m_signedMaxIndices[3] = body[bodyId].m_invMass == 0.f ? 0 : 1; 31 | worldAabbs[bodyId] = worldAabb; 32 | } 33 | } 34 | 35 | #endif //B3_UPDATE_AABBS_H 36 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Collision/premake4.lua: -------------------------------------------------------------------------------- 1 | project "Bullet3Collision" 2 | 3 | language "C++" 4 | 5 | kind "StaticLib" 6 | 7 | includedirs {".."} 8 | 9 | if os.is("Linux") then 10 | buildoptions{"-fPIC"} 11 | end 12 | 13 | files { 14 | "**.cpp", 15 | "**.h" 16 | } -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Common/premake4.lua: -------------------------------------------------------------------------------- 1 | project "Bullet3Common" 2 | 3 | language "C++" 4 | 5 | kind "StaticLib" 6 | 7 | if os.is("Linux") then 8 | buildoptions{"-fPIC"} 9 | end 10 | 11 | includedirs {".."} 12 | 13 | files { 14 | "*.cpp", 15 | "*.h" 16 | } 17 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Common/shared/b3Int2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef B3_INT2_H 17 | #define B3_INT2_H 18 | 19 | #ifdef __cplusplus 20 | 21 | struct b3UnsignedInt2 22 | { 23 | union { 24 | struct 25 | { 26 | unsigned int x, y; 27 | }; 28 | struct 29 | { 30 | unsigned int s[2]; 31 | }; 32 | }; 33 | }; 34 | 35 | struct b3Int2 36 | { 37 | union { 38 | struct 39 | { 40 | int x, y; 41 | }; 42 | struct 43 | { 44 | int s[2]; 45 | }; 46 | }; 47 | }; 48 | 49 | inline b3Int2 b3MakeInt2(int x, int y) 50 | { 51 | b3Int2 v; 52 | v.s[0] = x; 53 | v.s[1] = y; 54 | return v; 55 | } 56 | #else 57 | 58 | #define b3UnsignedInt2 uint2 59 | #define b3Int2 int2 60 | #define b3MakeInt2 (int2) 61 | 62 | #endif //__cplusplus 63 | #endif -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Common/shared/b3Int4.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_INT4_H 2 | #define B3_INT4_H 3 | 4 | #ifdef __cplusplus 5 | 6 | #include "Bullet3Common/b3Scalar.h" 7 | 8 | B3_ATTRIBUTE_ALIGNED16(struct) 9 | b3UnsignedInt4 10 | { 11 | B3_DECLARE_ALIGNED_ALLOCATOR(); 12 | 13 | union { 14 | struct 15 | { 16 | unsigned int x, y, z, w; 17 | }; 18 | struct 19 | { 20 | unsigned int s[4]; 21 | }; 22 | }; 23 | }; 24 | 25 | B3_ATTRIBUTE_ALIGNED16(struct) 26 | b3Int4 27 | { 28 | B3_DECLARE_ALIGNED_ALLOCATOR(); 29 | 30 | union { 31 | struct 32 | { 33 | int x, y, z, w; 34 | }; 35 | struct 36 | { 37 | int s[4]; 38 | }; 39 | }; 40 | }; 41 | 42 | B3_FORCE_INLINE b3Int4 b3MakeInt4(int x, int y, int z, int w = 0) 43 | { 44 | b3Int4 v; 45 | v.s[0] = x; 46 | v.s[1] = y; 47 | v.s[2] = z; 48 | v.s[3] = w; 49 | return v; 50 | } 51 | 52 | B3_FORCE_INLINE b3UnsignedInt4 b3MakeUnsignedInt4(unsigned int x, unsigned int y, unsigned int z, unsigned int w = 0) 53 | { 54 | b3UnsignedInt4 v; 55 | v.s[0] = x; 56 | v.s[1] = y; 57 | v.s[2] = z; 58 | v.s[3] = w; 59 | return v; 60 | } 61 | 62 | #else 63 | 64 | #define b3UnsignedInt4 uint4 65 | #define b3Int4 int4 66 | #define b3MakeInt4 (int4) 67 | #define b3MakeUnsignedInt4 (uint4) 68 | 69 | #endif //__cplusplus 70 | 71 | #endif //B3_INT4_H 72 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Common/shared/b3PlatformDefinitions.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_PLATFORM_DEFINITIONS_H 2 | #define B3_PLATFORM_DEFINITIONS_H 3 | 4 | struct MyTest 5 | { 6 | int bla; 7 | }; 8 | 9 | #ifdef __cplusplus 10 | //#define b3ConstArray(a) const b3AlignedObjectArray& 11 | #define b3ConstArray(a) const a * 12 | #define b3AtomicInc(a) ((*a)++) 13 | 14 | inline int b3AtomicAdd(volatile int *p, int val) 15 | { 16 | int oldValue = *p; 17 | int newValue = oldValue + val; 18 | *p = newValue; 19 | return oldValue; 20 | } 21 | 22 | #define __global 23 | 24 | #define B3_STATIC static 25 | #else 26 | //keep B3_LARGE_FLOAT*B3_LARGE_FLOAT < FLT_MAX 27 | #define B3_LARGE_FLOAT 1e18f 28 | #define B3_INFINITY 1e18f 29 | #define b3Assert(a) 30 | #define b3ConstArray(a) __global const a * 31 | #define b3AtomicInc atomic_inc 32 | #define b3AtomicAdd atomic_add 33 | #define b3Fabs fabs 34 | #define b3Sqrt native_sqrt 35 | #define b3Sin native_sin 36 | #define b3Cos native_cos 37 | 38 | #define B3_STATIC 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Dynamics/ConstraintSolver/b3FixedConstraint.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_FIXED_CONSTRAINT_H 3 | #define B3_FIXED_CONSTRAINT_H 4 | 5 | #include "b3TypedConstraint.h" 6 | 7 | B3_ATTRIBUTE_ALIGNED16(class) 8 | b3FixedConstraint : public b3TypedConstraint 9 | { 10 | b3Vector3 m_pivotInA; 11 | b3Vector3 m_pivotInB; 12 | b3Quaternion m_relTargetAB; 13 | 14 | public: 15 | b3FixedConstraint(int rbA, int rbB, const b3Transform& frameInA, const b3Transform& frameInB); 16 | 17 | virtual ~b3FixedConstraint(); 18 | 19 | virtual void getInfo1(b3ConstraintInfo1 * info, const b3RigidBodyData* bodies); 20 | 21 | virtual void getInfo2(b3ConstraintInfo2 * info, const b3RigidBodyData* bodies); 22 | 23 | virtual void setParam(int num, b3Scalar value, int axis = -1) 24 | { 25 | b3Assert(0); 26 | } 27 | virtual b3Scalar getParam(int num, int axis = -1) const 28 | { 29 | b3Assert(0); 30 | return 0.f; 31 | } 32 | }; 33 | 34 | #endif //B3_FIXED_CONSTRAINT_H 35 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Dynamics/premake4.lua: -------------------------------------------------------------------------------- 1 | project "Bullet3Dynamics" 2 | 3 | language "C++" 4 | 5 | kind "StaticLib" 6 | 7 | includedirs { 8 | ".." 9 | } 10 | 11 | if os.is("Linux") then 12 | buildoptions{"-fPIC"} 13 | end 14 | 15 | files { 16 | "**.cpp", 17 | "**.h" 18 | } -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Dynamics/shared/b3ContactConstraint4.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_CONTACT_CONSTRAINT5_H 2 | #define B3_CONTACT_CONSTRAINT5_H 3 | 4 | #include "Bullet3Common/shared/b3Float4.h" 5 | 6 | typedef struct b3ContactConstraint4 b3ContactConstraint4_t; 7 | 8 | struct b3ContactConstraint4 9 | { 10 | b3Float4 m_linear; //normal? 11 | b3Float4 m_worldPos[4]; 12 | b3Float4 m_center; // friction 13 | float m_jacCoeffInv[4]; 14 | float m_b[4]; 15 | float m_appliedRambdaDt[4]; 16 | float m_fJacCoeffInv[2]; // friction 17 | float m_fAppliedRambdaDt[2]; // friction 18 | 19 | unsigned int m_bodyA; 20 | unsigned int m_bodyB; 21 | int m_batchIdx; 22 | unsigned int m_paddings; 23 | }; 24 | 25 | //inline void setFrictionCoeff(float value) { m_linear[3] = value; } 26 | inline float b3GetFrictionCoeff(b3ContactConstraint4_t* constraint) 27 | { 28 | return constraint->m_linear.w; 29 | } 30 | 31 | #endif //B3_CONTACT_CONSTRAINT5_H 32 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Dynamics/shared/b3Inertia.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #ifndef B3_INERTIA_H 4 | #define B3_INERTIA_H 5 | 6 | #include "Bullet3Common/shared/b3Mat3x3.h" 7 | 8 | struct b3Inertia 9 | { 10 | b3Mat3x3 m_invInertiaWorld; 11 | b3Mat3x3 m_initInvInertia; 12 | }; 13 | 14 | #endif //B3_INERTIA_H -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Geometry/premake4.lua: -------------------------------------------------------------------------------- 1 | project "Bullet3Geometry" 2 | 3 | language "C++" 4 | 5 | kind "StaticLib" 6 | 7 | includedirs {".."} 8 | 9 | if os.is("Linux") then 10 | buildoptions{"-fPIC"} 11 | end 12 | 13 | files { 14 | "**.cpp", 15 | "**.h" 16 | } -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/BroadphaseCollision/b3GpuBroadphaseInterface.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_GPU_BROADPHASE_INTERFACE_H 3 | #define B3_GPU_BROADPHASE_INTERFACE_H 4 | 5 | #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h" 6 | #include "Bullet3Common/b3Vector3.h" 7 | #include "b3SapAabb.h" 8 | #include "Bullet3Common/shared/b3Int2.h" 9 | #include "Bullet3Common/shared/b3Int4.h" 10 | #include "Bullet3OpenCL/ParallelPrimitives/b3OpenCLArray.h" 11 | 12 | class b3GpuBroadphaseInterface 13 | { 14 | public: 15 | typedef class b3GpuBroadphaseInterface*(CreateFunc)(cl_context ctx, cl_device_id device, cl_command_queue q); 16 | 17 | virtual ~b3GpuBroadphaseInterface() 18 | { 19 | } 20 | 21 | virtual void createProxy(const b3Vector3& aabbMin, const b3Vector3& aabbMax, int userPtr, int collisionFilterGroup, int collisionFilterMask) = 0; 22 | virtual void createLargeProxy(const b3Vector3& aabbMin, const b3Vector3& aabbMax, int userPtr, int collisionFilterGroup, int collisionFilterMask) = 0; 23 | 24 | virtual void calculateOverlappingPairs(int maxPairs) = 0; 25 | virtual void calculateOverlappingPairsHost(int maxPairs) = 0; 26 | 27 | //call writeAabbsToGpu after done making all changes (createProxy etc) 28 | virtual void writeAabbsToGpu() = 0; 29 | 30 | virtual cl_mem getAabbBufferWS() = 0; 31 | virtual int getNumOverlap() = 0; 32 | virtual cl_mem getOverlappingPairBuffer() = 0; 33 | 34 | virtual b3OpenCLArray& getAllAabbsGPU() = 0; 35 | virtual b3AlignedObjectArray& getAllAabbsCPU() = 0; 36 | 37 | virtual b3OpenCLArray& getOverlappingPairsGPU() = 0; 38 | virtual b3OpenCLArray& getSmallAabbIndicesGPU() = 0; 39 | virtual b3OpenCLArray& getLargeAabbIndicesGPU() = 0; 40 | }; 41 | 42 | #endif //B3_GPU_BROADPHASE_INTERFACE_H 43 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/BroadphaseCollision/b3SapAabb.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_SAP_AABB_H 2 | #define B3_SAP_AABB_H 3 | 4 | #include "Bullet3Common/b3Scalar.h" 5 | #include "Bullet3Collision/BroadPhaseCollision/shared/b3Aabb.h" 6 | 7 | ///just make sure that the b3Aabb is 16-byte aligned 8 | B3_ATTRIBUTE_ALIGNED16(struct) 9 | b3SapAabb : public b3Aabb{ 10 | 11 | }; 12 | 13 | #endif //B3_SAP_AABB_H 14 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/NarrowphaseCollision/b3BvhInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_BVH_INFO_H 2 | #define B3_BVH_INFO_H 3 | 4 | #include "Bullet3Common/b3Vector3.h" 5 | 6 | struct b3BvhInfo 7 | { 8 | b3Vector3 m_aabbMin; 9 | b3Vector3 m_aabbMax; 10 | b3Vector3 m_quantization; 11 | int m_numNodes; 12 | int m_numSubTrees; 13 | int m_nodeOffset; 14 | int m_subTreeOffset; 15 | }; 16 | 17 | #endif //B3_BVH_INFO_H -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/NarrowphaseCollision/b3ConvexPolyhedronCL.h: -------------------------------------------------------------------------------- 1 | #ifndef CONVEX_POLYHEDRON_CL 2 | #define CONVEX_POLYHEDRON_CL 3 | 4 | #include "Bullet3Common/b3Transform.h" 5 | #include "Bullet3Collision/NarrowPhaseCollision/shared/b3ConvexPolyhedronData.h" 6 | 7 | #endif //CONVEX_POLYHEDRON_CL 8 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/NarrowphaseCollision/b3SupportMappings.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_SUPPORT_MAPPINGS_H 3 | #define B3_SUPPORT_MAPPINGS_H 4 | 5 | #include "Bullet3Common/b3Transform.h" 6 | #include "Bullet3Common/b3AlignedObjectArray.h" 7 | #include "b3VectorFloat4.h" 8 | 9 | struct b3GjkPairDetector; 10 | 11 | inline b3Vector3 localGetSupportVertexWithMargin(const float4& supportVec, const struct b3ConvexPolyhedronData* hull, 12 | const b3AlignedObjectArray& verticesA, b3Scalar margin) 13 | { 14 | b3Vector3 supVec = b3MakeVector3(b3Scalar(0.), b3Scalar(0.), b3Scalar(0.)); 15 | b3Scalar maxDot = b3Scalar(-B3_LARGE_FLOAT); 16 | 17 | // Here we take advantage of dot(a, b*c) = dot(a*b, c). Note: This is true mathematically, but not numerically. 18 | if (0 < hull->m_numVertices) 19 | { 20 | const b3Vector3 scaled = supportVec; 21 | int index = (int)scaled.maxDot(&verticesA[hull->m_vertexOffset], hull->m_numVertices, maxDot); 22 | return verticesA[hull->m_vertexOffset + index]; 23 | } 24 | 25 | return supVec; 26 | } 27 | 28 | inline b3Vector3 localGetSupportVertexWithoutMargin(const float4& supportVec, const struct b3ConvexPolyhedronData* hull, 29 | const b3AlignedObjectArray& verticesA) 30 | { 31 | return localGetSupportVertexWithMargin(supportVec, hull, verticesA, 0.f); 32 | } 33 | 34 | #endif //B3_SUPPORT_MAPPINGS_H 35 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/NarrowphaseCollision/b3TriangleCallback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "b3TriangleCallback.h" 17 | 18 | b3TriangleCallback::~b3TriangleCallback() 19 | { 20 | } 21 | 22 | b3InternalTriangleIndexCallback::~b3InternalTriangleIndexCallback() 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/NarrowphaseCollision/b3VectorFloat4.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_VECTOR_FLOAT4_H 2 | #define B3_VECTOR_FLOAT4_H 3 | 4 | #include "Bullet3Common/b3Transform.h" 5 | 6 | //#define cross3(a,b) (a.cross(b)) 7 | #define float4 b3Vector3 8 | //#define make_float4(x,y,z,w) b3Vector4(x,y,z,w) 9 | 10 | #endif //B3_VECTOR_FLOAT4_H 11 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/ParallelPrimitives/b3BufferInfoCL.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_BUFFER_INFO_CL_H 3 | #define B3_BUFFER_INFO_CL_H 4 | 5 | #include "b3OpenCLArray.h" 6 | 7 | struct b3BufferInfoCL 8 | { 9 | //b3BufferInfoCL(){} 10 | 11 | // template 12 | b3BufferInfoCL(cl_mem buff, bool isReadOnly = false) : m_clBuffer(buff), m_isReadOnly(isReadOnly) {} 13 | 14 | cl_mem m_clBuffer; 15 | bool m_isReadOnly; 16 | }; 17 | 18 | #endif //B3_BUFFER_INFO_CL_H 19 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/ParallelPrimitives/b3FillCL.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_FILL_CL_H 2 | #define B3_FILL_CL_H 3 | 4 | #include "b3OpenCLArray.h" 5 | #include "Bullet3Common/b3Scalar.h" 6 | 7 | #include "Bullet3Common/shared/b3Int2.h" 8 | #include "Bullet3Common/shared/b3Int4.h" 9 | 10 | class b3FillCL 11 | { 12 | cl_command_queue m_commandQueue; 13 | 14 | cl_kernel m_fillKernelInt2; 15 | cl_kernel m_fillIntKernel; 16 | cl_kernel m_fillUnsignedIntKernel; 17 | cl_kernel m_fillFloatKernel; 18 | 19 | public: 20 | struct b3ConstData 21 | { 22 | union { 23 | b3Int4 m_data; 24 | b3UnsignedInt4 m_UnsignedData; 25 | }; 26 | int m_offset; 27 | int m_n; 28 | int m_padding[2]; 29 | }; 30 | 31 | protected: 32 | public: 33 | b3FillCL(cl_context ctx, cl_device_id device, cl_command_queue queue); 34 | 35 | virtual ~b3FillCL(); 36 | 37 | void execute(b3OpenCLArray& src, const unsigned int value, int n, int offset = 0); 38 | 39 | void execute(b3OpenCLArray& src, const int value, int n, int offset = 0); 40 | 41 | void execute(b3OpenCLArray& src, const float value, int n, int offset = 0); 42 | 43 | void execute(b3OpenCLArray& src, const b3Int2& value, int n, int offset = 0); 44 | 45 | void executeHost(b3AlignedObjectArray& src, const b3Int2& value, int n, int offset); 46 | 47 | void executeHost(b3AlignedObjectArray& src, const int value, int n, int offset); 48 | 49 | // void execute(b3OpenCLArray& src, const b3Int4& value, int n, int offset = 0); 50 | }; 51 | 52 | #endif //B3_FILL_CL_H 53 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/ParallelPrimitives/b3PrefixScanCL.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_PREFIX_SCAN_CL_H 3 | #define B3_PREFIX_SCAN_CL_H 4 | 5 | #include "b3OpenCLArray.h" 6 | #include "b3BufferInfoCL.h" 7 | #include "Bullet3Common/b3AlignedObjectArray.h" 8 | 9 | class b3PrefixScanCL 10 | { 11 | enum 12 | { 13 | BLOCK_SIZE = 128 14 | }; 15 | 16 | // Option m_option; 17 | 18 | cl_command_queue m_commandQueue; 19 | 20 | cl_kernel m_localScanKernel; 21 | cl_kernel m_blockSumKernel; 22 | cl_kernel m_propagationKernel; 23 | 24 | b3OpenCLArray* m_workBuffer; 25 | 26 | public: 27 | b3PrefixScanCL(cl_context ctx, cl_device_id device, cl_command_queue queue, int size = 0); 28 | 29 | virtual ~b3PrefixScanCL(); 30 | 31 | void execute(b3OpenCLArray& src, b3OpenCLArray& dst, int n, unsigned int* sum = 0); 32 | void executeHost(b3AlignedObjectArray& src, b3AlignedObjectArray& dst, int n, unsigned int* sum = 0); 33 | }; 34 | 35 | #endif //B3_PREFIX_SCAN_CL_H 36 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/ParallelPrimitives/b3PrefixScanFloat4CL.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_PREFIX_SCAN_CL_H 3 | #define B3_PREFIX_SCAN_CL_H 4 | 5 | #include "b3OpenCLArray.h" 6 | #include "b3BufferInfoCL.h" 7 | #include "Bullet3Common/b3AlignedObjectArray.h" 8 | #include "Bullet3Common/b3Vector3.h" 9 | 10 | class b3PrefixScanFloat4CL 11 | { 12 | enum 13 | { 14 | BLOCK_SIZE = 128 15 | }; 16 | 17 | // Option m_option; 18 | 19 | cl_command_queue m_commandQueue; 20 | 21 | cl_kernel m_localScanKernel; 22 | cl_kernel m_blockSumKernel; 23 | cl_kernel m_propagationKernel; 24 | 25 | b3OpenCLArray* m_workBuffer; 26 | 27 | public: 28 | b3PrefixScanFloat4CL(cl_context ctx, cl_device_id device, cl_command_queue queue, int size = 0); 29 | 30 | virtual ~b3PrefixScanFloat4CL(); 31 | 32 | void execute(b3OpenCLArray& src, b3OpenCLArray& dst, int n, b3Vector3* sum = 0); 33 | void executeHost(b3AlignedObjectArray& src, b3AlignedObjectArray& dst, int n, b3Vector3* sum); 34 | }; 35 | 36 | #endif //B3_PREFIX_SCAN_CL_H 37 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/Raycast/b3GpuRaycast.h: -------------------------------------------------------------------------------- 1 | #ifndef B3_GPU_RAYCAST_H 2 | #define B3_GPU_RAYCAST_H 3 | 4 | #include "Bullet3Common/b3Vector3.h" 5 | #include "Bullet3OpenCL/Initialize/b3OpenCLInclude.h" 6 | 7 | #include "Bullet3Common/b3AlignedObjectArray.h" 8 | #include "Bullet3Collision/NarrowPhaseCollision/b3RaycastInfo.h" 9 | 10 | class b3GpuRaycast 11 | { 12 | protected: 13 | struct b3GpuRaycastInternalData* m_data; 14 | 15 | public: 16 | b3GpuRaycast(cl_context ctx, cl_device_id device, cl_command_queue q); 17 | virtual ~b3GpuRaycast(); 18 | 19 | void castRaysHost(const b3AlignedObjectArray& raysIn, b3AlignedObjectArray& hitResults, 20 | int numBodies, const struct b3RigidBodyData* bodies, int numCollidables, const struct b3Collidable* collidables, 21 | const struct b3GpuNarrowPhaseInternalData* narrowphaseData); 22 | 23 | void castRays(const b3AlignedObjectArray& rays, b3AlignedObjectArray& hitResults, 24 | int numBodies, const struct b3RigidBodyData* bodies, int numCollidables, const struct b3Collidable* collidables, 25 | const struct b3GpuNarrowPhaseInternalData* narrowphaseData, class b3GpuBroadphaseInterface* broadphase); 26 | }; 27 | 28 | #endif //B3_GPU_RAYCAST_H 29 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/RigidBody/b3GpuConstraint4.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef B3_CONSTRAINT4_h 3 | #define B3_CONSTRAINT4_h 4 | #include "Bullet3Common/b3Vector3.h" 5 | 6 | #include "Bullet3Dynamics/shared/b3ContactConstraint4.h" 7 | 8 | B3_ATTRIBUTE_ALIGNED16(struct) 9 | b3GpuConstraint4 : public b3ContactConstraint4 10 | { 11 | B3_DECLARE_ALIGNED_ALLOCATOR(); 12 | 13 | inline void setFrictionCoeff(float value) { m_linear[3] = value; } 14 | inline float getFrictionCoeff() const { return m_linear[3]; } 15 | }; 16 | 17 | #endif //B3_CONSTRAINT4_h 18 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/RigidBody/kernels/integrateKernel.cl: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2013 Advanced Micro Devices, Inc. 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | //Originally written by Erwin Coumans 15 | 16 | 17 | #include "Bullet3Collision/NarrowPhaseCollision/shared/b3RigidBodyData.h" 18 | 19 | #include "Bullet3Dynamics/shared/b3IntegrateTransforms.h" 20 | 21 | 22 | 23 | __kernel void 24 | integrateTransformsKernel( __global b3RigidBodyData_t* bodies,const int numNodes, float timeStep, float angularDamping, float4 gravityAcceleration) 25 | { 26 | int nodeID = get_global_id(0); 27 | 28 | if( nodeID < numNodes) 29 | { 30 | integrateSingleTransform(bodies,nodeID, timeStep, angularDamping,gravityAcceleration); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/RigidBody/kernels/updateAabbsKernel.cl: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "Bullet3Collision/NarrowPhaseCollision/shared/b3UpdateAabbs.h" 4 | 5 | 6 | __kernel void initializeGpuAabbsFull( const int numNodes, __global b3RigidBodyData_t* gBodies,__global b3Collidable_t* collidables, __global b3Aabb_t* plocalShapeAABB, __global b3Aabb_t* pAABB) 7 | { 8 | int nodeID = get_global_id(0); 9 | if( nodeID < numNodes ) 10 | { 11 | b3ComputeWorldAabb(nodeID, gBodies, collidables, plocalShapeAABB,pAABB); 12 | } 13 | } 14 | 15 | __kernel void clearOverlappingPairsKernel( __global int4* pairs, int numPairs) 16 | { 17 | int pairId = get_global_id(0); 18 | if( pairId< numPairs ) 19 | { 20 | pairs[pairId].z = 0xffffffff; 21 | } 22 | } -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3OpenCL/premake4.lua: -------------------------------------------------------------------------------- 1 | function createProject(vendor) 2 | hasCL = findOpenCL(vendor) 3 | 4 | if (hasCL) then 5 | 6 | project ("Bullet3OpenCL_" .. vendor) 7 | 8 | initOpenCL(vendor) 9 | 10 | kind "StaticLib" 11 | 12 | if os.is("Linux") then 13 | buildoptions{"-fPIC"} 14 | end 15 | 16 | includedirs { 17 | ".",".." 18 | } 19 | 20 | files { 21 | "**.cpp", 22 | "**.h" 23 | } 24 | 25 | end 26 | end 27 | 28 | createProject("clew") 29 | createProject("AMD") 30 | createProject("Intel") 31 | createProject("NVIDIA") 32 | createProject("Apple") 33 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Serialize/Bullet2FileLoader/b3Common.h: -------------------------------------------------------------------------------- 1 | /* 2 | bParse 3 | Copyright (c) 2006-2009 Charlie C & Erwin Coumans http://gamekit.googlecode.com 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef __BCOMMON_H__ 17 | #define __BCOMMON_H__ 18 | 19 | #include 20 | //#include "bLog.h" 21 | #include "Bullet3Common/b3AlignedObjectArray.h" 22 | #include "Bullet3Common/b3HashMap.h" 23 | 24 | namespace bParse 25 | { 26 | class bMain; 27 | class bFileData; 28 | class bFile; 29 | class bDNA; 30 | 31 | // delete void* undefined 32 | typedef struct bStructHandle 33 | { 34 | int unused; 35 | } bStructHandle; 36 | typedef b3AlignedObjectArray bListBasePtr; 37 | typedef b3HashMap bPtrMap; 38 | } // namespace bParse 39 | 40 | #endif //__BCOMMON_H__ 41 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/Bullet3Serialize/Bullet2FileLoader/premake4.lua: -------------------------------------------------------------------------------- 1 | project "Bullet2FileLoader" 2 | 3 | kind "StaticLib" 4 | 5 | includedirs { 6 | "../../../src" 7 | } 8 | 9 | if os.is("Linux") then 10 | buildoptions{"-fPIC"} 11 | end 12 | 13 | files { 14 | "**.cpp", 15 | "**.h" 16 | } -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btBroadphaseProxy.h" 17 | 18 | BT_NOT_EMPTY_FILE // fix warning LNK4221: This object file does not define any previously undefined public symbols, so it will not be used by any link operation that consumes this library 19 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btCollisionAlgorithm.h" 17 | #include "btDispatcher.h" 18 | 19 | btCollisionAlgorithm::btCollisionAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) 20 | { 21 | m_dispatcher = ci.m_dispatcher1; 22 | } 23 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/BroadphaseCollision/btDispatcher.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btDispatcher.h" 17 | 18 | btDispatcher::~btDispatcher() 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btEmptyCollisionAlgorithm.h" 17 | 18 | btEmptyAlgorithm::btEmptyAlgorithm(const btCollisionAlgorithmConstructionInfo& ci) 19 | : btCollisionAlgorithm(ci) 20 | { 21 | } 22 | 23 | void btEmptyAlgorithm::processCollision(const btCollisionObjectWrapper*, const btCollisionObjectWrapper*, const btDispatcherInfo&, btManifoldResult*) 24 | { 25 | } 26 | 27 | btScalar btEmptyAlgorithm::calculateTimeOfImpact(btCollisionObject*, btCollisionObject*, const btDispatcherInfo&, btManifoldResult*) 28 | { 29 | return btScalar(1.); 30 | } 31 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btCollisionMargin.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_COLLISION_MARGIN_H 17 | #define BT_COLLISION_MARGIN_H 18 | 19 | ///The CONVEX_DISTANCE_MARGIN is a default collision margin for convex collision shapes derived from btConvexInternalShape. 20 | ///This collision margin is used by Gjk and some other algorithms 21 | ///Note that when creating small objects, you need to make sure to set a smaller collision margin, using the 'setMargin' API 22 | #define CONVEX_DISTANCE_MARGIN btScalar(0.04) // btScalar(0.1)//;//btScalar(0.01) 23 | 24 | #endif //BT_COLLISION_MARGIN_H 25 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btConcaveShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btConcaveShape.h" 17 | 18 | btConcaveShape::btConcaveShape() : m_collisionMargin(btScalar(0.)) 19 | { 20 | } 21 | 22 | btConcaveShape::~btConcaveShape() 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btEmptyShape.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btEmptyShape.h" 17 | 18 | #include "btCollisionShape.h" 19 | 20 | btEmptyShape::btEmptyShape() : btConcaveShape() 21 | { 22 | m_shapeType = EMPTY_SHAPE_PROXYTYPE; 23 | } 24 | 25 | btEmptyShape::~btEmptyShape() 26 | { 27 | } 28 | 29 | ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version 30 | void btEmptyShape::getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const 31 | { 32 | btVector3 margin(getMargin(), getMargin(), getMargin()); 33 | 34 | aabbMin = t.getOrigin() - margin; 35 | 36 | aabbMax = t.getOrigin() + margin; 37 | } 38 | 39 | void btEmptyShape::calculateLocalInertia(btScalar, btVector3&) const 40 | { 41 | btAssert(0); 42 | } 43 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btMaterial.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | /// This file was created by Alex Silverman 17 | 18 | #ifndef BT_MATERIAL_H 19 | #define BT_MATERIAL_H 20 | 21 | // Material class to be used by btMultimaterialTriangleMeshShape to store triangle properties 22 | class btMaterial 23 | { 24 | // public members so that materials can change due to world events 25 | public: 26 | btScalar m_friction; 27 | btScalar m_restitution; 28 | int pad[2]; 29 | 30 | btMaterial() {} 31 | btMaterial(btScalar fric, btScalar rest) 32 | { 33 | m_friction = fric; 34 | m_restitution = rest; 35 | } 36 | }; 37 | 38 | #endif // BT_MATERIAL_H 39 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btSdfCollisionShape.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_SDF_COLLISION_SHAPE_H 2 | #define BT_SDF_COLLISION_SHAPE_H 3 | 4 | #include "btConcaveShape.h" 5 | 6 | class btSdfCollisionShape : public btConcaveShape 7 | { 8 | struct btSdfCollisionShapeInternalData* m_data; 9 | 10 | public: 11 | btSdfCollisionShape(); 12 | virtual ~btSdfCollisionShape(); 13 | 14 | bool initializeSDF(const char* sdfData, int sizeInBytes); 15 | 16 | virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const; 17 | virtual void setLocalScaling(const btVector3& scaling); 18 | virtual const btVector3& getLocalScaling() const; 19 | virtual void calculateLocalInertia(btScalar mass, btVector3& inertia) const; 20 | virtual const char* getName() const; 21 | virtual void setMargin(btScalar margin); 22 | virtual btScalar getMargin() const; 23 | 24 | virtual void processAllTriangles(btTriangleCallback* callback, const btVector3& aabbMin, const btVector3& aabbMax) const; 25 | 26 | bool queryPoint(const btVector3& ptInSDF, btScalar& distOut, btVector3& normal); 27 | }; 28 | 29 | #endif //BT_SDF_COLLISION_SHAPE_H 30 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btTriangleBuffer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btTriangleBuffer.h" 17 | 18 | void btTriangleBuffer::processTriangle(btVector3* triangle, int partId, int triangleIndex) 19 | { 20 | btTriangle tri; 21 | tri.m_vertex0 = triangle[0]; 22 | tri.m_vertex1 = triangle[1]; 23 | tri.m_vertex2 = triangle[2]; 24 | tri.m_partId = partId; 25 | tri.m_triangleIndex = triangleIndex; 26 | 27 | m_triangleBuffer.push_back(tri); 28 | } 29 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/CollisionShapes/btTriangleCallback.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btTriangleCallback.h" 17 | 18 | btTriangleCallback::~btTriangleCallback() 19 | { 20 | } 21 | 22 | btInternalTriangleIndexCallback::~btInternalTriangleIndexCallback() 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/Gimpact/btGImpactShape.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/Gimpact/btGImpactShape.h -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/Gimpact/gim_pair.h: -------------------------------------------------------------------------------- 1 | #ifndef GIM_PAIR_H 2 | #define GIM_PAIR_H 3 | 4 | 5 | //! Overlapping pair 6 | struct GIM_PAIR 7 | { 8 | int m_index1; 9 | int m_index2; 10 | GIM_PAIR() 11 | { 12 | } 13 | 14 | GIM_PAIR(const GIM_PAIR& p) 15 | { 16 | m_index1 = p.m_index1; 17 | m_index2 = p.m_index2; 18 | } 19 | 20 | GIM_PAIR(int index1, int index2) 21 | { 22 | m_index1 = index1; 23 | m_index2 = index2; 24 | } 25 | }; 26 | 27 | #endif //GIM_PAIR_H 28 | 29 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/NarrowPhaseCollision/btConvexCast.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btConvexCast.h" 17 | 18 | btConvexCast::~btConvexCast() 19 | { 20 | } 21 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/NarrowPhaseCollision/btGjkCollisionDescription.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2014 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef GJK_COLLISION_DESCRIPTION_H 17 | #define GJK_COLLISION_DESCRIPTION_H 18 | 19 | #include "LinearMath/btVector3.h" 20 | 21 | struct btGjkCollisionDescription 22 | { 23 | btVector3 m_firstDir; 24 | int m_maxGjkIterations; 25 | btScalar m_maximumDistanceSquared; 26 | btScalar m_gjkRelError2; 27 | btGjkCollisionDescription() 28 | : m_firstDir(0, 1, 0), 29 | m_maxGjkIterations(1000), 30 | m_maximumDistanceSquared(1e30f), 31 | m_gjkRelError2(1.0e-6) 32 | { 33 | } 34 | virtual ~btGjkCollisionDescription() 35 | { 36 | } 37 | }; 38 | 39 | #endif //GJK_COLLISION_DESCRIPTION_H 40 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletCollision/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletCollision" 2 | 3 | kind "StaticLib" 4 | if os.is("Linux") then 5 | buildoptions{"-fPIC"} 6 | end 7 | includedirs { 8 | "..", 9 | } 10 | files { 11 | "*.cpp", 12 | "*.h", 13 | "BroadphaseCollision/*.cpp", 14 | "BroadphaseCollision/*.h", 15 | "CollisionDispatch/*.cpp", 16 | "CollisionDispatch/*.h", 17 | "CollisionShapes/*.cpp", 18 | "CollisionShapes/*.h", 19 | "Gimpact/*.cpp", 20 | "Gimpact/*.h", 21 | "NarrowPhaseCollision/*.cpp", 22 | "NarrowPhaseCollision/*.h", 23 | } 24 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/ConstraintSolver/btFixedConstraint.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #include "btFixedConstraint.h" 17 | #include "BulletDynamics/Dynamics/btRigidBody.h" 18 | #include "LinearMath/btTransformUtil.h" 19 | #include 20 | 21 | btFixedConstraint::btFixedConstraint(btRigidBody& rbA, btRigidBody& rbB, const btTransform& frameInA, const btTransform& frameInB) 22 | : btGeneric6DofSpring2Constraint(rbA, rbB, frameInA, frameInB) 23 | { 24 | setAngularLowerLimit(btVector3(0, 0, 0)); 25 | setAngularUpperLimit(btVector3(0, 0, 0)); 26 | setLinearLowerLimit(btVector3(0, 0, 0)); 27 | setLinearUpperLimit(btVector3(0, 0, 0)); 28 | } 29 | 30 | btFixedConstraint::~btFixedConstraint() 31 | { 32 | } 33 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/ConstraintSolver/btFixedConstraint.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_FIXED_CONSTRAINT_H 17 | #define BT_FIXED_CONSTRAINT_H 18 | 19 | #include "btGeneric6DofSpring2Constraint.h" 20 | 21 | ATTRIBUTE_ALIGNED16(class) 22 | btFixedConstraint : public btGeneric6DofSpring2Constraint 23 | { 24 | public: 25 | btFixedConstraint(btRigidBody & rbA, btRigidBody & rbB, const btTransform& frameInA, const btTransform& frameInB); 26 | 27 | virtual ~btFixedConstraint(); 28 | }; 29 | 30 | #endif //BT_FIXED_CONSTRAINT_H 31 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/Dynamics/btActionInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef _BT_ACTION_INTERFACE_H 17 | #define _BT_ACTION_INTERFACE_H 18 | 19 | class btIDebugDraw; 20 | class btCollisionWorld; 21 | 22 | #include "LinearMath/btScalar.h" 23 | #include "btRigidBody.h" 24 | 25 | ///Basic interface to allow actions such as vehicles and characters to be updated inside a btDynamicsWorld 26 | class btActionInterface 27 | { 28 | protected: 29 | static btRigidBody& getFixedBody(); 30 | 31 | public: 32 | virtual ~btActionInterface() 33 | { 34 | } 35 | 36 | virtual void updateAction(btCollisionWorld* collisionWorld, btScalar deltaTimeStep) = 0; 37 | 38 | virtual void debugDraw(btIDebugDraw* debugDrawer) = 0; 39 | }; 40 | 41 | #endif //_BT_ACTION_INTERFACE_H 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/Featherstone/btMultiBodyJointFeedback.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 Google Inc. 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | 15 | #ifndef BT_MULTIBODY_JOINT_FEEDBACK_H 16 | #define BT_MULTIBODY_JOINT_FEEDBACK_H 17 | 18 | #include "LinearMath/btSpatialAlgebra.h" 19 | 20 | struct btMultiBodyJointFeedback 21 | { 22 | btSpatialForceVector m_reactionForces; 23 | }; 24 | 25 | #endif //BT_MULTIBODY_JOINT_FEEDBACK_H 26 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/MLCPSolvers/btMLCPSolverInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2013 Erwin Coumans http://bulletphysics.org 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | ///original version written by Erwin Coumans, October 2013 16 | 17 | #ifndef BT_MLCP_SOLVER_INTERFACE_H 18 | #define BT_MLCP_SOLVER_INTERFACE_H 19 | 20 | #include "LinearMath/btMatrixX.h" 21 | 22 | class btMLCPSolverInterface 23 | { 24 | public: 25 | virtual ~btMLCPSolverInterface() 26 | { 27 | } 28 | 29 | //return true is it solves the problem successfully 30 | virtual bool solveMLCP(const btMatrixXu& A, const btVectorXu& b, btVectorXu& x, const btVectorXu& lo, const btVectorXu& hi, const btAlignedObjectArray& limitDependency, int numIterations, bool useSparsity = true) = 0; 31 | }; 32 | 33 | #endif //BT_MLCP_SOLVER_INTERFACE_H 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/Vehicle/btVehicleRaycaster.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2005 Erwin Coumans http://bulletphysics.org 3 | * 4 | * Permission to use, copy, modify, distribute and sell this software 5 | * and its documentation for any purpose is hereby granted without fee, 6 | * provided that the above copyright notice appear in all copies. 7 | * Erwin Coumans makes no representations about the suitability 8 | * of this software for any purpose. 9 | * It is provided "as is" without express or implied warranty. 10 | */ 11 | #ifndef BT_VEHICLE_RAYCASTER_H 12 | #define BT_VEHICLE_RAYCASTER_H 13 | 14 | #include "LinearMath/btVector3.h" 15 | 16 | /// btVehicleRaycaster is provides interface for between vehicle simulation and raycasting 17 | struct btVehicleRaycaster 18 | { 19 | virtual ~btVehicleRaycaster() 20 | { 21 | } 22 | struct btVehicleRaycasterResult 23 | { 24 | btVehicleRaycasterResult() : m_distFraction(btScalar(-1.)){}; 25 | btVector3 m_hitPointInWorld; 26 | btVector3 m_hitNormalInWorld; 27 | btScalar m_distFraction; 28 | }; 29 | 30 | virtual void* castRay(const btVector3& from, const btVector3& to, btVehicleRaycasterResult& result) = 0; 31 | }; 32 | 33 | #endif //BT_VEHICLE_RAYCASTER_H 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletDynamics/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletDynamics" 2 | kind "StaticLib" 3 | includedirs { 4 | "..", 5 | } 6 | if os.is("Linux") then 7 | buildoptions{"-fPIC"} 8 | end 9 | files { 10 | "Dynamics/*.cpp", 11 | "Dynamics/*.h", 12 | "ConstraintSolver/*.cpp", 13 | "ConstraintSolver/*.h", 14 | "Featherstone/*.cpp", 15 | "Featherstone/*.h", 16 | "MLCPSolvers/*.cpp", 17 | "MLCPSolvers/*.h", 18 | "Vehicle/*.cpp", 19 | "Vehicle/*.h", 20 | "Character/*.cpp", 21 | "Character/*.h" 22 | 23 | } 24 | 25 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletInverseDynamics/IDConfigBuiltin.hpp: -------------------------------------------------------------------------------- 1 | ///@file Configuration for Inverse Dynamics Library without external dependencies 2 | #ifndef INVDYNCONFIG_BUILTIN_HPP_ 3 | #define INVDYNCONFIG_BUILTIN_HPP_ 4 | #define btInverseDynamics btInverseDynamicsBuiltin 5 | #ifdef BT_USE_DOUBLE_PRECISION 6 | // choose double/single precision version 7 | typedef double idScalar; 8 | #else 9 | typedef float idScalar; 10 | #endif 11 | // use std::vector for arrays 12 | #include 13 | // this is to make it work with C++2003, otherwise we could do this 14 | // template 15 | // using idArray = std::vector; 16 | template 17 | struct idArray 18 | { 19 | typedef std::vector type; 20 | }; 21 | typedef std::vector::size_type idArrayIdx; 22 | // default to standard malloc/free 23 | #include 24 | #define idMalloc ::malloc 25 | #define idFree ::free 26 | // currently not aligned at all... 27 | #define ID_DECLARE_ALIGNED_ALLOCATOR() \ 28 | inline void* operator new(std::size_t sizeInBytes) { return idMalloc(sizeInBytes); } \ 29 | inline void operator delete(void* ptr) { idFree(ptr); } \ 30 | inline void* operator new(std::size_t, void* ptr) { return ptr; } \ 31 | inline void operator delete(void*, void*) {} \ 32 | inline void* operator new[](std::size_t sizeInBytes) { return idMalloc(sizeInBytes); } \ 33 | inline void operator delete[](void* ptr) { idFree(ptr); } \ 34 | inline void* operator new[](std::size_t, void* ptr) { return ptr; } \ 35 | inline void operator delete[](void*, void*) {} 36 | 37 | #include "details/IDMatVec.hpp" 38 | #endif 39 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletInverseDynamics/IDConfigEigen.hpp: -------------------------------------------------------------------------------- 1 | ///@file Configuration for Inverse Dynamics Library with Eigen 2 | #ifndef INVDYNCONFIG_EIGEN_HPP_ 3 | #define INVDYNCONFIG_EIGEN_HPP_ 4 | #define btInverseDynamics btInverseDynamicsEigen 5 | #ifdef BT_USE_DOUBLE_PRECISION 6 | // choose double/single precision version 7 | typedef double idScalar; 8 | #else 9 | typedef float idScalar; 10 | #endif 11 | 12 | // use std::vector for arrays 13 | #include 14 | // this is to make it work with C++2003, otherwise we could do this 15 | // template 16 | // using idArray = std::vector; 17 | template 18 | struct idArray 19 | { 20 | typedef std::vector type; 21 | }; 22 | typedef std::vector::size_type idArrayIdx; 23 | // default to standard malloc/free 24 | #include 25 | #define ID_DECLARE_ALIGNED_ALLOCATOR() EIGEN_MAKE_ALIGNED_OPERATOR_NEW 26 | // Note on interfaces: 27 | // Eigen::Matrix has data(), to get c-array storage 28 | // HOWEVER: default storage is column-major! 29 | #define ID_LINEAR_MATH_USE_EIGEN 30 | #include "Eigen/Eigen" 31 | #include "details/IDEigenInterface.hpp" 32 | #endif 33 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletInverseDynamics/IDErrorMessages.hpp: -------------------------------------------------------------------------------- 1 | ///@file error message utility functions 2 | #ifndef IDUTILS_HPP_ 3 | #define IDUTILS_HPP_ 4 | #include 5 | /// name of file being compiled, without leading path components 6 | #define __INVDYN_FILE_WO_DIR__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) 7 | 8 | #if !defined(BT_ID_WO_BULLET) && !defined(BT_USE_INVERSE_DYNAMICS_WITH_BULLET2) 9 | #include "Bullet3Common/b3Logging.h" 10 | #define bt_id_error_message(...) b3Error(__VA_ARGS__) 11 | #define bt_id_warning_message(...) b3Warning(__VA_ARGS__) 12 | #define id_printf(...) b3Printf(__VA_ARGS__) 13 | #else // BT_ID_WO_BULLET 14 | #include 15 | /// print error message with file/line information 16 | #define bt_id_error_message(...) \ 17 | do \ 18 | { \ 19 | fprintf(stderr, "[Error:%s:%d] ", __INVDYN_FILE_WO_DIR__, __LINE__); \ 20 | fprintf(stderr, __VA_ARGS__); \ 21 | } while (0) 22 | /// print warning message with file/line information 23 | #define bt_id_warning_message(...) \ 24 | do \ 25 | { \ 26 | fprintf(stderr, "[Warning:%s:%d] ", __INVDYN_FILE_WO_DIR__, __LINE__); \ 27 | fprintf(stderr, __VA_ARGS__); \ 28 | } while (0) 29 | #define id_printf(...) printf(__VA_ARGS__) 30 | #endif // BT_ID_WO_BULLET 31 | #endif 32 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletInverseDynamics/details/IDEigenInterface.hpp: -------------------------------------------------------------------------------- 1 | #ifndef INVDYNEIGENINTERFACE_HPP_ 2 | #define INVDYNEIGENINTERFACE_HPP_ 3 | #include "../IDConfig.hpp" 4 | namespace btInverseDynamics 5 | { 6 | #define BT_ID_HAVE_MAT3X 7 | 8 | #ifdef BT_USE_DOUBLE_PRECISION 9 | typedef Eigen::Matrix vecx; 10 | typedef Eigen::Matrix vec3; 11 | typedef Eigen::Matrix mat33; 12 | typedef Eigen::Matrix matxx; 13 | typedef Eigen::Matrix mat3x; 14 | #else 15 | typedef Eigen::Matrix vecx; 16 | typedef Eigen::Matrix vec3; 17 | typedef Eigen::Matrix mat33; 18 | typedef Eigen::Matrix matxx; 19 | typedef Eigen::Matrix mat3x; 20 | #endif 21 | 22 | inline void resize(mat3x &m, Eigen::Index size) 23 | { 24 | m.resize(3, size); 25 | m.setZero(); 26 | } 27 | 28 | inline void setMatxxElem(const idArrayIdx row, const idArrayIdx col, const idScalar val, matxx *m) 29 | { 30 | (*m)(row, col) = val; 31 | } 32 | 33 | inline void setMat3xElem(const idArrayIdx row, const idArrayIdx col, const idScalar val, mat3x *m) 34 | { 35 | (*m)(row, col) = val; 36 | } 37 | 38 | } // namespace btInverseDynamics 39 | #endif // INVDYNEIGENINTERFACE_HPP_ 40 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletInverseDynamics/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletInverseDynamics" 2 | 3 | kind "StaticLib" 4 | if os.is("Linux") then 5 | buildoptions{"-fPIC"} 6 | end 7 | includedirs { 8 | "..", 9 | } 10 | files { 11 | "IDMath.cpp", 12 | "MultiBodyTree.cpp", 13 | "details/MultiBodyTreeInitCache.cpp", 14 | "details/MultiBodyTreeImpl.cpp", 15 | } 16 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/BulletSoftBody/premake4.lua: -------------------------------------------------------------------------------- 1 | project "BulletSoftBody" 2 | 3 | kind "StaticLib" 4 | 5 | includedirs { 6 | "..", 7 | } 8 | if os.is("Linux") then 9 | buildoptions{"-fPIC"} 10 | end 11 | files { 12 | "**.cpp", 13 | "**.h" 14 | } 15 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | IF(BUILD_BULLET3) 3 | SUBDIRS( Bullet3OpenCL Bullet3Serialize/Bullet2FileLoader Bullet3Dynamics Bullet3Collision Bullet3Geometry ) 4 | ENDIF(BUILD_BULLET3) 5 | 6 | 7 | SUBDIRS( BulletInverseDynamics BulletSoftBody BulletCollision BulletDynamics LinearMath Bullet3Common) 8 | 9 | 10 | IF(INSTALL_LIBS) 11 | #INSTALL of other files requires CMake 2.6 12 | IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 13 | IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 14 | # Don't actually need to install any common files, the frameworks include everything 15 | ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 16 | INSTALL(FILES btBulletCollisionCommon.h btBulletDynamicsCommon.h DESTINATION ${INCLUDE_INSTALL_DIR}) 17 | ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 18 | ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 19 | ENDIF(INSTALL_LIBS) 20 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/LinearMath/btDefaultMotionState.h: -------------------------------------------------------------------------------- 1 | #ifndef BT_DEFAULT_MOTION_STATE_H 2 | #define BT_DEFAULT_MOTION_STATE_H 3 | 4 | #include "btMotionState.h" 5 | 6 | ///The btDefaultMotionState provides a common implementation to synchronize world transforms with offsets. 7 | ATTRIBUTE_ALIGNED16(struct) 8 | btDefaultMotionState : public btMotionState 9 | { 10 | btTransform m_graphicsWorldTrans; 11 | btTransform m_centerOfMassOffset; 12 | btTransform m_startWorldTrans; 13 | void* m_userPointer; 14 | 15 | BT_DECLARE_ALIGNED_ALLOCATOR(); 16 | 17 | btDefaultMotionState(const btTransform& startTrans = btTransform::getIdentity(), const btTransform& centerOfMassOffset = btTransform::getIdentity()) 18 | : m_graphicsWorldTrans(startTrans), 19 | m_centerOfMassOffset(centerOfMassOffset), 20 | m_startWorldTrans(startTrans), 21 | m_userPointer(0) 22 | 23 | { 24 | } 25 | 26 | ///synchronizes world transform from user to physics 27 | virtual void getWorldTransform(btTransform & centerOfMassWorldTrans) const 28 | { 29 | centerOfMassWorldTrans = m_graphicsWorldTrans * m_centerOfMassOffset.inverse(); 30 | } 31 | 32 | ///synchronizes world transform from physics to user 33 | ///Bullet only calls the update of worldtransform for active objects 34 | virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans) 35 | { 36 | m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset; 37 | } 38 | }; 39 | 40 | #endif //BT_DEFAULT_MOTION_STATE_H 41 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/LinearMath/btMotionState.h: -------------------------------------------------------------------------------- 1 | /* 2 | Bullet Continuous Collision Detection and Physics Library 3 | Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/ 4 | 5 | This software is provided 'as-is', without any express or implied warranty. 6 | In no event will the authors be held liable for any damages arising from the use of this software. 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it freely, 9 | subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 12 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 13 | 3. This notice may not be removed or altered from any source distribution. 14 | */ 15 | 16 | #ifndef BT_MOTIONSTATE_H 17 | #define BT_MOTIONSTATE_H 18 | 19 | #include "btTransform.h" 20 | 21 | ///The btMotionState interface class allows the dynamics world to synchronize and interpolate the updated world transforms with graphics 22 | ///For optimizations, potentially only moving objects get synchronized (using setWorldPosition/setWorldOrientation) 23 | class btMotionState 24 | { 25 | public: 26 | virtual ~btMotionState() 27 | { 28 | } 29 | 30 | virtual void getWorldTransform(btTransform& worldTrans) const = 0; 31 | 32 | //Bullet only calls the update of worldtransform for active objects 33 | virtual void setWorldTransform(const btTransform& worldTrans) = 0; 34 | }; 35 | 36 | #endif //BT_MOTIONSTATE_H 37 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/LinearMath/btRandom.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2003-2006 Gino van den Bergen / Erwin Coumans http://continuousphysics.com/Bullet/ 3 | 4 | This software is provided 'as-is', without any express or implied warranty. 5 | In no event will the authors be held liable for any damages arising from the use of this software. 6 | Permission is granted to anyone to use this software for any purpose, 7 | including commercial applications, and to alter it and redistribute it freely, 8 | subject to the following restrictions: 9 | 10 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 11 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 12 | 3. This notice may not be removed or altered from any source distribution. 13 | */ 14 | 15 | #ifndef BT_GEN_RANDOM_H 16 | #define BT_GEN_RANDOM_H 17 | 18 | #ifdef MT19937 19 | 20 | #include 21 | #include 22 | 23 | #define GEN_RAND_MAX UINT_MAX 24 | 25 | SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { init_genrand(seed); } 26 | SIMD_FORCE_INLINE unsigned int GEN_rand() { return genrand_int32(); } 27 | 28 | #else 29 | 30 | #include 31 | 32 | #define GEN_RAND_MAX RAND_MAX 33 | 34 | SIMD_FORCE_INLINE void GEN_srand(unsigned int seed) { srand(seed); } 35 | SIMD_FORCE_INLINE unsigned int GEN_rand() { return rand(); } 36 | 37 | #endif 38 | 39 | #endif //BT_GEN_RANDOM_H 40 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/LinearMath/premake4.lua: -------------------------------------------------------------------------------- 1 | project "LinearMath" 2 | 3 | kind "StaticLib" 4 | if os.is("Linux") then 5 | buildoptions{"-fPIC"} 6 | end 7 | includedirs { 8 | "..", 9 | } 10 | files { 11 | "*.cpp", 12 | "*.h", 13 | "TaskScheduler/*.cpp", 14 | "TaskScheduler/*.h" 15 | } 16 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/btLinearMathAll.cpp: -------------------------------------------------------------------------------- 1 | #include "LinearMath/btAlignedAllocator.cpp" 2 | #include "LinearMath/btGeometryUtil.cpp" 3 | #include "LinearMath/btSerializer.cpp" 4 | #include "LinearMath/btVector3.cpp" 5 | #include "LinearMath/btConvexHull.cpp" 6 | #include "LinearMath/btPolarDecomposition.cpp" 7 | #include "LinearMath/btSerializer64.cpp" 8 | #include "LinearMath/btConvexHullComputer.cpp" 9 | #include "LinearMath/btQuickprof.cpp" 10 | #include "LinearMath/btThreads.cpp" 11 | #include "LinearMath/btReducedVector.cpp" 12 | #include "LinearMath/TaskScheduler/btTaskScheduler.cpp" 13 | #include "LinearMath/TaskScheduler/btThreadSupportPosix.cpp" 14 | #include "LinearMath/TaskScheduler/btThreadSupportWin32.cpp" 15 | 16 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/Bullet3Common.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/Bullet3Common.lib -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletCollision.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletCollision.lib -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletDynamics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletDynamics.lib -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletInverseDynamics.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletInverseDynamics.lib -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletSoftBody.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/BulletSoftBody.lib -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/LinearMath.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/bullet/lib/LinearMath.lib -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/_fixes.hpp 3 | 4 | #include 5 | 6 | //! Workaround for compatibility with other libraries 7 | #ifdef max 8 | #undef max 9 | #endif 10 | 11 | //! Workaround for compatibility with other libraries 12 | #ifdef min 13 | #undef min 14 | #endif 15 | 16 | //! Workaround for Android 17 | #ifdef isnan 18 | #undef isnan 19 | #endif 20 | 21 | //! Workaround for Android 22 | #ifdef isinf 23 | #undef isinf 24 | #endif 25 | 26 | //! Workaround for Chrone Native Client 27 | #ifdef log2 28 | #undef log2 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | #include 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template ::is_iec559> 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER static bool call(T a, T b) 14 | { 15 | return a == b; 16 | } 17 | }; 18 | 19 | template 20 | struct compute_equal 21 | { 22 | GLM_FUNC_QUALIFIER static bool call(T a, T b) 23 | { 24 | return std::memcmp(&a, &b, sizeof(T)) == 0; 25 | } 26 | }; 27 | }//namespace detail 28 | }//namespace glm 29 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/func_exponential_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_exponential_simd.inl 3 | 4 | #include "../simd/exponential.h" 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | template 12 | struct compute_sqrt<4, float, Q, true> 13 | { 14 | GLM_FUNC_QUALIFIER static vec<4, float, Q> call(vec<4, float, Q> const& v) 15 | { 16 | vec<4, float, Q> Result; 17 | Result.data = _mm_sqrt_ps(v.data); 18 | return Result; 19 | } 20 | }; 21 | 22 | template<> 23 | struct compute_sqrt<4, float, aligned_lowp, true> 24 | { 25 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v) 26 | { 27 | vec<4, float, aligned_lowp> Result; 28 | Result.data = glm_vec4_sqrt_lowp(v.data); 29 | return Result; 30 | } 31 | }; 32 | }//namespace detail 33 | }//namespace glm 34 | 35 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 36 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_packing_simd.inl 3 | 4 | namespace glm{ 5 | namespace detail 6 | { 7 | 8 | }//namespace detail 9 | }//namespace glm 10 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_vector_relational_simd.inl 3 | 4 | namespace glm{ 5 | namespace detail 6 | { 7 | 8 | }//namespace detail 9 | }//namespace glm 10 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_half.hpp 3 | 4 | #pragma once 5 | 6 | #include "setup.hpp" 7 | 8 | namespace glm{ 9 | namespace detail 10 | { 11 | typedef short hdata; 12 | 13 | GLM_FUNC_DECL float toFloat32(hdata value); 14 | GLM_FUNC_DECL hdata toFloat16(float const& value); 15 | 16 | }//namespace detail 17 | }//namespace glm 18 | 19 | #include "type_half.inl" 20 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat.inl 3 | 4 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat4x4_sse2.inl 3 | 4 | namespace glm 5 | { 6 | 7 | }//namespace glm 8 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_vec.inl 3 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/type_vec1.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/glm/detail/type_vec1.hpp -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/ext/vec1.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/glm/ext/vec1.inl -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/ext/vector_relational.inl: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_relational 2 | /// @file glm/ext/vector_relational.inl 3 | 4 | // Dependency: 5 | #include "../vector_relational.hpp" 6 | #include "../common.hpp" 7 | #include "../detail/type_vec.hpp" 8 | 9 | namespace glm 10 | { 11 | template 12 | GLM_FUNC_QUALIFIER bool equal(genType const& x, genType const& y, genType const& epsilon) 13 | { 14 | return abs(x - y) < epsilon; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER vec equal(vec const& x, vec const& y, T const& epsilon) 19 | { 20 | return lessThan(abs(x - y), vec(epsilon)); 21 | } 22 | 23 | template 24 | GLM_FUNC_QUALIFIER vec equal(vec const& x, vec const& y, vec const& epsilon) 25 | { 26 | return lessThan(abs(x - y), epsilon); 27 | } 28 | 29 | template 30 | GLM_FUNC_QUALIFIER bool notEqual(genType const& x, genType const& y, genType const& epsilon) 31 | { 32 | return abs(x - y) >= epsilon; 33 | } 34 | 35 | template 36 | GLM_FUNC_QUALIFIER vec notEqual(vec const& x, vec const& y, T const& epsilon) 37 | { 38 | return greaterThanEqual(abs(x - y), vec(epsilon)); 39 | } 40 | 41 | template 42 | GLM_FUNC_QUALIFIER vec notEqual(vec const& x, vec const& y, vec const& epsilon) 43 | { 44 | return greaterThanEqual(abs(x - y), epsilon); 45 | } 46 | }//namespace glm 47 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/matrix_access.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_access 2 | /// @file glm/gtc/matrix_access.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_matrix_access GLM_GTC_matrix_access 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines functions to access rows or columns of a matrix easily. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../detail/setup.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_matrix_access extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtc_matrix_access 25 | /// @{ 26 | 27 | /// Get a specific row of a matrix. 28 | /// @see gtc_matrix_access 29 | template 30 | GLM_FUNC_DECL typename genType::row_type row( 31 | genType const& m, 32 | length_t index); 33 | 34 | /// Set a specific row to a matrix. 35 | /// @see gtc_matrix_access 36 | template 37 | GLM_FUNC_DECL genType row( 38 | genType const& m, 39 | length_t index, 40 | typename genType::row_type const& x); 41 | 42 | /// Get a specific column of a matrix. 43 | /// @see gtc_matrix_access 44 | template 45 | GLM_FUNC_DECL typename genType::col_type column( 46 | genType const& m, 47 | length_t index); 48 | 49 | /// Set a specific column to a matrix. 50 | /// @see gtc_matrix_access 51 | template 52 | GLM_FUNC_DECL genType column( 53 | genType const& m, 54 | length_t index, 55 | typename genType::col_type const& x); 56 | 57 | /// @} 58 | }//namespace glm 59 | 60 | #include "matrix_access.inl" 61 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/matrix_access.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_access 2 | /// @file glm/gtc/matrix_access.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType row 8 | ( 9 | genType const& m, 10 | length_t index, 11 | typename genType::row_type const& x 12 | ) 13 | { 14 | assert(index >= 0 && index < m[0].length()); 15 | 16 | genType Result = m; 17 | for(length_t i = 0; i < m.length(); ++i) 18 | Result[i][index] = x[i]; 19 | return Result; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER typename genType::row_type row 24 | ( 25 | genType const& m, 26 | length_t index 27 | ) 28 | { 29 | assert(index >= 0 && index < m[0].length()); 30 | 31 | typename genType::row_type Result(0); 32 | for(length_t i = 0; i < m.length(); ++i) 33 | Result[i] = m[i][index]; 34 | return Result; 35 | } 36 | 37 | template 38 | GLM_FUNC_QUALIFIER genType column 39 | ( 40 | genType const& m, 41 | length_t index, 42 | typename genType::col_type const& x 43 | ) 44 | { 45 | assert(index >= 0 && index < m.length()); 46 | 47 | genType Result = m; 48 | Result[index] = x; 49 | return Result; 50 | } 51 | 52 | template 53 | GLM_FUNC_QUALIFIER typename genType::col_type column 54 | ( 55 | genType const& m, 56 | length_t index 57 | ) 58 | { 59 | assert(index >= 0 && index < m.length()); 60 | 61 | return m[index]; 62 | } 63 | }//namespace glm 64 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/matrix_inverse.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_inverse 2 | /// @file glm/gtc/matrix_inverse.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines additional matrix inverting functions. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | #include "../matrix.hpp" 18 | #include "../mat2x2.hpp" 19 | #include "../mat3x3.hpp" 20 | #include "../mat4x4.hpp" 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTC_matrix_inverse extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtc_matrix_inverse 29 | /// @{ 30 | 31 | /// Fast matrix inverse for affine matrix. 32 | /// 33 | /// @param m Input matrix to invert. 34 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate. 35 | /// @see gtc_matrix_inverse 36 | template 37 | GLM_FUNC_DECL genType affineInverse(genType const& m); 38 | 39 | /// Compute the inverse transpose of a matrix. 40 | /// 41 | /// @param m Input matrix to invert transpose. 42 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-qualifier floating point value is highly innacurate. 43 | /// @see gtc_matrix_inverse 44 | template 45 | GLM_FUNC_DECL genType inverseTranspose(genType const& m); 46 | 47 | /// @} 48 | }//namespace glm 49 | 50 | #include "matrix_inverse.inl" 51 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/noise.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_noise 2 | /// @file glm/gtc/noise.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_noise GLM_GTC_noise 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines 2D, 3D and 4D procedural noise functions 12 | /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise": 13 | /// https://github.com/ashima/webgl-noise 14 | /// Following Stefan Gustavson's paper "Simplex noise demystified": 15 | /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf 16 | 17 | #pragma once 18 | 19 | // Dependencies 20 | #include "../detail/setup.hpp" 21 | #include "../detail/qualifier.hpp" 22 | #include "../detail/_noise.hpp" 23 | #include "../geometric.hpp" 24 | #include "../common.hpp" 25 | #include "../vector_relational.hpp" 26 | #include "../vec2.hpp" 27 | #include "../vec3.hpp" 28 | #include "../vec4.hpp" 29 | 30 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 31 | # pragma message("GLM: GLM_GTC_noise extension included") 32 | #endif 33 | 34 | namespace glm 35 | { 36 | /// @addtogroup gtc_noise 37 | /// @{ 38 | 39 | /// Classic perlin noise. 40 | /// @see gtc_noise 41 | template 42 | GLM_FUNC_DECL T perlin( 43 | vec const& p); 44 | 45 | /// Periodic perlin noise. 46 | /// @see gtc_noise 47 | template 48 | GLM_FUNC_DECL T perlin( 49 | vec const& p, 50 | vec const& rep); 51 | 52 | /// Simplex noise. 53 | /// @see gtc_noise 54 | template 55 | GLM_FUNC_DECL T simplex( 56 | vec const& p); 57 | 58 | /// @} 59 | }//namespace glm 60 | 61 | #include "noise.inl" 62 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_swizzle 2 | /// @file glm/gtc/swizzle.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/vec1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_vec1 GLM_GTC_vec1 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Add vec1, ivec1, uvec1 and bvec1 types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../ext/vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_vec1 extension included") 20 | #endif 21 | 22 | #include "vec1.inl" 23 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtc/vec1.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.inl 3 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/closest_point.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_closest_point GLM_GTX_closest_point 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Find the point on a straight line which is the closet of a point. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_closest_point extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_closest_point 29 | /// @{ 30 | 31 | /// Find the point on a straight line which is the closet of a point. 32 | /// @see gtx_closest_point 33 | template 34 | GLM_FUNC_DECL vec<3, T, Q> closestPointOnLine( 35 | vec<3, T, Q> const& point, 36 | vec<3, T, Q> const& a, 37 | vec<3, T, Q> const& b); 38 | 39 | /// 2d lines work as well 40 | template 41 | GLM_FUNC_DECL vec<2, T, Q> closestPointOnLine( 42 | vec<2, T, Q> const& point, 43 | vec<2, T, Q> const& a, 44 | vec<2, T, Q> const& b); 45 | 46 | /// @} 47 | }// namespace glm 48 | 49 | #include "closest_point.inl" 50 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | /// @file glm/gtx/closest_point.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vec<3, T, Q> closestPointOnLine 8 | ( 9 | vec<3, T, Q> const& point, 10 | vec<3, T, Q> const& a, 11 | vec<3, T, Q> const& b 12 | ) 13 | { 14 | T LineLength = distance(a, b); 15 | vec<3, T, Q> Vector = point - a; 16 | vec<3, T, Q> LineDirection = (b - a) / LineLength; 17 | 18 | // Project Vector to LineDirection to get the distance of point from a 19 | T Distance = dot(Vector, LineDirection); 20 | 21 | if(Distance <= T(0)) return a; 22 | if(Distance >= LineLength) return b; 23 | return a + LineDirection * Distance; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine 28 | ( 29 | vec<2, T, Q> const& point, 30 | vec<2, T, Q> const& a, 31 | vec<2, T, Q> const& b 32 | ) 33 | { 34 | T LineLength = distance(a, b); 35 | vec<2, T, Q> Vector = point - a; 36 | vec<2, T, Q> LineDirection = (b - a) / LineLength; 37 | 38 | // Project Vector to LineDirection to get the distance of point from a 39 | T Distance = dot(Vector, LineDirection); 40 | 41 | if(Distance <= T(0)) return a; 42 | if(Distance >= LineLength) return b; 43 | return a + LineDirection * Distance; 44 | } 45 | 46 | }//namespace glm 47 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/color_encoding.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_color_encoding 2 | /// @file glm/gtx/color_encoding.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_color_encoding (dependence) 6 | /// 7 | /// @defgroup gtx_color_encoding GLM_GTX_color_encoding 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// @brief Allow to perform bit operations on integer values 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/qualifier.hpp" 19 | #include "../vec3.hpp" 20 | #include 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTC_color_encoding extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_color_encoding 29 | /// @{ 30 | 31 | /// Convert a linear sRGB color to D65 YUV. 32 | template 33 | GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD65XYZ(vec<3, T, Q> const& ColorLinearSRGB); 34 | 35 | /// Convert a linear sRGB color to D50 YUV. 36 | template 37 | GLM_FUNC_DECL vec<3, T, Q> convertLinearSRGBToD50XYZ(vec<3, T, Q> const& ColorLinearSRGB); 38 | 39 | /// Convert a D65 YUV color to linear sRGB. 40 | template 41 | GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToLinearSRGB(vec<3, T, Q> const& ColorD65XYZ); 42 | 43 | /// Convert a D65 YUV color to D50 YUV. 44 | template 45 | GLM_FUNC_DECL vec<3, T, Q> convertD65XYZToD50XYZ(vec<3, T, Q> const& ColorD65XYZ); 46 | 47 | /// @} 48 | } //namespace glm 49 | 50 | #include "color_encoding.inl" 51 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/extend.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_extend GLM_GTX_extend 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_extend extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_extend 29 | /// @{ 30 | 31 | /// Extends of Length the Origin position using the (Source - Origin) direction. 32 | /// @see gtx_extend 33 | template 34 | GLM_FUNC_DECL genType extend( 35 | genType const& Origin, 36 | genType const& Source, 37 | typename genType::value_type const Length); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "extend.inl" 43 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | /// @file glm/gtx/extend.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType extend 8 | ( 9 | genType const& Origin, 10 | genType const& Source, 11 | genType const& Distance 12 | ) 13 | { 14 | return Origin + (Source - Origin) * Distance; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER vec<2, T, Q> extend 19 | ( 20 | vec<2, T, Q> const& Origin, 21 | vec<2, T, Q> const& Source, 22 | T const& Distance 23 | ) 24 | { 25 | return Origin + (Source - Origin) * Distance; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER vec<3, T, Q> extend 30 | ( 31 | vec<3, T, Q> const& Origin, 32 | vec<3, T, Q> const& Source, 33 | T const& Distance 34 | ) 35 | { 36 | return Origin + (Source - Origin) * Distance; 37 | } 38 | 39 | template 40 | GLM_FUNC_QUALIFIER vec<4, T, Q> extend 41 | ( 42 | vec<4, T, Q> const& Origin, 43 | vec<4, T, Q> const& Source, 44 | T const& Distance 45 | ) 46 | { 47 | return Origin + (Source - Origin) * Distance; 48 | } 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/exterior_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | /// @file glm/gtx/exterior_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_exterior_product (dependence) 6 | /// 7 | /// @defgroup gtx_exterior_product GLM_GTX_exterior_product 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// @brief Allow to perform bit operations on integer values 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/qualifier.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 21 | # pragma message("GLM: GLM_GTX_exterior_product extension included") 22 | #endif 23 | 24 | namespace glm 25 | { 26 | /// @addtogroup gtx_exterior_product 27 | /// @{ 28 | 29 | /// Returns the cross product of x and y. 30 | /// 31 | /// @tparam T Floating-point scalar types 32 | /// @tparam Q Value from qualifier enum 33 | /// 34 | /// @see Exterior product 35 | template 36 | GLM_FUNC_DECL T cross(vec<2, T, Q> const& v, vec<2, T, Q> const& u); 37 | 38 | /// @} 39 | } //namespace glm 40 | 41 | #include "exterior_product.inl" 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/func_geometric.inl 3 | 4 | #include 5 | 6 | namespace glm { 7 | namespace detail 8 | { 9 | template 10 | struct compute_cross_vec2 11 | { 12 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 13 | { 14 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 15 | 16 | return v.x * u.y - u.x * v.y; 17 | } 18 | }; 19 | }//namespace detail 20 | 21 | template 22 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 23 | { 24 | return detail::compute_cross_vec2::value>::call(x, y); 25 | } 26 | }//namespace glm 27 | 28 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | /// @file glm/gtx/float_normalize.inl 3 | 4 | #include 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 10 | { 11 | return vec(v) / static_cast(std::numeric_limits::max()); 12 | } 13 | 14 | }//namespace glm 15 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/functions.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | /// @file glm/gtx/functions.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_quaternion (dependence) 6 | /// 7 | /// @defgroup gtx_functions GLM_GTX_functions 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// List of useful common functions. 13 | 14 | #pragma once 15 | 16 | // Dependencies 17 | #include "../detail/setup.hpp" 18 | #include "../detail/qualifier.hpp" 19 | #include "../detail/type_vec2.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 22 | # pragma message("GLM: GLM_GTX_functions extension included") 23 | #endif 24 | 25 | namespace glm 26 | { 27 | /// @addtogroup gtx_functions 28 | /// @{ 29 | 30 | /// 1D gauss function 31 | /// 32 | /// @see gtc_epsilon 33 | template 34 | GLM_FUNC_DECL T gauss( 35 | T x, 36 | T ExpectedValue, 37 | T StandardDeviation); 38 | 39 | /// 2D gauss function 40 | /// 41 | /// @see gtc_epsilon 42 | template 43 | GLM_FUNC_DECL T gauss( 44 | vec<2, T, Q> const& Coord, 45 | vec<2, T, Q> const& ExpectedValue, 46 | vec<2, T, Q> const& StandardDeviation); 47 | 48 | /// @} 49 | }//namespace glm 50 | 51 | #include "functions.inl" 52 | 53 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | /// @file glm/gtx/functions.inl 3 | 4 | #include "../exponential.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER T gauss 10 | ( 11 | T x, 12 | T ExpectedValue, 13 | T StandardDeviation 14 | ) 15 | { 16 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER T gauss 21 | ( 22 | vec<2, T, Q> const& Coord, 23 | vec<2, T, Q> const& ExpectedValue, 24 | vec<2, T, Q> const& StandardDeviation 25 | ) 26 | { 27 | vec<2, T, Q> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 28 | return exp(-(Squared.x + Squared.y)); 29 | } 30 | }//namespace glm 31 | 32 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/gradient_paint.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | /// @file glm/gtx/gradient_paint.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_optimum_pow (dependence) 6 | /// 7 | /// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Functions that return the color of procedural gradient for specific coordinates. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/optimum_pow.hpp" 19 | 20 | #ifndef GLM_ENABLE_EXPERIMENTAL 21 | # error "GLM: GLM_GTX_gradient_paint is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 22 | #endif 23 | 24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 25 | # pragma message("GLM: GLM_GTX_gradient_paint extension included") 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_gradient_paint 31 | /// @{ 32 | 33 | /// Return a color from a radial gradient. 34 | /// @see - gtx_gradient_paint 35 | template 36 | GLM_FUNC_DECL T radialGradient( 37 | vec<2, T, Q> const& Center, 38 | T const& Radius, 39 | vec<2, T, Q> const& Focal, 40 | vec<2, T, Q> const& Position); 41 | 42 | /// Return a color from a linear gradient. 43 | /// @see - gtx_gradient_paint 44 | template 45 | GLM_FUNC_DECL T linearGradient( 46 | vec<2, T, Q> const& Point0, 47 | vec<2, T, Q> const& Point1, 48 | vec<2, T, Q> const& Position); 49 | 50 | /// @} 51 | }// namespace glm 52 | 53 | #include "gradient_paint.inl" 54 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | /// @file glm/gtx/gradient_paint.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T radialGradient 8 | ( 9 | vec<2, T, Q> const& Center, 10 | T const& Radius, 11 | vec<2, T, Q> const& Focal, 12 | vec<2, T, Q> const& Position 13 | ) 14 | { 15 | vec<2, T, Q> F = Focal - Center; 16 | vec<2, T, Q> D = Position - Focal; 17 | T Radius2 = pow2(Radius); 18 | T Fx2 = pow2(F.x); 19 | T Fy2 = pow2(F.y); 20 | 21 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x)); 22 | T Denominator = Radius2 - (Fx2 + Fy2); 23 | return Numerator / Denominator; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER T linearGradient 28 | ( 29 | vec<2, T, Q> const& Point0, 30 | vec<2, T, Q> const& Point1, 31 | vec<2, T, Q> const& Position 32 | ) 33 | { 34 | vec<2, T, Q> Dist = Point1 - Point0; 35 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 36 | } 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/handed_coordinate_space.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | /// @file glm/gtx/handed_coordinate_space.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// To know if a set of three basis vectors defines a right or left-handed coordinate system. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_handed_coordinate_space is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_handed_coordinate_space 29 | /// @{ 30 | 31 | //! Return if a trihedron right handed or not. 32 | //! From GLM_GTX_handed_coordinate_space extension. 33 | template 34 | GLM_FUNC_DECL bool rightHanded( 35 | vec<3, T, Q> const& tangent, 36 | vec<3, T, Q> const& binormal, 37 | vec<3, T, Q> const& normal); 38 | 39 | //! Return if a trihedron left handed or not. 40 | //! From GLM_GTX_handed_coordinate_space extension. 41 | template 42 | GLM_FUNC_DECL bool leftHanded( 43 | vec<3, T, Q> const& tangent, 44 | vec<3, T, Q> const& binormal, 45 | vec<3, T, Q> const& normal); 46 | 47 | /// @} 48 | }// namespace glm 49 | 50 | #include "handed_coordinate_space.inl" 51 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | /// @file glm/gtx/handed_coordinate_space.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER bool rightHanded 8 | ( 9 | vec<3, T, Q> const& tangent, 10 | vec<3, T, Q> const& binormal, 11 | vec<3, T, Q> const& normal 12 | ) 13 | { 14 | return dot(cross(normal, tangent), binormal) > T(0); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER bool leftHanded 19 | ( 20 | vec<3, T, Q> const& tangent, 21 | vec<3, T, Q> const& binormal, 22 | vec<3, T, Q> const& normal 23 | ) 24 | { 25 | return dot(cross(normal, tangent), binormal) < T(0); 26 | } 27 | }//namespace glm 28 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/log_base.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_log_base GLM_GTX_log_base 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Logarithm for any base. base can be a vector or a scalar. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_log_base is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_log_base extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_log_base 29 | /// @{ 30 | 31 | /// Logarithm for any base. 32 | /// From GLM_GTX_log_base. 33 | template 34 | GLM_FUNC_DECL genType log( 35 | genType const& x, 36 | genType const& base); 37 | 38 | /// Logarithm for any base. 39 | /// From GLM_GTX_log_base. 40 | template 41 | GLM_FUNC_DECL vec sign( 42 | vec const& x, 43 | vec const& base); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "log_base.inl" 49 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | /// @file glm/gtx/log_base.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 8 | { 9 | assert(!detail::compute_equal::call(x, static_cast(0))); 10 | return glm::log(x) / glm::log(base); 11 | } 12 | 13 | template 14 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 15 | { 16 | return glm::log(x) / glm::log(base); 17 | } 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/matrix_cross_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Build cross product matrices 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_matrix_cross_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_matrix_cross_product 30 | /// @{ 31 | 32 | //! Build a cross product matrix. 33 | //! From GLM_GTX_matrix_cross_product extension. 34 | template 35 | GLM_FUNC_DECL mat<3, 3, T, Q> matrixCross3( 36 | vec<3, T, Q> const& x); 37 | 38 | //! Build a cross product matrix. 39 | //! From GLM_GTX_matrix_cross_product extension. 40 | template 41 | GLM_FUNC_DECL mat<4, 4, T, Q> matrixCross4( 42 | vec<3, T, Q> const& x); 43 | 44 | /// @} 45 | }//namespace glm 46 | 47 | #include "matrix_cross_product.inl" 48 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | /// @file glm/gtx/matrix_cross_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> matrixCross3 8 | ( 9 | vec<3, T, Q> const& x 10 | ) 11 | { 12 | mat<3, 3, T, Q> Result(T(0)); 13 | Result[0][1] = x.z; 14 | Result[1][0] = -x.z; 15 | Result[0][2] = -x.y; 16 | Result[2][0] = x.y; 17 | Result[1][2] = x.x; 18 | Result[2][1] = -x.x; 19 | return Result; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> matrixCross4 24 | ( 25 | vec<3, T, Q> const& x 26 | ) 27 | { 28 | mat<4, 4, T, Q> Result(T(0)); 29 | Result[0][1] = x.z; 30 | Result[1][0] = -x.z; 31 | Result[0][2] = -x.y; 32 | Result[2][0] = x.y; 33 | Result[1][2] = x.x; 34 | Result[2][1] = -x.x; 35 | return Result; 36 | } 37 | 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/matrix_decompose.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_decompose 2 | /// @file glm/gtx/matrix_decompose.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Decomposes a model matrix to translations, rotation and scale components 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../mat4x4.hpp" 17 | #include "../vec3.hpp" 18 | #include "../vec4.hpp" 19 | #include "../geometric.hpp" 20 | #include "../gtc/quaternion.hpp" 21 | #include "../gtc/matrix_transform.hpp" 22 | 23 | #ifndef GLM_ENABLE_EXPERIMENTAL 24 | # error "GLM: GLM_GTX_matrix_decompose is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 25 | #endif 26 | 27 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 28 | # pragma message("GLM: GLM_GTX_matrix_decompose extension included") 29 | #endif 30 | 31 | namespace glm 32 | { 33 | /// @addtogroup gtx_matrix_decompose 34 | /// @{ 35 | 36 | /// Decomposes a model matrix to translations, rotation and scale components 37 | /// @see gtx_matrix_decompose 38 | template 39 | GLM_FUNC_DECL bool decompose( 40 | mat<4, 4, T, Q> const& modelMatrix, 41 | vec<3, T, Q> & scale, tquat & orientation, vec<3, T, Q> & translation, vec<3, T, Q> & skew, vec<4, T, Q> & perspective); 42 | 43 | /// @} 44 | }//namespace glm 45 | 46 | #include "matrix_decompose.inl" 47 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/matrix_factorisation.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/matrix_factorisation.inl -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/matrix_transform_2d.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_transform_2d 2 | /// @file glm/gtc/matrix_transform_2d.inl 3 | /// @author Miguel Ángel Pérez Martínez 4 | 5 | #include "../trigonometric.hpp" 6 | 7 | namespace glm 8 | { 9 | 10 | template 11 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> translate( 12 | mat<3, 3, T, Q> const& m, 13 | vec<2, T, Q> const& v) 14 | { 15 | mat<3, 3, T, Q> Result(m); 16 | Result[2] = m[0] * v[0] + m[1] * v[1] + m[2]; 17 | return Result; 18 | } 19 | 20 | 21 | template 22 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> rotate( 23 | mat<3, 3, T, Q> const& m, 24 | T angle) 25 | { 26 | T const a = angle; 27 | T const c = cos(a); 28 | T const s = sin(a); 29 | 30 | mat<3, 3, T, Q> Result; 31 | Result[0] = m[0] * c + m[1] * s; 32 | Result[1] = m[0] * -s + m[1] * c; 33 | Result[2] = m[2]; 34 | return Result; 35 | } 36 | 37 | template 38 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> scale( 39 | mat<3, 3, T, Q> const& m, 40 | vec<2, T, Q> const& v) 41 | { 42 | mat<3, 3, T, Q> Result; 43 | Result[0] = m[0] * v[0]; 44 | Result[1] = m[1] * v[1]; 45 | Result[2] = m[2]; 46 | return Result; 47 | } 48 | 49 | template 50 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> shearX( 51 | mat<3, 3, T, Q> const& m, 52 | T y) 53 | { 54 | mat<3, 3, T, Q> Result(1); 55 | Result[0][1] = y; 56 | return m * Result; 57 | } 58 | 59 | template 60 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> shearY( 61 | mat<3, 3, T, Q> const& m, 62 | T x) 63 | { 64 | mat<3, 3, T, Q> Result(1); 65 | Result[1][0] = x; 66 | return m * Result; 67 | } 68 | 69 | }//namespace glm 70 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Mixed product of 3 vectors. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_mixed_product is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_mixed_product 29 | /// @{ 30 | 31 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 32 | template 33 | GLM_FUNC_DECL T mixedProduct( 34 | vec<3, T, Q> const& v1, 35 | vec<3, T, Q> const& v2, 36 | vec<3, T, Q> const& v3); 37 | 38 | /// @} 39 | }// namespace glm 40 | 41 | #include "mixed_product.inl" 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T mixedProduct 8 | ( 9 | vec<3, T, Q> const& v1, 10 | vec<3, T, Q> const& v2, 11 | vec<3, T, Q> const& v3 12 | ) 13 | { 14 | return dot(cross(v1, v2), v3); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Compute the normal of a triangle. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_normal is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_normal extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_normal 30 | /// @{ 31 | 32 | /// Computes triangle normal from triangle points. 33 | /// 34 | /// @see gtx_normal 35 | template 36 | GLM_FUNC_DECL vec<3, T, Q> triangleNormal(vec<3, T, Q> const& p1, vec<3, T, Q> const& p2, vec<3, T, Q> const& p3); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "normal.inl" 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 8 | ( 9 | vec<3, T, Q> const& p1, 10 | vec<3, T, Q> const& p2, 11 | vec<3, T, Q> const& p3 12 | ) 13 | { 14 | return normalize(cross(p1 - p2, p1 - p3)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/normalize_dot.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | /// @file glm/gtx/normalize_dot.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_fast_square_root (dependence) 6 | /// 7 | /// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Dot product of vectors that need to be normalize with a single square root. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../gtx/fast_square_root.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_normalize_dot is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_normalize_dot extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_normalize_dot 30 | /// @{ 31 | 32 | /// Normalize parameters and returns the dot product of x and y. 33 | /// It's faster that dot(normalize(x), normalize(y)). 34 | /// 35 | /// @see gtx_normalize_dot extension. 36 | template 37 | GLM_FUNC_DECL T normalizeDot(vec const& x, vec const& y); 38 | 39 | /// Normalize parameters and returns the dot product of x and y. 40 | /// Faster that dot(fastNormalize(x), fastNormalize(y)). 41 | /// 42 | /// @see gtx_normalize_dot extension. 43 | template 44 | GLM_FUNC_DECL T fastNormalizeDot(vec const& x, vec const& y); 45 | 46 | /// @} 47 | }//namespace glm 48 | 49 | #include "normalize_dot.inl" 50 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | /// @file glm/gtx/normalize_dot.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 8 | { 9 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 14 | { 15 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 16 | } 17 | }//namespace glm 18 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | /// @file glm/gtx/number_precision.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/optimum_pow.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Integer exponentiation of power functions. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_optimum_pow is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_optimum_pow extension included") 24 | #endif 25 | 26 | namespace glm{ 27 | namespace gtx 28 | { 29 | /// @addtogroup gtx_optimum_pow 30 | /// @{ 31 | 32 | /// Returns x raised to the power of 2. 33 | /// 34 | /// @see gtx_optimum_pow 35 | template 36 | GLM_FUNC_DECL genType pow2(genType const& x); 37 | 38 | /// Returns x raised to the power of 3. 39 | /// 40 | /// @see gtx_optimum_pow 41 | template 42 | GLM_FUNC_DECL genType pow3(genType const& x); 43 | 44 | /// Returns x raised to the power of 4. 45 | /// 46 | /// @see gtx_optimum_pow 47 | template 48 | GLM_FUNC_DECL genType pow4(genType const& x); 49 | 50 | /// @} 51 | }//namespace gtx 52 | }//namespace glm 53 | 54 | #include "optimum_pow.inl" 55 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 8 | { 9 | return x * x; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 14 | { 15 | return x * x * x; 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 20 | { 21 | return (x * x) * (x * x); 22 | } 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/orthonormalize.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Orthonormalize matrices. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../vec3.hpp" 18 | #include "../mat3x3.hpp" 19 | #include "../geometric.hpp" 20 | 21 | #ifndef GLM_ENABLE_EXPERIMENTAL 22 | # error "GLM: GLM_GTX_orthonormalize is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 23 | #endif 24 | 25 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_GTX_orthonormalize extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup gtx_orthonormalize 32 | /// @{ 33 | 34 | /// Returns the orthonormalized matrix of m. 35 | /// 36 | /// @see gtx_orthonormalize 37 | template 38 | GLM_FUNC_DECL mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m); 39 | 40 | /// Orthonormalizes x according y. 41 | /// 42 | /// @see gtx_orthonormalize 43 | template 44 | GLM_FUNC_DECL vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y); 45 | 46 | /// @} 47 | }//namespace glm 48 | 49 | #include "orthonormalize.inl" 50 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 8 | { 9 | mat<3, 3, T, Q> r = m; 10 | 11 | r[0] = normalize(r[0]); 12 | 13 | T d0 = dot(r[0], r[1]); 14 | r[1] -= r[0] * d0; 15 | r[1] = normalize(r[1]); 16 | 17 | T d1 = dot(r[1], r[2]); 18 | d0 = dot(r[0], r[2]); 19 | r[2] -= r[0] * d0 + r[1] * d1; 20 | r[2] = normalize(r[2]); 21 | 22 | return r; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 27 | { 28 | return normalize(x - y * dot(y, x)); 29 | } 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// Include to use the features of this extension. 11 | /// 12 | /// Perpendicular of a vector from other one 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #ifndef GLM_ENABLE_EXPERIMENTAL 21 | # error "GLM: GLM_GTX_perpendicular is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 22 | #endif 23 | 24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 25 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_perpendicular 31 | /// @{ 32 | 33 | //! Projects x a perpendicular axis of Normal. 34 | //! From GLM_GTX_perpendicular extension. 35 | template 36 | GLM_FUNC_DECL genType perp(genType const& x, genType const& Normal); 37 | 38 | /// @} 39 | }//namespace glm 40 | 41 | #include "perpendicular.inl" 42 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 8 | { 9 | return x - proj(x, Normal); 10 | } 11 | }//namespace glm 12 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/polar_coordinates.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Conversion from Euclidean space to polar space and revert. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_polar_coordinates is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_polar_coordinates extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_polar_coordinates 29 | /// @{ 30 | 31 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. 32 | /// 33 | /// @see gtx_polar_coordinates 34 | template 35 | GLM_FUNC_DECL vec<3, T, Q> polar( 36 | vec<3, T, Q> const& euclidean); 37 | 38 | /// Convert Polar to Euclidean coordinates. 39 | /// 40 | /// @see gtx_polar_coordinates 41 | template 42 | GLM_FUNC_DECL vec<3, T, Q> euclidean( 43 | vec<2, T, Q> const& polar); 44 | 45 | /// @} 46 | }//namespace glm 47 | 48 | #include "polar_coordinates.inl" 49 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vec<3, T, Q> polar 8 | ( 9 | vec<3, T, Q> const& euclidean 10 | ) 11 | { 12 | T const Length(length(euclidean)); 13 | vec<3, T, Q> const tmp(euclidean / Length); 14 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 15 | 16 | return vec<3, T, Q>( 17 | asin(tmp.y), // latitude 18 | atan(tmp.x, tmp.z), // longitude 19 | xz_dist); // xz distance 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER vec<3, T, Q> euclidean 24 | ( 25 | vec<2, T, Q> const& polar 26 | ) 27 | { 28 | T const latitude(polar.x); 29 | T const longitude(polar.y); 30 | 31 | return vec<3, T, Q>( 32 | cos(latitude) * sin(longitude), 33 | sin(latitude), 34 | cos(latitude) * cos(longitude)); 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_projection is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_projection extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_projection 29 | /// @{ 30 | 31 | /// Projects x on Normal. 32 | /// 33 | /// @see gtx_projection 34 | template 35 | GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal); 36 | 37 | /// @} 38 | }//namespace glm 39 | 40 | #include "projection.inl" 41 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 8 | { 9 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 10 | } 11 | }//namespace glm 12 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Projection of a vector to other one 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | #include "../detail/type_int.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_raw_data is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_raw_data extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_raw_data 30 | /// @{ 31 | 32 | //! Type for byte numbers. 33 | //! From GLM_GTX_raw_data extension. 34 | typedef detail::uint8 byte; 35 | 36 | //! Type for word numbers. 37 | //! From GLM_GTX_raw_data extension. 38 | typedef detail::uint16 word; 39 | 40 | //! Type for dword numbers. 41 | //! From GLM_GTX_raw_data extension. 42 | typedef detail::uint32 dword; 43 | 44 | //! Type for qword numbers. 45 | //! From GLM_GTX_raw_data extension. 46 | typedef detail::uint64 qword; 47 | 48 | /// @} 49 | }// namespace glm 50 | 51 | #include "raw_data.inl" 52 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.inl 3 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Extend a position from a source to a position at a defined length. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | 18 | #ifndef GLM_ENABLE_EXPERIMENTAL 19 | # error "GLM: GLM_GTX_extend is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 20 | #endif 21 | 22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 23 | # pragma message("GLM: GLM_GTX_extend extension included") 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_scalar_relational 29 | /// @{ 30 | 31 | 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "scalar_relational.inl" 37 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER bool lessThan 8 | ( 9 | T const& x, 10 | T const& y 11 | ) 12 | { 13 | return x < y; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool lessThanEqual 18 | ( 19 | T const& x, 20 | T const& y 21 | ) 22 | { 23 | return x <= y; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER bool greaterThan 28 | ( 29 | T const& x, 30 | T const& y 31 | ) 32 | { 33 | return x > y; 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER bool greaterThanEqual 38 | ( 39 | T const& x, 40 | T const& y 41 | ) 42 | { 43 | return x >= y; 44 | } 45 | 46 | template 47 | GLM_FUNC_QUALIFIER bool equal 48 | ( 49 | T const& x, 50 | T const& y 51 | ) 52 | { 53 | return detail::compute_equal::call(x, y); 54 | } 55 | 56 | template 57 | GLM_FUNC_QUALIFIER bool notEqual 58 | ( 59 | T const& x, 60 | T const& y 61 | ) 62 | { 63 | return !detail::compute_equal::call(x, y); 64 | } 65 | 66 | GLM_FUNC_QUALIFIER bool any 67 | ( 68 | bool const& x 69 | ) 70 | { 71 | return x; 72 | } 73 | 74 | GLM_FUNC_QUALIFIER bool all 75 | ( 76 | bool const& x 77 | ) 78 | { 79 | return x; 80 | } 81 | 82 | GLM_FUNC_QUALIFIER bool not_ 83 | ( 84 | bool const& x 85 | ) 86 | { 87 | return !x; 88 | } 89 | }//namespace glm 90 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | /// @file glm/gtx/std_based_type.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/string_cast.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_string_cast 2 | /// @file glm/gtx/string_cast.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_integer (dependence) 6 | /// @see gtx_quaternion (dependence) 7 | /// 8 | /// @defgroup gtx_string_cast GLM_GTX_string_cast 9 | /// @ingroup gtx 10 | /// 11 | /// Include to use the features of this extension. 12 | /// 13 | /// Setup strings for GLM type values 14 | /// 15 | /// This extension is not supported with CUDA 16 | 17 | #pragma once 18 | 19 | // Dependency: 20 | #include "../glm.hpp" 21 | #include "../gtc/type_precision.hpp" 22 | #include "../gtc/quaternion.hpp" 23 | #include "../gtx/dual_quaternion.hpp" 24 | #include 25 | #include 26 | 27 | #ifndef GLM_ENABLE_EXPERIMENTAL 28 | # error "GLM: GLM_GTX_string_cast is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 29 | #endif 30 | 31 | #if(GLM_COMPILER & GLM_COMPILER_CUDA) 32 | # error "GLM_GTX_string_cast is not supported on CUDA compiler" 33 | #endif 34 | 35 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 36 | # pragma message("GLM: GLM_GTX_string_cast extension included") 37 | #endif 38 | 39 | namespace glm 40 | { 41 | /// @addtogroup gtx_string_cast 42 | /// @{ 43 | 44 | /// Create a string from a GLM vector or matrix typed variable. 45 | /// @see gtx_string_cast extension. 46 | template 47 | GLM_FUNC_DECL std::string to_string(genType const& x); 48 | 49 | /// @} 50 | }//namespace glm 51 | 52 | #include "string_cast.inl" 53 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/texture.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | /// @file glm/gtx/texture.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_texture GLM_GTX_texture 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Wrapping mode of texture coordinates. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | #include "../gtc/integer.hpp" 18 | #include "../gtx/component_wise.hpp" 19 | 20 | #ifndef GLM_ENABLE_EXPERIMENTAL 21 | # error "GLM: GLM_GTX_texture is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 22 | #endif 23 | 24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 25 | # pragma message("GLM: GLM_GTX_texture extension included") 26 | #endif 27 | 28 | namespace glm 29 | { 30 | /// @addtogroup gtx_texture 31 | /// @{ 32 | 33 | /// Compute the number of mipmaps levels necessary to create a mipmap complete texture 34 | /// 35 | /// @param Extent Extent of the texture base level mipmap 36 | /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector 37 | /// @tparam T Floating-point or signed integer scalar types 38 | /// @tparam Q Value from qualifier enum 39 | template 40 | T levels(vec const& Extent); 41 | 42 | /// @} 43 | }// namespace glm 44 | 45 | #include "texture.inl" 46 | 47 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | /// @file glm/gtx/texture.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | inline T levels(vec const& Extent) 8 | { 9 | return glm::log2(compMax(Extent)) + static_cast(1); 10 | } 11 | 12 | template 13 | inline T levels(T Extent) 14 | { 15 | return vec<1, T, defaultp>(Extent).x; 16 | } 17 | }//namespace glm 18 | 19 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | /// @file glm/gtx/transform.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 8 | { 9 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 14 | { 15 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 20 | { 21 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 22 | } 23 | 24 | }//namespace glm 25 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | /// @file glm/gtc/type_aligned.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/vector_angle.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_vector_angle 2 | /// @file glm/gtx/vector_angle.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType angle 8 | ( 9 | genType const& x, 10 | genType const& y 11 | ) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'angle' only accept floating-point inputs"); 14 | return acos(clamp(dot(x, y), genType(-1), genType(1))); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER T angle(vec const& x, vec const& y) 19 | { 20 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'angle' only accept floating-point inputs"); 21 | return acos(clamp(dot(x, y), T(-1), T(1))); 22 | } 23 | 24 | //! \todo epsilon is hard coded to 0.01 25 | template 26 | GLM_FUNC_QUALIFIER T orientedAngle(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 27 | { 28 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); 29 | T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); 30 | 31 | if(all(epsilonEqual(y, glm::rotate(x, Angle), T(0.0001)))) 32 | return Angle; 33 | else 34 | return -Angle; 35 | } 36 | 37 | template 38 | GLM_FUNC_QUALIFIER T orientedAngle(vec<3, T, Q> const& x, vec<3, T, Q> const& y, vec<3, T, Q> const& ref) 39 | { 40 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'orientedAngle' only accept floating-point inputs"); 41 | 42 | T const Angle(acos(clamp(dot(x, y), T(-1), T(1)))); 43 | return mix(Angle, -Angle, dot(ref, cross(x, y)) < T(0)); 44 | } 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/gtx/wrap.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | /// @file glm/gtx/wrap.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_wrap GLM_GTX_wrap 7 | /// @ingroup gtx 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Wrapping mode of texture coordinates. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../glm.hpp" 17 | #include "../gtc/vec1.hpp" 18 | 19 | #ifndef GLM_ENABLE_EXPERIMENTAL 20 | # error "GLM: GLM_GTX_wrap is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it." 21 | #endif 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_wrap extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_wrap 30 | /// @{ 31 | 32 | /// Simulate GL_CLAMP OpenGL wrap mode 33 | /// @see gtx_wrap extension. 34 | template 35 | GLM_FUNC_DECL genType clamp(genType const& Texcoord); 36 | 37 | /// Simulate GL_REPEAT OpenGL wrap mode 38 | /// @see gtx_wrap extension. 39 | template 40 | GLM_FUNC_DECL genType repeat(genType const& Texcoord); 41 | 42 | /// Simulate GL_MIRRORED_REPEAT OpenGL wrap mode 43 | /// @see gtx_wrap extension. 44 | template 45 | GLM_FUNC_DECL genType mirrorClamp(genType const& Texcoord); 46 | 47 | /// Simulate GL_MIRROR_REPEAT OpenGL wrap mode 48 | /// @see gtx_wrap extension. 49 | template 50 | GLM_FUNC_DECL genType mirrorRepeat(genType const& Texcoord); 51 | 52 | /// @} 53 | }// namespace glm 54 | 55 | #include "wrap.inl" 56 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_mat2x3.hpp" 9 | 10 | namespace glm 11 | { 12 | /// 2 columns of 3 components matrix of low qualifier floating-point numbers. 13 | /// There is no guarantee on the actual qualifier. 14 | /// 15 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 16 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 17 | typedef mat<2, 3, float, lowp> lowp_mat2x3; 18 | 19 | /// 2 columns of 3 components matrix of medium qualifier floating-point numbers. 20 | /// There is no guarantee on the actual qualifier. 21 | /// 22 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 23 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 24 | typedef mat<2, 3, float, mediump> mediump_mat2x3; 25 | 26 | /// 2 columns of 3 components matrix of high qualifier floating-point numbers. 27 | /// There is no guarantee on the actual qualifier. 28 | /// 29 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 30 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 31 | typedef mat<2, 3, float, highp> highp_mat2x3; 32 | 33 | }//namespace glm 34 | 35 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_mat2x4.hpp" 9 | 10 | namespace glm 11 | { 12 | /// 2 columns of 4 components matrix of low qualifier floating-point numbers. 13 | /// There is no guarantee on the actual qualifier. 14 | /// 15 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 16 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 17 | typedef mat<2, 4, float, lowp> lowp_mat2x4; 18 | 19 | /// 2 columns of 4 components matrix of medium qualifier floating-point numbers. 20 | /// There is no guarantee on the actual qualifier. 21 | /// 22 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 23 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 24 | typedef mat<2, 4, float, mediump> mediump_mat2x4; 25 | 26 | /// 2 columns of 4 components matrix of high qualifier floating-point numbers. 27 | /// There is no guarantee on the actual qualifier. 28 | /// 29 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 30 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 31 | typedef mat<2, 4, float, highp> highp_mat2x4; 32 | 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_mat3x2.hpp" 9 | 10 | namespace glm 11 | { 12 | /// 3 columns of 2 components matrix of low qualifier floating-point numbers. 13 | /// There is no guarantee on the actual qualifier. 14 | /// 15 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 16 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 17 | typedef mat<3, 2, float, lowp> lowp_mat3x2; 18 | 19 | /// 3 columns of 2 components matrix of medium qualifier floating-point numbers. 20 | /// There is no guarantee on the actual qualifier. 21 | /// 22 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 23 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 24 | typedef mat<3, 2, float, mediump> mediump_mat3x2; 25 | 26 | /// 3 columns of 2 components matrix of high qualifier floating-point numbers. 27 | /// There is no guarantee on the actual qualifier. 28 | /// 29 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 30 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 31 | typedef mat<3, 2, float, highp> highp_mat3x2; 32 | 33 | }//namespace 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_mat3x4.hpp" 9 | 10 | namespace glm 11 | { 12 | /// 3 columns of 4 components matrix of low qualifier floating-point numbers. 13 | /// There is no guarantee on the actual qualifier. 14 | /// 15 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 16 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 17 | typedef mat<3, 4, float, lowp> lowp_mat3x4; 18 | 19 | /// 3 columns of 4 components matrix of medium qualifier floating-point numbers. 20 | /// There is no guarantee on the actual qualifier. 21 | /// 22 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 23 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 24 | typedef mat<3, 4, float, mediump> mediump_mat3x4; 25 | 26 | /// 3 columns of 4 components matrix of high qualifier floating-point numbers. 27 | /// There is no guarantee on the actual qualifier. 28 | /// 29 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 30 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 31 | typedef mat<3, 4, float, highp> highp_mat3x4; 32 | 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_mat4x2.hpp" 9 | 10 | namespace glm 11 | { 12 | /// 4 columns of 2 components matrix of low qualifier floating-point numbers. 13 | /// There is no guarantee on the actual qualifier. 14 | /// 15 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 16 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 17 | typedef mat<4, 2, float, lowp> lowp_mat4x2; 18 | 19 | /// 4 columns of 2 components matrix of medium qualifier floating-point numbers. 20 | /// There is no guarantee on the actual qualifier. 21 | /// 22 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 23 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 24 | typedef mat<4, 2, float, mediump> mediump_mat4x2; 25 | 26 | /// 4 columns of 2 components matrix of high qualifier floating-point numbers. 27 | /// There is no guarantee on the actual qualifier. 28 | /// 29 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 30 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 31 | typedef mat<4, 2, float, highp> highp_mat4x2; 32 | 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_mat4x3.hpp" 9 | 10 | namespace glm 11 | { 12 | /// 4 columns of 3 components matrix of low qualifier floating-point numbers. 13 | /// There is no guarantee on the actual qualifier. 14 | /// 15 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 16 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 17 | typedef mat<4, 3, float, lowp> lowp_mat4x3; 18 | 19 | /// 4 columns of 3 components matrix of medium qualifier floating-point numbers. 20 | /// There is no guarantee on the actual qualifier. 21 | /// 22 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 23 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 24 | typedef mat<4, 3, float, mediump> mediump_mat4x3; 25 | 26 | /// 4 columns of 3 components matrix of high qualifier floating-point numbers. 27 | /// There is no guarantee on the actual qualifier. 28 | /// 29 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 30 | /// @see GLSL 4.20.8 specification, section 4.7.2 Precision Qualifier 31 | typedef mat<4, 3, float, highp> highp_mat4x3; 32 | 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/simd/exponential.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/experimental.h 3 | 4 | #pragma once 5 | 6 | #include "platform.h" 7 | 8 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | GLM_FUNC_QUALIFIER glm_vec4 glm_vec1_sqrt_lowp(glm_vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_vec4 glm_vec4_sqrt_lowp(glm_vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/simd/packing.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/packing.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/simd/trigonometric.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/trigonometric.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | 10 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/simd/vector_relational.h: -------------------------------------------------------------------------------- 1 | /// @ref simd 2 | /// @file glm/simd/vector_relational.h 3 | 4 | #pragma once 5 | 6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 7 | 8 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 9 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_vec2.hpp" 9 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_vec3.hpp" 9 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #include "detail/setup.hpp" 5 | 6 | #pragma once 7 | 8 | #include "detail/type_vec4.hpp" 9 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/jni_md.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 1996, 1998, Oracle and/or its affiliates. All rights reserved. 3 | * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 4 | * 5 | * 6 | * 7 | * 8 | * 9 | * 10 | * 11 | * 12 | * 13 | * 14 | * 15 | * 16 | * 17 | * 18 | * 19 | * 20 | * 21 | * 22 | * 23 | * 24 | */ 25 | 26 | #ifndef _JAVASOFT_JNI_MD_H_ 27 | #define _JAVASOFT_JNI_MD_H_ 28 | 29 | #define JNIEXPORT __declspec(dllexport) 30 | #define JNIIMPORT __declspec(dllimport) 31 | #define JNICALL __stdcall 32 | 33 | typedef long jint; 34 | typedef __int64 jlong; 35 | typedef signed char jbyte; 36 | 37 | #endif /* !_JAVASOFT_JNI_MD_H_ */ 38 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/details/log_msg.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/common.h" 9 | #include "spdlog/details/os.h" 10 | 11 | 12 | #include 13 | #include 14 | 15 | namespace spdlog 16 | { 17 | namespace details 18 | { 19 | struct log_msg 20 | { 21 | log_msg() = default; 22 | log_msg(const std::string *loggers_name, level::level_enum lvl) : 23 | logger_name(loggers_name), 24 | level(lvl), 25 | msg_id(0) 26 | { 27 | #ifndef SPDLOG_NO_DATETIME 28 | time = os::now(); 29 | #endif 30 | 31 | #ifndef SPDLOG_NO_THREAD_ID 32 | thread_id = os::thread_id(); 33 | #endif 34 | } 35 | 36 | log_msg(const log_msg& other) = delete; 37 | log_msg& operator=(log_msg&& other) = delete; 38 | log_msg(log_msg&& other) = delete; 39 | 40 | 41 | const std::string *logger_name; 42 | level::level_enum level; 43 | log_clock::time_point time; 44 | size_t thread_id; 45 | fmt::MemoryWriter raw; 46 | fmt::MemoryWriter formatted; 47 | size_t msg_id; 48 | }; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/details/null_mutex.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include 9 | // null, no cost dummy "mutex" and dummy "atomic" int 10 | 11 | namespace spdlog 12 | { 13 | namespace details 14 | { 15 | struct null_mutex 16 | { 17 | void lock() {} 18 | void unlock() {} 19 | bool try_lock() 20 | { 21 | return true; 22 | } 23 | }; 24 | 25 | struct null_atomic_int 26 | { 27 | int value; 28 | null_atomic_int() = default; 29 | 30 | null_atomic_int(int val):value(val) 31 | {} 32 | 33 | int load(std::memory_order) const 34 | { 35 | return value; 36 | } 37 | 38 | void store(int val) 39 | { 40 | value = val; 41 | } 42 | }; 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/fmt/bundled/ostream.cc: -------------------------------------------------------------------------------- 1 | /* 2 | Formatting library for C++ - std::ostream support 3 | 4 | Copyright (c) 2012 - 2016, Victor Zverovich 5 | All rights reserved. 6 | 7 | For the license information refer to format.h. 8 | */ 9 | 10 | #include "ostream.h" 11 | 12 | namespace fmt { 13 | 14 | namespace internal { 15 | FMT_FUNC void write(std::ostream &os, Writer &w) { 16 | const char *data = w.data(); 17 | typedef internal::MakeUnsigned::Type UnsignedStreamSize; 18 | UnsignedStreamSize size = w.size(); 19 | UnsignedStreamSize max_size = 20 | internal::to_unsigned((std::numeric_limits::max)()); 21 | do { 22 | UnsignedStreamSize n = size <= max_size ? size : max_size; 23 | os.write(data, static_cast(n)); 24 | data += n; 25 | size -= n; 26 | } while (size != 0); 27 | } 28 | } 29 | 30 | FMT_FUNC void print(std::ostream &os, CStringRef format_str, ArgList args) { 31 | MemoryWriter w; 32 | w.write(format_str, args); 33 | internal::write(os, w); 34 | } 35 | } // namespace fmt 36 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/fmt/fmt.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // 9 | // Include a bundled header-only copy of fmtlib or an external one. 10 | // By default spdlog include its own copy. 11 | // 12 | 13 | #if !defined(SPDLOG_FMT_EXTERNAL) 14 | 15 | #ifndef FMT_HEADER_ONLY 16 | #define FMT_HEADER_ONLY 17 | #endif 18 | #ifndef FMT_USE_WINDOWS_H 19 | #define FMT_USE_WINDOWS_H 0 20 | #endif 21 | #include "spdlog/fmt/bundled/format.h" 22 | 23 | #else //external fmtlib 24 | 25 | #include 26 | 27 | #endif 28 | 29 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/fmt/ostr.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | // include external or bundled copy of fmtlib's ostream support 9 | // 10 | #if !defined(SPDLOG_FMT_EXTERNAL) 11 | #include "spdlog/fmt/fmt.h" 12 | #include "spdlog/fmt/bundled/ostream.h" 13 | #else 14 | #include 15 | #endif 16 | 17 | 18 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/formatter.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/details/log_msg.h" 9 | 10 | #include 11 | #include 12 | #include 13 | 14 | namespace spdlog 15 | { 16 | namespace details 17 | { 18 | class flag_formatter; 19 | } 20 | 21 | class formatter 22 | { 23 | public: 24 | virtual ~formatter() {} 25 | virtual void format(details::log_msg& msg) = 0; 26 | }; 27 | 28 | class pattern_formatter SPDLOG_FINAL : public formatter 29 | { 30 | 31 | public: 32 | explicit pattern_formatter(const std::string& pattern, pattern_time_type pattern_time = pattern_time_type::local); 33 | pattern_formatter(const pattern_formatter&) = delete; 34 | pattern_formatter& operator=(const pattern_formatter&) = delete; 35 | void format(details::log_msg& msg) override; 36 | private: 37 | const std::string _pattern; 38 | const pattern_time_type _pattern_time; 39 | std::vector> _formatters; 40 | std::tm get_time(details::log_msg& msg); 41 | void handle_flag(char flag); 42 | void compile_pattern(const std::string& pattern); 43 | }; 44 | } 45 | 46 | #include "spdlog/details/pattern_formatter_impl.h" 47 | 48 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/sinks/base_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | // 8 | // base sink templated over a mutex (either dummy or real) 9 | // concrete implementation should only override the _sink_it method. 10 | // all locking is taken care of here so no locking needed by the implementers.. 11 | // 12 | 13 | #include "spdlog/sinks/sink.h" 14 | #include "spdlog/formatter.h" 15 | #include "spdlog/common.h" 16 | #include "spdlog/details/log_msg.h" 17 | 18 | #include 19 | 20 | namespace spdlog 21 | { 22 | namespace sinks 23 | { 24 | template 25 | class base_sink:public sink 26 | { 27 | public: 28 | base_sink():_mutex() {} 29 | virtual ~base_sink() = default; 30 | 31 | base_sink(const base_sink&) = delete; 32 | base_sink& operator=(const base_sink&) = delete; 33 | 34 | void log(const details::log_msg& msg) SPDLOG_FINAL override 35 | { 36 | std::lock_guard lock(_mutex); 37 | _sink_it(msg); 38 | } 39 | void flush() SPDLOG_FINAL override 40 | { 41 | _flush(); 42 | } 43 | 44 | protected: 45 | virtual void _sink_it(const details::log_msg& msg) = 0; 46 | virtual void _flush() = 0; 47 | Mutex _mutex; 48 | }; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/sinks/msvc_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2016 Alexander Dalshov. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #if defined(_MSC_VER) 9 | 10 | #include "spdlog/sinks/base_sink.h" 11 | #include "spdlog/details/null_mutex.h" 12 | 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | namespace spdlog 19 | { 20 | namespace sinks 21 | { 22 | /* 23 | * MSVC sink (logging using OutputDebugStringA) 24 | */ 25 | template 26 | class msvc_sink : public base_sink < Mutex > 27 | { 28 | public: 29 | explicit msvc_sink() 30 | { 31 | } 32 | 33 | 34 | 35 | protected: 36 | void _sink_it(const details::log_msg& msg) override 37 | { 38 | OutputDebugStringA(msg.formatted.c_str()); 39 | } 40 | 41 | void _flush() override 42 | {} 43 | }; 44 | 45 | typedef msvc_sink msvc_sink_mt; 46 | typedef msvc_sink msvc_sink_st; 47 | 48 | } 49 | } 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/sinks/null_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/sinks/base_sink.h" 9 | #include "spdlog/details/null_mutex.h" 10 | 11 | #include 12 | 13 | namespace spdlog 14 | { 15 | namespace sinks 16 | { 17 | 18 | template 19 | class null_sink : public base_sink < Mutex > 20 | { 21 | protected: 22 | void _sink_it(const details::log_msg&) override 23 | {} 24 | 25 | void _flush() override 26 | {} 27 | 28 | }; 29 | typedef null_sink null_sink_st; 30 | typedef null_sink null_sink_mt; 31 | 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/sinks/ostream_sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | #pragma once 7 | 8 | #include "spdlog/details/null_mutex.h" 9 | #include "spdlog/sinks/base_sink.h" 10 | 11 | #include 12 | #include 13 | 14 | namespace spdlog 15 | { 16 | namespace sinks 17 | { 18 | template 19 | class ostream_sink: public base_sink 20 | { 21 | public: 22 | explicit ostream_sink(std::ostream& os, bool force_flush=false) :_ostream(os), _force_flush(force_flush) {} 23 | ostream_sink(const ostream_sink&) = delete; 24 | ostream_sink& operator=(const ostream_sink&) = delete; 25 | virtual ~ostream_sink() = default; 26 | 27 | protected: 28 | void _sink_it(const details::log_msg& msg) override 29 | { 30 | _ostream.write(msg.formatted.data(), msg.formatted.size()); 31 | if (_force_flush) 32 | _ostream.flush(); 33 | } 34 | 35 | void _flush() override 36 | { 37 | _ostream.flush(); 38 | } 39 | 40 | std::ostream& _ostream; 41 | bool _force_flush; 42 | }; 43 | 44 | typedef ostream_sink ostream_sink_mt; 45 | typedef ostream_sink ostream_sink_st; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /KAIMyEntitySaba/KAIMyEntitySaba/spdlog/sinks/sink.h: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright(c) 2015 Gabi Melman. 3 | // Distributed under the MIT License (http://opensource.org/licenses/MIT) 4 | // 5 | 6 | 7 | #pragma once 8 | 9 | #include "spdlog/details/log_msg.h" 10 | 11 | namespace spdlog 12 | { 13 | namespace sinks 14 | { 15 | class sink 16 | { 17 | public: 18 | sink() 19 | { 20 | _level = level::trace; 21 | } 22 | 23 | virtual ~sink() {} 24 | virtual void log(const details::log_msg& msg) = 0; 25 | virtual void flush() = 0; 26 | 27 | bool should_log(level::level_enum msg_level) const; 28 | void set_level(level::level_enum log_level); 29 | level::level_enum level() const; 30 | 31 | private: 32 | level_t _level; 33 | 34 | }; 35 | 36 | inline bool sink::should_log(level::level_enum msg_level) const 37 | { 38 | return msg_level >= _level.load(std::memory_order_relaxed); 39 | } 40 | 41 | inline void sink::set_level(level::level_enum log_level) 42 | { 43 | _level.store(log_level); 44 | } 45 | 46 | inline level::level_enum sink::level() const 47 | { 48 | return static_cast(_level.load(std::memory_order_relaxed)); 49 | } 50 | 51 | } 52 | } 53 | 54 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx3G 4 | org.gradle.daemon=false -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntity_1.12.2_1.4b13/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip 6 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/java/com/kAIS/KAIMyEntity/config/KAIMyEntityConfig.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.config; 2 | 3 | import com.kAIS.KAIMyEntity.KAIMyEntity; 4 | import net.minecraftforge.common.config.Config; 5 | 6 | @Config(modid = KAIMyEntity.MODID) 7 | public final class KAIMyEntityConfig 8 | { 9 | public static boolean openGLEnableLighting = true; 10 | 11 | @Config.RangeInt(min = 0) 12 | @Config.RequiresMcRestart 13 | public static int modelPoolMaxCount = 20; 14 | } 15 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/java/com/kAIS/KAIMyEntity/config/KAIMyEntityConfigGUIFactory.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.config; 2 | 3 | import com.kAIS.KAIMyEntity.KAIMyEntity; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.gui.GuiScreen; 6 | import net.minecraftforge.common.config.ConfigElement; 7 | import net.minecraftforge.fml.client.IModGuiFactory; 8 | import net.minecraftforge.fml.client.config.GuiConfig; 9 | import net.minecraftforge.fml.relauncher.Side; 10 | import net.minecraftforge.fml.relauncher.SideOnly; 11 | 12 | import java.util.Set; 13 | 14 | @SideOnly(Side.CLIENT) 15 | public class KAIMyEntityConfigGUIFactory implements IModGuiFactory 16 | { 17 | @Override 18 | public void initialize(Minecraft minecraftInstance) 19 | { 20 | 21 | } 22 | 23 | @Override 24 | public boolean hasConfigGui() 25 | { 26 | return true; 27 | } 28 | 29 | @Override 30 | public GuiScreen createConfigGui(GuiScreen parentScreen) 31 | { 32 | return new GuiConfig(parentScreen, ConfigElement.from(KAIMyEntityConfig.class).getChildElements(), KAIMyEntity.MODID, false, false, KAIMyEntity.NAME); 33 | } 34 | 35 | @Override 36 | public Set runtimeGuiCategories() 37 | { 38 | return null; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/java/com/kAIS/KAIMyEntity/register/KAIMyEntityRegisterCommon.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.register; 2 | 3 | import com.kAIS.KAIMyEntity.network.KAIMyEntityNetworkPack; 4 | import net.minecraftforge.fml.common.network.NetworkRegistry; 5 | import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; 6 | import net.minecraftforge.fml.relauncher.Side; 7 | 8 | public class KAIMyEntityRegisterCommon 9 | { 10 | public static void Regist() 11 | { 12 | channel.registerMessage(KAIMyEntityNetworkPack.PackHandler.class, KAIMyEntityNetworkPack.class, 0, Side.CLIENT); 13 | channel.registerMessage(KAIMyEntityNetworkPack.PackHandler.class, KAIMyEntityNetworkPack.class, 1, Side.SERVER); 14 | } 15 | 16 | public static SimpleNetworkWrapper channel = NetworkRegistry.INSTANCE.newSimpleChannel("kaimyentity"); 17 | } 18 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/java/com/kAIS/KAIMyEntity/renderer/IMMDModel.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.renderer; 2 | 3 | interface IMMDModel 4 | { 5 | void Render(double x, double y, double z, float entityYaw); 6 | void ChangeAnim(long anim, long layer); 7 | void ResetPhysics(); 8 | long GetModelLong(); 9 | String GetModelDir(); 10 | } -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/java/com/kAIS/KAIMyEntity/renderer/KAIMyEntityRenderFactory.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.renderer; 2 | 3 | import net.minecraft.client.renderer.entity.Render; 4 | import net.minecraft.client.renderer.entity.RenderManager; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraftforge.fml.client.registry.IRenderFactory; 7 | 8 | public class KAIMyEntityRenderFactory implements IRenderFactory 9 | { 10 | public KAIMyEntityRenderFactory(String entityName) 11 | { 12 | this.entityName = entityName; 13 | } 14 | 15 | @Override 16 | public Render createRenderFor(RenderManager manager) 17 | { 18 | return new KAIMyEntityRenderer(manager, entityName); 19 | } 20 | 21 | String entityName; 22 | } 23 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/resources/assets/kaimyentity/lang/zh_cn.lang: -------------------------------------------------------------------------------- 1 | key.title=KAIMyEntity 2 | key.resetPhysics=重置玩家物理 3 | key.reloadModels=重载模型 4 | key.customAnim1=播放自定义玩家动画1 5 | key.customAnim2=播放自定义玩家动画2 6 | key.customAnim3=播放自定义玩家动画3 7 | key.customAnim4=播放自定义玩家动画4 -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "kaimyentity", 4 | "name": "KAIMyEntity", 5 | "description": "KAIMyEntity", 6 | "version": "1.4b13", 7 | "mcversion": "", 8 | "url": "", 9 | "updateUrl": "", 10 | "authorList": ["kjkjkAIStudio"], 11 | "credits": "KAIMyEntity", 12 | "logoFile": "", 13 | "screenshots": [], 14 | "dependencies": [] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /KAIMyEntity_1.12.2_1.4b13/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "KAIMyEntity Resource", 4 | "pack_format": 3 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx3G 4 | org.gradle.daemon=false -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kjkjkAIStudio/KAIMyEntity/04c91901de387f2d2663aba4b55c013e6c7b3781/KAIMyEntity_1.16.5_1.4b14/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip 6 | -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/src/main/java/com/kAIS/KAIMyEntity/config/KAIMyEntityConfig.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.config; 2 | 3 | import net.minecraftforge.common.ForgeConfigSpec; 4 | 5 | public final class KAIMyEntityConfig 6 | { 7 | public static ForgeConfigSpec config; 8 | 9 | public static ForgeConfigSpec.BooleanValue openGLEnableLighting; 10 | 11 | public static ForgeConfigSpec.IntValue modelPoolMaxCount; 12 | 13 | static 14 | { 15 | ForgeConfigSpec.Builder b = new ForgeConfigSpec.Builder(); 16 | b.push("KAIMyEntity"); 17 | openGLEnableLighting = b.define("openGLEnableLighting", true); 18 | modelPoolMaxCount = b.defineInRange("modelPoolMaxCount", 20, 0, 100); 19 | b.pop(); 20 | config = b.build(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/src/main/java/com/kAIS/KAIMyEntity/register/KAIMyEntityRegisterCommon.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.register; 2 | 3 | import com.kAIS.KAIMyEntity.network.KAIMyEntityNetworkPack; 4 | import net.minecraft.util.ResourceLocation; 5 | import net.minecraftforge.fml.network.NetworkRegistry; 6 | import net.minecraftforge.fml.network.simple.SimpleChannel; 7 | 8 | public class KAIMyEntityRegisterCommon 9 | { 10 | public static void Regist() 11 | { 12 | channel = NetworkRegistry.newSimpleChannel(new ResourceLocation("kaimyentity", "network_pack"), () -> { return networkVersion; }, (version) -> { return version.equals(networkVersion); }, (version) -> { return version.equals(networkVersion); }); 13 | channel.registerMessage(0, KAIMyEntityNetworkPack.class, KAIMyEntityNetworkPack::Pack, KAIMyEntityNetworkPack::new, KAIMyEntityNetworkPack::Do); 14 | } 15 | 16 | public static SimpleChannel channel; 17 | static String networkVersion = "1"; 18 | } 19 | -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/src/main/java/com/kAIS/KAIMyEntity/renderer/IMMDModel.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.renderer; 2 | 3 | import net.minecraft.util.math.vector.Matrix4f; 4 | 5 | interface IMMDModel 6 | { 7 | void Render(float entityYaw, Matrix4f mat, int packedLight); 8 | void ChangeAnim(long anim, long layer); 9 | void ResetPhysics(); 10 | long GetModelLong(); 11 | String GetModelDir(); 12 | } -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/src/main/java/com/kAIS/KAIMyEntity/renderer/KAIMyEntityRenderFactory.java: -------------------------------------------------------------------------------- 1 | package com.kAIS.KAIMyEntity.renderer; 2 | 3 | import net.minecraft.client.renderer.entity.EntityRenderer; 4 | import net.minecraft.client.renderer.entity.EntityRendererManager; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraftforge.fml.client.registry.IRenderFactory; 7 | 8 | public class KAIMyEntityRenderFactory implements IRenderFactory 9 | { 10 | public KAIMyEntityRenderFactory(String entityName) 11 | { 12 | this.entityName = entityName; 13 | } 14 | 15 | @Override 16 | public EntityRenderer createRenderFor(EntityRendererManager manager) 17 | { 18 | return new KAIMyEntityRenderer(manager, entityName); 19 | } 20 | 21 | String entityName; 22 | } 23 | -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/src/main/resources/assets/kaimyentity/lang/zh_cn.json: -------------------------------------------------------------------------------- 1 | { 2 | "key.title": "KAIMyEntity", 3 | "key.resetPhysics": "重置玩家物理", 4 | "key.reloadModels": "重载模型", 5 | "key.customAnim1": "播放自定义玩家动画1", 6 | "key.customAnim2": "播放自定义玩家动画2", 7 | "key.customAnim3": "播放自定义玩家动画3", 8 | "key.customAnim4": "播放自定义玩家动画4" 9 | } -------------------------------------------------------------------------------- /KAIMyEntity_1.16.5_1.4b14/src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "description": "KAIMyEntity Resource", 4 | "pack_format": 6 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 kjkjkAIStudio 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KAIMyEntity 2 | Replace Minecraft entity with MMD model. 3 | 4 | ## KAIMyEntitySaba 5 | 将Github项目 benikabocha/saba (https://github.com/benikabocha/saba) 魔改成一个以JNI形式Export函数的动态链接库。 6 | 依赖头文件:bullet, glm, spdlog, stb 7 | 依赖库文件:bullet (已编译在KAIMyEntitySaba\bullet\lib) 8 | 9 | ## KAIMyEntity_1.12.2 & KAIMyEntity_1.16.5 10 | API: Forge 11 | 接入KAIMyEntitySaba.dll,负责Hook Minecraft的渲染器。 12 | 如果可以的话,所有的活儿我都想交给C++侧去做。 13 | 但是OpenGL会话由Java发起,因此只能写Java的渲染器。 --------------------------------------------------------------------------------