pierstocazzo / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

BillboardNode default/no-argument constructor is empty #81

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a BillboardNode using new BillboardNode();
2. attach the BillboardNode to a scene node
3. attach some geometry to the BillboardNode

What is the expected output? What do you see instead?
- I'd expect the system to work, even without a name for the BillboardNode :)
- However, I get: 
java.lang.NullPointerException
    at com.jme.scene.BillboardNode.rotateAxial(BillboardNode.java:233)
    at com.jme.scene.BillboardNode.rotateBillboard(BillboardNode.java:149)
    at com.jme.scene.BillboardNode.draw(BillboardNode.java:132)

In my case "look" is null because it is not initialized in the
default/no-argument constructor.

IMHO, it should be possible to create a BillboardNode without a name. So
the constructor body could be changed to this(""); or this(null); whichever
fits more.

Original issue reported on code.google.com by thomm...@gmx.net on 21 Jul 2009 at 9:55

GoogleCodeExporter commented 9 years ago
The empty constructor is only for serialization

Original comment by ShadowIs...@gmail.com on 30 Oct 2010 at 11:30