Please enable JavaScript to view this site.

Function to create the MOT. The memory area for managing the set of points is created.

Syntax

i32 mot_create (i32 nEl, i32 nInt, i32 sizeOfOther, i32 flag)

nEl

Size in number of points of the MOT (>=1)

nInt

Number of units to be interpolated (ordered) for each point (>= 1)

sizeOfOther

Size in bytes of auxiliary information associated with the point (>=0)

flag

Management flag:

Bit

Hexadecimal value

Meaning

0

0x00000001

If TRUE, allows insertion of points with any abscissa instead of increasing abscissa (see mot_append())

1

0x00000002

If TRUE, the additional data returned by mv_mot_exec() is referenced to the end point instead of the starting point of the interpolation segment

4

0x00000010

If TRUE, deletes points after execution (point (n-1) is deleted when execution passes point n)

Interpolation type value code (Bit 16-:-19, 0x000F00xx):

16

0x000100xx

Linear interpolation

17

0x000200xx

Cubic interpolation with automatic calculation of parameters

16-17

0x000300xx

Cubic interpolation calculated by specifying the value of the first derivative at the point (the velocity, if interpolating positions)

18

0x000400xx

Pentic (fifth-order) interpolation with automatic calculation of parameters

16-18

0x000500xx

Pentic interpolation calculated by specifying the values of the first and second derivatives at the point (the velocity and acceleration, if it is interpolation of positions)

16-17-18-19

0x000F00xx

Mixed interpolation (different for each segment).

The type is specified in the other structure (see mot_append()). The first field of the other structure used in mot_append() must necessarily be of type i32 and contain the type of interpolation: 1=linear, 2=automatic cubic, 4=automatic pent

Result

Returns:

Value

Meaning

> 0

OK operation.

The value represents the code of the MOT

-1

Illegal nEl value

-2

Value nInt illegal

-3

Excessive nEl value, insufficient memory

-4

Internal error

-8

Selected mixed interpolation, but other structure does not exist or has size < sizeOfOther

-9

Unknown interpolation code

Validity

Rule, Task

Note


NOTE: Each memory zone created with mot_create() must be destroyed with a corresponding mot_delete(); next calls to mot_create() create different memory zones.

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC