C3D.put_3d_point |
nStatus = C3D.put_3d_point( Fid AS HANDLE, nFrameNo AS INTEGER, nPointNo AS INTEGER, nItem AS INTEGER, value AS VARIANT ) AS INTEGER
nStatus = C3D.put_3d_point( Fid AS HANDLE, nFrameNo AS INTEGER, nPointNo AS INTEGER, valArr AS ARRAY|REFERENCE ) AS INTEGER
First syntax puts the 3D point value specified by nItem to the file. Defined Constants for nItem. Note; You can only use one at a time with this function
CONST C3D_ITEM_X = 0x00000001 ' Pos X as REAL CONST C3D_ITEM_Y = 0x00000002 ' Pos Y as REAL CONST C3D_ITEM_Z = 0x00000004 ' Pos Z as REAL CONST C3D_ITEM_RESID = 0x00000008 ' Residuals as REAL CONST C3D_ITEM_MASK = 0x00000010 ' Camera Mask as an INTEGER
The second syntax will use an array of REAL and pass the reference as the argument. The length of the array will determine what is passed. The array should be declared as one of the following
DIM outArr( 1 ) AS REAL ' Contains Pos X + DIM outArr( 2 ) AS REAL ' Pos Y + DIM outArr( 3 ) AS REAL ' Pos Z + DIM outArr( 4 ) AS REAL ' Residual + DIM outArr( 5 ) AS REAL ' Camera Mask as INTEGER coded as REAL
To set a 3D point to invalid, set the residual to -1 (C3D_INVALID_RESID) or any of the 3D values to 3.402823466e38 (C3D_INVALID_VALUE).
Example:
' 0 = All, 1 = X, 2 = Y, 3 = Z, 4 = Residual, 5 = Mask ' All => REF to REAL( 5 ), 0=X, 1=Y, 2=Z, 3=Resid, 4=CamMask
C3D.PUT_3D_POINT( fid, i, 1, C3D_item_x, i ) C3D.PUT_3D_POINT( fid, i, 1, C3D_item_y, i + 1 ) C3D.PUT_3D_POINT( fid, i, 1, C3D_item_z, i + 2 ) C3D.PUT_3D_POINT( fid, i, 1, C3D_item_resid, i / 10 ) C3D.PUT_3D_POINT( fid, i, 1, C3D_item_resid, 0 ) C3D.PUT_3D_POINT( fid, i, 1, C3D_item_mask, ( i MOD 7 ) + 1 )
DIM p(5) AS REAL
p(0) = i p(1) = i + 1 p(2) = i + 2 p(3) = i / 10 p(4) = ( i MOD 7 ) + 1
C3D.PUT_3D_POINT( fid, i, 1, C3D_item_all, REF( p ) )
|