File: aiTypes.pas

package info (click to toggle)
assimp 3.2~dfsg-3~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 12,348 kB
  • sloc: cpp: 108,331; ansic: 4,704; java: 2,036; python: 1,941; pascal: 341; xml: 146; sh: 134; objc: 122; makefile: 47
file content (53 lines) | stat: -rw-r--r-- 1,006 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
unit aiTypes;

interface

//added for Delphi interface
type
   TCardinalArray = array [0..0] of Cardinal;
   PCardinalArray = ^TCardinalArray;

   TSingleArray = array[0..0] of Single;
   PSingleArray = ^TSingleArray; 

type aiString = packed record
   length: Cardinal;
   data: array [0..1023] of char;
end;
type PaiString = ^aiString;

type aiReturn = (
	aiReturn_SUCCESS = $0,
	aiReturn_FAILURE = -$1,
	aiReturn_OUTOFMEMORY = -$3,
	_AI_ENFORCE_ENUM_SIZE = $7fffffff
);

const AI_SUCCESS = aiReturn_SUCCESS;
const AI_FAILURE = aiReturn_FAILURE;
const AI_OUTOFMEMORY = aiReturn_OUTOFMEMORY;




function aiStringToDelphiString( a: aiString): AnsiString;


implementation

function aiStringToDelphiString( a: aiString): AnsiString;
var
   i: integer;
begin
   result := '';
   if a.length > 0 then
   begin
      SetLength( result, a.length);
      for i := 1 to a.length do
      begin
         result[i] := a.data[i-1];
      end;
   end;
end;

end.