|
int | CreateFBO (int width, int height, image_format format) |
| Create frame buffer object.
|
|
int | clear (int fbo_id, any fill_color, bool clear_color=True, bool clear_depth=True, float fill_depth=1) |
| Clear the framebuffer object - fill each pixel of the FBO sample with the same data.
|
|
int | draw_on_screen (int texture=1, int left=0, int top=0, int right=0, int bottom=0, int red=255, int green=255, int blue=255, int opacity=255) |
| Draw a texture rectangle in the main 3DCoat window.
|
|
int | draw_text (float x, float y, str text, float color_r=1, float color_g=1, float color_b=1, float color_a=1) |
| Draw the text in the main 3DCoat window.
|
|
int | CreateGPUTexture (any src_data, image_format format) |
| Create a 2D sampler in GPU memory from a numpy array.
|
|
int | GPUTextureFromFile (str file_path, bool Clamp=False, bool Smooth=True, bool swapRB=False, bool Flip=False) |
| Create a 2D sampler in GPU memory from a numpy array.
|
|
bool | DeleteGPUTexture (int texture_id) |
| Remove sampler from GPU memory.
|
|
any | work_area () |
| 3DCoat workspace rectangle (viewport)
|
|
◆ clear()
int coat.Render.clear |
( |
int | fbo_id, |
|
|
any | fill_color, |
|
|
bool | clear_color = True, |
|
|
bool | clear_depth = True, |
|
|
float | fill_depth = 1 ) |
|
static |
Clear the framebuffer object - fill each pixel of the FBO sample with the same data.
- Parameters
-
fbo_id | FBO ID to be filled for clearing |
fill_color | Color to fill each pixel |
clear_color | Do you want to clear the FBO color? if "true" the color of each pixel will be changed to fill_color, if "false" the color will not be changed. |
clear_depth | Do you want to clear the FBO depth? if "true" the depth of each pixel will be changed to fill_depth, if "false" the depth will not be changed. |
fill_depth | Depth value for fill each pixel |
- Returns
- true if successfully
◆ CreateFBO()
int coat.Render.CreateFBO |
( |
int | width, |
|
|
int | height, |
|
|
image_format | format ) |
|
static |
Create frame buffer object.
An FBO is a texture or data that can accept a rendered result
- Parameters
-
width | The size of the sampler in width |
height | The size of the sampler in height |
format | image_format - enum with the number of channels and the channel type. For example coat.image_format.Rgb8 |
- Returns
- texture id - can be used as texture id and as FBO for rendering target
◆ CreateGPUTexture()
int coat.Render.CreateGPUTexture |
( |
any | src_data, |
|
|
image_format | format ) |
|
static |
Create a 2D sampler in GPU memory from a numpy array.
- Parameters
-
src_data | numpy array from which the 2d sampler will be created. A numpy array must have the correct width and height, type and number of channels as in OpenCV |
format | The texture type must match the numpy structure and type. For example coat.image_format.Rgb8 |
- Returns
- the texture id of the new sampler
◆ DeleteGPUTexture()
bool coat.Render.DeleteGPUTexture |
( |
int | texture_id | ) |
|
|
static |
Remove sampler from GPU memory.
- Parameters
-
- Returns
- true if successfully
◆ draw_on_screen()
int coat.Render.draw_on_screen |
( |
int | texture = 1, |
|
|
int | left = 0, |
|
|
int | top = 0, |
|
|
int | right = 0, |
|
|
int | bottom = 0, |
|
|
int | red = 255, |
|
|
int | green = 255, |
|
|
int | blue = 255, |
|
|
int | opacity = 255 ) |
|
static |
Draw a texture rectangle in the main 3DCoat window.
- Parameters
-
texture | The ID of the texture that will be rendered |
left | The position of the left side of the rendered texture on the screen |
top | The position of the top side of the rendered texture on the screen |
right | The position of the right side of the rendered texture on the screen |
bottom | The position of the bottom side of the rendered texture on the screen |
red | Multiplier for the red channel of the texture |
green | Multiplier for the green channel of the texture |
blue | Multiplier for the blue channel of the texture |
- Returns
- true if successfully
◆ draw_text()
int coat.Render.draw_text |
( |
float | x, |
|
|
float | y, |
|
|
str | text, |
|
|
float | color_r = 1, |
|
|
float | color_g = 1, |
|
|
float | color_b = 1, |
|
|
float | color_a = 1 ) |
|
static |
Draw the text in the main 3DCoat window.
- Parameters
-
x | The position of the left side of the text block |
y | The position of the top side of the text block |
text | The content of the text block you want to display |
color_r | Value of the red channel of the text color |
color_g | Value of the gleen channel of the text color |
color_b | Value of the blue channel of the text color |
color_a | Opacity of the rendered text |
- Returns
- true if successfully
◆ GPUTextureFromFile()
int coat.Render.GPUTextureFromFile |
( |
str | file_path, |
|
|
bool | Clamp = False, |
|
|
bool | Smooth = True, |
|
|
bool | swapRB = False, |
|
|
bool | Flip = False ) |
|
static |
Create a 2D sampler in GPU memory from a numpy array.
- Returns
- the texture id of the new sampler
◆ work_area()
any coat.Render.work_area |
( |
| ) |
|
|
static |
3DCoat workspace rectangle (viewport)
The documentation for this class was generated from the following file: