ARCoreNDKAPI问题
创始人
2024-09-12 10:00:13
0

ARCore NDK API提供了许多C++函数和类,允许开发人员在C++中使用ARCore的核心功能。以下是示例代码:

// 创建并配置session ArSession* ar_session_; ArSession_create(env, context, &ar_session_); ArSession_setDisplayGeometry(ar_session_, display_rotation_, width_, height_);

// 获取链路指向自适应质量 ArFrame* ar_frame_; ArSession_setCameraTextureName(ar_session_, texture_id_); ArSession_setDisplayGeometry(ar_session_, display_rotation_, width_, height_); ArSession_setDisplayGeometry(ar_session_, display_rotation_, width_, height_); ArSession_setDisplayGeometry(ar_session_, display_rotation_, width_, height_); ArSession_setDisplayGeometry(ar_session_, display_rotation_, width_, height_); ArSession_update(ar_session_, ar_frame_); ArFrame_acquireCameraImage(ar_session_, ar_frame_);

// 在场景中放置对象 ArHitResultList* ar_hit_result_list_; ArHitResultList_create(env, &ar_hit_result_list_); ArFrame_hitTest(ar_session_, ar_frame_, point_x_, point_y_, ar_hit_result_list_); for (int i = 0; i < ArHitResultList_getSize(ar_session_, ar_hit_result_list_); ++i) { ArHitResult* ar_hit_result = ArHitResultList_getItem(ar_session_, ar_hit_result_list_, i); ArHitResult_acquireNewAnchor(ar_session_, ar_hit_result, &ar_anchor_); ArAnchor_getPose(ar_session_, ar_anchor_, ar_pose_); }

// 渲染帧的3D模型 ArSession_setCameraTextureName(ar_session_, texture_id_); ArFrame* ar_frame_; ArSession_update(ar_session_, ar_frame_); const ArCamera* ar_camera_; ArFrame_acquireCamera(ar_session_, ar_frame_, &ar_camera_); ArPose* ar_camera_pose_; ArPose_create(ar_session_, nullptr, &ar_camera_pose_); ArCamera_getPose(ar_session_, ar_camera_, ar_camera_pose_, &error_); ArCamera_release(ar_camera_);

// 释放资源 ArSession_destroy(ar_session_); ArPose_destroy(ar_camera_pose_); ArHitResultList_destroy(ar_hit_result_list_);

相关内容

热门资讯

微扑克有假!wEpoKe软件透... 微扑克有假!wEpoKe软件透明挂,德州总是真的有挂(详细代打ai辅助教程)微扑克有假辅助器中分为三...
云扑克辅助器是真是假!聚星扑克... 云扑克辅助器是真是假!聚星扑克软件透明挂,轰趴十三水一贯真的有挂(详细辅助软件教程);1、金币登录送...
红龙扑克有外 挂!wepoKe... 红龙扑克有外 挂!wepoKe软件透明挂,云扑克app好像真的有挂(详细辅助脚本教程)红龙扑克有外 ...
德州ai软件可以收费!Wepo... 德州ai软件可以收费!WepoKe软件透明挂,WepOke原来真的有挂(详细辅助软件教程)1、德州a...
微扑克辅助钻石!pokerma... 微扑克辅助钻石!pokermaster软件透明挂,约局吧一贯真的有挂(详细智能ai代打教程)微扑克辅...
微扑克真的有挂存在!AAPOK... 微扑克真的有挂存在!AAPOKer软件透明挂,AAPOKeR都是真的有挂(详细透视辅助教程)一、微扑...
wepoke软件规律!聚星扑克... wepoke软件规律!聚星扑克德州软件透明挂,德州ai总是真的有挂(详细辅助软件教程)一、wepok...
WePoKe外 挂!智星德州软... WePoKe外 挂!智星德州软件透明挂,we辅助poker就是真的有挂(详细辅助脚本教程)1、该软件...
aapoker软件讲解!德扑软... 您好,aapoker软件讲解这款游戏可以开挂的,确实是有挂的,需要了解加微【757446909】很多...
扑克王辅助工具!aaPOKER... 扑克王辅助工具!aaPOKER软件透明挂,轰趴大菠萝就是真的有挂(详细ai辅助教程);1、不需要AI...