Changeset 11164
- Timestamp:
- 03/05/10 13:55:08 (3 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 16 modified
-
include/osg/CullSettings (modified) (3 diffs)
-
include/osg/CullingSet (modified) (2 diffs)
-
include/osgGA/GUIEventAdapter (modified) (2 diffs)
-
include/osgPresentation/SlideEventHandler (modified) (1 diff)
-
include/osgSim/ObjectRecordData (modified) (1 diff)
-
include/osgSim/SphereSegment (modified) (2 diffs)
-
include/osgUtil/ShaderGen (modified) (1 diff)
-
src/osgSim/SphereSegment.cpp (modified) (1 diff)
-
src/osgUtil/ShaderGen.cpp (modified) (5 diffs)
-
src/osgWrappers/introspection/osg/CullSettings.cpp (modified) (3 diffs)
-
src/osgWrappers/introspection/osg/CullingSet.cpp (modified) (1 diff)
-
src/osgWrappers/introspection/osgGA/GUIEventAdapter.cpp (modified) (3 diffs)
-
src/osgWrappers/introspection/osgPresentation/SlideEventHandler.cpp (modified) (1 diff)
-
src/osgWrappers/introspection/osgSim/ObjectRecordData.cpp (modified) (1 diff)
-
src/osgWrappers/introspection/osgSim/SphereSegment.cpp (modified) (2 diffs)
-
src/osgWrappers/introspection/osgUtil/ShaderGen.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osg/CullSettings
r10838 r11164 80 80 81 81 NO_VARIABLES = 0x00000000, 82 ALL_VARIABLES = 0xFFFFFFFF 83 }; 82 ALL_VARIABLES = 0x7FFFFFFF 83 }; 84 85 typedef int InheritanceMask; 84 86 85 87 /** Set the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.*/ 86 void setInheritanceMask( unsigned intmask) { _inheritanceMask = mask; }88 void setInheritanceMask(InheritanceMask mask) { _inheritanceMask = mask; } 87 89 88 90 /** Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object.*/ 89 unsigned intgetInheritanceMask() const { return _inheritanceMask; }91 InheritanceMask getInheritanceMask() const { return _inheritanceMask; } 90 92 91 93 /** Set the local cull settings values from specified CullSettings object.*/ … … 191 193 }; 192 194 193 typedef unsignedint CullingMode;195 typedef int CullingMode; 194 196 195 197 /** Set the culling mode for the CullVisitor to use.*/ … … 245 247 protected: 246 248 247 unsigned int_inheritanceMask;249 InheritanceMask _inheritanceMask; 248 250 InheritanceMaskActionOnAttributeSetting _inheritanceMaskActionOnAttributeSetting; 249 251 -
OpenSceneGraph/trunk/include/osg/CullingSet
r5328 r11164 121 121 typedef std::vector<ShadowVolumeOccluder> OccluderList; 122 122 123 typedef unsignedint Mask;123 typedef int Mask; 124 124 125 125 enum MaskValues … … 141 141 SHADOW_OCCLUSION_CULLING 142 142 }; 143 143 144 144 void setCullingMask(Mask mask) { _mask = mask; } 145 145 Mask getCullingMask() const { return _mask; } -
OpenSceneGraph/trunk/include/osgGA/GUIEventAdapter
r10211 r11164 380 380 381 381 /// set current mouse button state. 382 void setButtonMask( unsignedint mask) { _buttonMask = mask; }382 void setButtonMask(int mask) { _buttonMask = mask; } 383 383 384 384 /// get current mouse button state. 385 unsignedint getButtonMask() const { return _buttonMask; }385 int getButtonMask() const { return _buttonMask; } 386 386 387 387 /// set modifier key mask. 388 void setModKeyMask( unsignedint mask) { _modKeyMask = mask; }388 void setModKeyMask(int mask) { _modKeyMask = mask; } 389 389 390 390 /// get modifier key mask. 391 unsignedint getModKeyMask() const { return _modKeyMask; }391 int getModKeyMask() const { return _modKeyMask; } 392 392 393 393 /// set scrolling motion (for EventType::SCROLL). … … 465 465 float _mx; 466 466 float _my; 467 unsignedint _buttonMask;468 unsignedint _modKeyMask;467 int _buttonMask; 468 int _modKeyMask; 469 469 MouseYOrientation _mouseYOrientation; 470 470 -
OpenSceneGraph/trunk/include/osgPresentation/SlideEventHandler
r10396 r11164 261 261 void setLoopPresentation(bool loop) { _loopPresentation = loop; } 262 262 bool getLoopPresentation() const { return _loopPresentation; } 263 263 264 264 void dispatchEvent(const KeyPosition& keyPosition); 265 266 enum ObjectMask267 {268 MOVIE = 1<<0,269 OBJECTS = 1<<1,270 ALL_OBJECTS = MOVIE | OBJECTS271 };272 265 273 266 protected: -
OpenSceneGraph/trunk/include/osgSim/ObjectRecordData
r9458 r11164 53 53 META_Object( osgSim, ObjectRecordData ); 54 54 55 enum Flags 56 { 57 DONT_DISPLAY_IN_DAYLIGHT = 0x80000000u >> 0, 58 DONT_DISPLAY_AT_DUSK = 0x80000000u >> 1, 59 DONT_DISPLAY_AT_NIGHT = 0x80000000u >> 2, 60 DONT_ILLUMINATE = 0x80000000u >> 3, 61 FLAT_SHADED = 0x80000000u >> 4, 62 GROUPS_SHADOW_OBJECT = 0x80000000u >> 5 63 }; 55 static const unsigned int DONT_DISPLAY_IN_DAYLIGHT = 0x80000000u >> 0; 56 static const unsigned int DONT_DISPLAY_AT_DUSK = 0x80000000u >> 1; 57 static const unsigned int DONT_DISPLAY_AT_NIGHT = 0x80000000u >> 2; 58 static const unsigned int DONT_ILLUMINATE = 0x80000000u >> 3; 59 static const unsigned int FLAT_SHADED = 0x80000000u >> 4; 60 static const unsigned int GROUPS_SHADOW_OBJECT = 0x80000000u >> 5; 64 61 65 62 unsigned int _flags; -
OpenSceneGraph/trunk/include/osgSim/SphereSegment
r9409 r11164 195 195 @see DrawMask 196 196 */ 197 void setDrawMask( DrawMaskdm);197 void setDrawMask(int dm); 198 198 199 199 /** Get the DrawMask */ 200 DrawMaskgetDrawMask() const { return _drawMask; }200 int getDrawMask() const { return _drawMask; } 201 201 202 202 /** Set the color of the surface. */ … … 306 306 307 307 // Draw details 308 DrawMask_drawMask;309 osg::Vec4 _surfaceColor;310 osg::Vec4 _spokeColor;311 osg::Vec4 _edgeLineColor;312 osg::Vec4 _planeColor;308 int _drawMask; 309 osg::Vec4 _surfaceColor; 310 osg::Vec4 _spokeColor; 311 osg::Vec4 _edgeLineColor; 312 osg::Vec4 _planeColor; 313 313 }; 314 314 -
OpenSceneGraph/trunk/include/osgUtil/ShaderGen
r9940 r11164 39 39 }; 40 40 41 typedef std::map< unsignedint, osg::ref_ptr<osg::StateSet> > StateSetMap;41 typedef std::map<int, osg::ref_ptr<osg::StateSet> > StateSetMap; 42 42 43 43 ShaderGenCache() {}; 44 44 45 void setStateSet( unsignedint stateMask, osg::StateSet *program);46 osg::StateSet *getStateSet( unsignedint stateMask) const;47 osg::StateSet *getOrCreateStateSet( unsignedint stateMask);45 void setStateSet(int stateMask, osg::StateSet *program); 46 osg::StateSet *getStateSet(int stateMask) const; 47 osg::StateSet *getOrCreateStateSet(int stateMask); 48 48 49 49 protected: 50 osg::StateSet *createStateSet( unsignedint stateMask) const;50 osg::StateSet *createStateSet(int stateMask) const; 51 51 mutable OpenThreads::Mutex _mutex; 52 52 StateSetMap _stateSetMap; -
OpenSceneGraph/trunk/src/osgSim/SphereSegment.cpp
r10658 r11164 875 875 } 876 876 877 void SphereSegment::setDrawMask( DrawMaskdm)877 void SphereSegment::setDrawMask(int dm) 878 878 { 879 879 _drawMask=dm; -
OpenSceneGraph/trunk/src/osgUtil/ShaderGen.cpp
r10768 r11164 85 85 } 86 86 87 void ShaderGenCache::setStateSet( unsignedint stateMask, osg::StateSet *stateSet)87 void ShaderGenCache::setStateSet(int stateMask, osg::StateSet *stateSet) 88 88 { 89 89 OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); … … 91 91 } 92 92 93 osg::StateSet *ShaderGenCache::getStateSet( unsignedint stateMask) const93 osg::StateSet *ShaderGenCache::getStateSet(int stateMask) const 94 94 { 95 95 OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); … … 98 98 } 99 99 100 osg::StateSet *ShaderGenCache::getOrCreateStateSet( unsignedint stateMask)100 osg::StateSet *ShaderGenCache::getOrCreateStateSet(int stateMask) 101 101 { 102 102 OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); … … 111 111 } 112 112 113 osg::StateSet *ShaderGenCache::createStateSet( unsignedint stateMask) const113 osg::StateSet *ShaderGenCache::createStateSet(int stateMask) const 114 114 { 115 115 osg::StateSet *stateSet = new osg::StateSet; … … 364 364 return; 365 365 366 unsignedint stateMask = 0;366 int stateMask = 0; 367 367 //if (state->getMode(GL_BLEND) & osg::StateAttribute::ON) 368 368 // stateMask |= ShaderGen::BLEND; -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osg/CullSettings.cpp
r10967 r11164 77 77 END_REFLECTOR 78 78 79 TYPE_NAME_ALIAS(unsigned int, osg::CullSettings::CullingMode) 79 TYPE_NAME_ALIAS(int, osg::CullSettings::InheritanceMask) 80 81 TYPE_NAME_ALIAS(int, osg::CullSettings::CullingMode) 80 82 81 83 BEGIN_VALUE_REFLECTOR(osg::CullSettings) … … 99 101 "", 100 102 ""); 101 I_Method1(void, setInheritanceMask, IN, unsigned int, mask,102 Properties::NON_VIRTUAL, 103 __void__setInheritanceMask__ unsigned_int,103 I_Method1(void, setInheritanceMask, IN, osg::CullSettings::InheritanceMask, mask, 104 Properties::NON_VIRTUAL, 105 __void__setInheritanceMask__InheritanceMask, 104 106 "Set the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object. ", 105 107 ""); 106 I_Method0( unsigned int, getInheritanceMask,107 Properties::NON_VIRTUAL, 108 __ unsigned_int__getInheritanceMask,108 I_Method0(osg::CullSettings::InheritanceMask, getInheritanceMask, 109 Properties::NON_VIRTUAL, 110 __InheritanceMask__getInheritanceMask, 109 111 "Get the inheritance mask used in inheritCullSettings to control which variables get overwritten by the passed in CullSettings object. ", 110 112 ""); … … 319 321 __bool__getImpostorsActive, 320 322 __void__setImpostorsActive__bool); 321 I_SimpleProperty( unsigned int, InheritanceMask,322 __ unsigned_int__getInheritanceMask,323 __void__setInheritanceMask__ unsigned_int);323 I_SimpleProperty(osg::CullSettings::InheritanceMask, InheritanceMask, 324 __InheritanceMask__getInheritanceMask, 325 __void__setInheritanceMask__InheritanceMask); 324 326 I_SimpleProperty(osg::CullSettings::InheritanceMaskActionOnAttributeSetting, InheritanceMaskActionOnAttributeSetting, 325 327 __InheritanceMaskActionOnAttributeSetting__getInheritanceMaskActionOnAttributeSetting, -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osg/CullingSet.cpp
r10967 r11164 50 50 TYPE_NAME_ALIAS(std::vector< osg::ShadowVolumeOccluder >, osg::CullingSet::OccluderList) 51 51 52 TYPE_NAME_ALIAS( unsignedint, osg::CullingSet::Mask)52 TYPE_NAME_ALIAS(int, osg::CullingSet::Mask) 53 53 54 54 BEGIN_OBJECT_REFLECTOR(osg::CullingSet) -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osgGA/GUIEventAdapter.cpp
r10967 r11164 418 418 "get mouse-Y orientation (mouse-Y increases upwards or downwards). ", 419 419 ""); 420 I_Method1(void, setButtonMask, IN, unsignedint, mask,421 Properties::NON_VIRTUAL, 422 __void__setButtonMask__ unsigned_int,420 I_Method1(void, setButtonMask, IN, int, mask, 421 Properties::NON_VIRTUAL, 422 __void__setButtonMask__int, 423 423 "set current mouse button state. ", 424 424 ""); 425 I_Method0( unsignedint, getButtonMask,426 Properties::NON_VIRTUAL, 427 __ unsigned_int__getButtonMask,425 I_Method0(int, getButtonMask, 426 Properties::NON_VIRTUAL, 427 __int__getButtonMask, 428 428 "get current mouse button state. ", 429 429 ""); 430 I_Method1(void, setModKeyMask, IN, unsignedint, mask,431 Properties::NON_VIRTUAL, 432 __void__setModKeyMask__ unsigned_int,430 I_Method1(void, setModKeyMask, IN, int, mask, 431 Properties::NON_VIRTUAL, 432 __void__setModKeyMask__int, 433 433 "set modifier key mask. ", 434 434 ""); 435 I_Method0( unsignedint, getModKeyMask,436 Properties::NON_VIRTUAL, 437 __ unsigned_int__getModKeyMask,435 I_Method0(int, getModKeyMask, 436 Properties::NON_VIRTUAL, 437 __int__getModKeyMask, 438 438 "get modifier key mask. ", 439 439 ""); … … 525 525 __int__getButton, 526 526 __void__setButton__int); 527 I_SimpleProperty( unsignedint, ButtonMask,528 __ unsigned_int__getButtonMask,529 __void__setButtonMask__ unsigned_int);527 I_SimpleProperty(int, ButtonMask, 528 __int__getButtonMask, 529 __void__setButtonMask__int); 530 530 I_SimpleProperty(osgGA::GUIEventAdapter::EventType, EventType, 531 531 __EventType__getEventType, … … 540 540 __int__getKey, 541 541 __void__setKey__int); 542 I_SimpleProperty( unsignedint, ModKeyMask,543 __ unsigned_int__getModKeyMask,544 __void__setModKeyMask__ unsigned_int);542 I_SimpleProperty(int, ModKeyMask, 543 __int__getModKeyMask, 544 __void__setModKeyMask__int); 545 545 I_SimpleProperty(osgGA::GUIEventAdapter::MouseYOrientation, MouseYOrientation, 546 546 __MouseYOrientation__getMouseYOrientation, -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osgPresentation/SlideEventHandler.cpp
r10967 r11164 319 319 I_EnumLabel(osgPresentation::SlideEventHandler::FIRST_POSITION); 320 320 I_EnumLabel(osgPresentation::SlideEventHandler::LAST_POSITION); 321 END_REFLECTOR322 323 BEGIN_ENUM_REFLECTOR(osgPresentation::SlideEventHandler::ObjectMask)324 I_DeclaringFile("osgPresentation/SlideEventHandler");325 I_EnumLabel(osgPresentation::SlideEventHandler::MOVIE);326 I_EnumLabel(osgPresentation::SlideEventHandler::OBJECTS);327 I_EnumLabel(osgPresentation::SlideEventHandler::ALL_OBJECTS);328 321 END_REFLECTOR 329 322 -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osgSim/ObjectRecordData.cpp
r10967 r11164 22 22 #undef OUT 23 23 #endif 24 25 BEGIN_ENUM_REFLECTOR(osgSim::ObjectRecordData::Flags)26 I_DeclaringFile("osgSim/ObjectRecordData");27 I_EnumLabel(osgSim::ObjectRecordData::DONT_DISPLAY_IN_DAYLIGHT);28 I_EnumLabel(osgSim::ObjectRecordData::DONT_DISPLAY_AT_DUSK);29 I_EnumLabel(osgSim::ObjectRecordData::DONT_DISPLAY_AT_NIGHT);30 I_EnumLabel(osgSim::ObjectRecordData::DONT_ILLUMINATE);31 I_EnumLabel(osgSim::ObjectRecordData::FLAT_SHADED);32 I_EnumLabel(osgSim::ObjectRecordData::GROUPS_SHADOW_OBJECT);33 END_REFLECTOR34 24 35 25 BEGIN_OBJECT_REFLECTOR(osgSim::ObjectRecordData) -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osgSim/SphereSegment.cpp
r10967 r11164 109 109 "Get the density of the sphere segment. ", 110 110 ""); 111 I_Method1(void, setDrawMask, IN, osgSim::SphereSegment::DrawMask, dm,112 Properties::NON_VIRTUAL, 113 __void__setDrawMask__ DrawMask,111 I_Method1(void, setDrawMask, IN, int, dm, 112 Properties::NON_VIRTUAL, 113 __void__setDrawMask__int, 114 114 "Specify the DrawMask. ", 115 115 " param dm Bitmask specifying which parts of the sphere segment should be drawn. see DrawMask "); 116 I_Method0( osgSim::SphereSegment::DrawMask, getDrawMask,117 Properties::NON_VIRTUAL, 118 __ DrawMask__getDrawMask,116 I_Method0(int, getDrawMask, 117 Properties::NON_VIRTUAL, 118 __int__getDrawMask, 119 119 "Get the DrawMask. ", 120 120 ""); … … 223 223 __int__getDensity, 224 224 __void__setDensity__int); 225 I_SimpleProperty( osgSim::SphereSegment::DrawMask, DrawMask,226 __ DrawMask__getDrawMask,227 __void__setDrawMask__ DrawMask);225 I_SimpleProperty(int, DrawMask, 226 __int__getDrawMask, 227 __void__setDrawMask__int); 228 228 I_SimpleProperty(osg::Vec4, EdgeLineColor, 229 229 __osg_Vec4__getEdgeLineColor, -
OpenSceneGraph/trunk/src/osgWrappers/introspection/osgUtil/ShaderGen.cpp
r10967 r11164 33 33 END_REFLECTOR 34 34 35 TYPE_NAME_ALIAS(std::map< unsignedint COMMA osg::ref_ptr< osg::StateSet > >, osgUtil::ShaderGenCache::StateSetMap)35 TYPE_NAME_ALIAS(std::map< int COMMA osg::ref_ptr< osg::StateSet > >, osgUtil::ShaderGenCache::StateSetMap) 36 36 37 37 BEGIN_OBJECT_REFLECTOR(osgUtil::ShaderGenCache) … … 41 41 "", 42 42 ""); 43 I_Method2(void, setStateSet, IN, unsignedint, stateMask, IN, osg::StateSet *, program,43 I_Method2(void, setStateSet, IN, int, stateMask, IN, osg::StateSet *, program, 44 44 Properties::NON_VIRTUAL, 45 __void__setStateSet__ unsigned_int__osg_StateSet_P1,45 __void__setStateSet__int__osg_StateSet_P1, 46 46 "", 47 47 ""); 48 I_Method1(osg::StateSet *, getStateSet, IN, unsignedint, stateMask,48 I_Method1(osg::StateSet *, getStateSet, IN, int, stateMask, 49 49 Properties::NON_VIRTUAL, 50 __osg_StateSet_P1__getStateSet__ unsigned_int,50 __osg_StateSet_P1__getStateSet__int, 51 51 "", 52 52 ""); 53 I_Method1(osg::StateSet *, getOrCreateStateSet, IN, unsignedint, stateMask,53 I_Method1(osg::StateSet *, getOrCreateStateSet, IN, int, stateMask, 54 54 Properties::NON_VIRTUAL, 55 __osg_StateSet_P1__getOrCreateStateSet__ unsigned_int,55 __osg_StateSet_P1__getOrCreateStateSet__int, 56 56 "", 57 57 ""); 58 I_ProtectedMethod1(osg::StateSet *, createStateSet, IN, unsignedint, stateMask,58 I_ProtectedMethod1(osg::StateSet *, createStateSet, IN, int, stateMask, 59 59 Properties::NON_VIRTUAL, 60 60 Properties::CONST, 61 __osg_StateSet_P1__createStateSet__ unsigned_int,61 __osg_StateSet_P1__createStateSet__int, 62 62 "", 63 63 ""); 64 64 I_IndexedProperty(osg::StateSet *, StateSet, 65 __osg_StateSet_P1__getStateSet__ unsigned_int,66 __void__setStateSet__ unsigned_int__osg_StateSet_P1,65 __osg_StateSet_P1__getStateSet__int, 66 __void__setStateSet__int__osg_StateSet_P1, 67 67 0); 68 68 END_REFLECTOR … … 128 128 END_REFLECTOR 129 129 130 STD_MAP_REFLECTOR(std::map< unsignedint COMMA osg::ref_ptr< osg::StateSet > >)130 STD_MAP_REFLECTOR(std::map< int COMMA osg::ref_ptr< osg::StateSet > >) 131 131
