topical media & game development

talk show tell print

mobile-query-three-plugins-cannonjs-vendor-cannon.js-src-world-ContactPoint.js / js



  
@class CANNON.ContactPoint @brief A contact point between two bodies. @description Should be generated by the ContactGenerator.
parameter: CANNON.Body bi
parameter: CANNON.Body bj
parameter: CANNON.Vec3 ri Optional. The vector from the center of mass of bi to the contact.
parameter: CANNON.Vec3 rj Optional. The vector from the center of mass of bj to the contact.
parameter: CANNON.Vec3 ni Optional. Contact normal vector, pointing out of body bi.

  
  CANNON.ContactPoint = function(bi,bj,ri,rj,ni){    
      
@property CANNON.Vec3 ri @memberof CANNON.ContactPoint

  
      this.ri = new CANNON.Vec3();
  
      
@property CANNON.Vec3 rj @memberof CANNON.ContactPoint

  
      this.rj = new CANNON.Vec3();
  
      
@property CANNON.Vec3 ni @memberof CANNON.ContactPoint

  
      this.ni = new CANNON.Vec3();
  
      // Copy over data if arguments were passed
      if(ri) ri.copy(this.ri);
      if(rj) rj.copy(this.rj);
      if(ni) ni.copy(this.ni);
  
      
@property CANNON.Body bi @memberof CANNON.ContactPoint

  
      this.bi = bi;
  
      
@property CANNON.Body bj @memberof CANNON.ContactPoint

  
      this.bj = bj;
  };


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.