Profile

Parent element name: hill
Element name: profile

A profile is a continuous function that can be described as an Y(X) (when used as refy) or Z(X) (when used as refz) function where both X and Y are axes. They are the most important point when creating custom hill constructions. They allow the creation of such buildings as wind grids, towers, and more advanced things.

TIP

This section of the documentation contains things, that can't be described using only words. The best way to test the parameters described below is to use elements from already existing hills and play with them.

Starting with profiles

The root element of the profile is the profile. It takes two attributes.

NameTypeAllowed valuesDescriptionOptional
idStringA profile name
sideStringleft, rightPlacement in terms of refxTrue

Children elements

The starting point of every profile is the start element.

NameTypeDescriptionOptional
xFloatThe starting point in position relative to the X-axis
yFloatThe starting point in position relative to the Y-axis
refxStringA reference to the X-axis, which profile is based onTrue
refyStringA reference to the Y-axis, which profile is based onTrue

The next points are defined using the line element. As the profile is continuous, the start and lines will be connected in defined coordinates.

NameTypeDescriptionOptional
xFloatThe next point in position relative to the X-axis
yFloatThe next point in position relative to the Y-axis
refxStringA reference to the X-axis, which profile is based onTrue
refyStringA reference to the Y-axis, which profile is based onTrue

Required profiles

There are two required profiles that you have to define by yourself, without them, a hill won't load.

NamePlacement
inrun-leftThe left side of the inrun
inrun-rightThe right side of the inrun

Built-in profiles

DSJ4 already includes some predefined profiles (it's better to name them as references), that can be used to create basic constructions.

NamePlacementApplies for
dhillThe whole hillrefx
dhill-leftThe left side of the downhillrefz
dhill-rightThe right side of the downhillrefz
dhill-topThe top side of the downhillrefy
inrunThe whole inrunrefx
inrun-topThe top side of the inrunrefy
terrainThe terrainrefy

Code snippets

<!-- The most basic irnun-left profile definition -->
<profile id="inrun-left" side="left" maxstep="1000">
    <start x="-10" y="1.0" refx="inrun" />
    <line x="0" y="1.0" refx="dhill" />
</profile>
<!-- The most basic irnun-right profile definition -->
<profile id="inrun-right" side="right" maxstep="1000">
    <start x="-10" y="-1.0" refx="inrun" />
    <line x="0" y="-1.0" refx="dhill" />
</profile>