* 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 namespace OpenSim.Framework.Types
{ {
//public enum ShapeType public enum ProfileShape : byte
//{ {
// Box, Circle = 0,
// Sphere, Square = 1,
// Ring, IsometricTriangle = 2,
// Tube, EquilateralTriangle = 3,
// Torus, RightTriangle = 4,
// Prism, HalfCircle = 5
// Scuplted, }
// Cylinder,
// Foliage, public enum HollowShape : byte
// Unknown {
//} Same = 0,
// Fill in...
}
public class PrimitiveBaseShape public class PrimitiveBaseShape
{ {
//protected ShapeType m_type = ShapeType.Unknown;
private static byte[] m_defaultTextureEntry; private static byte[] m_defaultTextureEntry;
public byte PCode; public byte PCode;
@ -49,13 +46,31 @@ namespace OpenSim.Framework.Types
public byte[] TextureEntry; // a LL textureEntry in byte[] format public byte[] TextureEntry; // a LL textureEntry in byte[] format
public byte[] ExtraParams; public byte[] ExtraParams;
//public ShapeType PrimType public ProfileShape ProfileShape
//{ {
// get get
// { {
// return this.m_type; 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 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 class GenericShape : PrimitiveBaseShape
{ {
public GenericShape() : base() public GenericShape() : base()
{ {
} }
} }
public class BoxShape : PrimitiveBaseShape public class BoxShape : PrimitiveBaseShape
{ {
public BoxShape() : base() public BoxShape() : base()
{ {
//m_type = ShapeType.Box;
PathCurve = 16; PathCurve = 16;
ProfileCurve = 1; ProfileShape = ProfileShape.Square;
PCode = 9; PCode = 9;
PathScaleX = 100; PathScaleX = 100;
PathScaleY = 100; PathScaleY = 100;
} }
public void SetSide( float side )
{
Scale = new LLVector3( side, side, side );
}
public static BoxShape Default public static BoxShape Default
{ {
@ -125,7 +133,7 @@ namespace OpenSim.Framework.Types
{ {
BoxShape boxShape = new BoxShape(); BoxShape boxShape = new BoxShape();
boxShape.Scale = new LLVector3(0.5f, 0.5f, 0.5f); boxShape.SetSide( 0.5f );
return boxShape; return boxShape;
} }

View File

@ -47,11 +47,14 @@ namespace SimpleApp
{ {
base.StartUp(); base.StartUp();
m_commsManager = new CommunicationsLocal(m_networkServersInfo, m_httpServer, m_assetCache);
m_log.Notice(m_log.LineInfo); m_log.Notice(m_log.LineInfo);
ScenePresence.PhysicsEngineFlying = true; ScenePresence.PhysicsEngineFlying = true;
IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000); IPEndPoint internalEndPoint = new IPEndPoint(IPAddress.Parse("127.0.0.1"), 9000);
RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost"); RegionInfo regionInfo = new RegionInfo(1000, 1000, internalEndPoint, "localhost");
regionInfo.DataStore = "simpleapp_datastore.yap"; regionInfo.DataStore = "simpleapp_datastore.yap";
@ -67,7 +70,7 @@ namespace SimpleApp
LLVector3 pos = new LLVector3(138, 129, 27); LLVector3 pos = new LLVector3(138, 129, 27);
SceneObject sceneObject = new CpuCounterObject(scene, scene.EventManager, LLUUID.Zero, scene.PrimIDAllocate(), pos, shape); 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 ); MyNpcCharacter m_character = new MyNpcCharacter( scene.EventManager );
scene.AddNewClient(m_character, false); scene.AddNewClient(m_character, false);