KudanAR - iOS
ARColourMaterial Class Reference

#import <ARColourMaterial.h>

+ Inheritance diagram for ARColourMaterial:
+ Collaboration diagram for ARColourMaterial:

Instance Methods

(instancetype) - initWithRed:green:blue:
 
(instancetype) - initWithRed:green:blue:alpha:
 
- Instance Methods inherited from ARMaterial
(void) - postRender
 

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
 

Detailed Description

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

Method Documentation

+ (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.
- (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.

Example of use:

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

- (float) alpha
readwriteatomic

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

- (float) blue
readwriteatomic

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

- (BOOL) depthOnly
readwritenonatomicassign

Sets whether material draws in the depth buffer only. Default value is false this draws the material to the colour buffer and depth buffer. Used in occlusion material when true, as it wont draw to the colour buffer.

- (float) green
readwriteatomic

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

- (float) red
readwriteatomic

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


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