OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreCompositorWorkspaceDef.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __CompositorWorkspaceDef_H__
30 #define __CompositorWorkspaceDef_H__
31 
32 #include "OgreHeaderPrefix.h"
34 
35 namespace Ogre
36 {
56  {
57  friend class CompositorWorkspace;
58  public:
59  struct ChannelRoute
60  {
65  ChannelRoute( uint32 _outChannel, IdString _outNode, uint32 _inChannel, IdString _inNode ) :
66  outChannel( _outChannel ), outNode( _outNode ),
67  inChannel( _inChannel ), inNode( _inNode ) {}
68  };
69 
72  protected:
73 
77 
80 
82 
92  void createImplicitAlias( IdString nodeName );
93 
94  public:
95  CompositorWorkspaceDef( IdString name, CompositorManager2 *compositorManager );
103  void connect( IdString outNode, uint32 outChannel, IdString inNode, uint32 inChannel );
104 
111  void connect( IdString outNode, IdString inNode );
112 
120  void connectOutput( IdString inNode, uint32 inChannel );
121 
132  void clearAllInterNodeConnections(void);
133 
145  void clearOutputConnections(void);
146 
153  void clearAll(void);
154 
169  void addNodeAlias( IdString alias, IdString nodeName );
170 
174  void removeNodeAlias( IdString alias );
175 
180  const NodeAliasMap& getNodeAliasMap(void) { return mAliasedNodes; }
181 
193  ChannelRouteList& _getChannelRoutes(void) { return mChannelRoutes; }
194  };
195 
198 }
199 
200 #include "OgreHeaderSuffix.h"
201 
202 #endif
unsigned int uint32
Definition: OgrePlatform.h:420
#define _OgreExport
Definition: OgrePlatform.h:255
ChannelRoute(uint32 _outChannel, IdString _outNode, uint32 _inChannel, IdString _inNode)
Name of the alias.
const NodeAliasMap & getNodeAliasMap(void)
Gets read-only access to the map to all added nodes and their aliases.
A compositor workspace is the main interface to render into an RT, be it a RenderWindow or an RTT (Re...
list< ChannelRoute >::type ChannelRouteList
Centralized class for dealing with declarations of textures in Node & Workspace definitions.
CompositorManager2 * mCompositorManager
Alias of the final node to send the RenderWindow to.
Hashed string.
Definition: OgreIdString.h:94
IdString mFinalNode
Input Channel # to send the RenderWindow to.
ChannelRouteList & _getChannelRoutes(void)
Gets direct access to the channel route (aka the interconnections between all of our nodes)...
Main system for managing Render Targets through the use of nodes.
map< IdString, IdString >::type NodeAliasMap