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.


Messages - Garytech

Pages: [1]
1
Bugs / set Orientation diminish cylinder size
« on: January 31, 2014, 10:00:07 am »
Hi, First and foremost, thank you very much for this amazing Java library you made. Being a novice Android developper, your library is very useful.

In my Android app, I use two primitives: spheres and cylinders.

I wanna connect spheres with cylinders. ( I don't use Polylines because I wanna keep track of the Object3D )

the problem is ; when I create a cylinder it is extremely thin

   public static Object3D Liens(Object3D sphere1, Object3D sphere2){
      
      Object3D cylinder = Primitives.getCylinder(100, 1f,sphere1.getOrigin().distance(sphere2.getOrigin())/2);
      cylinder.setOrigin(Univers.Middle(sphere1,sphere2));
      cylinder.setOrientation( new SimpleVector(0,0,1),cylinder.getOrigin());
      cylinder.build();
      return cylinder;
   }
        public static SimpleVector Middle(Object3D astre1, Object3D astre2){
      SimpleVector milieu = astre2.getOrigin().calcAdd(astre1.getOrigin());
      milieu.scalarMul(0.5f);
      return milieu;
   }
You, once, responded to someone who was complaining about enlargement of objects, I downloaded the new Jar but unfortunately it doesn't fix my problem ...

Pages: [1]