Beispiel #1
0
 private void PlanePrimitiveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     RayTracerNet.PlanePrimitive plane = RayTracerNet.PlanePrimitive.Create();
     plane.position = Vector3.zero;
     plane.euler    = Vector3.zero;
     plane.scale    = Vector3.one;
 }
Beispiel #2
0
        public static PlanePrimitive Create()
        {
            RayTracer instance = RayTracer.GetInstance();

            if (!instance.IsInitialized())
            {
                return(null);
            }
            int primitiveID = CreatePlanePrimitive();

            if (primitiveID < 0)
            {
                return(null);
            }

            PlanePrimitive plane = new PlanePrimitive(primitiveID);

            MessageHandler.Broadcast <RayTracerObject>(MessageName.AddNewSceneObject, plane);

            return(plane);
        }