목록언어/iOS (31)
Machineboy空

Occulusion이란? (폐색, 폐쇄, 교합 등)basically the state of being closed, blocked, occluded meaning something is blocking you so you can really see the other thing. occuding it : physical table, which is hiding the virtual object https://youtube.com/shorts/Z54MMVrD-nE?si=rjsLrlUUhmEPZ_Nw Occulusion Material이란!// Simple Materiallet box = ModelEntity(mesh:MeshResource.generateBox(size: 0.3), materials: [Si..

Reality Composer GUI의 필요?code will grow much bigger if we are dealing with multiple entitiesReality Composer is already bundled with X code.set up your scenes by simply drag and drop behavior. 모델 여러 개를 코드로 추가하다보면 머릿속으로 씬을 상상하기 힘들어지는 순간이 분명히 온다.이 때, 작업을 좀 더 용이하게 하기 위해 애플에서 제공하는 그래픽 툴이 Reality Composer이다.2024 Reality Composer그런데 문제는 현재가 reality composer에서 reality composer pro로 넘어가고 있는 과도기라는 점이다.3D..

.usdz파일을 넣어보자! https://developer.apple.com/augmented-reality/quick-look/ Quick Look Gallery - Augmented Reality - Apple DeveloperEmbed Quick Look views in your apps and websites to let users see incredible detailed renderings in 3D or AR.developer.apple.com // 방법 1: sync하게 가져오기, 작은 glitch가 생길 수 있다. /// modelEntity.load = synchronous function, doesn't perform asynchronously/// so we have to use a..
Tap을 어떻게 감지하는가import SwiftUIimport RealityKitstruct ContentView : View { var body: some View { return ARViewContainer().edgesIgnoringSafeArea(.all) }}struct ARViewContainer: UIViewRepresentable { func makeUIView(context: Context) -> ARView { let arView = ARView(frame: .zero) /// 모든 view는 gesture를 가지고 있음 /// Coordinator = coordinate differe..

RealityKit의 구성도 Anchoring Type1) 공식 문서상 Anchor의 분류분류Anchor 종류 Surface DetectionARPlaneAnchoranything flat (.vertical, .horizontal)ARMeshAnchor Image DetectionARImageAnchor이미지 인식 후 앵커 추가ARReferenceImage Physical ObjectsARObjectAnchor ARReferenceObject Body Position TrackingARBodyAnchor Face TrackingARFaceAnchor GeotrackingARGeoAnchor Multiuser ExperiencesARParticipantAnchor App ClipARAppClpCodeA..

* 하고 싶은 것modelEntity의 위치에 접근하고 싶다.오른쪽의 경우 평면으로 인지하고 놓인 큐브의 좌표값에 왼쪽의 경우 world(0,0,-5)의 값에 접근해서 로그를 찍어보고 싶다. * 당면한 문제 1 : 양쪽의 Position값이 같게 찍힌다..anchor.position과 model.position이 모두 원점으로 찍히는 이유가..무엇이지? * 시도 방법 1 : scene에서 해당 entity를 찾아가본다. 혹시 scene에 추가되기 이전의 값에 접근하여 원점이 뜨는가 싶어서 anchor에 추가하고 난 뒤,상부부터 차례로 접근해봤다.. 그래도 여전히 같은 결과값// 1번째print("anchor position: \(anchor.position)" )// 2번째print("anchor p..

구현 내용1: ARView를 생성하고 AR World 좌표상 원점이 정해지는 순간, 현 위치의 위도, 경도를 구해 표시해보자!* 하고 싶은 것ARView의 makeUI 함수, 즉 ARView가 생성되는 순간 가장 먼저 한 번 호출되는 함수에 현 위치의 값을 넣어 표시하고 싶다.그렇게 원점에 현 위치를 맵핑해 두고, ARWorld의 다른 좌표들도 현실의 위도 경도와 짝을 지어주고 싶다.* 당면한 문제 1 : location값이 nilLocationManager.location.coordinate에 접근해 띄우고 싶은데,LocationManager의 coordinate는 double타입으로 미세한데다, 위치가 변할 때마다 update하고 있기 때문인지,무언가 변하는 상태를 내가 ARView에서 감지를 잘해주..
어떤 정보를 파악할 수 있을까?CLLocationlatitude, longitudeCLLocationCoordinate2DCLFloorCLHeadingLocationManger Class를 선언하고 CLLocationMangerDelegate를 상속하는데 이의 역할이 무엇인지에 관해 읽어보면 좋을 글 https://zeddios.tistory.com/8 iOS ) 왕초보를 위한 delegate정리swift 공부를 하면서 꼭 알아야하는 개념 중 하나가 delegate개념인데요, 저같은 경우에는 자료들도 다 영어고 한글로 된 설명을 봐도 너무 이해하기가 어렵더라구요 :( 요 며칠간 공부를 하다가 어zeddios.tistory.com import SwiftUIimport CoreLocation/// NSObj..