* Added unit tests for Vector3.ApproxEquals()

* Fixed a bug in Utils.BytesToInt64() not handling non-zero pos values

git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@3445 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2010-10-01 00:22:06 +00:00
parent 5ad629b82f
commit 968c6fb1cd
4 changed files with 57 additions and 10 deletions

View File

@@ -243,6 +243,25 @@ namespace PrimWorkshop
}
}
private void LoadDebugPrim()
{
Prims = new List<FacetedMesh>();
Primitive prim = new Primitive();
prim.Textures = new Primitive.TextureEntry(UUID.Zero);
prim.Scale = Vector3.One;
prim.PrimData = ObjectManager.BuildBasicShape(PrimType.Cylinder);
prim.PrimData.ProfileHollow = 0.95f;
SimpleMesh simpleMesh = Render.Plugin.GenerateSimpleMesh(prim, DetailLevel.High);
FacetedMesh facetedMesh = new FacetedMesh();
facetedMesh.Faces = new List<Face> { new Face { Vertices = simpleMesh.Vertices, Indices = simpleMesh.Indices } };
facetedMesh.Path = simpleMesh.Path;
facetedMesh.Profile = simpleMesh.Profile;
facetedMesh.Prim = prim;
LoadMesh(facetedMesh, ".");
PopulatePrimCombobox();
glControl.Invalidate();
}
private void LoadXmlPrim(string filename)
{
byte[] data = File.ReadAllBytes(filename);
@@ -641,7 +660,7 @@ namespace PrimWorkshop
{
cboFace.Items.Clear();
if (CurrentPrim != null)
if (CurrentPrim != null && CurrentPrim.Profile.Faces != null)
{
for (int i = 0; i < CurrentPrim.Profile.Faces.Count; i++)
cboFace.Items.Add(CurrentPrim.Profile.Faces[i]);