Giter Site home page Giter Site logo

arkit-line-drawing's Introduction

ARKit-line-drawing

Changed the default ARKit project to draw a line where the camera is positioned

gif

Video source

img_0065 2

arkit-line-drawing's People

Contributors

jbhav24 avatar julioacarrettoni avatar lapfelix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arkit-line-drawing's Issues

lagging so much

Does anyone know how we can better the fps? the frame rate will drop so fast and the app becomes so slow.

Question about the coordinates mapping

Hi, this project is really awesome! I just want to ask one question about coordinates mapping:

 let mat = SCNMatrix4FromMat4(currentFrame.camera.transform)
        let dir = SCNVector3(-1 * mat.m31, -1 * mat.m32, -1 * mat.m33)
        let currentPosition = pointOfView.position + (dir * 0.1)

Could you please explain what does these code do?
What's the meaning of sceneView.pointOfView and its difference between currentFrame?

And , I also wondered to calculate the current position of line point to start drawing, why can't I use the following code?

func getCameraCoordinate(sceneView: ARSCNView) -> SCNVector3 {
        let cameraTransform = sceneView.session.currentFrame?.camera.transform
        let cameraCoordinates = MDLTransform(matrix: cameraTransform!)
        return SCNVector3(x: cameraCoordinates.translation.x, y: cameraCoordinates.translation.y, z: cameraCoordinates.translation.z)
    }

Thank you very much.

GLLineWidth Doesn't Work

When you change the integer within GLLineWidth(x) it doesn't work on changing the actual line.

Trouble building in xcode 9 beta 2

I'm getting an error building the project in Xcode 9 beta 2. The error I'm getting is
"SCNMatrix4FromMat4 is unavailable in swift" viewController line 67

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.