Difference between revisions of "Local and World Space"

From Flowcode Help
Jump to navigationJump to search
Line 8: Line 8:
 
* An ''axis'' represented by the angles ''pitch'', ''yaw'', ''roll''. These are called ''Euler angles''.
 
* An ''axis'' represented by the angles ''pitch'', ''yaw'', ''roll''. These are called ''Euler angles''.
  
* A [[Object scale|scale]] to multiply the size of all [[Component tree|child objects]] by.
+
* A [[Object Scale|scale]] to multiply the size of all [[Component tree|child objects]] by.
  
 
This defines the '''local''' position of an object. That is, the position of the object without consideration of ''any other object on the panel''.
 
This defines the '''local''' position of an object. That is, the position of the object without consideration of ''any other object on the panel''.

Revision as of 15:56, 3 July 2013

This article discusses the difference between the position of an object on the Flowcode panel and how that position appears on screen.

A component position

The position of any object drawn on the panel is defined by three parts:

  • A set of coordinates, (X, Y, Z), which define the centre of the object.
  • An axis represented by the angles pitch, yaw, roll. These are called Euler angles.

This defines the local position of an object. That is, the position of the object without consideration of any other object on the panel.

This is a useful representation when writing components as the author of the component does not need to concern themselves with how the finished component will be positioned on the users panel.

All other representations of the objects position can be derived from this local position.

Bounding box

Error creating thumbnail: sh: convert: command not found
Scaling hierarchy

The bounding box of the object is exactly the same as its position, except that instead of a scale a size is used instead. This is the scale of the object multiplied by the size of all the child objects.

The size of a leaf object is equal to its scale, as the object has no children to multiply its scale by. Hence the bounding box of a leaf object is the same as its local position.


World position

The local position of an object does not consider the rotation, scale or coordinates of the objects parents. This is useful for working in 'isolation', where the author of a component wishes to be able to set exact positions of their objects without worrying about how the final component is positioned by the user.

When designing and positioning objects using the graphical editor it is often easier to consider a components position in terms of world space, that is the position of the object when all the objects parents are considered.

Flowcode will allow the world position to be controlled through the properties pane as this is considered the most intuitive way of picturing the system. However, local position or bounds may be selected individually for coordinates, size and rotation.