Пример #1
0
        public override RGBColor ShadeRay(World world, Ray ray, ref int depth)
        {
            //Console.WriteLine("ShadeRay");
            int     depthRef = 0;
            HitInfo info     = this.world.tracer.TraceRay(ray, ref depthRef);

            if (info.HitObject == null)
            {
                return(world.backgroundColor);
            }

            RGBColor finalColor = RGBColor.BLACK;

            Material.Material material = info.HitObject.Material;
            foreach (var light in world.lights)
            {
                if (world.AnyObstacleBetween(info.HitPoint, light.position))
                {
                    continue;
                }
                try
                {
                    finalColor += material.Radiance(info, 0);
                }
                catch (Exception e)
                {
                }
            }
            return(finalColor);
        }
Пример #2
0
        public MarkingMenu(ref Scene scene, MenuLayout2 layout = MenuLayout2.MainMenu) : base(ref scene)
        {
            mScene                  = scene;
            mLayout                 = layout;
            mNumSectors             = getNumSectors(layout);
            mFirstSectorOffsetAngle = getAngularMenuOffset(mNumSectors);
            mCurrentSelection       = -1;

            if (scene.isOculus)
            {
                mMinSelectionRadius   = 0.2f;
                mOuterSelectionRadius = 0.8f;
            }
            else
            {
                mMinSelectionRadius   = 0.4f;
                mOuterSelectionRadius = 0.6f;
            }


            Geometry.Geometry g = new Geometry.Geometry("C:\\workspace\\SparrowHawk\\src\\resources\\circle.obj");
            switch (mLayout)
            {
            }
            radialMenuMat        = new Material.RadialMenuMaterial(mScene.rhinoDoc, getTexturePath(mLayout));
            mSceneNode           = new SceneNode("MarkingMenu", ref g, ref radialMenuMat);
            mSceneNode.transform = new OpenTK.Matrix4(2, 0, 0, 0,
                                                      0, 0, -2, 0,
                                                      0, 2, 0, 0,
                                                      0, 0, 0, 1);

            UtilOld.showLaser(ref mScene, false);
        }
Пример #3
0
        public CreatePlane(ref Scene scene, CurveID curveID) : base(ref scene)
        {
            beforeCurveCount = mScene.iCurveList.Count;

            mesh_m = new Material.SingleColorMaterial(0.5f, 0.5f, 0, 0.4f);

            if (curveID == CurveID.ProfileCurve1)
            {
                shapeType = (ShapeType)mScene.selectionDic[SelectionKey.Profile1Shape];
                drawnType = (DrawnType)mScene.selectionDic[SelectionKey.Profile1On];
            }
            else if (curveID == CurveID.ProfileCurve2)
            {
                shapeType = (ShapeType)mScene.selectionDic[SelectionKey.Profile2Shape];
                drawnType = (DrawnType)mScene.selectionDic[SelectionKey.Profile2On];
            }

            if (scene.isOculus)
            {
                mMinSelectionRadius = 0.2f;
            }
            else
            {
                mMinSelectionRadius = 0.4f;
            }
        }
Пример #4
0
        /// <summary>
        /// Constructora que asigna todas las variables que definen la sección en unidades internacionales.
        /// </summary>
        /// <param name="name">Section name</param>
        /// <param name="shape">Shape name</param>
        /// <param name="material">Material</param>
        /// <param name="concreteProperties">Concrete properties (for concrete sections only)</param>
        /// <param name="t3">Width</param>
        /// <param name="t2">Height</param>
        /// <param name="tf">Hzt plate width</param>
        /// <param name="tw">Vertical plate width</param>
        /// <param name="t2b">Other dimension</param>
        /// <param name="tfb">Other dimension</param>
        /// <param name="dis">Distance between section parts</param>
        /// <param name="area">Cross area</param>
        /// <param name="torsConst">Torsional constant</param>
        /// <param name="i33">Moment of Inertia about 3 axis</param>
        /// <param name="i22">Moment of Inertia about 2 axis</param>
        /// <param name="as2">Shear area in 2 direction</param>
        /// <param name="as3">Shear area in 3 direcion</param>
        /// <param name="s33">Section modulus about 3 axis</param>
        /// <param name="s22">Section modulus about 2 axis</param>
        /// <param name="z33">Plastic modulus about 3 axis</param>
        /// <param name="z22">Plastic modulus about 2 axis</param>
        /// <param name="r33">Radius of gyration about 3 axis</param>
        /// <param name="r22">Radius of gyration about 2 axis</param>
        public FrameSection(string name, string shape, Material.Material material, ConcreteSectionProps concreteProperties, float t3, float t2, float tf, float tw, float t2b, float tfb, float dis, float area, float torsConst, float i33, float i22, float as2, float as3, float s33, float s22, float z33, float z22, float r33, float r22)
        {
            this.shape         = shape;
            this.material      = material;
            this.concreteProps = concreteProperties;
            contour            = new Microsoft.DirectX.Vector2[2][];

            this.t3        = t3;
            this.t2        = t2;
            this.tf        = tf;
            this.tw        = tw;
            this.t2b       = t2b;
            this.tfb       = tfb;
            this.dis       = dis;
            this.area      = area;
            this.torsConst = torsConst;
            this.i33       = i33;
            this.i22       = i22;
            this.as2       = as2;
            this.as3       = as3;
            this.s33       = s33;
            this.s22       = s22;
            this.z33       = z33;
            this.z22       = z22;
            this.r33       = r33;
            this.r22       = r22;
            Name           = name;

            initContourAndLOD();
        }
Пример #5
0
        private void LoadTxtCatalog(Catalog <Section> cat, string filePath)
        {
            Stream       stream = File.Open(filePath, FileMode.Open);
            StreamReader reader = new StreamReader(stream);

            Material.Material    mat = Material.MaterialManager.Instance.DefaultSteel;
            ConcreteSectionProps csp = null;

            try
            {
                while (!reader.EndOfStream)
                {
                    string   line = reader.ReadLine();
                    string[] arr  = line.Split("\t".ToCharArray());
                    if (arr.Length == 23)
                    {
                        Section sec = NewSection(mat, csp, arr);
                        cat[sec.Name] = sec;
                    }
                }
            }
            finally
            {
                reader.Close();
                stream.Close();
            }
        }
Пример #6
0
 public AddPoint(ref Scene scene) : base(ref scene)
 {
     mScene       = scene;
     point_g      = new Geometry.PointMarker(new Vector3());
     point_m      = new Material.SingleColorMaterial(0f, .5f, 1f, 1f);
     currentState = State.READY;
 }
Пример #7
0
        public static Section NewSection(Material.Material mat, ConcreteSectionProps csp, string[] arr)
        {
            if (arr.Length == 23)
            {
                switch (arr[1])
                {
                case "Double Angle":
                    return(new DoubleAngle(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                case "Channel":
                    return(new Channel(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                case "I/Wide Flange":
                    return(new IWideFlange(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                case "Box/Tube":
                    return(new BoxTube(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                case "Pipe":
                    return(new Pipe(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                case "Angle":
                    return(new Angle(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                case "Tee":
                    return(new Tee(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));

                default:
                    return(new General(arr[0], arr[1], mat, csp, Convert.ToSingle(arr[4]), Convert.ToSingle(arr[5]), Convert.ToSingle(arr[6]), Convert.ToSingle(arr[7]), Convert.ToSingle(arr[8]), Convert.ToSingle(arr[9]), Convert.ToSingle(arr[10]), Convert.ToSingle(arr[11]), Convert.ToSingle(arr[12]), Convert.ToSingle(arr[13]), Convert.ToSingle(arr[14]), Convert.ToSingle(arr[15]), Convert.ToSingle(arr[16]), Convert.ToSingle(arr[17]), Convert.ToSingle(arr[18]), Convert.ToSingle(arr[19]), Convert.ToSingle(arr[20]), Convert.ToSingle(arr[21]), Convert.ToSingle(arr[22])));
                }
            }
            return(null);
        }
Пример #8
0
 public Stroke(ref Scene scene, uint devIndex) : base(ref scene)
 {
     stroke_g           = new Geometry.GeometryStroke(ref scene);
     stroke_m           = new Material.SingleColorMaterial(1, 0, 0, 1);
     currentState       = State.READY;
     primaryDeviceIndex = devIndex;
 }
Пример #9
0
        public CreatePatch(ref Scene s, bool drawOnP) : base(ref s)
        {
            stroke_g     = new Geometry.GeometryStroke(ref mScene);
            stroke_m     = new Material.SingleColorMaterial(1, 0, 0, 1);
            mesh_m       = new Material.RGBNormalMaterial(.5f);
            currentState = State.READY;

            onPlane = drawOnP;

            if (onPlane)
            {
                Geometry.Geometry geo = new Geometry.PointMarker(new OpenTK.Vector3(0, 0, 0));
                Material.Material m   = new Material.SingleColorMaterial(250 / 255, 128 / 255, 128 / 255, 1);
                drawPoint           = new SceneNode("Point", ref geo, ref m);
                drawPoint.transform = new OpenTK.Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
                mScene.tableGeometry.add(ref drawPoint);

                //TODO-support both controllers
                if (mScene.mIsLefty)
                {
                    primaryDeviceIndex = (uint)mScene.leftControllerIdx;
                }
                else
                {
                    primaryDeviceIndex = (uint)mScene.rightControllerIdx;
                }
            }
        }
Пример #10
0
 public void AddQuadToScene(World world, Material.Material material)
 {
     triangle1.Material = material;
     triangle2.Material = material;
     world.AddObject(triangle1);
     world.AddObject(triangle2);
 }
Пример #11
0
 public Rectangular(string name, Material.Material material, ConcreteSectionProps concreteProperties, float b, float h)
     : base(name, "R", material, concreteProperties)
 {
     t3 = h;
     t2 = b;
     initContourAndLOD();
 }
Пример #12
0
 public void AddModelToScene(World world, Material.Material material)
 {
     foreach (Triangle triangle in this.triangles)
     {
         triangle.Material = material;
         world.AddObject(triangle);
     }
 }
Пример #13
0
 public Tee(string name, string shape, Material.Material material, ConcreteSectionProps concreteProperties, float t3, float t2, float tf, float tw)
     : base(name, shape, material, concreteProperties)
 {
     this.t3 = t3;
     this.t2 = t2;
     this.tf = tf;
     this.tw = tw;
     initContourAndLOD();
 }
Пример #14
0
        public CreateCurve(ref Scene scene, bool _isClosed, CurveID curveID) : base(ref scene)
        {
            beforeCurveCount = mScene.iCurveList.Count;
            stroke_g         = new Geometry.GeometryStroke(ref mScene);
            stroke_m         = new Material.SingleColorMaterial(1, 0, 0, 1);
            mesh_m           = new Material.RGBNormalMaterial(0.5f);
            railPlane_m      = new Material.SingleColorMaterial(34f / 255f, 139f / 255f, 34f / 255f, 0.4f);
            isClosed         = _isClosed;
            rayCastingObjs   = new List <ObjRef>();

            resetVariables();

            FunctionType modelFun = (FunctionType)mScene.selectionDic[SelectionKey.ModelFun];

            //0:3D, 1:onDPlanes, 2: onSurfaces, 3: onTargets
            if (curveID == CurveID.ProfileCurve1)
            {
                drawnType = (DrawnType)mScene.selectionDic[SelectionKey.Profile1On];
                //Revolve only needs 1 profilecurve in our case
                if (modelFun == FunctionType.Revolve)
                {
                    dynamicRender = "Revolve";
                }
            }
            else if (curveID == CurveID.ProfileCurve2)
            {
                drawnType = (DrawnType)mScene.selectionDic[SelectionKey.Profile2On];

                //need to visualize the model

                switch (modelFun)
                {
                case FunctionType.Extrude:
                    dynamicRender = "Extrude";
                    break;

                case FunctionType.Loft:
                    dynamicRender = "Loft";
                    break;

                case FunctionType.Sweep:
                    dynamicRender = "Sweep";
                    break;
                }
            }

            /*
             * foreach(Curve c in mScene.iCurveList)
             * {
             *  localListCurve.Add(c);
             * }
             */

            //testing
            localListCurve = mScene.iCurveList;
        }
Пример #15
0
 public BoxTube(string name, string shape, Material.Material material, ConcreteSectionProps concreteProperties, float t3, float t2, float tf, float tw)
     : base(name, shape, material, concreteProperties)
 {
     this.t3  = t3;
     this.t2  = t2;
     this.tf  = tf;
     this.tw  = tw;
     this.t2b = 0;
     this.tfb = 0;
     this.dis = 0;
     UpdateData();
 }
Пример #16
0
 public Pipe(string name, string shape, Material.Material material, ConcreteSectionProps concreteProperties, float t3, float tw)
     : base(name, shape, material, concreteProperties)
 {
     this.t3  = t3;
     this.t2  = 0;
     this.tf  = 0;
     this.tw  = tw;
     this.t2b = 0;
     this.tfb = 0;
     this.dis = 0;
     initContourAndLOD();
 }
Пример #17
0
        private void initScene()
        {
            //OpenCV Cube init
            objectList = new List <MCvPoint3D32f>();
            for (int i = 0; i < _height; i++)
            {
                for (int j = 0; j < _width; j++)
                {
                    objectList.Add(new MCvPoint3D32f(j * _squareSize, i * _squareSize, 0.0F));
                }
            }

            axisPoints = new List <MCvPoint3D32f>();
            axisPoints.Add(new MCvPoint3D32f(0.0f, 0.0f, 0.0f));
            axisPoints.Add(new MCvPoint3D32f(3.0f, 0.0f, 0.0f));
            axisPoints.Add(new MCvPoint3D32f(0.0f, 3.0f, 0.0f));
            axisPoints.Add(new MCvPoint3D32f(0.0f, 0.0f, -3.0f));

            cubePoints = new List <MCvPoint3D32f>();
            cubePoints.Add(new MCvPoint3D32f(0.0f, 0.0f, 0.0f));
            cubePoints.Add(new MCvPoint3D32f(0.0f, 3.0f, 0.0f));
            cubePoints.Add(new MCvPoint3D32f(3.0f, 3.0f, 0.0f));
            cubePoints.Add(new MCvPoint3D32f(3.0f, 0.0f, 0.0f));
            cubePoints.Add(new MCvPoint3D32f(0.0f, 0.0f, -3.0f));
            cubePoints.Add(new MCvPoint3D32f(0.0f, 3.0f, -3.0f));
            cubePoints.Add(new MCvPoint3D32f(3.0f, 3.0f, -3.0f));
            cubePoints.Add(new MCvPoint3D32f(3.0f, 0.0f, -3.0f));

            //OpenGL objects init
            marker_cube_g = new Geometry.CubeGeometry(3.0f, 3.0f, -3.0f);
            marker_cube_m = new Material.TextureMaterial(mScene.rhinoDoc, "texture.jpg", false);

            controller_cube_g = new Geometry.CubeGeometry(0.05f, 0.05f, -0.05f);
            controller_cube_m = new Material.TextureMaterial(mScene.rhinoDoc, "texture.jpg", false);

            //TODO- how to deal with controllerPose ?
            //SceneNode controller_cube = new SceneNode("controller_cube", ref controller_cube_g, ref controller_cube_m); ;
            //mScene.staticGeometry.add(ref controller_cube);

            //we need eyepose before calibration
            if (mHMD == null)
            {
                mEyePosLeft = new Matrix4();
            }

            Valve.VR.HmdMatrix34_t M_L = mHMD.GetEyeToHeadTransform(Valve.VR.EVREye.Eye_Left);
            mEyePosLeft = UtilOld.steamVRMatrixToMatrix4(M_L).Inverted();
            Valve.VR.HmdMatrix34_t M_R = mHMD.GetEyeToHeadTransform(Valve.VR.EVREye.Eye_Right);
            mEyePosRight = UtilOld.steamVRMatrixToMatrix4(M_R).Inverted();
        }
Пример #18
0
 private void btnAddMaterial_Click(object sender, EventArgs e)
 {
     try
     {
         Material.Material material = new Material.Material(PROF_IT.Common.Enumerations.TypeForm.NewForm, VehicleMember);
         if (material.ShowDialog() == DialogResult.OK)
         {
             this.gdcMaterial.DataSource = new BL.Internal.Material().GetByVehicle(VehicleMember);
         }
     }
     catch (System.Exception exception1)
     {
         System.Exception thisException = exception1;
         Management.ShowException(thisException);
     }
 }
Пример #19
0
 private void gdvMaterial_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         GridView          view        = (GridView)sender;
         MaterialObject    materialObj = (MaterialObject)view.GetRow(view.FocusedRowHandle);
         Material.Material material    = new Material.Material(PROF_IT.Common.Enumerations.TypeForm.PropertyForm, materialObj);
         material.ShowDialog();
         this.gdcMaterial.DataSource = new BL.Internal.Material().GetByVehicle(VehicleMember);
     }
     catch (System.Exception excepion1)
     {
         System.Exception thisException = excepion1;
         Management.ShowException(thisException);
     }
 }
Пример #20
0
        public ShellSection(string name, string shape, Material.Material material, float thicknessMembrane, float thicknessBending, ShellType type, float materialAngle, ShellDesignParams designParams)
            : base(name, shape, material)
        {
            this.thicknessBending  = thicknessBending;
            this.thicknessMembrane = thicknessMembrane;
            this.shellType         = type;
            this.materialAngle     = materialAngle;

            if (designParams != null)
            {
                this.designParams = designParams;
            }
            else
            {
                this.designParams = new ShellDesignParams();
            }
        }
Пример #21
0
        public CreatePatch(ref Scene s) : base(ref s)
        {
            mScene       = s;
            stroke_g     = new Geometry.GeometryStroke(ref mScene);
            stroke_m     = new Material.SingleColorMaterial(1, 0, 0, 1);
            mesh_m       = new Material.RGBNormalMaterial(.5f);
            currentState = State.READY;

            //TODO-support both controllers
            if (mScene.mIsLefty)
            {
                primaryDeviceIndex = (uint)mScene.leftControllerIdx;
            }
            else
            {
                primaryDeviceIndex = (uint)mScene.rightControllerIdx;
            }

            UtilOld.showLaser(ref mScene, false);
        }
Пример #22
0
        public Stroke(ref Scene scene, bool drawOnP) : base(ref scene)
        {
            mScene       = scene;
            stroke_g     = new Geometry.GeometryStroke(ref mScene);
            stroke_m     = new Material.SingleColorMaterial(1, 0, 0, 1);
            currentState = State.READY;
            onPlane      = drawOnP;

            if (onPlane)
            {
                //clear previous drawpoint
                if (mScene.tableGeometry.children.Count > 0)
                {
                    foreach (SceneNode sn in mScene.tableGeometry.children)
                    {
                        if (sn.name == "drawPoint")
                        {
                            mScene.tableGeometry.children.Remove(sn);
                            break;
                        }
                    }
                }

                Geometry.Geometry geo = new Geometry.PointMarker(new OpenTK.Vector3(0, 0, 0));
                Material.Material m   = new Material.SingleColorMaterial(250 / 255, 128 / 255, 128 / 255, 1);
                drawPoint           = new SceneNode("drawPoint", ref geo, ref m);
                drawPoint.transform = new OpenTK.Matrix4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
                mScene.tableGeometry.add(ref drawPoint);
                //mScene.staticGeometry.add(ref drawPoint);

                //TODO-support both controllers
                if (mScene.mIsLefty)
                {
                    primaryDeviceIndex = (uint)mScene.leftControllerIdx;
                }
                else
                {
                    primaryDeviceIndex = (uint)mScene.rightControllerIdx;
                }
            }
        }
Пример #23
0
        public AddPoint(ref Scene scene, int num, CurveID curveID) : base(ref scene)
        {
            mScene           = scene;
            beforeCurveCount = mScene.iCurveList.Count;
            point_g          = new Geometry.PointMarker(new Vector3());
            point_m          = new Material.SingleColorMaterial(0f, .5f, 1f, 1f);

            if (curveID == CurveID.ProfileCurve1)
            {
                drawnType = (DrawnType)mScene.selectionDic[SelectionKey.Profile1On];
                shapeType = (ShapeType)mScene.selectionDic[SelectionKey.Profile1Shape];
            }
            else if (curveID == CurveID.ProfileCurve2)
            {
                drawnType = (DrawnType)mScene.selectionDic[SelectionKey.Profile2On];
                shapeType = (ShapeType)mScene.selectionDic[SelectionKey.Profile2Shape];
            }

            maxNumPoint    = num;
            profile_m      = new Material.SingleColorMaterial(0.5f, 0, 0, 0.4f);
            rayCastingObjs = new List <ObjRef>();

            resetVariables();
        }
Пример #24
0
 public Angle(string name, string shape, Material.Material material, ConcreteSectionProps concreteProperties, float t3, float t2, float tf, float tw, float t2b, float tfb, float dis, float area, float torsConst, float i33, float i22, float as2, float as3, float s33, float s22, float z33, float z22, float r33, float r22)
     : base(name, shape, material, concreteProperties, t3, t2, tf, tw, t2b, tfb, dis, area, torsConst, i33, i22, as2, as3, s33, s22, z33, z22, r33, r22)
 {
 }
Пример #25
0
 public Circle(string name, Material.Material material, ConcreteSectionProps concreteProperties, float d)
     : base(name, "RN", material, concreteProperties)
 {
     t3 = d;
     initContourAndLOD();
 }
Пример #26
0
 private void gdvMaterial_DoubleClick(object sender, EventArgs e)
 {
     try
     {
         GridView view = (GridView)sender;
         MaterialObject materialObj = (MaterialObject)view.GetRow(view.FocusedRowHandle);
         Material.Material material = new Material.Material(PROF_IT.Common.Enumerations.TypeForm.PropertyForm, materialObj);
         material.ShowDialog();
         this.gdcMaterial.DataSource = new BL.Internal.Material().GetByVehicle(VehicleMember);
     }
     catch (System.Exception excepion1)
     {
         System.Exception thisException = excepion1;
         Management.ShowException(thisException);
     }
 }
Пример #27
0
 private void btnAddMaterial_Click(object sender, EventArgs e)
 {
     try
     {
         Material.Material material = new Material.Material(PROF_IT.Common.Enumerations.TypeForm.NewForm, VehicleMember);
         if (material.ShowDialog() == DialogResult.OK)
         {
             this.gdcMaterial.DataSource = new BL.Internal.Material().GetByVehicle(VehicleMember);
         }
     }
     catch (System.Exception exception1)
     {
         System.Exception thisException = exception1;
         Management.ShowException(thisException);
     }
 }
 public ShellLayeredSection(string name, string shape, Material.Material material) : base(name, shape, material)
 {
 }
Пример #29
0
 public void RemoveMaterialAndRespectiveAlgorithms(Material.Material material)
 {
     ProductMaterialList.Remove(new ProductMaterial(this.Reference, material.Reference));
 }
Пример #30
0
 public Stroke(ref Scene scene) : base(ref scene)
 {
     stroke_g     = new Geometry.GeometryStroke(ref mScene);
     stroke_m     = new Material.SingleColorMaterial(1, 0, 0, 1);
     currentState = State.READY;
 }
Пример #31
0
        /// <summary>
        /// Constructora que asigna todas las variables que definen la sección en unidades internacionales.
        /// </summary>
        /// <param name="name">Section name</param>
        /// <param name="shape">Shape name</param>
        /// <param name="material">Material</param>
        /// <param name="concreteProperties">Concrete properties (for concrete sections only)</param>
        /// <param name="t3">Width</param>
        /// <param name="t2">Height</param>
        /// <param name="tf">Hzt plate width</param>
        /// <param name="tw">Vertical plate width</param>
        /// <param name="t2b">Other dimension</param>
        /// <param name="tfb">Other dimension</param>
        /// <param name="dis">Distance between section parts</param>
        /// <param name="area">Cross area</param>
        /// <param name="torsConst">Torsional constant</param>
        /// <param name="i33">Moment of Inertia about 3 axis</param>
        /// <param name="i22">Moment of Inertia about 2 axis</param>
        /// <param name="as2">Shear area in 2 direction</param>
        /// <param name="as3">Shear area in 3 direcion</param>
        /// <param name="s33">Section modulus about 3 axis</param>
        /// <param name="s22">Section modulus about 2 axis</param>
        /// <param name="z33">Plastic modulus about 3 axis</param>
        /// <param name="z22">Plastic modulus about 2 axis</param>
        /// <param name="r33">Radius of gyration about 3 axis</param>
        /// <param name="r22">Radius of gyration about 2 axis</param>
        public FrameSection(string name, string shape, Material.Material material, ConcreteSectionProps concreteProperties, float t3, float t2, float tf, float tw, float t2b, float tfb, float dis, float area, float torsConst, float i33, float i22, float as2, float as3, float s33, float s22, float z33, float z22, float r33, float r22)
        {
            this.shape = shape;
            this.material = material;
            this.concreteProps = concreteProperties;
            contour = new Microsoft.DirectX.Vector2[2][];

            this.t3 = t3;
            this.t2 = t2;
            this.tf = tf;
            this.tw = tw;
            this.t2b = t2b;
            this.tfb = tfb;
            this.dis = dis;
            this.area = area;
            this.torsConst = torsConst;
            this.i33 = i33;
            this.i22 = i22;
            this.as2 = as2;
            this.as3 = as3;
            this.s33 = s33;
            this.s22 = s22;
            this.z33 = z33;
            this.z22 = z22;
            this.r33 = r33;
            this.r22 = r22;
            Name = name;

            initContourAndLOD();
        }
Пример #32
0
 public ShellDesignParams()
 {
     rebarLayout = ShellRebarLayouts.Default;
     topBar1 = topBar2 = bottomBar1 = bottomBar2 = 0;
     rebarMaterial = Material.MaterialManager.Instance.DefaultRebar;
 }
Пример #33
0
 public AreaSection(string name, string shape, Material.Material material)
 {
     Name          = name;
     this.shape    = shape;
     this.material = material;
 }
Пример #34
0
 public PlaneSection(string name, string shape, Material.Material material) : base(name, shape, material)
 {
 }
Пример #35
0
 public AreaSection(string name, string shape, Material.Material material)
 {
     Name = name;
     this.shape = shape;
     this.material = material;
 }