KudanAR - iOS  1.6.0
ARColourMaterial Class Reference

#import <ARColourMaterial.h>

Inherits ARMaterial.

Inherited by AROcclusionMaterial.

Instance Methods

(instancetype) - initWithRed:green:blue:
 
(instancetype) - initWithRed:green:blue:alpha:
 
- Instance Methods inherited from ARMaterial
(void) - postRender
 
(BOOL) - prepareRendererWithNode: [implementation]
 

Class Methods

(instancetype) + colourMaterialWithRed:green:blue:
 

Properties

float red
 
float green
 
float blue
 
float alpha
 
BOOL depthOnly
 
- Properties inherited from ARMaterial
NSString * name
 
BOOL isTranslucent
 
ARBlendMode blendMode
 
BOOL depthTest
 
BOOL depthWrite
 
BOOL colourWrite
 
ARFaceCullMode cullMode
 
ARShaderProgramshaderProgram [implementation]
 

Detailed Description

The ARColourMaterial is a material that renders a solid colour. Alpha transparency is supported.

Method Documentation

◆ 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:

ARColour *colour = [ARColour colourMaterialWithRed:0.2 green:0.4 blue:0.8];
Parameters
redcomponent value 0..1.
greencomponent value 0..1.
bluecomponent 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:

ARColour *colour = [[ARColour alloc] initWithRed:1.0 green:0.3 blue:0.4];
Parameters
redcomponent value 0..1.
greencomponent value 0..1.
bluecomponent 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:

ARColour *colour = [[ARColour alloc] initWithRed:0.6 green:0.3 blue:0.8 alpha:0.5];
Parameters
redcomponent value 0..1.
greencomponent value 0..1.
bluecomponent value 0..1.
alphacomponent value 0..1.

Property Documentation

◆ alpha

- (float) alpha
readwriteatomic

The alpha component of the colour, in the range 0..1.

◆ blue

- (float) blue
readwriteatomic

The blue component of the colour, in the range 0..1.

◆ depthOnly

- (BOOL) depthOnly
readwritenonatomicassign

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

- (float) green
readwriteatomic

The green component of the colour, in the range 0..1.

◆ red

- (float) red
readwriteatomic

The red component of the colour, in the range 0..1.


The documentation for this class was generated from the following files:
ARColourMaterial::green
float green
Definition: ARColourMaterial.h:17
ARColourMaterial::blue
float blue
Definition: ARColourMaterial.h:22
ARColour
Definition: ARColour.h:8
ARColourMaterial::alpha
float alpha
Definition: ARColourMaterial.h:27