Просмотр исходного кода

Removed unused stuff from Frustum and Camera

Marko Pintera 13 лет назад
Родитель
Сommit
e4b0784b3f

+ 3 - 132
CamelotRenderer/OgreCamera.cpp

@@ -40,22 +40,16 @@ THE SOFTWARE.
 
 namespace Ogre {
 
-    String Camera::msMovableType = "Camera";
     //-----------------------------------------------------------------------
     Camera::Camera( const String& name)
         : Frustum(name),
 		mOrientation(Quaternion::IDENTITY),
 		mPosition(Vector3::ZERO),
 		mSceneDetail(PM_SOLID),
-		mAutoTrackOffset(Vector3::ZERO),
-		mSceneLodFactor(1.0f),
-		mSceneLodFactorInv(1.0f),
 		mWindowSet(false),
 		mLastViewport(0),
 		mAutoAspectRatio(false),
-		mCullFrustum(0),
-		mUseRenderingDistance(true),
-		mLodCamera(0)
+		mCullFrustum(0)
     {
 
         // Reasonable defaults to camera params
@@ -72,18 +66,11 @@ namespace Ogre {
         // Init matrices
         mViewMatrix = Matrix4::ZERO;
         mProjMatrixRS = Matrix4::ZERO;
-
-        // no reflection
-        mReflect = false;
     }
 
     //-----------------------------------------------------------------------
     Camera::~Camera()
     {
-		for (ListenerList::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
-		{
-			(*i)->cameraDestroyed(this);
-		}
     }
     //-----------------------------------------------------------------------
     void Camera::setPolygonMode(PolygonMode sd)
@@ -339,22 +326,8 @@ namespace Ogre {
         // Deriving reflected orientation / position
         if (mRecalcView)
         {
-            if (mReflect)
-            {
-                // Calculate reflected orientation, use up-vector as fallback axis.
-				Vector3 dir = mRealOrientation * Vector3::NEGATIVE_UNIT_Z;
-				Vector3 rdir = dir.reflect(mReflectPlane.normal);
-                Vector3 up = mRealOrientation * Vector3::UNIT_Y;
-				mDerivedOrientation = dir.getRotationTo(rdir, up) * mRealOrientation;
-
-                // Calculate reflected position.
-                mDerivedPosition = mReflectMatrix.transformAffine(mRealPosition);
-            }
-            else
-            {
-                mDerivedOrientation = mRealOrientation;
-                mDerivedPosition = mRealPosition;
-            }
+			mDerivedOrientation = mRealOrientation;
+			mDerivedPosition = mRealPosition;
         }
 
         return mRecalcView;
@@ -376,52 +349,9 @@ namespace Ogre {
     //-----------------------------------------------------------------------
     void Camera::_renderScene(Viewport *vp, bool includeOverlays)
     {
-		for (ListenerList::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
-		{
-			(*i)->cameraPreRenderScene(this);
-		}
-
 		// TODO PORT - I'm not going to be rendering the scene like this (yet), but I think I will do it eventually
         //mSceneMgr->_renderScene(this, vp, includeOverlays);
-
-		for (ListenerList::iterator i = mListeners.begin(); i != mListeners.end(); ++i)
-		{
-			(*i)->cameraPostRenderScene(this);
-		}
 	}
-	//---------------------------------------------------------------------
-	void Camera::addListener(Listener* l)
-	{
-		if (std::find(mListeners.begin(), mListeners.end(), l) == mListeners.end())
-			mListeners.push_back(l);
-	}
-	//---------------------------------------------------------------------
-	void Camera::removeListener(Listener* l)
-	{
-		ListenerList::iterator i = std::find(mListeners.begin(), mListeners.end(), l);
-		if (i != mListeners.end())
-			mListeners.erase(i);
-	}
-    //-----------------------------------------------------------------------
-    std::ostream& operator<<( std::ostream& o, const Camera& c )
-    {
-        o << "Camera(pos=" << c.mPosition;
-        Vector3 dir(c.mOrientation*Vector3(0,0,-1));
-        o << ", direction=" << dir << ",near=" << c.mNearDist;
-        o << ", far=" << c.mFarDist << ", FOVy=" << c.mFOVy.valueDegrees();
-        o << ", aspect=" << c.mAspect << ", ";
-        o << ", xoffset=" << c.mFrustumOffset.x << ", yoffset=" << c.mFrustumOffset.y;
-        o << ", focalLength=" << c.mFocalLength << ", ";
-        o << "NearFrustumPlane=" << c.mFrustumPlanes[FRUSTUM_PLANE_NEAR] << ", ";
-        o << "FarFrustumPlane=" << c.mFrustumPlanes[FRUSTUM_PLANE_FAR] << ", ";
-        o << "LeftFrustumPlane=" << c.mFrustumPlanes[FRUSTUM_PLANE_LEFT] << ", ";
-        o << "RightFrustumPlane=" << c.mFrustumPlanes[FRUSTUM_PLANE_RIGHT] << ", ";
-        o << "TopFrustumPlane=" << c.mFrustumPlanes[FRUSTUM_PLANE_TOP] << ", ";
-        o << "BottomFrustumPlane=" << c.mFrustumPlanes[FRUSTUM_PLANE_BOTTOM];
-        o << ")";
-
-        return o;
-    }
 
     //-----------------------------------------------------------------------
     void Camera::setFixedYawAxis(bool useFixed, const Vector3& fixedAxis)
@@ -429,29 +359,6 @@ namespace Ogre {
         mYawFixed = useFixed;
         mYawFixedAxis = fixedAxis;
     }
-
-    //-----------------------------------------------------------------------
-    void Camera::_notifyRenderedFaces(unsigned int numfaces)
-    {
-        mVisFacesLastRender = numfaces;
-    }
-
-    //-----------------------------------------------------------------------
-    void Camera::_notifyRenderedBatches(unsigned int numbatches)
-    {
-        mVisBatchesLastRender = numbatches;
-    }
-
-    //-----------------------------------------------------------------------
-    unsigned int Camera::_getNumRenderedFaces(void) const
-    {
-        return mVisFacesLastRender;
-    }
-    //-----------------------------------------------------------------------
-    unsigned int Camera::_getNumRenderedBatches(void) const
-    {
-        return mVisBatchesLastRender;
-    }
     //-----------------------------------------------------------------------
     const Quaternion& Camera::getOrientation(void) const
     {
@@ -527,41 +434,6 @@ namespace Ogre {
         updateView();
         return mRealOrientation * Vector3::UNIT_X;
     }
-    //-----------------------------------------------------------------------
-    const String& Camera::getMovableType(void) const
-    {
-        return msMovableType;
-    }
-    //-----------------------------------------------------------------------
-	void Camera::setLodBias(Real factor)
-	{
-		assert(factor > 0.0f && "Bias factor must be > 0!");
-		mSceneLodFactor = factor;
-		mSceneLodFactorInv = 1.0f / factor;
-	}
-    //-----------------------------------------------------------------------
-	Real Camera::getLodBias(void) const
-	{
-		return mSceneLodFactor;
-	}
-    //-----------------------------------------------------------------------
-	Real Camera::_getLodBiasInverse(void) const
-	{
-		return mSceneLodFactorInv;
-	}
-	//-----------------------------------------------------------------------
-	void Camera::setLodCamera(const Camera* lodCam)
-	{
-		if (lodCam == this)
-			mLodCamera = 0;
-		else
-			mLodCamera = lodCam;
-	}
-	//---------------------------------------------------------------------
-	const Camera* Camera::getLodCamera() const
-	{
-		return mLodCamera? mLodCamera : this;
-	}
     //-----------------------------------------------------------------------
 	Ray Camera::getCameraToViewportRay(Real screenX, Real screenY) const
 	{
@@ -974,7 +846,6 @@ namespace Ogre {
 		this->setAspectRatio(cam->getAspectRatio());
 		this->setNearClipDistance(cam->getNearClipDistance());
 		this->setFarClipDistance(cam->getFarClipDistance());
-		this->setUseRenderingDistance(cam->getUseRenderingDistance());
 		this->setFOVy(cam->getFOVy());
 		this->setFocalLength(cam->getFocalLength());
 

+ 0 - 133
CamelotRenderer/OgreCamera.h

@@ -82,28 +82,6 @@ namespace Ogre {
     */
     class _OgreExport Camera : public Frustum
     {
-	public:
-		/** Listener interface so you can be notified of Camera events. 
-		*/
-		class _OgreExport Listener 
-		{
-		public:
-			Listener() {}
-			virtual ~Listener() {}
-
-			/// Called prior to the scene being rendered with this camera
-			virtual void cameraPreRenderScene(Camera* cam)
-                        { (void)cam; }
-
-			/// Called after the scene has been rendered with this camera
-			virtual void cameraPostRenderScene(Camera* cam)
-                        { (void)cam; }
-
-			/// Called when the camera is being destroyed
-			virtual void cameraDestroyed(Camera* cam)
-                        { (void)cam; }
-
-		};
     protected:
         /// Camera orientation, quaternion style
         Quaternion mOrientation;
@@ -127,24 +105,6 @@ namespace Ogre {
         /// Rendering type
         PolygonMode mSceneDetail;
 
-        /// Stored number of visible faces in the last render
-        unsigned int mVisFacesLastRender;
-
-        /// Stored number of visible faces in the last render
-        unsigned int mVisBatchesLastRender;
-
-        /// Shared class-level name for Movable type
-        static String msMovableType;
-
-        /// Tracking offset for fine tuning
-        Vector3 mAutoTrackOffset;
-
-		// Scene LOD factor used to adjust overall LOD
-		Real mSceneLodFactor;
-		/// Inverted scene LOD factor, can be used by Renderables to adjust their LOD
-		Real mSceneLodFactorInv;
-
-
         /** Viewing window. 
         @remarks
         Generalize camera class for the case, when viewing frustum doesn't cover all viewport.
@@ -166,12 +126,6 @@ namespace Ogre {
 		Frustum *mCullFrustum;
 		/// Whether or not the rendering distance of objects should take effect for this camera
 		bool mUseRenderingDistance;
-        /// Camera to use for LOD calculation
-        const Camera* mLodCamera;
-
-		typedef vector<Listener*>::type ListenerList;
-		ListenerList mListeners;
-
 
         // Internal functions for calcs
         bool isViewOutOfDate(void) const;
@@ -199,11 +153,6 @@ namespace Ogre {
         */
         virtual ~Camera();
 
-		/// Add a listener to this camera
-		virtual void addListener(Listener* l);
-		/// Remove a listener to this camera
-		virtual void removeListener(Listener* l);
-
         /** Sets the level of rendering detail required from this camera.
             @remarks
                 Each camera is set to render at full detail by default, that is
@@ -339,26 +288,6 @@ namespace Ogre {
         */
         void _renderScene(Viewport *vp, bool includeOverlays);
 
-        /** Function for outputting to a stream.
-        */
-        _OgreExport friend std::ostream& operator<<(std::ostream& o, const Camera& c);
-
-        /** Internal method to notify camera of the visible faces in the last render.
-        */
-        void _notifyRenderedFaces(unsigned int numfaces);
-
-        /** Internal method to notify camera of the visible batches in the last render.
-        */
-        void _notifyRenderedBatches(unsigned int numbatches);
-
-        /** Internal method to retrieve the number of visible faces in the last render.
-        */
-        unsigned int _getNumRenderedFaces(void) const;
-
-        /** Internal method to retrieve the number of visible batches in the last render.
-        */
-        unsigned int _getNumRenderedBatches(void) const;
-
         /** Gets the derived orientation of the camera, including any
             rotation inherited from a node attachment and reflection matrix. */
         const Quaternion& getDerivedOrientation(void) const;
@@ -391,55 +320,6 @@ namespace Ogre {
             rotation inherited from a node attachment. */
         Vector3 getRealRight(void) const;
 
-        /** Overridden from MovableObject */
-        const String& getMovableType(void) const;
-
-		/** Sets the level-of-detail factor for this Camera.
-		@remarks
-			This method can be used to influence the overall level of detail of the scenes 
-			rendered using this camera. Various elements of the scene have level-of-detail
-			reductions to improve rendering speed at distance; this method allows you 
-			to hint to those elements that you would like to adjust the level of detail that
-			they would normally use (up or down). 
-		@par
-			The most common use for this method is to reduce the overall level of detail used
-			for a secondary camera used for sub viewports like rear-view mirrors etc.
-			Note that scene elements are at liberty to ignore this setting if they choose,
-			this is merely a hint.
-		@param factor The factor to apply to the usual level of detail calculation. Higher
-			values increase the detail, so 2.0 doubles the normal detail and 0.5 halves it.
-		*/
-		void setLodBias(Real factor = 1.0);
-
-		/** Returns the level-of-detail bias factor currently applied to this camera. 
-		@remarks
-			See Camera::setLodBias for more details.
-		*/
-		Real getLodBias(void) const;
-
-		/** Get a pointer to the camera which should be used to determine 
-			LOD settings. 
-		@remarks
-			Sometimes you don't want the LOD of a render to be based on the camera
-			that's doing the rendering, you want it to be based on a different
-			camera. A good example is when rendering shadow maps, since they will 
-			be viewed from the perspective of another camera. Therefore this method
-			lets you associate a different camera instance to use to determine the LOD.
-		@par
-			To revert the camera to determining LOD based on itself, call this method with 
-			a pointer to itself. 
-		*/
-		virtual void setLodCamera(const Camera* lodCam);
-
-		/** Get a pointer to the camera which should be used to determine 
-			LOD settings. 
-		@remarks
-			If setLodCamera hasn't been called with a different camera, this
-			method will return 'this'. 
-		*/
-		virtual const Camera* getLodCamera() const;
-
-
         /** Gets a world space ray as cast from the camera through a viewport position.
         @param screenx, screeny The x and y position at which the ray should intersect the viewport, 
             in normalised screen coordinates [0,1]
@@ -452,9 +332,6 @@ namespace Ogre {
         */
         void getCameraToViewportRay(Real screenx, Real screeny, Ray* outRay) const;
 
-		/** Internal method for OGRE to use for LOD calculations. */
-		Real _getLodBiasInverse(void) const;
-
         /** Sets the viewing window inside of viewport.
         @remarks
         This method can be used to set a subset of the viewport as the rendering
@@ -546,16 +423,6 @@ namespace Ogre {
 			using the real view matrix in order to display the correct debug view.
 		*/
 		const Matrix4& getViewMatrix(bool ownFrustumOnly) const;
-		/** Set whether this camera should use the 'rendering distance' on
-			objects to exclude distant objects from the final image. The
-			default behaviour is to use it.
-		@param use True to use the rendering distance, false not to.
-		*/
-		virtual void setUseRenderingDistance(bool use) { mUseRenderingDistance = use; }
-		/** Get whether this camera should use the 'rendering distance' on
-			objects to exclude distant objects from the final image.
-		*/
-		virtual bool getUseRenderingDistance(void) const { return mUseRenderingDistance; }
 
 		/** Synchronise core camera settings with another. 
 		@remarks

+ 2 - 164
CamelotRenderer/OgreFrustum.cpp

@@ -39,8 +39,6 @@ THE SOFTWARE.
 #include "CmRenderSystemManager.h"
 
 namespace Ogre {
-
-    String Frustum::msMovableType = "Frustum";
     const Real Frustum::INFINITE_FAR_PLANE_ADJUST = 0.00001f;
     //-----------------------------------------------------------------------
     Frustum::Frustum(const String& name) : 
@@ -61,16 +59,8 @@ namespace Ogre {
         mRecalcVertexData(true),
 		mCustomViewMatrix(false),
 		mCustomProjMatrix(false),
-		mFrustumExtentsManuallySet(false),
-        mOrientationMode(OR_DEGREE_0),
-        mReflect(false), 
-        mLinkedReflectPlane(0),
-        mObliqueDepthProjection(false), 
-        mLinkedObliqueProjPlane(0)
+		mFrustumExtentsManuallySet(false)
     {
-        mLastLinkedReflectionPlane.normal = Vector3::ZERO;
-        mLastLinkedObliqueProjPlane.normal = Vector3::ZERO;
-
         updateView();
         updateFrustum();
     }
@@ -442,46 +432,6 @@ namespace Ogre {
 				mProjMatrix[2][2] = q;
 				mProjMatrix[2][3] = qn;
 				mProjMatrix[3][2] = -1;
-
-				if (mObliqueDepthProjection)
-				{
-					// Translate the plane into view space
-
-					// Don't use getViewMatrix here, incase overrided by 
-					// camera and return a cull frustum view matrix
-					updateView();
-					Plane plane = mViewMatrix * mObliqueProjPlane;
-
-					// Thanks to Eric Lenyel for posting this calculation 
-					// at www.terathon.com
-
-					// Calculate the clip-space corner point opposite the 
-					// clipping plane
-					// as (sgn(clipPlane.x), sgn(clipPlane.y), 1, 1) and
-					// transform it into camera space by multiplying it
-					// by the inverse of the projection matrix
-
-					/* generalised version
-					Vector4 q = matrix.inverse() * 
-					Vector4(Math::Sign(plane.normal.x), 
-					Math::Sign(plane.normal.y), 1.0f, 1.0f);
-					*/
-					Vector4 qVec;
-					qVec.x = (Math::Sign(plane.normal.x) + mProjMatrix[0][2]) / mProjMatrix[0][0];
-					qVec.y = (Math::Sign(plane.normal.y) + mProjMatrix[1][2]) / mProjMatrix[1][1];
-					qVec.z = -1;
-					qVec.w = (1 + mProjMatrix[2][2]) / mProjMatrix[2][3];
-
-					// Calculate the scaled plane vector
-					Vector4 clipPlane4d(plane.normal.x, plane.normal.y, plane.normal.z, plane.d);
-					Vector4 c = clipPlane4d * (2 / (clipPlane4d.dotProduct(qVec)));
-
-					// Replace the third row of the projection matrix
-					mProjMatrix[2][0] = c.x;
-					mProjMatrix[2][1] = c.y;
-					mProjMatrix[2][2] = c.z + 1;
-					mProjMatrix[2][3] = c.w; 
-				}
 			} // perspective
 			else if (mProjType == PT_ORTHOGRAPHIC)
 			{
@@ -698,15 +648,6 @@ namespace Ogre {
         //        mRecalcView = true;
         //    }
         //}
-        // Deriving reflection from linked plane?
-        if (mLinkedReflectPlane && 
-            !(mLastLinkedReflectionPlane == *mLinkedReflectPlane))
-        {
-            mReflectPlane = *mLinkedReflectPlane;
-            mReflectMatrix = Math::buildReflectionMatrix(mReflectPlane);
-            mLastLinkedReflectionPlane = *mLinkedReflectPlane;
-            mRecalcView = true;
-        }
 
         return mRecalcView;
     }
@@ -714,24 +655,6 @@ namespace Ogre {
     //-----------------------------------------------------------------------
     bool Frustum::isFrustumOutOfDate(void) const
     {
-        // Deriving custom near plane from linked plane?
-        if (mObliqueDepthProjection)
-        {
-            // Out of date when view out of data since plane needs to be in view space
-            if (isViewOutOfDate())
-            {
-                mRecalcFrustum = true;
-            }
-            // Update derived plane
-            if (mLinkedObliqueProjPlane && 
-                !(mLastLinkedObliqueProjPlane == *mLinkedObliqueProjPlane))
-            {
-                mObliqueProjPlane = *mLinkedObliqueProjPlane;
-                mLastLinkedObliqueProjPlane = mObliqueProjPlane;
-                mRecalcFrustum = true;
-            }
-        }
-
         return mRecalcFrustum;
     }
 
@@ -750,7 +673,7 @@ namespace Ogre {
 			const Quaternion& orientation = getOrientationForViewUpdate();
 			const Vector3& position = getPositionForViewUpdate();
 
-			mViewMatrix = Math::makeViewMatrix(position, orientation, mReflect? &mReflectMatrix : 0);
+			mViewMatrix = Math::makeViewMatrix(position, orientation, 0);
 		}
 
 		mRecalcView = false;
@@ -759,12 +682,6 @@ namespace Ogre {
 		mRecalcFrustumPlanes = true;
 		// Signal to update world space corners
 		mRecalcWorldSpaceCorners = true;
-		// Signal to update frustum if oblique plane enabled,
-		// since plane needs to be in view space
-		if (mObliqueDepthProjection)
-		{
-			mRecalcFrustum = true;
-		}
 	}
 	//---------------------------------------------------------------------
 	void Frustum::calcViewMatrixRelative(const Vector3& relPos, Matrix4& matToUpdate) const
@@ -908,11 +825,6 @@ namespace Ogre {
     {
         return mBoundingBox;
     }
-    //-----------------------------------------------------------------------
-    const String& Frustum::getMovableType(void) const
-    {
-        return msMovableType;
-    }
     //-----------------------------------------------------------------------
 	Real Frustum::getBoundingRadius(void) const
 	{
@@ -962,34 +874,6 @@ namespace Ogre {
     {
         return mLastParentOrientation;
     }
-    //-----------------------------------------------------------------------
-    void Frustum::enableReflection(const Plane& p)
-    {
-        mReflect = true;
-        mReflectPlane = p;
-        mLinkedReflectPlane = 0;
-        mReflectMatrix = Math::buildReflectionMatrix(p);
-        invalidateView();
-
-    }
-    //-----------------------------------------------------------------------
-    void Frustum::enableReflection(const Plane* p)
-    {
-        mReflect = true;
-        mLinkedReflectPlane = p;
-        mReflectPlane = *mLinkedReflectPlane;
-        mReflectMatrix = Math::buildReflectionMatrix(mReflectPlane);
-        mLastLinkedReflectionPlane = *mLinkedReflectPlane;
-        invalidateView();
-    }
-    //-----------------------------------------------------------------------
-    void Frustum::disableReflection(void)
-    {
-        mReflect = false;
-        mLinkedReflectPlane = 0;
-        mLastLinkedReflectionPlane.normal = Vector3::ZERO;
-        invalidateView();
-    }
     //---------------------------------------------------------------------
     bool Frustum::projectSphere(const Sphere& sphere, 
         Real* left, Real* top, Real* right, Real* bottom) const
@@ -1158,29 +1042,6 @@ namespace Ogre {
         return (*left != -1.0f) || (*top != 1.0f) || (*right != 1.0f) || (*bottom != -1.0f);
 
     }
-    //---------------------------------------------------------------------
-    void Frustum::enableCustomNearClipPlane(const Plane* plane)
-    {
-        mObliqueDepthProjection = true;
-        mLinkedObliqueProjPlane = plane;
-        mObliqueProjPlane = *plane;
-        invalidateFrustum();
-    }
-    //---------------------------------------------------------------------
-    void Frustum::enableCustomNearClipPlane(const Plane& plane)
-    {
-        mObliqueDepthProjection = true;
-        mLinkedObliqueProjPlane = 0;
-        mObliqueProjPlane = plane;
-        invalidateFrustum();
-    }
-    //---------------------------------------------------------------------
-    void Frustum::disableCustomNearClipPlane(void)
-    {
-        mObliqueDepthProjection = false;
-        mLinkedObliqueProjPlane = 0;
-        invalidateFrustum();
-    }
     //---------------------------------------------------------------------
 	void Frustum::setCustomViewMatrix(bool enable, const Matrix4& viewMatrix)
 	{
@@ -1257,27 +1118,4 @@ namespace Ogre {
 		outtop = mTop;
 		outbottom = mBottom;
 	}
-    //---------------------------------------------------------------------
-    void Frustum::setOrientationMode(OrientationMode orientationMode)
-    {
-#if OGRE_NO_VIEWPORT_ORIENTATIONMODE != 0
-        OGRE_EXCEPT(Exception::ERR_NOT_IMPLEMENTED,
-                    "Setting Frustrum orientation mode is not supported",
-                    __FUNCTION__);
-#endif
-        mOrientationMode = orientationMode;
-        invalidateFrustum();
-    }
-    //---------------------------------------------------------------------
-    OrientationMode Frustum::getOrientationMode() const
-    {
-#if OGRE_NO_VIEWPORT_ORIENTATIONMODE != 0
-        OGRE_EXCEPT(Exception::ERR_NOT_IMPLEMENTED,
-                    "Getting Frustrum orientation mode is not supported",
-                    __FUNCTION__);
-#endif
-        return mOrientationMode;
-    }
-
-
 } // namespace Ogre

+ 0 - 143
CamelotRenderer/OgreFrustum.h

@@ -36,26 +36,6 @@ THE SOFTWARE.
 
 namespace Ogre
 {
-	/** \addtogroup Core
-	*  @{
-	*/
-	/** \addtogroup Math
-	*  @{
-	*/
-    /** Specifies orientation mode.
-    */
-    enum OrientationMode
-    {
-        OR_DEGREE_0       = 0,
-        OR_DEGREE_90      = 1,
-        OR_DEGREE_180     = 2,
-        OR_DEGREE_270     = 3,
-
-        OR_PORTRAIT       = OR_DEGREE_0,
-        OR_LANDSCAPERIGHT = OR_DEGREE_90,
-        OR_LANDSCAPELEFT  = OR_DEGREE_270
-    };
-
 	/** Specifies perspective (realistic) or orthographic (architectural) projection.
     */
     enum ProjectionType
@@ -134,8 +114,6 @@ namespace Ogre
 		bool mFrustumExtentsManuallySet;
 		/// Frustum extents
 		mutable Real mLeft, mRight, mTop, mBottom;
-        /// Frustum orientation mode
-        mutable OrientationMode mOrientationMode;
 		
         // Internal functions for calcs
         virtual void calcProjectionParameters(Real& left, Real& right, Real& bottom, Real& top) const;
@@ -161,34 +139,11 @@ namespace Ogre
         /// Signal to update view information.
         virtual void invalidateView(void) const;
 
-        /// Shared class-level name for Movable type
-        static String msMovableType;
-
         mutable AxisAlignedBox mBoundingBox;
         mutable VertexData mVertexData;
 
         mutable Vector3 mWorldSpaceCorners[8];
 
-        /// Is this frustum to act as a reflection of itself?
-        bool mReflect;
-		/// Derived reflection matrix
-        mutable Matrix4 mReflectMatrix;
-        /// Fixed reflection plane
-		mutable Plane mReflectPlane;
-		/// Pointer to a reflection plane (automatically updated)
-		const Plane* mLinkedReflectPlane;
-		/// Record of the last world-space reflection plane info used
-		mutable Plane mLastLinkedReflectionPlane;
-		
-        /// Is this frustum using an oblique depth projection?
-		bool mObliqueDepthProjection;
-		/// Fixed oblique projection plane
-		mutable Plane mObliqueProjPlane;
-		/// Pointer to oblique projection plane (automatically updated)
-		const Plane* mLinkedObliqueProjPlane;
-		/// Record of the last world-space oblique depth projection plane info used
-		mutable Plane mLastLinkedObliqueProjPlane;
-
     public:
 
 		/// Named constructor
@@ -471,9 +426,6 @@ namespace Ogre
         /** Overridden from MovableObject */
 		Real getBoundingRadius(void) const;
 
-        /** Overridden from MovableObject */
-        const String& getMovableType(void) const;
-
         /** Gets the world space corners of the frustum.
         @remarks
             The corners are ordered as follows: top-right near, 
@@ -516,32 +468,6 @@ namespace Ogre
 		*/
 		virtual Real getOrthoWindowWidth() const;
 
-        /** Modifies this frustum so it always renders from the reflection of itself through the
-        plane specified.
-        @remarks
-        This is obviously useful for performing planar reflections. 
-        */
-        virtual void enableReflection(const Plane& p);
-        /** Modifies this frustum so it always renders from the reflection of itself through the
-        plane specified. Note that this version of the method links to a plane
-		so that changes to it are picked up automatically. It is important that
-		this plane continues to exist whilst this object does; do not destroy
-		the plane before the frustum.
-        @remarks
-        This is obviously useful for performing planar reflections. 
-        */
-        virtual void enableReflection(const Plane* p);
-
-        /** Disables reflection modification previously turned on with enableReflection */
-        virtual void disableReflection(void);
-
-        /// Returns whether this frustum is being reflected
-        virtual bool isReflected(void) const { return mReflect; }
-        /// Returns the reflection matrix of the frustum if appropriate
-        virtual const Matrix4& getReflectionMatrix(void) const { return mReflectMatrix; }
-        /// Returns the reflection plane of the frustum if appropriate
-        virtual const Plane& getReflectionPlane(void) const { return mReflectPlane; }
-
         /** Project a sphere onto the near plane and get the bounding rectangle. 
         @param sphere The world-space sphere to project
         @param radius Radius of the sphere
@@ -554,60 +480,6 @@ namespace Ogre
         virtual bool projectSphere(const Sphere& sphere, 
             Real* left, Real* top, Real* right, Real* bottom) const;
 
-
-		/** Links the frustum to a custom near clip plane, which can be used
-			to clip geometry in a custom manner without using user clip planes.
-		@remarks
-			There are several applications for clipping a scene arbitrarily by
-			a single plane; the most common is when rendering a reflection to 
-			a texture, and you only want to render geometry that is above the 
-			water plane (to do otherwise results in artefacts). Whilst it is
-			possible to use user clip planes, they are not supported on all
-			cards, and sometimes are not hardware accelerated when they are
-			available. Instead, where a single clip plane is involved, this
-			technique uses a 'fudging' of the near clip plane, which is 
-			available and fast on all hardware, to perform as the arbitrary
-			clip plane. This does change the shape of the frustum, leading 
-			to some depth buffer loss of precision, but for many of the uses of
-			this technique that is not an issue.
-		@par 
-			This version of the method links to a plane, rather than requiring
-			a by-value plane definition, and therefore you can 
-			make changes to the plane (e.g. by moving / rotating the node it is
-			attached to) and they will automatically affect this object.
-		@note This technique only works for perspective projection.
-		@param plane The plane to link to to perform the clipping. This plane
-			must continue to exist while the camera is linked to it; do not
-			destroy it before the frustum. 
-		*/
-		virtual void enableCustomNearClipPlane(const Plane* plane);
-		/** Links the frustum to a custom near clip plane, which can be used
-			to clip geometry in a custom manner without using user clip planes.
-		@remarks
-			There are several applications for clipping a scene arbitrarily by
-			a single plane; the most common is when rendering a reflection to  
-			a texture, and you only want to render geometry that is above the 
-			water plane (to do otherwise results in artefacts). Whilst it is
-			possible to use user clip planes, they are not supported on all
-			cards, and sometimes are not hardware accelerated when they are
-			available. Instead, where a single clip plane is involved, this
-			technique uses a 'fudging' of the near clip plane, which is 
-			available and fast on all hardware, to perform as the arbitrary
-			clip plane. This does change the shape of the frustum, leading 
-			to some depth buffer loss of precision, but for many of the uses of
-			this technique that is not an issue.
-		@note This technique only works for perspective projection.
-		@param plane The plane to link to to perform the clipping. This plane
-			must continue to exist while the camera is linked to it; do not
-			destroy it before the frustum. 
-		*/
-		virtual void enableCustomNearClipPlane(const Plane& plane);
-		/** Disables any custom near clip plane. */
-		virtual void disableCustomNearClipPlane(void);
-		/** Is a custom near clip plane in use? */
-		virtual bool isCustomNearClipPlaneEnabled(void) const 
-		{ return mObliqueDepthProjection; }
-
         /// Small constant used to reduce far plane projection to avoid inaccuracies
         static const Real INFINITE_FAR_PLANE_ADJUST;
 
@@ -615,21 +487,6 @@ namespace Ogre
 		virtual const Vector3& getPositionForViewUpdate(void) const;
 		/** Get the derived orientation of this frustum. */
 		virtual const Quaternion& getOrientationForViewUpdate(void) const;
-
-        /** Set the orientation mode of the frustum. Default is OR_DEGREE_0
-             @remarks
-                Setting the orientation of a frustum is only supported on
-                iPhone at this time.  An exception is thrown on other platforms.
-        */
-        void setOrientationMode(OrientationMode orientationMode);
-
-        /** Get the orientation mode of the frustum.
-             @remarks
-                Getting the orientation of a frustum is only supported on
-                iPhone at this time.  An exception is thrown on other platforms.
-        */
-        OrientationMode getOrientationMode() const;
-
     };
 
 	/** @} */

+ 2 - 2
CamelotRenderer/OgreRenderSystem.cpp

@@ -94,7 +94,7 @@ namespace Ogre {
 		itargend = mPrioritisedRenderTargets.end();
 		for( itarg = mPrioritisedRenderTargets.begin(); itarg != itargend; ++itarg )
 		{
-			if( itarg->second->isActive() && itarg->second->isAutoUpdated())
+			if( itarg->second->isActive())
 				itarg->second->update(swapBuffers);
 		}
     }
@@ -107,7 +107,7 @@ namespace Ogre {
 		itargend = mPrioritisedRenderTargets.end();
 		for( itarg = mPrioritisedRenderTargets.begin(); itarg != itargend; ++itarg )
 		{
-			if( itarg->second->isActive() && itarg->second->isAutoUpdated())
+			if( itarg->second->isActive())
 				itarg->second->swapBuffers(waitForVSync);
 		}
     }

+ 0 - 10
CamelotRenderer/OgreRenderTarget.cpp

@@ -193,16 +193,6 @@ namespace Ogre {
         mActive = state;
     }
     //-----------------------------------------------------------------------
-    void RenderTarget::setAutoUpdated(bool autoup)
-    {
-        mAutoUpdate = autoup;
-    }
-    //-----------------------------------------------------------------------
-    bool RenderTarget::isAutoUpdated(void) const
-    {
-        return mAutoUpdate;
-    }
-    //-----------------------------------------------------------------------
     bool RenderTarget::isPrimary(void) const
     {
         // RenderWindow will override and return true for the primary window

+ 0 - 17
CamelotRenderer/OgreRenderTarget.h

@@ -197,23 +197,6 @@ namespace Ogre {
         */
         virtual void setActive( bool state );
 
-        /** Sets whether this target should be automatically updated if Ogre's rendering
-            loop or Root::_updateAllRenderTargets is being used.
-        @remarks
-            By default, if you use Ogre's own rendering loop (Root::startRendering)
-            or call Root::_updateAllRenderTargets, all render targets are updated 
-            automatically. This method allows you to control that behaviour, if 
-            for example you have a render target which you only want to update periodically.
-        @param autoupdate If true, the render target is updated during the automatic render
-            loop or when Root::_updateAllRenderTargets is called. If false, the 
-            target is only updated when its update() method is called explicitly.
-        */
-        virtual void setAutoUpdated(bool autoupdate);
-        /** Gets whether this target is automatically updated if Ogre's rendering
-            loop or Root::_updateAllRenderTargets is being used.
-        */
-        virtual bool isAutoUpdated(void) const;
-
 		/** Copies the current contents of the render target to a pixelbox. 
 		@remarks See suggestPixelFormat for a tip as to the best pixel format to
 			extract into, although you can use whatever format you like and the 

+ 0 - 1
CamelotRenderer/TODO.txt

@@ -46,7 +46,6 @@ HardwarePixelBuffer
 RenderTarget:
  - update() causes rendering to start - This probably need to be moved to camera, as I want it to be responsible for rendering
  - keeps a viewport list, which I also don't think I'll need
- - autoUpdate and various update methods that I probably don't need
 
 TODO:
  - Make sure to parse D3D9 implementations of above classes and see what needs removing there as well