Exemple #1
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;
                }
            }
        }
Exemple #2
0
 protected override void onClickOculusTrigger(ref VREvent_t vrEvent)
 {
     curvePoints = new List <Point3d>();
     if (currentState == State.READY)
     {
         lockPlane    = true;
         stroke_g     = new Geometry.GeometryStroke(ref mScene);
         reducePoints = new List <Vector3>();
         currentState = State.PAINT;
     }
 }
Exemple #3
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);
        }