mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
* Added a FileSystemObject to SimpleApp
* Added Some ShapeTypes (shapes doesn't work though!) * Fixed some \0 issues
This commit is contained in:
@@ -194,35 +194,35 @@ namespace OpenSim.Framework.Types
|
||||
return bytes;
|
||||
}
|
||||
|
||||
public static PrimData DefaultCube()
|
||||
{
|
||||
PrimData primData = new PrimData();
|
||||
primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
primData.FullID = LLUUID.Random();
|
||||
primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
|
||||
primData.Rotation = new LLQuaternion(0, 0, 0, 1);
|
||||
primData.PCode = 9;
|
||||
primData.ParentID = 0;
|
||||
primData.PathBegin = 0;
|
||||
primData.PathEnd = 0;
|
||||
primData.PathScaleX = 0;
|
||||
primData.PathScaleY = 0;
|
||||
primData.PathShearX = 0;
|
||||
primData.PathShearY = 0;
|
||||
primData.PathSkew = 0;
|
||||
primData.ProfileBegin = 0;
|
||||
primData.ProfileEnd = 0;
|
||||
primData.PathCurve = 16;
|
||||
primData.ProfileCurve = 1;
|
||||
primData.ProfileHollow = 0;
|
||||
primData.PathRadiusOffset = 0;
|
||||
primData.PathRevolutions = 0;
|
||||
primData.PathTaperX = 0;
|
||||
primData.PathTaperY = 0;
|
||||
primData.PathTwist = 0;
|
||||
primData.PathTwistBegin = 0;
|
||||
//public static PrimData DefaultCube()
|
||||
//{
|
||||
// PrimData primData = new PrimData();
|
||||
// primData.CreationDate = (Int32)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
|
||||
// primData.FullID = LLUUID.Random();
|
||||
// primData.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
|
||||
// primData.Rotation = new LLQuaternion(0, 0, 0, 1);
|
||||
// primData.PCode = 9;
|
||||
// primData.ParentID = 0;
|
||||
// primData.PathBegin = 0;
|
||||
// primData.PathEnd = 0;
|
||||
// primData.PathScaleX = 0;
|
||||
// primData.PathScaleY = 0;
|
||||
// primData.PathShearX = 0;
|
||||
// primData.PathShearY = 0;
|
||||
// primData.PathSkew = 0;
|
||||
// primData.ProfileBegin = 0;
|
||||
// primData.ProfileEnd = 0;
|
||||
// primData.PathCurve = 16;
|
||||
// primData.ProfileCurve = 1;
|
||||
// primData.ProfileHollow = 0;
|
||||
// primData.PathRadiusOffset = 0;
|
||||
// primData.PathRevolutions = 0;
|
||||
// primData.PathTaperX = 0;
|
||||
// primData.PathTaperY = 0;
|
||||
// primData.PathTwist = 0;
|
||||
// primData.PathTwistBegin = 0;
|
||||
|
||||
return primData;
|
||||
}
|
||||
// return primData;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace OpenSim.Framework.Types
|
||||
|
||||
public class PrimitiveBaseShape
|
||||
{
|
||||
private ShapeType type = ShapeType.Unknown;
|
||||
protected ShapeType type = ShapeType.Unknown;
|
||||
|
||||
public byte PCode;
|
||||
public ushort PathBegin;
|
||||
@@ -72,38 +72,56 @@ namespace OpenSim.Framework.Types
|
||||
|
||||
public PrimitiveBaseShape Copy()
|
||||
{
|
||||
return (PrimitiveBaseShape) this.MemberwiseClone();
|
||||
return (PrimitiveBaseShape)this.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
|
||||
public class BoxShape : PrimitiveBaseShape
|
||||
{
|
||||
public BoxShape()
|
||||
{
|
||||
type = ShapeType.Box;
|
||||
}
|
||||
|
||||
public static PrimitiveBaseShape DefaultBox()
|
||||
public static BoxShape Default
|
||||
{
|
||||
PrimitiveBaseShape primShape = new PrimitiveBaseShape();
|
||||
get
|
||||
{
|
||||
BoxShape primShape = new BoxShape();
|
||||
|
||||
primShape.type = ShapeType.Box;
|
||||
primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
|
||||
primShape.PCode = 9;
|
||||
primShape.PathBegin = 0;
|
||||
primShape.PathEnd = 0;
|
||||
primShape.PathScaleX = 0;
|
||||
primShape.PathScaleY = 0;
|
||||
primShape.PathShearX = 0;
|
||||
primShape.PathShearY = 0;
|
||||
primShape.PathSkew = 0;
|
||||
primShape.ProfileBegin = 0;
|
||||
primShape.ProfileEnd = 0;
|
||||
primShape.PathCurve = 16;
|
||||
primShape.ProfileCurve = 1;
|
||||
primShape.ProfileHollow = 0;
|
||||
primShape.PathRadiusOffset = 0;
|
||||
primShape.PathRevolutions = 0;
|
||||
primShape.PathTaperX = 0;
|
||||
primShape.PathTaperY = 0;
|
||||
primShape.PathTwist = 0;
|
||||
primShape.PathTwistBegin = 0;
|
||||
LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
|
||||
primShape.TextureEntry = ntex.ToBytes();
|
||||
primShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
|
||||
primShape.PCode = 9;
|
||||
primShape.PathBegin = 0;
|
||||
primShape.PathEnd = 0;
|
||||
primShape.PathScaleX = 0;
|
||||
primShape.PathScaleY = 0;
|
||||
primShape.PathShearX = 0;
|
||||
primShape.PathShearY = 0;
|
||||
primShape.PathSkew = 0;
|
||||
primShape.ProfileBegin = 0;
|
||||
primShape.ProfileEnd = 0;
|
||||
primShape.PathCurve = 16;
|
||||
primShape.ProfileCurve = 1;
|
||||
primShape.ProfileHollow = 0;
|
||||
primShape.PathRadiusOffset = 0;
|
||||
primShape.PathRevolutions = 0;
|
||||
primShape.PathTaperX = 0;
|
||||
primShape.PathTaperY = 0;
|
||||
primShape.PathTwist = 0;
|
||||
primShape.PathTwistBegin = 0;
|
||||
LLObject.TextureEntry ntex = new LLObject.TextureEntry(new LLUUID("00000000-0000-0000-9999-000000000005"));
|
||||
primShape.TextureEntry = ntex.ToBytes();
|
||||
|
||||
return primShape;
|
||||
return primShape;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SphereShape : PrimitiveBaseShape
|
||||
{
|
||||
public SphereShape()
|
||||
{
|
||||
type = ShapeType.Sphere;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user