Public Member Functions | Properties

TransferNode Class Reference

#import <TransferNode.h>

List of all members.

Public Member Functions

(id) - initWithColor:intensity:opacity:x:y:
(id) - initWithCoder:
(void) - encodeWithCoder:
(BOOL) - isEqualToPoint:
(NSColor *) - invertedNodeColor
(float) - getRed
(float) - getGreen
(float) - getBlue
(float) - getAlpha

Properties

NSColor * nodeColor
float intensity
float opacity
int x
int y

Detailed Description

Representation of a node object to represent within the TransferPanel. It has a fill color, intensity, opacity, x-coordinate and y-coordinate.


Member Function Documentation

- (void) encodeWithCoder: (NSCoder *)  coder

Encode all attributes of the node

Parameters:
coderThe NSCoder for encoding the attributes
- (float) getAlpha

Get the alpha compontent of the node color

Returns:
A float value between 0.0 and 1.0
- (float) getBlue

Get the blue compontent of the node color

Returns:
A float value between 0.0 and 1.0
- (float) getGreen

Get the green compontent of the node color

Returns:
A float value between 0.0 and 1.0
- (float) getRed

Get the red compontent of the node color

Returns:
A float value between 0.0 and 1.0
- (id) initWithCoder: (NSCoder *)  coder

Initialize a TransferNode for decoding with a NSCoder

Parameters:
coderThe NSCoder to decode the object attributes
Returns:
A pointer to the object
- (id) initWithColor: (NSColor *)  color
intensity: (float)  aIntensity
opacity: (float)  aOpacity
x: (int)  aX
y: (int)  aY 

Initialize a TransferNode

Parameters:
colorThe fill color of the node
aIntensityThe intensity of the node (Intensity is calculated throw x / width of the TransferPanel)
aOpacityThe intensity of the node (Intensity is calculated throw x / width of the TransferPanel)
aXThe x-coordinate of the node
aYThe y-coordinate of the node
Returns:
A pointer to the object
- (NSColor *) invertedNodeColor

Calculate the inverted NSColor of the node

Returns:
A NSColor object which represents the invertred node color
- (BOOL) isEqualToPoint: (NSPoint)  otherPoint

Compares the reciever to another point. The comparision takes a certain threshold into account (kMinNodeDistance)

Parameters:
otherPointThe NSPoint to be compared to the reciever
Returns:
YES if the points are equal or NO

Property Documentation

- (float) intensity [read, write, assign]
- (NSColor *) nodeColor [read, write, retain]
- (float) opacity [read, write, assign]
- (int) x [read, write, assign]
- (int) y [read, write, assign]

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines