I have a problem about SegmentSet.removeSegment(segment : Segment)

Software: Away3D 4.x

happy3d, Newbie
Posted: 15 March 2012 01:31 AM   Total Posts: 6

I putted 2 LineSegment objects in a SegmentSet .
then the segmentset._indices.length == 2 * 6 == 12
and the segmentset._vertices.length == 2 * 44 == 88

Now,i remove the second LineSegment object from the SegmentSet.i saw the SegmentSet’s code is “var indVert : uint = _indices[index] * 11;”(ver.Broomstick SegmentSet.as line 141 ver.Beta SegmentSet.as line 140)

The question is..
SegmentSet._indices.length == 12
Second LineSegment.index == 44
it’s out of the indices.length!
so there it’s an error :
RangeError: Error #1125: The index 44 is out of range 12.

Please tell me why?

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X