PLine a class to draw lines It might…

PLine, a class to draw … lines! It might seems stupid, but drawing lines is no the default purpose of a game engine. Drawing a line that connect 2 objects for instance is painfull to do with a parallelepiped, especially when you need its thickness to stay constant!

The class PLine is there to help. You define once the number of vertices it contains, and you can modify their position at each draw.

PLine is using the marvellous Ogre’s ManualObject and is updated only when needed thanks to Ogre::RenderQueueListener. A drawback of this flexibility is the independence to the hierarchy: if the line is attached to another object, it is not influenced by its transformation…

Note: see

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.