On Fri, Jul 17, 2009 at 11:24 AM, Neil Roberts<[email protected]> wrote: > On Fri, 2009-07-17 at 10:39 +0200, Filipe Nepomuceno wrote: > >> I am trying to connect actors in a graph with a single line in 3D and >> was wondering what would be the best way to go about this. >> >> I was thinking of creating a rectangle of width=2 and height=distance >> between actors, and then use trig to rotate it into place. This is a >> very expensive solution though (if it works) because of the trig >> function calls and it wont show a line if it is rotated 90 degrees >> around the x axis. >> >> Another idea I had was to create a custom actor and use opengl calls >> to just draw a line. with glVertex. > > You can also use the Cogl path API to draw a line. This should be easier > than using GL directly because otherwise you have to be careful not to > conflict with Cogl's state caching of GL. So something like: > > cogl_path_move_to(actor_x, actor_y); > cogl_path_line_to(other_actor_x, other_actor_y); > cogl_path_stroke(); > > - Neil > >
Hi, That solution works if all the actors are on one plane but how can I extend that to actors that are at a different depth? Or am I missing something? Regards, Filipe -- If practice makes you perfect and no one is perfect then why practice? -- To unsubscribe send a mail to [email protected]
