#import <ARColourMaterial.h>
Inherits ARMaterial.
Inherited by AROcclusionMaterial.
The ARColourMaterial is a material that renders a solid colour. Alpha transparency is supported.
◆ colourMaterialWithRed:green:blue:
+ (instancetype) colourMaterialWithRed: |
|
(float) |
red |
green: |
|
(float) |
green |
blue: |
|
(float) |
blue |
|
|
| |
Class method that initialises an instance of ARColourMaterial with the given red, green and blue component values. Each component is in the range 0..1.
Example of use:
- Parameters
-
red | component value 0..1. |
green | component value 0..1. |
blue | component value 0..1. |
◆ initWithRed:green:blue:
- (instancetype) initWithRed: |
|
(float) |
red |
green: |
|
(float) |
green |
blue: |
|
(float) |
blue |
|
|
| |
Initialise with red, green and blue components. Each component is in the range 0..1. The alpha of the material is set to 1.0 when initialised using this method.
Example of use:
- Parameters
-
red | component value 0..1. |
green | component value 0..1. |
blue | component value 0..1. |
◆ initWithRed:green:blue:alpha:
- (instancetype) initWithRed: |
|
(float) |
red |
green: |
|
(float) |
green |
blue: |
|
(float) |
blue |
alpha: |
|
(float) |
alpha |
|
|
| |
Initialise with red, green, blue and alpha components. Each component is in the range 0..1.
Example of use:
- Parameters
-
red | component value 0..1. |
green | component value 0..1. |
blue | component value 0..1. |
alpha | component value 0..1. |
◆ alpha
The alpha component of the colour, in the range 0..1.
◆ blue
The blue component of the colour, in the range 0..1.
◆ depthOnly
Sets whether material draws in the depth buffer only. If true, this will not draw to the colour buffer. Useful for occlusion materials.
A colour buffer stores the RGB colour data of a pixel. When a material is drawn, it uses the colour data to determine the colour of each pixel. A depth buffer stores the depth information of a pixel. When materials are drawn, if two or more points overlap, the depth data is used to determine which point is closest to the camera and therefore which pixel's colour data should be drawn.
◆ green
The green component of the colour, in the range 0..1.
◆ red
The red component of the colour, in the range 0..1.
The documentation for this class was generated from the following files:
- ARColourMaterial.h
- ARColourMaterial.m