00001 /*---------------------------------------------------------------------------*\ 00002 * OpenSG * 00003 * * 00004 * * 00005 * Copyright (C) 2000-2002 by the OpenSG Forum * 00006 * * 00007 * www.opensg.org * 00008 * * 00009 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de * 00010 * * 00011 \*---------------------------------------------------------------------------*/ 00012 /*---------------------------------------------------------------------------*\ 00013 * License * 00014 * * 00015 * This library is free software; you can redistribute it and/or modify it * 00016 * under the terms of the GNU Library General Public License as published * 00017 * by the Free Software Foundation, version 2. * 00018 * * 00019 * This library is distributed in the hope that it will be useful, but * 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00022 * Library General Public License for more details. * 00023 * * 00024 * You should have received a copy of the GNU Library General Public * 00025 * License along with this library; if not, write to the Free Software * 00026 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00027 * * 00028 \*---------------------------------------------------------------------------*/ 00029 /*---------------------------------------------------------------------------*\ 00030 * Changes * 00031 * * 00032 * * 00033 * * 00034 * * 00035 * * 00036 * * 00037 \*---------------------------------------------------------------------------*/ 00038 00039 //--------------------------------------------------------------------------- 00040 // Includes 00041 //--------------------------------------------------------------------------- 00042 00043 00044 #include <stdlib.h> 00045 #include <stdio.h> 00046 00047 #include <OSGConfig.h> 00048 00049 #include <OSGAction.h> 00050 00051 OSG_BEGIN_NAMESPACE 00052 00053 /***************************************************************************\ 00054 * Types * 00055 \***************************************************************************/ 00056 00057 00058 /***************************************************************************\ 00059 * Class variables * 00060 \***************************************************************************/ 00061 00062 00063 /***************************************************************************\ 00064 * Class methods * 00065 \***************************************************************************/ 00066 00067 00068 /*-------------------------------------------------------------------------*\ 00069 - public - 00070 \*-------------------------------------------------------------------------*/ 00071 00072 /*-------------------------------------------------------------------------*\ 00073 - protected - 00074 \*-------------------------------------------------------------------------*/ 00075 00076 00077 /*-------------------------------------------------------------------------*\ 00078 - private - 00079 \*-------------------------------------------------------------------------*/ 00080 00081 00082 /***************************************************************************\ 00083 * Instance methods * 00084 \***************************************************************************/ 00085 00086 /*-------------------------------------------------------------------------*\ 00087 - public - 00088 \*-------------------------------------------------------------------------*/ 00089 00090 /*------------- constructors & destructors --------------------------------*/ 00091 00101 /*------------------------------ access -----------------------------------*/ 00102 00103 /*---------------------------- properties ---------------------------------*/ 00104 00105 inline 00106 void RenderAction::updateTopMatrix(void) 00107 { 00108 _currMatrix.acc = _camInverse; 00109 _currMatrix.acc.mult(_currMatrix.second); 00110 } 00111 00112 inline 00113 const Matrix &RenderAction::top_matrix(void) 00114 { 00115 // not necessary anymore, is updated as soon as _currMatrix changes 00116 // _accMatrix = _camInverse; 00117 // _accMatrix.mult(_currMatrix.second); 00118 00119 return _currMatrix.acc; 00120 } 00121 00122 inline 00123 void RenderAction::setStateSorting(bool s) 00124 { 00125 _stateSorting = s; 00126 } 00127 00128 inline 00129 bool RenderAction::getStateSorting(void) 00130 { 00131 return _stateSorting; 00132 } 00133 00134 inline 00135 UInt32 RenderAction::getActiveLightsMask(void) 00136 { 00137 return _activeLightsMask; 00138 } 00139 00140 inline 00141 UInt32 RenderAction::getActiveLightsCount(void) 00142 { 00143 return _activeLightsCount; 00144 } 00145 00146 inline 00147 const std::vector<UInt32> &RenderAction::getLightEnvsLightsState(void) 00148 { 00149 return _lightEnvsLightsState; 00150 } 00151 00152 inline State *RenderAction::getCurrentState(void) 00153 { 00154 return _pActiveState; 00155 } 00156 00157 /*-------------------------- your_category---------------------------------*/ 00158 00159 /*-------------------------- assignment -----------------------------------*/ 00160 00165 /*-------------------------- comparison -----------------------------------*/ 00166 00180 /*-------------------------------------------------------------------------*\ 00181 - protected - 00182 \*-------------------------------------------------------------------------*/ 00183 00184 00185 00186 /*-------------------------------------------------------------------------*\ 00187 - private - 00188 \*-------------------------------------------------------------------------*/ 00189 00190 OSG_END_NAMESPACE 00191 00195 //: Example for the head comment of a function 00198 //p: Paramaters: 00199 //p: 00201 //g: GlobalVars: 00202 //g: 00204 //r: Return: 00205 //r: 00207 //c: Caution: 00208 //c: 00210 //a: Assumptions: 00211 //a: 00213 //d: Description: 00214 //d: 00216 //s: SeeAlso: 00217 //s: 00219
1.5.5