home *** CD-ROM | disk | FTP | other *** search
/ PC for Alla 2005 May / PC för Alla 0505.iso / fullversioner / realsoft3d / data1.cab / Scripting / scripts / js / real / objects / r3constructor.js < prev    next >
Encoding:
JavaScript  |  2005-04-04  |  9.2 KB  |  278 lines

  1.  
  2. // JavaScript wrapper for r3constructor.h
  3. // Auto generated file, do not modify by hand
  4. // Copyright ⌐ 2004, Realsoft Graphics Oy
  5.  
  6. var R3_CONSTRUCTOR_H = 1;
  7. include("real/objects/r3level.js")
  8.  
  9.  
  10. var R3CLID_CONSTRUCTOR = 1810;
  11.  
  12.  
  13.  
  14.  
  15. // Description: Transform the given target attribute.
  16. // Returns: Boolean, the super class returns FALSE if the object is disabled (R3CONSTRUCTORA_Enabled=FALSE)    * in which case
  17. //      the derived classes should not touch the target attribute.
  18. // p1: Object, target object
  19. // p3: Object, attribute channel buffer.    
  20.  
  21. R3CONSTRUCTORM_TRANSFORMATTR = 1810000;
  22.  
  23. function mR3CONSTRUCTORM_TRANSFORMATTR(p1, p3) {
  24.   return   DoA2(this.r3obj, 1810000, p1, R3TID_OBJECT, 0, p3, R3TID_OBJECT, 0);
  25. }
  26.  
  27. // Description: Run reconstruction. This method is typically called from R3MM_CHANGED, R3PRIMM_SIBLINGCHANGED or R3PRIMM_CHILDCHANGED depending on
  28. //      the constructor.
  29.  
  30. R3CONSTRUCTORM_RECONSTRUCT = 1810001;
  31.  
  32. function mR3CONSTRUCTORM_RECONSTRUCT() {
  33.   DoA(this.r3obj, 1810001, 0, R3TID_INTEGER, 0);
  34. }
  35.  
  36. // Description: Call the given object with given attribute.
  37. // Returns: Integer, true if attribute was defined.
  38. // p1: Object, object to be called
  39. // p2: Integer, callback method
  40. // p3: Integer, attribute to be passed to the callback method.    
  41.  
  42. R3CONSTRUCTORM_ENUMTARGETATT = 1810002;
  43.  
  44. function mR3CONSTRUCTORM_ENUMTARGETATT(p1, p2, p3) {
  45.   return   DoA3(this.r3obj, 1810002, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0);
  46. }
  47.  
  48. // Description: Private: optimized reconstruction. Call R3CONSTRUCTORM_RECONSTRUCT to ask the reconstruction.
  49. // Virtual method
  50.  
  51. R3CONSTRUCTORM_DORECONSTRUCT = 1810003;
  52.  
  53. function mR3CONSTRUCTORM_DORECONSTRUCT() {
  54.   DoA(this.r3obj, 1810003, 0, R3TID_INTEGER, 0);
  55. }
  56.  
  57. // Description: Recursively enumerate target points for a given constructor. If the constructor's callback method returns
  58. //      TRUE, the point in question is assigned back to object by calling R3PRIMM_SETPOINT. This method
  59. //      is typically used by deformators.
  60. // p1: Object, constructor object to be called
  61. // p2: Integer, callback method for the constructor object
  62. // p3: Object, callback data
  63.  
  64. R3CONSTRUCTORM_DEFORMTARGETP = 1810004;
  65.  
  66. function mR3CONSTRUCTORM_DEFORMTARGETP(p1, p2, p3) {
  67.   DoA3(this.r3obj, 1810004, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  68. }
  69.  
  70. // Description: Restore given attribute. This executes internal 'restore origval '    * constructor.
  71. // Returns: Boolean, true if succeeded
  72. // p1: Integer, tag
  73. // p2: Integer, index
  74.  
  75. R3CONSTRUCTORM_PREPARE = 1810005;
  76.  
  77. function mR3CONSTRUCTORM_PREPARE(p1, p2) {
  78.   return   DoA3(this.r3obj, 1810005, p1, R3TID_INTEGER, 0, p2, R3TID_INTEGER, 0, 0, R3TID_INTEGER, 0);
  79. }
  80.  
  81. // Description: Detach the constructor from the target objects.
  82. // Virtual method
  83. // Returns: Boolean, true if succeeded
  84. // p1: Integer, tag
  85. // p2: Integer, index
  86.  
  87. R3CONSTRUCTORM_RELEASE = 1810006;
  88.  
  89. function mR3CONSTRUCTORM_RELEASE(p1, p2) {
  90.   return   DoA3(this.r3obj, 1810006, p1, R3TID_INTEGER, 0, p2, R3TID_INTEGER, 0, 0, R3TID_INTEGER, 0);
  91. }
  92.  
  93. // Description: Enumerate geometric points, associated surface normals and uvw coordinates from the target objects. It
  94. //      is up to sub classes to implement this method. Some geometric classes may not support
  95. //      uvw coordinates or surface normals, in which case NULL should be passed in corresponding parameter.
  96. //      Callback is called as: R3DoA3(callbackobj, callbackmth, obj, index, p_n_uvw); where R3VECTOR *p_n_uvw[3]; p_n_uvw[0] = &vertex;
  97. //      p_n_uvw[1] = &normal; p_n_uvw[2] = &uvw;
  98. // Returns: Boolean, true if object handled.
  99. // p1: Object, callback object
  100. // p2: Integer[], callback method
  101.  
  102. R3CONSTRUCTORM_ENUMTARGETPOI = 1810007;
  103.  
  104. function mR3CONSTRUCTORM_ENUMTARGETPOI(p1, p2) {
  105.   return   DoA3(this.r3obj, 1810007, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, R3TNF_ARRAY, 0, R3TID_INTEGER, 0);
  106. }
  107.  
  108. // Description: Enum target objects for the constructor.
  109. // Returns: Boolean, return value from the constructors callback method
  110. // p1: Object, callback object
  111. // p2: Integer, callback method
  112. // p3: Object, callback data    
  113.  
  114. R3CONSTRUCTORM_ENUMTARGETOBJ = 1810008;
  115.  
  116. function mR3CONSTRUCTORM_ENUMTARGETOBJ(p1, p2, p3) {
  117.   return   DoA3(this.r3obj, 1810008, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  118. }
  119.  
  120. // Description: Callback method for creating the chor. associated with the constructor
  121. // Returns: Object, chor object for the target object
  122. // p1: Integer, attribute
  123. // p3: Integer, attribute index (-1 if regular attribute)    
  124.  
  125. R3CONSTRUCTORM_NEWCHOR = 1810009;
  126.  
  127. function mR3CONSTRUCTORM_NEWCHOR(p1, p3) {
  128.   return R3ToJS(  DoA2(this.r3obj, 1810009, p1, R3TID_INTEGER, 0, p3, R3TID_INTEGER, 0));
  129. }
  130.  
  131. // Description: Callback method for deleting chor objects associated with the constructors.
  132. // Returns: Boolean, true if succeeded
  133.  
  134. R3CONSTRUCTORM_DELCHOR = 1810010;
  135.  
  136. function mR3CONSTRUCTORM_DELCHOR() {
  137.   return   DoA(this.r3obj, 1810010, 0, R3TID_INTEGER, 0);
  138. }
  139.  
  140. // Description: Recursively enumerate target points for a given constructor.
  141. // p1: Object, constructor object to be called
  142. // p2: Integer, callback method for the constructor object
  143. // p3: Object, callback data
  144.  
  145. R3CONSTRUCTORM_ENUMTARGETPOI = 1810011;
  146.  
  147. function mR3CONSTRUCTORM_ENUMTARGETPOI(p1, p2, p3) {
  148.   DoA3(this.r3obj, 1810011, p1, R3TID_OBJECT, 0, p2, R3TID_INTEGER, 0, p3, R3TID_OBJECT, 0);
  149. }
  150.  
  151. // Description: Bind constructor to the given target object
  152. // Returns: Boolean, true if succeeded
  153. // p1: Boolean, recursive
  154. // p3: Object, target object    
  155.  
  156. R3CONSTRUCTORM_BIND = 1810012;
  157.  
  158. function mR3CONSTRUCTORM_BIND(p1, p3) {
  159.   return   DoA2(this.r3obj, 1810012, p1, R3TID_BOOLEAN, 0, p3, R3TID_OBJECT, 0);
  160. }
  161.  
  162. // Description: Bind to the sibling objects.
  163.  
  164. R3CONSTRUCTORM_BINDSIBLINGS = 1810013;
  165.  
  166. function mR3CONSTRUCTORM_BINDSIBLINGS() {
  167.   DoA(this.r3obj, 1810013, 0, R3TID_INTEGER, 0);
  168. }
  169.  
  170. // Description: Unbind from the sibling objects
  171.  
  172. R3CONSTRUCTORM_UNBINDSIBLING = 1810014;
  173.  
  174. function mR3CONSTRUCTORM_UNBINDSIBLING() {
  175.   DoA(this.r3obj, 1810014, 0, R3TID_INTEGER, 0);
  176. }
  177.  
  178. // Description: Start construction. If the constructor's R3CONSTRUCTORA_Enabled is FALSE,    * the base class returns FALSE and
  179. //      the derived classes should not touch * the target attributes.
  180. // Returns: Boolean, the state of the _Enabled attribute.
  181.  
  182. R3CONSTRUCTORM_BEGIN = 1810015;
  183.  
  184. function mR3CONSTRUCTORM_BEGIN() {
  185.   return   DoA(this.r3obj, 1810015, 0, R3TID_INTEGER, 0);
  186. }
  187.  
  188. // Description: Tells the object that the construction cycle is done.
  189.  
  190. R3CONSTRUCTORM_END = 1810016;
  191.  
  192. function mR3CONSTRUCTORM_END() {
  193.   DoA(this.r3obj, 1810016, 0, R3TID_INTEGER, 0);
  194. }
  195.  
  196. // Description: Bind to the given target object.
  197. // Returns: Boolean, true if succeeded
  198. // p3: Object, target    
  199.  
  200. R3CONSTRUCTORM_BINDOBJ = 1810017;
  201.  
  202. function mR3CONSTRUCTORM_BINDOBJ(p3) {
  203.   return   DoA(this.r3obj, 1810017, p3, R3TID_OBJECT, 0);
  204. }
  205.  
  206. // Description: Unbind the given target object.
  207. // Returns: Boolean, true if succeeded
  208. // p3: Object, target    
  209.  
  210. R3CONSTRUCTORM_UNBINDOBJ = 1810018;
  211.  
  212. function mR3CONSTRUCTORM_UNBINDOBJ(p3) {
  213.   return   DoA(this.r3obj, 1810018, p3, R3TID_OBJECT, 0);
  214. }
  215.  
  216.  
  217.  
  218.  
  219. R3CONSTRUCTORA_Enabled = 1810500;
  220. function SetR3CONSTRUCTORA_Enabled(value) {
  221.   R3Set(this.r3obj, R3CONSTRUCTORA_Enabled, value, R3TID_BOOLEAN, 0); 
  222. }
  223.  
  224. function GetR3CONSTRUCTORA_Enabled() {
  225.   return R3Get(this.r3obj, R3CONSTRUCTORA_Enabled, R3TID_BOOLEAN, 0); 
  226. }
  227.  
  228. var R3CONSTRUCTORA_ChorMth = 1810501; // Integer
  229. var R3CONSTRUCTORA_ChorObj = 1810502; // Object
  230. var R3CONSTRUCTORA_Recursive = 1810503; // Boolean
  231. var R3CONSTRUCTORA_SiblingsOnly = 1810504; // Boolean
  232. R3CONSTRUCTORA_Target = 1810505;
  233. function SetR3CONSTRUCTORA_Target(value) {
  234.   R3Set(this.r3obj, R3CONSTRUCTORA_Target, value, R3TID_BOOLEAN, 0); 
  235. }
  236.  
  237. function GetR3CONSTRUCTORA_Target() {
  238.   return R3Get(this.r3obj, R3CONSTRUCTORA_Target, R3TID_BOOLEAN, 0); 
  239. }
  240.  
  241. var R3CONSTRUCTORA_Force = 1810506; // Boolean
  242.  
  243.  
  244. function r3Constructor () { 
  245.    this.base = r3God;
  246.    if(arguments.length) {
  247.       this.base(R3CLID_CONSTRUCTOR, arguments);
  248.    }
  249.    // Methods
  250.    this.TRANSFORMATTR=mR3CONSTRUCTORM_TRANSFORMATTR;
  251.    this.RECONSTRUCT=mR3CONSTRUCTORM_RECONSTRUCT;
  252.    this.ENUMTARGETATT=mR3CONSTRUCTORM_ENUMTARGETATT;
  253.    this.DORECONSTRUCT=mR3CONSTRUCTORM_DORECONSTRUCT;
  254.    this.DEFORMTARGETP=mR3CONSTRUCTORM_DEFORMTARGETP;
  255.    this.PREPARE=mR3CONSTRUCTORM_PREPARE;
  256.    this.RELEASE=mR3CONSTRUCTORM_RELEASE;
  257.    this.ENUMTARGETPOI=mR3CONSTRUCTORM_ENUMTARGETPOI;
  258.    this.ENUMTARGETOBJ=mR3CONSTRUCTORM_ENUMTARGETOBJ;
  259.    this.NEWCHOR=mR3CONSTRUCTORM_NEWCHOR;
  260.    this.DELCHOR=mR3CONSTRUCTORM_DELCHOR;
  261.    this.ENUMTARGETPOI=mR3CONSTRUCTORM_ENUMTARGETPOI;
  262.    this.BIND=mR3CONSTRUCTORM_BIND;
  263.    this.BINDSIBLINGS=mR3CONSTRUCTORM_BINDSIBLINGS;
  264.    this.UNBINDSIBLING=mR3CONSTRUCTORM_UNBINDSIBLING;
  265.    this.BEGIN=mR3CONSTRUCTORM_BEGIN;
  266.    this.END=mR3CONSTRUCTORM_END;
  267.    this.BINDOBJ=mR3CONSTRUCTORM_BINDOBJ;
  268.    this.UNBINDOBJ=mR3CONSTRUCTORM_UNBINDOBJ;
  269.  
  270.    // Attributes
  271.    this.GetEnabled=GetR3CONSTRUCTORA_Enabled;
  272.    this.SetEnabled=SetR3CONSTRUCTORA_Enabled;
  273.    this.GetTarget=GetR3CONSTRUCTORA_Target;
  274.    this.SetTarget=SetR3CONSTRUCTORA_Target;
  275. }
  276.  
  277. r3Constructor.prototype=new r3Level;
  278. // r3constructor.h_H