Public Member Functions | |
TransferFunction () | |
Constructor creates a new transfer function. | |
Math.Vector3f | GetColorByCoord (float position) |
Returns the interpolated value at a specified position. The value for the position should be between 0 and 1. | |
Math.Vector3f | GetColorByIndex (int index) |
Returns a color from a specified node. | |
Math.Vector3f | GetColorByKey (int key) |
Returns a color specified by a key of the interpolated data. | |
float | GetCoordByIndex (int index) |
Calculates the percentaged position of the index. This depends on the resolution of the transfer function. | |
int | GetKeyByIndex (int index) |
Returns the key of the node with the specified index. The key depends on the resolution of the transfer function. | |
void | AddNodeByCoord (float position, Math.Vector3f color) |
Adds a node to the transfer function. A node is defined by its position and a color value. | |
void | RemoveNodeByCoord (float position, float range) |
Removes the node of the transfer function. The node is identified with the position which has been defined when the node has been added to the transfer function. | |
bool | ContainsNodeByCoord (float position, float range) |
Checks if the transfer function has a node at the specified position. | |
int | GetKeyByCoord (float position, float range) |
Converts a coordinate value into the according key value. Only a valid position is returned if a node exists with the calculated key. | |
void | ChangeNodeColorByCoord (float position, float range, Math.Vector3f color) |
If the node at the specified position exists, the color is changed. | |
void | MoveNodeByCoord (float oldPosition, float range, float translation) |
Moves a node if there exists one at the specified position. The node is distinguished by it's coords (within a range). The new position of the node is the old position plus the translation value. | |
bool | MoveNodeToNewCoord (float oldPosition, float range, float newPosition) |
Moves an existent node to a new position. | |
int | MoveNodeByKeyToNewCoord (int oldkey, float newPosition) |
Moves an existing node with the specified key to a new position given in coordinates. | |
Properties | |
int | IndexCount [get] |
Get the number of nodes. | |
Math.Vector3f[] | InterpolatedData [get] |
Returns an array of 3d vectors which represents the interpolated colors. |
FlowVis.Data.TransferFunction.TransferFunction | ( | ) |
Constructor creates a new transfer function.
Math.Vector3f FlowVis.Data.TransferFunction.GetColorByCoord | ( | float | position | ) |
Returns the interpolated value at a specified position. The value for the position should be between 0 and 1.
position | position for which the color value is retrieved |
Math.Vector3f FlowVis.Data.TransferFunction.GetColorByIndex | ( | int | index | ) |
Returns a color from a specified node.
index | index of the sorted list which contains all nodes |
Math.Vector3f FlowVis.Data.TransferFunction.GetColorByKey | ( | int | key | ) |
Returns a color specified by a key of the interpolated data.
key | A key is defined between zero and the resolution - 1 |
float FlowVis.Data.TransferFunction.GetCoordByIndex | ( | int | index | ) |
Calculates the percentaged position of the index. This depends on the resolution of the transfer function.
index | index of the sorted list which contains all nodes |
int FlowVis.Data.TransferFunction.GetKeyByIndex | ( | int | index | ) |
Returns the key of the node with the specified index. The key depends on the resolution of the transfer function.
index | index of the sorted list which contains all nodes |
void FlowVis.Data.TransferFunction.AddNodeByCoord | ( | float | position, | |
Math.Vector3f | color | |||
) |
Adds a node to the transfer function. A node is defined by its position and a color value.
position | Coordinate in the range of 0 and 1 | |
color | Color which should be specified at the new node |
void FlowVis.Data.TransferFunction.RemoveNodeByCoord | ( | float | position, | |
float | range | |||
) |
Removes the node of the transfer function. The node is identified with the position which has been defined when the node has been added to the transfer function.
position | Coordinate in the range of 0 and 1 | |
range | range around the position. The node is also deleted if it is located in this area |
bool FlowVis.Data.TransferFunction.ContainsNodeByCoord | ( | float | position, | |
float | range | |||
) |
Checks if the transfer function has a node at the specified position.
position | Coordinate in the range of 0 and 1 | |
range | Range which increases the area to look for the node |
int FlowVis.Data.TransferFunction.GetKeyByCoord | ( | float | position, | |
float | range | |||
) |
Converts a coordinate value into the according key value. Only a valid position is returned if a node exists with the calculated key.
position | Coordinate in the range of 0 to 1 | |
range | Range broadens the area in which for a node with the computed key is looked |
void FlowVis.Data.TransferFunction.ChangeNodeColorByCoord | ( | float | position, | |
float | range, | |||
Math.Vector3f | color | |||
) |
If the node at the specified position exists, the color is changed.
position | ||
color | ||
range |
void FlowVis.Data.TransferFunction.MoveNodeByCoord | ( | float | oldPosition, | |
float | range, | |||
float | translation | |||
) |
Moves a node if there exists one at the specified position. The node is distinguished by it's coords (within a range). The new position of the node is the old position plus the translation value.
oldPosition | ||
range | ||
translation | Translation given in coords (from 0 to 1). |
bool FlowVis.Data.TransferFunction.MoveNodeToNewCoord | ( | float | oldPosition, | |
float | range, | |||
float | newPosition | |||
) |
Moves an existent node to a new position.
oldPosition | ||
range | ||
newPosition |
int FlowVis.Data.TransferFunction.MoveNodeByKeyToNewCoord | ( | int | oldkey, | |
float | newPosition | |||
) |
Moves an existing node with the specified key to a new position given in coordinates.
oldkey | Key of the existing node | |
newPosition | Position given with coordinate in the range of 0 and 1 |
int FlowVis.Data.TransferFunction.IndexCount [get] |
Get the number of nodes.
Math.Vector3f [] FlowVis.Data.TransferFunction.InterpolatedData [get] |
Returns an array of 3d vectors which represents the interpolated colors.