diff engine/core/view/camera.i @ 0:4a0efb7baf70

* Datasets becomes the new trunk and retires after that :-)
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 29 Jun 2008 18:44:17 +0000
parents
children 40a7c9618ade
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/engine/core/view/camera.i	Sun Jun 29 18:44:17 2008 +0000
@@ -0,0 +1,51 @@
+%module fife
+%{
+#include "view/camera.h"
+#include "view/rendererbase.h"
+%}
+
+%include "view/rendererbase.i"
+
+namespace FIFE {
+	typedef Point3D ScreenPoint;
+	%template(ScreenPoint) PointType3D<int>;
+	
+	%apply std::list<Instance*> &OUTPUT { std::list<Instance*>& instances };
+	class Camera: public IRendererContainer {
+	public:
+		~Camera();
+		const std::string& getId();
+		void setTilt(double tilt);
+		double getTilt() const;
+		void setRotation(double rotation);
+		double getRotation() const;
+		void setZoom(double zoom);
+		double getZoom() const;
+		void setLocation(Location location);
+		Location getLocation() const;
+		Location& getLocationRef();
+		void attach(Instance *instance);
+		void detach();
+		Instance* getAttached() const;
+		void setViewPort(const Rect& viewport);
+		const Rect& getViewPort() const;
+		void setCellImageDimensions(unsigned int width, unsigned int height);
+		Point getCellImageDimensions();
+		ScreenPoint toScreenCoordinates(ExactModelCoordinate map_coords);
+		ExactModelCoordinate toMapCoordinates(ScreenPoint screen_coords, bool z_calculated=true);
+		void setEnabled(bool enabled);
+		bool isEnabled();
+		
+		void getMatchingInstances(ScreenPoint screen_coords, Layer& layer, std::list<Instance*>& instances);
+		void getMatchingInstances(Location& loc, std::list<Instance*>& instances, bool use_exactcoordinates=false);
+		RendererBase* getRenderer(const std::string& name);
+		void resetRenderers();
+
+		void refresh();
+	private:
+		Camera();
+	};
+	%clear std::list<Instance*>& instances;
+}
+
+%clear InstanceLst& instances;