- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/dae/daeWSceneObjects.cpp
r12994 r13041 2 2 * Copyright 2006 Sony Computer Entertainment Inc. 3 3 * 4 * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this 4 * Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this 5 5 * file except in compliance with the License. You may obtain a copy of the License at: 6 6 * http://research.scea.com/scea_shared_source_license.html 7 7 * 8 * Unless required by applicable law or agreed to in writing, software distributed under the License 9 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 10 * implied. See the License for the specific language governing permissions and limitations under the 11 * License. 8 * Unless required by applicable law or agreed to in writing, software distributed under the License 9 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 10 * implied. See the License for the specific language governing permissions and limitations under the 11 * License. 12 12 */ 13 13 … … 71 71 updateCurrentDaeNode(); 72 72 currentNode = daeSafeCast< domNode >(currentNode->add( COLLADA_ELEMENT_NODE ) ); 73 73 74 74 // If a multiswitch node, store it's data as extra "MultiSwitch" data in the "OpenSceneGraph" technique 75 75 osgSim::MultiSwitch* multiswitch = dynamic_cast<osgSim::MultiSwitch*>(&node); … … 129 129 130 130 writeNodeExtra(node); 131 131 132 132 lastDepth = _nodePath.size(); 133 133 … … 176 176 177 177 writeNodeExtra(node); 178 178 179 179 lastDepth = _nodePath.size(); 180 180 … … 215 215 domAny *frameTime = (domAny*)teq->add("FrameTime"); 216 216 std::stringstream fw; 217 for (unsigned int i = 0; i < node.getNumChildren(); i++) 217 for (unsigned int i = 0; i < node.getNumChildren(); i++) 218 218 { 219 219 if (i > 0) … … 238 238 domAny *intervalEnd = (domAny*)teq->add("IntervalEnd"); 239 239 intervalEnd->setValue(toString<int>(end).c_str()); 240 240 241 241 // duration 242 242 float speed; … … 254 254 255 255 writeNodeExtra(node); 256 256 257 257 lastDepth = _nodePath.size(); 258 258 259 259 traverse( node ); 260 260 } … … 316 316 } 317 317 } 318 318 319 319 writeNodeExtra(node); 320 320 … … 323 323 } 324 324 325 void daeWriter::apply( osg::ProxyNode &node ) 325 void daeWriter::apply( osg::ProxyNode &node ) 326 326 { 327 327 OSG_WARN << "ProxyNode. Missing " << node.getNumChildren() << " children" << std::endl; … … 348 348 domLight *light = daeSafeCast< domLight >( lib_lights->add( COLLADA_ELEMENT_LIGHT ) ); 349 349 light->setId( name.c_str() ); 350 350 351 351 osg::Light* pOsgLight = node.getLight(); 352 352 … … 388 388 domPoint->add(COLLADA_ELEMENT_QUADRATIC_ATTENUATION); 389 389 domPoint->getQuadratic_attenuation()->setValue(pOsgLight->getQuadraticAttenuation()); 390 390 391 391 if ((position.x() != 0) || (position.y() != 0) || (position.z() != 0)) 392 392 { … … 446 446 domLight *ambientDomLight = daeSafeCast< domLight >( lib_lights->add( COLLADA_ELEMENT_LIGHT ) ); 447 447 ambientDomLight->setId(name.c_str()); 448 448 449 449 domLight::domTechnique_common *ambientDomTechniqueCommon = daeSafeCast<domLight::domTechnique_common>(ambientDomLight->add(COLLADA_ELEMENT_TECHNIQUE_COMMON)); 450 450 … … 457 457 domAmbient->getColor()->setValue(color); 458 458 } 459 459 460 460 traverse( node ); 461 461 } … … 514 514 switch(node.getFieldOfViewMode()) 515 515 { 516 case(osg::CameraView::UNCONSTRAINED): 516 case(osg::CameraView::UNCONSTRAINED): 517 517 pXfov = daeSafeCast< domTargetableFloat >( pDomPerspective->add( COLLADA_ELEMENT_XFOV ) ); 518 518 pXfov->setValue(node.getFieldOfView()); 519 519 break; 520 case(osg::CameraView::HORIZONTAL): 520 case(osg::CameraView::HORIZONTAL): 521 521 pXfov = daeSafeCast< domTargetableFloat >( pDomPerspective->add( COLLADA_ELEMENT_XFOV ) ); 522 522 pXfov->setValue(node.getFieldOfView()); 523 523 break; 524 case(osg::CameraView::VERTICAL): 524 case(osg::CameraView::VERTICAL): 525 525 pYfov = daeSafeCast< domTargetableFloat >( pDomPerspective->add( COLLADA_ELEMENT_YFOV ) ); 526 526 pYfov->setValue(node.getFieldOfView());
