commit f3b94bd54a97d39d5e72cca8067a8d7e57751353
parent 15260ca0c8dd8fe9c330158b92de1a1f00f54225
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Fri, 12 May 2017 16:20:40 +0200
Move pivots before anchors in man.
Diffstat:
1 file changed, 47 insertions(+), 46 deletions(-)
diff --git a/doc/solstice-input.5.ronn b/doc/solstice-input.5.ronn
@@ -583,50 +583,6 @@ is instantiated 3 times into the scene:
transform: {translation: [10.5, 0, 0]}
children: [*my-template]
-### Anchor
-
-An `anchor` defines a relative position into the entity hierarchy. They are
-particularly useful for pivots and hyperbolic shapes that may have to reference
-a position relative to an entity whose transformations may also depends of its
-ancestor. An anchor has a `name` that must be unique for the whole sets of per
-entity anchors. An anchor is identified into the solar plant by concatenating,
-with the '.' character, its name to the `entity-identifier` of the entity into
-which it is declared. For instance, in the following example, the
-`anchor-identifier` of the anchor named `anchor0` is `level0.level1.anchor0`:
-
- entity:
- name: level0
- child:
- - name: level1
- anchor:
- - {name: anchor0, position: [0, 0, 0]}
- - {name: anchor1, position: [1, 2, 3]}
-
-In some situations, the `anchor-identifier` cannot be fully determined. Let a
-templated entity with a descendant referencing an anchor of one of its
-ancestor. On its declaration, the template is still not instantiated through a
-parent entity and consequently the name of the root entity is unknown.
-Moreover, the name of the root entity cannot be fixed since it changes for each
-instance of the template. To handle these cases, the `self` keyword allows to
-reference the unknown root entity of the currently declared hierarchy. In the
-following example, the entities `entity0.level0.level1` and
-`entity1.level0.level1` encapsulate a pivot that references the anchor
-`anchor0` defined in their respective parent `entity0.level0` and
-`entity1.level0`:
-
- - template: &my-template
- name: level0
- anchor: [{name: anchor0, position: [1, 2, 3]}]
- child:
- - name: level1
- pivot:
- x_pivot:
- ref_point: {0, 0, 0}
- target: {anchor: self.level0.anchor0}
-
- - entity: {name: entity0, child: [*my-template]}
- - entity: {name: entity1, child: [*my-template]}
-
### Pivot
A `pivot` is a special kind of node that can be used in the tree data structure
@@ -640,10 +596,11 @@ The most noticeable pivot's parameter is its `target`. Four different types of
targets are available:
* `position`:
- Defines the pivot's target as being an absolute point in world space.
+ Defines the pivot's target as being an absolute point in world coordinates.
* `anchor`:
- Defines the pivot's target as being a point defined through an anchor's name.
+ Defines the pivot's target as being a point defined through an anchor's name
+ (see below).
* `sun`:
Defines the pivot's target as being the center of the sun.
@@ -682,6 +639,50 @@ each with its own set of parameters and behaviour.
target point, or will have the specified direction (depending of the kind
of target).
+### Anchor
+
+An `anchor` defines a relative position into the entity hierarchy. They are
+particularly useful for pivots and hyperbolic shapes that may have to reference
+a position relative to an entity whose transformations may also depends of its
+ancestor. An anchor has a `name` that must be unique for the whole sets of per
+entity anchors. An anchor is identified into the solar plant by concatenating,
+with the '.' character, its name to the `entity-identifier` of the entity into
+which it is declared. For instance, in the following example, the
+`anchor-identifier` of the anchor named `anchor0` is `level0.level1.anchor0`:
+
+ entity:
+ name: level0
+ child:
+ - name: level1
+ anchor:
+ - {name: anchor0, position: [0, 0, 0]}
+ - {name: anchor1, position: [1, 2, 3]}
+
+In some situations, the `anchor-identifier` cannot be fully determined. Let a
+templated entity with a descendant referencing an anchor of one of its
+ancestor. On its declaration, the template is still not instantiated through a
+parent entity and consequently the name of the root entity is unknown.
+Moreover, the name of the root entity cannot be fixed since it changes for each
+instance of the template. To handle these cases, the `self` keyword allows to
+reference the unknown root entity of the currently declared hierarchy. In the
+following example, the entities `entity0.level0.level1` and
+`entity1.level0.level1` encapsulate a pivot that references the anchor
+`anchor0` defined in their respective parent `entity0.level0` and
+`entity1.level0`:
+
+ - template: &my-template
+ name: level0
+ anchor: [{name: anchor0, position: [1, 2, 3]}]
+ child:
+ - name: level1
+ pivot:
+ x_pivot:
+ ref_point: {0, 0, 0}
+ target: {anchor: self.level0.anchor0}
+
+ - entity: {name: entity0, child: [*my-template]}
+ - entity: {name: entity1, child: [*my-template]}
+
### Transform
A `transform` is used to move an `object` or an `entity` in space. The