IRtinVertexTrait

Description

[StaticTemplate]
interface Tinman.Terrain.Kernel.IRtinVertexTrait

Type trait for vertex index allocation and vertex data computation.

Public / Methods

Compute

2 overloads


public method Compute1 → (5)

in : int32

The vertex index.

in : int32

Index of left parent or -1 if none.

in : int32

Index of right parent or -1 if none.

in : int32

Index of grand parent.

in : int32

Index of ancestor.

Computes a new vertex.

This method is called for regular vertices that are create with:

       Diamond (even)                 Diamond (odd)

             A                              A
             +                              +
            /.\                            /.\
           / . \                          / . \
          /  .  \                        /  .  \
         /   .   \                      /   .   \
      LR/    .    \RL                LR/    .    \RL
       /\    .    /\                  /\    .    /\
      / [LR] . [RL] \                / [LR] . [RL] \
     /    \  .  /    \              /    \  .  /    \
    /      \ . /      \            /      \ . /      \
   /        \./        \          /        \./        \
L +-----[LL]-V-[RR]-----+ R    L +-----[RL]-V-[LR]-----+ R
   \        /.\        /          \        /.\        /
   [?L]    / . \    [?R]          [?R]    / . \    [?L]
     \    /  .  \    /              \    /  .  \    /
      \ [LL] . [RR] /                \ [LL] . [RR] /
       \/    .    \/                  \/    .    \/
      LL\    .    /RR                LL\    .    /RR
         \   .   /                      \   .   /
          \ [??]/                        \  .  /
           \ . /                          \ . /
            \./                            \./
             G                              G

public method Compute2 → (4)

in : int32

The vertex index.

hx in : int32

Heightmap X-coordinate, relative to HeightmapsUtil.MaxSize.

hy in : int32

Heightmap Y-coordinate, relative to HeightmapsUtil.MaxSize.

hz in : int32

Heightmap Z-coordinate, relative to HeightmapsUtil.MaxSize.

Computes a new vertex.

This method is called for skeleton vertices that are created in Rtin.Create.

Public / Attributes

Capacity


public attribute Capacity → (get)

value : int32

[>=256]
The vertex capacity.

Returns the vertex capacity.