Source for file layout_profile.php

Documentation is available at layout_profile.php

  1. <?php
  2.     // This file is part of the Sloodle project (www.sloodle.org)
  3.     
  4.     /**
  5.     * This file defines structures for managing Sloodle layout profiles.
  6.     *
  7.     * @package sloodle
  8.     * @copyright Copyright (c) 2008 Sloodle (various contributors)
  9.     * @license http://www.gnu.org/licenses/gpl-3.0.html GNU GPL v3
  10.     *
  11.     * @contributor Peter R. Bloomfield
  12.     */
  13.     
  14.     
  15.     /**
  16.     * Stores data for a single entry in a layout profile.
  17.     * Used with {@link SloodleCourse}
  18.     * @package sloodle
  19.     */
  20.     class SloodleLayoutEntry
  21.     {
  22.     // DATA //
  23.     
  24.         /**
  25.         * The name of the object this entry represents.
  26.         * @var string 
  27.         * @access public
  28.         */
  29.         var $name = '';
  30.         
  31.         /**
  32.         * The position of the object, as a 3d vector, in string format "<x,y,z>"
  33.         * @var string 
  34.         * @access public
  35.         */
  36.         var $position = '<0.0,0.0,0.0>';
  37.         
  38.         /**
  39.         * The rotation of the object, as a 3d vector of Euler angles, in string format "<x,y,z>"
  40.         * @var string 
  41.         * @access public
  42.         */
  43.         var $rotation = '<0.0,0.0,0.0>';
  44.         
  45.         
  46.     // FUNCTIONS //
  47.     
  48.         /**
  49.         * Sets the position as separate X,Y,Z components
  50.         * @param float $x The X component to set
  51.         * @param float $y The Y component to set
  52.         * @param float $z The Z component to set
  53.         * @return void 
  54.         */
  55.         function set_position_xyz($x$y$z)
  56.         {
  57.             $this->position = "<$x,$y,$z>";
  58.         }
  59.         
  60.         /**
  61.         * Sets the rotation as separate X,Y,Z components
  62.         * @param float $x The X component to set
  63.         * @param float $y The Y component to set
  64.         * @param float $z The Z component to set
  65.         * @return void 
  66.         */
  67.         function set_rotation_xyz($x$y$z)
  68.         {
  69.             $this->rotation = "<$x,$y,$z>";
  70.         }
  71.         
  72.     }
  73.     
  74.  
  75. ?>

Documentation generated on Mon, 16 Jun 2008 15:56:27 +0100 by phpDocumentor 1.4.0