• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# PrimitiveBaseShape类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中PrimitiveBaseShape的典型用法代码示例。如果您正苦于以下问题:C# PrimitiveBaseShape类的具体用法?C# PrimitiveBaseShape怎么用?C# PrimitiveBaseShape使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



PrimitiveBaseShape类属于命名空间,在下文中一共展示了PrimitiveBaseShape类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: BSPrim

        public BSPrim(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size,
            OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical)
            : base(parent_scene, localID, primName, "BSPrim")
        {
            // MainConsole.Instance.DebugFormat("{0}: BSPrim creation of {1}, id={2}", LogHeader, primName, localID);
            _position = pos;
            _size = size;
            Scale = size;   // prims are the size the user wants them to be (different for BSCharactes).
            _orientation = rotation;
            _buoyancy = 0f;
            RawVelocity = OMV.Vector3.Zero;
            _rotationalVelocity = OMV.Vector3.Zero;
            BaseShape = pbs;
            _isPhysical = pisPhysical;
            _isVolumeDetect = false;

            // We keep a handle to the vehicle actor so we can set vehicle parameters later.
            VehicleActor = new BSDynamics(PhysicsScene, this, VehicleActorName);
            PhysicalActors.Add(VehicleActorName, VehicleActor);

            _mass = CalculateMass();

            // DetailLog("{0},BSPrim.constructor,call", LocalID);
            // do the actual object creation at taint time
            PhysicsScene.TaintedObject("BSPrim.create", delegate()
            {
            // Make sure the object is being created with some sanity.
            ExtremeSanityCheck(true /* inTaintTime */);

            CreateGeomAndObject(true);

            CurrentCollisionFlags = PhysicsScene.PE.GetCollisionFlags(PhysBody);
            });
        }
开发者ID:NanaYngvarrdottir,项目名称:WhiteCore-Dev,代码行数:34,代码来源:BSPrim.cs


示例2: CreateMesh

        public IMesh CreateMesh (string primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool shouldCache)
        {
            // Remove the reference to the encoded JPEG2000 data so it can be GCed
            primShape.SculptData = Utils.EmptyBytes;

            return null;
        }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:7,代码来源:ZeroMesher.cs


示例3: BSPrimLinkable

        public BSPrimLinkable(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size,
            OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical, int material, float friction,
            float restitution, float gravityMultiplier, float density)
            : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical)
        {
            // Default linkset implementation for this prim
            LinksetType = (BSLinkset.LinksetImplementation)BSParam.LinksetImplementation;

            Linkset = BSLinkset.Factory(PhysicsScene, this);
            if (Linkset != null)
                Linkset.Refresh(this);
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:12,代码来源:BSPrimLinkable.cs


示例4: BSPrimLinkable

        public BSPrimLinkable(uint localID, String primName, BSScene parent_scene, OMV.Vector3 pos, OMV.Vector3 size,
            OMV.Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical, int material, float friction,
            float restitution, float gravityMultiplier, float density)
            : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical)
        {
            Linkset = BSLinkset.Factory(PhysicsScene, this);

            PhysicsScene.TaintedObject("BSPrimLinksetCompound.Refresh", delegate()
            {
                base.SetMaterial(material);
                base.Friction = friction;
                base.Restitution = restitution;
                base.GravityMultiplier = gravityMultiplier;
                base.Density = density;
                Linkset.Refresh(this);
            });
        }
开发者ID:emperorstarfinder,项目名称:Virtual-Universe,代码行数:17,代码来源:BSPrimLinkable.cs


示例5: AddTree

        public ISceneEntity AddTree(
            UUID uuid, UUID groupID, Vector3 scale, Quaternion rotation, Vector3 position, Tree treeType, bool newTree)
        {
            PrimitiveBaseShape treeShape = new PrimitiveBaseShape
                                               {
                                                   PathCurve = 16,
                                                   PathEnd = 49900,
                                                   PCode = newTree ? (byte) PCode.NewTree : (byte) PCode.Tree,
                                                   Scale = scale,
                                                   State = (byte) treeType
                                               };

            return m_scene.SceneGraph.AddNewPrim(uuid, groupID, position, rotation, treeShape);
        }
开发者ID:QueenStarfinder,项目名称:WhiteCore-Dev,代码行数:14,代码来源:VegetationModule.cs


示例6: CreateEntity

        public ISceneEntity CreateEntity(
            ISceneEntity baseEntity, UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
        {
            if (Array.IndexOf(creationCapabilities, (PCode) shape.PCode) < 0)
            {
                MainConsole.Instance.DebugFormat("[VEGETATION]: PCode {0} not handled by {1}", shape.PCode, Name);
                return null;
            }

            ISceneChildEntity rootPart = baseEntity.GetChildPart(baseEntity.UUID);

            // if grass or tree, make phantom
            //rootPart.TrimPermissions();
            rootPart.AddFlag(PrimFlags.Phantom);
            if (rootPart.Shape.PCode != (byte) PCode.Grass)
                AdaptTree(ref shape);

            m_scene.SceneGraph.AddPrimToScene(baseEntity);
            baseEntity.SetGroup(groupID, ownerID, true);
            baseEntity.ScheduleGroupUpdate(PrimUpdateFlags.ForcedFullUpdate);

            return baseEntity;
        }
开发者ID:QueenStarfinder,项目名称:WhiteCore-Dev,代码行数:23,代码来源:VegetationModule.cs


示例7: AddNewPrim

        /// <summary>
        ///     Create a New SceneObjectGroup/Part by raycasting
        /// </summary>
        /// <param name="ownerID"></param>
        /// <param name="groupID"></param>
        /// <param name="pos"></param>
        /// <param name="rot"></param>
        /// <param name="shape"></param>
        public virtual ISceneEntity AddNewPrim(
            UUID ownerID, UUID groupID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape)
        {
            SceneObjectGroup sceneObject = new SceneObjectGroup(ownerID, pos, rot, shape, m_DefaultObjectName,
                                                                m_parentScene);

            // If an entity creator has been registered for this prim type then use that
            if (m_entityCreators.ContainsKey((PCode) shape.PCode))
            {
                sceneObject =
                    (SceneObjectGroup)
                    m_entityCreators[(PCode) shape.PCode].CreateEntity(sceneObject, ownerID, groupID, pos, rot, shape);
            }
            else
            {
                // Otherwise, use this default creation code;
                sceneObject.SetGroup(groupID, ownerID, false);
                AddPrimToScene(sceneObject);
                sceneObject.ScheduleGroupUpdate(PrimUpdateFlags.ForcedFullUpdate);
            }


            return sceneObject;
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:32,代码来源:SceneGraph.cs


示例8: BSPrimDisplaced

 public BSPrimDisplaced(uint localID, String primName, BSScene parent_scene, Vector3 pos, Vector3 size,
     Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical)
     : base(localID, primName, parent_scene, pos, size, rotation, pbs, pisPhysical)
 {
     ClearDisplacement();
 }
开发者ID:EnricoNirvana,项目名称:WhiteCore-Dev,代码行数:6,代码来源:BSPrimDisplaced.cs


示例9: SceneObjectGroup

        /// <summary>
        ///   Constructor.  This object is added to the scene later via AttachToScene()
        /// </summary>
        public SceneObjectGroup(UUID ownerID, Vector3 pos, Quaternion rot, PrimitiveBaseShape shape, string name,
                                IScene scene) : this(scene)
        {
            SceneObjectPart part = new SceneObjectPart(ownerID, shape, pos, rot, Vector3.Zero, name, scene);
            SetRootPart(part);

            //This has to be set, otherwise it will break things like rezzing objects in an area where crossing is disabled, but rez isn't
            m_lastSignificantPosition = pos;

            m_ValidgrpOOB = false;
        }
开发者ID:Gnu32,项目名称:Silverfin,代码行数:14,代码来源:SceneObjectGroup.cs


示例10: hasCutHollowDimpleProfileCut

        // Helper functions to understand if object has cut, hollow, dimple, and other affecting number of faces
        static void hasCutHollowDimpleProfileCut(int primType, PrimitiveBaseShape shape, out bool hasCut,
                                                         out bool hasHollow,
                                                         out bool hasDimple, out bool hasProfileCut)
        {
            if (primType == (int) PrimType.Box
                ||
                primType == (int) PrimType.Cylinder
                ||
                primType == (int) PrimType.Prism)

                hasCut = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0);
            else
                hasCut = (shape.PathBegin > 0) || (shape.PathEnd > 0);

            hasHollow = shape.ProfileHollow > 0;
            hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms
            hasProfileCut = hasDimple; // is it the same thing?
        }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:19,代码来源:SOPObject.cs


示例11: CreateMesh

        public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical)
        {
            Mesh mesh = null;
            ulong key = primShape.GetMeshKey(size, lod);

            if (size.X < 0.01f) size.X = 0.01f;
            if (size.Y < 0.01f) size.Y = 0.01f;
            if (size.Z < 0.01f) size.Z = 0.01f;

            if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh &&
                size.Z < minSizeForComplexMesh)
                mesh = CreateBoundingBoxMesh(size, key);
            else
                mesh = CreateMeshFromPrimMesher(primName, primShape, size, lod, key);

            return mesh;
        }
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:17,代码来源:Meshmerizer.cs


示例12: WriteShape

        private void WriteShape(XmlTextWriter writer, PrimitiveBaseShape shp, Dictionary<string, object> options)
        {
            if (shp != null)
            {
                writer.WriteStartElement("Shape");

                writer.WriteElementString("ProfileCurve", shp.ProfileCurve.ToString());

                writer.WriteStartElement("TextureEntry");
                byte[] te;
                if (shp.TextureEntry != null)
                    te = shp.TextureEntry;
                else
                    te = Utils.EmptyBytes;
                writer.WriteBase64(te, 0, te.Length);
                writer.WriteEndElement(); // TextureEntry

                writer.WriteStartElement("ExtraParams");
                byte[] ep;
                if (shp.ExtraParams != null)
                    ep = shp.ExtraParams;
                else
                    ep = Utils.EmptyBytes;
                writer.WriteBase64(ep, 0, ep.Length);
                writer.WriteEndElement(); // ExtraParams

                writer.WriteElementString("PathBegin", shp.PathBegin.ToString());
                writer.WriteElementString("PathCurve", shp.PathCurve.ToString());
                writer.WriteElementString("PathEnd", shp.PathEnd.ToString());
                writer.WriteElementString("PathRadiusOffset", shp.PathRadiusOffset.ToString());
                writer.WriteElementString("PathRevolutions", shp.PathRevolutions.ToString());
                writer.WriteElementString("PathScaleX", shp.PathScaleX.ToString());
                writer.WriteElementString("PathScaleY", shp.PathScaleY.ToString());
                writer.WriteElementString("PathShearX", shp.PathShearX.ToString());
                writer.WriteElementString("PathShearY", shp.PathShearY.ToString());
                writer.WriteElementString("PathSkew", shp.PathSkew.ToString());
                writer.WriteElementString("PathTaperX", shp.PathTaperX.ToString());
                writer.WriteElementString("PathTaperY", shp.PathTaperY.ToString());
                writer.WriteElementString("PathTwist", shp.PathTwist.ToString());
                writer.WriteElementString("PathTwistBegin", shp.PathTwistBegin.ToString());
                writer.WriteElementString("PCode", shp.PCode.ToString());
                writer.WriteElementString("ProfileBegin", shp.ProfileBegin.ToString());
                writer.WriteElementString("ProfileEnd", shp.ProfileEnd.ToString());
                writer.WriteElementString("ProfileHollow", shp.ProfileHollow.ToString());
                writer.WriteElementString("State", shp.State.ToString());

                writer.WriteElementString("ProfileShape", shp.ProfileShape.ToString());
                writer.WriteElementString("HollowShape", shp.HollowShape.ToString());

                WriteUUID(writer, "SculptTexture", shp.SculptTexture, options);
                writer.WriteElementString("SculptType", shp.SculptType.ToString());
                writer.WriteStartElement("SculptData");
                byte[] sd;
                //if (shp.SculptData != null)
                sd = shp.ExtraParams;
                //else
                //    sd = Utils.EmptyBytes;
                if (sd != null) writer.WriteBase64(sd, 0, sd.Length);
                writer.WriteEndElement(); // SculptData

                writer.WriteElementString("FlexiSoftness", shp.FlexiSoftness.ToString());
                writer.WriteElementString("FlexiTension", shp.FlexiTension.ToString());
                writer.WriteElementString("FlexiDrag", shp.FlexiDrag.ToString());
                writer.WriteElementString("FlexiGravity", shp.FlexiGravity.ToString());
                writer.WriteElementString("FlexiWind", shp.FlexiWind.ToString());
                writer.WriteElementString("FlexiForceX", shp.FlexiForceX.ToString());
                writer.WriteElementString("FlexiForceY", shp.FlexiForceY.ToString());
                writer.WriteElementString("FlexiForceZ", shp.FlexiForceZ.ToString());

                writer.WriteElementString("LightColorR", shp.LightColorR.ToString());
                writer.WriteElementString("LightColorG", shp.LightColorG.ToString());
                writer.WriteElementString("LightColorB", shp.LightColorB.ToString());
                writer.WriteElementString("LightColorA", shp.LightColorA.ToString());
                writer.WriteElementString("LightRadius", shp.LightRadius.ToString());
                writer.WriteElementString("LightCutoff", shp.LightCutoff.ToString());
                writer.WriteElementString("LightFalloff", shp.LightFalloff.ToString());
                writer.WriteElementString("LightIntensity", shp.LightIntensity.ToString());

                writer.WriteElementString("FlexiEntry", shp.FlexiEntry.ToString().ToLower());
                writer.WriteElementString("LightEntry", shp.LightEntry.ToString().ToLower());
                writer.WriteElementString("SculptEntry", shp.SculptEntry.ToString().ToLower());

                if (shp.Media != null)
                    writer.WriteElementString("Media", shp.Media.ToXml());

                writer.WriteEndElement(); // Shape
            }
        }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:88,代码来源:SceneObjectSerializer.cs


示例13: ProcessShpMedia

 private void ProcessShpMedia(PrimitiveBaseShape shp, XmlTextReader reader)
 {
     string value = reader.ReadElementContentAsString("Media", String.Empty);
     shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:5,代码来源:SceneObjectSerializer.cs


示例14: ProcessShpSculptEntry

 private void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlTextReader reader)
 {
     shp.SculptEntry = reader.ReadElementContentAsBoolean("SculptEntry", String.Empty);
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:4,代码来源:SceneObjectSerializer.cs


示例15: ProcessShpLightIntensity

 private void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlTextReader reader)
 {
     shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty);
 }
开发者ID:velus,项目名称:Async-Sim-Testing,代码行数:4,代码来源:SceneObjectSerializer.cs


示例16: HasCutHollowDimpleProfileCut

        /// <summary>
        ///   Tell us if this object has cut, hollow, dimple, and other factors affecting the number of faces
        /// </summary>
        /// <param name = "primType"></param>
        /// <param name = "shape"></param>
        /// <param name = "hasCut"></param>
        /// <param name = "hasHollow"></param>
        /// <param name = "hasDimple"></param>
        /// <param name = "hasProfileCut"></param>
        protected static void HasCutHollowDimpleProfileCut(PrimType primType, PrimitiveBaseShape shape, out bool hasCut,
                                                           out bool hasHollow,
                                                           out bool hasDimple, out bool hasProfileCut)
        {
            if (primType == PrimType.BOX
                ||
                primType == PrimType.CYLINDER
                ||
                primType == PrimType.PRISM)

                hasCut = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0);
            else
                hasCut = (shape.PathBegin > 0) || (shape.PathEnd > 0);

            hasHollow = shape.ProfileHollow > 0;
            hasDimple = (shape.ProfileBegin > 0) || (shape.ProfileEnd > 0); // taken from llSetPrimitiveParms
            hasProfileCut = hasDimple; // is it the same thing?
        }
开发者ID:JAllard,项目名称:Aurora-Sim,代码行数:27,代码来源:SceneObjectPart.cs


示例17: SceneObjectPart

        /// <summary>
        ///   Create a completely new SceneObjectPart (prim).  This will need to be added separately to a SceneObjectGroup
        /// </summary>
        /// <param name = "ownerID"></param>
        /// <param name = "shape"></param>
        /// <param name = "position"></param>
        /// <param name = "rotationOffset"></param>
        /// <param name = "offsetPosition"></param>
        public SceneObjectPart(
            UUID ownerID, PrimitiveBaseShape shape, Vector3 groupPosition,
            Quaternion rotationOffset, Vector3 offsetPosition, string name, IScene scene)
        {
            m_name = name;
            m_initialScene = scene;

            CreationDate = (int) Utils.DateTimeToUnixTime(DateTime.Now);
            _ownerID = ownerID;
            _creatorID = _ownerID;
            LastOwnerID = UUID.Zero;
            UUID = UUID.Random();
            Shape = shape;
            CRC = 1;
            _ownershipCost = 0;
            _flags = 0;
            _groupID = UUID.Zero;
            _objectSaleType = 0;
            _salePrice = 0;
            _category = 0;
            LastOwnerID = _creatorID;
            m_groupPosition = groupPosition;
            m_offsetPosition = offsetPosition;
            RotationOffset = rotationOffset;
            Velocity = Vector3.Zero;
            AngularVelocity = Vector3.Zero;
            Acceleration = Vector3.Zero;

            ValidpartOOB = false;

            // Prims currently only contain a single folder (Contents).  From looking at the Second Life protocol,
            // this appears to have the same UUID (!) as the prim.  If this isn't the case, one can't drag items from
            // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log

            Flags = 0;
            CreateSelected = true;

            TrimPermissions();
            //m_undo = new UndoStack<UndoState>(ParentGroup.GetSceneMaxUndo());

            m_inventory = new SceneObjectPartInventory(this);
        }
开发者ID:JAllard,项目名称:Aurora-Sim,代码行数:50,代码来源:SceneObjectPart.cs


示例18: CreateMeshFromPrimMesher

        private Mesh CreateMeshFromPrimMesher(string primName, PrimitiveBaseShape primShape, Vector3 size, float lod,
            ulong key)
        {
            PrimMesh primMesh;
            SculptMesh sculptMesh;

            List<Coord> coords = new List<Coord>();
            List<Face> faces = new List<Face>();

            Image idata = null;
            string decodedSculptFileName = "";

            if (primShape.SculptEntry)
            {
                if (((SculptType) primShape.SculptType & SculptType.Mesh) == SculptType.Mesh)
                {
                    if (!UseMeshesPhysicsMesh)
                        return null;

                    MainConsole.Instance.Debug("[MESH]: experimental mesh proxy generation");

                    OSD meshOsd = null;

                    if (primShape.SculptData == null || primShape.SculptData.Length <= 0)
                    {
                        //MainConsole.Instance.Error("[MESH]: asset data is zero length");
                        return null;
                    }

                    long start = 0;
                    using (MemoryStream data = new MemoryStream(primShape.SculptData))
                    {
                        try
                        {
                            meshOsd = OSDParser.DeserializeLLSDBinary(data);
                        }
                        catch (Exception e)
                        {
                            MainConsole.Instance.Error("[MESH]: Exception deserializing mesh asset header:" + e);
                        }
                        start = data.Position;
                    }

                    if (meshOsd is OSDMap)
                    {
                        OSDMap map = (OSDMap) meshOsd;
                        OSDMap physicsParms = new OSDMap();

                        if (map.ContainsKey("physics_cached"))
                        {
                            OSD cachedMeshMap = map["physics_cached"]; // cached data from Aurora
                            Mesh cachedMesh = new Mesh(key);
                            cachedMesh.Deserialize(cachedMeshMap);
                            cachedMesh.WasCached = true;
                            return cachedMesh; //Return here, we found all of the info right here
                        }
                        if (map.ContainsKey("physics_shape"))
                            physicsParms = (OSDMap) map["physics_shape"]; // old asset format
                        if (physicsParms.Count == 0 && map.ContainsKey("physics_mesh"))
                            physicsParms = (OSDMap) map["physics_mesh"]; // new asset format
                        if (physicsParms.Count == 0 && map.ContainsKey("physics_convex"))
                            // convex hull format, which we can't read, so instead
                            // read the highest lod that exists, and use it instead
                            physicsParms = (OSDMap) map["high_lod"];

                        int physOffset = physicsParms["offset"].AsInteger() + (int) start;
                        int physSize = physicsParms["size"].AsInteger();

                        if (physOffset < 0 || physSize == 0)
                            return null; // no mesh data in asset

                        OSD decodedMeshOsd = new OSD();
                        byte[] meshBytes = new byte[physSize];
                        Buffer.BlockCopy(primShape.SculptData, physOffset, meshBytes, 0, physSize);
                        try
                        {
                            using (MemoryStream inMs = new MemoryStream(meshBytes))
                            {
                                using (MemoryStream outMs = new MemoryStream())
                                {
                                    using (ZOutputStream zOut = new ZOutputStream(outMs))
                                    {
                                        byte[] readBuffer = new byte[2048];
                                        int readLen = 0;
                                        while ((readLen = inMs.Read(readBuffer, 0, readBuffer.Length)) > 0)
                                        {
                                            zOut.Write(readBuffer, 0, readLen);
                                        }
                                        zOut.Flush();
                                        outMs.Seek(0, SeekOrigin.Begin);

                                        byte[] decompressedBuf = outMs.GetBuffer();

                                        decodedMeshOsd = OSDParser.DeserializeLLSDBinary(decompressedBuf);
                                    }
                                }
                            }
                        }
                        catch (Exception e)
                        {
//.........这里部分代码省略.........
开发者ID:KSLcom,项目名称:Aurora-Sim,代码行数:101,代码来源:Meshmerizer.cs


示例19: getScriptPrimType

 static int getScriptPrimType(PrimitiveBaseShape primShape)
 {
     if (primShape.SculptEntry)
         return (int) PrimType.Sculpt;
     if ((primShape.ProfileCurve & 0x07) == (byte) ProfileShape.Square)
     {
         if (primShape.PathCurve == (byte) Extrusion.Straight)
             return (int) PrimType.Box;
         if (primShape.PathCurve == (byte) Extrusion.Curve1)
             return (int) PrimType.Tube;
     }
     else if ((primShape.ProfileCurve & 0x07) == (byte) ProfileShape.Circle)
     {
         if (primShape.PathCurve == (byte) Extrusion.Straight)
             return (int) PrimType.Cylinder;
         if (primShape.PathCurve == (byte) Extrusion.Curve1)
             return (int) PrimType.Torus;
     }
     else if ((primShape.ProfileCurve & 0x07) == (byte) ProfileShape.HalfCircle)
     {
         if (primShape.PathCurve == (byte) Extrusion.Curve1 || primShape.PathCurve == (byte) Extrusion.Curve2)
             return (int) PrimType.Sphere;
     }
     else if ((primShape.ProfileCurve & 0x07) == (byte) ProfileShape.EquilateralTriangle)
     {
         if (primShape.PathCurve == (byte) Extrusion.Straight)
             return (int) PrimType.Prism;
         if (primShape.PathCurve == (byte) Extrusion.Curve1)
             return (int) PrimType.Ring;
     }
     return (int) PrimType.NotPrimitive;
 }
开发者ID:Virtual-Universe,项目名称:Virtual-Universe,代码行数:32,代码来源:SOPObject.cs


示例20: AddPrim

 /*
 public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion rotation)
 {
     return null;
 }
 */
 public override PhysicsActor AddPrimShape(UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape, 
     Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
 {
     return null;
 }
开发者ID:justasabc,项目名称:Aurora-Sim,代码行数:11,代码来源:BasicPhysicsScene.cs



注:本文中的PrimitiveBaseShape类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# PrimitiveCombination2类代码示例发布时间:2022-05-24
下一篇:
C# Primitive类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap