Exemplo n.º 1
0
 /// <description>
 /// Set the current position of the camera along the path.
 /// </description>
 /// <param name="position">Position along the path, from 0.0 (path start) - 1.0 (path end), to place the camera.</param>
 /// <code>
 /// // Set the camera on a position along its path from 0.0 - 1.0.
 /// %position = "0.35";
 ///
 /// // Force the pathCamera to its new position along the path.
 /// %pathCamera.setPosition(%position);
 /// </code>
 public void SetPosition(float position = 0f)
 {
     InternalUnsafeMethods.SetPosition__Args _args = new InternalUnsafeMethods.SetPosition__Args()
     {
         position = position,
     };
     InternalUnsafeMethods.SetPosition()(ObjectPtr, _args);
 }
Exemplo n.º 2
0
 /// <description>
 /// Set the object's world position.
 /// </description>
 /// <param name="pos">the new world position of the object</param>
 public void SetPosition(Point3F pos)
 {
     pos.Alloc();             InternalUnsafeMethods.SetPosition__Args _args = new InternalUnsafeMethods.SetPosition__Args()
     {
         pos = pos.internalStructPtr,
     };
     InternalUnsafeMethods.SetPosition()(ObjectPtr, _args);
     pos.Free();
 }
Exemplo n.º 3
0
        /// <summary>Gets the position in the stream</summary>
        /// <description>
        /// The easiest way to visualize this is to think of a cursor in a text file. If you have moved the cursor by five characters, the current position is 5. If you move ahead 10 more characters, the position is now 15. For StreamObject, when you read in the line the position is increased by the number of characters parsed, the null terminator, and a newline. Using setPosition allows you to skip to specific points of the file.
        /// </description>
        /// <code>
        /// // Create a file stream object for reading
        /// %fsObject = new FileStreamObject();
        ///
        /// // Open a file for reading
        /// // This file contains the following two lines:
        /// // 11111111111
        /// // Hello World
        /// %fsObject.open("./test.txt", "read");
        ///
        /// // Skip ahead by 12, which will bypass the first line entirely
        /// %fsObject.setPosition(12);
        ///
        /// // Read in the next line
        /// %line = %fsObject.readLine();
        ///
        /// // Print the line just read in, should be "Hello World"
        /// echo(%line);
        ///
        /// // Always remember to close a file stream when finished
        /// %fsObject.close();
        /// </code>
        /// <returns>Number of bytes which stream has parsed so far, null terminators and newlines are included</returns>
        /// <see cref="getPosition()" />
        public bool SetPosition(int newPosition)
        {
            InternalUnsafeMethods.SetPosition__Args _args = new InternalUnsafeMethods.SetPosition__Args()
            {
                newPosition = newPosition,
            };
            bool _engineResult = InternalUnsafeMethods.SetPosition()(ObjectPtr, _args);

            return(_engineResult);
        }