Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
CameraBackgroundBrush Class Reference

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

Inherits Ref.

Inherited by CameraBackgroundDepthBrush, and CameraBackgroundSkyBoxBrush.

Public Types

enum  BrushType { NONE, DEPTH, COLOR, SKYBOX }
 Brush types. More...
 

Public Member Functions

virtual BrushType getBrushType () const
 get brush type BrushType
 
var getBrushType ()
 get brush type BrushType
 
local getBrushType ()
 get brush type BrushType
 
virtual void drawBackground (Camera *camera)
 draw the background
 
virtual bool isValid ()
 is valid?
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor.
 

Static Public Member Functions

static CameraBackgroundBrushcreateNoneBrush ()
 Creates a none brush, it does nothing when clear the background Created brush.
 
local createNoneBrush ()
 Creates a none brush, it does nothing when clear the background Created brush.
 
static CameraBackgroundDepthBrushcreateDepthBrush (float depth=1.f)
 Creates a depth brush, which clears depth buffer with a given depth. More...
 
local createDepthBrush ( local f)
 Creates a depth brush, which clears depth buffer with a given depth. More...
 
static CameraBackgroundColorBrushcreateColorBrush (const Color4F &color, float depth)
 Creates a color brush Color of brush Depth used to clear depth buffer Created brush.
 
local createColorBrush ( local color, local depth)
 Creates a color brush Color of brush Depth used to clear depth buffer Created brush.
 
static
CameraBackgroundSkyBoxBrush
createSkyboxBrush (const std::string &positive_x, const std::string &negative_x, const std::string &positive_y, const std::string &negative_y, const std::string &positive_z, const std::string &negative_z)
 Creates a Skybox brush with 6 textures. More...
 
local createSkyboxBrush ( local positive_x, local negative_x, local positive_y, local negative_y, local positive_z, local negative_z)
 Creates a Skybox brush with 6 textures. More...
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

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

enum BrushType
strong

Brush types.

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

Enumerator
NONE 

none brush

DEPTH 

depth brush.

See CameraBackgroundDepthBrush

COLOR 

color brush.

See CameraBackgroundColorBrush

SKYBOX 

skybox brush.

See CameraBackgroundSkyBoxBrush

var BrushType
strong

Brush types.

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

Enumerator
NONE 

none brush

DEPTH 

depth brush.

See CameraBackgroundDepthBrush

COLOR 

color brush.

See CameraBackgroundColorBrush

SKYBOX 

skybox brush.

See CameraBackgroundSkyBoxBrush

local BrushType
strong

Brush types.

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

Enumerator
NONE 

none brush

DEPTH 

depth brush.

See CameraBackgroundDepthBrush

COLOR 

color brush.

See CameraBackgroundColorBrush

SKYBOX 

skybox brush.

See CameraBackgroundSkyBoxBrush

Member Function Documentation

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 Created brush
var createDepthBrush ( var  depth = 1.f)
static

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

Parameters
depthDepth used to clear depth buffer Created brush
local createDepthBrush ( local  depth = 1.f)
static

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

Parameters
depthDepth used to clear depth buffer Created brush
static
CameraBackgroundSkyBoxBrush*
createSkyboxBrush
( const std::string &  positive_x,
const std::string &  negative_x,
const std::string &  positive_y,
const std::string &  negative_y,
const std::string &  positive_z,
const std::string &  negative_z 
)
static

Creates a Skybox brush with 6 textures.

positive_x texture for the right side of the texture cube face. texture for the up side of the texture cube face. texture for the top side of the texture cube face texture for the bottom side of the texture cube face texture for the forward side of the texture cube face. negative_z texture for the rear side of the texture cube face. A new brush inited with given parameters.

var createSkyboxBrush ( var  positive_x,
var  negative_x,
var  positive_y,
var  negative_y,
var  positive_z,
var  negative_z 
)
static

Creates a Skybox brush with 6 textures.

positive_x texture for the right side of the texture cube face. texture for the up side of the texture cube face. texture for the top side of the texture cube face texture for the bottom side of the texture cube face texture for the forward side of the texture cube face. negative_z texture for the rear side of the texture cube face. A new brush inited with given parameters.

local createSkyboxBrush ( local  positive_x,
local  negative_x,
local  positive_y,
local  negative_y,
local  positive_z,
local  negative_z 
)
static

Creates a Skybox brush with 6 textures.

positive_x texture for the right side of the texture cube face. texture for the up side of the texture cube face. texture for the top side of the texture cube face texture for the bottom side of the texture cube face texture for the forward side of the texture cube face. negative_z texture for the rear side of the texture cube face. A new brush inited with given parameters.


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