Changeset 9460
- Timestamp:
- 01/07/09 13:27:45 (4 years ago)
- Location:
- OpenSceneGraph/trunk/src
- Files:
-
- 10 modified
-
osg/Geometry.cpp (modified) (6 diffs)
-
osg/GraphicsThread.cpp (modified) (1 diff)
-
osg/Hint.cpp (modified) (1 diff)
-
osg/KdTree.cpp (modified) (3 diffs)
-
osg/MatrixDecomposition.cpp (modified) (3 diffs)
-
osg/OcclusionQueryNode.cpp (modified) (1 diff)
-
osgDB/DatabasePager.cpp (modified) (1 diff)
-
osgDB/ImagePager.cpp (modified) (2 diffs)
-
osgDB/Registry.cpp (modified) (1 diff)
-
osgGA/CameraViewSwitchManipulator.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/Geometry.cpp
r8853 r9460 2111 2111 } 2112 2112 } 2113 2113 2114 protected: 2115 2116 AttributeFunctorArrayVisitor& operator = (const AttributeFunctorArrayVisitor&) { return *this; } 2114 2117 Drawable::AttributeFunctor& _af; 2115 2118 Drawable::AttributeType _type; … … 2172 2175 } 2173 2176 2177 protected: 2178 2179 ConstAttributeFunctorArrayVisitor& operator = (const ConstAttributeFunctorArrayVisitor&) { return *this; } 2180 2174 2181 Drawable::ConstAttributeFunctor& _af; 2175 2182 Drawable::AttributeType _type; … … 2945 2952 // to set an element. 2946 2953 template <class T> 2947 osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices) { 2954 osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices) 2955 { 2948 2956 T* newArray = 0; 2949 2957 typedef typename T::ElementDataType EDT; … … 2962 2970 } 2963 2971 2964 osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices) { 2965 switch (array.getType()) 2966 { 2967 case(osg::Array::ByteArrayType): return create_noinline<osg::ByteArray>(array,indices); 2968 case(osg::Array::ShortArrayType): return create_noinline<osg::ShortArray>(array,indices); 2969 case(osg::Array::IntArrayType): return create_noinline<osg::IntArray>(array,indices); 2970 case(osg::Array::UByteArrayType): return create_noinline<osg::UByteArray>(array,indices); 2971 case(osg::Array::UShortArrayType): return create_noinline<osg::UShortArray>(array,indices); 2972 case(osg::Array::UIntArrayType): return create_noinline<osg::UIntArray>(array,indices); 2973 case(osg::Array::Vec4ubArrayType): return create_noinline<osg::Vec4ubArray>(array,indices); 2974 case(osg::Array::FloatArrayType): return create_noinline<osg::FloatArray>(array,indices); 2975 case(osg::Array::Vec2ArrayType): return create_noinline<osg::Vec2Array>(array,indices); 2976 case(osg::Array::Vec3ArrayType): return create_noinline<osg::Vec3Array>(array,indices); 2977 case(osg::Array::Vec4ArrayType): return create_noinline<osg::Vec4Array>(array,indices); 2978 case(osg::Array::Vec2dArrayType): return create_noinline<osg::Vec2dArray>(array,indices); 2979 case(osg::Array::Vec3dArrayType): return create_noinline<osg::Vec3dArray>(array,indices); 2980 case(osg::Array::Vec4dArrayType): return create_noinline<osg::Vec4dArray>(array,indices); 2981 default: 2982 return NULL; 2983 } 2984 } 2972 osg::Array* create_noinline(const osg::Array& array, const osg::IndexArray& indices) 2973 { 2974 switch (array.getType()) 2975 { 2976 case(osg::Array::ByteArrayType): return create_noinline<osg::ByteArray>(array,indices); 2977 case(osg::Array::ShortArrayType): return create_noinline<osg::ShortArray>(array,indices); 2978 case(osg::Array::IntArrayType): return create_noinline<osg::IntArray>(array,indices); 2979 case(osg::Array::UByteArrayType): return create_noinline<osg::UByteArray>(array,indices); 2980 case(osg::Array::UShortArrayType): return create_noinline<osg::UShortArray>(array,indices); 2981 case(osg::Array::UIntArrayType): return create_noinline<osg::UIntArray>(array,indices); 2982 case(osg::Array::Vec4ubArrayType): return create_noinline<osg::Vec4ubArray>(array,indices); 2983 case(osg::Array::FloatArrayType): return create_noinline<osg::FloatArray>(array,indices); 2984 case(osg::Array::Vec2ArrayType): return create_noinline<osg::Vec2Array>(array,indices); 2985 case(osg::Array::Vec3ArrayType): return create_noinline<osg::Vec3Array>(array,indices); 2986 case(osg::Array::Vec4ArrayType): return create_noinline<osg::Vec4Array>(array,indices); 2987 case(osg::Array::Vec2dArrayType): return create_noinline<osg::Vec2dArray>(array,indices); 2988 case(osg::Array::Vec3dArrayType): return create_noinline<osg::Vec3dArray>(array,indices); 2989 case(osg::Array::Vec4dArrayType): return create_noinline<osg::Vec4dArray>(array,indices); 2990 default: 2991 return NULL; 2992 } 2993 } 2985 2994 2986 2995 template <class TA, class TI> 2987 osg::Array* create(const TA& array, const osg::IndexArray& indices) { 2988 // We know that indices.getType returned the same thing as TI, but 2989 // we need to determine whether it is really an instance of TI, or 2990 // perhaps another subclass of osg::Array that contains the same 2991 // type of data. 2992 const TI* ba(dynamic_cast<const TI*>(&indices)); 2993 if (ba != NULL) { 2994 return create_inline(array,*ba); 2995 } 2996 else { 2997 return create_noinline(array, _indices); 2998 } 2999 } 2996 osg::Array* create(const TA& array, const osg::IndexArray& indices) 2997 { 2998 // We know that indices.getType returned the same thing as TI, but 2999 // we need to determine whether it is really an instance of TI, or 3000 // perhaps another subclass of osg::Array that contains the same 3001 // type of data. 3002 const TI* ba(dynamic_cast<const TI*>(&indices)); 3003 if (ba != NULL) { 3004 return create_inline(array,*ba); 3005 } 3006 else { 3007 return create_noinline(array, _indices); 3008 } 3009 } 3000 3010 3001 3011 template <class T> … … 3010 3020 case(osg::Array::UShortArrayType): return create<T, osg::UShortArray>(array, _indices); 3011 3021 case(osg::Array::UIntArrayType): return create<T, osg::UIntArray>(array, _indices); 3012 default: 3013 return create_noinline(array, _indices); 3022 default: return create_noinline(array, _indices); 3014 3023 } 3015 3024 … … 3034 3043 const osg::IndexArray& _indices; 3035 3044 osg::Array* _targetArray; 3045 3046 protected: 3047 3048 ExpandIndexedArray& operator = (const ExpandIndexedArray&) { return *this; } 3049 3036 3050 }; 3037 3051 -
OpenSceneGraph/trunk/src/osg/GraphicsThread.cpp
r7914 r9460 62 62 } 63 63 64 void BarrierOperation::operator () (Object* object)64 void BarrierOperation::operator () (Object* /*object*/) 65 65 { 66 66 if (_preBlockOp!=NO_OPERATION) -
OpenSceneGraph/trunk/src/osg/Hint.cpp
r7620 r9460 17 17 using namespace osg; 18 18 19 void Hint::apply(State& state) const19 void Hint::apply(State& /*state*/) const 20 20 { 21 21 if (_target==GL_NONE || _mode==GL_NONE) return; -
OpenSceneGraph/trunk/src/osg/KdTree.cpp
r9062 r9460 49 49 CenterList _centers; 50 50 51 protected: 52 53 BuildKdTree& operator = (const BuildKdTree&) { return *this; } 51 54 }; 52 55 … … 465 468 osg::Vec3 _d_invY; 466 469 osg::Vec3 _d_invZ; 470 471 472 protected: 473 474 IntersectKdTree& operator = (const IntersectKdTree&) { return *this; } 467 475 }; 468 476 … … 744 752 745 753 KdTree::KdTree(const KdTree& rhs, const osg::CopyOp& copyop): 746 Shape(rhs) 754 Shape(rhs, copyop), 755 _vertices(rhs._vertices), 756 _kdNodes(rhs._kdNodes), 757 _triangles(rhs._triangles) 747 758 { 748 759 } -
OpenSceneGraph/trunk/src/osg/MatrixDecomposition.cpp
r6142 r9460 468 468 if (turn>=0) { 469 469 Quat qtoz, qp; 470 unsigned neg[3],win;470 unsigned int win; 471 471 double mag[3], t; 472 472 switch (turn) { … … 481 481 mag[2] = (double)q.y*q.z+(double)q.x*q.w; 482 482 483 for (i=0; i<3; i++) 484 //JVK?????? 485 //if (neg[i] = (mag[i]<0.0)) 486 if (neg[i] == (mag[i]<0.0)) 487 mag[i] = -mag[i]; 483 bool neg[3]; 484 for (i=0; i<3; i++) 485 { 486 neg[i] = (mag[i]<0.0); 487 if (neg[i]) mag[i] = -mag[i]; 488 } 488 489 489 490 if (mag[0]>mag[1]) { … … 510 511 else { 511 512 double qa[4], pa[4]; 512 unsigned lo, hi, neg[4], par = 0; 513 unsigned int lo, hi; 514 bool par = false; 515 bool neg[4]; 513 516 double all, big, two; 514 517 qa[0] = q.x; qa[1] = q.y; qa[2] = q.z; qa[3] = q.w; 515 518 for (i=0; i<4; i++) { 516 519 pa[i] = 0.0; 517 //if (neg[i] = (qa[i]<0.0)) qa[i] = -qa[i];518 if (neg[i] == (qa[i]<0.0)) qa[i] = -qa[i];520 neg[i] = (qa[i]<0.0); 521 if (neg[i]) qa[i] = -qa[i]; 519 522 par ^= neg[i]; 520 523 } -
OpenSceneGraph/trunk/src/osg/OcclusionQueryNode.cpp
r9376 r9460 300 300 META_Object( osgOQ, ClearQueriesCallback ) 301 301 302 virtual void operator() (const osg::Camera& camera) const302 virtual void operator() (const osg::Camera&) const 303 303 { 304 304 if (!_rqcb) -
OpenSceneGraph/trunk/src/osgDB/DatabasePager.cpp
r9387 r9460 1880 1880 DatabasePager::PagedLODList& _activePagedLODList; 1881 1881 int _frameNumber; 1882 1883 protected: 1884 1885 FindPagedLODsVisitor& operator = (const FindPagedLODsVisitor&) { return *this; } 1882 1886 }; 1883 1887 -
OpenSceneGraph/trunk/src/osgDB/ImagePager.cpp
r8991 r9460 295 295 } 296 296 297 void ImagePager::requestImageFile(const std::string& fileName,osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp* framestamp)297 void ImagePager::requestImageFile(const std::string& fileName,osg::Object* attachmentPoint, int attachmentIndex, double timeToMergeBy, const osg::FrameStamp*) 298 298 { 299 299 osg::notify(osg::INFO)<<"ImagePager::requestNodeFile("<<fileName<<")"<<std::endl; … … 334 334 } 335 335 336 void ImagePager::updateSceneGraph(const osg::FrameStamp &frameStamp)336 void ImagePager::updateSceneGraph(const osg::FrameStamp&) 337 337 { 338 338 OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_completedQueue->_requestMutex); -
OpenSceneGraph/trunk/src/osgDB/Registry.cpp
r9443 r9460 82 82 83 83 protected: 84 85 AvailableReaderWriterIterator& operator = (const AvailableReaderWriterIterator&) { return *this; } 84 86 85 87 Registry::ReaderWriterList& _rwList; -
OpenSceneGraph/trunk/src/osgGA/CameraViewSwitchManipulator.cpp
r9459 r9460 40 40 } 41 41 42 bool CameraViewSwitchManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& us)42 bool CameraViewSwitchManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter&) 43 43 { 44 44 if (ea.getHandled()) return false;
