From 7b9aaa57428b64fa15e188b676cff3a8e35a9380 Mon Sep 17 00:00:00 2001 From: wuyongbo <1308504206@qq.com> Date: Wed, 23 Apr 2025 13:43:21 +0800 Subject: [PATCH] Fix a spelling error, Frustrum -> Frustum --- OgreMain/include/OgreFrustum.h | 16 ++++++++-------- OgreMain/src/OgreFrustum.cpp | 24 ++++++++++++------------ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/OgreMain/include/OgreFrustum.h b/OgreMain/include/OgreFrustum.h index 2d92c5cf829..3a0a4bf7100 100644 --- a/OgreMain/include/OgreFrustum.h +++ b/OgreMain/include/OgreFrustum.h @@ -66,9 +66,9 @@ namespace Ogre FRUSTUM_PLANE_BOTTOM = 5 }; - /** Specify how the frustrum extents are represented. + /** Specify how the frustum extents are represented. */ - enum FrustrumExtentsType + enum FrustumExtentsType { /// Represent extents as positions on the near clip plane FET_PROJ_PLANE_POS, @@ -132,7 +132,7 @@ namespace Ogre bool mFrustumExtentsManuallySet; /// Whether to treat frustum extents as tangents of the angles between the viewing /// vector and the edges of the field of view or as positions on the projection plane - FrustrumExtentsType mFrustrumExtentsType; + FrustumExtentsType mFrustumExtentsType; /// Frustum extents mutable Real mLeft, mRight, mTop, mBottom; /// Frustum orientation mode @@ -323,7 +323,7 @@ namespace Ogre @param left, right, top, bottom The position where the side clip planes intersect the near clip plane, in eye space OR the tangent of the half angles from the eye to the edges of the near clip plane - @param frustrumExtentsType + @param frustumExtentsType Specifies how the extents are represented. Be default they are the positions on near clip plane. However if this is a scene camera it is recommended that you actually use the tangent of the half angles. ie Half the FoV angles. This is because Ogre uses this camera setup to calculate @@ -335,7 +335,7 @@ namespace Ogre Ogre can apply different near clip distances dynamically. */ virtual void setFrustumExtents( Real left, Real right, Real top, Real bottom, - FrustrumExtentsType frustrumExtentsType = FET_PROJ_PLANE_POS ); + FrustumExtentsType frustumExtentsType = FET_PROJ_PLANE_POS ); bool getFrustumExtentsManuallySet() const; @@ -346,13 +346,13 @@ namespace Ogre @param outleft, outright, outtop, outbottom The position where the side clip planes intersect the near clip plane, in eye space OR the tangent of the half angles from the eye to the edges of the near clip plane - @param frustrumExtentsType - Specifies in what format the extents are returned. See OgreFrustrum::setFrustumExtents for + @param frustumExtentsType + Specifies in what format the extents are returned. See OgreFrustum::setFrustumExtents for more information */ virtual void getFrustumExtents( Real &outleft, Real &outright, Real &outtop, Real &outbottom, - FrustrumExtentsType frustrumExtentsType = FET_PROJ_PLANE_POS ) const; + FrustumExtentsType frustumExtentsType = FET_PROJ_PLANE_POS ) const; /** Gets the depth-adjusted projection matrix for the current rendersystem, but one which still conforms to right-hand rules. diff --git a/OgreMain/src/OgreFrustum.cpp b/OgreMain/src/OgreFrustum.cpp index 8b2a371003e..00058850802 100644 --- a/OgreMain/src/OgreFrustum.cpp +++ b/OgreMain/src/OgreFrustum.cpp @@ -1,4 +1,4 @@ -/* +rustumfrustumFrustum/* ----------------------------------------------------------------------------- This source file is part of OGRE-Next (Object-oriented Graphics Rendering Engine) @@ -67,7 +67,7 @@ namespace Ogre mCustomViewMatrix( false ), mCustomProjMatrix( false ), mFrustumExtentsManuallySet( false ), - mFrustrumExtentsType( FET_PROJ_PLANE_POS ), + mFrustumExtentsType( FET_PROJ_PLANE_POS ), mOrientationMode( OR_DEGREE_0 ), mVertexData( NULL ), mReflect( false ), @@ -351,7 +351,7 @@ namespace Ogre top = mTop; bottom = mBottom; - if( mFrustrumExtentsType == FET_TAN_HALF_ANGLES && mProjType != PT_ORTHOGRAPHIC ) + if( mFrustumExtentsType == FET_TAN_HALF_ANGLES && mProjType != PT_ORTHOGRAPHIC ) { left *= mNearDist; right *= mNearDist; @@ -1330,10 +1330,10 @@ namespace Ogre Real Frustum::getOrthoWindowWidth() const { return mOrthoHeight * mAspect; } //--------------------------------------------------------------------- void Frustum::setFrustumExtents( Real left, Real right, Real top, Real bottom, - FrustrumExtentsType frustrumExtentsType ) + FrustumExtentsType frustumExtentsType ) { mFrustumExtentsManuallySet = true; - mFrustrumExtentsType = frustrumExtentsType; + mFrustumExtentsType = frustumExtentsType; mLeft = left; mRight = right; mTop = top; @@ -1347,15 +1347,15 @@ namespace Ogre void Frustum::resetFrustumExtents() { mFrustumExtentsManuallySet = false; - mFrustrumExtentsType = FET_PROJ_PLANE_POS; + mFrustumExtentsType = FET_PROJ_PLANE_POS; invalidateFrustum(); } //--------------------------------------------------------------------- void Frustum::getFrustumExtents( Real &outleft, Real &outright, Real &outtop, Real &outbottom, - FrustrumExtentsType frustrumExtentsType ) const + FrustumExtentsType frustumExtentsType ) const { updateFrustum(); - if( frustrumExtentsType == FET_TAN_HALF_ANGLES && mFrustrumExtentsType == FET_PROJ_PLANE_POS && + if( frustumExtentsType == FET_TAN_HALF_ANGLES && mFrustumExtentsType == FET_PROJ_PLANE_POS && mProjType != PT_ORTHOGRAPHIC ) { outleft = mLeft / mNearDist; @@ -1363,8 +1363,8 @@ namespace Ogre outtop = mTop / mNearDist; outbottom = mBottom / mNearDist; } - else if( frustrumExtentsType == FET_PROJ_PLANE_POS && - mFrustrumExtentsType == FET_TAN_HALF_ANGLES && mProjType != PT_ORTHOGRAPHIC ) + else if( frustumExtentsType == FET_PROJ_PLANE_POS && + mFrustumExtentsType == FET_TAN_HALF_ANGLES && mProjType != PT_ORTHOGRAPHIC ) { outleft = mLeft * mNearDist; outright = mRight * mNearDist; @@ -1398,7 +1398,7 @@ namespace Ogre { #if OGRE_NO_VIEWPORT_ORIENTATIONMODE != 0 OGRE_EXCEPT( Exception::ERR_NOT_IMPLEMENTED, - "Setting Frustrum orientation mode is not supported", __FUNCTION__ ); + "Setting Frustum orientation mode is not supported", __FUNCTION__ ); #endif if( mOrientationMode != orientationMode ) { @@ -1411,7 +1411,7 @@ namespace Ogre { #if OGRE_NO_VIEWPORT_ORIENTATIONMODE != 0 OGRE_EXCEPT( Exception::ERR_NOT_IMPLEMENTED, - "Getting Frustrum orientation mode is not supported", __FUNCTION__ ); + "Getting Frustum orientation mode is not supported", __FUNCTION__ ); #endif return mOrientationMode; }