diff --git a/native/cocos/bindings/auto/jsb_gi_auto.cpp b/native/cocos/bindings/auto/jsb_gi_auto.cpp index 7077bf7cea..5c60152c88 100644 --- a/native/cocos/bindings/auto/jsb_gi_auto.cpp +++ b/native/cocos/bindings/auto/jsb_gi_auto.cpp @@ -1413,6 +1413,29 @@ static bool js_cc_gi_LightProbesData_updateTetrahedrons(se::State& s) } SE_BIND_FUNC(js_cc_gi_LightProbesData_updateTetrahedrons) +static bool js_cc_gi_LightProbesData_hasCoefficients(se::State& s) +{ + CC_UNUSED bool ok = true; + const auto& args = s.args(); + size_t argc = args.size(); + cc::gi::LightProbesData *arg1 = (cc::gi::LightProbesData *) NULL ; + bool result; + + if(argc != 0) { + SE_REPORT_ERROR("wrong number of arguments: %d, was expecting %d", (int)argc, 0); + return false; + } + arg1 = SE_THIS_OBJECT(s); + if (nullptr == arg1) return true; + result = (bool)((cc::gi::LightProbesData const *)arg1)->hasCoefficients(); + + ok &= nativevalue_to_se(result, s.rval(), s.thisObject()); + + + return true; +} +SE_BIND_FUNC(js_cc_gi_LightProbesData_hasCoefficients) + static bool js_cc_gi_LightProbesData_getInterpolationSHCoefficients(se::State& s) { CC_UNUSED bool ok = true; @@ -1672,6 +1695,7 @@ bool js_register_cc_gi_LightProbesData(se::Object* obj) { cls->defineFunction("reset", _SE(js_cc_gi_LightProbesData_reset)); cls->defineFunction("updateProbes", _SE(js_cc_gi_LightProbesData_updateProbes)); cls->defineFunction("updateTetrahedrons", _SE(js_cc_gi_LightProbesData_updateTetrahedrons)); + cls->defineFunction("hasCoefficients", _SE(js_cc_gi_LightProbesData_hasCoefficients)); cls->defineFunction("getInterpolationSHCoefficients", _SE(js_cc_gi_LightProbesData_getInterpolationSHCoefficients)); cls->defineFunction("getInterpolationWeights", _SE(js_cc_gi_LightProbesData_getInterpolationWeights)); diff --git a/native/cocos/gi/light-probe/LightProbe.h b/native/cocos/gi/light-probe/LightProbe.h index 072969de5c..349783387c 100644 --- a/native/cocos/gi/light-probe/LightProbe.h +++ b/native/cocos/gi/light-probe/LightProbe.h @@ -59,11 +59,11 @@ public: void updateProbes(ccstd::vector &points); void updateTetrahedrons(); + inline bool hasCoefficients() const { return !empty() && !_probes[0].coefficients.empty(); } bool getInterpolationSHCoefficients(int32_t tetIndex, const Vec4 &weights, ccstd::vector &coefficients) const; int32_t getInterpolationWeights(const Vec3 &position, int32_t tetIndex, Vec4 &weights) const; private: - inline bool hasCoefficients() const { return !empty() && !_probes[0].coefficients.empty(); } static Vec3 getTriangleBarycentricCoord(const Vec3 &p0, const Vec3 &p1, const Vec3 &p2, const Vec3 &position); void getBarycentricCoord(const Vec3 &position, const Tetrahedron &tetrahedron, Vec4 &weights) const; void getTetrahedronBarycentricCoord(const Vec3 &position, const Tetrahedron &tetrahedron, Vec4 &weights) const;