Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 11:55:07 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Bug: Text2D not pickable
Pages: [1]
Print
Author Topic: Bug: Text2D not pickable  (Read 598 times)
mowest
Just dropped in

Offline Offline

Posts: 4


View Profile
« on: 09. August 2007, 10:14:40 am »

Picking a Text2D results in:

java.lang.NullPointerException
   at org.xith3d.picking.DefaultGeometryPickTester.testGeometryIntersection(DefaultGeometryPickTester.java:107)
   at org.xith3d.picking.PickingLibrary.checkGeomIntersections(PickingLibrary.java:266)
   at org.xith3d.picking.PickingLibrary.pickNearest(PickingLibrary.java:523)
.....
Code:
104    final int[] stripLengths = tsa.getStripVertexCounts();
105               
106    int offset = 0;
107    for (int i = 0; i < stripLengths.length; i++)
108    {

changing : line 241: xith-tk:org.xith3d.ui.text2d.Character2D
Code:
237    // --- create the geometry
238    TriangleStripArray geometry = new TriangleStripArray(
239        4,
240        GeometryArray.COORDINATES | GeometryArray.TEXTURE_COORDINATE_2,
241        null
242    );

into

Code:
...
241        new int[]{4}
242     );

will fix this problem.
(Maybe even make this value a static final class variable.)
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 09. August 2007, 07:03:22 pm »

Thanks for the detailed bug report. I have fixed it the other way round.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic