MAL.IsInvalid

Previous  Next

 

result = MAL.IsInvalid( BYVAL rVal1 AS REAL,

                       [BYVAL rVal2 AS REAL=NULL],

                       [BYVAL rVal3 AS REAl=NULL],

                       [BYVAL bAny  AS INTEGER=FALSE] ) AS INTEGER

 

result = MAL.IsInvalid( BYREF arr_points   AS ARRAY,

                       [BYVAL nPoint       AS INTEGER=1],

                       [BYVAL nFrameOffset AS INTEGER=0] ) AS INTEGER

 


 

Returns the status of the specified value/coordinates and returns TRUE if any or all are invalid.  The last parameter specifies if the condition is OR (any) or AND (all).  Note;  bPoint always starts at 1 and nFrameOffset is always starting from 0.

 

Example:

 

' Set Invalid Value to 0

MAL.InvalidValue( 0 )

 

DIM pos( nFrames, nPoints, 3 ) AS REAL

 

' Get the position data

C3DFile.GetPoints( nFile, pos )

 

' Check if any invalids

FOR frame = 1 TO nFrames

  FOR point = 1 TO nPoints

     IF  MAL.IsInvalid( pos, point, frame - 1 ) THEN

 

        ' An invalid Marker Position was found.  Can't continue :-(

        PRINT "Invalid Marker Value Detected.  Operation Aborted!",

        STOP 666

 

     ENDIF

  ENDFOR

ENDFOR