Example #1
0
 private void SpherePrimitiveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     RayTracerNet.SpherePrimitive sphere = RayTracerNet.SpherePrimitive.Create();
     sphere.position = Vector3.zero;
     sphere.euler    = Vector3.zero;
     sphere.scale    = Vector3.one;
 }
Example #2
0
        public static SpherePrimitive Create()
        {
            RayTracer instance = RayTracer.GetInstance();

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

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

            SpherePrimitive sphere = new SpherePrimitive(primitiveID);

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

            return(sphere);
        }