Face3.rst 1.9 KB

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