C3DFile.IsFile2D |
nDim = C3DFile.IsFile2D( BYVAL nFile AS INTEGER ) AS INTEGER
Returns TRUE if file is 2D.
Example:
' Open the Test File hFile = C3DFile.Open( cFileName )
IF NOT hFile > 0 THEN PRINT "Error Opening File ";cFileName, STOP ENDIF
' Get the no of points and frames nFrames = C3DFile.GetNoOfFrames( hFile ) nPoints = C3DFile.GetNoOfPoints( hFile ) nDim = 3 - C3DFile.IsFile2D( hFile )
' Check if 2D or 3D and then Dimension the array DIM Position( nFrames, nPoints, nDim ) AS REAL
' Get the Point Coordinates from C3D file IF C3DFile.GetPoints( hFile, Position ) <> nFrames THEN C3DFile.Close( hFile ) PRINT "Error Reading ";nPoints;" from file ";cFileName, STOP ENDIF
' Set the Frame Rate to use in the MaxMAL Library MAL.FrameRate( C3DFile.GetFrameRate( hFile ) )
' Display the Position Coordinates CALL PrintArray( REF( Position ) ) |