Comments (4)
Currently, there is no API specifically for rendering lines in Sceneform. One way to render a line would be to use a model of a cylinder and then rotate, scale, and position a node to visualize the cylinder as a line between two points. Could you provide more information on what you need for your use case?
from sceneform-android-sdk.
@dsternfeld7 I want to write a AR ruler app
from sceneform-android-sdk.
Very cool! Closing out this issue. Please make a new ticket for additional issues/questions related to your use-case.
from sceneform-android-sdk.
rectRenderer = new RectanglePolygonRenderer();
float lineWidth = 0.002f;
// viewHeight,viewWidth is surface Height and width respectively
float lineWidthH = lineWidth / viewHeight * viewWidth;
rectRenderer.setVerts(
pose0.tx() - lineWidth, pose0.ty() + lineWidthH, pose0.tz() - lineWidth,
pose0.tx() + lineWidth, pose0.ty() + lineWidthH, pose0.tz() + lineWidth,
pose1.tx() + lineWidth, pose1.ty() + lineWidthH, pose1.tz() + lineWidth,
pose1.tx() - lineWidth, pose1.ty() + lineWidthH, pose1.tz() - lineWidth,
pose0.tx() - lineWidth, pose0.ty() - lineWidthH, pose0.tz() - lineWidth,
pose0.tx() + lineWidth, pose0.ty() - lineWidthH, pose0.tz() + lineWidth,
pose1.tx() + lineWidth, pose1.ty() - lineWidthH, pose1.tz() + lineWidth,
pose1.tx() - lineWidth, pose1.ty() - lineWidthH, pose1.tz() - lineWidth);
rectRenderer.draw(viewmtx, projmtx);
from sceneform-android-sdk.
Related Issues (20)
- Null object
- How to find angle of model from localRotation?
- two modelRenderable overlapping will flicker HOT 1
- [SceneForm v1.16.0 breakage] Not AndroidX ready
- [SceneForm v1.16.0 breakage] no maven dep
- [SceneForm v1.16.0 breakage] ViewRenderables not working HOT 1
- available configuration for avoiding too much heat on device
- GLTF's UV scale functionality not implemented in 1.16.0?
- Object is moving along when i move the phone ?! HOT 5
- ArSceneView have some black dot
- Sceneform plugin:1.15.0 with Android Studio 3.6 not working at all HOT 5
- [SceneForm v1.16.0 breakage] chromakey video
- Cannot load GLB file at Runtime using canonical face
- Is there a way to generate .sfb files from .fbx in runtime HOT 2
- Work with Canonical Face Mesh in Blender
- SceneForm Uses 100% RAM HOT 3
- Update Filament to v1.6.0 (filament-android:1.6.0 & gltfio-android:1.6.0) HOT 1
- How To Show Normal Texture in UV1?
- How can I import model asset the obj file?
- ArFragment leaking after parent activity finished
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sceneform-android-sdk.