Inherits from NSObject
Declared in NGLFog.h

Overview

Generates and manages the Fog Effect. (Singleton)

The fog effect is usefull to hide the brutal cut on the meshes when they are out of the field of view (FOV). The NGLFog is connected to the NGLCamera and can receive the field of view from there automatically. By default, NGLFog starts at 75.0 and ends at 100.0, using generic units.

Besides, by default, the fog effect is turned off (the type property is set to NGLFogType). To activate the fog effect just set the type property to any other NGLFogType parameter.

The default color of the fog is the same as the global color to NinevehGL.

Tasks

  •   type

    Defines the fog effect equation.

    property
  •   color

    Defines the fog effect color. By default, it will be the same color as that one defined as global color to NinevehGL Engine.

    property
  •   start

    A floating number representing the start position of the fog effect in relation to the viewer (the camera).

    property
  •   end

    A floating number representing the end position of the fog effect in relation to the viewer (the camera).

    property
  •   values

    (Internal only) Returns a pointer to the fog scalar values. You should not call this method directly.

    property
  • + defaultFog

    Returns the singleton instance of NGLFog.

Properties

color

Defines the fog effect color. By default, it will be the same color as that one defined as global color to NinevehGL Engine.

@property (nonatomic) NGLvec4 color

Discussion

Defines the fog effect color. By default, it will be the same color as that one defined as global color to NinevehGL Engine.

The default value is equal to the global color.

Declared In

NGLFog.h

end

A floating number representing the end position of the fog effect in relation to the viewer (the camera).

@property (nonatomic) float end

Discussion

A floating number representing the end position of the fog effect in relation to the viewer (the camera).

The default value is 100.0.

Declared In

NGLFog.h

start

A floating number representing the start position of the fog effect in relation to the viewer (the camera).

@property (nonatomic) float start

Discussion

A floating number representing the start position of the fog effect in relation to the viewer (the camera).

The default value is 75.0.

Declared In

NGLFog.h

type

Defines the fog effect equation.

@property (nonatomic) NGLFogType type

Discussion

Defines the fog effect equation.

By default its value is NGLFogTypeNone, which represents no fog effect.

The default value is NGLFogTypeNone.

Declared In

NGLFog.h

values

(Internal only) Returns a pointer to the fog scalar values. You should not call this method directly.

@property (nonatomic, readonly) NGLFogValues *values

Discussion

(Internal only) Returns a pointer to the fog scalar values. You should not call this method directly.

Declared In

NGLFog.h

Class Methods

defaultFog

Returns the singleton instance of NGLFog.

+ (NGLFog *)defaultFog

Return Value

The singleton instance of the main Fog.

Discussion

Returns the singleton instance of NGLFog.

The NGLFog is a global effect and affects all the renders with NinevehGL.

Declared In

NGLFog.h