/// <summary> /// The AddPrimShape calls are pseudo synchronous by default. /// </summary> /// <param name="primName"></param> /// <param name="pbs"></param> /// <param name="position"></param> /// <param name="size"></param> /// <param name="rotation"></param> /// <returns></returns> public override PhysicsActor AddPrimShape(string primName, AddPrimShapeFlags flags, BulkShapeData shapeData) { Commands.CreateObjectCmd createObj = new Commands.CreateObjectCmd( null, primName, shapeData.Pbs, shapeData.Position, shapeData.Size, shapeData.Rotation, shapeData.Velocity, shapeData.AngularVelocity, Meshing.MeshingStage.SCULPT_MESH_LOD, flags, (Material)shapeData.Material, shapeData.PhysicsProperties, shapeData.SerializedShapes, shapeData.ObjectReceivedOn); this.QueueCommand(createObj); createObj.FinshedEvent.Wait(); //wait for meshing and all prerequisites to complete createObj.Dispose(); return(createObj.FinalPrim); }
/// <summary> /// The AddPrimShape calls are pseudo synchronous by default. /// </summary> /// <param name="primName"></param> /// <param name="pbs"></param> /// <param name="position"></param> /// <param name="size"></param> /// <param name="rotation"></param> /// <returns></returns> public override PhysicsActor AddPrimShape(string primName, AddPrimShapeFlags flags, BulkShapeData shapeData) { Commands.CreateObjectCmd createObj = new Commands.CreateObjectCmd( null, primName, shapeData.Pbs, shapeData.Position, shapeData.Size, shapeData.Rotation, shapeData.Velocity, shapeData.AngularVelocity, Meshing.MeshingStage.SCULPT_MESH_LOD, flags, (Material)shapeData.Material, shapeData.PhysicsProperties, shapeData.SerializedShapes, shapeData.ObjectReceivedOn); this.QueueCommand(createObj); createObj.FinshedEvent.Wait(); //wait for meshing and all prerequisites to complete createObj.Dispose(); return createObj.FinalPrim; }