Add initial prototype.
This commit is contained in:
16
3-mid/physics/implement/c_math/alire.toml
Normal file
16
3-mid/physics/implement/c_math/alire.toml
Normal file
@@ -0,0 +1,16 @@
|
||||
name = "lace_c_math"
|
||||
description = "A binding to the C math code used by box2d & bullet bindings."
|
||||
version = "0.1.1"
|
||||
|
||||
authors = ["Rod Kay"]
|
||||
maintainers = ["Rod Kay <rodakay5@gmail.com>"]
|
||||
maintainers-logins = ["charlie5"]
|
||||
|
||||
licenses = "ISC"
|
||||
website = "https://github.com/charlie5/lace-alire"
|
||||
|
||||
project-files = ["library/c_math_thin.gpr"]
|
||||
|
||||
[[depends-on]]
|
||||
lace_math = "~0.1"
|
||||
lace_swig = "~0.1"
|
||||
33
3-mid/physics/implement/c_math/generate/builder
Executable file
33
3-mid/physics/implement/c_math/generate/builder
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
echo
|
||||
echo Removing prior build.
|
||||
echo
|
||||
|
||||
rm *.ads
|
||||
rm *.adb
|
||||
rm *.cxx
|
||||
rm *.pp
|
||||
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
|
||||
echo
|
||||
echo Generating the binding.
|
||||
echo
|
||||
|
||||
swig_gnat -gnat -c++ -cpperraswarn c_math_c.i
|
||||
rm portable_new_line_Token.tmp
|
||||
|
||||
|
||||
|
||||
echo
|
||||
echo Pretty printing.
|
||||
echo
|
||||
|
||||
gnatpp -rnb -I/usr/local/include *.ads -cargs -gnat05
|
||||
indent -sob -di16 *.cxx
|
||||
|
||||
31
3-mid/physics/implement/c_math/generate/c_math_c.i
Normal file
31
3-mid/physics/implement/c_math/generate/c_math_c.i
Normal file
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// SWIG interface defintion for 'c_Math' interface library binding.
|
||||
//
|
||||
|
||||
%module c_math_c
|
||||
|
||||
%{
|
||||
extern "C"
|
||||
{
|
||||
#include "../c/c_math.h"
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
%include "../source/c/c_math.h"
|
||||
|
||||
|
||||
|
||||
// Tailoring
|
||||
//
|
||||
|
||||
%inline
|
||||
%{
|
||||
|
||||
%}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
12
3-mid/physics/implement/c_math/generate/export_source
Executable file
12
3-mid/physics/implement/c_math/generate/export_source
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
|
||||
rm ../source/thin/*.ads
|
||||
rm ../source/thin/*.cxx
|
||||
|
||||
mv ./*.ads ../source/thin
|
||||
mv ./*.cxx ../source/thin
|
||||
|
||||
|
||||
22
3-mid/physics/implement/c_math/library/c_math_thin.gpr
Normal file
22
3-mid/physics/implement/c_math/library/c_math_thin.gpr
Normal file
@@ -0,0 +1,22 @@
|
||||
with
|
||||
"c_math_thin_cxx",
|
||||
"swig",
|
||||
"math",
|
||||
"lace_shared";
|
||||
|
||||
--library
|
||||
project c_Math_thin
|
||||
is
|
||||
for Languages use ("Ada");
|
||||
for Source_Dirs use ("../source", "../source/thin");
|
||||
for Object_Dir use "build";
|
||||
for Library_Dir use "lib";
|
||||
for Library_Ali_Dir use "objects";
|
||||
-- for Library_Name use "c_Math_thin";
|
||||
|
||||
package Ide renames Lace_shared.Ide;
|
||||
package Builder renames Lace_shared.Builder;
|
||||
package Compiler renames Lace_shared.Compiler;
|
||||
package Binder renames Lace_shared.Binder;
|
||||
|
||||
end c_Math_thin;
|
||||
29
3-mid/physics/implement/c_math/library/c_math_thin_c.gpr
Normal file
29
3-mid/physics/implement/c_math/library/c_math_thin_c.gpr
Normal file
@@ -0,0 +1,29 @@
|
||||
with
|
||||
"lace_shared";
|
||||
|
||||
--library
|
||||
project c_Math_Thin_C
|
||||
is
|
||||
for Languages use ("c++");
|
||||
for Source_Dirs use ("../source/c");
|
||||
for Object_Dir use "build";
|
||||
-- for Library_Dir use "lib";
|
||||
-- for Library_Ali_Dir use "objects";
|
||||
-- for Library_Name use "c_Math_Thin_C";
|
||||
|
||||
package Naming is
|
||||
for Spec_Suffix ("c++") use ".h";
|
||||
for Body_Suffix ("c++") use ".cpp";
|
||||
end Naming;
|
||||
|
||||
package Compiler is
|
||||
for Default_Switches ("c++") use ("-g",
|
||||
"-Wno-return-type-c-linkage",
|
||||
"-I../source/c");
|
||||
end Compiler;
|
||||
|
||||
package Ide renames Lace_shared.Ide;
|
||||
package Builder renames Lace_shared.Builder;
|
||||
package Binder renames Lace_shared.Binder;
|
||||
|
||||
end c_Math_Thin_C;
|
||||
31
3-mid/physics/implement/c_math/library/c_math_thin_cxx.gpr
Normal file
31
3-mid/physics/implement/c_math/library/c_math_thin_cxx.gpr
Normal file
@@ -0,0 +1,31 @@
|
||||
with
|
||||
"c_math_thin_c",
|
||||
"lace_shared";
|
||||
|
||||
--library
|
||||
project c_Math_Thin_Cxx
|
||||
is
|
||||
for Languages use ("c++");
|
||||
for Source_Dirs use ("../source/thin");
|
||||
for Object_Dir use "build";
|
||||
for Library_Dir use "lib";
|
||||
for Library_Ali_Dir use "objects";
|
||||
-- for Library_Name use "c_Math_Thin_Cxx";
|
||||
|
||||
package Naming is
|
||||
for Spec_Suffix ("c++") use ".h";
|
||||
for Body_Suffix ("c++") use ".cxx";
|
||||
end Naming;
|
||||
|
||||
package Compiler is
|
||||
for Default_Switches ("c++") use ("-g",
|
||||
"-fPIC",
|
||||
"-Wno-return-type-c-linkage",
|
||||
"-I../source/c");
|
||||
end Compiler;
|
||||
|
||||
package Ide renames Lace_shared.Ide;
|
||||
package Builder renames Lace_shared.Builder;
|
||||
package Binder renames Lace_shared.Binder;
|
||||
|
||||
end c_Math_Thin_Cxx;
|
||||
26
3-mid/physics/implement/c_math/source/c/c_math.cpp
Normal file
26
3-mid/physics/implement/c_math/source/c/c_math.cpp
Normal file
@@ -0,0 +1,26 @@
|
||||
#include "c_math.h"
|
||||
|
||||
|
||||
Matrix_3x3::
|
||||
Matrix_3x3 (Real* First) : m00 (First[0]), m01 (First[1]), m02 (First[2]),
|
||||
m10 (First[3]), m11 (First[4]), m12 (First[5]),
|
||||
m20 (First[6]), m21 (First[7]), m22 (First[8])
|
||||
{};
|
||||
|
||||
|
||||
Matrix_3x3::
|
||||
Matrix_3x3 (Real m00, Real m01, Real m02,
|
||||
Real m10, Real m11, Real m12,
|
||||
Real m20, Real m21, Real m22) : m00 (m00), m01 (m01), m02 (m02),
|
||||
m10 (m10), m11 (m11), m12 (m12),
|
||||
m20 (m20), m21 (m21), m22 (m22)
|
||||
{};
|
||||
|
||||
|
||||
Matrix_4x4::
|
||||
Matrix_4x4 (Real* First) : m00 (First[ 0]), m01 (First[ 1]), m02 (First[ 2]), m03 (First[ 3]),
|
||||
m10 (First[ 4]), m11 (First[ 5]), m12 (First[ 6]), m13 (First[ 7]),
|
||||
m20 (First[ 8]), m21 (First[ 9]), m22 (First[10]), m23 (First[11]),
|
||||
m30 (First[12]), m31 (First[13]), m32 (First[14]), m33 (First[15])
|
||||
{};
|
||||
|
||||
78
3-mid/physics/implement/c_math/source/c/c_math.h
Normal file
78
3-mid/physics/implement/c_math/source/c/c_math.h
Normal file
@@ -0,0 +1,78 @@
|
||||
#ifndef C_MATH_H
|
||||
#define C_MATH_H
|
||||
|
||||
|
||||
//
|
||||
/// Provides a simple C++ interface to math structures used by the simple Box2D and Bullet3D C interfaces.
|
||||
//
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
typedef float Real;
|
||||
|
||||
|
||||
|
||||
struct Vector_2
|
||||
{
|
||||
Vector_2 () {};
|
||||
Vector_2 (Real x, Real y) : x (x), y (y) {};
|
||||
|
||||
|
||||
Real x, y;
|
||||
};
|
||||
|
||||
|
||||
struct Vector_3
|
||||
{
|
||||
Vector_3 () {};
|
||||
Vector_3 (Real x, Real y, Real z) : x (x), y (y), z (z) {};
|
||||
|
||||
|
||||
Real x, y, z;
|
||||
};
|
||||
|
||||
|
||||
typedef int Index;
|
||||
|
||||
struct Triangle
|
||||
{
|
||||
Triangle () {};
|
||||
Triangle (Real a, Real b, Real c) : a (a), b (b), c (c) {};
|
||||
|
||||
|
||||
Index a, b, c;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
struct Matrix_3x3
|
||||
{
|
||||
Matrix_3x3 () {};
|
||||
Matrix_3x3 (Real* First);
|
||||
Matrix_3x3 (Real m00, Real m01, Real m02,
|
||||
Real m10, Real m11, Real m12,
|
||||
Real m20, Real m21, Real m22);
|
||||
|
||||
Real m00, m01, m02,
|
||||
m10, m11, m12,
|
||||
m20, m21, m22;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct Matrix_4x4
|
||||
{
|
||||
Matrix_4x4 () {};
|
||||
Matrix_4x4 (Real* First);
|
||||
|
||||
Real m00, m01, m02, m03,
|
||||
m10, m11, m12, m13,
|
||||
m20, m21, m22, m23,
|
||||
m30, m31, m32, m33;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
151
3-mid/physics/implement/c_math/source/c_math_c-conversion.adb
Normal file
151
3-mid/physics/implement/c_math/source/c_math_c-conversion.adb
Normal file
@@ -0,0 +1,151 @@
|
||||
package body c_math_c.Conversion
|
||||
is
|
||||
|
||||
function "+" (Self : in Integer) return C.int
|
||||
is
|
||||
begin
|
||||
return C.int (Self);
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in C.int) return Integer
|
||||
is
|
||||
begin
|
||||
return Integer (Self);
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in math.Real) return c_math_c.Real
|
||||
is
|
||||
begin
|
||||
return c_math_c.Real (Self);
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in c_math_c.Real) return math.Real
|
||||
is
|
||||
begin
|
||||
return math.Real (Self);
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in math.Vector_2) return c_math_c.Vector_2.item
|
||||
is
|
||||
Result : c_math_c.Vector_2.item;
|
||||
begin
|
||||
begin
|
||||
Result.x := c_math_c.Real (Self (1));
|
||||
exception
|
||||
when constraint_Error =>
|
||||
if Self (1) > 0.0
|
||||
then Result.x := c_math_c.Real'Last;
|
||||
else Result.x := c_math_c.Real'First;
|
||||
end if;
|
||||
end;
|
||||
|
||||
begin
|
||||
Result.y := c_math_c.Real (Self (2));
|
||||
exception
|
||||
when constraint_Error =>
|
||||
if Self (2) > 0.0
|
||||
then Result.x := c_math_c.Real'Last;
|
||||
else Result.x := c_math_c.Real'First;
|
||||
end if;
|
||||
end;
|
||||
|
||||
return Result;
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in c_math_c.Vector_2.item) return math.Vector_2
|
||||
is
|
||||
begin
|
||||
return [math.Real (Self.x),
|
||||
math.Real (Self.y)];
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in math.Vector_3) return c_math_c.Vector_3.item
|
||||
is
|
||||
Result : c_math_c.Vector_3.item;
|
||||
begin
|
||||
begin
|
||||
Result.x := c_math_c.Real (Self (1));
|
||||
exception
|
||||
when constraint_Error =>
|
||||
if Self (1) > 0.0
|
||||
then Result.x := c_math_c.Real'Last;
|
||||
else Result.x := c_math_c.Real'First;
|
||||
end if;
|
||||
end;
|
||||
|
||||
begin
|
||||
Result.y := c_math_c.Real (Self (2));
|
||||
exception
|
||||
when constraint_Error =>
|
||||
if Self (2) > 0.0
|
||||
then Result.x := c_math_c.Real'Last;
|
||||
else Result.x := c_math_c.Real'First;
|
||||
end if;
|
||||
end;
|
||||
|
||||
begin
|
||||
Result.z := c_math_c.Real (Self (3));
|
||||
exception
|
||||
when constraint_Error =>
|
||||
if Self (3) > 0.0
|
||||
then Result.x := c_math_c.Real'Last;
|
||||
else Result.x := c_math_c.Real'First;
|
||||
end if;
|
||||
end;
|
||||
|
||||
return Result;
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in c_math_c.Vector_3.item) return math.Vector_3
|
||||
is
|
||||
begin
|
||||
return [math.Real (Self.x), math.Real (Self.y), math.Real (Self.z)];
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in math.Matrix_3x3) return c_math_c.Matrix_3x3.item
|
||||
is
|
||||
begin
|
||||
return (Real (Self (1,1)), Real (Self (1,2)), Real (Self (1,3)),
|
||||
Real (Self (2,1)), Real (Self (2,2)), Real (Self (2,3)),
|
||||
Real (Self (3,1)), Real (Self (3,2)), Real (Self (3,3)));
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in c_math_c.Matrix_3x3.item) return math.Matrix_3x3
|
||||
is
|
||||
begin
|
||||
return [1 => [math.Real (Self.m00), math.Real (Self.m01), math.Real (Self.m02)],
|
||||
2 => [math.Real (Self.m10), math.Real (Self.m11), math.Real (Self.m12)],
|
||||
3 => [math.Real (Self.m20), math.Real (Self.m21), math.Real (Self.m22)]];
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in math .Matrix_4x4 ) return c_math_c.Matrix_4x4.item
|
||||
is
|
||||
begin
|
||||
return (Real (Self (1,1)), Real (Self (1,2)), Real (Self (1,3)), Real (Self (1,4)),
|
||||
Real (Self (2,1)), Real (Self (2,2)), Real (Self (2,3)), Real (Self (2,4)),
|
||||
Real (Self (3,1)), Real (Self (3,2)), Real (Self (3,3)), Real (Self (3,4)),
|
||||
Real (Self (4,1)), Real (Self (4,2)), Real (Self (4,3)), Real (Self (4,4)));
|
||||
end "+";
|
||||
|
||||
|
||||
function "+" (Self : in c_math_c.Matrix_4x4.item) return math.Matrix_4x4
|
||||
is
|
||||
begin
|
||||
return [1 => [math.Real (Self.m00), math.Real (Self.m01), math.Real (Self.m02), math.Real (Self.m03)],
|
||||
2 => [math.Real (Self.m10), math.Real (Self.m11), math.Real (Self.m12), math.Real (Self.m13)],
|
||||
3 => [math.Real (Self.m20), math.Real (Self.m21), math.Real (Self.m22), math.Real (Self.m23)],
|
||||
4 => [math.Real (Self.m30), math.Real (Self.m31), math.Real (Self.m32), math.Real (Self.m33)]];
|
||||
|
||||
end "+";
|
||||
|
||||
end c_math_c.Conversion;
|
||||
@@ -0,0 +1,43 @@
|
||||
with
|
||||
float_Math,
|
||||
c_math_c.Vector_2,
|
||||
c_math_c.Vector_3,
|
||||
c_math_c.Matrix_3x3,
|
||||
c_math_c.Matrix_4x4,
|
||||
Interfaces;
|
||||
|
||||
package c_math_C.Conversion
|
||||
--
|
||||
-- Provide a set of conversion utilities.
|
||||
--
|
||||
is
|
||||
package Math renames float_Math;
|
||||
|
||||
use Interfaces;
|
||||
|
||||
function "+" (Self : in Integer) return C.int;
|
||||
function "+" (Self : in C.int) return Integer;
|
||||
|
||||
function "+" (Self : in math .Real) return c_math_c.Real;
|
||||
function "+" (Self : in c_math_c.Real) return math .Real;
|
||||
|
||||
function "+" (Self : in math .Vector_2) return c_math_c.Vector_2.item;
|
||||
function "+" (Self : in c_math_c.Vector_2.item) return math .Vector_2;
|
||||
|
||||
function "+" (Self : in math .Vector_3) return c_math_c.Vector_3.item;
|
||||
function "+" (Self : in c_math_c.Vector_3.item) return math .Vector_3;
|
||||
|
||||
|
||||
function "+" (Self : in math .Matrix_3x3) return c_math_c.Matrix_3x3.item;
|
||||
function "+" (Self : in c_math_c.Matrix_3x3.item) return math .Matrix_3x3;
|
||||
|
||||
|
||||
function "+" (Self : in math .Matrix_4x4) return c_math_c.Matrix_4x4.item;
|
||||
function "+" (Self : in c_math_c.Matrix_4x4.item) return math .Matrix_4x4;
|
||||
|
||||
|
||||
function to_Math (Self : in c_math_c.Matrix_4x4.item) return math.Matrix_4x4
|
||||
renames "+";
|
||||
|
||||
end c_math_C.Conversion;
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
|
||||
package c_math_c.Binding
|
||||
is
|
||||
|
||||
end c_math_c.Binding;
|
||||
@@ -0,0 +1,103 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with c_math_c.Pointers;
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c.Matrix_3x3 is
|
||||
|
||||
-- Item
|
||||
--
|
||||
|
||||
type Item is record
|
||||
m00 : aliased c_math_c.Real;
|
||||
m01 : aliased c_math_c.Real;
|
||||
m02 : aliased c_math_c.Real;
|
||||
m10 : aliased c_math_c.Real;
|
||||
m11 : aliased c_math_c.Real;
|
||||
m12 : aliased c_math_c.Real;
|
||||
m20 : aliased c_math_c.Real;
|
||||
m21 : aliased c_math_c.Real;
|
||||
m22 : aliased c_math_c.Real;
|
||||
end record;
|
||||
|
||||
-- Items
|
||||
--
|
||||
type Items is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Matrix_3x3.Item;
|
||||
|
||||
-- Pointer
|
||||
--
|
||||
type Pointer is access all c_math_c.Matrix_3x3.Item;
|
||||
|
||||
-- Pointers
|
||||
--
|
||||
type Pointers is
|
||||
array
|
||||
(Interfaces.C.size_t range <>) of aliased c_math_c.Matrix_3x3.Pointer;
|
||||
|
||||
-- Pointer_Pointer
|
||||
--
|
||||
type Pointer_Pointer is access all c_math_c.Matrix_3x3.Pointer;
|
||||
|
||||
function construct return c_math_c.Matrix_3x3.Item;
|
||||
|
||||
function construct
|
||||
(First : in c_math_c.Pointers.Real_Pointer)
|
||||
return c_math_c.Matrix_3x3.Item;
|
||||
|
||||
function construct
|
||||
(m00 : in c_math_c.Real;
|
||||
m01 : in c_math_c.Real;
|
||||
m02 : in c_math_c.Real;
|
||||
m10 : in c_math_c.Real;
|
||||
m11 : in c_math_c.Real;
|
||||
m12 : in c_math_c.Real;
|
||||
m20 : in c_math_c.Real;
|
||||
m21 : in c_math_c.Real;
|
||||
m22 : in c_math_c.Real) return c_math_c.Matrix_3x3.Item;
|
||||
|
||||
private
|
||||
|
||||
function construct_v1 return c_math_c.Matrix_3x3.Item;
|
||||
|
||||
function construct return c_math_c.Matrix_3x3.Item renames construct_v1;
|
||||
|
||||
pragma Import (C, construct_v1, "Ada_new_Matrix_3x3__SWIG_0");
|
||||
|
||||
function construct_v2
|
||||
(First : in c_math_c.Pointers.Real_Pointer)
|
||||
return c_math_c.Matrix_3x3.Item;
|
||||
|
||||
function construct
|
||||
(First : in c_math_c.Pointers.Real_Pointer)
|
||||
return c_math_c.Matrix_3x3.Item renames
|
||||
construct_v2;
|
||||
|
||||
pragma Import (C, construct_v2, "Ada_new_Matrix_3x3__SWIG_1");
|
||||
|
||||
function construct_v3
|
||||
(m00 : in c_math_c.Real;
|
||||
m01 : in c_math_c.Real;
|
||||
m02 : in c_math_c.Real;
|
||||
m10 : in c_math_c.Real;
|
||||
m11 : in c_math_c.Real;
|
||||
m12 : in c_math_c.Real;
|
||||
m20 : in c_math_c.Real;
|
||||
m21 : in c_math_c.Real;
|
||||
m22 : in c_math_c.Real) return c_math_c.Matrix_3x3.Item;
|
||||
|
||||
function construct
|
||||
(m00 : in c_math_c.Real;
|
||||
m01 : in c_math_c.Real;
|
||||
m02 : in c_math_c.Real;
|
||||
m10 : in c_math_c.Real;
|
||||
m11 : in c_math_c.Real;
|
||||
m12 : in c_math_c.Real;
|
||||
m20 : in c_math_c.Real;
|
||||
m21 : in c_math_c.Real;
|
||||
m22 : in c_math_c.Real) return c_math_c.Matrix_3x3.Item renames
|
||||
construct_v3;
|
||||
|
||||
pragma Import (C, construct_v3, "Ada_new_Matrix_3x3__SWIG_2");
|
||||
|
||||
end c_math_c.Matrix_3x3;
|
||||
@@ -0,0 +1,74 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with c_math_c.Pointers;
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c.Matrix_4x4 is
|
||||
|
||||
-- Item
|
||||
--
|
||||
|
||||
type Item is record
|
||||
m00 : aliased c_math_c.Real;
|
||||
m01 : aliased c_math_c.Real;
|
||||
m02 : aliased c_math_c.Real;
|
||||
m03 : aliased c_math_c.Real;
|
||||
m10 : aliased c_math_c.Real;
|
||||
m11 : aliased c_math_c.Real;
|
||||
m12 : aliased c_math_c.Real;
|
||||
m13 : aliased c_math_c.Real;
|
||||
m20 : aliased c_math_c.Real;
|
||||
m21 : aliased c_math_c.Real;
|
||||
m22 : aliased c_math_c.Real;
|
||||
m23 : aliased c_math_c.Real;
|
||||
m30 : aliased c_math_c.Real;
|
||||
m31 : aliased c_math_c.Real;
|
||||
m32 : aliased c_math_c.Real;
|
||||
m33 : aliased c_math_c.Real;
|
||||
end record;
|
||||
|
||||
-- Items
|
||||
--
|
||||
type Items is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Matrix_4x4.Item;
|
||||
|
||||
-- Pointer
|
||||
--
|
||||
type Pointer is access all c_math_c.Matrix_4x4.Item;
|
||||
|
||||
-- Pointers
|
||||
--
|
||||
type Pointers is
|
||||
array
|
||||
(Interfaces.C.size_t range <>) of aliased c_math_c.Matrix_4x4.Pointer;
|
||||
|
||||
-- Pointer_Pointer
|
||||
--
|
||||
type Pointer_Pointer is access all c_math_c.Matrix_4x4.Pointer;
|
||||
|
||||
function construct return c_math_c.Matrix_4x4.Item;
|
||||
|
||||
function construct
|
||||
(First : in c_math_c.Pointers.Real_Pointer)
|
||||
return c_math_c.Matrix_4x4.Item;
|
||||
|
||||
private
|
||||
|
||||
function construct_v1 return c_math_c.Matrix_4x4.Item;
|
||||
|
||||
function construct return c_math_c.Matrix_4x4.Item renames construct_v1;
|
||||
|
||||
pragma Import (C, construct_v1, "Ada_new_Matrix_4x4__SWIG_0");
|
||||
|
||||
function construct_v2
|
||||
(First : in c_math_c.Pointers.Real_Pointer)
|
||||
return c_math_c.Matrix_4x4.Item;
|
||||
|
||||
function construct
|
||||
(First : in c_math_c.Pointers.Real_Pointer)
|
||||
return c_math_c.Matrix_4x4.Item renames
|
||||
construct_v2;
|
||||
|
||||
pragma Import (C, construct_v2, "Ada_new_Matrix_4x4__SWIG_1");
|
||||
|
||||
end c_math_c.Matrix_4x4;
|
||||
@@ -0,0 +1,16 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with c_math_c.Pointers;
|
||||
|
||||
package c_math_c.pointer_Pointers
|
||||
is
|
||||
|
||||
-- Real_Pointer_Pointer
|
||||
--
|
||||
type Real_Pointer_Pointer is access all c_math_c.Pointers.Real_Pointer;
|
||||
|
||||
-- Index_Pointer_Pointer
|
||||
--
|
||||
type Index_Pointer_Pointer is access all c_math_c.Pointers.Index_Pointer;
|
||||
|
||||
end c_math_c.pointer_Pointers;
|
||||
@@ -0,0 +1,29 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c.Pointers is
|
||||
|
||||
-- Real_Pointer
|
||||
--
|
||||
type Real_Pointer is access all c_math_c.Real;
|
||||
|
||||
-- Real_Pointers
|
||||
--
|
||||
type Real_Pointers is
|
||||
array
|
||||
(Interfaces.C
|
||||
.size_t range <>) of aliased c_math_c.Pointers.Real_Pointer;
|
||||
|
||||
-- Index_Pointer
|
||||
--
|
||||
type Index_Pointer is access all c_math_c.Index;
|
||||
|
||||
-- Index_Pointers
|
||||
--
|
||||
type Index_Pointers is
|
||||
array
|
||||
(Interfaces.C
|
||||
.size_t range <>) of aliased c_math_c.Pointers.Index_Pointer;
|
||||
|
||||
end c_math_c.Pointers;
|
||||
@@ -0,0 +1,62 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c.Triangle is
|
||||
|
||||
-- Item
|
||||
--
|
||||
|
||||
type Item is record
|
||||
a : aliased c_math_c.Index;
|
||||
b : aliased c_math_c.Index;
|
||||
c : aliased c_math_c.Index;
|
||||
end record;
|
||||
|
||||
-- Items
|
||||
--
|
||||
type Items is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Triangle.Item;
|
||||
|
||||
-- Pointer
|
||||
--
|
||||
type Pointer is access all c_math_c.Triangle.Item;
|
||||
|
||||
-- Pointers
|
||||
--
|
||||
type Pointers is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Triangle.Pointer;
|
||||
|
||||
-- Pointer_Pointer
|
||||
--
|
||||
type Pointer_Pointer is access all c_math_c.Triangle.Pointer;
|
||||
|
||||
function construct return c_math_c.Triangle.Item;
|
||||
|
||||
function construct
|
||||
(a : in c_math_c.Real;
|
||||
b : in c_math_c.Real;
|
||||
c : in c_math_c.Real) return c_math_c.Triangle.Item;
|
||||
|
||||
private
|
||||
|
||||
function construct_v1 return c_math_c.Triangle.Item;
|
||||
|
||||
function construct return c_math_c.Triangle.Item renames construct_v1;
|
||||
|
||||
pragma Import (C, construct_v1, "Ada_new_Triangle__SWIG_0");
|
||||
|
||||
function construct_v2
|
||||
(a : in c_math_c.Real;
|
||||
b : in c_math_c.Real;
|
||||
c : in c_math_c.Real) return c_math_c.Triangle.Item;
|
||||
|
||||
function construct
|
||||
(a : in c_math_c.Real;
|
||||
b : in c_math_c.Real;
|
||||
c : in c_math_c.Real) return c_math_c.Triangle.Item renames
|
||||
construct_v2;
|
||||
|
||||
pragma Import (C, construct_v2, "Ada_new_Triangle__SWIG_1");
|
||||
|
||||
end c_math_c.Triangle;
|
||||
@@ -0,0 +1,58 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c.Vector_2 is
|
||||
|
||||
-- Item
|
||||
--
|
||||
|
||||
type Item is record
|
||||
x : aliased c_math_c.Real;
|
||||
y : aliased c_math_c.Real;
|
||||
end record;
|
||||
|
||||
-- Items
|
||||
--
|
||||
type Items is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Vector_2.Item;
|
||||
|
||||
-- Pointer
|
||||
--
|
||||
type Pointer is access all c_math_c.Vector_2.Item;
|
||||
|
||||
-- Pointers
|
||||
--
|
||||
type Pointers is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Vector_2.Pointer;
|
||||
|
||||
-- Pointer_Pointer
|
||||
--
|
||||
type Pointer_Pointer is access all c_math_c.Vector_2.Pointer;
|
||||
|
||||
function construct return c_math_c.Vector_2.Item;
|
||||
|
||||
function construct
|
||||
(x : in c_math_c.Real;
|
||||
y : in c_math_c.Real) return c_math_c.Vector_2.Item;
|
||||
|
||||
private
|
||||
|
||||
function construct_v1 return c_math_c.Vector_2.Item;
|
||||
|
||||
function construct return c_math_c.Vector_2.Item renames construct_v1;
|
||||
|
||||
pragma Import (C, construct_v1, "Ada_new_Vector_2__SWIG_0");
|
||||
|
||||
function construct_v2
|
||||
(x : in c_math_c.Real;
|
||||
y : in c_math_c.Real) return c_math_c.Vector_2.Item;
|
||||
|
||||
function construct
|
||||
(x : in c_math_c.Real;
|
||||
y : in c_math_c.Real) return c_math_c.Vector_2.Item renames
|
||||
construct_v2;
|
||||
|
||||
pragma Import (C, construct_v2, "Ada_new_Vector_2__SWIG_1");
|
||||
|
||||
end c_math_c.Vector_2;
|
||||
@@ -0,0 +1,62 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c.Vector_3 is
|
||||
|
||||
-- Item
|
||||
--
|
||||
|
||||
type Item is record
|
||||
x : aliased c_math_c.Real;
|
||||
y : aliased c_math_c.Real;
|
||||
z : aliased c_math_c.Real;
|
||||
end record;
|
||||
|
||||
-- Items
|
||||
--
|
||||
type Items is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Vector_3.Item;
|
||||
|
||||
-- Pointer
|
||||
--
|
||||
type Pointer is access all c_math_c.Vector_3.Item;
|
||||
|
||||
-- Pointers
|
||||
--
|
||||
type Pointers is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Vector_3.Pointer;
|
||||
|
||||
-- Pointer_Pointer
|
||||
--
|
||||
type Pointer_Pointer is access all c_math_c.Vector_3.Pointer;
|
||||
|
||||
function construct return c_math_c.Vector_3.Item;
|
||||
|
||||
function construct
|
||||
(x : in c_math_c.Real;
|
||||
y : in c_math_c.Real;
|
||||
z : in c_math_c.Real) return c_math_c.Vector_3.Item;
|
||||
|
||||
private
|
||||
|
||||
function construct_v1 return c_math_c.Vector_3.Item;
|
||||
|
||||
function construct return c_math_c.Vector_3.Item renames construct_v1;
|
||||
|
||||
pragma Import (C, construct_v1, "Ada_new_Vector_3__SWIG_0");
|
||||
|
||||
function construct_v2
|
||||
(x : in c_math_c.Real;
|
||||
y : in c_math_c.Real;
|
||||
z : in c_math_c.Real) return c_math_c.Vector_3.Item;
|
||||
|
||||
function construct
|
||||
(x : in c_math_c.Real;
|
||||
y : in c_math_c.Real;
|
||||
z : in c_math_c.Real) return c_math_c.Vector_3.Item renames
|
||||
construct_v2;
|
||||
|
||||
pragma Import (C, construct_v2, "Ada_new_Vector_3__SWIG_1");
|
||||
|
||||
end c_math_c.Vector_3;
|
||||
21
3-mid/physics/implement/c_math/source/thin/c_math_c.ads
Normal file
21
3-mid/physics/implement/c_math/source/thin/c_math_c.ads
Normal file
@@ -0,0 +1,21 @@
|
||||
-- This file is generated by SWIG. Please do *not* modify by hand.
|
||||
--
|
||||
with Interfaces.C;
|
||||
|
||||
package c_math_c is
|
||||
|
||||
-- Real
|
||||
--
|
||||
subtype Real is Interfaces.C.C_float;
|
||||
|
||||
type Real_array is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Real;
|
||||
|
||||
-- Index
|
||||
--
|
||||
subtype Index is Interfaces.C.int;
|
||||
|
||||
type Index_array is
|
||||
array (Interfaces.C.size_t range <>) of aliased c_math_c.Index;
|
||||
|
||||
end c_math_c;
|
||||
523
3-mid/physics/implement/c_math/source/thin/c_math_c_wrap.cxx
Normal file
523
3-mid/physics/implement/c_math/source/thin/c_math_c_wrap.cxx
Normal file
@@ -0,0 +1,523 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.36
|
||||
*
|
||||
* This file is not intended to be easily readable and contains a number of
|
||||
* coding conventions designed to improve portability and efficiency. Do not make
|
||||
* changes to this file unless you know what you are doing--modify the SWIG
|
||||
* interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#ifdef __cplusplus
|
||||
template < typename T > class SwigValueWrapper
|
||||
{
|
||||
T *tt;
|
||||
public:
|
||||
SwigValueWrapper ():tt (0)
|
||||
{
|
||||
}
|
||||
SwigValueWrapper (const SwigValueWrapper < T > &rhs):tt (new T (*rhs.tt))
|
||||
{
|
||||
}
|
||||
SwigValueWrapper (const T & t):tt (new T (t))
|
||||
{
|
||||
}
|
||||
~SwigValueWrapper ()
|
||||
{
|
||||
delete tt;
|
||||
}
|
||||
SwigValueWrapper & operator= (const T & t)
|
||||
{
|
||||
delete tt;
|
||||
tt = new T (t);
|
||||
return *this;
|
||||
}
|
||||
operator T & () const
|
||||
{
|
||||
return *tt;
|
||||
}
|
||||
T *operator& ()
|
||||
{
|
||||
return tt;
|
||||
}
|
||||
private:
|
||||
SwigValueWrapper & operator= (const SwigValueWrapper < T > &rhs);
|
||||
};
|
||||
|
||||
template < typename T > T SwigValueInit ()
|
||||
{
|
||||
return T ();
|
||||
}
|
||||
#endif
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* This section contains generic SWIG labels for method/variable
|
||||
* declarations/attributes, and other compiler dependent labels.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
/* template workaround for compilers that cannot correctly implement the C++ standard */
|
||||
#ifndef SWIGTEMPLATEDISAMBIGUATOR
|
||||
#if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
|
||||
#define SWIGTEMPLATEDISAMBIGUATOR template
|
||||
#elif defined(__HP_aCC)
|
||||
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
|
||||
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
|
||||
#define SWIGTEMPLATEDISAMBIGUATOR template
|
||||
#else
|
||||
#define SWIGTEMPLATEDISAMBIGUATOR
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* inline attribute */
|
||||
#ifndef SWIGINLINE
|
||||
#if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
|
||||
#define SWIGINLINE inline
|
||||
#else
|
||||
#define SWIGINLINE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* attribute recognised by some compilers to avoid 'unused' warnings */
|
||||
#ifndef SWIGUNUSED
|
||||
#if defined(__GNUC__)
|
||||
#if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
#define SWIGUNUSED __attribute__ ((__unused__))
|
||||
#else
|
||||
#define SWIGUNUSED
|
||||
#endif
|
||||
#elif defined(__ICC)
|
||||
#define SWIGUNUSED __attribute__ ((__unused__))
|
||||
#else
|
||||
#define SWIGUNUSED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SWIGUNUSEDPARM
|
||||
#ifdef __cplusplus
|
||||
#define SWIGUNUSEDPARM(p)
|
||||
#else
|
||||
#define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* internal SWIG method */
|
||||
#ifndef SWIGINTERN
|
||||
#define SWIGINTERN static SWIGUNUSED
|
||||
#endif
|
||||
|
||||
/* internal inline SWIG method */
|
||||
#ifndef SWIGINTERNINLINE
|
||||
#define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
|
||||
#endif
|
||||
|
||||
/* exporting methods */
|
||||
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
||||
#ifndef GCC_HASCLASSVISIBILITY
|
||||
#define GCC_HASCLASSVISIBILITY
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef SWIGEXPORT
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
#if defined(STATIC_LINKED)
|
||||
#define SWIGEXPORT
|
||||
#else
|
||||
#define SWIGEXPORT __declspec(dllexport)
|
||||
#endif
|
||||
#else
|
||||
#if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
|
||||
#define SWIGEXPORT __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define SWIGEXPORT
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* calling conventions for Windows */
|
||||
#ifndef SWIGSTDCALL
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
||||
#define SWIGSTDCALL __stdcall
|
||||
#else
|
||||
#define SWIGSTDCALL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
||||
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
|
||||
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
|
||||
#define _SCL_SECURE_NO_DEPRECATE
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#if defined(_WIN32) || defined(__CYGWIN32__)
|
||||
#define DllExport __declspec( dllexport )
|
||||
#define SWIGSTDCALL __stdcall
|
||||
#else
|
||||
#define DllExport
|
||||
#define SWIGSTDCALL
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <new>
|
||||
#endif
|
||||
|
||||
/* Callback for returning strings to Ada without leaking memory */
|
||||
|
||||
typedef char *(SWIGSTDCALL * SWIG_AdaStringHelperCallback) (const char *);
|
||||
static SWIG_AdaStringHelperCallback SWIG_ada_string_callback = NULL;
|
||||
|
||||
/* probably obsolete ...
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
DllExport void SWIGSTDCALL SWIGRegisterStringCallback_CORE_MODULE(SWIG_AdaStringHelperCallback callback) {
|
||||
SWIG_ada_string_callback = callback;
|
||||
}
|
||||
*/
|
||||
|
||||
/* Contract support */
|
||||
/*
|
||||
#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_AdaThrowException(SWIG_AdaArgumentOutOfRangeException, msg); return nullreturn; } else
|
||||
*/
|
||||
|
||||
#define protected public
|
||||
#define private public
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "../c/c_math.h"
|
||||
}
|
||||
|
||||
#undef protected
|
||||
#undef private
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
DllExport void *SWIGSTDCALL Ada_new_Vector_2__SWIG_0 ()
|
||||
{
|
||||
void *jresult;
|
||||
Vector_2 *result = 0;
|
||||
|
||||
result = (Vector_2 *) new Vector_2 ();
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Vector_2__SWIG_1 (float jarg1,
|
||||
float jarg2)
|
||||
{
|
||||
void *jresult;
|
||||
Real arg1;
|
||||
Real arg2;
|
||||
Vector_2 *result = 0;
|
||||
|
||||
arg1 = (Real) jarg1;
|
||||
|
||||
arg2 = (Real) jarg2;
|
||||
|
||||
result = (Vector_2 *) new Vector_2 (arg1, arg2);
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void SWIGSTDCALL Ada_delete_Vector_2 (void *jarg1)
|
||||
{
|
||||
Vector_2 *arg1 = (Vector_2 *) 0;
|
||||
|
||||
arg1 = (Vector_2 *) jarg1;
|
||||
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Vector_3__SWIG_0 ()
|
||||
{
|
||||
void *jresult;
|
||||
Vector_3 *result = 0;
|
||||
|
||||
result = (Vector_3 *) new Vector_3 ();
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Vector_3__SWIG_1 (float jarg1,
|
||||
float jarg2,
|
||||
float jarg3)
|
||||
{
|
||||
void *jresult;
|
||||
Real arg1;
|
||||
Real arg2;
|
||||
Real arg3;
|
||||
Vector_3 *result = 0;
|
||||
|
||||
arg1 = (Real) jarg1;
|
||||
|
||||
arg2 = (Real) jarg2;
|
||||
|
||||
arg3 = (Real) jarg3;
|
||||
|
||||
result = (Vector_3 *) new Vector_3 (arg1, arg2, arg3);
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void SWIGSTDCALL Ada_delete_Vector_3 (void *jarg1)
|
||||
{
|
||||
Vector_3 *arg1 = (Vector_3 *) 0;
|
||||
|
||||
arg1 = (Vector_3 *) jarg1;
|
||||
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Triangle__SWIG_0 ()
|
||||
{
|
||||
void *jresult;
|
||||
Triangle *result = 0;
|
||||
|
||||
result = (Triangle *) new Triangle ();
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Triangle__SWIG_1 (float jarg1,
|
||||
float jarg2,
|
||||
float jarg3)
|
||||
{
|
||||
void *jresult;
|
||||
Real arg1;
|
||||
Real arg2;
|
||||
Real arg3;
|
||||
Triangle *result = 0;
|
||||
|
||||
arg1 = (Real) jarg1;
|
||||
|
||||
arg2 = (Real) jarg2;
|
||||
|
||||
arg3 = (Real) jarg3;
|
||||
|
||||
result = (Triangle *) new Triangle (arg1, arg2, arg3);
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void SWIGSTDCALL Ada_delete_Triangle (void *jarg1)
|
||||
{
|
||||
Triangle *arg1 = (Triangle *) 0;
|
||||
|
||||
arg1 = (Triangle *) jarg1;
|
||||
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Matrix_3x3__SWIG_0 ()
|
||||
{
|
||||
void *jresult;
|
||||
Matrix_3x3 *result = 0;
|
||||
|
||||
result = (Matrix_3x3 *) new Matrix_3x3 ();
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Matrix_3x3__SWIG_1 (float *jarg1)
|
||||
{
|
||||
void *jresult;
|
||||
Real *arg1 = (Real *) 0;
|
||||
Matrix_3x3 *result = 0;
|
||||
|
||||
arg1 = (Real *) jarg1;
|
||||
|
||||
result = (Matrix_3x3 *) new Matrix_3x3 (arg1);
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Matrix_3x3__SWIG_2 (float jarg1,
|
||||
float jarg2,
|
||||
float jarg3,
|
||||
float jarg4,
|
||||
float jarg5,
|
||||
float jarg6,
|
||||
float jarg7,
|
||||
float jarg8,
|
||||
float jarg9)
|
||||
{
|
||||
void *jresult;
|
||||
Real arg1;
|
||||
Real arg2;
|
||||
Real arg3;
|
||||
Real arg4;
|
||||
Real arg5;
|
||||
Real arg6;
|
||||
Real arg7;
|
||||
Real arg8;
|
||||
Real arg9;
|
||||
Matrix_3x3 *result = 0;
|
||||
|
||||
arg1 = (Real) jarg1;
|
||||
|
||||
arg2 = (Real) jarg2;
|
||||
|
||||
arg3 = (Real) jarg3;
|
||||
|
||||
arg4 = (Real) jarg4;
|
||||
|
||||
arg5 = (Real) jarg5;
|
||||
|
||||
arg6 = (Real) jarg6;
|
||||
|
||||
arg7 = (Real) jarg7;
|
||||
|
||||
arg8 = (Real) jarg8;
|
||||
|
||||
arg9 = (Real) jarg9;
|
||||
|
||||
result =
|
||||
(Matrix_3x3 *) new Matrix_3x3 (arg1, arg2, arg3, arg4, arg5, arg6, arg7,
|
||||
arg8, arg9);
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void SWIGSTDCALL Ada_delete_Matrix_3x3 (void *jarg1)
|
||||
{
|
||||
Matrix_3x3 *arg1 = (Matrix_3x3 *) 0;
|
||||
|
||||
arg1 = (Matrix_3x3 *) jarg1;
|
||||
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Matrix_4x4__SWIG_0 ()
|
||||
{
|
||||
void *jresult;
|
||||
Matrix_4x4 *result = 0;
|
||||
|
||||
result = (Matrix_4x4 *) new Matrix_4x4 ();
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void *SWIGSTDCALL Ada_new_Matrix_4x4__SWIG_1 (float *jarg1)
|
||||
{
|
||||
void *jresult;
|
||||
Real *arg1 = (Real *) 0;
|
||||
Matrix_4x4 *result = 0;
|
||||
|
||||
arg1 = (Real *) jarg1;
|
||||
|
||||
result = (Matrix_4x4 *) new Matrix_4x4 (arg1);
|
||||
jresult = (void *) result;
|
||||
|
||||
return jresult;
|
||||
|
||||
}
|
||||
|
||||
DllExport void SWIGSTDCALL Ada_delete_Matrix_4x4 (void *jarg1)
|
||||
{
|
||||
Matrix_4x4 *arg1 = (Matrix_4x4 *) 0;
|
||||
|
||||
arg1 = (Matrix_4x4 *) jarg1;
|
||||
|
||||
delete arg1;
|
||||
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
extern Vector_2 gnat_new_Vector_2__SWIG_0 ()
|
||||
{
|
||||
return Vector_2 ();
|
||||
}
|
||||
|
||||
extern Vector_2 gnat_new_Vector_2__SWIG_1 (Real x, Real y)
|
||||
{
|
||||
return Vector_2 (x, y);
|
||||
}
|
||||
|
||||
extern Vector_3 gnat_new_Vector_3__SWIG_0 ()
|
||||
{
|
||||
return Vector_3 ();
|
||||
}
|
||||
|
||||
extern Vector_3 gnat_new_Vector_3__SWIG_1 (Real x, Real y, Real z)
|
||||
{
|
||||
return Vector_3 (x, y, z);
|
||||
}
|
||||
|
||||
extern Triangle gnat_new_Triangle__SWIG_0 ()
|
||||
{
|
||||
return Triangle ();
|
||||
}
|
||||
|
||||
extern Triangle gnat_new_Triangle__SWIG_1 (Real a, Real b, Real c)
|
||||
{
|
||||
return Triangle (a, b, c);
|
||||
}
|
||||
|
||||
extern Matrix_3x3 gnat_new_Matrix_3x3__SWIG_0 ()
|
||||
{
|
||||
return Matrix_3x3 ();
|
||||
}
|
||||
|
||||
extern Matrix_3x3 gnat_new_Matrix_3x3__SWIG_1 (Real * First)
|
||||
{
|
||||
return Matrix_3x3 (First);
|
||||
}
|
||||
|
||||
extern Matrix_3x3 gnat_new_Matrix_3x3__SWIG_2 (Real m00, Real m01, Real m02,
|
||||
Real m10, Real m11, Real m12,
|
||||
Real m20, Real m21, Real m22)
|
||||
{
|
||||
return Matrix_3x3 (m00, m01, m02, m10, m11, m12, m20, m21, m22);
|
||||
}
|
||||
|
||||
extern Matrix_4x4 gnat_new_Matrix_4x4__SWIG_0 ()
|
||||
{
|
||||
return Matrix_4x4 ();
|
||||
}
|
||||
|
||||
extern Matrix_4x4 gnat_new_Matrix_4x4__SWIG_1 (Real * First)
|
||||
{
|
||||
return Matrix_4x4 (First);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user