├── .github └── workflows │ └── msvc.yml ├── .gitignore ├── .gitmodules ├── .vs └── launch.vs.json ├── 3rd ├── glm │ ├── .gitkeep │ └── include │ │ ├── .gitkeep │ │ └── glm │ │ ├── CMakeLists.txt │ │ ├── common.hpp │ │ ├── detail │ │ ├── _features.hpp │ │ ├── _fixes.hpp │ │ ├── _noise.hpp │ │ ├── _swizzle.hpp │ │ ├── _swizzle_func.hpp │ │ ├── _vectorize.hpp │ │ ├── compute_common.hpp │ │ ├── compute_vector_relational.hpp │ │ ├── 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_half.hpp │ │ ├── type_half.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_quat.hpp │ │ ├── type_quat.inl │ │ ├── type_quat_simd.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 │ │ ├── matrix_clip_space.hpp │ │ ├── matrix_clip_space.inl │ │ ├── matrix_common.hpp │ │ ├── matrix_common.inl │ │ ├── matrix_double2x2.hpp │ │ ├── matrix_double2x2_precision.hpp │ │ ├── matrix_double2x3.hpp │ │ ├── matrix_double2x3_precision.hpp │ │ ├── matrix_double2x4.hpp │ │ ├── matrix_double2x4_precision.hpp │ │ ├── matrix_double3x2.hpp │ │ ├── matrix_double3x2_precision.hpp │ │ ├── matrix_double3x3.hpp │ │ ├── matrix_double3x3_precision.hpp │ │ ├── matrix_double3x4.hpp │ │ ├── matrix_double3x4_precision.hpp │ │ ├── matrix_double4x2.hpp │ │ ├── matrix_double4x2_precision.hpp │ │ ├── matrix_double4x3.hpp │ │ ├── matrix_double4x3_precision.hpp │ │ ├── matrix_double4x4.hpp │ │ ├── matrix_double4x4_precision.hpp │ │ ├── matrix_float2x2.hpp │ │ ├── matrix_float2x2_precision.hpp │ │ ├── matrix_float2x3.hpp │ │ ├── matrix_float2x3_precision.hpp │ │ ├── matrix_float2x4.hpp │ │ ├── matrix_float2x4_precision.hpp │ │ ├── matrix_float3x2.hpp │ │ ├── matrix_float3x2_precision.hpp │ │ ├── matrix_float3x3.hpp │ │ ├── matrix_float3x3_precision.hpp │ │ ├── matrix_float3x4.hpp │ │ ├── matrix_float3x4_precision.hpp │ │ ├── matrix_float4x2.hpp │ │ ├── matrix_float4x2_precision.hpp │ │ ├── matrix_float4x3.hpp │ │ ├── matrix_float4x3_precision.hpp │ │ ├── matrix_float4x4.hpp │ │ ├── matrix_float4x4_precision.hpp │ │ ├── matrix_int2x2.hpp │ │ ├── matrix_int2x2_sized.hpp │ │ ├── matrix_int2x3.hpp │ │ ├── matrix_int2x3_sized.hpp │ │ ├── matrix_int2x4.hpp │ │ ├── matrix_int2x4_sized.hpp │ │ ├── matrix_int3x2.hpp │ │ ├── matrix_int3x2_sized.hpp │ │ ├── matrix_int3x3.hpp │ │ ├── matrix_int3x3_sized.hpp │ │ ├── matrix_int3x4.hpp │ │ ├── matrix_int3x4_sized.hpp │ │ ├── matrix_int4x2.hpp │ │ ├── matrix_int4x2_sized.hpp │ │ ├── matrix_int4x3.hpp │ │ ├── matrix_int4x3_sized.hpp │ │ ├── matrix_int4x4.hpp │ │ ├── matrix_int4x4_sized.hpp │ │ ├── matrix_integer.hpp │ │ ├── matrix_integer.inl │ │ ├── matrix_projection.hpp │ │ ├── matrix_projection.inl │ │ ├── matrix_relational.hpp │ │ ├── matrix_relational.inl │ │ ├── matrix_transform.hpp │ │ ├── matrix_transform.inl │ │ ├── matrix_uint2x2.hpp │ │ ├── matrix_uint2x2_sized.hpp │ │ ├── matrix_uint2x3.hpp │ │ ├── matrix_uint2x3_sized.hpp │ │ ├── matrix_uint2x4.hpp │ │ ├── matrix_uint2x4_sized.hpp │ │ ├── matrix_uint3x2.hpp │ │ ├── matrix_uint3x2_sized.hpp │ │ ├── matrix_uint3x3.hpp │ │ ├── matrix_uint3x3_sized.hpp │ │ ├── matrix_uint3x4.hpp │ │ ├── matrix_uint3x4_sized.hpp │ │ ├── matrix_uint4x2.hpp │ │ ├── matrix_uint4x2_sized.hpp │ │ ├── matrix_uint4x3.hpp │ │ ├── matrix_uint4x3_sized.hpp │ │ ├── matrix_uint4x4.hpp │ │ ├── matrix_uint4x4_sized.hpp │ │ ├── quaternion_common.hpp │ │ ├── quaternion_common.inl │ │ ├── quaternion_common_simd.inl │ │ ├── quaternion_double.hpp │ │ ├── quaternion_double_precision.hpp │ │ ├── quaternion_exponential.hpp │ │ ├── quaternion_exponential.inl │ │ ├── quaternion_float.hpp │ │ ├── quaternion_float_precision.hpp │ │ ├── quaternion_geometric.hpp │ │ ├── quaternion_geometric.inl │ │ ├── quaternion_relational.hpp │ │ ├── quaternion_relational.inl │ │ ├── quaternion_transform.hpp │ │ ├── quaternion_transform.inl │ │ ├── quaternion_trigonometric.hpp │ │ ├── quaternion_trigonometric.inl │ │ ├── scalar_common.hpp │ │ ├── scalar_common.inl │ │ ├── scalar_constants.hpp │ │ ├── scalar_constants.inl │ │ ├── scalar_int_sized.hpp │ │ ├── scalar_integer.hpp │ │ ├── scalar_integer.inl │ │ ├── scalar_packing.hpp │ │ ├── scalar_packing.inl │ │ ├── scalar_reciprocal.hpp │ │ ├── scalar_reciprocal.inl │ │ ├── scalar_relational.hpp │ │ ├── scalar_relational.inl │ │ ├── scalar_uint_sized.hpp │ │ ├── scalar_ulp.hpp │ │ ├── scalar_ulp.inl │ │ ├── vector_bool1.hpp │ │ ├── vector_bool1_precision.hpp │ │ ├── vector_bool2.hpp │ │ ├── vector_bool2_precision.hpp │ │ ├── vector_bool3.hpp │ │ ├── vector_bool3_precision.hpp │ │ ├── vector_bool4.hpp │ │ ├── vector_bool4_precision.hpp │ │ ├── vector_common.hpp │ │ ├── vector_common.inl │ │ ├── vector_double1.hpp │ │ ├── vector_double1_precision.hpp │ │ ├── vector_double2.hpp │ │ ├── vector_double2_precision.hpp │ │ ├── vector_double3.hpp │ │ ├── vector_double3_precision.hpp │ │ ├── vector_double4.hpp │ │ ├── vector_double4_precision.hpp │ │ ├── vector_float1.hpp │ │ ├── vector_float1_precision.hpp │ │ ├── vector_float2.hpp │ │ ├── vector_float2_precision.hpp │ │ ├── vector_float3.hpp │ │ ├── vector_float3_precision.hpp │ │ ├── vector_float4.hpp │ │ ├── vector_float4_precision.hpp │ │ ├── vector_int1.hpp │ │ ├── vector_int1_sized.hpp │ │ ├── vector_int2.hpp │ │ ├── vector_int2_sized.hpp │ │ ├── vector_int3.hpp │ │ ├── vector_int3_sized.hpp │ │ ├── vector_int4.hpp │ │ ├── vector_int4_sized.hpp │ │ ├── vector_integer.hpp │ │ ├── vector_integer.inl │ │ ├── vector_packing.hpp │ │ ├── vector_packing.inl │ │ ├── vector_reciprocal.hpp │ │ ├── vector_reciprocal.inl │ │ ├── vector_relational.hpp │ │ ├── vector_relational.inl │ │ ├── vector_uint1.hpp │ │ ├── vector_uint1_sized.hpp │ │ ├── vector_uint2.hpp │ │ ├── vector_uint2_sized.hpp │ │ ├── vector_uint3.hpp │ │ ├── vector_uint3_sized.hpp │ │ ├── vector_uint4.hpp │ │ ├── vector_uint4_sized.hpp │ │ ├── vector_ulp.hpp │ │ └── vector_ulp.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 │ │ ├── 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 │ │ ├── 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 │ │ ├── pca.hpp │ │ ├── pca.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 │ │ ├── neon.h │ │ ├── packing.h │ │ ├── platform.h │ │ ├── trigonometric.h │ │ └── vector_relational.h │ │ ├── trigonometric.hpp │ │ ├── vec2.hpp │ │ ├── vec3.hpp │ │ ├── vec4.hpp │ │ └── vector_relational.hpp ├── openssl │ ├── include │ │ ├── linux │ │ │ └── openssl │ │ │ │ └── configuration.h │ │ ├── mac │ │ │ └── openssl │ │ │ │ └── configuration.h │ │ ├── openssl │ │ │ ├── aes.h │ │ │ ├── asn1.h │ │ │ ├── asn1_mac.h │ │ │ ├── asn1err.h │ │ │ ├── asn1t.h │ │ │ ├── async.h │ │ │ ├── asyncerr.h │ │ │ ├── bio.h │ │ │ ├── bioerr.h │ │ │ ├── blowfish.h │ │ │ ├── bn.h │ │ │ ├── bnerr.h │ │ │ ├── buffer.h │ │ │ ├── buffererr.h │ │ │ ├── camellia.h │ │ │ ├── cast.h │ │ │ ├── cmac.h │ │ │ ├── cmp.h │ │ │ ├── cmp_util.h │ │ │ ├── cmperr.h │ │ │ ├── cms.h │ │ │ ├── cmserr.h │ │ │ ├── comp.h │ │ │ ├── comperr.h │ │ │ ├── conf.h │ │ │ ├── conf_api.h │ │ │ ├── conferr.h │ │ │ ├── configuration.h │ │ │ ├── conftypes.h │ │ │ ├── core.h │ │ │ ├── core_dispatch.h │ │ │ ├── core_names.h │ │ │ ├── core_object.h │ │ │ ├── crmf.h │ │ │ ├── crmferr.h │ │ │ ├── crypto.h │ │ │ ├── cryptoerr.h │ │ │ ├── cryptoerr_legacy.h │ │ │ ├── ct.h │ │ │ ├── cterr.h │ │ │ ├── decoder.h │ │ │ ├── decodererr.h │ │ │ ├── des.h │ │ │ ├── dh.h │ │ │ ├── dherr.h │ │ │ ├── dsa.h │ │ │ ├── dsaerr.h │ │ │ ├── dtls1.h │ │ │ ├── e_os2.h │ │ │ ├── ebcdic.h │ │ │ ├── ec.h │ │ │ ├── ecdh.h │ │ │ ├── ecdsa.h │ │ │ ├── ecerr.h │ │ │ ├── encoder.h │ │ │ ├── encodererr.h │ │ │ ├── engine.h │ │ │ ├── engineerr.h │ │ │ ├── err.h │ │ │ ├── ess.h │ │ │ ├── esserr.h │ │ │ ├── evp.h │ │ │ ├── evperr.h │ │ │ ├── fips_names.h │ │ │ ├── fipskey.h │ │ │ ├── hmac.h │ │ │ ├── http.h │ │ │ ├── httperr.h │ │ │ ├── idea.h │ │ │ ├── kdf.h │ │ │ ├── kdferr.h │ │ │ ├── lhash.h │ │ │ ├── macros.h │ │ │ ├── md2.h │ │ │ ├── md4.h │ │ │ ├── md5.h │ │ │ ├── mdc2.h │ │ │ ├── modes.h │ │ │ ├── obj_mac.h │ │ │ ├── objects.h │ │ │ ├── objectserr.h │ │ │ ├── ocsp.h │ │ │ ├── ocsperr.h │ │ │ ├── opensslconf.h │ │ │ ├── opensslv.h │ │ │ ├── ossl_typ.h │ │ │ ├── param_build.h │ │ │ ├── params.h │ │ │ ├── pem.h │ │ │ ├── pem2.h │ │ │ ├── pemerr.h │ │ │ ├── pkcs12.h │ │ │ ├── pkcs12err.h │ │ │ ├── pkcs7.h │ │ │ ├── pkcs7err.h │ │ │ ├── prov_ssl.h │ │ │ ├── proverr.h │ │ │ ├── provider.h │ │ │ ├── rand.h │ │ │ ├── randerr.h │ │ │ ├── rc2.h │ │ │ ├── rc4.h │ │ │ ├── rc5.h │ │ │ ├── ripemd.h │ │ │ ├── rsa.h │ │ │ ├── rsaerr.h │ │ │ ├── safestack.h │ │ │ ├── seed.h │ │ │ ├── self_test.h │ │ │ ├── sha.h │ │ │ ├── srp.h │ │ │ ├── srtp.h │ │ │ ├── ssl.h │ │ │ ├── ssl2.h │ │ │ ├── ssl3.h │ │ │ ├── sslerr.h │ │ │ ├── sslerr_legacy.h │ │ │ ├── stack.h │ │ │ ├── store.h │ │ │ ├── storeerr.h │ │ │ ├── symhacks.h │ │ │ ├── tls1.h │ │ │ ├── trace.h │ │ │ ├── ts.h │ │ │ ├── tserr.h │ │ │ ├── txt_db.h │ │ │ ├── types.h │ │ │ ├── ui.h │ │ │ ├── uierr.h │ │ │ ├── whrlpool.h │ │ │ ├── x509.h │ │ │ ├── x509_vfy.h │ │ │ ├── x509err.h │ │ │ ├── x509v3.h │ │ │ └── x509v3err.h │ │ └── win64 │ │ │ └── openssl │ │ │ └── configuration.h │ └── lib │ │ ├── linux │ │ ├── .gitkeep │ │ ├── libcrypto.a │ │ └── libssl.a │ │ ├── mac │ │ ├── .gitkeep │ │ ├── libcrypto.a │ │ └── libssl.a │ │ └── windows │ │ ├── .gitkeep │ │ ├── libcrypto.lib │ │ ├── libssl.lib │ │ └── ossl_static.pdb ├── posix │ ├── arpa │ │ └── inet.h │ ├── dlfcn.c │ ├── dlfcn.h │ ├── netdb.h │ ├── netinet │ │ ├── in.h │ │ └── tcp.h │ ├── sys │ │ ├── epoll.h │ │ ├── file.h │ │ └── socket.h │ ├── unistd.c │ ├── unistd.h │ ├── wepoll.c │ └── wepoll.h ├── reactphysics3d │ ├── include │ │ ├── .gitkeep │ │ └── reactphysics3d │ │ │ ├── body │ │ │ ├── Body.h │ │ │ └── RigidBody.h │ │ │ ├── collision │ │ │ ├── Collider.h │ │ │ ├── CollisionCallback.h │ │ │ ├── ContactManifold.h │ │ │ ├── ContactManifoldInfo.h │ │ │ ├── ContactPair.h │ │ │ ├── ContactPointInfo.h │ │ │ ├── ConvexMesh.h │ │ │ ├── HalfEdgeStructure.h │ │ │ ├── HeightField.h │ │ │ ├── OverlapCallback.h │ │ │ ├── PolygonVertexArray.h │ │ │ ├── RaycastInfo.h │ │ │ ├── TriangleMesh.h │ │ │ ├── TriangleVertexArray.h │ │ │ ├── VertexArray.h │ │ │ ├── broadphase │ │ │ │ └── DynamicAABBTree.h │ │ │ ├── narrowphase │ │ │ │ ├── CapsuleVsCapsuleAlgorithm.h │ │ │ │ ├── CapsuleVsConvexPolyhedronAlgorithm.h │ │ │ │ ├── CollisionDispatch.h │ │ │ │ ├── ConvexPolyhedronVsConvexPolyhedronAlgorithm.h │ │ │ │ ├── GJK │ │ │ │ │ ├── GJKAlgorithm.h │ │ │ │ │ └── VoronoiSimplex.h │ │ │ │ ├── NarrowPhaseAlgorithm.h │ │ │ │ ├── NarrowPhaseInfoBatch.h │ │ │ │ ├── NarrowPhaseInput.h │ │ │ │ ├── SAT │ │ │ │ │ └── SATAlgorithm.h │ │ │ │ ├── SphereVsCapsuleAlgorithm.h │ │ │ │ ├── SphereVsConvexPolyhedronAlgorithm.h │ │ │ │ └── SphereVsSphereAlgorithm.h │ │ │ └── shapes │ │ │ │ ├── AABB.h │ │ │ │ ├── BoxShape.h │ │ │ │ ├── CapsuleShape.h │ │ │ │ ├── CollisionShape.h │ │ │ │ ├── ConcaveMeshShape.h │ │ │ │ ├── ConcaveShape.h │ │ │ │ ├── ConvexMeshShape.h │ │ │ │ ├── ConvexPolyhedronShape.h │ │ │ │ ├── ConvexShape.h │ │ │ │ ├── HeightFieldShape.h │ │ │ │ ├── SphereShape.h │ │ │ │ └── TriangleShape.h │ │ │ ├── components │ │ │ ├── BallAndSocketJointComponents.h │ │ │ ├── BodyComponents.h │ │ │ ├── ColliderComponents.h │ │ │ ├── Components.h │ │ │ ├── FixedJointComponents.h │ │ │ ├── HingeJointComponents.h │ │ │ ├── JointComponents.h │ │ │ ├── RigidBodyComponents.h │ │ │ ├── SliderJointComponents.h │ │ │ └── TransformComponents.h │ │ │ ├── configuration.h │ │ │ ├── constraint │ │ │ ├── BallAndSocketJoint.h │ │ │ ├── ContactPoint.h │ │ │ ├── FixedJoint.h │ │ │ ├── HingeJoint.h │ │ │ ├── Joint.h │ │ │ └── SliderJoint.h │ │ │ ├── containers │ │ │ ├── Array.h │ │ │ ├── Deque.h │ │ │ ├── LinkedList.h │ │ │ ├── Map.h │ │ │ ├── Pair.h │ │ │ ├── Set.h │ │ │ ├── Stack.h │ │ │ └── containers_common.h │ │ │ ├── decimal.h │ │ │ ├── engine │ │ │ ├── Entity.h │ │ │ ├── EntityManager.h │ │ │ ├── EventListener.h │ │ │ ├── Island.h │ │ │ ├── Islands.h │ │ │ ├── Material.h │ │ │ ├── OverlappingPairs.h │ │ │ ├── PhysicsCommon.h │ │ │ └── PhysicsWorld.h │ │ │ ├── mathematics │ │ │ ├── Matrix2x2.h │ │ │ ├── Matrix3x3.h │ │ │ ├── Quaternion.h │ │ │ ├── Ray.h │ │ │ ├── Transform.h │ │ │ ├── Vector2.h │ │ │ ├── Vector3.h │ │ │ ├── mathematics.h │ │ │ ├── mathematics_common.h │ │ │ └── mathematics_functions.h │ │ │ ├── memory │ │ │ ├── DefaultAllocator.h │ │ │ ├── HeapAllocator.h │ │ │ ├── MemoryAllocator.h │ │ │ ├── MemoryManager.h │ │ │ ├── PoolAllocator.h │ │ │ └── SingleFrameAllocator.h │ │ │ ├── reactphysics3d.h │ │ │ ├── systems │ │ │ ├── BroadPhaseSystem.h │ │ │ ├── CollisionDetectionSystem.h │ │ │ ├── ConstraintSolverSystem.h │ │ │ ├── ContactSolverSystem.h │ │ │ ├── DynamicsSystem.h │ │ │ ├── SolveBallAndSocketJointSystem.h │ │ │ ├── SolveFixedJointSystem.h │ │ │ ├── SolveHingeJointSystem.h │ │ │ └── SolveSliderJointSystem.h │ │ │ └── utils │ │ │ ├── DebugRenderer.h │ │ │ ├── DefaultLogger.h │ │ │ ├── Logger.h │ │ │ ├── Message.h │ │ │ ├── Profiler.h │ │ │ └── quickhull │ │ │ ├── QHHalfEdgeStructure.h │ │ │ └── QuickHull.h │ └── src │ │ ├── body │ │ ├── Body.cpp │ │ └── RigidBody.cpp │ │ ├── collision │ │ ├── Collider.cpp │ │ ├── CollisionCallback.cpp │ │ ├── ContactManifold.cpp │ │ ├── ConvexMesh.cpp │ │ ├── HalfEdgeStructure.cpp │ │ ├── HeightField.cpp │ │ ├── OverlapCallback.cpp │ │ ├── PolygonVertexArray.cpp │ │ ├── RaycastInfo.cpp │ │ ├── TriangleMesh.cpp │ │ ├── TriangleVertexArray.cpp │ │ ├── VertexArray.cpp │ │ ├── broadphase │ │ │ └── DynamicAABBTree.cpp │ │ ├── narrowphase │ │ │ ├── CapsuleVsCapsuleAlgorithm.cpp │ │ │ ├── CapsuleVsConvexPolyhedronAlgorithm.cpp │ │ │ ├── CollisionDispatch.cpp │ │ │ ├── ConvexPolyhedronVsConvexPolyhedronAlgorithm.cpp │ │ │ ├── GJK │ │ │ │ ├── GJKAlgorithm.cpp │ │ │ │ └── VoronoiSimplex.cpp │ │ │ ├── NarrowPhaseInfoBatch.cpp │ │ │ ├── NarrowPhaseInput.cpp │ │ │ ├── SAT │ │ │ │ └── SATAlgorithm.cpp │ │ │ ├── SphereVsCapsuleAlgorithm.cpp │ │ │ ├── SphereVsConvexPolyhedronAlgorithm.cpp │ │ │ └── SphereVsSphereAlgorithm.cpp │ │ └── shapes │ │ │ ├── AABB.cpp │ │ │ ├── BoxShape.cpp │ │ │ ├── CapsuleShape.cpp │ │ │ ├── CollisionShape.cpp │ │ │ ├── ConcaveMeshShape.cpp │ │ │ ├── ConcaveShape.cpp │ │ │ ├── ConvexMeshShape.cpp │ │ │ ├── ConvexPolyhedronShape.cpp │ │ │ ├── ConvexShape.cpp │ │ │ ├── HeightFieldShape.cpp │ │ │ ├── SphereShape.cpp │ │ │ └── TriangleShape.cpp │ │ ├── components │ │ ├── BallAndSocketJointComponents.cpp │ │ ├── BodyComponents.cpp │ │ ├── ColliderComponents.cpp │ │ ├── Components.cpp │ │ ├── FixedJointComponents.cpp │ │ ├── HingeJointComponents.cpp │ │ ├── JointComponents.cpp │ │ ├── RigidBodyComponents.cpp │ │ ├── SliderJointComponents.cpp │ │ └── TransformComponents.cpp │ │ ├── constraint │ │ ├── BallAndSocketJoint.cpp │ │ ├── ContactPoint.cpp │ │ ├── FixedJoint.cpp │ │ ├── HingeJoint.cpp │ │ ├── Joint.cpp │ │ └── SliderJoint.cpp │ │ ├── engine │ │ ├── Entity.cpp │ │ ├── EntityManager.cpp │ │ ├── Island.cpp │ │ ├── Material.cpp │ │ ├── OverlappingPairs.cpp │ │ ├── PhysicsCommon.cpp │ │ └── PhysicsWorld.cpp │ │ ├── mathematics │ │ ├── Matrix2x2.cpp │ │ ├── Matrix3x3.cpp │ │ ├── Quaternion.cpp │ │ ├── Transform.cpp │ │ ├── Vector2.cpp │ │ └── Vector3.cpp │ │ ├── memory │ │ ├── HeapAllocator.cpp │ │ ├── MemoryAllocator.cpp │ │ ├── MemoryManager.cpp │ │ ├── PoolAllocator.cpp │ │ └── SingleFrameAllocator.cpp │ │ ├── systems │ │ ├── BroadPhaseSystem.cpp │ │ ├── CollisionDetectionSystem.cpp │ │ ├── ConstraintSolverSystem.cpp │ │ ├── ContactSolverSystem.cpp │ │ ├── DynamicsSystem.cpp │ │ ├── SolveBallAndSocketJointSystem.cpp │ │ ├── SolveFixedJointSystem.cpp │ │ ├── SolveHingeJointSystem.cpp │ │ └── SolveSliderJointSystem.cpp │ │ └── utils │ │ ├── DebugRenderer.cpp │ │ ├── DefaultLogger.cpp │ │ ├── Profiler.cpp │ │ └── quickhull │ │ ├── QHHalfEdgeStructure.cpp │ │ └── QuickHull.cpp └── recastnavigation │ ├── Detour │ ├── CMakeLists.txt │ ├── Include │ │ ├── DetourAlloc.h │ │ ├── DetourAssert.h │ │ ├── DetourCommon.h │ │ ├── DetourMath.h │ │ ├── DetourNavMesh.h │ │ ├── DetourNavMeshBuilder.h │ │ ├── DetourNavMeshQuery.h │ │ ├── DetourNode.h │ │ └── DetourStatus.h │ └── Source │ │ ├── DetourAlloc.cpp │ │ ├── DetourAssert.cpp │ │ ├── DetourCommon.cpp │ │ ├── DetourNavMesh.cpp │ │ ├── DetourNavMeshBuilder.cpp │ │ ├── DetourNavMeshQuery.cpp │ │ └── DetourNode.cpp │ ├── DetourCrowd │ ├── CMakeLists.txt │ ├── Include │ │ ├── DetourCrowd.h │ │ ├── DetourLocalBoundary.h │ │ ├── DetourObstacleAvoidance.h │ │ ├── DetourPathCorridor.h │ │ ├── DetourPathQueue.h │ │ └── DetourProximityGrid.h │ └── Source │ │ ├── DetourCrowd.cpp │ │ ├── DetourLocalBoundary.cpp │ │ ├── DetourObstacleAvoidance.cpp │ │ ├── DetourPathCorridor.cpp │ │ ├── DetourPathQueue.cpp │ │ └── DetourProximityGrid.cpp │ ├── DetourTileCache │ ├── CMakeLists.txt │ ├── Include │ │ ├── DetourTileCache.h │ │ └── DetourTileCacheBuilder.h │ └── Source │ │ ├── DetourTileCache.cpp │ │ └── DetourTileCacheBuilder.cpp │ └── Recast │ ├── CMakeLists.txt │ ├── Include │ ├── Recast.h │ ├── RecastAlloc.h │ └── RecastAssert.h │ └── Source │ ├── Recast.cpp │ ├── RecastAlloc.cpp │ ├── RecastArea.cpp │ ├── RecastAssert.cpp │ ├── RecastContour.cpp │ ├── RecastFilter.cpp │ ├── RecastLayers.cpp │ ├── RecastMesh.cpp │ ├── RecastMeshDetail.cpp │ ├── RecastRasterization.cpp │ └── RecastRegion.cpp ├── CMakeLists.txt ├── CMakePresets.json ├── LICENSE ├── README.md ├── build.bat ├── build.sh └── pluto ├── luaclib ├── lua-aoi │ ├── aoi.hpp │ ├── lua_aoi.cpp │ └── rect.hpp ├── lua-fmt │ └── lfmt.c ├── lua-navmesh │ ├── fastlz.c │ ├── fastlz.h │ ├── lua_navmesh.cpp │ └── navmesh.hpp ├── lua-protobuf │ ├── pb.c │ └── pb.h ├── lua-rp3d │ └── lua_rp3d.cpp ├── lua-yyjson │ ├── buffer.hpp │ ├── hash.hpp │ ├── lua_yyjson.cpp │ ├── string.hpp │ ├── yyjson.c │ └── yyjson.h ├── lua-zset │ ├── lua_zset.cpp │ └── zset.hpp ├── luaecs │ ├── ecs_cache.c │ ├── ecs_cache.h │ ├── ecs_capi.c │ ├── ecs_capi.h │ ├── ecs_entityid.c │ ├── ecs_entityid.h │ ├── ecs_entityindex.h │ ├── ecs_group.c │ ├── ecs_group.h │ ├── ecs_internal.h │ ├── ecs_persistence.c │ ├── ecs_persistence.h │ ├── ecs_template.c │ ├── ecs_template.h │ ├── ecs_test.h │ ├── luaecs.c │ └── luaecs.h ├── luafilesystem │ ├── lfs.c │ └── lfs.h ├── luasyslog │ └── lsyslog.c └── math3d │ ├── math3d.c │ ├── math3d.h │ ├── math3dfunc.cpp │ ├── math3dfunc.h │ ├── mathadapter.c │ ├── mathid.c │ ├── mathid.h │ └── testadapter.c └── luaext ├── behavior3 ├── behavior_event.lua ├── behavior_node.lua ├── behavior_ret.lua ├── behavior_tree.lua ├── behavior_util.lua ├── nodes │ ├── actions │ │ ├── calculate.lua │ │ ├── clear.lua │ │ ├── concat.lua │ │ ├── filter.lua │ │ ├── foreach.lua │ │ ├── get_field.lua │ │ ├── index.lua │ │ ├── let.lua │ │ ├── log.lua │ │ ├── now.lua │ │ ├── push.lua │ │ ├── random.lua │ │ ├── random_index.lua │ │ ├── set_field.lua │ │ ├── wait.lua │ │ └── wait_for_count.lua │ ├── composites │ │ ├── ifelse.lua │ │ ├── parallel.lua │ │ ├── selector.lua │ │ └── sequence.lua │ ├── conditions │ │ ├── check.lua │ │ ├── cmp.lua │ │ ├── includes.lua │ │ ├── is_null.lua │ │ └── not_null.lua │ └── decorators │ │ ├── always_fail.lua │ │ ├── always_success.lua │ │ ├── invert.lua │ │ ├── once.lua │ │ ├── repeat.lua │ │ ├── repeat_until_fail.lua │ │ └── repeat_until_success.lua └── sample_process.lua ├── logging ├── console.lua ├── core.lua ├── file.lua ├── init.lua ├── rotate.lua └── syslog.lua ├── lua-radix-router ├── constants.lua ├── iterator.lua ├── matcher │ ├── host.lua │ ├── matcher.lua │ └── method.lua ├── options.lua ├── parser │ ├── parser.lua │ └── style │ │ └── default.lua ├── route.lua ├── router.lua ├── trie.lua └── utils.lua ├── luaoop ├── class.lua ├── enum.lua ├── mixin.lua └── property.lua ├── misc ├── crontab.lua ├── date.lua ├── ecs.lua ├── ltest.lua ├── lume.lua ├── mediator.lua ├── moses.lua ├── protoc.lua ├── rp3d.lua ├── splash.lua ├── stringx.lua ├── tablex.lua ├── timex.lua └── traceable.lua ├── preload.lua ├── service ├── logger.lua └── logger │ └── impl.lua └── skynet ├── lockable.lua └── parallels.lua /.github/workflows/msvc.yml: -------------------------------------------------------------------------------- 1 | # Workflow's name 2 | name: msvc 3 | 4 | # Run this workflow every time a new commit pushed to your repository 5 | on: [push, pull_request] 6 | 7 | jobs: 8 | build: 9 | runs-on: windows-latest 10 | steps: 11 | - uses: actions/checkout@v4 12 | with: 13 | submodules: true 14 | 15 | - name: Configure build PATH 16 | uses: ilammy/msvc-dev-cmd@v1 17 | 18 | - name: Configure CMake 19 | run: | 20 | cmake --preset x64-debug 21 | 22 | - name: Build 23 | run: cmake --build out/build/x64-debug 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .vs 3 | .vscode 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "skynet"] 2 | path = skynet 3 | url = https://github.com/cloudwu/skynet.git 4 | [submodule "3rd/pthread-win32"] 5 | path = 3rd/pthread-win32 6 | url = https://github.com/GerHobbelt/pthread-win32.git 7 | -------------------------------------------------------------------------------- /.vs/launch.vs.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.1", 3 | "defaults": {}, 4 | "configurations": [ 5 | { 6 | "type": "default", 7 | "project": "CMakeLists.txt", 8 | "projectTarget": "skynet.exe", 9 | "name": "skynet.exe", 10 | "args": [ 11 | "examples\\config" 12 | ] 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /3rd/glm/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/.gitkeep -------------------------------------------------------------------------------- /3rd/glm/include/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/include/.gitkeep -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/_fixes.hpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | //! Workaround for compatibility with other libraries 4 | #ifdef max 5 | #undef max 6 | #endif 7 | 8 | //! Workaround for compatibility with other libraries 9 | #ifdef min 10 | #undef min 11 | #endif 12 | 13 | //! Workaround for Android 14 | #ifdef isnan 15 | #undef isnan 16 | #endif 17 | 18 | //! Workaround for Android 19 | #ifdef isinf 20 | #undef isinf 21 | #endif 22 | 23 | //! Workaround for Chrone Native Client 24 | #ifdef log2 25 | #undef log2 26 | #endif 27 | 28 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/compute_vector_relational.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | //#include "compute_common.hpp" 4 | #include "setup.hpp" 5 | #include 6 | 7 | namespace glm{ 8 | namespace detail 9 | { 10 | template 11 | struct compute_equal 12 | { 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR 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 GLM_CONSTEXPR static bool call(T a, T b) 23 | { 24 | return detail::compute_abs::is_signed>::call(b - a) <= static_cast(0); 25 | //return std::memcmp(&a, &b, sizeof(T)) == 0; 26 | } 27 | }; 28 | */ 29 | }//namespace detail 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | # if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE 23 | template<> 24 | struct compute_sqrt<4, float, aligned_lowp, true> 25 | { 26 | GLM_FUNC_QUALIFIER static vec<4, float, aligned_lowp> call(vec<4, float, aligned_lowp> const& v) 27 | { 28 | vec<4, float, aligned_lowp> Result; 29 | Result.data = glm_vec4_sqrt_lowp(v.data); 30 | return Result; 31 | } 32 | }; 33 | # endif 34 | }//namespace detail 35 | }//namespace glm 36 | 37 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 38 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/func_packing_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/include/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/func_vector_relational_simd.inl: -------------------------------------------------------------------------------- 1 | namespace glm{ 2 | namespace detail 3 | { 4 | 5 | }//namespace detail 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/type_half.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "setup.hpp" 4 | 5 | namespace glm{ 6 | namespace detail 7 | { 8 | typedef short hdata; 9 | 10 | GLM_FUNC_DECL float toFloat32(hdata value); 11 | GLM_FUNC_DECL hdata toFloat16(float const& value); 12 | 13 | }//namespace detail 14 | }//namespace glm 15 | 16 | #include "type_half.inl" 17 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/detail/type_mat4x4_simd.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_common.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_common 2 | /// @file glm/ext/matrix_common.hpp 3 | /// 4 | /// @defgroup ext_matrix_common GLM_EXT_matrix_common 5 | /// @ingroup ext 6 | /// 7 | /// Defines functions for common matrix operations. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_matrix_common 12 | 13 | #pragma once 14 | 15 | #include "../detail/qualifier.hpp" 16 | #include "../detail/_fixes.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_transform extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_common 25 | /// @{ 26 | 27 | template 28 | GLM_FUNC_DECL mat mix(mat const& x, mat const& y, mat const& a); 29 | 30 | template 31 | GLM_FUNC_DECL mat mix(mat const& x, mat const& y, U a); 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "matrix_common.inl" 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_common.inl: -------------------------------------------------------------------------------- 1 | #include "../matrix.hpp" 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat mix(mat const& x, mat const& y, U a) 7 | { 8 | return mat(x) * (static_cast(1) - a) + mat(y) * a; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat mix(mat const& x, mat const& y, mat const& a) 13 | { 14 | return matrixCompMult(mat(x), static_cast(1) - a) + matrixCompMult(mat(y), a); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, double, defaultp> dmat2x2; 16 | 17 | /// 2 columns of 2 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, double, defaultp> dmat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, double, defaultp> dmat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, double, defaultp> dmat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, double, defaultp> dmat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, double, defaultp> dmat3x3; 16 | 17 | /// 3 columns of 3 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, double, defaultp> dmat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, double, defaultp> dmat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, double, defaultp> dmat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, double, defaultp> dmat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_double4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_double4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, double, defaultp> dmat4x4; 16 | 17 | /// 4 columns of 4 components matrix of double-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, double, defaultp> dmat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 2, float, defaultp> mat2x2; 16 | 17 | /// 2 columns of 2 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<2, 2, float, defaultp> mat2; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 3, float, defaultp> mat2x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float2x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat2x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 2 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<2, 4, float, defaultp> mat2x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core 10 | /// @{ 11 | 12 | /// 3 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 2, float, defaultp> mat3x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 3, float, defaultp> mat3x3; 16 | 17 | /// 3 columns of 3 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<3, 3, float, defaultp> mat3; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float3x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat3x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 3 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<3, 4, float, defaultp> mat3x4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 2 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 2, float, defaultp> mat4x2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 3 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 3, float, defaultp> mat4x3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_float4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/matrix_float4x4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_mat4x4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @ingroup core_matrix 10 | /// @{ 11 | 12 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 15 | typedef mat<4, 4, float, defaultp> mat4x4; 16 | 17 | /// 4 columns of 4 components matrix of single-precision floating-point numbers. 18 | /// 19 | /// @see GLSL 4.20.8 specification, section 4.1.6 Matrices 20 | typedef mat<4, 4, float, defaultp> mat4; 21 | 22 | /// @} 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x2 2 | /// @file glm/ext/matrix_int2x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x2 GLM_EXT_matrix_int2x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int2x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int2x2 25 | /// @{ 26 | 27 | /// Signed integer 2x2 matrix. 28 | /// 29 | /// @see ext_matrix_int2x2 30 | typedef mat<2, 2, int, defaultp> imat2x2; 31 | 32 | /// Signed integer 2x2 matrix. 33 | /// 34 | /// @see ext_matrix_int2x2 35 | typedef mat<2, 2, int, defaultp> imat2; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x3 2 | /// @file glm/ext/matrix_int2x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_int2x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int2x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int2x3 25 | /// @{ 26 | 27 | /// Signed integer 2x3 matrix. 28 | /// 29 | /// @see ext_matrix_int2x3 30 | typedef mat<2, 3, int, defaultp> imat2x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int2x3_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x3_sized 2 | /// @file glm/ext/matrix_int2x3_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x3_sized GLM_EXT_matrix_int2x3_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x3.hpp" 17 | #include "../ext/scalar_int_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_int2x3_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_int2x3_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 2x3 matrix. 29 | /// 30 | /// @see ext_matrix_int2x3_sized 31 | typedef mat<2, 3, int8, defaultp> i8mat2x3; 32 | 33 | /// 16 bit signed integer 2x3 matrix. 34 | /// 35 | /// @see ext_matrix_int2x3_sized 36 | typedef mat<2, 3, int16, defaultp> i16mat2x3; 37 | 38 | /// 32 bit signed integer 2x3 matrix. 39 | /// 40 | /// @see ext_matrix_int2x3_sized 41 | typedef mat<2, 3, int32, defaultp> i32mat2x3; 42 | 43 | /// 64 bit signed integer 2x3 matrix. 44 | /// 45 | /// @see ext_matrix_int2x3_sized 46 | typedef mat<2, 3, int64, defaultp> i64mat2x3; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x4 2 | /// @file glm/ext/matrix_int2x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x4 GLM_EXT_matrix_int2x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int2x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int2x4 25 | /// @{ 26 | 27 | /// Signed integer 2x4 matrix. 28 | /// 29 | /// @see ext_matrix_int2x4 30 | typedef mat<2, 4, int, defaultp> imat2x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int2x4_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int2x4_sized 2 | /// @file glm/ext/matrix_int2x4_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x4_sized GLM_EXT_matrix_int2x4_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x4.hpp" 17 | #include "../ext/scalar_int_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_int2x4_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_int2x4_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 2x4 matrix. 29 | /// 30 | /// @see ext_matrix_int2x4_sized 31 | typedef mat<2, 4, int8, defaultp> i8mat2x4; 32 | 33 | /// 16 bit signed integer 2x4 matrix. 34 | /// 35 | /// @see ext_matrix_int2x4_sized 36 | typedef mat<2, 4, int16, defaultp> i16mat2x4; 37 | 38 | /// 32 bit signed integer 2x4 matrix. 39 | /// 40 | /// @see ext_matrix_int2x4_sized 41 | typedef mat<2, 4, int32, defaultp> i32mat2x4; 42 | 43 | /// 64 bit signed integer 2x4 matrix. 44 | /// 45 | /// @see ext_matrix_int2x4_sized 46 | typedef mat<2, 4, int64, defaultp> i64mat2x4; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x2 2 | /// @file glm/ext/matrix_int3x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_int3x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int3x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int3x2 25 | /// @{ 26 | 27 | /// Signed integer 3x2 matrix. 28 | /// 29 | /// @see ext_matrix_int3x2 30 | typedef mat<3, 2, int, defaultp> imat3x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int3x2_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x2_sized 2 | /// @file glm/ext/matrix_int3x2_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x2_sized GLM_EXT_matrix_int3x2_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x2.hpp" 17 | #include "../ext/scalar_int_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_int3x2_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_int3x2_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 3x2 matrix. 29 | /// 30 | /// @see ext_matrix_int3x2_sized 31 | typedef mat<3, 2, int8, defaultp> i8mat3x2; 32 | 33 | /// 16 bit signed integer 3x2 matrix. 34 | /// 35 | /// @see ext_matrix_int3x2_sized 36 | typedef mat<3, 2, int16, defaultp> i16mat3x2; 37 | 38 | /// 32 bit signed integer 3x2 matrix. 39 | /// 40 | /// @see ext_matrix_int3x2_sized 41 | typedef mat<3, 2, int32, defaultp> i32mat3x2; 42 | 43 | /// 64 bit signed integer 3x2 matrix. 44 | /// 45 | /// @see ext_matrix_int3x2_sized 46 | typedef mat<3, 2, int64, defaultp> i64mat3x2; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x3 2 | /// @file glm/ext/matrix_int3x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x3 GLM_EXT_matrix_int3x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int3x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int3x3 25 | /// @{ 26 | 27 | /// Signed integer 3x3 matrix. 28 | /// 29 | /// @see ext_matrix_int3x3 30 | typedef mat<3, 3, int, defaultp> imat3x3; 31 | 32 | /// Signed integer 3x3 matrix. 33 | /// 34 | /// @see ext_matrix_int3x3 35 | typedef mat<3, 3, int, defaultp> imat3; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x4 2 | /// @file glm/ext/matrix_int3x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x4 GLM_EXT_matrix_int3x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int3x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int3x4 25 | /// @{ 26 | 27 | /// Signed integer 3x4 matrix. 28 | /// 29 | /// @see ext_matrix_int3x4 30 | typedef mat<3, 4, int, defaultp> imat3x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int3x4_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int3x4_sized 2 | /// @file glm/ext/matrix_int3x2_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x4_sized GLM_EXT_matrix_int3x4_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x4.hpp" 17 | #include "../ext/scalar_int_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_int3x4_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_int3x4_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 3x4 matrix. 29 | /// 30 | /// @see ext_matrix_int3x4_sized 31 | typedef mat<3, 4, int8, defaultp> i8mat3x4; 32 | 33 | /// 16 bit signed integer 3x4 matrix. 34 | /// 35 | /// @see ext_matrix_int3x4_sized 36 | typedef mat<3, 4, int16, defaultp> i16mat3x4; 37 | 38 | /// 32 bit signed integer 3x4 matrix. 39 | /// 40 | /// @see ext_matrix_int3x4_sized 41 | typedef mat<3, 4, int32, defaultp> i32mat3x4; 42 | 43 | /// 64 bit signed integer 3x4 matrix. 44 | /// 45 | /// @see ext_matrix_int3x4_sized 46 | typedef mat<3, 4, int64, defaultp> i64mat3x4; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x2 2 | /// @file glm/ext/matrix_int4x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x2 GLM_EXT_matrix_int4x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int4x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int4x2 25 | /// @{ 26 | 27 | /// Signed integer 4x2 matrix. 28 | /// 29 | /// @see ext_matrix_int4x2 30 | typedef mat<4, 2, int, defaultp> imat4x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int4x2_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x2_sized 2 | /// @file glm/ext/matrix_int4x2_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x2_sized GLM_EXT_matrix_int4x2_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x2.hpp" 17 | #include "../ext/scalar_int_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_int4x2_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_int4x2_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 4x2 matrix. 29 | /// 30 | /// @see ext_matrix_int4x2_sized 31 | typedef mat<4, 2, int8, defaultp> i8mat4x2; 32 | 33 | /// 16 bit signed integer 4x2 matrix. 34 | /// 35 | /// @see ext_matrix_int4x2_sized 36 | typedef mat<4, 2, int16, defaultp> i16mat4x2; 37 | 38 | /// 32 bit signed integer 4x2 matrix. 39 | /// 40 | /// @see ext_matrix_int4x2_sized 41 | typedef mat<4, 2, int32, defaultp> i32mat4x2; 42 | 43 | /// 64 bit signed integer 4x2 matrix. 44 | /// 45 | /// @see ext_matrix_int4x2_sized 46 | typedef mat<4, 2, int64, defaultp> i64mat4x2; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x3 2 | /// @file glm/ext/matrix_int4x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x3 GLM_EXT_matrix_int4x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int4x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int4x3 25 | /// @{ 26 | 27 | /// Signed integer 4x3 matrix. 28 | /// 29 | /// @see ext_matrix_int4x3 30 | typedef mat<4, 3, int, defaultp> imat4x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int4x3_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x3_sized 2 | /// @file glm/ext/matrix_int4x3_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x3_sized GLM_EXT_matrix_int4x3_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x3.hpp" 17 | #include "../ext/scalar_int_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_int4x3_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_int4x3_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 4x3 matrix. 29 | /// 30 | /// @see ext_matrix_int4x3_sized 31 | typedef mat<4, 3, int8, defaultp> i8mat4x3; 32 | 33 | /// 16 bit signed integer 4x3 matrix. 34 | /// 35 | /// @see ext_matrix_int4x3_sized 36 | typedef mat<4, 3, int16, defaultp> i16mat4x3; 37 | 38 | /// 32 bit signed integer 4x3 matrix. 39 | /// 40 | /// @see ext_matrix_int4x3_sized 41 | typedef mat<4, 3, int32, defaultp> i32mat4x3; 42 | 43 | /// 64 bit signed integer 4x3 matrix. 44 | /// 45 | /// @see ext_matrix_int4x3_sized 46 | typedef mat<4, 3, int64, defaultp> i64mat4x3; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_int4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_int4x4 2 | /// @file glm/ext/matrix_int4x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int4x4 GLM_EXT_matrix_int4x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_int4x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_int4x4 25 | /// @{ 26 | 27 | /// Signed integer 4x4 matrix. 28 | /// 29 | /// @see ext_matrix_int4x4 30 | typedef mat<4, 4, int, defaultp> imat4x4; 31 | 32 | /// Signed integer 4x4 matrix. 33 | /// 34 | /// @see ext_matrix_int4x4 35 | typedef mat<4, 4, int, defaultp> imat4; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x2 2 | /// @file glm/ext/matrix_uint2x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x2 GLM_EXT_matrix_uint2x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint2x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint2x2 25 | /// @{ 26 | 27 | /// Unsigned integer 2x2 matrix. 28 | /// 29 | /// @see ext_matrix_uint2x2 30 | typedef mat<2, 2, uint, defaultp> umat2x2; 31 | 32 | /// Unsigned integer 2x2 matrix. 33 | /// 34 | /// @see ext_matrix_uint2x2 35 | typedef mat<2, 2, uint, defaultp> umat2; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x3 2 | /// @file glm/ext/matrix_uint2x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int2x3 GLM_EXT_matrix_uint2x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint2x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint2x3 25 | /// @{ 26 | 27 | /// Unsigned integer 2x3 matrix. 28 | /// 29 | /// @see ext_matrix_uint2x3 30 | typedef mat<2, 3, uint, defaultp> umat2x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint2x3_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x3_sized 2 | /// @file glm/ext/matrix_uint2x3_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x3_sized GLM_EXT_matrix_uint2x3_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x3.hpp" 17 | #include "../ext/scalar_uint_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_uint2x3_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_uint2x3_sized 26 | /// @{ 27 | 28 | /// 8 bit unsigned integer 2x3 matrix. 29 | /// 30 | /// @see ext_matrix_uint2x3_sized 31 | typedef mat<2, 3, uint8, defaultp> u8mat2x3; 32 | 33 | /// 16 bit unsigned integer 2x3 matrix. 34 | /// 35 | /// @see ext_matrix_uint2x3_sized 36 | typedef mat<2, 3, uint16, defaultp> u16mat2x3; 37 | 38 | /// 32 bit unsigned integer 2x3 matrix. 39 | /// 40 | /// @see ext_matrix_uint2x3_sized 41 | typedef mat<2, 3, uint32, defaultp> u32mat2x3; 42 | 43 | /// 64 bit unsigned integer 2x3 matrix. 44 | /// 45 | /// @see ext_matrix_uint2x3_sized 46 | typedef mat<2, 3, uint64, defaultp> u64mat2x3; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x4 2 | /// @file glm/ext/matrix_uint2x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x4 GLM_EXT_matrix_int2x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint2x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint2x4 25 | /// @{ 26 | 27 | /// Unsigned integer 2x4 matrix. 28 | /// 29 | /// @see ext_matrix_uint2x4 30 | typedef mat<2, 4, uint, defaultp> umat2x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint2x4_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint2x4_sized 2 | /// @file glm/ext/matrixu_uint2x4_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint2x4_sized GLM_EXT_matrix_uint2x4_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat2x4.hpp" 17 | #include "../ext/scalar_uint_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_uint2x4_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_uint2x4_sized 26 | /// @{ 27 | 28 | /// 8 bit unsigned integer 2x4 matrix. 29 | /// 30 | /// @see ext_matrix_uint2x4_sized 31 | typedef mat<2, 4, uint8, defaultp> u8mat2x4; 32 | 33 | /// 16 bit unsigned integer 2x4 matrix. 34 | /// 35 | /// @see ext_matrix_uint2x4_sized 36 | typedef mat<2, 4, uint16, defaultp> u16mat2x4; 37 | 38 | /// 32 bit unsigned integer 2x4 matrix. 39 | /// 40 | /// @see ext_matrix_uint2x4_sized 41 | typedef mat<2, 4, uint32, defaultp> u32mat2x4; 42 | 43 | /// 64 bit unsigned integer 2x4 matrix. 44 | /// 45 | /// @see ext_matrix_uint2x4_sized 46 | typedef mat<2, 4, uint64, defaultp> u64mat2x4; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x2 2 | /// @file glm/ext/matrix_uint3x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_int3x2 GLM_EXT_matrix_uint3x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint3x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint3x2 25 | /// @{ 26 | 27 | /// Unsigned integer 3x2 matrix. 28 | /// 29 | /// @see ext_matrix_uint3x2 30 | typedef mat<3, 2, uint, defaultp> umat3x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint3x2_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x2_sized 2 | /// @file glm/ext/matrix_uint3x2_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x2_sized GLM_EXT_matrix_uint3x2_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x2.hpp" 17 | #include "../ext/scalar_uint_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_uint3x2_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_uint3x2_sized 26 | /// @{ 27 | 28 | /// 8 bit signed integer 3x2 matrix. 29 | /// 30 | /// @see ext_matrix_uint3x2_sized 31 | typedef mat<3, 2, uint8, defaultp> u8mat3x2; 32 | 33 | /// 16 bit signed integer 3x2 matrix. 34 | /// 35 | /// @see ext_matrix_uint3x2_sized 36 | typedef mat<3, 2, uint16, defaultp> u16mat3x2; 37 | 38 | /// 32 bit signed integer 3x2 matrix. 39 | /// 40 | /// @see ext_matrix_uint3x2_sized 41 | typedef mat<3, 2, uint32, defaultp> u32mat3x2; 42 | 43 | /// 64 bit signed integer 3x2 matrix. 44 | /// 45 | /// @see ext_matrix_uint3x2_sized 46 | typedef mat<3, 2, uint64, defaultp> u64mat3x2; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x3 2 | /// @file glm/ext/matrix_uint3x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x3 GLM_EXT_matrix_uint3x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint3x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint3x3 25 | /// @{ 26 | 27 | /// Unsigned integer 3x3 matrix. 28 | /// 29 | /// @see ext_matrix_uint3x3 30 | typedef mat<3, 3, uint, defaultp> umat3x3; 31 | 32 | /// Unsigned integer 3x3 matrix. 33 | /// 34 | /// @see ext_matrix_uint3x3 35 | typedef mat<3, 3, uint, defaultp> umat3; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x4 2 | /// @file glm/ext/matrix_uint3x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x4 GLM_EXT_matrix_uint3x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint3x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint3x4 25 | /// @{ 26 | 27 | /// Signed integer 3x4 matrix. 28 | /// 29 | /// @see ext_matrix_uint3x4 30 | typedef mat<3, 4, uint, defaultp> umat3x4; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint3x4_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint3x4_sized 2 | /// @file glm/ext/matrix_uint3x2_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint3x4_sized GLM_EXT_matrix_uint3x4_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat3x4.hpp" 17 | #include "../ext/scalar_uint_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_uint3x4_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_uint3x4_sized 26 | /// @{ 27 | 28 | /// 8 bit unsigned integer 3x4 matrix. 29 | /// 30 | /// @see ext_matrix_uint3x4_sized 31 | typedef mat<3, 4, uint8, defaultp> u8mat3x4; 32 | 33 | /// 16 bit unsigned integer 3x4 matrix. 34 | /// 35 | /// @see ext_matrix_uint3x4_sized 36 | typedef mat<3, 4, uint16, defaultp> u16mat3x4; 37 | 38 | /// 32 bit unsigned integer 3x4 matrix. 39 | /// 40 | /// @see ext_matrix_uint3x4_sized 41 | typedef mat<3, 4, uint32, defaultp> u32mat3x4; 42 | 43 | /// 64 bit unsigned integer 3x4 matrix. 44 | /// 45 | /// @see ext_matrix_uint3x4_sized 46 | typedef mat<3, 4, uint64, defaultp> u64mat3x4; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x2 2 | /// @file glm/ext/matrix_uint4x2.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x2 GLM_EXT_matrix_uint4x2 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x2.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint4x2 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint4x2 25 | /// @{ 26 | 27 | /// Unsigned integer 4x2 matrix. 28 | /// 29 | /// @see ext_matrix_uint4x2 30 | typedef mat<4, 2, uint, defaultp> umat4x2; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint4x2_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x2_sized 2 | /// @file glm/ext/matrix_uint4x2_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x2_sized GLM_EXT_matrix_uint4x2_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x2.hpp" 17 | #include "../ext/scalar_uint_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_uint4x2_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_uint4x2_sized 26 | /// @{ 27 | 28 | /// 8 bit unsigned integer 4x2 matrix. 29 | /// 30 | /// @see ext_matrix_uint4x2_sized 31 | typedef mat<4, 2, uint8, defaultp> u8mat4x2; 32 | 33 | /// 16 bit unsigned integer 4x2 matrix. 34 | /// 35 | /// @see ext_matrix_uint4x2_sized 36 | typedef mat<4, 2, uint16, defaultp> u16mat4x2; 37 | 38 | /// 32 bit unsigned integer 4x2 matrix. 39 | /// 40 | /// @see ext_matrix_uint4x2_sized 41 | typedef mat<4, 2, uint32, defaultp> u32mat4x2; 42 | 43 | /// 64 bit unsigned integer 4x2 matrix. 44 | /// 45 | /// @see ext_matrix_uint4x2_sized 46 | typedef mat<4, 2, uint64, defaultp> u64mat4x2; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x3 2 | /// @file glm/ext/matrix_uint4x3.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x3 GLM_EXT_matrix_uint4x3 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x3.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint4x3 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint4x3 25 | /// @{ 26 | 27 | /// Unsigned integer 4x3 matrix. 28 | /// 29 | /// @see ext_matrix_uint4x3 30 | typedef mat<4, 3, uint, defaultp> umat4x3; 31 | 32 | /// @} 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint4x3_sized.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x3_sized 2 | /// @file glm/ext/matrix_uint4x3_sized.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x3_sized GLM_EXT_matrix_uint4x3_sized 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x3.hpp" 17 | #include "../ext/scalar_uint_sized.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_matrix_uint4x3_sized extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_matrix_uint4x3_sized 26 | /// @{ 27 | 28 | /// 8 bit unsigned integer 4x3 matrix. 29 | /// 30 | /// @see ext_matrix_uint4x3_sized 31 | typedef mat<4, 3, uint8, defaultp> u8mat4x3; 32 | 33 | /// 16 bit unsigned integer 4x3 matrix. 34 | /// 35 | /// @see ext_matrix_uint4x3_sized 36 | typedef mat<4, 3, uint16, defaultp> u16mat4x3; 37 | 38 | /// 32 bit unsigned integer 4x3 matrix. 39 | /// 40 | /// @see ext_matrix_uint4x3_sized 41 | typedef mat<4, 3, uint32, defaultp> u32mat4x3; 42 | 43 | /// 64 bit unsigned integer 4x3 matrix. 44 | /// 45 | /// @see ext_matrix_uint4x3_sized 46 | typedef mat<4, 3, uint64, defaultp> u64mat4x3; 47 | 48 | /// @} 49 | }//namespace glm 50 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/matrix_uint4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_matrix_uint4x4 2 | /// @file glm/ext/matrix_uint4x4.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_matrix_uint4x4 GLM_EXT_matrix_uint4x4 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Defines a number of matrices with integer types. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../mat4x4.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_matrix_uint4x4 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_matrix_uint4x4 25 | /// @{ 26 | 27 | /// Unsigned integer 4x4 matrix. 28 | /// 29 | /// @see ext_matrix_uint4x4 30 | typedef mat<4, 4, uint, defaultp> umat4x4; 31 | 32 | /// Unsigned integer 4x4 matrix. 33 | /// 34 | /// @see ext_matrix_uint4x4 35 | typedef mat<4, 4, uint, defaultp> umat4; 36 | 37 | /// @} 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_common_simd.inl: -------------------------------------------------------------------------------- 1 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_dot, float, true> 8 | { 9 | static GLM_FUNC_QUALIFIER float call(qua const& x, qua const& y) 10 | { 11 | return _mm_cvtss_f32(glm_vec1_dot(x.data, y.data)); 12 | } 13 | }; 14 | }//namespace detail 15 | }//namespace glm 16 | 17 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 18 | 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_double.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_double 2 | /// @file glm/ext/quaternion_double.hpp 3 | /// 4 | /// @defgroup ext_quaternion_double GLM_EXT_quaternion_double 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_float 12 | /// @see ext_quaternion_double_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_double extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_double 32 | /// @{ 33 | 34 | /// Quaternion of double-precision floating-point numbers. 35 | typedef qua dquat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_float.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float 2 | /// @file glm/ext/quaternion_float.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float GLM_EXT_quaternion_float 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_quaternion_double 12 | /// @see ext_quaternion_float_precision 13 | /// @see ext_quaternion_common 14 | /// @see ext_quaternion_exponential 15 | /// @see ext_quaternion_geometric 16 | /// @see ext_quaternion_relational 17 | /// @see ext_quaternion_transform 18 | /// @see ext_quaternion_trigonometric 19 | 20 | #pragma once 21 | 22 | // Dependency: 23 | #include "../detail/type_quat.hpp" 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # pragma message("GLM: GLM_EXT_quaternion_float extension included") 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup ext_quaternion_float 32 | /// @{ 33 | 34 | /// Quaternion of single-precision floating-point numbers. 35 | typedef qua quat; 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_float_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_quaternion_float_precision 2 | /// @file glm/ext/quaternion_float_precision.hpp 3 | /// 4 | /// @defgroup ext_quaternion_float_precision GLM_EXT_quaternion_float_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point quaternion type with various precision in term of ULPs. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependency: 14 | #include "../detail/type_quat.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_quaternion_float_precision extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_quaternion_float_precision 23 | /// @{ 24 | 25 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 26 | typedef qua lowp_quat; 27 | 28 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 29 | typedef qua mediump_quat; 30 | 31 | /// Quaternion of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 32 | typedef qua highp_quat; 33 | 34 | /// @} 35 | } //namespace glm 36 | 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_geometric.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER T dot(qua const& x, qua const& y) 5 | { 6 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'dot' accepts only floating-point inputs"); 7 | return detail::compute_dot, T, detail::is_aligned::value>::call(x, y); 8 | } 9 | 10 | template 11 | GLM_FUNC_QUALIFIER T length(qua const& q) 12 | { 13 | return glm::sqrt(dot(q, q)); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER qua normalize(qua const& q) 18 | { 19 | T len = length(q); 20 | if(len <= static_cast(0)) // Problem 21 | return qua(static_cast(1), static_cast(0), static_cast(0), static_cast(0)); 22 | T oneOverLen = static_cast(1) / len; 23 | return qua(q.w * oneOverLen, q.x * oneOverLen, q.y * oneOverLen, q.z * oneOverLen); 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER qua cross(qua const& q1, qua const& q2) 28 | { 29 | return qua( 30 | q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z, 31 | q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, 32 | q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, 33 | q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x); 34 | } 35 | }//namespace glm 36 | 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_relational.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y) 5 | { 6 | vec<4, bool, Q> Result; 7 | for(length_t i = 0; i < x.length(); ++i) 8 | Result[i] = x[i] == y[i]; 9 | return Result; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER vec<4, bool, Q> equal(qua const& x, qua const& y, T epsilon) 14 | { 15 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 16 | return lessThan(abs(v), vec<4, T, Q>(epsilon)); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y) 21 | { 22 | vec<4, bool, Q> Result; 23 | for(length_t i = 0; i < x.length(); ++i) 24 | Result[i] = x[i] != y[i]; 25 | return Result; 26 | } 27 | 28 | template 29 | GLM_FUNC_QUALIFIER vec<4, bool, Q> notEqual(qua const& x, qua const& y, T epsilon) 30 | { 31 | vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); 32 | return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon)); 33 | } 34 | }//namespace glm 35 | 36 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_transform.inl: -------------------------------------------------------------------------------- 1 | namespace glm 2 | { 3 | template 4 | GLM_FUNC_QUALIFIER qua rotate(qua const& q, T const& angle, vec<3, T, Q> const& v) 5 | { 6 | vec<3, T, Q> Tmp = v; 7 | 8 | // Axis of rotation must be normalised 9 | T len = glm::length(Tmp); 10 | if(abs(len - static_cast(1)) > static_cast(0.001)) 11 | { 12 | T oneOverLen = static_cast(1) / len; 13 | Tmp.x *= oneOverLen; 14 | Tmp.y *= oneOverLen; 15 | Tmp.z *= oneOverLen; 16 | } 17 | 18 | T const AngleRad(angle); 19 | T const Sin = sin(AngleRad * static_cast(0.5)); 20 | 21 | return q * qua(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 22 | } 23 | }//namespace glm 24 | 25 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/quaternion_trigonometric.inl: -------------------------------------------------------------------------------- 1 | #include "scalar_constants.hpp" 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T angle(qua const& x) 7 | { 8 | if (abs(x.w) > cos_one_over_two()) 9 | { 10 | T const a = asin(sqrt(x.x * x.x + x.y * x.y + x.z * x.z)) * static_cast(2); 11 | if(x.w < static_cast(0)) 12 | return pi() * static_cast(2) - a; 13 | return a; 14 | } 15 | 16 | return acos(x.w) * static_cast(2); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER vec<3, T, Q> axis(qua const& x) 21 | { 22 | T const tmp1 = static_cast(1) - x.w * x.w; 23 | if(tmp1 <= static_cast(0)) 24 | return vec<3, T, Q>(0, 0, 1); 25 | T const tmp2 = static_cast(1) / sqrt(tmp1); 26 | return vec<3, T, Q>(x.x * tmp2, x.y * tmp2, x.z * tmp2); 27 | } 28 | 29 | template 30 | GLM_FUNC_QUALIFIER qua angleAxis(T const& angle, vec<3, T, Q> const& v) 31 | { 32 | T const a(angle); 33 | T const s = glm::sin(a * static_cast(0.5)); 34 | 35 | return qua(glm::cos(a * static_cast(0.5)), v * s); 36 | } 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/scalar_constants.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_constants 2 | /// @file glm/ext/scalar_constants.hpp 3 | /// 4 | /// @defgroup ext_scalar_constants GLM_EXT_scalar_constants 5 | /// @ingroup ext 6 | /// 7 | /// Provides a list of constants and precomputed useful values. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | // Dependencies 14 | #include "../detail/setup.hpp" 15 | 16 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 17 | # pragma message("GLM: GLM_EXT_scalar_constants extension included") 18 | #endif 19 | 20 | namespace glm 21 | { 22 | /// @addtogroup ext_scalar_constants 23 | /// @{ 24 | 25 | /// Return the epsilon constant for floating point types. 26 | template 27 | GLM_FUNC_DECL GLM_CONSTEXPR genType epsilon(); 28 | 29 | /// Return the pi constant for floating point types. 30 | template 31 | GLM_FUNC_DECL GLM_CONSTEXPR genType pi(); 32 | 33 | /// Return the value of cos(1 / 2) for floating point types. 34 | template 35 | GLM_FUNC_DECL GLM_CONSTEXPR genType cos_one_over_two(); 36 | 37 | /// @} 38 | } //namespace glm 39 | 40 | #include "scalar_constants.inl" 41 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/scalar_constants.inl: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType epsilon() 7 | { 8 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'epsilon' only accepts floating-point inputs"); 9 | return std::numeric_limits::epsilon(); 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType pi() 14 | { 15 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'pi' only accepts floating-point inputs"); 16 | return static_cast(3.14159265358979323846264338327950288); 17 | } 18 | 19 | template 20 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR genType cos_one_over_two() 21 | { 22 | return genType(0.877582561890372716130286068203503191); 23 | } 24 | } //namespace glm 25 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/scalar_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_scalar_packing 2 | /// @file glm/ext/scalar_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_scalar_packing GLM_EXT_scalar_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert scalar values to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_scalar_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_scalar_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "scalar_packing.inl" 33 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/scalar_packing.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/include/glm/ext/scalar_packing.inl -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | #include "../common.hpp" 2 | #include "../ext/scalar_int_sized.hpp" 3 | #include "../ext/scalar_uint_sized.hpp" 4 | #include "../detail/type_float.hpp" 5 | 6 | namespace glm 7 | { 8 | template 9 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, genType const& epsilon) 10 | { 11 | return abs(x - y) <= epsilon; 12 | } 13 | 14 | template 15 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, genType const& epsilon) 16 | { 17 | return abs(x - y) > epsilon; 18 | } 19 | 20 | template 21 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool equal(genType const& x, genType const& y, int MaxULPs) 22 | { 23 | detail::float_t const a(x); 24 | detail::float_t const b(y); 25 | 26 | // Different signs means they do not match. 27 | if(a.negative() != b.negative()) 28 | return false; 29 | 30 | // Find the difference in ULPs. 31 | typename detail::float_t::int_type const DiffULPs = abs(a.i - b.i); 32 | return DiffULPs <= MaxULPs; 33 | } 34 | 35 | template 36 | GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool notEqual(genType const& x, genType const& y, int ULPs) 37 | { 38 | return !equal(x, y, ULPs); 39 | } 40 | }//namespace glm 41 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_bool1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1 2 | /// @file glm/ext/vector_bool1.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1 GLM_EXT_vector_bool1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes bvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_bool1_precision extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_bool1 extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_bool1 24 | /// @{ 25 | 26 | /// 1 components vector of boolean. 27 | typedef vec<1, bool, defaultp> bvec1; 28 | 29 | /// @} 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_bool1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_bool1_precision 2 | /// @file glm/ext/vector_bool1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_bool1_precision GLM_EXT_vector_bool1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_bvec1, mediump_bvec1 and lowp_bvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | 11 | #pragma once 12 | 13 | #include "../detail/type_vec1.hpp" 14 | 15 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 16 | # pragma message("GLM: GLM_EXT_vector_bool1_precision extension included") 17 | #endif 18 | 19 | namespace glm 20 | { 21 | /// @addtogroup ext_vector_bool1_precision 22 | /// @{ 23 | 24 | /// 1 component vector of bool values. 25 | typedef vec<1, bool, highp> highp_bvec1; 26 | 27 | /// 1 component vector of bool values. 28 | typedef vec<1, bool, mediump> mediump_bvec1; 29 | 30 | /// 1 component vector of bool values. 31 | typedef vec<1, bool, lowp> lowp_bvec1; 32 | 33 | /// @} 34 | }//namespace glm 35 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_bool2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, bool, defaultp> bvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_bool3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, bool, defaultp> bvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_bool4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_bool4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of boolean. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, bool, defaultp> bvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_double1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1 2 | /// @file glm/ext/vector_double1.hpp 3 | /// 4 | /// @defgroup ext_vector_double1 GLM_EXT_vector_double1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes double-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1_precision extension. 12 | /// @see ext_vector_float1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_double1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_double1 25 | /// @{ 26 | 27 | /// 1 components vector of double-precision floating-point numbers. 28 | typedef vec<1, double, defaultp> dvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_double1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_double1_precision 2 | /// @file glm/ext/vector_double1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_double1_precision GLM_EXT_vector_double1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_dvec1, mediump_dvec1 and lowp_dvec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_double1 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_double1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_double1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of double-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, double, highp> highp_dvec1; 28 | 29 | /// 1 component vector of double-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, double, mediump> mediump_dvec1; 31 | 32 | /// 1 component vector of double-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, double, lowp> lowp_dvec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_double2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, double, defaultp> dvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_double3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, double, defaultp> dvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_double4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_double4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of double-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, double, defaultp> dvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_float1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1 2 | /// @file glm/ext/vector_float1.hpp 3 | /// 4 | /// @defgroup ext_vector_float1 GLM_EXT_vector_float1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes single-precision floating point vector type with one component. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1_precision extension. 12 | /// @see ext_vector_double1 extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_float1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_float1 25 | /// @{ 26 | 27 | /// 1 components vector of single-precision floating-point numbers. 28 | typedef vec<1, float, defaultp> vec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_float1_precision.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_float1_precision 2 | /// @file glm/ext/vector_float1_precision.hpp 3 | /// 4 | /// @defgroup ext_vector_float1_precision GLM_EXT_vector_float1_precision 5 | /// @ingroup ext 6 | /// 7 | /// Exposes highp_vec1, mediump_vec1 and lowp_vec1 types. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_float1 extension. 12 | 13 | #pragma once 14 | 15 | #include "../detail/type_vec1.hpp" 16 | 17 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 18 | # pragma message("GLM: GLM_EXT_vector_float1_precision extension included") 19 | #endif 20 | 21 | namespace glm 22 | { 23 | /// @addtogroup ext_vector_float1_precision 24 | /// @{ 25 | 26 | /// 1 component vector of single-precision floating-point numbers using high precision arithmetic in term of ULPs. 27 | typedef vec<1, float, highp> highp_vec1; 28 | 29 | /// 1 component vector of single-precision floating-point numbers using medium precision arithmetic in term of ULPs. 30 | typedef vec<1, float, mediump> mediump_vec1; 31 | 32 | /// 1 component vector of single-precision floating-point numbers using low precision arithmetic in term of ULPs. 33 | typedef vec<1, float, lowp> lowp_vec1; 34 | 35 | /// @} 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_float2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, float, defaultp> vec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_float3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, float, defaultp> vec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_float4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_float4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of single-precision floating-point numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, float, defaultp> vec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_int1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_int1 2 | /// @file glm/ext/vector_int1.hpp 3 | /// 4 | /// @defgroup ext_vector_int1 GLM_EXT_vector_int1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes ivec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_uint1 extension. 12 | /// @see ext_vector_int1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_int1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_int1 25 | /// @{ 26 | 27 | /// 1 component vector of signed integer numbers. 28 | typedef vec<1, int, defaultp> ivec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_int2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, int, defaultp> ivec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_int3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, int, defaultp> ivec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_int4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_int4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of signed integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, int, defaultp> ivec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_packing.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_packing 2 | /// @file glm/ext/vector_packing.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup ext_vector_packing GLM_EXT_vector_packing 7 | /// @ingroup ext 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// This extension provides a set of function to convert vectors to packed 12 | /// formats. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../detail/qualifier.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_EXT_vector_packing extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup ext_vector_packing 26 | /// @{ 27 | 28 | 29 | /// @} 30 | }// namespace glm 31 | 32 | #include "vector_packing.inl" 33 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_packing.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/include/glm/ext/vector_packing.inl -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_uint1.hpp: -------------------------------------------------------------------------------- 1 | /// @ref ext_vector_uint1 2 | /// @file glm/ext/vector_uint1.hpp 3 | /// 4 | /// @defgroup ext_vector_uint1 GLM_EXT_vector_uint1 5 | /// @ingroup ext 6 | /// 7 | /// Exposes uvec1 vector type. 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// @see ext_vector_int1 extension. 12 | /// @see ext_vector_uint1_precision extension. 13 | 14 | #pragma once 15 | 16 | #include "../detail/type_vec1.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_EXT_vector_uint1 extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup ext_vector_uint1 25 | /// @{ 26 | 27 | /// 1 component vector of unsigned integer numbers. 28 | typedef vec<1, unsigned int, defaultp> uvec1; 29 | 30 | /// @} 31 | }//namespace glm 32 | 33 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_uint2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint2.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec2.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 2 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<2, unsigned int, defaultp> uvec2; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_uint3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint3.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec3.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 3 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<3, unsigned int, defaultp> uvec3; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/ext/vector_uint4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/ext/vector_uint4.hpp 3 | 4 | #pragma once 5 | #include "../detail/type_vec4.hpp" 6 | 7 | namespace glm 8 | { 9 | /// @addtogroup core_vector 10 | /// @{ 11 | 12 | /// 4 components vector of unsigned integer numbers. 13 | /// 14 | /// @see GLSL 4.20.8 specification, section 4.1.5 Vectors 15 | typedef vec<4, unsigned int, defaultp> uvec4; 16 | 17 | /// @} 18 | }//namespace glm 19 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/integer.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_integer 2 | /// @file glm/gtc/integer.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_integer (dependence) 6 | /// 7 | /// @defgroup gtc_integer GLM_GTC_integer 8 | /// @ingroup gtc 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 "../common.hpp" 20 | #include "../integer.hpp" 21 | #include "../exponential.hpp" 22 | #include "../ext/scalar_common.hpp" 23 | #include "../ext/vector_common.hpp" 24 | #include 25 | 26 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 27 | # pragma message("GLM: GLM_GTC_integer extension included") 28 | #endif 29 | 30 | namespace glm 31 | { 32 | /// @addtogroup gtc_integer 33 | /// @{ 34 | 35 | /// Returns the log2 of x for integer values. Usefull to compute mipmap count from the texture size. 36 | /// @see gtc_integer 37 | template 38 | GLM_FUNC_DECL genIUType log2(genIUType x); 39 | 40 | /// @} 41 | } //namespace glm 42 | 43 | #include "integer.inl" 44 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/integer.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_integer 2 | 3 | namespace glm{ 4 | namespace detail 5 | { 6 | template 7 | struct compute_log2 8 | { 9 | GLM_FUNC_QUALIFIER static vec call(vec const& v) 10 | { 11 | //Equivalent to return findMSB(vec); but save one function call in ASM with VC 12 | //return findMSB(vec); 13 | return vec(detail::compute_findMSB_vec::call(v)); 14 | } 15 | }; 16 | 17 | # if GLM_HAS_BITSCAN_WINDOWS 18 | template 19 | struct compute_log2<4, int, Q, false, Aligned> 20 | { 21 | GLM_FUNC_QUALIFIER static vec<4, int, Q> call(vec<4, int, Q> const& v) 22 | { 23 | vec<4, int, Q> Result; 24 | _BitScanReverse(reinterpret_cast(&Result.x), v.x); 25 | _BitScanReverse(reinterpret_cast(&Result.y), v.y); 26 | _BitScanReverse(reinterpret_cast(&Result.z), v.z); 27 | _BitScanReverse(reinterpret_cast(&Result.w), v.w); 28 | return Result; 29 | } 30 | }; 31 | # endif//GLM_HAS_BITSCAN_WINDOWS 32 | }//namespace detail 33 | }//namespace glm 34 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/matrix_access.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_access 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType row 7 | ( 8 | genType const& m, 9 | length_t index, 10 | typename genType::row_type const& x 11 | ) 12 | { 13 | assert(index >= 0 && index < m[0].length()); 14 | 15 | genType Result = m; 16 | for(length_t i = 0; i < m.length(); ++i) 17 | Result[i][index] = x[i]; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER typename genType::row_type row 23 | ( 24 | genType const& m, 25 | length_t index 26 | ) 27 | { 28 | assert(index >= 0 && index < m[0].length()); 29 | 30 | typename genType::row_type Result(0); 31 | for(length_t i = 0; i < m.length(); ++i) 32 | Result[i] = m[i][index]; 33 | return Result; 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER genType column 38 | ( 39 | genType const& m, 40 | length_t index, 41 | typename genType::col_type const& x 42 | ) 43 | { 44 | assert(index >= 0 && index < m.length()); 45 | 46 | genType Result = m; 47 | Result[index] = x; 48 | return Result; 49 | } 50 | 51 | template 52 | GLM_FUNC_QUALIFIER typename genType::col_type column 53 | ( 54 | genType const& m, 55 | length_t index 56 | ) 57 | { 58 | assert(index >= 0 && index < m.length()); 59 | 60 | return m[index]; 61 | } 62 | }//namespace glm 63 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/matrix_transform.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_matrix_transform 2 | /// @file glm/gtc/matrix_transform.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_transform 6 | /// @see gtx_transform2 7 | /// 8 | /// @defgroup gtc_matrix_transform GLM_GTC_matrix_transform 9 | /// @ingroup gtc 10 | /// 11 | /// Include to use the features of this extension. 12 | /// 13 | /// Defines functions that generate common transformation matrices. 14 | /// 15 | /// The matrices generated by this extension use standard OpenGL fixed-function 16 | /// conventions. For example, the lookAt function generates a transform from world 17 | /// space into the specific eye space that the projective matrix functions 18 | /// (perspective, ortho, etc) are designed to expect. The OpenGL compatibility 19 | /// specifications defines the particular layout of this eye space. 20 | 21 | #pragma once 22 | 23 | // Dependencies 24 | #include "../mat4x4.hpp" 25 | #include "../vec2.hpp" 26 | #include "../vec3.hpp" 27 | #include "../vec4.hpp" 28 | #include "../ext/matrix_projection.hpp" 29 | #include "../ext/matrix_clip_space.hpp" 30 | #include "../ext/matrix_transform.hpp" 31 | 32 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 33 | # pragma message("GLM: GLM_GTC_matrix_transform extension included") 34 | #endif 35 | 36 | #include "matrix_transform.inl" 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/matrix_transform.inl: -------------------------------------------------------------------------------- 1 | #include "../geometric.hpp" 2 | #include "../trigonometric.hpp" 3 | #include "../matrix.hpp" 4 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/quaternion_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/include/glm/gtc/quaternion_simd.inl -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/reciprocal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtc_reciprocal 2 | /// @file glm/gtc/reciprocal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtc_reciprocal GLM_GTC_reciprocal 7 | /// @ingroup gtc 8 | /// 9 | /// Include to use the features of this extension. 10 | /// 11 | /// Define secant, cosecant and cotangent functions. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTC_reciprocal extension included") 20 | #endif 21 | 22 | #include "../ext/scalar_reciprocal.hpp" 23 | #include "../ext/vector_reciprocal.hpp" 24 | 25 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /3rd/glm/include/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/vector_bool1.hpp" 17 | #include "../ext/vector_bool1_precision.hpp" 18 | #include "../ext/vector_float1.hpp" 19 | #include "../ext/vector_float1_precision.hpp" 20 | #include "../ext/vector_double1.hpp" 21 | #include "../ext/vector_double1_precision.hpp" 22 | #include "../ext/vector_int1.hpp" 23 | #include "../ext/vector_int1_sized.hpp" 24 | #include "../ext/vector_uint1.hpp" 25 | #include "../ext/vector_uint1_sized.hpp" 26 | 27 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 28 | # pragma message("GLM: GLM_GTC_vec1 extension included") 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/closest_point.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_closest_point 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> closestPointOnLine 7 | ( 8 | vec<3, T, Q> const& point, 9 | vec<3, T, Q> const& a, 10 | vec<3, T, Q> const& b 11 | ) 12 | { 13 | T LineLength = distance(a, b); 14 | vec<3, T, Q> Vector = point - a; 15 | vec<3, T, Q> LineDirection = (b - a) / LineLength; 16 | 17 | // Project Vector to LineDirection to get the distance of point from a 18 | T Distance = dot(Vector, LineDirection); 19 | 20 | if(Distance <= T(0)) return a; 21 | if(Distance >= LineLength) return b; 22 | return a + LineDirection * Distance; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER vec<2, T, Q> closestPointOnLine 27 | ( 28 | vec<2, T, Q> const& point, 29 | vec<2, T, Q> const& a, 30 | vec<2, T, Q> const& b 31 | ) 32 | { 33 | T LineLength = distance(a, b); 34 | vec<2, T, Q> Vector = point - a; 35 | vec<2, T, Q> LineDirection = (b - a) / LineLength; 36 | 37 | // Project Vector to LineDirection to get the distance of point from a 38 | T Distance = dot(Vector, LineDirection); 39 | 40 | if(Distance <= T(0)) return a; 41 | if(Distance >= LineLength) return b; 42 | return a + LineDirection * Distance; 43 | } 44 | 45 | }//namespace glm 46 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("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.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_extend extension included") 23 | # endif 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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/extend.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_extend 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType extend 7 | ( 8 | genType const& Origin, 9 | genType const& Source, 10 | genType const& Distance 11 | ) 12 | { 13 | return Origin + (Source - Origin) * Distance; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER vec<2, T, Q> extend 18 | ( 19 | vec<2, T, Q> const& Origin, 20 | vec<2, T, Q> const& Source, 21 | T const& Distance 22 | ) 23 | { 24 | return Origin + (Source - Origin) * Distance; 25 | } 26 | 27 | template 28 | GLM_FUNC_QUALIFIER vec<3, T, Q> extend 29 | ( 30 | vec<3, T, Q> const& Origin, 31 | vec<3, T, Q> const& Source, 32 | T const& Distance 33 | ) 34 | { 35 | return Origin + (Source - Origin) * Distance; 36 | } 37 | 38 | template 39 | GLM_FUNC_QUALIFIER vec<4, T, Q> extend 40 | ( 41 | vec<4, T, Q> const& Origin, 42 | vec<4, T, Q> const& Source, 43 | T const& Distance 44 | ) 45 | { 46 | return Origin + (Source - Origin) * Distance; 47 | } 48 | }//namespace glm 49 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/exterior_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_exterior_product 2 | 3 | #include 4 | 5 | namespace glm { 6 | namespace detail 7 | { 8 | template 9 | struct compute_cross_vec2 10 | { 11 | GLM_FUNC_QUALIFIER static T call(vec<2, T, Q> const& v, vec<2, T, Q> const& u) 12 | { 13 | GLM_STATIC_ASSERT(std::numeric_limits::is_iec559, "'cross' accepts only floating-point inputs"); 14 | 15 | return v.x * u.y - u.x * v.y; 16 | } 17 | }; 18 | }//namespace detail 19 | 20 | template 21 | GLM_FUNC_QUALIFIER T cross(vec<2, T, Q> const& x, vec<2, T, Q> const& y) 22 | { 23 | return detail::compute_cross_vec2::value>::call(x, y); 24 | } 25 | }//namespace glm 26 | 27 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/float_notmalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_float_normalize 2 | 3 | #include 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER vec floatNormalize(vec const& v) 9 | { 10 | return vec(v) / static_cast(std::numeric_limits::max()); 11 | } 12 | 13 | }//namespace glm 14 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/functions.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_functions 2 | 3 | #include "../exponential.hpp" 4 | 5 | namespace glm 6 | { 7 | template 8 | GLM_FUNC_QUALIFIER T gauss 9 | ( 10 | T x, 11 | T ExpectedValue, 12 | T StandardDeviation 13 | ) 14 | { 15 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576))); 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER T gauss 20 | ( 21 | vec<2, T, Q> const& Coord, 22 | vec<2, T, Q> const& ExpectedValue, 23 | vec<2, T, Q> const& StandardDeviation 24 | ) 25 | { 26 | vec<2, T, Q> const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation); 27 | return exp(-(Squared.x + Squared.y)); 28 | } 29 | }//namespace glm 30 | 31 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/gradient_paint.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_gradient_paint 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T radialGradient 7 | ( 8 | vec<2, T, Q> const& Center, 9 | T const& Radius, 10 | vec<2, T, Q> const& Focal, 11 | vec<2, T, Q> const& Position 12 | ) 13 | { 14 | vec<2, T, Q> F = Focal - Center; 15 | vec<2, T, Q> D = Position - Focal; 16 | T Radius2 = pow2(Radius); 17 | T Fx2 = pow2(F.x); 18 | T Fy2 = pow2(F.y); 19 | 20 | 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)); 21 | T Denominator = Radius2 - (Fx2 + Fy2); 22 | return Numerator / Denominator; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER T linearGradient 27 | ( 28 | vec<2, T, Q> const& Point0, 29 | vec<2, T, Q> const& Point1, 30 | vec<2, T, Q> const& Position 31 | ) 32 | { 33 | vec<2, T, Q> Dist = Point1 - Point0; 34 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist); 35 | } 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/handed_coordinate_space.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_handed_coordinate_space 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER bool rightHanded 7 | ( 8 | vec<3, T, Q> const& tangent, 9 | vec<3, T, Q> const& binormal, 10 | vec<3, T, Q> const& normal 11 | ) 12 | { 13 | return dot(cross(normal, tangent), binormal) > T(0); 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool leftHanded 18 | ( 19 | vec<3, T, Q> const& tangent, 20 | vec<3, T, Q> const& binormal, 21 | vec<3, T, Q> const& normal 22 | ) 23 | { 24 | return dot(cross(normal, tangent), binormal) < T(0); 25 | } 26 | }//namespace glm 27 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("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.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_log_base extension included") 23 | # endif 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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/log_base.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_log_base 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType log(genType const& x, genType const& base) 7 | { 8 | return glm::log(x) / glm::log(base); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER vec log(vec const& x, vec const& base) 13 | { 14 | return glm::log(x) / glm::log(base); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/matrix_cross_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_cross_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> matrixCross3 7 | ( 8 | vec<3, T, Q> const& x 9 | ) 10 | { 11 | mat<3, 3, T, Q> Result(T(0)); 12 | Result[0][1] = x.z; 13 | Result[1][0] = -x.z; 14 | Result[0][2] = -x.y; 15 | Result[2][0] = x.y; 16 | Result[1][2] = x.x; 17 | Result[2][1] = -x.x; 18 | return Result; 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> matrixCross4 23 | ( 24 | vec<3, T, Q> const& x 25 | ) 26 | { 27 | mat<4, 4, T, Q> Result(T(0)); 28 | Result[0][1] = x.z; 29 | Result[1][0] = -x.z; 30 | Result[0][2] = -x.y; 31 | Result[2][0] = x.y; 32 | Result[1][2] = x.x; 33 | Result[2][1] = -x.x; 34 | return Result; 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/matrix_factorisation.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/glm/include/glm/gtx/matrix_factorisation.inl -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("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.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_mixed_product extension included") 23 | # endif 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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T mixedProduct 7 | ( 8 | vec<3, T, Q> const& v1, 9 | vec<3, T, Q> const& v2, 10 | vec<3, T, Q> const& v3 11 | ) 12 | { 13 | return dot(cross(v1, v2), v3); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 20 | # ifndef GLM_ENABLE_EXPERIMENTAL 21 | # pragma message("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.") 22 | # else 23 | # pragma message("GLM: GLM_GTX_normal extension included") 24 | # endif 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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> triangleNormal 7 | ( 8 | vec<3, T, Q> const& p1, 9 | vec<3, T, Q> const& p2, 10 | vec<3, T, Q> const& p3 11 | ) 12 | { 13 | return normalize(cross(p1 - p2, p1 - p3)); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER T normalizeDot(vec const& x, vec const& y) 7 | { 8 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vec const& x, vec const& y) 13 | { 14 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType pow2(genType const& x) 7 | { 8 | return x * x; 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER genType pow3(genType const& x) 13 | { 14 | return x * x * x; 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER genType pow4(genType const& x) 19 | { 20 | return (x * x) * (x * x); 21 | } 22 | }//namespace glm 23 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orthonormalize(mat<3, 3, T, Q> const& m) 7 | { 8 | mat<3, 3, T, Q> r = m; 9 | 10 | r[0] = normalize(r[0]); 11 | 12 | T d0 = dot(r[0], r[1]); 13 | r[1] -= r[0] * d0; 14 | r[1] = normalize(r[1]); 15 | 16 | T d1 = dot(r[1], r[2]); 17 | d0 = dot(r[0], r[2]); 18 | r[2] -= r[0] * d0 + r[1] * d1; 19 | r[2] = normalize(r[2]); 20 | 21 | return r; 22 | } 23 | 24 | template 25 | GLM_FUNC_QUALIFIER vec<3, T, Q> orthonormalize(vec<3, T, Q> const& x, vec<3, T, Q> const& y) 26 | { 27 | return normalize(x - y * dot(y, x)); 28 | } 29 | }//namespace glm 30 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 21 | # ifndef GLM_ENABLE_EXPERIMENTAL 22 | # pragma message("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.") 23 | # else 24 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 25 | # endif 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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType perp(genType const& x, genType const& Normal) 7 | { 8 | return x - proj(x, Normal); 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER vec<3, T, Q> polar 7 | ( 8 | vec<3, T, Q> const& euclidean 9 | ) 10 | { 11 | T const Length(length(euclidean)); 12 | vec<3, T, Q> const tmp(euclidean / Length); 13 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 14 | 15 | return vec<3, T, Q>( 16 | asin(tmp.y), // latitude 17 | atan(tmp.x, tmp.z), // longitude 18 | xz_dist); // xz distance 19 | } 20 | 21 | template 22 | GLM_FUNC_QUALIFIER vec<3, T, Q> euclidean 23 | ( 24 | vec<2, T, Q> const& polar 25 | ) 26 | { 27 | T const latitude(polar.x); 28 | T const longitude(polar.y); 29 | 30 | return vec<3, T, Q>( 31 | cos(latitude) * sin(longitude), 32 | sin(latitude), 33 | cos(latitude) * cos(longitude)); 34 | } 35 | 36 | }//namespace glm 37 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("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.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_projection extension included") 23 | # endif 24 | #endif 25 | 26 | namespace glm 27 | { 28 | /// @addtogroup gtx_projection 29 | /// @{ 30 | 31 | /// Projects x on Normal. 32 | /// 33 | /// @param[in] x A vector to project 34 | /// @param[in] Normal A normal that doesn't need to be of unit length. 35 | /// 36 | /// @see gtx_projection 37 | template 38 | GLM_FUNC_DECL genType proj(genType const& x, genType const& Normal); 39 | 40 | /// @} 41 | }//namespace glm 42 | 43 | #include "projection.inl" 44 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER genType proj(genType const& x, genType const& Normal) 7 | { 8 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 9 | } 10 | }//namespace glm 11 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | 3 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 19 | # ifndef GLM_ENABLE_EXPERIMENTAL 20 | # pragma message("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.") 21 | # else 22 | # pragma message("GLM: GLM_GTX_extend extension included") 23 | # endif 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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | #pragma once 16 | 17 | // Dependency: 18 | #include "../glm.hpp" 19 | #include "../gtc/type_precision.hpp" 20 | #include "../gtc/quaternion.hpp" 21 | #include "../gtx/dual_quaternion.hpp" 22 | #include 23 | #include 24 | 25 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 26 | # ifndef GLM_ENABLE_EXPERIMENTAL 27 | # pragma message("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.") 28 | # else 29 | # pragma message("GLM: GLM_GTX_string_cast extension included") 30 | # endif 31 | #endif 32 | 33 | namespace glm 34 | { 35 | /// @addtogroup gtx_string_cast 36 | /// @{ 37 | 38 | /// Create a string from a GLM vector or matrix typed variable. 39 | /// @see gtx_string_cast extension. 40 | template 41 | GLM_FUNC_DECL std::string to_string(genType const& x); 42 | 43 | /// @} 44 | }//namespace glm 45 | 46 | #include "string_cast.inl" 47 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/texture.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_texture 2 | 3 | namespace glm 4 | { 5 | template 6 | inline T levels(vec const& Extent) 7 | { 8 | return glm::log2(compMax(Extent)) + static_cast(1); 9 | } 10 | 11 | template 12 | inline T levels(T Extent) 13 | { 14 | return vec<1, T, defaultp>(Extent).x; 15 | } 16 | }//namespace glm 17 | 18 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/transform.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_transform 2 | 3 | namespace glm 4 | { 5 | template 6 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> translate(vec<3, T, Q> const& v) 7 | { 8 | return translate(mat<4, 4, T, Q>(static_cast(1)), v); 9 | } 10 | 11 | template 12 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> rotate(T angle, vec<3, T, Q> const& v) 13 | { 14 | return rotate(mat<4, 4, T, Q>(static_cast(1)), angle, v); 15 | } 16 | 17 | template 18 | GLM_FUNC_QUALIFIER mat<4, 4, T, Q> scale(vec<3, T, Q> const& v) 19 | { 20 | return scale(mat<4, 4, T, Q>(static_cast(1)), v); 21 | } 22 | 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/type_aligned.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_type_aligned 2 | 3 | namespace glm 4 | { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /3rd/glm/include/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 "../ext/scalar_common.hpp" 18 | #include "../ext/vector_common.hpp" 19 | #include "../gtc/vec1.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) 22 | # ifndef GLM_ENABLE_EXPERIMENTAL 23 | # pragma message("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.") 24 | # else 25 | # pragma message("GLM: GLM_GTX_wrap extension included") 26 | # endif 27 | #endif 28 | 29 | namespace glm 30 | { 31 | /// @addtogroup gtx_wrap 32 | /// @{ 33 | 34 | /// @} 35 | }// namespace glm 36 | 37 | #include "wrap.inl" 38 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/gtx/wrap.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_wrap 2 | 3 | namespace glm 4 | { 5 | 6 | }//namespace glm 7 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat2x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x2.hpp" 6 | #include "./ext/matrix_double2x2_precision.hpp" 7 | #include "./ext/matrix_float2x2.hpp" 8 | #include "./ext/matrix_float2x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat2x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x3.hpp" 6 | #include "./ext/matrix_double2x3_precision.hpp" 7 | #include "./ext/matrix_float2x3.hpp" 8 | #include "./ext/matrix_float2x3_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat2x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat2x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double2x4.hpp" 6 | #include "./ext/matrix_double2x4_precision.hpp" 7 | #include "./ext/matrix_float2x4.hpp" 8 | #include "./ext/matrix_float2x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat3x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x2.hpp" 6 | #include "./ext/matrix_double3x2_precision.hpp" 7 | #include "./ext/matrix_float3x2.hpp" 8 | #include "./ext/matrix_float3x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat3x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x3.hpp" 6 | #include "./ext/matrix_double3x3_precision.hpp" 7 | #include "./ext/matrix_float3x3.hpp" 8 | #include "./ext/matrix_float3x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat3x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat3x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double3x4.hpp" 6 | #include "./ext/matrix_double3x4_precision.hpp" 7 | #include "./ext/matrix_float3x4.hpp" 8 | #include "./ext/matrix_float3x4_precision.hpp" 9 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat4x2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x2.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x2.hpp" 6 | #include "./ext/matrix_double4x2_precision.hpp" 7 | #include "./ext/matrix_float4x2.hpp" 8 | #include "./ext/matrix_float4x2_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat4x3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x3.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x3.hpp" 6 | #include "./ext/matrix_double4x3_precision.hpp" 7 | #include "./ext/matrix_float4x3.hpp" 8 | #include "./ext/matrix_float4x3_precision.hpp" 9 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/mat4x4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/mat4x4.hpp 3 | 4 | #pragma once 5 | #include "./ext/matrix_double4x4.hpp" 6 | #include "./ext/matrix_double4x4_precision.hpp" 7 | #include "./ext/matrix_float4x4.hpp" 8 | #include "./ext/matrix_float4x4_precision.hpp" 9 | 10 | -------------------------------------------------------------------------------- /3rd/glm/include/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_f32vec4 glm_vec1_sqrt_lowp(glm_f32vec4 x) 11 | { 12 | return _mm_mul_ss(_mm_rsqrt_ss(x), x); 13 | } 14 | 15 | GLM_FUNC_QUALIFIER glm_f32vec4 glm_vec4_sqrt_lowp(glm_f32vec4 x) 16 | { 17 | return _mm_mul_ps(_mm_rsqrt_ps(x), x); 18 | } 19 | 20 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT 21 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | -------------------------------------------------------------------------------- /3rd/glm/include/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 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/vec2.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec2.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool2.hpp" 6 | #include "./ext/vector_bool2_precision.hpp" 7 | #include "./ext/vector_float2.hpp" 8 | #include "./ext/vector_float2_precision.hpp" 9 | #include "./ext/vector_double2.hpp" 10 | #include "./ext/vector_double2_precision.hpp" 11 | #include "./ext/vector_int2.hpp" 12 | #include "./ext/vector_int2_sized.hpp" 13 | #include "./ext/vector_uint2.hpp" 14 | #include "./ext/vector_uint2_sized.hpp" 15 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/vec3.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec3.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool3.hpp" 6 | #include "./ext/vector_bool3_precision.hpp" 7 | #include "./ext/vector_float3.hpp" 8 | #include "./ext/vector_float3_precision.hpp" 9 | #include "./ext/vector_double3.hpp" 10 | #include "./ext/vector_double3_precision.hpp" 11 | #include "./ext/vector_int3.hpp" 12 | #include "./ext/vector_int3_sized.hpp" 13 | #include "./ext/vector_uint3.hpp" 14 | #include "./ext/vector_uint3_sized.hpp" 15 | -------------------------------------------------------------------------------- /3rd/glm/include/glm/vec4.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/vec4.hpp 3 | 4 | #pragma once 5 | #include "./ext/vector_bool4.hpp" 6 | #include "./ext/vector_bool4_precision.hpp" 7 | #include "./ext/vector_float4.hpp" 8 | #include "./ext/vector_float4_precision.hpp" 9 | #include "./ext/vector_double4.hpp" 10 | #include "./ext/vector_double4_precision.hpp" 11 | #include "./ext/vector_int4.hpp" 12 | #include "./ext/vector_int4_sized.hpp" 13 | #include "./ext/vector_uint4.hpp" 14 | #include "./ext/vector_uint4_sized.hpp" 15 | 16 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/asn1_mac.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #error "This file is obsolete; please update your software." 11 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/asyncerr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ASYNCERR_H 12 | # define OPENSSL_ASYNCERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * ASYNC reason codes. 23 | */ 24 | # define ASYNC_R_FAILED_TO_SET_POOL 101 25 | # define ASYNC_R_FAILED_TO_SWAP_CONTEXT 102 26 | # define ASYNC_R_INIT_FAILED 105 27 | # define ASYNC_R_INVALID_POOL_SIZE 103 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/buffererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_BUFFERERR_H 12 | # define OPENSSL_BUFFERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * BUF reason codes. 23 | */ 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/comperr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_COMPERR_H 12 | # define OPENSSL_COMPERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | # ifndef OPENSSL_NO_COMP 21 | 22 | 23 | /* 24 | * COMP reason codes. 25 | */ 26 | # define COMP_R_ZLIB_DEFLATE_ERROR 99 27 | # define COMP_R_ZLIB_INFLATE_ERROR 100 28 | # define COMP_R_ZLIB_NOT_SUPPORTED 101 29 | 30 | # endif 31 | #endif 32 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/configuration.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** This file is auto generated by https://github.com/axys1/buildware.git 3 | */ 4 | #ifndef BUILDWARE_openssl_REDIRECT_H 5 | #define BUILDWARE_openssl_REDIRECT_H 6 | 7 | #if defined(_WIN32) 8 | 9 | # if defined(_WIN64) 10 | # include "win64/openssl/configuration.h" 11 | # else 12 | # include "win32/openssl/configuration.h" 13 | # endif 14 | 15 | #elif defined(__APPLE__) 16 | # include 17 | 18 | # if TARGET_IPHONE_SIMULATOR == 1 19 | # include "ios-x64/openssl/configuration.h" 20 | # elif TARGET_OS_IPHONE == 1 21 | # if defined(__arm64__) 22 | # include "ios-arm64/openssl/configuration.h" 23 | # elif defined(__arm__) 24 | # include "ios-arm/openssl/configuration.h" 25 | # endif 26 | # elif TARGET_OS_MAC == 1 27 | # include "mac/openssl/configuration.h" 28 | # endif 29 | 30 | #elif defined(__ANDROID__) 31 | 32 | # if defined(__aarch64__) || defined(__arm64__) 33 | # include "android-arm64/openssl/configuration.h" 34 | # elif defined(__arm__) 35 | # include "android-arm/openssl/configuration.h" 36 | # else 37 | # include "android-x86/openssl/configuration.h" 38 | # endif 39 | 40 | #elif defined(__linux__) 41 | # include "linux/openssl/configuration.h" 42 | #else 43 | # error "unsupported platform" 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/conftypes.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CONFTYPES_H 11 | # define OPENSSL_CONFTYPES_H 12 | # pragma once 13 | 14 | #ifndef OPENSSL_CONF_H 15 | # include 16 | #endif 17 | 18 | /* 19 | * The contents of this file are deprecated and will be made opaque 20 | */ 21 | struct conf_method_st { 22 | const char *name; 23 | CONF *(*create) (CONF_METHOD *meth); 24 | int (*init) (CONF *conf); 25 | int (*destroy) (CONF *conf); 26 | int (*destroy_data) (CONF *conf); 27 | int (*load_bio) (CONF *conf, BIO *bp, long *eline); 28 | int (*dump) (const CONF *conf, BIO *bp); 29 | int (*is_number) (const CONF *conf, char c); 30 | int (*to_int) (const CONF *conf, char c); 31 | int (*load) (CONF *conf, const char *name, long *eline); 32 | }; 33 | 34 | struct conf_st { 35 | CONF_METHOD *meth; 36 | void *meth_data; 37 | LHASH_OF(CONF_VALUE) *data; 38 | int flag_dollarid; 39 | int flag_abspath; 40 | char *includedir; 41 | OSSL_LIB_CTX *libctx; 42 | }; 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/core_object.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_CORE_OBJECT_H 11 | # define OPENSSL_CORE_OBJECT_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /*- 19 | * Known object types 20 | * 21 | * These numbers are used as values for the OSSL_PARAM parameter 22 | * OSSL_OBJECT_PARAM_TYPE. 23 | * 24 | * For most of these types, there's a corresponding libcrypto object type. 25 | * The corresponding type is indicated with a comment after the number. 26 | */ 27 | # define OSSL_OBJECT_UNKNOWN 0 28 | # define OSSL_OBJECT_NAME 1 /* char * */ 29 | # define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */ 30 | # define OSSL_OBJECT_CERT 3 /* X509 * */ 31 | # define OSSL_OBJECT_CRL 4 /* X509_CRL * */ 32 | 33 | /* 34 | * The rest of the associated OSSL_PARAM elements is described in core_names.h 35 | */ 36 | 37 | # ifdef __cplusplus 38 | } 39 | # endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/decodererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_DECODERERR_H 12 | # define OPENSSL_DECODERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_DECODER reason codes. 23 | */ 24 | # define OSSL_DECODER_R_COULD_NOT_DECODE_OBJECT 101 25 | # define OSSL_DECODER_R_DECODER_NOT_FOUND 102 26 | # define OSSL_DECODER_R_MISSING_GET_PARAMS 100 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/ebcdic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_EBCDIC_H 11 | # define OPENSSL_EBCDIC_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_EBCDIC_H 17 | # endif 18 | 19 | # include 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /* Avoid name clashes with other applications */ 26 | # define os_toascii _openssl_os_toascii 27 | # define os_toebcdic _openssl_os_toebcdic 28 | # define ebcdic2ascii _openssl_ebcdic2ascii 29 | # define ascii2ebcdic _openssl_ascii2ebcdic 30 | 31 | extern const unsigned char os_toascii[256]; 32 | extern const unsigned char os_toebcdic[256]; 33 | void *ebcdic2ascii(void *dest, const void *srce, size_t count); 34 | void *ascii2ebcdic(void *dest, const void *srce, size_t count); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | #endif 40 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/ecdh.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/ecdsa.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #include 11 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/encodererr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ENCODERERR_H 12 | # define OPENSSL_ENCODERERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OSSL_ENCODER reason codes. 23 | */ 24 | # define OSSL_ENCODER_R_ENCODER_NOT_FOUND 101 25 | # define OSSL_ENCODER_R_INCORRECT_PROPERTY_QUERY 100 26 | # define OSSL_ENCODER_R_MISSING_GET_PARAMS 102 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/esserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_ESSERR_H 12 | # define OPENSSL_ESSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | /* 20 | * ESS reason codes. 21 | */ 22 | # define ESS_R_EMPTY_ESS_CERT_ID_LIST 107 23 | # define ESS_R_ESS_CERT_DIGEST_ERROR 103 24 | # define ESS_R_ESS_CERT_ID_NOT_FOUND 104 25 | # define ESS_R_ESS_CERT_ID_WRONG_ORDER 105 26 | # define ESS_R_ESS_DIGEST_ALG_UNKNOWN 106 27 | # define ESS_R_ESS_SIGNING_CERTIFICATE_ERROR 102 28 | # define ESS_R_ESS_SIGNING_CERT_ADD_ERROR 100 29 | # define ESS_R_ESS_SIGNING_CERT_V2_ADD_ERROR 101 30 | # define ESS_R_MISSING_SIGNING_CERTIFICATE_ATTRIBUTE 108 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/fipskey.h: -------------------------------------------------------------------------------- 1 | /* 2 | * WARNING: do not edit! 3 | * Generated by Makefile from include/openssl/fipskey.h.in 4 | * 5 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 6 | * 7 | * Licensed under the Apache License 2.0 (the "License"). You may not use 8 | * this file except in compliance with the License. You can obtain a copy 9 | * in the file LICENSE in the source distribution or at 10 | * https://www.openssl.org/source/license.html 11 | */ 12 | 13 | #ifndef OPENSSL_FIPSKEY_H 14 | # define OPENSSL_FIPSKEY_H 15 | # pragma once 16 | 17 | # ifdef __cplusplus 18 | extern "C" { 19 | # endif 20 | 21 | /* 22 | * The FIPS validation HMAC key, usable as an array initializer. 23 | */ 24 | #define FIPS_KEY_ELEMENTS \ 25 | 0xf4, 0x55, 0x66, 0x50, 0xac, 0x31, 0xd3, 0x54, 0x61, 0x61, 0x0b, 0xac, 0x4e, 0xd8, 0x1b, 0x1a, 0x18, 0x1b, 0x2d, 0x8a, 0x43, 0xea, 0x28, 0x54, 0xcb, 0xae, 0x22, 0xca, 0x74, 0x56, 0x08, 0x13 26 | 27 | /* 28 | * The FIPS validation key, as a string. 29 | */ 30 | #define FIPS_KEY_STRING "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813" 31 | 32 | # ifdef __cplusplus 33 | } 34 | # endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/kdferr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_KDFERR_H 11 | # define OPENSSL_KDFERR_H 12 | # pragma once 13 | 14 | #include 15 | 16 | #endif /* !defined(OPENSSL_KDFERR_H) */ 17 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/objectserr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Generated by util/mkerr.pl DO NOT EDIT 3 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 | * 5 | * Licensed under the Apache License 2.0 (the "License"). You may not use 6 | * this file except in compliance with the License. You can obtain a copy 7 | * in the file LICENSE in the source distribution or at 8 | * https://www.openssl.org/source/license.html 9 | */ 10 | 11 | #ifndef OPENSSL_OBJECTSERR_H 12 | # define OPENSSL_OBJECTSERR_H 13 | # pragma once 14 | 15 | # include 16 | # include 17 | # include 18 | 19 | 20 | 21 | /* 22 | * OBJ reason codes. 23 | */ 24 | # define OBJ_R_OID_EXISTS 102 25 | # define OBJ_R_UNKNOWN_NID 101 26 | # define OBJ_R_UNKNOWN_OBJECT_NAME 103 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/opensslconf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_OPENSSLCONF_H 11 | # define OPENSSL_OPENSSLCONF_H 12 | # pragma once 13 | 14 | # include 15 | # include 16 | 17 | #endif /* OPENSSL_OPENSSLCONF_H */ 18 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/ossl_typ.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | /* 11 | * The original was renamed to 12 | * 13 | * This header file only exists for compatibility reasons with older 14 | * applications which #include . 15 | */ 16 | # include 17 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/pem2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_PEM2_H 11 | # define OPENSSL_PEM2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_PEM2_H 17 | # endif 18 | # include 19 | #endif 20 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/prov_ssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2021 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_PROV_SSL_H 11 | # define OPENSSL_PROV_SSL_H 12 | # pragma once 13 | 14 | # ifdef __cplusplus 15 | extern "C" { 16 | # endif 17 | 18 | /* SSL/TLS related defines useful to providers */ 19 | 20 | # define SSL_MAX_MASTER_KEY_LENGTH 48 21 | 22 | # define SSL3_VERSION 0x0300 23 | # define TLS1_VERSION 0x0301 24 | # define TLS1_1_VERSION 0x0302 25 | # define TLS1_2_VERSION 0x0303 26 | # define TLS1_3_VERSION 0x0304 27 | # define DTLS1_VERSION 0xFEFF 28 | # define DTLS1_2_VERSION 0xFEFD 29 | # define DTLS1_BAD_VER 0x0100 30 | 31 | # ifdef __cplusplus 32 | } 33 | # endif 34 | #endif /* OPENSSL_PROV_SSL_H */ 35 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/rc4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_RC4_H 11 | # define OPENSSL_RC4_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_RC4_H 17 | # endif 18 | 19 | # include 20 | 21 | # ifndef OPENSSL_NO_RC4 22 | # include 23 | # ifdef __cplusplus 24 | extern "C" { 25 | # endif 26 | 27 | # ifndef OPENSSL_NO_DEPRECATED_3_0 28 | typedef struct rc4_key_st { 29 | RC4_INT x, y; 30 | RC4_INT data[256]; 31 | } RC4_KEY; 32 | # endif 33 | # ifndef OPENSSL_NO_DEPRECATED_3_0 34 | OSSL_DEPRECATEDIN_3_0 const char *RC4_options(void); 35 | OSSL_DEPRECATEDIN_3_0 void RC4_set_key(RC4_KEY *key, int len, 36 | const unsigned char *data); 37 | OSSL_DEPRECATEDIN_3_0 void RC4(RC4_KEY *key, size_t len, 38 | const unsigned char *indata, 39 | unsigned char *outdata); 40 | # endif 41 | 42 | # ifdef __cplusplus 43 | } 44 | # endif 45 | # endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /3rd/openssl/include/openssl/ssl2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 | * 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use 5 | * this file except in compliance with the License. You can obtain a copy 6 | * in the file LICENSE in the source distribution or at 7 | * https://www.openssl.org/source/license.html 8 | */ 9 | 10 | #ifndef OPENSSL_SSL2_H 11 | # define OPENSSL_SSL2_H 12 | # pragma once 13 | 14 | # include 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 16 | # define HEADER_SSL2_H 17 | # endif 18 | 19 | #ifdef __cplusplus 20 | extern "C" { 21 | #endif 22 | 23 | # define SSL2_VERSION 0x0002 24 | 25 | # define SSL2_MT_CLIENT_HELLO 1 26 | 27 | #ifdef __cplusplus 28 | } 29 | #endif 30 | #endif 31 | -------------------------------------------------------------------------------- /3rd/openssl/lib/linux/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/linux/.gitkeep -------------------------------------------------------------------------------- /3rd/openssl/lib/linux/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/linux/libcrypto.a -------------------------------------------------------------------------------- /3rd/openssl/lib/linux/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/linux/libssl.a -------------------------------------------------------------------------------- /3rd/openssl/lib/mac/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/mac/.gitkeep -------------------------------------------------------------------------------- /3rd/openssl/lib/mac/libcrypto.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/mac/libcrypto.a -------------------------------------------------------------------------------- /3rd/openssl/lib/mac/libssl.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/mac/libssl.a -------------------------------------------------------------------------------- /3rd/openssl/lib/windows/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/windows/.gitkeep -------------------------------------------------------------------------------- /3rd/openssl/lib/windows/libcrypto.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/windows/libcrypto.lib -------------------------------------------------------------------------------- /3rd/openssl/lib/windows/libssl.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/windows/libssl.lib -------------------------------------------------------------------------------- /3rd/openssl/lib/windows/ossl_static.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/openssl/lib/windows/ossl_static.pdb -------------------------------------------------------------------------------- /3rd/posix/arpa/inet.h: -------------------------------------------------------------------------------- 1 | #pragma once -------------------------------------------------------------------------------- /3rd/posix/dlfcn.c: -------------------------------------------------------------------------------- 1 | #include "dlfcn.h" 2 | #define WIN32_LEAN_AND_MEAN 3 | #include 4 | 5 | void *dlopen(const char *path, int flag) { 6 | return LoadLibraryA(path); 7 | } 8 | 9 | const char *dlerror() { 10 | DWORD err = GetLastError(); 11 | HLOCAL LocalAddress=NULL; 12 | FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_IGNORE_INSERTS|FORMAT_MESSAGE_FROM_SYSTEM, 13 | NULL,err,0,(PTSTR)&LocalAddress,0,NULL); 14 | return (LPSTR)LocalAddress; 15 | } 16 | 17 | void *dlsym(void *dl, const char *sym) { 18 | 19 | return GetProcAddress(dl, sym); 20 | } 21 | 22 | -------------------------------------------------------------------------------- /3rd/posix/dlfcn.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | enum { RTLD_NOW, RTLD_GLOBAL }; 4 | void *dlopen(const char *path, int flag); 5 | const char *dlerror(); 6 | void *dlsym(void *dl, const char *sym); -------------------------------------------------------------------------------- /3rd/posix/netdb.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include -------------------------------------------------------------------------------- /3rd/posix/netinet/in.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /3rd/posix/netinet/tcp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | -------------------------------------------------------------------------------- /3rd/posix/sys/epoll.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "wepoll.h" -------------------------------------------------------------------------------- /3rd/posix/sys/file.h: -------------------------------------------------------------------------------- 1 | #pragma once -------------------------------------------------------------------------------- /3rd/posix/sys/socket.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #define SHUT_RD 0 /* shut down the reading side */ 4 | #define SHUT_WR 1 /* shut down the writing side */ 5 | #define SHUT_RDWR 2 /* shut down both sides */ 6 | 7 | #define FD_SETSIZE 1024 8 | 9 | #define _WINSOCK_DEPRECATED_NO_WARNINGS 10 | #define WIN32_LEAN_AND_MEAN 11 | #include 12 | #include 13 | #include 14 | 15 | #include 16 | #include 17 | 18 | #include "socket_poll.h" 19 | #include "socket_epoll.h" -------------------------------------------------------------------------------- /3rd/posix/unistd.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #define ssize_t size_t 12 | 13 | #define random rand 14 | #define srandom srand 15 | #define snprintf _snprintf 16 | #define localtime_r _localtime64_s 17 | 18 | #define pid_t int 19 | 20 | int kill(pid_t pid, int exit_code); 21 | 22 | void usleep(size_t us); 23 | void sleep(size_t ms); 24 | 25 | enum { CLOCK_THREAD_CPUTIME_ID, CLOCK_REALTIME, CLOCK_MONOTONIC }; 26 | int clock_gettime(int what, struct timespec *ti); 27 | 28 | enum { LOCK_EX, LOCK_NB }; 29 | int flock(int fd, int flag); 30 | 31 | struct sigaction { 32 | void (*sa_handler)(int); 33 | int sa_flags; 34 | int sa_mask; 35 | }; 36 | enum { SIGPIPE, SIGHUP, SA_RESTART }; 37 | void sigfillset(int *flag); 38 | int sigemptyset(int* set); 39 | void sigaction(int flag, struct sigaction *action, void* param); 40 | 41 | int pipe(int fd[2]); 42 | int daemon(int a, int b); 43 | 44 | #define O_NONBLOCK 1 45 | #define F_SETFL 0 46 | #define F_GETFL 1 47 | 48 | int fcntl(int fd, int cmd, long arg); 49 | 50 | char *strsep(char **stringp, const char *delim); 51 | 52 | int write(int fd, const void* ptr, unsigned int sz); 53 | int read(int fd, void* buffer, unsigned int sz); 54 | int close(int fd); 55 | 56 | #define getpid _getpid 57 | #define open _open 58 | #define dup2 _dup2 59 | -------------------------------------------------------------------------------- /3rd/reactphysics3d/include/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hanxi/skynet-cmake/8326c2c2b82e013457fedf337f3bdf17073063e3/3rd/reactphysics3d/include/.gitkeep -------------------------------------------------------------------------------- /3rd/recastnavigation/Detour/Include/DetourMath.h: -------------------------------------------------------------------------------- 1 | /** 2 | @defgroup detour Detour 3 | 4 | Members in this module are wrappers around the standard math library 5 | */ 6 | 7 | #ifndef DETOURMATH_H 8 | #define DETOURMATH_H 9 | 10 | #include 11 | 12 | inline float dtMathFabsf(float x) { return fabsf(x); } 13 | inline float dtMathSqrtf(float x) { return sqrtf(x); } 14 | inline float dtMathFloorf(float x) { return floorf(x); } 15 | inline float dtMathCeilf(float x) { return ceilf(x); } 16 | inline float dtMathCosf(float x) { return cosf(x); } 17 | inline float dtMathSinf(float x) { return sinf(x); } 18 | inline float dtMathAtan2f(float y, float x) { return atan2f(y, x); } 19 | inline bool dtMathIsfinite(float x) { return isfinite(x); } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /3rd/recastnavigation/Detour/Source/DetourAssert.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org 3 | // 4 | // This software is provided 'as-is', without any express or implied 5 | // warranty. In no event will the authors be held liable for any damages 6 | // 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 9 | // freely, subject to the following restrictions: 10 | // 1. The origin of this software must not be misrepresented; you must not 11 | // claim that you wrote the original software. If you use this software 12 | // in a product, an acknowledgment in the product documentation would be 13 | // appreciated but is not required. 14 | // 2. Altered source versions must be plainly marked as such, and must not be 15 | // misrepresented as being the original software. 16 | // 3. This notice may not be removed or altered from any source distribution. 17 | // 18 | 19 | #include "DetourAssert.h" 20 | 21 | #ifndef NDEBUG 22 | 23 | static dtAssertFailFunc* sAssertFailFunc = 0; 24 | 25 | void dtAssertFailSetCustom(dtAssertFailFunc *assertFailFunc) 26 | { 27 | sAssertFailFunc = assertFailFunc; 28 | } 29 | 30 | dtAssertFailFunc* dtAssertFailGetCustom() 31 | { 32 | return sAssertFailFunc; 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /3rd/recastnavigation/DetourCrowd/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB SOURCES Source/*.cpp) 2 | add_library(DetourCrowd ${SOURCES}) 3 | 4 | add_library(RecastNavigation::DetourCrowd ALIAS DetourCrowd) 5 | set_target_properties(DetourCrowd PROPERTIES DEBUG_POSTFIX -d) 6 | 7 | set(DetourCrowd_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") 8 | 9 | target_include_directories(DetourCrowd PUBLIC 10 | "$" 11 | ) 12 | 13 | target_link_libraries(DetourCrowd 14 | Detour 15 | ) 16 | 17 | set_target_properties(DetourCrowd PROPERTIES 18 | SOVERSION ${SOVERSION} 19 | VERSION ${LIB_VERSION} 20 | COMPILE_PDB_OUTPUT_DIRECTORY . 21 | COMPILE_PDB_NAME "DetourCrowd-d" 22 | ) 23 | 24 | install(TARGETS DetourCrowd 25 | EXPORT recastnavigation-targets 26 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 27 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 28 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library 29 | INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation 30 | ) 31 | 32 | file(GLOB INCLUDES Include/*.h) 33 | install(FILES ${INCLUDES} DESTINATION 34 | ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) 35 | if(MSVC) 36 | install(FILES "$/DetourCrowd-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) 37 | endif() 38 | -------------------------------------------------------------------------------- /3rd/recastnavigation/Recast/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB SOURCES Source/*.cpp) 2 | add_library(Recast ${SOURCES}) 3 | 4 | add_library(RecastNavigation::Recast ALIAS Recast) 5 | set_target_properties(Recast PROPERTIES DEBUG_POSTFIX -d) 6 | 7 | set(Recast_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Include") 8 | 9 | target_include_directories(Recast PUBLIC 10 | "$" 11 | ) 12 | 13 | set_target_properties(Recast PROPERTIES 14 | SOVERSION ${SOVERSION} 15 | VERSION ${LIB_VERSION} 16 | COMPILE_PDB_OUTPUT_DIRECTORY . 17 | COMPILE_PDB_NAME "Recast-d" 18 | ) 19 | 20 | install(TARGETS Recast 21 | EXPORT recastnavigation-targets 22 | RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} 23 | ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} 24 | LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT library 25 | INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation 26 | ) 27 | 28 | file(GLOB INCLUDES Include/*.h) 29 | install(FILES ${INCLUDES} DESTINATION 30 | ${CMAKE_INSTALL_INCLUDEDIR}/recastnavigation) 31 | if(MSVC) 32 | install(FILES "$/Recast-d.pdb" CONFIGURATIONS "Debug" DESTINATION "lib" OPTIONAL) 33 | endif() 34 | -------------------------------------------------------------------------------- /3rd/recastnavigation/Recast/Source/RecastAssert.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2009-2010 Mikko Mononen memon@inside.org 3 | // 4 | // This software is provided 'as-is', without any express or implied 5 | // warranty. In no event will the authors be held liable for any damages 6 | // 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 9 | // freely, subject to the following restrictions: 10 | // 1. The origin of this software must not be misrepresented; you must not 11 | // claim that you wrote the original software. If you use this software 12 | // in a product, an acknowledgment in the product documentation would be 13 | // appreciated but is not required. 14 | // 2. Altered source versions must be plainly marked as such, and must not be 15 | // misrepresented as being the original software. 16 | // 3. This notice may not be removed or altered from any source distribution. 17 | // 18 | 19 | #include "RecastAssert.h" 20 | 21 | #ifndef NDEBUG 22 | 23 | static rcAssertFailFunc* sRecastAssertFailFunc = 0; 24 | 25 | void rcAssertFailSetCustom(rcAssertFailFunc* assertFailFunc) 26 | { 27 | sRecastAssertFailFunc = assertFailFunc; 28 | } 29 | 30 | rcAssertFailFunc* rcAssertFailGetCustom() 31 | { 32 | return sRecastAssertFailFunc; 33 | } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /CMakePresets.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": 3, 3 | "configurePresets": [ 4 | { 5 | "name": "windows-base", 6 | "description": "面向具有 Visual Studio 开发环境的 Windows。", 7 | "hidden": true, 8 | "generator": "Ninja", 9 | "binaryDir": "${sourceDir}/out/build/${presetName}", 10 | "installDir": "${sourceDir}/out/install/${presetName}", 11 | "cacheVariables": { 12 | "CMAKE_C_COMPILER": "clang-cl", 13 | "CMAKE_CXX_COMPILER": "clang-cl" 14 | }, 15 | "condition": { 16 | "type": "equals", 17 | "lhs": "${hostSystemName}", 18 | "rhs": "Windows" 19 | } 20 | }, 21 | { 22 | "name": "x64-debug", 23 | "displayName": "x64 Debug", 24 | "description": "使用 Visual Studio 开发环境定向到 Windows (64 位)。(Debug)", 25 | "inherits": "windows-base", 26 | "architecture": { 27 | "value": "x64", 28 | "strategy": "external" 29 | }, 30 | "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" } 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 涵曦 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 | # 使用 CMake 编译 skynet 2 | 3 | [skynet-cmake](https://github.com/hanxi/skynet-cmake) 是 [skynet](https://github.com/cloudwu/skynet) 的使用 CMake 的多平台的实现。 4 | 5 | ## 特点 6 | 7 | - 支持在 Visual Studio 2022 中编译运行。 8 | - skynet 以 submodule 的方式链接,方便升级,确保不改。 9 | 10 | ## 在 Windows 下 11 | 12 | 基于 [Visual Studio 2022](https://visualstudio.microsoft.com/zh-hans/downloads/) ,需要安装 CMake 和 Clang 模块。 13 | 14 | - [安装CMake](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170) 15 | - [安装Clang](https://learn.microsoft.com/en-us/cpp/build/clang-support-cmake?view=msvc-170) 16 | 17 | ### 下载工程和更新 submodule 18 | 19 | ```bash 20 | git checkout https://github.com/hanxi/skynet-cmake.git 21 | cd skynet-cmake 22 | git submodule update --init --recursive 23 | ``` 24 | 25 | 使用 vs2022 打开此工程目录 skynet-cmake (即CMakeLists.txt 文件所在目录)。 26 | - 点击 [生成] -> [全部重新生成] 27 | - 选择 skynet.exe -> 点击 [调试] 28 | 29 | 也可以执行 `build.bat` 脚本生成 `out/build/x64-debug/skynet.exe` 文件。 30 | 31 | ## 在 Linux MacOSX 下 32 | 33 | 没多大必要,直接用 make 可能更方便。 34 | 35 | ```bash 36 | mkdir build 37 | cd build 38 | Makefile: 39 | cmake ../ 40 | Xcode: 41 | cmake -G Xcode ../ 42 | ``` 43 | 44 | ## 参考 45 | 46 | - [cloudfreexiao/skynet/tree/windows](https://github.com/cloudfreexiao/skynet/tree/windows) 47 | - [dpull/skynet-mingw](https://github.com/dpull/skynet-mingw) 48 | - [cloudfreexiao/pluto](https://github.com/cloudfreexiao/pluto) 49 | 50 | -------------------------------------------------------------------------------- /build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" 4 | 5 | rmdir /s /q out 6 | cmake --preset x64-debug 7 | cmake --build out/build/x64-debug 8 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | BUILD_DIR=${BUILD_DIR:-build} 4 | 5 | rm -rf "$BUILD_DIR" \ 6 | && mkdir -p "$BUILD_DIR" \ 7 | && cd "$BUILD_DIR" \ 8 | && cmake .. \ 9 | && cmake --build . -j -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_cache.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_ECS_CACHE_H 2 | #define LUA_ECS_CACHE_H 3 | 4 | struct entity_world; 5 | struct ecs_cache; 6 | 7 | struct ecs_cache * ecs_cache_create(struct entity_world *w, int keys[], int n); 8 | void ecs_cache_release(struct ecs_cache *); 9 | void* ecs_cache_fetch(struct ecs_cache *, int index, int cid); 10 | int ecs_cache_fetch_index(struct ecs_cache *c, int index, int cid); 11 | int ecs_cache_sync(struct ecs_cache *); 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_capi.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_ECS_CAPI_H 2 | #define LUA_ECS_CAPI_H 3 | 4 | #include 5 | #include "luaecs.h" 6 | 7 | struct entity_world; 8 | 9 | void *entity_fetch_(struct entity_world *w, int cid, int index, struct ecs_token *t); 10 | void entity_clear_type_(struct entity_world *w, int cid); 11 | void *entity_component_(struct entity_world *w, struct ecs_token t, int cid); 12 | int entity_component_index_(struct entity_world *w, struct ecs_token t, int cid); 13 | int entity_component_index_hint_(struct entity_world *w, struct ecs_token t, int cid, int hint); 14 | void * entity_component_add_(struct entity_world *w, struct ecs_token t, int cid, const void *buffer); 15 | int entity_new_(struct entity_world *w, int cid, struct ecs_token *t); 16 | void entity_remove_(struct entity_world *w, struct ecs_token t); 17 | void entity_enable_tag_(struct entity_world *w, struct ecs_token t, int tag_id); 18 | void entity_disable_tag_(struct entity_world *w, int tag_id, int index); 19 | int entity_next_tag_(struct entity_world *w, int tag_id, int index, struct ecs_token *t); 20 | int entity_get_lua_(struct entity_world *w, int cid, int index, void *L); 21 | int entity_count_(struct entity_world *w, int cid); 22 | int entity_index_(struct entity_world *w, void *eid); 23 | int entity_propagate_tag_(struct entity_world *w, int cid, int tag_id); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_entityid.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_ECS_ENTITYID_H 2 | #define LUA_ECS_ENTITYID_H 3 | 4 | #include 5 | #include "ecs_entityindex.h" 6 | 7 | #define ENTITY_ID_LOOKUP 8191 8 | 9 | struct entity_id { 10 | uint32_t n; 11 | uint32_t cap; 12 | uint64_t last_id; 13 | uint64_t *id; 14 | entity_index_t lookup[ENTITY_ID_LOOKUP]; 15 | }; 16 | 17 | int entity_id_alloc(struct entity_id *e, uint64_t *eid); 18 | size_t entity_id_memsize(struct entity_id *e); 19 | void entity_id_deinit(struct entity_id *e); 20 | int entity_id_find(struct entity_id *e, uint64_t eid); 21 | int entity_id_find_last(struct entity_id *e, uint64_t eid); 22 | int entity_id_find_guessrange(struct entity_id *e, uint64_t eid, int begin, int end); 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_entityindex.h: -------------------------------------------------------------------------------- 1 | #ifndef ecs_entity_index_h 2 | #define ecs_entity_index_h 3 | 4 | #include 5 | #include 6 | 7 | #define MAX_ENTITY 0xffffff 8 | 9 | typedef struct { uint8_t idx[3]; } entity_index_t; 10 | 11 | static const entity_index_t INVALID_ENTITY = { { 0xff, 0xff, 0xff } }; 12 | 13 | static inline uint32_t 14 | index_(entity_index_t x) { 15 | return (uint32_t) x.idx[0] << 16 | (uint32_t) x.idx[1] << 8 | x.idx[2]; 16 | } 17 | 18 | static inline entity_index_t 19 | make_index_(uint32_t v) { 20 | entity_index_t r = {{ (v >> 16) & 0xff, (v >> 8) & 0xff, v & 0xff }}; 21 | return r; 22 | } 23 | 24 | static inline int 25 | INVALID_ENTITY_INDEX(entity_index_t e) { 26 | return index_(e) == MAX_ENTITY; 27 | } 28 | 29 | static inline int 30 | ENTITY_INDEX_CMP(entity_index_t a, entity_index_t b) { 31 | return memcmp(&a, &b, sizeof(a)); 32 | } 33 | 34 | static inline entity_index_t 35 | DEC_ENTITY_INDEX(entity_index_t e, int delta) { 36 | return make_index_(index_(e) - delta); 37 | } 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_group.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_ECS_GROUP_H 2 | #define LUA_ECS_GROUP_H 3 | 4 | #include 5 | #include 6 | 7 | #define ENTITY_GROUP_CACHE_BITS 13 8 | #define ENTITY_GROUP_CACHE_SIZE (1<<13) 9 | 10 | struct entity_group; 11 | struct entity_world; 12 | 13 | struct entity_group_arena { 14 | int n; 15 | int cap; 16 | int cache[ENTITY_GROUP_CACHE_SIZE]; 17 | struct entity_group **g; 18 | }; 19 | 20 | void entity_group_deinit_(struct entity_group_arena *); 21 | size_t entity_group_memsize_(struct entity_group_arena *); 22 | void entity_group_enable_(struct entity_world *, int tagid, int n, int groupid[]); 23 | int entity_group_add_(struct entity_group_arena *G, int groupid, uint64_t eid); 24 | void entity_group_id_(struct entity_group_arena *G, int groupid, lua_State *L); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_persistence.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_ECS_PERSISTENCE_H 2 | #define LUA_ECS_PERSISTENCE_H 3 | 4 | #include 5 | 6 | int lpersistence_methods(lua_State *L); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /pluto/luaclib/luaecs/ecs_template.h: -------------------------------------------------------------------------------- 1 | #ifndef LUA_ECS_TEMPLATE_H 2 | #define LUA_ECS_TEMPLATE_H 3 | 4 | #include 5 | 6 | int ltemplate_methods(lua_State *L); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /pluto/luaclib/luafilesystem/lfs.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** LuaFileSystem 3 | ** File system manipulation library 4 | ** 5 | ** Copyright (C) 2003-2010 Kepler Project. 6 | ** Copyright (C) 2010-2022 The LuaFileSystem authors. 7 | ** (http://lunarmodules.github.io/luafilesystem) 8 | */ 9 | 10 | /* Define 'chdir' for systems that do not implement it */ 11 | #ifdef NO_CHDIR 12 | #define chdir(p) (-1) 13 | #define chdir_error "Function 'chdir' not provided by system" 14 | #else 15 | #define chdir_error strerror(errno) 16 | #endif 17 | 18 | #ifdef _WIN32 19 | #define chdir(p) (_chdir(p)) 20 | #define getcwd(d, s) (_getcwd(d, s)) 21 | #define rmdir(p) (_rmdir(p)) 22 | #define LFS_EXPORT __declspec (dllexport) 23 | #ifndef fileno 24 | #define fileno(f) (_fileno(f)) 25 | #endif 26 | #else 27 | #define LFS_EXPORT 28 | #endif 29 | 30 | #ifdef __cplusplus 31 | extern "C" { 32 | #endif 33 | 34 | LFS_EXPORT int luaopen_lfs(lua_State * L); 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | -------------------------------------------------------------------------------- /pluto/luaclib/math3d/math3d.h: -------------------------------------------------------------------------------- 1 | #ifndef math3d_lua_binding_h 2 | #define math3d_lua_binding_h 3 | 4 | #include "mathid.h" 5 | #include 6 | 7 | struct math3d_api { 8 | struct math_context * M; 9 | const void * refmeta; 10 | math_t (*from_lua)(lua_State *L, struct math_context *MC, int index, int type); 11 | math_t (*from_lua_id)(lua_State *L, struct math_context *MC, int index); 12 | }; 13 | 14 | // binding functions 15 | 16 | static inline math_t 17 | math3d_from_lua(lua_State *L, struct math3d_api *M, int index, int type) { 18 | return M->from_lua(L, M->M, index, type); 19 | } 20 | 21 | static inline math_t 22 | math3d_from_lua_id(lua_State *L, struct math3d_api *M, int index) { 23 | return M->from_lua_id(L, M->M, index); 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/behavior_event.lua: -------------------------------------------------------------------------------- 1 | ---@enum BehaviorTreeEvent 2 | local BehaviorTreeEvent = { 3 | INTERRUPTED = "treeInterrupted", -- 行为树被中断 4 | BEFORE_RUN = "beforeRunTree", -- 行为树开始执行前 5 | AFTER_RUN = "afterRunTree", -- 行为树执行完成后 6 | AFTER_RUN_SUCCESS = "afterRunTreeSuccess", -- 行为树执行成功后 7 | AFTER_RUN_FAILURE = "afterRunTreeFailure", -- 行为树执行失败后 8 | } 9 | 10 | return BehaviorTreeEvent 11 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/behavior_ret.lua: -------------------------------------------------------------------------------- 1 | ---@alias BehaviorRet 2 | ---| "FAIL" # 失败 3 | ---| "SUCCESS" # 成功 4 | ---| "RUNNING" # 正在运行 5 | ---| "ABORT" # 中断 6 | 7 | return { 8 | FAIL = "FAIL", 9 | SUCCESS = "SUCCESS", 10 | RUNNING = "RUNNING", 11 | ABORT = "ABORT", 12 | } -------------------------------------------------------------------------------- /pluto/luaext/behavior3/behavior_util.lua: -------------------------------------------------------------------------------- 1 | local M = { 2 | NIL = {} 3 | } 4 | 5 | ---@param node BehaviorNode 6 | ---@param input_idx integer 7 | ---@param input_value any 8 | ---@param arg_value any 9 | ---@param default_value any 10 | ---@return any 11 | function M.check_oneof(node, input_idx, input_value, arg_value, default_value) 12 | local input_name = node.data.input[input_idx] 13 | local value 14 | if input_name and input_name ~= "" then 15 | if input_value == nil then 16 | local func = default_value == nil and error or print 17 | func(string.format("%s->${%s}#${%d}: input value is nil", 18 | node.tree.name, node.name, node.id)) 19 | end 20 | value = nil 21 | else 22 | value = arg_value 23 | end 24 | if default_value == M.NIL then 25 | default_value = nil 26 | end 27 | if value == nil then 28 | return default_value 29 | else 30 | return value 31 | end 32 | end 33 | 34 | ---@param node BehaviorNode 35 | function M.warn(node, msg) 36 | print(string.format("[WARN] %s->${%s}#${$d}: %s", node.tree.name, node.name, node.id, msg)) 37 | end 38 | 39 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/calculate.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Calculate", 6 | type = "Action", 7 | desc = "计算公式", 8 | args = { 9 | { 10 | name = "value", 11 | type = "code?", 12 | desc = "公式" 13 | }, 14 | }, 15 | doc = [[ 16 | + 做简单数值公式计算 17 | ]], 18 | run = function(node, env) 19 | local value = node:get_env_args("value", env) 20 | return bret.SUCCESS, value 21 | end, 22 | } 23 | 24 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/clear.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Clear", 6 | type = "Action", 7 | desc = "清除变量", 8 | output = { "清除的变量名" }, 9 | run = function(node, env) 10 | return bret.SUCCESS, nil 11 | end 12 | } 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/concat.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | override get descriptor(): NodeDef { 3 | return { 4 | name: "Concat", 5 | type: "Action", 6 | status: ["success", "failure"], 7 | desc: "将两个输入合并为一个数组,并返回新数组", 8 | input: ["数组1", "数组2"], 9 | output: ["新数组"], 10 | doc: ` 11 | + 如果输入不是数组,则返回\`失败\` 12 | `, 13 | }; 14 | } 15 | ]] 16 | 17 | local bret = require "behavior3.behavior_ret" 18 | 19 | ---@type BehaviorNodeDefine 20 | local M = { 21 | name = "Concat", 22 | type = "Action", 23 | desc = "将两个输入合并为一个数组,并返回新数组", 24 | input = { "数组1", "数组2" }, 25 | output = { "新数组" }, 26 | run = function(node, env, arr1, arr2) 27 | if not arr1 or not arr2 then 28 | return bret.FAIL 29 | end 30 | local arr = {} 31 | for _, v in ipairs(arr1) do 32 | arr[#arr+1] = v 33 | end 34 | for _, v in ipairs(arr2) do 35 | arr[#arr+1] = v 36 | end 37 | return bret.SUCCESS, arr 38 | end 39 | } 40 | 41 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/foreach.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "ForEach", 6 | type = 'Action', 7 | desc = "遍历数组", 8 | input = { "[{数组}]" }, 9 | output = { "{变量}" }, 10 | doc = [[ 11 | + 只能有一个子节点,多个仅执行第一个 12 | + 每次执行子节点前会设置当前遍历到的变量 13 | + 当子节点返回失败时,退出遍历并返回失败状态 14 | + 其它情况返回成功/正在运行 15 | ]], 16 | run = function(node, env, arr) 17 | local last_i, resume_ret = node:resume(env) 18 | if last_i then 19 | if resume_ret == bret.RUNNING then 20 | error(string.format("%s->${%s}#${$d}: unexpected status error", 21 | node.tree.name, node.name, node.id)) 22 | elseif resume_ret == bret.FAIL then 23 | return bret.FAIL 24 | end 25 | last_i = last_i + 1 26 | else 27 | last_i = 1 28 | end 29 | 30 | for i = last_i, #arr do 31 | local var = arr[i] 32 | env:set_var(node.data.output[1], var) 33 | local r = node.children[1]:run(env) 34 | if r == bret.RUNNING then 35 | return node:yield(env, i) 36 | elseif r == bret.FAIL then 37 | return bret.FAIL 38 | end 39 | end 40 | return bret.SUCCESS 41 | end 42 | } 43 | 44 | 45 | return M 46 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/get_field.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | local butil = require "behavior3.behavior_util" 3 | 4 | ---@type BehaviorNodeDefine 5 | return { 6 | name = "GetField", 7 | type = "Action", 8 | children = 0, 9 | status = {"success", "failure"}, 10 | desc = "获取对象的字段值", 11 | args = { 12 | { 13 | name = "field", 14 | type = "string?", 15 | desc = "字段(field)", 16 | oneof = "字段(field)", 17 | }, 18 | }, 19 | input = {"对象", "字段(field)?"}, 20 | output = {"字段值(value)"}, 21 | doc = [[ 22 | + 合法元素不包括 \`undefined\` 和 \`null\` 23 | + 只有获取到合法元素时候才会返回 \`success\`,否则返回 \`failure\` 24 | ]], 25 | 26 | run = function(node, env, obj, field) 27 | if type(obj) ~= "table" then 28 | butil.warn(node, "invalid obj") 29 | return bret.FAIL 30 | end 31 | local args = node.args 32 | local key = butil.check_oneof(node, 2, field, args.field) 33 | local value = obj[key] 34 | if value == nil then 35 | return bret.FAIL 36 | end 37 | return bret.SUCCESS, value 38 | end 39 | } -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/index.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Index", 6 | type = "Action", 7 | children = 0, 8 | desc = "索引输入的数组", 9 | args = { 10 | { 11 | name = "index", 12 | type = "string", 13 | desc = "索引", 14 | } 15 | }, 16 | input = { "数组", "索引?" }, 17 | output = { "元素" }, 18 | doc = [[ 19 | + 合法元素不包括 undefined 和 null 20 | + 只有索引到有合法元素时候才会返回「成功」,否则返回「失败」 21 | ]], 22 | run = function(node, env, arr, key) 23 | if not arr then 24 | return bret.FAIL 25 | end 26 | if not key then 27 | key = tonumber(node.args.index) 28 | end 29 | if type(key) ~= "number" then 30 | print(string.format("%s: index type error", node.info)) 31 | return bret.FAIL 32 | end 33 | 34 | local value = arr[key + 1] 35 | if value == nil then 36 | return bret.FAIL 37 | end 38 | return bret.SUCCESS, value 39 | end, 40 | } 41 | 42 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/let.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | local butil = require "behavior3.behavior_util" 3 | 4 | ---@type BehaviorNodeDefine 5 | local M = { 6 | name = "Let", 7 | type = "Action", 8 | desc = "定义新的变量名", 9 | input = { "已存在变量名?" }, 10 | args = { 11 | { 12 | name= "value", 13 | type= "json?", 14 | desc= "值(value)", 15 | oneof= "已存在变量名", 16 | } 17 | }, 18 | output = { "新变量名" }, 19 | doc = [[ 20 | + 如果有输入变量,则给已有变量重新定义一个名字 21 | + 如果\`值(value)\`为 \`null\`,则清除变量 22 | ]], 23 | run = function(node, env, value) 24 | local args = node.args 25 | value = butil.check_oneof(node, 1, value, args.value, butil.NIL) 26 | return bret.SUCCESS, value 27 | end 28 | } 29 | 30 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/log.lua: -------------------------------------------------------------------------------- 1 | -- Log 2 | -- 3 | 4 | local bret = require "behavior3.behavior_ret" 5 | 6 | ---@type BehaviorNodeDefine 7 | local M = { 8 | name = "Log", 9 | type = "Action", 10 | desc = "打印日志", 11 | args = { 12 | { 13 | name = "message", 14 | type = "string", 15 | desc = "日志" 16 | } 17 | }, 18 | run = function(node, env) 19 | print(node.args.message) 20 | return bret.SUCCESS 21 | end 22 | } 23 | 24 | 25 | 26 | return M 27 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/now.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Now", 6 | type = "Action", 7 | desc = "获取当前时间", 8 | output = { "当前时间" }, 9 | run = function(node, env) 10 | return bret.SUCCESS, env.ctx.time 11 | end 12 | } 13 | 14 | return M 15 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/push.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Push", 6 | type = "Action", 7 | desc = "向数组中添加元素", 8 | input = { "数组", "元素" }, 9 | doc = [[ 10 | + 当输入的“数组”不是数组类型时返回「失败」 11 | + 其余返回「成功」。 12 | ]], 13 | run = function(node, env, arr, value) 14 | if not arr then 15 | return bret.FAIL 16 | end 17 | arr[#arr+1] = value 18 | return bret.SUCCESS 19 | end 20 | } 21 | 22 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/random.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Random", 6 | type = "Action", 7 | desc = "返回一个随机数", 8 | input = { "最小值?", "最大值?" }, 9 | output = { "随机数" }, 10 | args = { 11 | { 12 | name = "min", 13 | type = "float?", 14 | desc = "最小值" 15 | }, 16 | { 17 | name = "max", 18 | type = "float?", 19 | desc = "最大值" 20 | }, 21 | { 22 | name = "floor", 23 | type = "bool?", 24 | desc = "是否向下取整" 25 | } 26 | }, 27 | run = function(node, env, min, max) 28 | min = min or node.args.min 29 | max = max or node.args.max 30 | local value = min + math.random() * (max - min) 31 | if node.args.floor then 32 | value = math.floor(value) 33 | end 34 | return bret.SUCCESS, value 35 | end 36 | } 37 | 38 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/random_index.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "RandomIndex", 6 | type = "Action", 7 | desc = "随机返回输入的其中一个", 8 | input = { "数组" }, 9 | output = { "随机目标" }, 10 | doc = [[ 11 | + 合法元素不包括 nil 12 | + 在输入数组中,随机返回其中一个 13 | + 当输入数组为空时,或者没有合法元素,返回「失败」 14 | ]], 15 | run = function(node, env, arr) 16 | if not arr or #arr == 0 then 17 | return bret.FAIL 18 | end 19 | local idx = math.random(1, #arr) 20 | return bret.SUCCESS, arr[idx] 21 | end 22 | } 23 | 24 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/set_field.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | local butil = require "behavior3.behavior_util" 3 | 4 | ---@type BehaviorNodeDefine 5 | return { 6 | name = "SetField", 7 | type = "Action", 8 | children = 0, 9 | status = {"success", "failure"}, 10 | desc = "设置对象字段值", 11 | input = {"输入对象", "字段(field)?", "值(value)?"}, 12 | args = { 13 | { name = "field", type = "string?", desc = "字段(field)", oneof = "字段(field)" }, 14 | { name = "value", type = "json?", desc = "值(value)", oneof = "值(value)" }, 15 | }, 16 | doc = [[ 17 | + 对输入对象设置 \`field\` 和 \`value\` 18 | + 输入参数1必须为对象,否则返回 \`failure\` 19 | + 如果 \`field\` 不为 \`string\`, 也返回 \`failure\` 20 | + 如果 \`value\` 为 \`undefined\` 或 \`null\`, 则删除 \`field\` 的值 21 | ]], 22 | 23 | run = function(node, env, obj, field, value) 24 | if type(obj) ~= "table" then 25 | butil.warn(node, "invalid obj") 26 | return bret.FAIL 27 | end 28 | 29 | local args = node.args 30 | field = butil.check_oneof(node, 2, field, args.field) 31 | value = butil.check_oneof(node, 3, value, args.value, butil.NIL) 32 | obj[field] = value 33 | return bret.SUCCESS 34 | end 35 | } -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/wait.lua: -------------------------------------------------------------------------------- 1 | -- Wait 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | local abs = math.abs 7 | local SPEED = 50 8 | 9 | ---@type BehaviorNodeDefine 10 | local M = { 11 | name = 'Wait', 12 | type = 'Action', 13 | desc = '等待', 14 | args = { 15 | { 16 | name = 'time', 17 | type = 'int', 18 | desc = '时间/tick' 19 | } 20 | }, 21 | run = function(node, env) 22 | local args = node.args 23 | local t = node:resume(env) 24 | if t then 25 | if env.ctx.time >= t then 26 | print('CONTINUE') 27 | return bret.SUCCESS 28 | else 29 | print('WAITING', "node#" .. node.data.id) 30 | return bret.RUNNING 31 | end 32 | end 33 | print('Wait', args.time) 34 | return node:yield(env, env.ctx.time + args.time) 35 | end 36 | } 37 | 38 | return M 39 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/actions/wait_for_count.lua: -------------------------------------------------------------------------------- 1 | -- WaitForCount 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | ---@type BehaviorNodeDefine 7 | local M = { 8 | name = 'WaitForCount', 9 | type = 'Action', 10 | desc = '等待特定次数', 11 | args = { 12 | { 13 | name = 'tick', 14 | type = 'int', 15 | desc = 'tick' 16 | } 17 | }, 18 | run = function(node, env) 19 | local args = node.args 20 | local t = node:resume(env) 21 | if t then 22 | t = t - 1 23 | if t <= 0 then 24 | print('DONE') 25 | return bret.SUCCESS 26 | else 27 | print('CONTINUE', "node#" .. node.data.id .. "Last tick", t) 28 | node:yield(env, t) 29 | return bret.RUNNING 30 | end 31 | end 32 | print('WaitForCount', args.tick) 33 | return node:yield(env, args.tick) 34 | end 35 | } 36 | 37 | return M 38 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/composites/selector.lua: -------------------------------------------------------------------------------- 1 | -- Selector 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | ---@type BehaviorNodeDefine 7 | local M = { 8 | name = 'Selector', 9 | type = 'Composite', 10 | desc = '选择执行', 11 | doc = [[ 12 | + 一直往下执行,有子节点返回成功则返回成功,若全部节点返回失败则返回失败 13 | + 子节点是或 (OR) 的关系 14 | ]], 15 | run = function(node, env) 16 | local last_idx, last_ret = node:resume(env) 17 | if last_idx then 18 | if last_ret == bret.SUCCESS then 19 | return last_ret 20 | elseif last_ret == bret.FAIL then 21 | last_idx = last_idx + 1 22 | else 23 | error(string.format("%s->${%s}#${$d}: unexpected status error", 24 | node.tree.name, node.name, node.id)) 25 | end 26 | else 27 | last_idx = 1 28 | end 29 | 30 | for i = last_idx, #node.children do 31 | local child = node.children[i] 32 | local r = child:run(env) 33 | if r == bret.RUNNING then 34 | return node:yield(env, i) 35 | end 36 | if r == bret.SUCCESS then 37 | return r 38 | end 39 | end 40 | return bret.FAIL 41 | end 42 | } 43 | 44 | return M 45 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/composites/sequence.lua: -------------------------------------------------------------------------------- 1 | -- Sequence 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | ---@type BehaviorNodeDefine 7 | local M = { 8 | name = 'Sequence', 9 | type = 'Composite', 10 | desc = '顺序执行', 11 | doc = [[ 12 | + 一直往下执行,只有当所有子节点都返回成功, 才返回成功 13 | + 子节点是与(AND)的关系 14 | ]], 15 | run = function(node, env) 16 | local last_idx, last_ret = node:resume(env) 17 | if last_idx then 18 | -- print("last", last_idx, last_ret) 19 | if last_ret == bret.FAIL then 20 | return last_ret 21 | elseif last_ret == bret.SUCCESS then 22 | last_idx = last_idx + 1 23 | else 24 | error(string.format("%s->${%s}#${$d}: unexpected status error", 25 | node.tree.name, node.name, node.id)) 26 | end 27 | else 28 | last_idx = 1 29 | end 30 | 31 | for i = last_idx, #node.children do 32 | local child = node.children[i] 33 | local r = child:run(env) 34 | if r == bret.RUNNING then 35 | return node:yield(env, i) 36 | end 37 | if r == bret.FAIL then 38 | return r 39 | end 40 | end 41 | return bret.SUCCESS 42 | end 43 | } 44 | 45 | return M 46 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/conditions/check.lua: -------------------------------------------------------------------------------- 1 | local bret = require 'behavior3.behavior_ret' 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Check", 6 | type = "Condition", 7 | desc = "检查True或False", 8 | args = { 9 | { 10 | name = "value", 11 | type = "code?", 12 | desc = "值" 13 | }, 14 | }, 15 | doc = [[ 16 | + 做简单数值公式判定,返回成功或失败 17 | ]], 18 | run = function(node, env) 19 | return node:get_env_args("value", env) and bret.SUCCESS or bret.FAIL 20 | end 21 | } 22 | 23 | return M 24 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/conditions/includes.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "Includes", 6 | type = "Condition", 7 | desc = "判断元素是否在数组中", 8 | input = { "数组", "元素" }, 9 | doc = [[ 10 | + 若输入的元素不合法,返回「失败」 11 | + 只有数组包含元素时返回「成功」,否则返回「失败」 12 | ]], 13 | run = function(node, env, arr, obj) 14 | if not arr or #arr == 0 then 15 | return bret.FAIL 16 | end 17 | for _, v in ipairs(arr) do 18 | if v == obj then 19 | return bret.SUCCESS 20 | end 21 | end 22 | return bret.FAIL 23 | end, 24 | } 25 | 26 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/conditions/is_null.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "IsNull", 6 | type = "Condition", 7 | desc = "判断变量是否不存在", 8 | input = { "判断的变量" }, 9 | run = function(node, env, value) 10 | return value == nil and bret.SUCCESS or bret.FAIL 11 | end 12 | } 13 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/conditions/not_null.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "NotNull", 6 | type = "Condition", 7 | desc = "判断变量是否存在", 8 | input = { "判断的变量" }, 9 | run = function(node, env, value) 10 | return value ~= nil and bret.SUCCESS or bret.FAIL 11 | end 12 | } 13 | 14 | return M -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/decorators/always_fail.lua: -------------------------------------------------------------------------------- 1 | -- AlwaysSuccess 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | ---@type BehaviorNodeDefine 7 | local M = { 8 | name = 'AlwaysFail', 9 | type = 'Decorator', 10 | desc = '始终返回失败', 11 | doc = [[ 12 | + 只能有一个子节点,多个仅执行第一个 13 | + 不管子节点是否成功都返回失败 14 | ]], 15 | run = function(node, env, enemy) 16 | local yeild, last_ret = node:resume(env) 17 | if yeild then 18 | if last_ret == bret.RUNNING then 19 | error(string.format("%s->${%s}#${$d}: unexpected status error", 20 | node.tree.name, node.name, node.id)) 21 | end 22 | return bret.FAIL 23 | end 24 | 25 | local child = node.children[1] 26 | if not child then 27 | return bret.FAIL 28 | end 29 | local r = child:run(env) 30 | if r == bret.RUNNING then 31 | return node:yield(env) 32 | end 33 | return bret.FAIL 34 | end 35 | } 36 | 37 | return M 38 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/decorators/always_success.lua: -------------------------------------------------------------------------------- 1 | -- AlwaysSuccess 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | ---@type BehaviorNodeDefine 7 | local M = { 8 | name = 'AlwaysSuccess', 9 | type = 'Decorator', 10 | desc = '始终返回成功', 11 | doc = [[ 12 | + 只能有一个子节点,多个仅执行第一个 13 | + 不管子节点是否成功都返回成功 14 | ]], 15 | run = function(node, env) 16 | local yeild, last_ret = node:resume(env) 17 | if yeild then 18 | if last_ret == bret.RUNNING then 19 | error(string.format("%s->${%s}#${$d}: unexpected status error", 20 | node.tree.name, node.name, node.id)) 21 | end 22 | return bret.SUCCESS 23 | end 24 | 25 | local child = node.children[1] 26 | if not child then 27 | return bret.SUCCESS 28 | end 29 | local r = child:run(env) 30 | if r == bret.RUNNING then 31 | return node:yield(env) 32 | end 33 | return bret.SUCCESS 34 | end 35 | } 36 | 37 | return M 38 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/decorators/invert.lua: -------------------------------------------------------------------------------- 1 | local bret = require 'behavior3.behavior_ret' 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = 'Invert', 6 | type = 'Decorator', 7 | desc = '取反', 8 | doc = [[ 9 | + 将子节点的返回值取反 10 | + 只能有一个子节点,多个仅执行第一个 11 | ]], 12 | run = function(node, env) 13 | local r 14 | if node:resume(env) then 15 | r = env.last_ret 16 | else 17 | r = node.children[1]:run(env) 18 | end 19 | 20 | if r == bret.SUCCESS then 21 | return bret.FAIL 22 | elseif r == bret.FAIL then 23 | return bret.SUCCESS 24 | else 25 | return node:yield(env) 26 | end 27 | end 28 | } 29 | 30 | return M 31 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/decorators/once.lua: -------------------------------------------------------------------------------- 1 | -- Once 2 | -- 3 | 4 | local bret = require 'behavior3.behavior_ret' 5 | 6 | local sformat = string.format 7 | 8 | ---@type BehaviorNodeDefine 9 | local M = { 10 | name = "Once", 11 | type = "Decorator", 12 | desc = "只执行一次", 13 | doc = [[ 14 | + 只能有一个子节点,多个仅执行第一个 15 | + 被打断后该节点后的子节点依旧不会执行 16 | + 该节点执行后永远返回成功 17 | ]], 18 | run = function(node, env) 19 | local key = sformat("%s#%d_once", node.name, node.id) 20 | if env:get_var(key) == true then 21 | return bret.FAIL 22 | end 23 | 24 | local yeild, last_ret = node:resume(env) 25 | if yeild then 26 | if last_ret == bret.RUNNING then 27 | error(string.format("%s->${%s}#${$d}: unexpected status error", 28 | node.tree.name, node.name, node.id)) 29 | end 30 | env:set_var(key, true) 31 | return bret.SUCCESS 32 | end 33 | 34 | local child = node.children[1] 35 | if not child then 36 | env:set_var(key, true) 37 | return bret.SUCCESS 38 | end 39 | 40 | local r = child:run(env) 41 | if r == bret.RUNNING then 42 | return node:yield(env) 43 | end 44 | 45 | env:set_var(key, true) 46 | return bret.SUCCESS 47 | end 48 | } 49 | 50 | return M 51 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/decorators/repeat_until_fail.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "RepeatUntilFailure", 6 | type = "Decorator", 7 | desc = "一直尝试直到子节点返回失败", 8 | input = { "最大循环次数?" }, 9 | args = { 10 | { 11 | name = "maxLoop", 12 | type = "int?", 13 | desc = "最大循环次数" 14 | } 15 | }, 16 | doc = [[ 17 | + 只能有一个子节点,多个仅执行第一个 18 | + 只有当子节点返回失败时,才返回成功,其它情况返回运行中状态 19 | + 如果设定了尝试次数,超过指定次数则返回失败 20 | ]], 21 | run = function(node, env, max_loop) 22 | max_loop = max_loop or node.args.maxLoop or math.maxinteger 23 | 24 | local count, resume_ret = node:resume(env) 25 | if count then 26 | if resume_ret == bret.FAIL then 27 | return bret.SUCCESS 28 | elseif count >= max_loop then 29 | return bret.FAIL 30 | else 31 | count = count + 1 32 | end 33 | else 34 | count = 1 35 | end 36 | 37 | local r = node.children[1]:run(env) 38 | if r == bret.FAIL then 39 | return bret.SUCCESS 40 | else 41 | return node:yield(env, count) 42 | end 43 | end 44 | } 45 | 46 | return M 47 | -------------------------------------------------------------------------------- /pluto/luaext/behavior3/nodes/decorators/repeat_until_success.lua: -------------------------------------------------------------------------------- 1 | local bret = require "behavior3.behavior_ret" 2 | 3 | ---@type BehaviorNodeDefine 4 | local M = { 5 | name = "RepeatUntilSuccess", 6 | type = "Decorator", 7 | desc = "一直尝试直到子节点返回成功", 8 | input = { "最大循环次数?" }, 9 | args = { 10 | { 11 | name = "maxLoop", 12 | type = "int?", 13 | desc = "最大循环次数" 14 | } 15 | }, 16 | doc = [[ 17 | + 只能有一个子节点,多个仅执行第一个 18 | + 只有当子节点返回成功时,才返回成功,其它情况返回运行中状态 19 | + 如果设定了尝试次数,超过指定次数则返回失败 20 | ]], 21 | run = function(node, env, max_loop) 22 | max_loop = max_loop or node.args.maxLoop or math.maxinteger 23 | 24 | local count, resume_ret = node:resume(env) 25 | if count then 26 | if resume_ret == bret.SUCCESS then 27 | return bret.SUCCESS 28 | elseif count >= max_loop then 29 | return bret.FAIL 30 | else 31 | count = count + 1 32 | end 33 | else 34 | count = 1 35 | end 36 | 37 | local r = node.children[1]:run(env) 38 | if r == bret.SUCCESS then 39 | return bret.SUCCESS 40 | else 41 | return node:yield(env, count) 42 | end 43 | end 44 | } 45 | 46 | return M 47 | -------------------------------------------------------------------------------- /pluto/luaext/logging/init.lua: -------------------------------------------------------------------------------- 1 | 2 | _ENV.logger = {} 3 | 4 | 5 | -------------------------------------------------------------------------------- /pluto/luaext/logging/syslog.lua: -------------------------------------------------------------------------------- 1 | -- https://github.com/lunarmodules/luasyslog 2 | 3 | local logging = require "logging.core" 4 | local lsyslog = require "lsyslog" 5 | local log = lsyslog.log 6 | 7 | local convert = { 8 | [logging.DEBUG] = lsyslog.LOG_DEBUG, 9 | [logging.INFO] = lsyslog.LOG_INFO, 10 | [logging.WARN] = lsyslog.LOG_WARNING, 11 | [logging.ERROR] = lsyslog.LOG_ERR, 12 | [logging.FATAL] = lsyslog.LOG_ALERT, 13 | } 14 | 15 | function logging.syslog(params, ...) 16 | params = logging.getDeprecatedParams({ "ident", "facility" }, params, ...) 17 | local ident = params.ident or "lua" 18 | local facility = params.facility or lsyslog.FACILITY_USER 19 | -- timestampPattern and logPattern not supported, added by syslog itself 20 | local logPattern = logging.buildLogPatterns(params.logPatterns, params.logPattern) 21 | local timestampPattern = params.timestampPattern 22 | local startLevel = params.logLevel or logging.defaultLevel() 23 | 24 | lsyslog.open(ident, facility) 25 | 26 | -- a pattern was provided, so return an appender that takes that into account 27 | -- this is less performant, hence we provide 2 different appenders 28 | return logging.new(function(self, level, message) 29 | message = logging.prepareLogMsg(logPattern, os.date(timestampPattern), level, message) 30 | log(convert[level], message) 31 | return true 32 | end, startLevel) 33 | end 34 | -------------------------------------------------------------------------------- /pluto/luaext/lua-radix-router/constants.lua: -------------------------------------------------------------------------------- 1 | --- Constants constants values 2 | -- 3 | -- 4 | 5 | return { 6 | -- The type of TrieNode 7 | node_types = { 8 | literal = 0, 9 | variable = 1, 10 | catchall = 2, 11 | }, 12 | node_indexs = { 13 | type = 1, 14 | path = 2, 15 | pathn = 3, 16 | children = 4, 17 | value = 5, 18 | }, 19 | -- The type of token 20 | token_types = { 21 | literal = 0, 22 | variable = 1, 23 | catchall = 2, 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /pluto/luaext/lua-radix-router/options.lua: -------------------------------------------------------------------------------- 1 | --- Options Router options 2 | -- 3 | 4 | 5 | local function options(opts) 6 | opts = opts or {} 7 | 8 | local default = { 9 | matcher_names = { "method", "host" }, 10 | matchers = {}, 11 | trailing_slash_match = false, 12 | } 13 | 14 | if opts.trailing_slash_match ~= nil then 15 | if type(opts.trailing_slash_match) ~= "boolean" then 16 | return nil, "invalid type trailing_slash_match" 17 | end 18 | default.trailing_slash_match = opts.trailing_slash_match 19 | end 20 | 21 | if opts.matcher_names ~= nil then 22 | if type(opts.matcher_names) ~= "table" then 23 | return nil, "invalid type matcher_names" 24 | end 25 | default.matcher_names = opts.matcher_names 26 | end 27 | 28 | if opts.matchers ~= nil then 29 | for _, matcher in ipairs(opts.matchers) do 30 | if type(matcher.match) ~= "function" then 31 | return nil, "invalid type matcher.match" 32 | end 33 | end 34 | 35 | default.matchers = opts.matchers 36 | end 37 | 38 | return default 39 | end 40 | 41 | 42 | return { 43 | options = options, 44 | } 45 | -------------------------------------------------------------------------------- /pluto/luaext/lua-radix-router/parser/parser.lua: -------------------------------------------------------------------------------- 1 | --- Parser path parser that parse a pattern path. 2 | -- 3 | -- 4 | 5 | local Parser = {} 6 | 7 | local parsers = { 8 | ["default"] = require "lua-radix-router.parser.style.default", 9 | } 10 | 11 | -- return a parser instance 12 | function Parser.new(style) 13 | local parser = parsers[style] 14 | if not parser then 15 | return nil, "unknown parser style: " .. style 16 | end 17 | 18 | return parser.new() 19 | end 20 | 21 | return Parser 22 | -------------------------------------------------------------------------------- /pluto/luaext/lua-radix-router/route.lua: -------------------------------------------------------------------------------- 1 | --- Route a route defines the matching conditions of its handler. 2 | -- 3 | -- @module radix-router.route 4 | 5 | local ipairs = ipairs 6 | local str_byte = string.byte 7 | local BYTE_SLASH = str_byte("/") 8 | 9 | local Route = {} 10 | local mt = { __index = Route } 11 | 12 | 13 | function Route.new(route) 14 | if route.handler == nil then 15 | return nil, "handler must not be nil" 16 | end 17 | 18 | for _, path in ipairs(route.paths) do 19 | if str_byte(path) ~= BYTE_SLASH then 20 | return nil, "path must start with /" 21 | end 22 | end 23 | 24 | return setmetatable(route, mt) 25 | end 26 | 27 | function Route:compare(other) 28 | return (self.priority or 0) > (other.priority or 0) 29 | end 30 | 31 | return Route 32 | -------------------------------------------------------------------------------- /pluto/luaext/misc/timex.lua: -------------------------------------------------------------------------------- 1 | local skynet = require("skynet") 2 | 3 | local timex = {} 4 | 5 | function timex.now() 6 | return math.floor(skynet.time()) 7 | end 8 | 9 | function timex.get_week_day(time) 10 | local weekDay = os.date("%w", time or time.now()) 11 | return weekDay == "0" and 7 or tonumber(weekDay) 12 | end 13 | 14 | --- 获取时区 15 | local _timezone = tonumber(os.date("%z", 0)) / 100 16 | function timex.get_time_zone() 17 | return _timezone 18 | end 19 | 20 | -- 获取距 2000/1/3日 的周数 用来处理单双周的判断 21 | ---@param time integer 22 | ---@return integer 23 | function timex.get_sys_week_num(time) 24 | time = time or time.now() 25 | -- 约定UTC 0 时区的 year = 2000,month=1,day=3,hour=0 这个时间为第一个双周的开始 26 | local timeZone = timex.get_time_zone() or 0 27 | local difTime = time - (946857600 - (timeZone * 3600)) -- 946857600(UTC0点) 28 | local week = math.floor(difTime / (86400 * 7)) 29 | return week 30 | end 31 | 32 | 33 | return timex -------------------------------------------------------------------------------- /pluto/luaext/preload.lua: -------------------------------------------------------------------------------- 1 | require("luaoop.class") 2 | require("luaoop.enum") 3 | require("luaoop.mixin") 4 | require("luaoop.property") 5 | require("logging.init") 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pluto/luaext/service/logger.lua: -------------------------------------------------------------------------------- 1 | local skynet = require "skynet" 2 | require "skynet.manager" 3 | 4 | local impl = require("service.logger.impl") 5 | 6 | local CMD = {} 7 | 8 | skynet.register_protocol { 9 | name = "text", 10 | id = skynet.PTYPE_TEXT, 11 | unpack = skynet.tostring, 12 | dispatch = function(_, _, level, msg) 13 | impl.log(level, msg) 14 | end 15 | } 16 | 17 | skynet.register_protocol { 18 | name = "SYSTEM", 19 | id = skynet.PTYPE_SYSTEM, 20 | unpack = function(...) return ... end, 21 | dispatch = function(_, source) 22 | -- reopen signal 23 | impl.reopen() 24 | end 25 | } 26 | 27 | skynet.init(function() 28 | impl.init() 29 | end) 30 | 31 | function CMD.set_level(level) 32 | impl.set_level(level) 33 | end 34 | 35 | function CMD.shutdown() 36 | impl.close() 37 | end 38 | 39 | skynet.start(function() 40 | skynet.dispatch("lua", function(_, _, cmd, ...) 41 | assert(CMD[cmd])(...) 42 | end) 43 | skynet.register(".logger") 44 | end) 45 | -------------------------------------------------------------------------------- /pluto/luaext/service/logger/impl.lua: -------------------------------------------------------------------------------- 1 | ---@diagnostic disable: need-check-nil, undefined-field 2 | local logging = require 'logging.core' 3 | local is_windows = true -- logging.is_windows() 4 | 5 | local impl = {} 6 | 7 | local logger = nil 8 | 9 | function impl.init() 10 | if is_windows then 11 | local console = require 'logging.console' 12 | logger = console() 13 | else 14 | local syslog = require 'logging.syslog' 15 | logger = syslog({ 16 | ident = 'skynet', 17 | }) 18 | end 19 | end 20 | 21 | function impl.reopen() 22 | end 23 | 24 | function impl.close() 25 | end 26 | 27 | function impl.set_level(level) 28 | logger:setLevel(level) 29 | end 30 | 31 | function impl.log(level, message) 32 | logger:log(level, message) 33 | end 34 | 35 | return impl 36 | --------------------------------------------------------------------------------