Face4.rst 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. Face4 - Quad face
  2. ------------------------
  3. .. ...............................................................................
  4. .. rubric:: Constructor
  5. .. ...............................................................................
  6. .. class:: Face4( a, b, c, d, normal, color, materialIndex )
  7. Quad face
  8. (indices start from zero)
  9. :param integer a: vertex index
  10. :param integer b: vertex index
  11. :param integer c: vertex index
  12. :param integer d: vertex index
  13. :param varying normal: face normal or array of vertex normals
  14. :param varying color: face color or array of vertex colors
  15. :param integer materialIndex: material index
  16. .. ...............................................................................
  17. .. rubric:: Attributes
  18. .. ...............................................................................
  19. .. attribute:: Face4.a
  20. Vertex A index
  21. .. attribute:: Face4.b
  22. Vertex B index
  23. .. attribute:: Face4.c
  24. Vertex C index
  25. .. attribute:: Face4.d
  26. Vertex D index
  27. .. attribute:: Face4.normal
  28. Face normal
  29. :class:`Vector3` - default ``(0,0,0)``
  30. .. attribute:: Face4.color
  31. Face color
  32. :class:`Color` - default ``white``
  33. .. attribute:: Face4.centroid
  34. :class:`Vector3` - default ``(0,0,0)``
  35. .. attribute:: Face4.vertexNormals
  36. Array of 4 vertex normals
  37. default ``[]``
  38. .. attribute:: Face4.vertexColors
  39. Array of 4 vertex colors
  40. default ``[]``
  41. .. attribute:: Face4.vertexTangents
  42. Array of 4 vertex tangents
  43. default ``[]``
  44. .. attribute:: Face4.materialIndex
  45. Material index (points to :attr:`Geometry.materials` array)
  46. default ``0``
  47. .. ...............................................................................
  48. .. rubric:: Example
  49. .. ...............................................................................
  50. ::
  51. var face = new THREE.Face4( 0, 1, 2, 3, new THREE.Vector3( 0, 1, 0 ), new THREE.Color( 0xffaa00 ), 0 );