Changeset 9599
- Timestamp:
- 01/30/09 11:55:28 (4 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 18 modified
-
NEWS.txt (modified) (1 diff)
-
include/osg/Array (modified) (2 diffs)
-
include/osg/Drawable (modified) (1 diff)
-
include/osg/Geometry (modified) (3 diffs)
-
include/osg/Group (modified) (2 diffs)
-
include/osg/Image (modified) (1 diff)
-
include/osg/KdTree (modified) (2 diffs)
-
include/osg/Node (modified) (2 diffs)
-
include/osg/OperationThread (modified) (1 diff)
-
include/osg/PrimitiveSet (modified) (7 diffs)
-
include/osg/Program (modified) (1 diff)
-
include/osg/Shape (modified) (2 diffs)
-
include/osg/State (modified) (1 diff)
-
include/osg/StateAttribute (modified) (1 diff)
-
include/osg/StateSet (modified) (1 diff)
-
include/osg/Stats (modified) (2 diffs)
-
include/osg/View (modified) (1 diff)
-
include/osgVolume/Property (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/NEWS.txt
r9592 r9599 23 23 * New VNC client widget support (based on libVNCServer) 24 24 * New Browser client widget support (based on Gecko/UBrowser) 25 * New plugins for loading Half-Life 2 maps and models. 25 26 * Improvements to DatabasePager tailored for low latency paging. 26 27 * Improved stats collection and on screen reporting. 27 * Support for the OpenGL geometry instancingextension.28 * Support for the OpenGL draw instanced extension. 28 29 * Improvements to COLLADA support. 29 30 * Build reporting using CDash -
OpenSceneGraph/trunk/include/osg/Array
r8467 r9599 227 227 228 228 virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; } 229 virtual unsigned int getTotalDataSize() const { return this->size()*sizeof(T); }230 virtual unsigned int getNumElements() const { return this->size(); }229 virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); } 230 virtual unsigned int getNumElements() const { return static_cast<unsigned int>(this->size()); } 231 231 232 232 typedef T ElementDataType; // expose T … … 313 313 314 314 virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; } 315 virtual unsigned int getTotalDataSize() const { return this->size()*sizeof(T); }316 virtual unsigned int getNumElements() const { return this->size(); }315 virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(this->size()*sizeof(T)); } 316 virtual unsigned int getNumElements() const { return static_cast<unsigned int>(this->size()); } 317 317 318 318 virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } -
OpenSceneGraph/trunk/include/osg/Drawable
r8880 r9599 155 155 * @return the number of parents of this node. 156 156 */ 157 inline unsigned int getNumParents() const { return _parents.size(); }157 inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 158 158 159 159 /** Get the list of matrices that transform this node from local coordinates to world coordinates. -
OpenSceneGraph/trunk/include/osg/Geometry
r8853 r9599 200 200 const ArrayData& getTexCoordData(unsigned int index) const; 201 201 202 unsigned int getNumTexCoordArrays() const { return _texCoordList.size(); }202 unsigned int getNumTexCoordArrays() const { return static_cast<unsigned int>(_texCoordList.size()); } 203 203 ArrayDataList& getTexCoordArrayList() { return _texCoordList; } 204 204 const ArrayDataList& getTexCoordArrayList() const { return _texCoordList; } … … 220 220 const ArrayData& getVertexAttribData(unsigned int index) const; 221 221 222 unsigned int getNumVertexAttribArrays() const { return _vertexAttribList.size(); }222 unsigned int getNumVertexAttribArrays() const { return static_cast<unsigned int>(_vertexAttribList.size()); } 223 223 ArrayDataList& getVertexAttribArrayList() { return _vertexAttribList; } 224 224 const ArrayDataList& getVertexAttribArrayList() const { return _vertexAttribList; } … … 232 232 const PrimitiveSetList& getPrimitiveSetList() const { return _primitives; } 233 233 234 unsigned int getNumPrimitiveSets() const { return _primitives.size(); }234 unsigned int getNumPrimitiveSets() const { return static_cast<unsigned int>(_primitives.size()); } 235 235 PrimitiveSet* getPrimitiveSet(unsigned int pos) { return _primitives[pos].get(); } 236 236 const PrimitiveSet* getPrimitiveSet(unsigned int pos) const { return _primitives[pos].get(); } -
OpenSceneGraph/trunk/include/osg/Group
r7648 r9599 98 98 99 99 /** Return the number of children nodes. */ 100 inline unsigned int getNumChildren() const { return _children.size(); }100 inline unsigned int getNumChildren() const { return static_cast<unsigned int>(_children.size()); } 101 101 102 102 /** Set child node at position i. … … 140 140 if (_children[childNum]==node) return childNum; 141 141 } 142 return _children.size(); // node not found.142 return static_cast<unsigned int>(_children.size()); // node not found. 143 143 } 144 144 -
OpenSceneGraph/trunk/include/osg/Image
r9388 r9599 274 274 unsigned int getNumMipmapLevels() const 275 275 { 276 return _mipmapData.size()+1;276 return static_cast<unsigned int>(_mipmapData.size())+1; 277 277 }; 278 278 -
OpenSceneGraph/trunk/include/osg/KdTree
r9377 r9599 132 132 int addNode(const KdNode& node) 133 133 { 134 int num = _kdNodes.size();134 int num = static_cast<int>(_kdNodes.size()); 135 135 _kdNodes.push_back(node); 136 136 return num; … … 148 148 unsigned int addTriangle(const Triangle& tri) 149 149 { 150 unsigned int num = _triangles.size();150 unsigned int num = static_cast<unsigned int>(_triangles.size()); 151 151 _triangles.push_back(tri); 152 152 return num; -
OpenSceneGraph/trunk/include/osg/Node
r9326 r9599 145 145 * @return the number of parents of this node. 146 146 */ 147 inline unsigned int getNumParents() const { return _parents.size(); }147 inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 148 148 149 149 /** Get the list of node paths parent paths. … … 280 280 281 281 /** Get the number of descriptions of the node.*/ 282 inline unsigned int getNumDescriptions() const { return _descriptions.size(); }282 inline unsigned int getNumDescriptions() const { return static_cast<unsigned int>(_descriptions.size()); } 283 283 284 284 /** Add a description string to the node.*/ -
OpenSceneGraph/trunk/include/osg/OperationThread
r7809 r9599 109 109 110 110 /** Return the num of pending operations that are sitting in the OperationQueue.*/ 111 unsigned int getNumOperationsInQueue() const { return _operations.size(); }111 unsigned int getNumOperationsInQueue() const { return static_cast<unsigned int>(_operations.size()); } 112 112 113 113 /** Add operation to end of OperationQueue, this will be -
OpenSceneGraph/trunk/include/osg/PrimitiveSet
r9447 r9599 317 317 virtual void accept(PrimitiveIndexFunctor& functor) const; 318 318 319 virtual unsigned int getNumIndices() const { return _count; }320 virtual unsigned int index(unsigned int pos) const { return _first+pos; }319 virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(_count); } 320 virtual unsigned int index(unsigned int pos) const { return static_cast<unsigned int>(_first)+pos; } 321 321 virtual void offsetIndices(int offset) { _first += offset; } 322 322 … … 494 494 495 495 virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } 496 virtual unsigned int getTotalDataSize() const { return s ize(); }496 virtual unsigned int getTotalDataSize() const { return static_cast<unsigned int>(size()); } 497 497 virtual bool supportsBufferObject() const { return false; } 498 498 … … 502 502 virtual void accept(PrimitiveIndexFunctor& functor) const; 503 503 504 virtual unsigned int getNumIndices() const { return s ize(); }504 virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } 505 505 virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } 506 506 virtual void offsetIndices(int offset); … … 569 569 570 570 virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } 571 virtual unsigned int getTotalDataSize() const { return 2 *size(); }571 virtual unsigned int getTotalDataSize() const { return 2u*static_cast<unsigned int>(size()); } 572 572 virtual bool supportsBufferObject() const { return false; } 573 573 … … 577 577 virtual void accept(PrimitiveIndexFunctor& functor) const; 578 578 579 virtual unsigned int getNumIndices() const { return s ize(); }579 virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } 580 580 virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } 581 581 virtual void offsetIndices(int offset); … … 643 643 644 644 virtual const GLvoid* getDataPointer() const { return empty()?0:&front(); } 645 virtual unsigned int getTotalDataSize() const { return 4 *size(); }645 virtual unsigned int getTotalDataSize() const { return 4u*static_cast<unsigned int>(size()); } 646 646 virtual bool supportsBufferObject() const { return false; } 647 647 … … 651 651 virtual void accept(PrimitiveIndexFunctor& functor) const; 652 652 653 virtual unsigned int getNumIndices() const { return s ize(); }653 virtual unsigned int getNumIndices() const { return static_cast<unsigned int>(size()); } 654 654 virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } 655 655 virtual void offsetIndices(int offset); -
OpenSceneGraph/trunk/include/osg/Program
r8456 r9599 84 84 bool addShader( Shader* shader ); 85 85 86 unsigned int getNumShaders() const { return _shaderList.size(); }86 unsigned int getNumShaders() const { return static_cast<unsigned int>(_shaderList.size()); } 87 87 88 88 Shader* getShader( unsigned int i ) { return _shaderList[i].get(); } -
OpenSceneGraph/trunk/include/osg/Shape
r9561 r9599 610 610 611 611 /** Get the number of children of this composite shape.*/ 612 unsigned int getNumChildren() const { return _children.size(); }612 unsigned int getNumChildren() const { return static_cast<unsigned int>(_children.size()); } 613 613 614 614 /** Get a child.*/ … … 632 632 if (_children[childNo]==shape) return childNo; 633 633 } 634 return _children.size(); // node not found.634 return static_cast<unsigned int>(_children.size()); // node not found. 635 635 636 636 } -
OpenSceneGraph/trunk/include/osg/State
r9549 r9599 135 135 136 136 /** Get the number of StateSet's on the StateSet stack.*/ 137 unsigned int getStateSetStackSize() { return _stateStateStack.size(); }137 unsigned int getStateSetStackSize() { return static_cast<unsigned int>(_stateStateStack.size()); } 138 138 139 139 /** Pop StateSet's for the StateSet stack till its size equals the specified size.*/ -
OpenSceneGraph/trunk/include/osg/StateAttribute
r8655 r9599 257 257 * @return the number of parents of this StateAttribute. 258 258 */ 259 inline unsigned int getNumParents() const { return _parents.size(); }259 inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 260 260 261 261 -
OpenSceneGraph/trunk/include/osg/StateSet
r8455 r9599 90 90 * @return the number of parents of this StateSet. 91 91 */ 92 inline unsigned int getNumParents() const { return _parents.size(); }92 inline unsigned int getNumParents() const { return static_cast<unsigned int>(_parents.size()); } 93 93 94 94 -
OpenSceneGraph/trunk/include/osg/Stats
r6202 r9599 39 39 void allocate(unsigned int numberOfFrames); 40 40 41 int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast<int>(_attributeMapList.size()) ? 0 : _latestFrameNumber - _attributeMapList.size() + 1; }41 int getEarliestFrameNumber() const { return _latestFrameNumber < static_cast<int>(_attributeMapList.size()) ? 0 : _latestFrameNumber - static_cast<int>(_attributeMapList.size()) + 1; } 42 42 int getLatestFrameNumber() const { return _latestFrameNumber; } 43 43 … … 103 103 104 104 if (frameNumber >= _baseFrameNumber) return frameNumber - _baseFrameNumber; 105 else return _attributeMapList.size() - (_baseFrameNumber-frameNumber);105 else return static_cast<int>(_attributeMapList.size()) - (_baseFrameNumber-frameNumber); 106 106 } 107 107 -
OpenSceneGraph/trunk/include/osg/View
r9554 r9599 132 132 bool removeSlave(unsigned int pos); 133 133 134 unsigned int getNumSlaves() const { return _slaves.size(); }134 unsigned int getNumSlaves() const { return static_cast<unsigned int>(_slaves.size()); } 135 135 136 136 Slave& getSlave(unsigned int pos) { return _slaves[pos]; } -
OpenSceneGraph/trunk/include/osgVolume/Property
r9534 r9599 181 181 public: 182 182 183 ScalarProperty();184 185 183 ScalarProperty(const std::string& scaleName, float value); 186 184 … … 207 205 virtual ~ScalarProperty() {} 208 206 207 ScalarProperty(); 208 209 209 osg::ref_ptr<osg::Uniform> _uniform; 210 210 };
