Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5 | scott | 1 | #region MIT License |
2 | /* |
||
3 | * Copyright (c) 2005-2008 Jonathan Mark Porter. http://physics2d.googlepages.com/ |
||
4 | * |
||
5 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
||
6 | * of this software and associated documentation files (the "Software"), to deal |
||
7 | * in the Software without restriction, including without limitation the rights to |
||
8 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
||
9 | * the Software, and to permit persons to whom the Software is furnished to do so, |
||
10 | * subject to the following conditions: |
||
11 | * |
||
12 | * The above copyright notice and this permission notice shall be |
||
13 | * included in all copies or substantial portions of the Software. |
||
14 | * |
||
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, |
||
16 | * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR |
||
17 | * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
||
18 | * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
||
19 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
||
20 | * OTHER DEALINGS IN THE SOFTWARE. |
||
21 | */ |
||
22 | #endregion |
||
23 | |||
24 | |||
25 | #if UseDouble |
||
26 | using Scalar = System.Double; |
||
27 | #else |
||
28 | using Scalar = System.Single; |
||
29 | #endif |
||
30 | using System; |
||
31 | using System.Collections.Generic; |
||
32 | |||
33 | using AdvanceMath; |
||
34 | |||
35 | namespace Physics2DDotNet |
||
36 | { |
||
37 | public sealed class FluidInfo |
||
38 | { |
||
39 | Vector2D centroid; |
||
40 | Scalar area; |
||
41 | Vector2D dragCenter; |
||
42 | Scalar dragArea; |
||
43 | |||
44 | public FluidInfo(Vector2D dragCenter, |
||
45 | Scalar dragArea, |
||
46 | Vector2D centroid, |
||
47 | Scalar area) |
||
48 | { |
||
49 | this.centroid = centroid; |
||
50 | this.area = area; |
||
51 | this.dragCenter = dragCenter; |
||
52 | this.dragArea = dragArea; |
||
53 | } |
||
54 | |||
55 | public Vector2D Centroid |
||
56 | { |
||
57 | get { return centroid; } |
||
58 | } |
||
59 | public Scalar Area |
||
60 | { |
||
61 | get { return area; } |
||
62 | } |
||
63 | public Vector2D DragCenter |
||
64 | { |
||
65 | get { return dragCenter; } |
||
66 | } |
||
67 | public Scalar DragArea |
||
68 | { |
||
69 | get { return dragArea; } |
||
70 | } |
||
71 | } |
||
72 | |||
73 | public sealed class DragInfo |
||
74 | { |
||
75 | Vector2D dragCenter; |
||
76 | Scalar dragArea; |
||
77 | |||
78 | public DragInfo(Vector2D dragCenter, Scalar dragArea) |
||
79 | { |
||
80 | this.dragCenter = dragCenter; |
||
81 | this.dragArea = dragArea; |
||
82 | } |
||
83 | /// <summary> |
||
84 | /// (In Body Coordinates) |
||
85 | /// </summary> |
||
86 | public Vector2D DragCenter |
||
87 | { |
||
88 | get { return dragCenter; } |
||
89 | } |
||
90 | public Scalar DragArea |
||
91 | { |
||
92 | get { return dragArea; } |
||
93 | } |
||
94 | } |
||
95 | } |