PCMRenderer_impl.h

Go to the documentation of this file.
00001 
00002 //
00003 // This source file is a part of ParCompMark
00004 // Parallel Compositing Benchmark Framework
00005 //
00006 // for latest info see http://parcompmark.sourceforge.net
00007 
00008 //
00009 // Copyright (C) 2006 IT2 ParCompMark Dev. Team
00010 // 
00011 // This program is free software; you can redistribute it and/or
00012 // modify it under the terms of the GNU General Public License
00013 // as published by the Free Software Foundation; either version 2
00014 // of the License, or (at your option) any later version.
00015 // 
00016 // This program is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00019 // GNU General Public License for more details.
00020 // 
00021 // You should have received a copy of the GNU General Public License
00022 // along with this program; if not, write to the Free Software
00023 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00024 
00027 
00028  //
00029  // Getters & setters
00030  //
00031 
00032 inline void *Renderer::getRendererHandle() const
00033 {
00034   return mRendererHandle;
00035 }
00036 
00037  /*-------------------------------------------------------------------------*/
00038 
00039 inline void Renderer::setRendererHandle(const void *rendererhandle)
00040 {
00041   mRendererHandle = (void *) rendererhandle;
00042 }
00043 
00044  /*-------------------------------------------------------------------------*/
00045 
00046 inline OpenGLRenderingEngine *Renderer::getParent() const
00047 {
00048   return mParent;
00049 }
00050 
00051  /*-------------------------------------------------------------------------*/
00052 
00053 inline const bool & Renderer::getInitialized() const
00054 {
00055   return mInitialized;
00056 }
00057 
00058  /*-------------------------------------------------------------------------*/
00059 
00060 inline s32 & Renderer::getAutoRenderOrder()
00061 {
00062   return mAutoRenderOrder;
00063 }
00064 
00065  /*-------------------------------------------------------------------------*/
00066 
00067 inline void Renderer::setAutoRenderOrder(const s32 autorenderorder)
00068 {
00069   mParent->setAutoRenderOrder(this, mAutoRenderOrder = autorenderorder);
00070 }
00071 
00072  /*-------------------------------------------------------------------------*/
00073 
00074  //
00075  // Methods
00076  //
00077 
00078 inline void Renderer::resize(const u32 width, const u32 height)
00079 {
00080   mRendererPlugin->resize(mRendererHandle, (const unsigned) width, (const unsigned) height);
00081 }
00082 
00083  /*----------------------------------------------------------------------*/
00084 
00085 inline s32 Renderer::getSortOrder()
00086 {
00087   return mRendererPlugin->getSortOrder(mRendererHandle);
00088 }
00089 
00090  /*----------------------------------------------------------------------*/
00091 
00092 inline void Renderer::render()
00093 {
00094   mRendererPlugin->render(mRendererHandle, mParent->getParent()->getFrameTime(),
00095                          mParent->getParent()->getFrameNumber());
00096 }
00097 
00098  /*----------------------------------------------------------------------*/
00099 
00100 inline void Renderer::setMiscParam(const char *name, const char *value)
00101 {
00102   mRendererPlugin->setMiscParam(mRendererHandle, name, value);
00103 }
00104 
00105  /*----------------------------------------------------------------------*/
00106 
00107 inline void Renderer::setObjectSpaceBoundingBox(const double x0, const double y0, const double z0,
00108                                                 const double x1, const double y1, const double z1)
00109 {
00110   mRendererPlugin->setObjectSpaceBoundingBox(mRendererHandle, x0, y0, z0, x1, y1, z1);
00111 }
00112 
00113  /*----------------------------------------------------------------------*/
00114 
00115 inline void Renderer::setObjectId(const unsigned objectId)
00116 {
00117   mRendererPlugin->setObjectId(mRendererHandle, objectId);
00118 }
00119 
00120  /*----------------------------------------------------------------------*/
00121 
00122 inline void Renderer::setScreenSpaceFramelet(const double u0, const double v0, const double u1,
00123                                           const double v1)
00124 {
00125   mRendererPlugin->setScreenSpaceFramelet(mRendererHandle, u0, v0, u1, v1);
00126 }
00127 
00128  /*----------------------------------------------------------------------*/
00129 
00130 inline void Renderer::registerObjectSpaceBoundingBox(const double x0, const double y0,
00131                                                   const double z0, const double x1,
00132                                                   const double y1, const double z1)
00133 {
00134   mRendererPlugin->registerObjectSpaceBoundingBox(mRendererHandle, x0, y0, z0, x1, y1, z1);
00135 }
00136 
00137  /*----------------------------------------------------------------------*/