Compound class for three MovableObjects

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Post Reply
gabyx
Gnoblar
Posts: 15
Joined: Tue Mar 02, 2010 8:24 am

Compound class for three MovableObjects

Post by gabyx »

I am using the DynamicLines class http://www.ogre3d.org/tikiwiki/DynamicL ... e=Cookbook to render coordinate systems.

I use exactly three instances of this class (for x,y,z) as members of a compound object CoordinateSystem .
I am very unsure from which base CoordianteSystem should inherit.

Code: Select all

class CoordianteSystem {
public:
    DynamicCoordinateFrames():
        m_xAxis(DynamicLines::OperationType::OT_LINE_LIST),
        m_yAxis(DynamicLines::OperationType::OT_LINE_LIST),
        m_zAxis(DynamicLines::OperationType::OT_LINE_LIST)
    {};

private:
    Ogre::SceneNode*  m_baseNode;
    DynamicLines m_xAxis;
    DynamicLines m_yAxis;
    DynamicLines m_zAxis;
};
Since CoordinateSystem is a a new renderable object, I would like that it fits correctly into the design of Ogre.?
From what objects should I inherit? From MovableObject?

I would like to attach then an instance of CoordinateSystem to a scene node.
And how do I attach/dettach m_xAxis,m_yAxis,m_zAxis when CoordianteSystem gets attached/dettached?
Post Reply