Ejemplo n.º 1
0
 /// <summary>Adds a new knot to the back of a path camera's path.</summary>
 /// <description>
 ///
 /// </description>
 /// <param name="transform">Transform for the new knot.  In the form of "x y z ax ay az aa" such as returned by SceneObject::getTransform()</param>
 /// <param name="speed">Speed setting for this knot.</param>
 /// <param name="type">Knot type (Normal, Position Only, Kink).</param>
 /// <param name="path">%Path type (Linear, Spline).</param>
 /// <code>
 /// // Transform vector for new knot. (Pos_X Pos_Y Pos_Z Rot_X Rot_Y Rot_Z Angle)
 /// %transform = "15.0 5.0 5.0 1.4 1.0 0.2 1.0"
 ///
 /// // Speed setting for knot.
 /// %speed = "1.0"
 ///
 /// // Knot type. (Normal, Position Only, Kink)
 /// %type = "Normal";
 ///
 /// // Path Type. (Linear, Spline)
 /// %path = "Linear";
 ///
 /// // Inform the path camera to add a new knot to the back of its path
 /// %pathCamera.pushBack(%transform,%speed,%type,%path);
 /// </code>
 public void PushBack(TransformF transform = null, float speed = 1f, string type = "Normal", string path = "Linear")
 {
     transform = transform ?? new TransformF("0 0 0 0 0 0 0 false");
     transform.Alloc();             InternalUnsafeMethods.PushBack__Args _args = new InternalUnsafeMethods.PushBack__Args()
     {
         transform = transform.internalStructPtr,
         speed     = speed,
         type      = type,
         path      = path,
     };
     InternalUnsafeMethods.PushBack()(ObjectPtr, _args);
     transform.Free();
 }
Ejemplo n.º 2
0
        /// <summary>Mount objB to this object at the desired slot with optional transform.</summary>
        /// <description>
        ///
        /// </description>
        /// <param name="objB">Object to mount onto us</param>
        /// <param name="slot">Mount slot ID</param>
        /// <param name="txfm">(optional) mount offset transform</param>
        /// <returns>true if successful, false if failed (objB is not valid)</returns>
        public bool MountObject(SceneObject objB, string node, TransformF txfm = null)
        {
            txfm = txfm ?? new TransformF("0 0 0 1 0 0 0 true");
            txfm.Alloc();             InternalUnsafeMethods.MountObject__Args _args = new InternalUnsafeMethods.MountObject__Args()
            {
                objB = objB.ObjectPtr,
                node = node,
                txfm = txfm.internalStructPtr,
            };
            bool _engineResult = InternalUnsafeMethods.MountObject()(ObjectPtr, _args);

            txfm.Free();             return(_engineResult);
        }