Comments (6)
ok so you have some bitmap objects (the raster data) and you want to create a
box around the user with this bitmaps as textures? check the GLFactory there is
some example code how to create textured shapes.
Original comment by simon.heinen
on 5 Oct 2011 at 8:35
from droidar.
Thanks,
so I was able to combine the Vec adding from the mesh with the Textured2dShape.
My only problem now is, that with the following code produces a triangle, not a
rectangle:
Textured2dShape s = new Textured2dShape(IO.loadBitmapFromId(myTargetActivity,
R.drawable.dummy), "imgName");
Vec start = new
Vec( s.myPosition.x-(s.getTextureWidth()/2),s.myPosition.y-(s.getTextureWidth()/
2), 0);
s.add(start.copy()); // 1.
start.x += s.getTextureHeight();
s.add(start.copy()); // 2.
start.y += s.getTextureWidth();
s.add(start.copy()); // 3.
start.x -= s.getTextureHeight();
s.add(start.copy()); // 4.
Do I have to close the "path" somehow?
Second question is: how can I ensure the right position of the image in the
virtual coordinate system? Is there a wax to transform from geo-coordinates to
virtual coords?
kind regards!
Original comment by [email protected]
on 6 Oct 2011 at 8:44
from droidar.
When you take a look at the GLFactory (
http://code.google.com/p/droidar/source/browse/trunk/droidar/DroidAR/src/gl/GLFa
ctory.java ) there is a method
"public MeshComponent newTexturedSquare(String bitmapName, Bitmap bitmap,float
size) {..."
take a look in there or use this method directly. The Textured2dShape is not
the right choice here i think, bette use the TexturedShape like in the method.
Its a triangle because opengl can only draw triangles so if you want to create
a rectangle you have to use 2 triangles (like in the method;)
Original comment by simon.heinen
on 6 Oct 2011 at 1:56
from droidar.
Thanks alot Simon!
I will try that soon. My last little question: I saw a Blender3D Obj file in
the raw folder and found the ObjParser. Does parsing this 3D models actually
work?
Original comment by [email protected]
on 7 Oct 2011 at 10:12
from droidar.
Jep, object parsing and displaying these objects (md3, obj, 3ds and some other
i think, so also animated models!) does work but you will have to use the
ModelLoaderAdapters project (
http://code.google.com/p/droidar/source/browse/#svn%2Ftrunk%2FModelLoaderAdapter
s ) and you will need the libgdx project ( http://code.google.com/p/libgdx/ )
to make the ModelLoaderAdapters work. But if you do so it is easy to load
external models, just check the demo setup in the ModelLoaderAdapters.
Original comment by simon.heinen
on 7 Oct 2011 at 3:20
from droidar.
i finally did a short screencast about how to load 3d models:
http://droidar.blogspot.com/2011/10/loading-external-3d-objects.html
Original comment by simon.heinen
on 11 Oct 2011 at 11:25
- Changed state: Done
from droidar.
Related Issues (20)
- Storing Open GL diamonds
- Changing the circle open gl in accuracytests setup
- GPS position
- Error in camera : Failed to connect to camera device HOT 1
- Disable the "Loading..." dialog
- How do I put undo and clear all in gps map.
- Not working on Note2 HOT 8
- Clearing overlays and waypoints in ARNavigation
- Displaying place in AR provided I have its latitude and longitude HOT 2
- 3d object missing HOT 2
- Scaling rendered components.
- z-Value -- GeoObject hight? HOT 1
- Degrees, minutes and seconds to meters HOT 3
- Why don't we use gyroscope? HOT 1
- Loading any android project activity on world component click event HOT 1
- ModelLoaderAdapters assets HOT 1
- exemple application HOT 1
- How to run the marker based application?
- android.content.ActivityNotFoundException: Unable to find explicit activity class
- how to track 3D object using droidar?
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 droidar.