[vtkusers] vtkFloatArray::GetTuple Problem/Error
de Boer Ingo
I.deBoer at polytec.de
Thu Oct 9 06:13:22 EDT 2003
Hi all,
I have a problem in
vtkFloatArray::GetTuple(const vtkIdType i, float * tuple)
Somehow/Sometime I get i < 0 (like -842150451). The call
comes from vtkPolygon::ComputeNormal, which comes from
vtkOpenGLDrawST3.
The solution I did was:
vtkIdType id = i;
if (id < 0) id = 0;
float *t = this->Array + this->NumberOfComponents*id;
instead of
float *t = this->Array + this->NumberOfComponents*i;
This works and my object is shown as expected. But I was wondering
how this can happen ? The object that I show has texture, points and
polygons. The polygons are given and not calculated by VTK. This error
above happens only on certain objects, not with all my objects/files.
Any Hints ?
greets
Ingo
---
Dr.-Ing. Ingo H. de Boer
Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax : ++49 7243 604 255
More information about the vtkusers
mailing list