Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Harald

Pages: [1]
Support / polyline fixed width
« on: March 24, 2021, 11:50:41 am »
TL,DR: i am currently programming a trackline to a moving object. right now I am using a polyline with a fixed width. If I zoom in or out on that fixed length the object obviously gets smaller and bigger accordingly, but the polyline keeps exactly the same width. Is there a way to fix the width rendering of a polyline to an object / a plane?

I am currently working on a gps system for agriculture and try to visualize the process with jPCT. The code is getting executed on an android device. The visualization covers a arrow shaped object that is moving accordingly to gps positions that get translated into a 3D World position. The position gets transformed by things that should not be taken into consideration in this problem. In the End an Object3D is moving through the rendered world.

To keep track of the progress (the are that the object already covered) I tried several things:
1. I created a polyline with a width that is about hte same of the object width. When moving the polyline will update its array with new points. So far it looked pretty good but if replace the camera (eg. zoom in or out) the polyline width does not change but the object appears smaller  / bigger so that the polyline / object ratio is not the same anymore.
2. To avoid this problem i started to create two polylines on each end of the object and creted object3Ds with two triangles in runtime. this got the job done for the correct ratio but is killing the fps. I also read on the wiki that creating obejcts in runtime should be strictly avoided so I think this will not suit for a solution as well.

So in the end I want to ask if there is a way to get the width of a polyline fixed to the render distance to that polyline or something simular?

Also if my explanations are not understandable just ask.

Pages: [1]