Convenience functions for python.
More...
|
def | Python.Numpy.AsDataStream (arr) |
| copy numpy array to Ogre.MemoryDataStream that can be used in Ogre More...
|
|
def | Python.HighPy.camera_intrinsics (str window_name, K, imsize) |
| set camera intrinsics More...
|
|
def | Python.HighPy.imshow (str window_name, str|os.PathLike img_path) |
| show an image in the window More...
|
|
def | Python.HighPy.mesh_hide (str window_name, str|os.PathLike mesh_path) |
| hide a mesh in the window More...
|
|
def | Python.HighPy.mesh_show (str window_name, str|os.PathLike mesh_path, rot_mat=None, position=(0, 0, 0), str|None material_name=None) |
| show a mesh in the window More...
|
|
def | Python.HighPy.point_light (str window_name, position=(0, 0, 0)) |
| create a point light in the window More...
|
|
def | Python.Numpy.view (o) |
| writable numpy view to the ogre data types More...
|
|
def | Python.HighPy.window_compositor (str window_name, str compositor_name) |
| set a compositor for the window More...
|
|
def | Python.HighPy.window_create (str window_name, window_size, int flags=AXES_ZBACKWARD_YUP) |
| create a window More...
|
|
int | Python.HighPy.window_draw (str window_name) |
| draw the window More...
|
|
def | Python.HighPy.window_pixel_data (str window_name, str|None compositor_name=None, str|None texture_name=None, int mrt_index=0) |
| get the pixel data from the window or the active compositor More...
|
|
def | Python.HighPy.window_use_imgui (str window_name, callback) |
| enable imgui for the window More...
|
|
Convenience functions for python.
◆ AsDataStream()
def Python.Numpy.AsDataStream |
( |
|
arr | ) |
|
◆ view()
def Python.Numpy.view |
( |
|
o | ) |
|
◆ window_create()
def Python.HighPy.window_create |
( |
str |
window_name, |
|
|
|
window_size, |
|
|
int |
flags = AXES_ZBACKWARD_YUP |
|
) |
| |
create a window
- Parameters
-
window_name | name of the window |
window_size | size of the window in pixels |
flags | window create options |
◆ window_draw()
int Python.HighPy.window_draw |
( |
str |
window_name | ) |
|
draw the window
- Parameters
-
window_name | name of the window |
- Returns
- last key pressed inside the window
◆ window_use_imgui()
def Python.HighPy.window_use_imgui |
( |
str |
window_name, |
|
|
|
callback |
|
) |
| |
enable imgui for the window
- Parameters
-
window_name | name of the window |
callback | function to call for imgui rendering |
◆ window_compositor()
def Python.HighPy.window_compositor |
( |
str |
window_name, |
|
|
str |
compositor_name |
|
) |
| |
◆ window_pixel_data()
def Python.HighPy.window_pixel_data |
( |
str |
window_name, |
|
|
str | None |
compositor_name = None , |
|
|
str | None |
texture_name = None , |
|
|
int |
mrt_index = 0 |
|
) |
| |
get the pixel data from the window or the active compositor
- Parameters
-
window_name | name of the window |
compositor_name | name of the compositor |
texture_name | name of the texture |
mrt_index | index of the MRT |
- Return values
-
0 | bytearray holding the pixel data |
1 | tuple (bytes per pixel, height, width, channels) |
References Ogre::CompositorManager.getSingleton().
◆ imshow()
def Python.HighPy.imshow |
( |
str |
window_name, |
|
|
str | os.PathLike |
img_path |
|
) |
| |
show an image in the window
- Parameters
-
window_name | name of the window |
img_path | path to the image file |
◆ camera_intrinsics()
def Python.HighPy.camera_intrinsics |
( |
str |
window_name, |
|
|
|
K, |
|
|
|
imsize |
|
) |
| |
set camera intrinsics
- Parameters
-
window_name | name of the window |
K | 3x3 camera matrix |
imsize | image size in pixels |
◆ mesh_show()
def Python.HighPy.mesh_show |
( |
str |
window_name, |
|
|
str | os.PathLike |
mesh_path, |
|
|
|
rot_mat = None , |
|
|
|
position = (0, 0, 0) , |
|
|
str | None |
material_name = None |
|
) |
| |
show a mesh in the window
- Parameters
-
window_name | name of the window |
mesh_path | path to the mesh file |
rot_mat | 3x3 rotation matrix |
position | 3x1 translation vector |
material_name | optional material name to use instead of the default |
◆ mesh_hide()
def Python.HighPy.mesh_hide |
( |
str |
window_name, |
|
|
str | os.PathLike |
mesh_path |
|
) |
| |
hide a mesh in the window
- Parameters
-
window_name | name of the window |
mesh_path | path to the mesh file |
◆ point_light()
def Python.HighPy.point_light |
( |
str |
window_name, |
|
|
|
position = (0, 0, 0) |
|
) |
| |
create a point light in the window
- Parameters
-
window_name | name of the window |
position | position of the light in world coordinates |
◆ AXES_ZBACKWARD_YUP
int Python.HighPy.AXES_ZBACKWARD_YUP = 0 |
Ogre & OpenGL coordinate system
◆ AXES_ZFORWARD_YDOWN
int Python.HighPy.AXES_ZFORWARD_YDOWN = 1 |
OpenCV & colmap coordinate system.
◆ user_resource_locations
Python.HighPy.user_resource_locations = set() |
add paths here to override the default resource location "."