Guest User

Untitled

a guest
Nov 24th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.26 KB | None | 0 0
  1. /// edit Engine/source/T3D/camera.cpp and past the following
  2. /// below DefineEngineMethod( Camera, setRotation, void, ( Point3F rot ), ,
  3. /// around line 1655 in T3D 1.1 Final:
  4.  
  5. //-----------------------------------------------------------------------------
  6.  
  7. DefineEngineMethod( Camera, getOrbitDistance, F32, (), ,
  8.                    "Get the camera's current orbit mode's distance.\n\n"
  9.                    "@returns The current orbit mode's distance as a float.")
  10. {
  11.    return object->getOrbitDistance();
  12. }
  13.  
  14. //-----------------------------------------------------------------------------
  15.  
  16. DefineEngineMethod( Camera, setOrbitDistance, void, ( F32 dist ), ,
  17.                    "Set the camera's orbit mode's distance.\n\n"
  18.                    "@param dist The distance to be set for orbit mode.")
  19. {
  20.    object->setOrbitDistance( dist );
  21. }
  22.  
  23.  
  24. /// now edit the associated header file Engine/source/T3D/camera.h and insert
  25. /// the following code just after void setRotation( const Point3F& viewRot );
  26. /// around line 152:
  27.  
  28.       F32  getOrbitDistance() { return mCurOrbitDist; }
  29.       void setOrbitDistance(F32 dist)
  30.       {
  31.          if(dist > mMaxOrbitDist) dist = mMaxOrbitDist;
  32.          if(dist < mMinOrbitDist) dist = mMinOrbitDist;
  33.          mCurOrbitDist = dist;
  34.       };
Add Comment
Please, Sign In to add comment