Skip to content

Rework orientations

Cédric Vautrain edited this page Jan 18, 2023 · 8 revisions

Sites

CLI command

A site is always defined with the Y axis pointing north and the X axis pointing east (like default google map). So we don't need to give an orientation at this point.

+site:[name]
+si:[name]

Attributes

orientation is no longer required as a non standard attribute.

Buildings

CLI command

A building needs to have a rotation to turn it in the 3D space and fit the reality.

+building:[name]@[pos]@[size]@[rotation]  
+building:[name]@[pos]@[rotation]@[template]  
+bd:[name]@[pos]@[size]@[rotation]
+bd:[name]@[pos]@[rotation]@[template]

With rotation being a float in degrees (can be negative).

Attributes

New non standard attribute : rotation, required for a building.

Rooms

CLI command

To simplify the "old orientation" who defined 2 things, we split it into 2 arguments:

  • rotation to place the room in the 3D space
  • axisOrientation to define the x & y axis (origin of the room)
+room:[name]@[pos]@[size]@[rotation]@[axisOrientation]@[floorUnit]  
+room:[name]@[pos]@[rotation]@[template]
+ro:[name]@[pos]@[size]@[rotation]@[axisOrientation]@[floorUnit]  
+ro:[name]@[pos]@[rotation]@[template]

With rotation being a float in degrees (can be negative).
With axisOrientation being one of those:

  • +x+y
  • +x-y
  • -x-y
  • -x+y

Attributes

orientation is no longer required as a non standard attribute.
New non standard attribute : rotation, required for a room.
New non standard attribute : axisOrientation, required for a room.

Templates

Building templates

Buiding no longer needs orientation.

{
  "slug"          : "",
  "category"      : "building",
  "sizeWDHm"      : [ 0, 0, 0 ],
  "vertices"      : []
}

Room templates

The room template needs to be adapted as well: orientation becomes axisOrientation with same possible values as stated before.

{
  "slug"            : "",
  "category"        : "room",
  "axisOrientation" : "",
  "sizeWDHm"        : [],
  "floorUnit"       : "",
  "technicalArea"   : [],
  "reservedArea"    : [],
  "separators"      : [],
  "pillars"         : [],
  "colors"          : [],
  "tiles"           : [],
  "vertices"        : [],
  "rows"            : [],
  "tileAngle"       : 0
}
Clone this wiki locally