PeerMessage
PeerOS - Message class
Welcome to the new Ogre Wiki!
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
If you haven't done so already, be sure to visit the Wiki Portal to read about how the wiki works. Especially the Ogre Wiki Overview page.
Description
PeerMessage should answer:
- Decide exactly what you're trying to say, e.g., "Place camera here.".
- Decide exactly how you're going to store this information. What data structures do you need to store (or reference) to say it?
- Create a class to say this
- Inherit your class from PeerMessage and, probably, some lower-level utility class. For instance, the PeerOS test CM_Camera class holds a simple vector (3 floats):
class CM_Camera: public PeerMessage, public ImaginaryOgre3DCameraClass { private: float m_position[3]; public: CM_Camera(void) : PeerMessage() , ImaginaryOgre3DCameraClass() { m_position[0] = 0.111f; m_position[1] = 0.511f; m_position[2] = 0.666f; } float getPos(int _i) { return m_position[_i]; } void dispatch(PM_ReaderBase* handler) { dynamicDispatch(handler,this); } };
Contributors to this page: jacmoe
.
Page last modified on Sunday 03 of January, 2010 00:41:22 UTC by jacmoe
.
The content on this page is licensed under the terms of the Creative Commons Attribution-ShareAlike License.
As an exception, any source code contributed within the content is released into the Public Domain.
Sidebar
Search box
Online users
98
online users

