
#################
A3DTess3DWireData
#################

.. c:struct:: A3DTess3DWireData

   3D wire data structure 
   
   
      2.0
   
   
   
      The :c:type:`~A3DTess3DWire` entity includes data stored in the :c:struct:`~A3DTessBaseData` structure.
   
   
   
   The :c:member:`A3DTessBaseData::m_pdCoords <A3DTessBaseData.m_pdCoords>` member represents point coordinates, which are interpreted in groups of three (X, Y, Z) to represent 3D vectors. :c:struct:`~A3DTess3DWireData` enables you to organize these coordinates as wires. The :c:struct:`~A3DTess3DWireData` structure uses the :c:member:`A3DTessBaseData::m_pdCoords <A3DTessBaseData.m_pdCoords>` array to retrieve the point coordinates. The :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` member contains indexes referencing the array of points in :c:member:`A3DTessBaseData::m_pdCoords <A3DTessBaseData.m_pdCoords>`\ . The index for each point is a multiple of 3 and refers to the first coordinate in the 3D point. As an example, for a single 4-point wire the :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` array would contain the following elements, with the first element representing the number of points in the wire and subsequent elements representing point indexes in :c:member:`A3DTessBaseData::m_pdCoords <A3DTessBaseData.m_pdCoords>` : {number of indexes, indexes of the wire edge} = {4, 0, 3, 6, 9}. The :c:member:`m_uiSizesWiresSize <A3DTess3DWireData.m_uiSizesWiresSize>` member represents the exact number of elements in the :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` array. Our single 4-point wire contains 5 elements {4, 0, 3, 6, 9}, so :c:member:`m_uiSizesWiresSize <A3DTess3DWireData.m_uiSizesWiresSize>` would be set to 5. If :c:member:`m_uiSizesWiresSize <A3DTess3DWireData.m_uiSizesWiresSize>` is set to zero, the tessellation is given as a single wire edge with the array of point indexes contained in :c:member:`A3DTessBaseData::m_pdCoords <A3DTessBaseData.m_pdCoords>`\ . If :c:member:`m_uiSizesWiresSize <A3DTess3DWireData.m_uiSizesWiresSize>` contains multiple wires, then the array referenced by :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` describes the edges as follows:
   
   
   
   
   If :c:member:`m_uiSizesWiresSize <A3DTess3DWireData.m_uiSizesWiresSize>` is non-zero, :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` can include the flags described in :ref:`Flags for Specifying Wire Characteristics <group__a3d__tess3dwireflags>` as follows: [number of indexes \| flag, indexes 1, indexes 2, ...] 
   
   :c:member:`m_bIsRGBA <A3DTess3DWireData.m_bIsRGBA>` indicates the color format used is RGBA. A value of true indicates the use of RGBA, while a value of false indicates the use of RGB.
   
   :c:member:`m_bIsSegmentColor <A3DTess3DWireData.m_bIsSegmentColor>` : A value of true indicates the colors are for the entire segment.
   
   :c:member:`m_pucRGBAVertices <A3DTess3DWireData.m_pucRGBAVertices>` specifies the color channels for each vertex / segment.
   
   :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` specifies the size of the :c:member:`m_pucRGBAVertices <A3DTess3DWireData.m_pucRGBAVertices>`\ . When the colors are for points (:c:member:`m_bIsSegmentColor <A3DTess3DWireData.m_bIsSegmentColor>` = false), the number of colors needed must be equal to the number of points.
   
   When the colors are for segments (:c:member:`m_bIsSegmentColor <A3DTess3DWireData.m_bIsSegmentColor>` = true), the number of colors needed must be equal to the number of segments. So if a wire has 3 points, it will need 2 colors. If this 3-point wire is closed or continuous with a previous wire, it will need 3 colors.
   
   The number of colors needed can be calculated:
   
   
   ::
   
      A3Duns32iNumberColorNeeded=0;
      
      if(sTess3DWireData.m_bIsSegmentColor&&!bIsWireClosed&&!bIsWireContinuous)
      {
      iNumberOfColorsNeeded=sData->m_uiSize-1;
      }
      else
      {
      iNumberOfColorsNeeded=sData->m_uiSize;
      }
   
    The member :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` is 3 times the number of colors needed for RGB, 4 times the number of colors needed for RGBA. 
   
   
   ::
   
      sTess3DWireData.m_uiRGBAVerticesSize=(sTess3DWireData.m_bIsRGBA?4:3)*iNumberOfColorsNeeded;
   
   Example: Consider the following example of two wires: one defined by 3 points, and another wire defined by 4 points.
   
   
   
    <style>.WireList {padding-bottom:7px;}</style>  
   
   
   - :c:member:`m_uiSizesWiresSize <A3DTess3DWireData.m_uiSizesWiresSize>` = 9 = (1+3+1+4). There are two wires, one with 3 points and another wire of 4 points, each with a count element directly preceding the indexes, so 9 elements will be needed in the :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` array.  
   - :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` = [3, index of a, index of b, index of c, 4, index of w, index of x, index of y, index of z]  
   - If the last point of the first wire is linked to the first point of the second wire, the stored values are as follows:  
   - :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` = [3, index of a, index of b, index of c, 4 \| :c:macro:`~kA3DTess3DWireDataIsContinuous`\ , index of w, index of x, index of y, index of z]  
   - If the second wire is closed, the stored values are as follows:
      :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>` = [3, index of a, index of b, index of c, 4 \| :c:macro:`~kA3DTess3DWireDataIsClosing`\ , index of w, index of x, index of y, index of z]  
   
   - :c:member:`m_bIsRGBA <A3DTess3DWireData.m_bIsRGBA>` = false, 3 channels are needed for 7 points. :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` = 7 \* 3 = 21  
   - :c:member:`m_bIsRGBA <A3DTess3DWireData.m_bIsRGBA>` = true, 4 channels are needed for 7 points. :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` = 7 \* 4 = 28  
   
   - If :c:member:`m_bIsSegmentColor <A3DTess3DWireData.m_bIsSegmentColor>` = false, colors are given for points. 
   
   - If no wires are closed or continuous, and there are only 5 segments, then for RGB :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` = 5 \* 3 = 15. For RGBA, :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` = 5 \* 4 = 20  
   - If a wire is closed or continuous, there are 6 segments, so for RGB :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` = 6 \* 3 = 18. For RGBA :c:member:`m_uiRGBAVerticesSize <A3DTess3DWireData.m_uiRGBAVerticesSize>` = 6 \* 4 = 24  
   
   - If :c:member:`m_bIsSegmentColor <A3DTess3DWireData.m_bIsSegmentColor>` = true, colors are given for the entire segment. 
   
   
      Implicit points coming from :ref:`Flags for Specifying Wire Characteristics <group__a3d__tess3dwireflags>` must also bear a color. 
   
   
   
      :c:member:`A3DTessBaseData::m_uiCoordSize <A3DTessBaseData.m_uiCoordSize>` represents size of array :c:member:`A3DTessBaseData::m_pdCoords <A3DTessBaseData.m_pdCoords>` and not a number of 3D points. 
   
   
   
   Index
   =====
   
   .. rubric:: Variables
   
   
   .. rst-class:: api-xref-list
   
   
   * :c:member:`~A3DTess3DWireData.m_uiSizesWiresSize`
   * :c:member:`~A3DTess3DWireData.m_puiSizesWires`
   * :c:member:`~A3DTess3DWireData.m_bIsRGBA`
   * :c:member:`~A3DTess3DWireData.m_bIsSegmentColor`
   * :c:member:`~A3DTess3DWireData.m_uiRGBAVerticesSize`
   * :c:member:`~A3DTess3DWireData.m_pucRGBAVertices`
   
   



.. rst-class:: kind-group kind-variable

.. rubric:: Variables
   :class: kind-group-title


.. c:member:: A3DUns32 A3DTess3DWireData.m_uiSizesWiresSize

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns32`
      
      The size of :c:member:`m_puiSizesWires <A3DTess3DWireData.m_puiSizesWires>`\ . 
      



.. c:member:: A3DUns32* A3DTess3DWireData.m_puiSizesWires

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns32`\ *
      
      See explanations in **Detailed** **Description**\ . 
      



.. c:member:: A3DBool A3DTess3DWireData.m_bIsRGBA

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DBool`
      
      See explanations in **Detailed** **Description**\ . 
      



.. c:member:: A3DBool A3DTess3DWireData.m_bIsSegmentColor

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DBool`
      
      See explanations in **Detailed** **Description**\ . 
      



.. c:member:: A3DUns32 A3DTess3DWireData.m_uiRGBAVerticesSize

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns32`
      
      The size of :c:member:`m_pucRGBAVertices <A3DTess3DWireData.m_pucRGBAVertices>`\ . 
      



.. c:member:: A3DUns8* A3DTess3DWireData.m_pucRGBAVertices

      .. rst-class:: sig-pretty-signature
      
         | :c:type:`~A3DUns8`\ *
      
      See explanations above. 
      




