diff options
author | lbsa71 | 2007-07-18 09:36:47 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-18 09:36:47 +0000 |
commit | f70ec1fa75ef526266ad359d2db0e25f2635c182 (patch) | |
tree | 0ce6f6df1702d849532d1818c76c2bd301fb4579 /OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |
parent | * One hopefully-final attempt at fixing this remoting issue. (diff) | |
download | opensim-SC_OLD-f70ec1fa75ef526266ad359d2db0e25f2635c182.zip opensim-SC_OLD-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.gz opensim-SC_OLD-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.bz2 opensim-SC_OLD-f70ec1fa75ef526266ad359d2db0e25f2635c182.tar.xz |
* Added a FileSystemObject to SimpleApp
* Added Some ShapeTypes (shapes doesn't work though!)
* Fixed some \0 issues
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | 74 |
1 files changed, 46 insertions, 28 deletions
diff --git a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs index e058c07..9ab6071 100644 --- a/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs +++ b/OpenSim/Framework/General/Types/PrimitiveBaseShape.cs | |||
@@ -19,7 +19,7 @@ namespace OpenSim.Framework.Types | |||
19 | 19 | ||
20 | public class PrimitiveBaseShape | 20 | public class PrimitiveBaseShape |
21 | { | 21 | { |
22 | private ShapeType type = ShapeType.Unknown; | 22 | protected ShapeType type = ShapeType.Unknown; |
23 | 23 | ||
24 | public byte PCode; | 24 | public byte PCode; |
25 | public ushort PathBegin; | 25 | public ushort PathBegin; |
@@ -72,38 +72,56 @@ namespace OpenSim.Framework.Types | |||
72 | 72 | ||
73 | public PrimitiveBaseShape Copy() | 73 | public PrimitiveBaseShape Copy() |
74 | { | 74 | { |
75 | return (PrimitiveBaseShape) this.MemberwiseClone(); | 75 | return (PrimitiveBaseShape)this.MemberwiseClone(); |
76 | } | 76 | } |
77 | } | ||
77 | 78 | ||
78 | public static PrimitiveBaseShape DefaultBox() | 79 | public class BoxShape : PrimitiveBaseShape |
80 | { | ||
81 | public BoxShape() | ||
79 | { | 82 | { |
80 | PrimitiveBaseShape primShape = new PrimitiveBaseShape(); | 83 | type = ShapeType.Box; |
84 | } | ||
85 | |||
86 | public static BoxShape Default | ||
87 | { | ||
88 | get | ||
89 | { | ||
90 | BoxShape primShape = new BoxShape(); | ||
81 | 91 | ||
82 | primShape.type = ShapeType.Box; | 92 | primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); |
83 | primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); | 93 | primShape.PCode = 9; |
84 | primShape.PCode = 9; | 94 | primShape.PathBegin = 0; |
85 | primShape.PathBegin = 0; | 95 | primShape.PathEnd = 0; |
86 | primShape.PathEnd = 0; | 96 | primShape.PathScaleX = 0; |
87 | primShape.PathScaleX = 0; | 97 | primShape.PathScaleY = 0; |
88 | primShape.PathScaleY = 0; | 98 | primShape.PathShearX = 0; |
89 | primShape.PathShearX = 0; | 99 | primShape.PathShearY = 0; |
90 | primShape.PathShearY = 0; | 100 | primShape.PathSkew = 0; |
91 | primShape.PathSkew = 0; | 101 | primShape.ProfileBegin = 0; |
92 | primShape.ProfileBegin = 0; | 102 | primShape.ProfileEnd = 0; |
93 | primShape.ProfileEnd = 0; | 103 | primShape.PathCurve = 16; |
94 | primShape.PathCurve = 16; | 104 | primShape.ProfileCurve = 1; |
95 | primShape.ProfileCurve = 1; | 105 | primShape.ProfileHollow = 0; |
96 | primShape.ProfileHollow = 0; | 106 | primShape.PathRadiusOffset = 0; |
97 | primShape.PathRadiusOffset = 0; | 107 | primShape.PathRevolutions = 0; |
98 | primShape.PathRevolutions = 0; | 108 | primShape.PathTaperX = 0; |
99 | primShape.PathTaperX = 0; | 109 | primShape.PathTaperY = 0; |
100 | primShape.PathTaperY = 0; | 110 | primShape.PathTwist = 0; |
101 | primShape.PathTwist = 0; | 111 | primShape.PathTwistBegin = 0; |
102 | primShape.PathTwistBegin = 0; | 112 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); |
103 | LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005")); | 113 | primShape.TextureEntry = ntex.ToBytes(); |
104 | primShape.TextureEntry = ntex.ToBytes(); | ||
105 | 114 | ||
106 | return primShape; | 115 | return primShape; |
116 | } | ||
117 | } | ||
118 | } | ||
119 | |||
120 | public class SphereShape : PrimitiveBaseShape | ||
121 | { | ||
122 | public SphereShape() | ||
123 | { | ||
124 | type = ShapeType.Sphere; | ||
107 | } | 125 | } |
108 | } | 126 | } |
109 | } | 127 | } |