LSST Applications g0d97872fb5+d9805445e0,g1653933729+34a971ddd9,g1a997c3884+34a971ddd9,g28da252d5a+348f7e7bba,g2bbee38e9b+4265414133,g2bc492864f+4265414133,g2ca4be77d2+192fe503f0,g2cdde0e794+704103fe75,g3156d2b45e+6e87dc994a,g347aa1857d+4265414133,g35bb328faa+34a971ddd9,g3a166c0a6a+4265414133,g3e281a1b8c+8ec26ec694,g4005a62e65+ba0306790b,g414038480c+9f5be647b3,g41af890bb2+768c17c3f8,g5065538af8+4f2fbd2e19,g569e0e2b34+da0d0eec6b,g717e5f8c0f+057448b7d3,g80478fca09+416be08bcb,g82479be7b0+e89b201b93,g858d7b2824+057448b7d3,g9125e01d80+34a971ddd9,ga5288a1d22+25d2e4a441,gae0086650b+34a971ddd9,gb58c049af0+ace264a4f2,gc28159a63d+4265414133,gc805d3fbd4+057448b7d3,gcf0d15dbbd+5b8477c231,gd3ec6bcd5c+8c0a7d0c4b,gd6b7c0dfd1+c7841aba64,gda6a2b7d83+5b8477c231,gdaeeff99f8+7774323b41,ge2409df99d+d43ff233b3,ge33fd446bb+057448b7d3,ge79ae78c31+4265414133,gf0baf85859+890af219f9,gf5289d68f6+57c898ada7,w.2024.37
LSST Data Management Base Package
Loading...
Searching...
No Matches
Parametric.cc
Go to the documentation of this file.
1// -*- lsst-c++ -*-
2
3/*
4 * LSST Data Management System
5 * Copyright 2008, 2009, 2010 LSST Corporation.
6 *
7 * This product includes software developed by the
8 * LSST Project (http://www.lsst.org/).
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the LSST License Statement and
21 * the GNU General Public License along with this program. If not,
22 * see <http://www.lsstcorp.org/LegalNotices/>.
23 */
25
26namespace lsst {
27namespace afw {
28namespace geom {
29namespace ellipses {
30
31Parametric::Parametric(Ellipse const& ellipse) : _center(ellipse.getCenter()) {
32 double a, b, theta;
33 ellipse.getCore()._assignToAxes(a, b, theta);
34 double c = std::cos(theta);
35 double s = std::sin(theta);
36 _u = lsst::geom::Extent2D(a * c, a * s);
37 _v = lsst::geom::Extent2D(-b * s, b * c);
38}
39} // namespace ellipses
40} // namespace geom
41} // namespace afw
42} // namespace lsst
table::Key< int > b
table::Key< int > a
virtual void _assignToAxes(double &a, double &b, double &theta) const =0
Return the size of the bounding box for the ellipse core.
An ellipse defined by an arbitrary BaseCore and a center point.
Definition Ellipse.h:51
BaseCore const & getCore() const
Return the ellipse core.
Definition Ellipse.h:71
Parametric(Ellipse const &ellipse)
Definition Parametric.cc:31
T cos(T... args)
Extent< double, 2 > Extent2D
Definition Extent.h:400
T sin(T... args)