Setting vertex attributes in Point

Found a bug? Post here.
Post Reply
User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Setting vertex attributes in Point

Post by gunn » Fri 20. Feb 2009, 14:41

When one replaces an attribute in an instance of PointSet one can get unexpected results. Say for example, one has begun with the Attribute.NORMALS set to a DataList initialized from an instance double[20][4], and then one sets the attribute again, this time with a DataList initialized from an instance of double[20][3], then the "new" value of the Attribute.NORMALS will be a DataList corresponding to an instance of double[20][4]. That is, the reduction in vector length of the data from the original setting is not noticed. One can avoid this by setting the value of the attribute to null first, getting rid of the old DataList completely, before resetting it with the new DataList. But this is not a very satisfying solution. My problem is I have no idea how DataList internals work. Is there anyone who can say where this problem should be fixed?
jReality core developer

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Post by gunn » Fri 20. Feb 2009, 14:43

The title of this post should have been "Setting vertex attributes in PointSet" but I managed to hit a magic key which submitted the post before I could finish typing the title! Anyone know which key that was?
jReality core developer

Post Reply