Face3.rst 1.4 KB

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