usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

LOColorMixFixtureAttribute Class Reference

A colour mix uses 3 channels to mix colours, these can be CMY,RGB or HSV. More...

#import <LOColorMixFixtureAttribute.h>

Inheritance diagram for LOColorMixFixtureAttribute:

LOProportionalFixtureAttribute LOFixtureAttribute

Public Member Functions

(id) - initWithName:mixType:
 Initilise as LOFixtureAttributeTypeColorMix with a name a specific colour mix type The addative value is set depending on the colour mix type (RGB being addative, other types being subtractive).
(LOColorMixType) - colorMixType
 Get the color mix type.
(void) - setColorMixType:
 Set the color mix type.
(void) - setRange:atIndex:forByte:
 Set the range for the given byte type.
(void) - setChannelNames
 Internal function to set the 3 channles names depending on the color mix type.
(BOOL) - updateOutputWithObject:
 Update the attributes output to a specific colour, automatically taking into account if its a 16 bit element, and the colour mix type.
(BOOL) - hasIntensity
 Check to see if this fixture implements an intensity channel through the colour mix.
(void) - setHasIntensity:
 Set if this mix attribute doubles as a virtual intensity channel.
(BOOL) - updateIntensityValue:
 Called by the channel manager via the fixture.
(BOOL) - updateOutputToValue:
 The same as calling updateIntensityValue.
(void) - updateOutputToColor:

Protected Attributes

LOColorMixType colorMixType
BOOL hasIntensity
 True if a virtual intensity channel is implemented.
unsigned char intensity
 The virtual intensity channel.
NSColor * color
 The unscaled color value.

Detailed Description

A colour mix uses 3 channels to mix colours, these can be CMY,RGB or HSV.

LED colour mixing is addative so is generally RGB or HSV. CMY on the other hand is subtractive and so is normaly used with filter wheels.


Member Function Documentation

- (LOColorMixType) colorMixType  

Get the color mix type.

See also:
- setColorMixType:

- (BOOL) hasIntensity  

Check to see if this fixture implements an intensity channel through the colour mix.

This happens on fixtures that do not have a real intensity channel (some LED fixtures)

Returns:
YES if the attribute doubles as an intensity channel
See also:
setHasIntensity;

- (id) initWithName: (NSString *)  aName
mixType: (LOColorMixType)  aType 

Initilise as LOFixtureAttributeTypeColorMix with a name a specific colour mix type The addative value is set depending on the colour mix type (RGB being addative, other types being subtractive).

- (void) setChannelNames  

Internal function to set the 3 channles names depending on the color mix type.

- (void) setColorMixType: (LOColorMixType)  theType  

Set the color mix type.

See also:
colorMixType:

- (void) setHasIntensity: (BOOL)  flag  

Set if this mix attribute doubles as a virtual intensity channel.

Parameters:
flag The flag for virtual intensity
See also:
hasIntensity

- (void) setRange: (LOFixtureRange *)  theRange
atIndex: (unsigned)  theIndex
forByte: (LOFixtureAttributeByteType)  byte 

Set the range for the given byte type.

Setting a MSB byte automatically changes the the attribute to 16 bit.

Parameters:
theRange The new range for the channel refered to by offset
theIndex (Zero indexed) depending on the colour type 0 = Red, Cyan, or Hue.
byte The type of range being set (MSB or LSB)

- (BOOL) updateIntensityValue: (unsigned char)  theValue  

Called by the channel manager via the fixture.

Do not call this function directly, or the channel managers intensity setting will be out of sync with the fixtures. Allways use the channel manager to set the intensity value of a fixture.

Parameters:
theValue The new intensity value
See also:
- updateOutputToValue:

- (void) updateOutputToColor: (NSColor *)  color  

Deprecated:
Use updateOutputWithObject
See also:
- updateOutputWithObject:

- (BOOL) updateOutputToValue: (unsigned)  theValue  

The same as calling updateIntensityValue.

Parameters:
theValue The value to update with
See also:
- updateIntensityValue:

Reimplemented from LOFixtureAttribute.

- (BOOL) updateOutputWithObject: (id)  anObject  

Update the attributes output to a specific colour, automatically taking into account if its a 16 bit element, and the colour mix type.

Parameters:
anObject (NSColor) The colour object to update this output to

Reimplemented from LOProportionalFixtureAttribute.


The documentation for this class was generated from the following files: