Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions

# TexturePeeker Class Reference

An instance of this object is returned by Texture.peek(). More...

Inheritance diagram for TexturePeeker:

List of all members.

## Public Member Functions
| filterRect (VBase4 color, float min_u, float min_v, float max_u, float max_v)
| Fills "color" with the average RGBA color of the texels within the rectangle defined by the specified coordinate range.
| filterRect (VBase4 color, float min_u, float min_v, float min_w, float max_u, float max_v, float max_w)
| Fills "color" with the average RGBA color of the texels within the rectangle defined by the specified coordinate range.
int | getXSize ()
| Returns the width of the texture image that is contributing to the TexturePeeker's information.
int | getYSize ()
| Returns the height of the texture image that is contributing to the TexturePeeker's information.
int | getZSize ()
| Returns the depth of the texture image that is contributing to the TexturePeeker's information.
| lookup (VBase4 color, float u, float v)
| Fills "color" with the RGBA color of the texel at point (u, v).
| lookup (VBase4 color, float u, float v, float w)
| Fills "color" with the RGBA color of the texel at point (u, v, w).

## Detailed Description

An instance of this object is returned by Texture.peek().

This object allows quick and easy inspection of a texture's texels by (u, v) coordinates.

## Member Function Documentation

filterRect | ( | VBase4 | color,
|  | float | min_u,
|  | float | min_v,
|  | float | max_u,
|  | float | max_v
| ) |  |

Fills "color" with the average RGBA color of the texels within the rectangle defined by the specified coordinate range.

The texel color is linearly filtered over the entire region. u, v, and w will wrap around regardless of the texture's wrap mode.

filterRect | ( | VBase4 | color,
|  | float | min_u,
|  | float | min_v,
|  | float | min_w,
|  | float | max_u,
|  | float | max_v,
|  | float | max_w
| ) |  |

Fills "color" with the average RGBA color of the texels within the rectangle defined by the specified coordinate range.

The texel color is linearly filtered over the entire region. u, v, and w will wrap around regardless of the texture's wrap mode.

int getXSize | ( |  | ) |

Returns the width of the texture image that is contributing to the TexturePeeker's information.

This may be either the Texture's full width, or its simple ram image's width.

int getYSize | ( |  | ) |

Returns the height of the texture image that is contributing to the TexturePeeker's information.

This may be either the Texture's full height, or its simple ram image's height.

int getZSize | ( |  | ) |

Returns the depth of the texture image that is contributing to the TexturePeeker's information.

lookup | ( | VBase4 | color,
|  | float | u,
|  | float | v
| ) |  |

Fills "color" with the RGBA color of the texel at point (u, v).

The texel color is determined via nearest-point sampling (no filtering of adjacent pixels), regardless of the filter type associated with the texture. u, v, and w will wrap around regardless of the texture's wrap mode.

lookup | ( | VBase4 | color,
|  | float | u,
|  | float | v,
|  | float | w
| ) |  |

Fills "color" with the RGBA color of the texel at point (u, v, w).

The texel color is determined via nearest-point sampling (no filtering of adjacent pixels), regardless of the filter type associated with the texture. u, v, and w will wrap around regardless of the texture's wrap mode.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties