Ejemplo n.º 1
0
 /// <description>
 /// Set the object's transform (orientation and position).
 /// </description>
 /// <param name="txfm">object transform to set</param>
 public void SetTransform(TransformF txfm)
 {
     txfm.Alloc();             InternalUnsafeMethods.SetTransform__Args _args = new InternalUnsafeMethods.SetTransform__Args()
     {
         txfm = txfm.internalStructPtr,
     };
     InternalUnsafeMethods.SetTransform()(ObjectPtr, _args);
     txfm.Free();
 }
Ejemplo n.º 2
0
        /// <summary>Check if there is the space at the given transform is free to spawn into.</summary>
        /// <description>
        /// The shape's bounding box volume is used to check for collisions at the given world transform.  Only interior and static objects are checked for collision.
        /// </description>
        /// <param name="txfm">Deploy transform to check</param>
        /// <returns>True if the space is free, false if there is already something in the way.</returns>
        /// <remarks> This is a server side only check, and is not actually limited to spawning.
        /// </remarks>
        public bool CheckDeployPos(TransformF txfm)
        {
            txfm.Alloc();             InternalUnsafeMethods.CheckDeployPos__Args _args = new InternalUnsafeMethods.CheckDeployPos__Args()
            {
                txfm = txfm.internalStructPtr,
            };
            bool _engineResult = InternalUnsafeMethods.CheckDeployPos()(ObjectPtr, _args);

            txfm.Free();             return(_engineResult);
        }
Ejemplo n.º 3
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, float speed = 1f, string type = "Normal", string path = "Linear")
 {
     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.º 4
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, 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,
                txfm = txfm.internalStructPtr,
            };
            bool _engineResult = InternalUnsafeMethods.MountObject()(ObjectPtr, _args);

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