~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to extern/Eigen3/Eigen/src/Geometry/Scaling.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
//
4
4
// Copyright (C) 2008 Gael Guennebaud <gael.guennebaud@inria.fr>
5
5
//
6
 
// Eigen is free software; you can redistribute it and/or
7
 
// modify it under the terms of the GNU Lesser General Public
8
 
// License as published by the Free Software Foundation; either
9
 
// version 3 of the License, or (at your option) any later version.
10
 
//
11
 
// Alternatively, you can redistribute it and/or
12
 
// modify it under the terms of the GNU General Public License as
13
 
// published by the Free Software Foundation; either version 2 of
14
 
// the License, or (at your option) any later version.
15
 
//
16
 
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
17
 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
 
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
19
 
// GNU General Public License for more details.
20
 
//
21
 
// You should have received a copy of the GNU Lesser General Public
22
 
// License and a copy of the GNU General Public License along with
23
 
// Eigen. If not, see <http://www.gnu.org/licenses/>.
 
6
// This Source Code Form is subject to the terms of the Mozilla
 
7
// Public License v. 2.0. If a copy of the MPL was not distributed
 
8
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
24
9
 
25
10
#ifndef EIGEN_SCALING_H
26
11
#define EIGEN_SCALING_H
27
12
 
 
13
namespace Eigen { 
 
14
 
28
15
/** \geometry_module \ingroup Geometry_Module
29
16
  *
30
17
  * \class Scaling
73
60
 
74
61
  /** Concatenates a uniform scaling and an affine transformation */
75
62
  template<int Dim, int Mode, int Options>
76
 
  inline Transform<Scalar,Dim,Mode> operator* (const Transform<Scalar,Dim, Mode, Options>& t) const;
 
63
  inline Transform<Scalar,Dim,(int(Mode)==int(Isometry)?Affine:Mode)> operator* (const Transform<Scalar,Dim, Mode, Options>& t) const
 
64
  {
 
65
   Transform<Scalar,Dim,(int(Mode)==int(Isometry)?Affine:Mode)> res = t;
 
66
   res.prescale(factor());
 
67
   return res;
 
68
}
77
69
 
78
70
  /** Concatenates a uniform scaling and a linear transformation matrix */
79
71
  // TODO returns an expression
169
161
  return res;
170
162
}
171
163
 
172
 
template<typename Scalar>
173
 
template<int Dim,int Mode,int Options>
174
 
inline Transform<Scalar,Dim,Mode>
175
 
UniformScaling<Scalar>::operator* (const Transform<Scalar,Dim, Mode, Options>& t) const
176
 
{
177
 
  Transform<Scalar,Dim,Mode> res = t;
178
 
  res.prescale(factor());
179
 
  return res;
180
 
}
 
164
} // end namespace Eigen
181
165
 
182
166
#endif // EIGEN_SCALING_H