| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- using System;
- using System.Runtime.InteropServices;
- namespace AtomicEngine
- {
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct Vector3
- {
- public Vector3 (float x, float y, float z)
- {
- this.x = x;
- this.y = y;
- this.z = z;
- }
- public override string ToString()
- {
- return x + ", " + y + ", " + z;
- }
- public float x;
- public float y;
- public float z;
- /// Zero vector.
- static public readonly Vector3 Zero = new Vector3(0, 0, 0);
- /// (-1,0,0) vector.
- static public readonly Vector3 Left = new Vector3(-1, 0, 0);
- /// (1,0,0) vector.
- static public readonly Vector3 Right = new Vector3(1, 0, 0);
- /// (0,1,0) vector.
- static public readonly Vector3 Up = new Vector3(0, 1, 0);
- /// (0,-1,0) vector.
- static public readonly Vector3 Down = new Vector3(0, -1, 0);
- /// (0,0,1) vector.
- static public readonly Vector3 Forward = new Vector3(0, 0, 1);
- /// (0,0,-1) vector.
- static public readonly Vector3 Back = new Vector3(0, 0, -1);
- /// (1,1,1) vector.
- static public readonly Vector3 One = new Vector3(1, 1, 1);
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct Vector4
- {
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct Vector2
- {
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct Quaternion
- {
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct Color
- {
- public Color (float r, float g, float b, float a = 1.0f)
- {
- this.r = r;
- this.g = g;
- this.b = b;
- this.a = a;
- }
- public float r;
- public float g;
- public float b;
- public float a;
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct IntRect
- {
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct IntVector2
- {
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct BoundingBox
- {
- }
- [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Ansi)]
- public struct Rect
- {
- }}
|