CubeMap

Inherits: Resource < Reference < Object

A CubeMap is a 6-sided 3D texture.

Description

A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods.

Properties

int

flags

7

float

lossy_storage_quality

0.7

Storage

storage_mode

0

Methods

int

get_height ( ) const

Image

get_side ( Side side ) const

int

get_width ( ) const

void

set_side ( Side side, Image image )


Enumerations

enum Storage:

Storage STORAGE_RAW = 0

Store the CubeMap without any compression.

Storage STORAGE_COMPRESS_LOSSY = 1

Store the CubeMap with strong compression that reduces image quality.

Storage STORAGE_COMPRESS_LOSSLESS = 2

Store the CubeMap with moderate compression that doesn't reduce image quality.


enum Side:

Side SIDE_LEFT = 0

Identifier for the left face of the CubeMap.

Side SIDE_RIGHT = 1

Identifier for the right face of the CubeMap.

Side SIDE_BOTTOM = 2

Identifier for the bottom face of the CubeMap.

Side SIDE_TOP = 3

Identifier for the top face of the CubeMap.

Side SIDE_FRONT = 4

Identifier for the front face of the CubeMap.

Side SIDE_BACK = 5

Identifier for the back face of the CubeMap.


enum Flags:

Flags FLAG_MIPMAPS = 1

Generate mipmaps, to enable smooth zooming out of the texture.

Flags FLAG_REPEAT = 2

Repeat (instead of clamp to edge).

Flags FLAG_FILTER = 4

Turn on magnifying filter, to enable smooth zooming in of the texture.

Flags FLAGS_DEFAULT = 7

Default flags. Generate mipmaps, repeat, and filter are enabled.


Property Descriptions

int flags = 7

  • void set_flags ( int value )

  • int get_flags ( )

The render flags for the CubeMap. See the Flags constants for details.


float lossy_storage_quality = 0.7

  • void set_lossy_storage_quality ( float value )

  • float get_lossy_storage_quality ( )

The lossy storage quality of the CubeMap if the storage mode is set to STORAGE_COMPRESS_LOSSY.


Storage storage_mode = 0

The CubeMap's storage mode. See Storage constants.


Method Descriptions

int get_height ( ) const

Returns the CubeMap's height.


Image get_side ( Side side ) const

Returns an Image for a side of the CubeMap using one of the Side constants.


int get_width ( ) const

Returns the CubeMap's width.


void set_side ( Side side, Image image )

Sets an Image for a side of the CubeMap using one of the Side constants.