Cocos2d-x  4.0.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CameraBackgroundSkyBoxBrush Class Reference

Skybox brush clear buffer with a skybox. More...

Inherits CameraBackgroundBrush.

Public Member Functions

virtual BrushType getBrushType () const override
 Get brush type.
 
void setTexture (TextureCube *texture)
 Set skybox texture.
 
virtual void drawBackground (Camera *camera) override
 Draw background.
 

Static Public Member Functions

static
CameraBackgroundSkyBoxBrush
create (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.
 
static
CameraBackgroundSkyBoxBrush
create ()
 Creates a Skybox brush with 6 textures.
 
- Static Public Member Functions inherited from CameraBackgroundBrush
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
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.
 

Protected Member Functions

virtual bool init () override
 init Skybox.
 

Additional Inherited Members

- Public Types inherited from CameraBackgroundBrush
enum  BrushType
 Brush types. More...
 
- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

Skybox brush clear buffer with a skybox.

Member Function Documentation

virtual BrushType getBrushType ( ) const
inlineoverridevirtual

Get brush type.

Should be BrushType::SKYBOX

Returns
brush type

Reimplemented from CameraBackgroundBrush.

static CameraBackgroundSkyBoxBrush* create ( 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.

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.
void setTexture ( TextureCube texture)

Set skybox texture.

Parameters
textureSkybox texture

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