A3DGlobalInsertGraphLinePattern

A3DStatus A3DGlobalInsertGraphLinePattern(const A3DGraphLinePatternData *pData, A3DUns32 *puiIndexLinePattern)
A3DStatus A3DGlobalInsertGraphLinePattern(const A3DGraphLinePatternData* pData, A3DUns32* puiIndexLinePattern)

Creates a line pattern, returning its index.

2.0

When given an A3DGraphLinePatternData, the function searches for an already existing descriptor of the same value and returns its index. If the descriptor does not exist, it is created and a new index is returned. In case of failure *puiIndexRgbColor is unchanged.

A3DDouble[]aLengths={1.0,3.0};
A3DGraphLinePatternDatadescriptor;
A3D_INITIALIZE_DATA(A3DGraphLinePatternData,descriptor);
descriptor.m_uiNumberOfLengths=2;
descriptor.m_pdLengths=aLengths;
descriptor.m_dPhase=0.0;
descriptor.m_bRealLength=A3D_TRUE;

A3DUns32idx_0=A3D_DEFAULT_LINEPATTERN_INDEX;

A3DStatusresult=A3DGlobalInsertGraphLinePattern(&descriptor,&idx_0);
assert(result==A3D_SUCCESS);

Secondinsertionwiththesamedata,expectindextobethesame.
A3DUns32idx_1=A3D_DEFAULT_LINEPATTERN_INDEX;
result=A3DGlobalInsertGraphLinePattern(&descriptor,&idx_1);
assert(result==A3D_SUCCESS);
assert(idx_0==idx_1);

Parameters

pData: The line pattern descriptor to insert.

puiIndexLinePattern: The resulting index for the line pattern.

Returns

A3D_SUCCESS or an error code.