Changeset 13041 for OpenSceneGraph/trunk/src/osgSim/LightPointNode.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgSim/LightPointNode.cpp
r11487 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 107 107 108 108 bsphere.set(_bbox.center(),0.0f); 109 109 110 110 for(itr=_lightPointList.begin(); 111 111 itr!=_lightPointList.end(); … … 136 136 #endif 137 137 138 138 139 139 #ifdef USE_TIMER 140 140 t1 = timer.tick(); … … 142 142 143 143 osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(&nv); 144 144 145 145 #ifdef USE_TIMER 146 146 t2 = timer.tick(); 147 147 #endif 148 148 149 149 150 150 // should we disable small feature culling here? 151 151 if (cv /*&& !cv->isCulled(_bbox)*/) 152 152 { 153 153 154 154 osg::Matrix matrix = *(cv->getModelViewMatrix()); 155 155 osg::RefMatrix& projection = *(cv->getProjectionMatrix()); … … 163 163 cv->getCurrentRenderBin()->addStateGraph(rg); 164 164 } 165 165 166 166 #ifdef USE_TIMER 167 167 t3 = timer.tick(); … … 194 194 drawable = _pointSprites ? new LightPointSpriteDrawable : new LightPointDrawable; 195 195 rg->setUserData(drawable); 196 196 197 197 if (cv->getFrameStamp()) 198 198 { … … 208 208 ++litr) 209 209 {} 210 210 211 211 if (litr == rg->_leaves.end()) 212 212 { 213 // haven't found the drawable added in the RenderLeaf list, therefore this may be the 213 // haven't found the drawable added in the RenderLeaf list, therefore this may be the 214 214 // first time through LightPointNode in this frame, so need to add drawable into the StateGraph RenderLeaf list 215 215 // and update its time signatures. … … 235 235 #endif 236 236 237 237 238 238 if (cv->getComputeNearFarMode() != osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR) 239 239 cv->updateCalculatedNearFar(matrix,_bbox); 240 241 240 241 242 242 const float minimumIntensity = 1.0f/256.0f; 243 243 const osg::Vec3 eyePoint = cv->getEyeLocal(); 244 244 245 245 double time=drawable->getSimulationTime(); 246 246 double timeInterval=drawable->getSimulationTimeInterval(); 247 247 248 248 const osg::Polytope clipvol(cv->getCurrentCullingSet().getFrustum()); 249 249 const bool computeClipping = false;//(clipvol.getCurrentMask()!=0); … … 255 255 { 256 256 const LightPoint& lp = *itr; 257 257 258 258 if (!lp._on) continue; 259 259 … … 393 393 } 394 394 } 395 395 396 396 #ifdef USE_TIMER 397 397 t8 = timer.tick(); 398 398 #endif 399 399 400 400 } 401 401 #ifdef USE_TIMER
