Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
CameraBackgroundBrush Class Reference

Defines a brush to clear the background of camera. More...

#include <CameraBackgroundBrush.h>

Inherits Object.

Inherited by CameraBackgroundDepthBrush, and CameraBackgroundSkyBoxBrush.

Public Types

enum class  BrushType
 Brush types. More...
 

Public Member Functions

virtual BrushType getBrushType () const
 get brush type
 
virtual void drawBackground (Camera *)
 draw the background
 
- Public Member Functions inherited from Object
void retain ()
 Retains the ownership.
 
void release ()
 Releases the ownership immediately.
 
Objectautorelease ()
 Releases the ownership sometime soon automatically.
 
unsigned int getReferenceCount () const
 Returns the Object's current reference count.
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static CameraBackgroundBrushcreateNoneBrush ()
 Creates a none brush, it does nothing when clear the background.
 
static CameraBackgroundDepthBrushcreateDepthBrush (float depth=1.f)
 Creates a depth brush, which clears depth buffer with a given depth.
 
static CameraBackgroundColorBrushcreateColorBrush (const Color4F &color, float depth)
 Creates a color brush.
 
static CameraBackgroundSkyBoxBrushcreateSkyboxBrush (std::string_view positive_x, std::string_view negative_x, std::string_view positive_y, std::string_view negative_y, std::string_view positive_z, std::string_view negative_z)
 Creates a Skybox brush with 6 textures.
 

Additional Inherited Members

- Public Attributes inherited from Object
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 

Detailed Description

Defines a brush to clear the background of camera.

There are 4 types of brush. None brush do nothing, Depth brush clear background with given depth, Color brush clear background with given color and depth, Skybox brush clear the background with a skybox. Camera uses depth brush by default.

Member Enumeration Documentation

◆ BrushType

enum class BrushType
strong

Brush types.

There are 4 types of brush. See CameraBackgroundDepthBrush, CameraBackgroundColorBrush, CameraBackgroundSkyBoxBrush for more information.

Member Function Documentation

◆ getBrushType()

virtual BrushType getBrushType ( ) const
inlinevirtual

◆ createNoneBrush()

static CameraBackgroundBrush * createNoneBrush ( )
static

Creates a none brush, it does nothing when clear the background.

Returns
Created brush.

◆ createDepthBrush()

static CameraBackgroundDepthBrush * createDepthBrush ( float depth = 1.f)
static

Creates a depth brush, which clears depth buffer with a given depth.

Parameters
depthDepth used to clear depth buffer
Returns
Created brush

◆ createColorBrush()

static CameraBackgroundColorBrush * createColorBrush ( const Color4F & color,
float depth )
static

Creates a color brush.

Parameters
colorColor of brush
depthDepth used to clear depth buffer
Returns
Created brush

◆ createSkyboxBrush()

static CameraBackgroundSkyBoxBrush * createSkyboxBrush ( std::string_view positive_x,
std::string_view negative_x,
std::string_view positive_y,
std::string_view negative_y,
std::string_view positive_z,
std::string_view negative_z )
static

Creates a Skybox brush with 6 textures.

Parameters
positive_xtexture for the right side of the texture cube face.
negative_xtexture for the up side of the texture cube face.
positive_ytexture for the top side of the texture cube face
negative_ytexture for the bottom side of the texture cube face
positive_ztexture for the forward side of the texture cube face.
negative_ztexture for the rear side of the texture cube face.
Returns
A new brush inited with given parameters.

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