home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / GFX / Raytracing / Raytracer / LW5VT09.LHA / Toaster / Arexx_examples / Lwe / Manual / Library.eng < prev    next >
Encoding:
Text File  |  1996-06-10  |  4.4 KB  |  149 lines

  1. The Enhancer macros are working with an own AREXX library called
  2. LWE.library, which has to be copied to your libs: directory to
  3. run the macros as wanted. There are two versions: one for compu-
  4. ters with FPU and one for such without. Both of the versions are
  5. named as described (LWE.library), the version for computers
  6. without FPU is stored in the NOFP drawer. If you have to use this
  7. one, copy it into your libs: drawer. ATTENTION: When using the
  8. FP-library on a machine without FPU, it will crash!
  9. [PAGE]
  10. The library can also be used in own macros. How to do that, you
  11. can see in the macros themself. Like any library it has to be
  12. opened first, before the functions can be called. For a better
  13. overview, all the functionnames are beginning with "LW_", fol-
  14. lowed by the function´s name.
  15. [PAGE]
  16. LW_OPENOBJECT
  17. parameter: file_name
  18. result: handle
  19. error : "0"
  20.  
  21. You open an objectfile to read. The backgiven handle is used
  22. when calling the functions LW_GETOBJECT and LW_CLOSEOBJECT. If
  23. the file cannot be opened or it is not a LW object, a 0 is given
  24. back.
  25. [PAGE]
  26. LW_SETOBJECT
  27. parameter: handle chunk [count_flag]
  28. result: size
  29. error : "0"
  30.  
  31. After opening the objectfile with LW_OPENOBJECT, choose the da-
  32. tas to read. You have the choice between "SURFACES", "POINTS"
  33. and "POLYGONS". If you give a 1 as third parameter, the number
  34. of elements in the last chunk is given back (p.e. the number of
  35. polygones). If the number is missed or it is 0, the size of the
  36. chunk in bytes is given back. A 0 means in both cases a missing
  37. of chunk or a read error.
  38. [PAGE]
  39. LW_GETOBJECT
  40. parameter: handle
  41. result: list
  42. error : "0"
  43.  
  44. After LW_SETOBJECT you read the file. The format is different,
  45. it depends on the data-type.
  46. SURFACES: the name of surface surface=LW_GETOBJECT(handle)
  47. POINTS: the coordinates x,y, and z of the point. parse value
  48. LW_GETOBJECT(handle) with x y z .
  49. POLYGONS: n points of the polygone and the # of surface
  50. list=LW_GETOBJECT(handle); points=words(list)-1
  51. surface_nr=word(list(words(list))
  52. [PAGE]
  53. LW_CLOSEOBJECT
  54. parameter: handle
  55. result: none
  56. error : none
  57.  
  58. The objectfile is closed after reading. The given handle is not
  59. any longer valid afterwards! The function returns no result.
  60. [PAGE]
  61. LW_INITROTATE
  62. parameter: wx wy wz
  63. result: handle
  64. error: REXX_ERR
  65.  
  66. The three functions LW_INITROTATE, LW_POINTSROTATE and
  67. LW_REMOVEROTATE are used to rotate several points. To initialize
  68. call LW_INITROTATE with the three angles as parameters. The
  69. backgiven handle is used when calling LW_POINTSROTATE, all coor-
  70. dinates will be rotated using the given angles. In case of er-
  71. ror an AREXX error will be raised.
  72. [PAGE]
  73. LW_POINTSROTATE
  74. parameter: handle px px py
  75. result: list
  76. error: none
  77.  
  78. After calling LW_INITROTATE you invoke LW_POINTSROTATE with the
  79. x,y and z coordinates as parameters (don't forget to pass the
  80. handle as first parameter).
  81. [PAGE]
  82. LW_REMOVEROTATE
  83. parameter: handle
  84. result: none
  85. error: none
  86.  
  87. When past with the point transformation, you release the alloca-
  88. ted memory with a call of LW_REMOVEROTATE; the handle then becomes
  89. invalid!
  90. [PAGE]
  91. LW_RANDOMVECT
  92. parameter: seed
  93. result: list
  94. error: none
  95.  
  96. This function simply returns a random vector, which you can use
  97. for e.g. to create clouds of particles. The random seed should
  98. be altered every time you call the function, otherwise the re-
  99. sulting vector stays the same.
  100. [PAGE]
  101. LW_DRAWER
  102. parameter: file_name
  103. result: drawer
  104. error: none
  105.  
  106. The function returns the path part of the file name.
  107. [PAGE]
  108. LW_FILE
  109. parameter: file_name
  110. result: file
  111. error: none
  112.  
  113. This function extracts the name of the file from the given full
  114. name (including path).
  115. [PAGE]
  116. LW_ADDFILE
  117. parameter: path file_name
  118. result: full_name
  119. error: none
  120.  
  121. The name of the file gets merged with the given path to achieve
  122. a load name.
  123. [PAGE]
  124. LW_OPENIMAGINE
  125. parameter: file_name [count_flag]
  126. result: handle [count]
  127. error: "0"
  128.  
  129. This function opens an Imagine object. The returned handle is
  130. used when calling LW_GETIMAGINE to read the object data. In case
  131. of error a zero is returned. The second parameter determines the
  132. subobject to be processed.
  133. [PAGE]
  134. LW_GETIMAGINE
  135. parameter: handle
  136. result: list
  137. error: ""
  138.  
  139. After you have specified the data type with LW_SETOBJECT, repe-
  140. titive calls of LW_GETIMAGINE are used to read the data. The
  141. format of a Imagine object is, compared to that of a Lightwave
  142. object, quite complicated. For further information you should
  143. therefore study Imagine's documentation.
  144.  
  145. The available data types are as follows:
  146. POINTS,EDGES,FACES,POSITION,AXIS
  147. SIZE,NAME,COLOR,REFLECTION,FILTER
  148. [END]
  149.