diff options
Diffstat (limited to 'OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs')
-rw-r--r-- | OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs index 5c75307..1a8409e 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/IMesher.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Runtime.InteropServices; | ||
30 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
31 | using OpenMetaverse; | 32 | using OpenMetaverse; |
32 | 33 | ||
@@ -36,13 +37,18 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
36 | { | 37 | { |
37 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); | 38 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod); |
38 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); | 39 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical); |
39 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool shouldCache); | 40 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde); |
41 | IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool shouldCache, bool convex, bool forOde); | ||
42 | IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex); | ||
43 | void ReleaseMesh(IMesh mesh); | ||
44 | void ExpireReleaseMeshs(); | ||
45 | void ExpireFileCache(); | ||
40 | } | 46 | } |
41 | 47 | ||
42 | // Values for level of detail to be passed to the mesher. | 48 | // Values for level of detail to be passed to the mesher. |
43 | // Values origionally chosen for the LOD of sculpties (the sqrt(width*heigth) of sculpt texture) | 49 | // Values origionally chosen for the LOD of sculpties (the sqrt(width*heigth) of sculpt texture) |
44 | // Lower level of detail reduces the number of vertices used to represent the meshed shape. | 50 | // Lower level of detail reduces the number of vertices used to represent the meshed shape. |
45 | public enum LevelOfDetail | 51 | public enum LevelOfDetail |
46 | { | 52 | { |
47 | High = 32, | 53 | High = 32, |
48 | Medium = 16, | 54 | Medium = 16, |
@@ -54,6 +60,25 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
54 | { | 60 | { |
55 | } | 61 | } |
56 | 62 | ||
63 | [Serializable()] | ||
64 | [StructLayout(LayoutKind.Explicit)] | ||
65 | public struct AMeshKey | ||
66 | { | ||
67 | [FieldOffset(0)] | ||
68 | public UUID uuid; | ||
69 | [FieldOffset(0)] | ||
70 | public ulong hashA; | ||
71 | [FieldOffset(8)] | ||
72 | public ulong hashB; | ||
73 | [FieldOffset(16)] | ||
74 | public ulong hashC; | ||
75 | |||
76 | public override string ToString() | ||
77 | { | ||
78 | return uuid.ToString() + "-" + hashC.ToString("x") ; | ||
79 | } | ||
80 | } | ||
81 | |||
57 | public interface IMesh | 82 | public interface IMesh |
58 | { | 83 | { |
59 | List<Vector3> getVertexList(); | 84 | List<Vector3> getVertexList(); |
@@ -67,5 +92,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase | |||
67 | void releasePinned(); | 92 | void releasePinned(); |
68 | void Append(IMesh newMesh); | 93 | void Append(IMesh newMesh); |
69 | void TransformLinear(float[,] matrix, float[] offset); | 94 | void TransformLinear(float[,] matrix, float[] offset); |
95 | Vector3 GetCentroid(); | ||
96 | Vector3 GetOBB(); | ||
70 | } | 97 | } |
71 | } | 98 | } |