]> git.mxchange.org Git - simgear.git/commitdiff
Add (optional) uv coordinates to SGPickCallback
authorThomas Geymayer <tomgey@gmail.com>
Thu, 9 May 2013 10:40:59 +0000 (12:40 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Thu, 9 May 2013 10:40:59 +0000 (12:40 +0200)
simgear/scene/util/SGPickCallback.hxx

index 33ab28adab6e529059ed1d7064eff06da1926966..838d5b2e45e9ec5ed3ada84aec8d9c9bf8c2eae7 100644 (file)
@@ -44,6 +44,7 @@ public:
   struct Info {
     SGVec3d wgs84;
     SGVec3d local;
+    SGVec2d uv;
   };
 
   SGPickCallback(Priority priority = PriorityOther) :
@@ -76,6 +77,13 @@ public:
   virtual std::string getCursor() const
   { return std::string(); }
 
+  /**
+   * Whether the uv coordinates of the picking action should be calculated upon
+   * an intersection.
+   */
+  virtual bool needsUV() const
+  { return false; }
+
 private:
   Priority _priority;
 };