MAL.ProjectPoint2D

Previous  Next

 

ref_point_out = MAL.ProjectPoint2D( BYREF point_out           AS ARRAY,

                                    BYREF point1              AS ARRAY,

                                    BYREF point2              AS ARRAY,

                                    BYVAL rOffsetX            AS REAL,

[!]                                 BYVAL rOffsetY|rRotation  AS REAL,

                                   [BYVAL bRotation           AS INTEGER=FALSE],

                                   [BYVAL nPoint              AS INTEGER=1],

                                   [BYVAL nFrameOffset        AS INTEGER=0] ) AS REFERENCE

 

ref_point_out = MAL.ProjectPoint2D( BYREF point_out           AS ARRAY,

                                    BYREF points_in           AS ARRAY,

                                    BYVAL point1              AS INTEGER,

                                    BYVAL point2              AS INTEGER,

                                    BYVAL rOffsetX            AS REAL,

[!]                                 BYVAL rOffsetY|rRotation  AS REAL,

                                   [BYVAL bRotation           AS INTEGER=FALSE],

                                   [BYVAL nFrameOffset        AS INTEGER=0] ) AS REFERENCE

 


 

Calculates a projected point from 2 known points and the X/Y offsets from point 1 using point1 and 2 to define the positive X axis.  The X/Y offsets can also be specified as the distance and a rotation angle if bRotation is set to TRUE

 

Note [!]

This will be interpreted as Rotation Angle or Y Coordinate depending on the bRotation parameter.

 

 

Example:

 

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

' Testing ProjPoint2D

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

'

DIM Projected( nFrames, 1, 3 ) AS REAL

 

' Use Offset + Rotation Angle with Syntax 1

MAL.ProjectPoint2D( Projected,_

                   V3D( Position, 1 ),_

                   V3D( Position, 2 ),_

                   100.0, 90.0, TRUE )

Projected(*,*,3) = MAL.InvalidValue()

CALL PrintArray( REF( Projected ) )

 

' Use X/Y Offset with Syntax 2

MAL.ProjectPoint2D( Projected, Position, 1, 2, 0.0, 100.0 )

Projected(*,*,3) = MAL.InvalidValue()

CALL PrintArray( REF( Projected ) )