|
Graphics.GPipe.Collada.Utils |
|
|
|
|
Description |
This module contains the data types of the Collada scene graph.
|
|
Synopsis |
|
|
|
|
General Tree utilities
|
|
|
Traverse a Tree top down, much like mapAccumL. The function recieves an accumulator from its parent and generates one that is passed down to its children.
Useful for accumulating transformations, etc.
|
|
|
Traverse a Tree bottom up, much like mapAccumR. The function recieves the accumulators of all its children and generates one that is passed up to its parent.
Useful for accumulating AABBs, etc.
|
|
|
Remove branches of a tree where the function evaluates to True. Useful for selecting LODs, etc.
|
|
Scene utilities
|
|
|
A path where the first string in the list is the closest ID and the rest is all SIDs found in order.
|
|
|
Traverse a tree top down accumulating the SIDPath for each node. The projection function enables this to be used on trees that are not Scenes.
The accumulated SIDPath for a node will include the node's SID at the end, but not its ID. The ID will however be the first String in the
SIDPaths of the children, and the nodes SID won't be included in this case.
|
|
|
Traverse a tree top down accumulating the absolute transform for each node. The projection function enables this to be used on trees that are not Scenes.
Use nodeMat to get the Mat44 Float from a node. The accumulated matrix for each node will contain the node's own transforms.
|
|
SID utilities
|
|
|
For each SID-attributed element in a list, apply the provided function. The elements where the function evaluates to Nothing are removed.
|
|
|
Find the first element in the list that is attributed with the provided SID.
|
|
Geometry utilities
|
|
|
Evaluates to True where the Map contains the semantic with the same type as the last argument (which is not evaluated and prefferably is a monotyped undefined).
|
|
|
Extract the value of a specific semantic from the Map. If the semantic is not found or the type is wrong, it evaluates to Nothing.
|
|
Debug utilities
|
|
|
Render the scene using a simple shading technique through the first camera found, or through a defult camera if the scene doesn't contain any cameras. The scene's lights aren't
used in the rendering. The source of this function can also serve as an example of how a Collada Scene can be processed.
|
|
Produced by Haddock version 2.7.2 |