* 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,36 +103,29 @@ 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()
{
}
}
}
public class BoxShape : PrimitiveBaseShape
{
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
{
@ -125,7 +133,7 @@ namespace OpenSim.Framework.Types
{
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";
@ -67,7 +70,7 @@ namespace SimpleApp
LLVector3 pos = new LLVector3(138, 129, 27);
SceneObject sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape);
scene.AddEntity(sceneObject);
scene.AddEntity(sceneObject);
MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager );
scene.AddNewClient(m_character, false);