Changeset 13041 for OpenSceneGraph/trunk/include/osgAnimation/Target
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/include/osgAnimation/Target (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgAnimation/Target
r12139 r13041 1 /* -*-c++-*- 1 /* -*-c++-*- 2 2 * Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 3 3 * 4 * This library is open source and may be redistributed and/or modified under 5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 4 * This library is open source and may be redistributed and/or modified under 5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 6 6 * (at your option) any later version. The full license is in LICENSE file 7 7 * included with this distribution, and on the openscenegraph.org website. 8 * 8 * 9 9 * This library is distributed in the hope that it will be useful, 10 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 12 * OpenSceneGraph Public License for more details. 13 13 */ … … 25 25 #include <osgAnimation/Export> 26 26 27 namespace osgAnimation 27 namespace osgAnimation 28 28 { 29 29 … … 33 33 { 34 34 public: 35 35 36 36 Target(); 37 37 virtual ~Target() {} … … 50 50 { 51 51 public: 52 52 53 53 TemplateTarget() : _target() {} 54 54 TemplateTarget(const T& v) { setValue(v); } … … 118 118 119 119 osg::Quat::value_type len2 = _target.length2(); 120 if ( len2 != 1.0 && len2 != 0.0) 120 if ( len2 != 1.0 && len2 != 0.0) 121 121 _target *= 1.0/sqrt(len2); 122 122 } … … 129 129 typedef TemplateTarget<float> FloatTarget; 130 130 typedef TemplateTarget<double> DoubleTarget; 131 131 132 132 } 133 133
