|
3rd Eye Scene C#
3rd Eye Scene C# documentation
|
A utility class representing a colour as a 32-bit integer. More...
Public Types | |
| enum | Channel { B, G, R, A } |
| An enumeration of the various colour channels. More... | |
Public Member Functions | |
| Colour (uint value) | |
| Initialises a colour from a 32-bit integer. | |
| Colour (int r, int g, int b, int a=255) | |
| Initialises a colour from individual colour values. | |
| byte | GetChannel (Channel c) |
| Get the value of the requested colour channel. | |
| void | SetChannel (Channel c, byte val) |
| Set the value of the indicated colour channel. | |
Static Public Member Functions | |
| static int | GetShift (Channel c) |
| Returns the bit shift required to access the requested colour channel c . | |
| static Colour | Cycle (uint number, ColourCycle cycle=ColourCycle.StandardCycle) |
| Return a colour from one of the standard ColourCycle sets. | |
Public Attributes | |
| uint | Value |
| The 32-bit colour value in the form: 0xRRGGBBAAu. | |
Static Public Attributes | |
| static readonly Colour[] | Colours |
| Predefined colour array. | |
| static readonly int[] | DefaultColourSet |
| A predefined set of colours which attempts to distinguish consecutive colours. | |
| static readonly int[] | DeuteranomalyColourSet |
| A colour set which attempts to be deuteranomoly colour blind friendly. | |
| static readonly int[] | ProtanomalyColourSet |
| A colour set which attempts to be protanomoly colour blind friendly. | |
| static readonly int[] | TritanomalyColourSet |
| A colour set which attempts to be trianomoly colour blind friendly. | |
| static readonly int[] | GreyColourSet |
| A greyscale colour set. | |
| static readonly int[][] | ColourCycles |
| Encapsulates the various standard colour cycles into an array. | |
Properties | |
| byte | R [get, set] |
| Gets or sets the red channel. | |
| byte | G [get, set] |
| Gets or sets the green channel. | |
| byte | B [get, set] |
| Gets or sets the blue channel. | |
| byte | A [get, set] |
| Gets or sets the alpha channel. | |
A utility class representing a colour as a 32-bit integer.
The Value is represents a colour channels in the form 0xRRGGBBAAu. Each channel is accessible via Properties.
| Tes::Maths::Colour::Colour | ( | uint | value | ) | [inline] |
Initialises a colour from a 32-bit integer.
Simply copies the value.
| value | The colour value. |
| Tes::Maths::Colour::Colour | ( | int | r, |
| int | g, | ||
| int | b, | ||
| int | a = 255 |
||
| ) | [inline] |
Initialises a colour from individual colour values.
| r | The red component. |
| g | The green component. |
| b | The blue component. |
| a | The alpha component. |
| static Colour Tes::Maths::Colour::Cycle | ( | uint | number, |
| ColourCycle | cycle = ColourCycle.StandardCycle |
||
| ) | [inline, static] |
Return a colour from one of the standard ColourCycle sets.
| number | An indexing value in the colour cycle. May be out of range as it is wrapped. |
| cycle | The colour cycle to use. |
Using this method it is possible to use a monotonic number as as indexing value. The value is wrapped to the cycle length, guaranteeing valid colour from the set.
| byte Tes::Maths::Colour::GetChannel | ( | Channel | c | ) | [inline] |
Get the value of the requested colour channel.
| c | The requested channel. |
| static int Tes::Maths::Colour::GetShift | ( | Channel | c | ) | [inline, static] |
Returns the bit shift required to access the requested colour channel c .
| c | The requested colour channel. |
| void Tes::Maths::Colour::SetChannel | ( | Channel | c, |
| byte | val | ||
| ) | [inline] |
Set the value of the indicated colour channel.
| c | The requested channel. |
| val | The value for the indicates colour channel. |
readonly int [][] Tes::Maths::Colour::ColourCycles [static] |
new int[][] { DefaultColourSet, DeuteranomalyColourSet, ProtanomalyColourSet, TritanomalyColourSet, GreyColourSet }
Encapsulates the various standard colour cycles into an array.
readonly int [] Tes::Maths::Colour::DeuteranomalyColourSet [static] |
new int[] { (int)PredefinedColour.RoyalBlue, (int)PredefinedColour.Yellow, (int)PredefinedColour.Silver, (int)PredefinedColour.Black, (int)PredefinedColour.Blue, (int)PredefinedColour.Khaki, (int)PredefinedColour.Gainsboro, (int)PredefinedColour.Beige, (int)PredefinedColour.Navy, (int)PredefinedColour.DarkKhaki, (int)PredefinedColour.White, (int)PredefinedColour.Grey, (int)PredefinedColour.MidnightBlue, (int)PredefinedColour.SlateGrey, (int)PredefinedColour.Ivory, (int)PredefinedColour.Gold, (int)PredefinedColour.DarkSlateBlue, (int)PredefinedColour.MediumSlateBlue }
A colour set which attempts to be deuteranomoly colour blind friendly.
readonly int [] Tes::Maths::Colour::GreyColourSet [static] |
new int[] { (int)PredefinedColour.Black, (int)PredefinedColour.Silver, (int)PredefinedColour.DarkSlateGrey, (int)PredefinedColour.Grey, (int)PredefinedColour.Gainsboro, (int)PredefinedColour.SlateGrey, }
A greyscale colour set.
readonly int [] Tes::Maths::Colour::ProtanomalyColourSet [static] |
new int[] { (int)PredefinedColour.Blue, (int)PredefinedColour.Yellow, (int)PredefinedColour.Black, (int)PredefinedColour.Silver, (int)PredefinedColour.CornflowerBlue, (int)PredefinedColour.Gainsboro, (int)PredefinedColour.MediumSlateBlue, (int)PredefinedColour.Khaki, (int)PredefinedColour.Grey, (int)PredefinedColour.DarkBlue, (int)PredefinedColour.Beige, (int)PredefinedColour.DarkKhaki, (int)PredefinedColour.MidnightBlue, (int)PredefinedColour.SlateGrey, (int)PredefinedColour.RoyalBlue, (int)PredefinedColour.Ivory, (int)PredefinedColour.DarkSlateBlue, }
A colour set which attempts to be protanomoly colour blind friendly.
readonly int [] Tes::Maths::Colour::TritanomalyColourSet [static] |
new int[] { (int)PredefinedColour.DeepSkyBlue, (int)PredefinedColour.DeepPink, (int)PredefinedColour.PaleTurquoise, (int)PredefinedColour.Black, (int)PredefinedColour.Crimson, (int)PredefinedColour.LightSeaGreen, (int)PredefinedColour.Gainsboro, (int)PredefinedColour.Blue, (int)PredefinedColour.DarkRed, (int)PredefinedColour.Silver, (int)PredefinedColour.Brown, (int)PredefinedColour.DarkTurquoise, (int)PredefinedColour.Grey, (int)PredefinedColour.Maroon, (int)PredefinedColour.Teal, (int)PredefinedColour.SlateGrey, (int)PredefinedColour.MidnightBlue, (int)PredefinedColour.DarkSlateGrey, }
A colour set which attempts to be trianomoly colour blind friendly.
byte Tes::Maths::Colour::A [get, set] |
Gets or sets the alpha channel.
The alpha value.
byte Tes::Maths::Colour::B [get, set] |
Gets or sets the blue channel.
The blue value.
byte Tes::Maths::Colour::G [get, set] |
Gets or sets the green channel.
The green value.
byte Tes::Maths::Colour::R [get, set] |
Gets or sets the red channel.
The red value.