home *** CD-ROM | disk | FTP | other *** search
/ Nebula 2 / Nebula Two.iso / SourceCode / MiscKit1.7.1 / MiscKit / Headers / misckit / MiscRtMatrix.h < prev    next >
Encoding:
Text File  |  1995-04-12  |  2.5 KB  |  79 lines

  1. //
  2. //    MiscRtMatrix.h -- a wrapper around the RtMatrix structure.
  3. //        Written by Thomas Engel Copyright (c) 1994 by Thomas Engel.
  4. //                Version 1.0  All rights reserved.
  5. //
  6. //        This notice may not be removed from this source code.
  7. //
  8. //    This object is included in the MiscKit by permission from the author
  9. //    and its use is governed by the MiscKit license, found in the file
  10. //    "LICENSE.rtf" in the MiscKit distribution.  Please refer to that file
  11. //    for a list of all applicable permissions and restrictions.
  12. //    
  13.  
  14. // Note:  This relies upon the 3dKit headers.  As such, I have not included
  15. // it in the top level MiscKit header--so you will have to explicity import
  16. // this header to use this object!
  17.  
  18. /* MiscRtMatrix.h                 
  19.  *
  20.  * PDO does not allow pasing RtMatrix by value. So this is a wrapper object.
  21.  * Anyway. The object is the subject. More features than RtMatrix.
  22.  *
  23.  * Usage: Create an instance and init it with the right values.
  24.  *          You may pass this object bycopy with the (P)DO systems.
  25.  *
  26.  *          Attention: When setting angles remember that they are in degree!
  27.  *                     (like 0-360 or 720 I don't mind)
  28.  *
  29.  *          Using the byTrans.byRot: does require some discipline! As you may
  30.  *          remember multiplying matrices is not comutative. Therefore you 
  31.  *          MUST follow some rules when computing the a,b,c rotation. For more
  32.  *          details please read the comments included in the method implemen-
  33.  *          tation. ( The rotation will be applyed in the a-b-c order!)
  34.  *
  35.  * Notes: There are many more possible methods. They are yet to come.
  36.  *          When working with the 3DDeviceServer you MUST use this object in
  37.  *          your app.
  38.  *          You will get BYCOPY instances!!
  39.  *
  40.  * Written by:         Thomas Engel
  41.  * Created:            13.04.1994 (Copyleft)
  42.  * Last modified:     16.04.1994
  43.  */
  44.  
  45. #import <appkit/appkit.h>
  46. #import <3Dkit/3Dkit.h>
  47.  
  48. @interface MiscRtMatrix:Object <NXTransport>
  49. {
  50.     RtMatrix    m;
  51. }
  52.  
  53. - setByTranslation:(float)x :(float)y :(float)z
  54.        andRotation:(float)a :(float)b :(float)c;
  55.              
  56. - setTransformMatrix:(RtMatrix)newTransform;
  57. - getTransformMatrix:(RtMatrix)theMatrix;
  58. - getTranslateMatrix:(RtMatrix)theMatrix;
  59. - getRotateMatrix:(RtMatrix)theMatrix;
  60.  
  61. - (BOOL)doesRotate;
  62. - (BOOL)doesTranslate;
  63. - (BOOL)doesScale;
  64.  
  65. @end
  66.  
  67. /*
  68.  * History: 16.04.04 Using a RtMatrix internally now.
  69.  *
  70.  *            13.04.94 First test and it works. Well PDO is not perfect (no 
  71.  *                     RtMatrix by value) but it is easy when working with
  72.  *                     real objects.
  73.  *
  74.  *
  75.  * Bugs: - doesScale not implemented.
  76.  *
  77.  *         - applys only one Rotation :-( I will change that soon.
  78.  */
  79.