예제 #1
0
 /*!
  * @param world Vixen 3D world
  * Initializes the Vixen 3D environment for the given world.
  * If you do not provide an initial world, one is created for you.
  * This function does not start 3D display - RunVixen does that.
  * The world can only be initialized once - subsequent calls do nothing.
  *
  * @return -> Vixen SharedWorld or null if initialization failed
  */
 static public SharedWorld StartVixen(SharedWorld world)
 {
     if (world == null)
     {
         world = new Viewer3D();
     }
     if ((world == null) || !world.OnInit())
     {
         LogError("cannot initialize Vixen");
         return(null);
     }
     world.MakeLock();
     if (UsePhysics)
     {
         Physics.Startup();
     }
     return(world);
 }
예제 #2
0
 internal static HandleRef getCPtr(Viewer3D obj)
 {
     return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr);
 }