00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #include <stdlib.h>
00040 #include <stdio.h>
00041
00042 #include "OSGConfig.h"
00043
00044 #include <OSGGL.h>
00045
00046 #include <OSGDrawAction.h>
00047 #include <OSGRenderAction.h>
00048 #include "OSGStateSortingGroup.h"
00049
00050 OSG_USING_NAMESPACE
00051
00052
00053
00054
00055
00056 void StateSortingGroup::changed(BitVector whichField, UInt32 origin)
00057 {
00058 Inherited::changed(whichField, origin);
00059 }
00060
00061
00062
00063
00064
00065 void StateSortingGroup::dump( UInt32 uiIndent,
00066 const BitVector bvFlags) const
00067 {
00068 Inherited::dump(uiIndent, bvFlags);
00069 }
00070
00071
00072
00073
00074 StateSortingGroup::StateSortingGroup(void) :
00075 Inherited(),
00076 _sorting_state(false)
00077 {
00078 }
00079
00080 StateSortingGroup::StateSortingGroup(const StateSortingGroup &source) :
00081 Inherited(source),
00082 _sorting_state(source._sorting_state)
00083 {
00084 }
00085
00086
00087
00088
00089 StateSortingGroup::~StateSortingGroup(void)
00090 {
00091 }
00092
00093
00094
00095
00096 Action::ResultE StateSortingGroup::drawEnter(Action *OSG_CHECK_ARG(action))
00097 {
00098 return Action::Continue;
00099 }
00100
00101 Action::ResultE StateSortingGroup::drawLeave(Action *OSG_CHECK_ARG(action))
00102 {
00103 return Action::Continue;
00104 }
00105
00106
00107
00108
00109 Action::ResultE StateSortingGroup::renderEnter(Action *action)
00110 {
00111 RenderAction *pAction = dynamic_cast<RenderAction *>(action);
00112
00113 _sorting_state = pAction->getStateSorting();
00114 pAction->setStateSorting(getSorting());
00115
00116 return Action::Continue;
00117 }
00118
00119 Action::ResultE StateSortingGroup::renderLeave(Action *action)
00120 {
00121 RenderAction *pAction = dynamic_cast<RenderAction *>(action);
00122
00123 pAction->setStateSorting(_sorting_state);
00124
00125 return Action::Continue;
00126 }
00127
00128
00129
00130
00132
00133 void StateSortingGroup::initMethod(void)
00134 {
00135 DrawAction::registerEnterDefault(
00136 getClassType(),
00137 osgTypedMethodFunctor2BaseCPtrRef<
00138 Action::ResultE,
00139 StateSortingGroupPtr ,
00140 CNodePtr ,
00141 Action *>(&StateSortingGroup::drawEnter));
00142
00143 DrawAction::registerLeaveDefault(
00144 getClassType(),
00145 osgTypedMethodFunctor2BaseCPtrRef<
00146 Action::ResultE,
00147 StateSortingGroupPtr ,
00148 CNodePtr ,
00149 Action *>(&StateSortingGroup::drawLeave));
00150
00151 RenderAction::registerEnterDefault(
00152 getClassType(),
00153 osgTypedMethodFunctor2BaseCPtrRef<
00154 Action::ResultE,
00155 StateSortingGroupPtr ,
00156 CNodePtr ,
00157 Action *>(&StateSortingGroup::renderEnter));
00158
00159 RenderAction::registerLeaveDefault(
00160 getClassType(),
00161 osgTypedMethodFunctor2BaseCPtrRef<
00162 Action::ResultE,
00163 StateSortingGroupPtr ,
00164 CNodePtr ,
00165 Action *>(&StateSortingGroup::renderLeave));
00166 }
00167
00168
00169
00170
00171
00172 #ifdef __sgi
00173 #pragma set woff 1174
00174 #endif
00175
00176 #ifdef OSG_LINUX_ICC
00177 #pragma warning( disable : 177 )
00178 #endif
00179
00180 namespace
00181 {
00182 static Char8 cvsid_cpp[] = "@(#)$Id: OSGStateSortingGroup.cpp,v 1.1 2005/04/06 09:35:00 a-m-z Exp $";
00183 static Char8 cvsid_hpp[] = OSGSTATESORTINGGROUP_HEADER_CVSID;
00184 static Char8 cvsid_inl[] = OSGSTATESORTINGGROUP_INLINE_CVSID;
00185 }