RESOLVED: Still about the LineSegment Problem

Software: Away3D 4.x

Avatar
redfox2008cn, Newbie
Posted: 20 September 2011 11:39 AM   Total Posts: 21

I saw administrator’s classic example about the lineSegment.It’s great! But if i want to move a line’s positon or change other properties,how can I get the lineSegement object from SegmentSet? It looks like SegmentSet Class has no method to support to get line object from SegmentSet.

   

Avatar
Fabrice Closier, Administrator
Posted: 20 September 2011 02:52 PM   Total Posts: 1265   [ # 1 ]

If you have declared and added the LineSegment, if you keep track of it, you will be able to update it. By changing either its start/end vector3d’s for instance

   

Avatar
redfox2008cn, Newbie
Posted: 22 September 2011 03:46 AM   Total Posts: 21   [ # 2 ]

thank you ,i store the lineSegement objects in another Array,when i need to change line’s properties,i get it from line’s Array,update it,at last set it in SegementSet’s updateSegment method,it worked.

   

Avatar
Alejandro Santander, Administrator
Posted: 23 September 2011 04:39 AM   Total Posts: 414   [ # 3 ]

SegmentSet now has a getSegment(index:uint):Segment for this. More info in this thread: http://away3d.com/forum/viewthread/782/#2676

   

Avatar
Choons, Sr. Member
Posted: 23 September 2011 07:36 AM   Total Posts: 281   [ # 4 ]

Hi Alejandro- this is a bit of a side track, but I’m curious about what exactly a segment (or lineSegment) is in a geometric sense? I’ve worked with them so I know how to use them, but from the point of view of hardware what is a segment made of? Are they vertex/polygon based? Do they run on the GPU via shaders?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X