commit 70062966fd1f310b217ed140505eaaa60e2993d4
parent cfcadaf52fdf8a818f5720b45ab17dd41eb07471
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 10 May 2017 16:07:11 +0200
Add template sub-section to the entity part of the solstice-input man
Diffstat:
1 file changed, 30 insertions(+), 11 deletions(-)
diff --git a/doc/solstice-input.5.ronn b/doc/solstice-input.5.ronn
@@ -530,28 +530,47 @@ its ancestors with its own name. This naming convention is used in the
entity:
name: level0
- geometry: ...
child:
- name: level1
- geometry: ...
child:
- name: level2
- geometry: ...
-An entity encapsulates either directly a `geometry` or a `pivot`. The former is
-a collection of `objects`, i.e. `shapes` with their associated `material`. The
+An entity encapsulates either a `geometry` or a `pivot`. The former is a
+collection of `objects`, i.e. `shapes` with their associated `material`. The
latter is used to control the dynamic positioning of the child entities with
respect to some constraints defined by the pivot type, and the sun directions
submitted by `solstice`(1). Each entity can also have a list of `anchors`. An
-anchor is used to define a position relative to the entity onto which the
-anchor is declared. The anchors are useful for pivots and hyperbolic shapes
-that may have to reference a position relative to an entity whose
-transformations may also depends of its parent.
+anchor is used to define a position relative to the entity into which it is
+declared.
+
+### Template
+
+A `template` is a first level entity with no existence into the solar plant. It
+is used to pre-declare an entity hierarchy that can then be instantiated
+several times in the solar plant by referencing it through common entities with
+YAML data tagging. In the following example, the templated entity `my-template`
+is instantiated 3 times into the scene:
-### Geometry
+ - template: &my-template
+ name: bar
+ geometry: ...
+ - entity:
+ name: foo0
+ transform: {translation: [-10.5, 0, 0]}
+ children: [*my-template]
+ - entity:
+ name: foo1
+ transform: {translation: [0, 0, 0]}
+ children: [*my-template]
+ - entity:
+ name: foo2
+ transform: {translation: [10.5, 0, 0]}
+ children: [*my-template]
### Pivot
+TODO
+
### Anchor
## EXAMPLES
@@ -565,6 +584,6 @@ transformations may also depends of its parent.
## SEE ALSO
-`solstice`(1)
+`solstice`(1), `solstice-receiver`(5)