* Got SimpleApp working again

* Minor shape koncept experiments
afrisby
lbsa71 2007-08-08 11:16:45 +00:00
parent 5061a703ea
commit ef0fea268f
2 changed files with 53 additions and 42 deletions

View File

@ -3,27 +3,24 @@ using libsecondlife.Packets;
namespace OpenSim.Framework.Types
{
//public enum ShapeType
//{
// Box,
// Sphere,
// Ring,
// Tube,
// Torus,
// Prism,
// Scuplted,
// Cylinder,
// Foliage,
// Unknown
//}
public enum ProfileShape : byte
{
Circle = 0,
Square = 1,
IsometricTriangle = 2,
EquilateralTriangle = 3,
RightTriangle = 4,
HalfCircle = 5
}
public enum HollowShape : byte
{
Same = 0,
// Fill in...
}
public class PrimitiveBaseShape
{
//protected ShapeType m_type = ShapeType.Unknown;
private static byte[] m_defaultTextureEntry;
public byte PCode;
@ -49,13 +46,31 @@ namespace OpenSim.Framework.Types
public byte[] TextureEntry; // a LL textureEntry in byte[] format
public byte[] ExtraParams;
//public ShapeType PrimType
//{
// get
// {
// return this.m_type;
// }
//}
public ProfileShape ProfileShape
{
get
{
return (ProfileShape)(ProfileCurve & 0xf);
}
set
{
byte oldValueMasked = (byte)(ProfileCurve & 0xf0);
ProfileCurve = (byte)(oldValueMasked | (byte)value);
}
}
public HollowShape HoleShape
{
get
{
return (HollowShape)(ProfileHollow & 0xf0);
}
set
{
byte oldValueMasked = (byte)(ProfileHollow & 0xf0);
ProfileHollow = (byte)(oldValueMasked | (byte)value);
}
}
public LLVector3 PrimScale
{
@ -88,19 +103,8 @@ namespace OpenSim.Framework.Types
}
}
enum ProfileShape
{
Circle = 0,
Square = 1,
IsometricTriangle = 2,
EquilateralTriangle = 3,
RightTriangle = 4,
HalfCircle = 5
}
public class GenericShape : PrimitiveBaseShape
{
public GenericShape() : base()
{
@ -111,21 +115,25 @@ namespace OpenSim.Framework.Types
{
public BoxShape() : base()
{
//m_type = ShapeType.Box;
PathCurve = 16;
ProfileCurve = 1;
ProfileShape = ProfileShape.Square;
PCode = 9;
PathScaleX = 100;
PathScaleY = 100;
}
public void SetSide( float side )
{
Scale = new LLVector3( side, side, side );
}
public static BoxShape Default
{
get
{
BoxShape boxShape = new BoxShape();
boxShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f);
boxShape.SetSide( 0.5f );
return boxShape;
}

View File

@ -47,11 +47,14 @@ namespace SimpleApp
{
base.StartUp();
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache);
m_log.Notice(m_log.LineInfo);
ScenePresence.PhysicsEngineFlying = true;
IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost");
regionInfo.DataStore = "simpleapp_datastore.yap";