[Debian-astro-commits] [gyoto] 78/221: Photon::metric() also sets the metric in the astrobj. Works also for Scenery::metric().

Thibaut Jean-Claude Paumard thibaut at moszumanska.debian.org
Fri May 22 20:52:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

thibaut pushed a commit to branch master
in repository gyoto.

commit c355db11137993d482295cec1838f05f530296b1
Author: Thibaut Paumard <paumard at users.sourceforge.net>
Date:   Fri Oct 31 19:34:43 2014 +0100

    Photon::metric() also sets the metric in the astrobj. Works also for Scenery::metric().
---
 include/GyotoPhoton.h | 5 +++++
 lib/Photon.C          | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/include/GyotoPhoton.h b/include/GyotoPhoton.h
index b394428..ede2a5e 100644
--- a/include/GyotoPhoton.h
+++ b/include/GyotoPhoton.h
@@ -120,6 +120,11 @@ class Gyoto::Photon : public Gyoto::Worldline, protected Gyoto::SmartPointee {
   /// Get Photon::object_
   SmartPointer<Astrobj::Generic> astrobj() const ;
 
+  using Worldline::metric;
+  // Set Worldline::metric_ as well as the Astrobj metric
+  void metric(SmartPointer<Metric::Generic>);
+
+
   /// Set Photon::spectro_
   void spectrometer(SmartPointer<Spectrometer::Generic> spr);
   /// Get Photon::spectro_
diff --git a/lib/Photon.C b/lib/Photon.C
index 2976791..1f1cd18 100644
--- a/lib/Photon.C
+++ b/lib/Photon.C
@@ -141,6 +141,11 @@ void Photon::astrobj(SmartPointer<Astrobj::Generic> ao) {
   }
 }
 
+void Photon::metric(SmartPointer<Metric::Generic> met) {
+  Worldline::metric(met);
+  if (object_) object_->metric(met);
+}
+
 void Photon::spectrometer(SmartPointer<Spectrometer::Generic> spr) {
   spectro_=spr;
   _allocateTransmission();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/gyoto.git



More information about the Debian-astro-commits mailing list