本文整理汇总了C#中OpenMetaverse.Primitive类的典型用法代码示例。如果您正苦于以下问题:C# Primitive类的具体用法?C# Primitive怎么用?C# Primitive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Primitive类属于OpenMetaverse命名空间,在下文中一共展示了Primitive类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Objects_OnObjectProperties11
public void Objects_OnObjectProperties11(Simulator simulator, Primitive prim, Primitive.ObjectProperties props)
{
//Primitive prim = GetPrimitive(props.ObjectID, simulator);
if (prim == null)
{
prim = GetPrimitive(props.ObjectID, simulator);
}
DeclareProperties(prim, props, simulator);
if (prim != null)
{
prim.RegionHandle = simulator.Handle;
SimObject updateMe = GetSimObject(prim, simulator);
if (updateMe == null)
{
return;
}
if (prim.ParentID == 0 && !SimRegion.OutOfRegion(prim.Position))
{
updateMe.ResetPrim(prim, client, simulator);
}
if (MaintainObjectProperties)
{
//updateMe.Properties = null;
updateMe.Properties = (props);
}
//Debug("UpdateProperties: {0}", updateMe.DebugInfo());
describePrimToAI(prim, simulator);
}
}
示例2: Objects_OnObjectProperties
void Objects_OnObjectProperties(Simulator simulator, Primitive.ObjectProperties properties)
{
lock (PrimsWaiting) {
Primitive prim;
if (PrimsWaiting.TryGetValue(properties.ObjectID, out prim)) {
prim.Properties = properties;
}
PrimsWaiting.Remove(properties.ObjectID);
if (PrimsWaiting.Count == 0)
AllPropertiesReceived.Set();
}
}
示例3: Objects_OnNewPrim
void Objects_OnNewPrim(Simulator simulator, Primitive prim, ulong regionHandle, ushort timeDilation)
{
if (enabled)
{
// Search this prim for textures
for (int i = 0; i < prim.Textures.FaceTextures.Length; i++)
{
Primitive.TextureEntryFace face = prim.Textures.FaceTextures[i];
if (face != null)
{
if (!alreadyRequested.ContainsKey(face.TextureID))
{
alreadyRequested[face.TextureID] = face.TextureID;
Client.Assets.RequestImage(face.TextureID, ImageType.Normal);
}
}
}
}
}
示例4: Notecard
public Notecard(RadegastInstance instance, InventoryNotecard notecard, Primitive prim)
{
InitializeComponent();
Disposed += new EventHandler(Notecard_Disposed);
this.instance = instance;
this.notecard = notecard;
this.prim = prim;
Text = notecard.Name;
rtbContent.DetectUrls = false;
if (notecard.AssetUUID == UUID.Zero)
{
UpdateStatus("Blank");
}
else
{
rtbContent.Text = " ";
UpdateStatus("Loading...");
if (prim == null)
{
client.Assets.RequestInventoryAsset(notecard, true, Assets_OnAssetReceived);
}
else
{
client.Assets.RequestInventoryAsset(notecard.AssetUUID, notecard.UUID, prim.ID, prim.OwnerID, notecard.AssetType, true, Assets_OnAssetReceived);
}
}
}
示例5: PrimitiveBaseShape
public PrimitiveBaseShape(Primitive prim)
{
ExtraParams = new byte[1];
_pathBegin = Primitive.PackBeginCut(prim.PrimData.PathBegin);
_pathCurve = (byte)prim.PrimData.PathCurve;
_pathEnd = Primitive.PackEndCut(prim.PrimData.PathEnd);
_pathRadiusOffset = Primitive.PackPathTwist(prim.PrimData.PathRadiusOffset);
_pathRevolutions = Primitive.PackPathRevolutions(prim.PrimData.PathRevolutions);
_pathScaleX = Primitive.PackPathScale(prim.PrimData.PathScaleX);
_pathScaleY = Primitive.PackPathScale(prim.PrimData.PathScaleY);
_pathShearX = (byte)Primitive.PackPathShear(prim.PrimData.PathShearX);
_pathShearY = (byte)Primitive.PackPathShear(prim.PrimData.PathShearY);
_pathSkew = Primitive.PackPathTwist(prim.PrimData.PathSkew);
_pathTaperX = Primitive.PackPathTaper(prim.PrimData.PathTaperX);
_pathTaperY = Primitive.PackPathTaper(prim.PrimData.PathTaperY);
_pathTwist = Primitive.PackPathTwist(prim.PrimData.PathTwist);
_pathTwistBegin = Primitive.PackPathTwist(prim.PrimData.PathTwistBegin);
_pCode = (byte)prim.PrimData.PCode;
_profileBegin = Primitive.PackBeginCut(prim.PrimData.ProfileBegin);
_profileEnd = Primitive.PackEndCut(prim.PrimData.ProfileEnd);
_profileHollow = Primitive.PackProfileHollow(prim.PrimData.ProfileHollow);
_scale = prim.Scale;
_state = prim.PrimData.State;
}
示例6: SimMesh
public SimMesh(MeshableObject simObject, Primitive prim, SimPathStore PS)
: base(new Box3Fill(true), new List<Box3Fill>(), PS)
{
RootObject = simObject;
Prim = prim;
Update(RootObject);
}
示例7: AvatarAppearance
public AvatarAppearance(UUID avatarID, AvatarWearable[] wearables, Primitive.TextureEntry textureEntry,
byte[] visualParams)
{
// MainConsole.Instance.WarnFormat("[AVATAR APPEARANCE] create initialized appearance for {0}",avatarID);
m_serial = 1;
m_owner = avatarID;
if (wearables != null)
m_wearables = wearables;
else
SetDefaultWearables();
if (textureEntry != null)
m_texture = textureEntry;
else
SetDefaultTexture();
if (visualParams != null)
m_visualparams = visualParams;
else
SetDefaultParams();
SetHeight();
m_attachments = new Dictionary<int, List<AvatarAttachment>>();
}
示例8: CheckForBannedViewer
/// <summary>
/// Check to see if the client has baked textures that belong to banned clients
/// </summary>
/// <param name="client"></param>
/// <param name="textureEntry"></param>
public void CheckForBannedViewer(IClientAPI client, Primitive.TextureEntry textureEntry)
{
try
{
//Read the website once!
if (m_map == null)
m_map = (OSDMap)OSDParser.Deserialize(Utilities.ReadExternalWebsite("http://auroraserver.ath.cx:8080/client_tags.xml"));
//This is the givaway texture!
for (int i = 0; i < textureEntry.FaceTextures.Length; i++)
{
if (textureEntry.FaceTextures[i] != null)
{
if (m_map.ContainsKey(textureEntry.FaceTextures[i].TextureID.ToString()))
{
OSDMap viewerMap = (OSDMap)m_map[textureEntry.FaceTextures[i].TextureID.ToString()];
//Check the names
if (BannedViewers.Contains(viewerMap["name"].ToString()))
{
client.Kick("You cannot use " + viewerMap["name"] + " in this sim.");
((Scene)client.Scene).IncomingCloseAgent(client.AgentId);
}
else if (m_banEvilViewersByDefault && viewerMap.ContainsKey("evil") && (viewerMap["evil"].AsBoolean() == true))
{
client.Kick("You cannot use " + viewerMap["name"] + " in this sim.");
((Scene)client.Scene).IncomingCloseAgent(client.AgentId);
}
}
}
}
}
catch { }
}
示例9: Appearance_OnAppearanceUpdated
//private object AsType(Object te, Type type, MemberInfo info)
//{
// if (type.IsInstanceOfType(te)) return te;
// return new NullType(type);
//}
public override void Appearance_OnAppearanceUpdated(Primitive.TextureEntry te)
{
if (te!=null)
{
client.SendNetworkEvent("On-Appearance-Updated", te);
}
//client.SendNetworkEvent("On-Appearance-Updated", AsType(te, typeof(Primitive.TextureEntry)));
}
示例10: SimulationObject
public SimulationObject(SimulationObject obj)
{
Prim = new Primitive(obj.Prim);
Server = obj.Server;
LinkNumber = obj.LinkNumber;
Frozen = obj.Frozen;
// Skip everything else because it can be lazily reconstructed
}
示例11: AttachmentsListItem
public AttachmentsListItem(Primitive prim, GridClient client, ListBox listBox)
{
this.prim = prim;
this.client = client;
this.listBox = listBox;
client.Objects.ObjectProperties += new EventHandler<ObjectPropertiesEventArgs>(Objects_OnObjectProperties);
}
示例12: ExportCollada
public ExportCollada(RadegastInstance instance, Primitive prim)
: base(instance)
{
InitializeComponent();
Exporter = new DAEExport(instance, prim);
Exporter.Progress += new EventHandler<DAEStatutsEventArgs>(Exporter_Progress);
UpdateInfo();
cbImageType.Text = "TGA";
}
示例13: DAEExport
public DAEExport(RadegastInstance instance, Primitive requestedPrim)
{
Instance = instance;
ImageFormat = "PNG";
ConsolidateMaterials = true;
SkipTransparentFaces = true;
Mesher = new MeshmerizerR();
Init(Client.Network.CurrentSim, requestedPrim);
}
示例14: BuildFullUpdate
public static ObjectUpdatePacket BuildFullUpdate(Primitive obj, ulong regionHandle, PrimFlags flags)
{
ObjectUpdatePacket update = new ObjectUpdatePacket();
update.RegionData.RegionHandle = regionHandle;
update.RegionData.TimeDilation = UInt16.MaxValue;
update.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
update.ObjectData[0] = BuildUpdateBlock(obj, regionHandle, flags);
return update;
}
示例15: PayWindow
public PayWindow(Primitive prim,int amount)
: base(Gtk.WindowType.Toplevel)
{
this.Build();
is_object=true;
amountpay=amount;
resident_key=prim.Properties.OwnerID;
object_key=prim.Properties.ObjectID;
object_name=prim.Properties.Name;
}