|
From: <ma...@us...> - 2011-12-19 16:42:39
|
Revision: 599
http://openautomation.svn.sourceforge.net/openautomation/?rev=599&view=rev
Author: mayerch
Date: 2011-12-19 16:42:30 +0000 (Mon, 19 Dec 2011)
Log Message:
-----------
Document the used XML structure of the config file.
Modified Paths:
--------------
JSFloorPlan/trunk/src/jsfloorplan.js
Modified: JSFloorPlan/trunk/src/jsfloorplan.js
===================================================================
--- JSFloorPlan/trunk/src/jsfloorplan.js 2011-12-18 21:37:40 UTC (rev 598)
+++ JSFloorPlan/trunk/src/jsfloorplan.js 2011-12-19 16:42:30 UTC (rev 599)
@@ -24,8 +24,112 @@
/**
* The JSFLOORPLAN3D object is the single global object created by the
* JSFloorPlan 3D library.
- * @module JSFloorPlan3D
- * @title JS Floor Plan 3D
+ * <p/>
+ * The definition of the config file is:
+ * <pre>
+ * <?xml version="1.0" encoding="UTF-8"?>
+ * <building name="MyBuilding" orientation="45">
+ * <floor name="UG" height="2.44">
+ * <nodes>
+ * <node id="1" x="5.51" y="0" z="0.9" />
+ * ...
+ * </nodes>
+ * <walls>
+ * <wall start="1" end="2" thickness=".24" texture="wall">
+ * <hole id="door01" distance="0.3" width="0.88" paparet="0.0" lintel="0.2" />
+ * ...
+ * </wall>
+ * ...
+ * </walls>
+ * <rooms>
+ * <room name="Bad">
+ * <zone name="all" onclick="alert('Bad')">
+ * <corner nodeid="1" />
+ * ...
+ * </zone>
+ * ...
+ * </room>
+ * </rooms>
+ * </floor>
+ * ...
+ * <textues>
+ * <texture />
+ * ...
+ * </textures>
+ * </building>
+ * </pre>
+ *
+ * The elements used are:
+ * <dl>
+ * <dt><code><b><building></b></code></dt>
+ * <dd>The attribute <code>orientation</code> defines a rotation of the local
+ * coordinate system to north.
+ * <ul>
+ * <li><code>orientation="0"</code> means that the x axis is looking
+ * north and the y axis is looking east.</li>
+ * <li><code>orientation="90"</code> means that the x axis is looking
+ * west and the y axis is looking south.</li>
+ * </ul>
+ * </dd>
+ * <dt><code><b><floor></b></code></dt>
+ * <dd>The <code>floor</code> element contains all relevant information
+ * about one floor of the building. The <code>name</code> attribute
+ * gives this floor its name and the <code>height</code> attribute
+ * defines the (maximum) height.
+ * </dd>
+ * <dt><code><b><nodes></b></code></dt>
+ * <dd>The contianer to contain all <code>node</code> elements of the floor.
+ * </dd>
+ * <dt><code><b><node></b></code></dt>
+ * <dd>A <code>node</code> is a point in x/y space where walls meet. It's the
+ * middle of all walls. If the walls have different thicknesses it might
+ * be necessary got define an offset in the corresponding <code>wall</code>
+ * element.<br />
+ * The <code>z</code> is optional and needed if this point of meeting
+ * walls is lower than the usual wall height. This might be used for a
+ * balustrade.
+ * </dd>
+ * <dt><code><b><walls></b></code></dt>
+ * <dd>The contianer to contain all <code>wall</code> elements of the floor.
+ * </dd>
+ * <dt><code><b><wall></b></code></dt>
+ * <dd>The <code>wall</code> element defines one visible wall that is spanned
+ * between the nodes with the IDs defined by the attributes
+ * <code>start</code> and <code>end</code>. The wall thickness is
+ * defined by the attribute <code>thickness</code>
+ * </dd>
+ * <dt><code><b><hole></b></code></dt>
+ * <dd>The <code>hole</code> element defines a hole in the wall, e.g. for a
+ * door or a window. It starts from the start node after
+ * <code>distance</code> meters and has a width as defined by the
+ * <code>width</code> attribute. The bottom is defined by the
+ * <code>paparet</code> attribute (so it's usually 0.0 for a door) and
+ * the top is defined by the <code>lintel</code> attribute.
+ * </dd>
+ * <dt><code><b><rooms></b></code></dt>
+ * <dd>The contianer of all rooms in this floor.
+ * </dd>
+ * <dt><code><b><room></b></code></dt>
+ * <dd>The contianer to hold all information about a room. The name of the
+ * room is defined by the <code>name</code> attribute.
+ * </dd>
+ * <dt><code><b><zone></b></code></dt>
+ * <dd>A room might consist out of multiple zones. But at least one is needed.
+ * </dd>
+ * <dt><code><b><corner></b></code></dt>
+ * <dd>Defining the corners of the zone by having the node IDs in the
+ * <code>nodeid</code> attribute.
+ * </dd>
+ * <dt><code><b><textues></b></code></dt>
+ * <dd>Container for the <code>texture</code> Elements.
+ * </dd>
+ * <dt><code><b><texture></b></code></dt>
+ * <dd>Currently unsued. In future the definition of the texture files.
+ * </dd>
+ * </dl>
+ *
+ * @module JavaScript FloorPlan 3D
+ * @title JS FloorPlan 3D
* @reqires jQuery, Three.js
*/
if (typeof JSFLOORPLAN3D == 'undefined' || !JSFLOORPLAN3D)
@@ -42,7 +146,7 @@
* @class JSFLOORPLAN3D
* @constructor FOO
*/
-JSFLOORPLAN3D= function () {
+JSFLOORPLAN3D = function () {
////////////////////////////////////////////////////////////////////////////
// Definition of the private variables
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|