Paquete gl.geo

geo Package

class Audio(path)

Bases: object

play()

_globals Module

Global variables.

class Log

Bases: object

write(text)
cartesians(m, a)

Convert (module, angle) to carteian coords (x,y)

glCross(x, y, z)
log(text)
log_enabled(value=None)
numpy_cartesians(m, a)

Convert (module, angle) to carteian coords (x,y)

numpy_polars(x, y)

Convert (x,y) to (module, angle)

polars(x, y)

Convert (x,y) to (module, angle)

print_matrix(m)

Debug function. Prints a 4x4 matrix.

vector(list)

Returns a GLFloat vector.

vga_info()
xml_code(node, cmd=False)

draw Module

Provides the Layer class.

class Curtain(app, color=[0, 0, 0])

Bases: object

delete()
fade_in(function=None)
fade_out(function=None, color=[0, 0, 0])

group Module

Drawing classes.

class Axis(space, plane)

Bases: nabla.gl.geo.group.Draw

A pyglet.group that draws a coordinate axis.

delete()
mask(n)
set_state()
unset_state()
class DepthGroup(parent=None)

Bases: pyglet.graphics.Group

set_state()
unset_state()
class Draw(order, parent=None)

Bases: pyglet.graphics.OrderedGroup

Extended pyglet.group base class.

alpha
crosshair(x, y)
draw_selected(draw)
layer = None
name = 'Nonamed'
properties
shader
class Texture(space, plane, texture=None)

Bases: nabla.gl.geo.group._Texture

A pyglet.group that draws a quad texture.

draw_selected(draw)
mask(n)
set_state()
unset_state()
class Transparency(space, plane, texture=None)

Bases: nabla.gl.geo.group._Texture

A pyglet.group that draws a transparent texture. Image should contain an Alpha channel.

draw_selected(draw)
mask(n)
set_state()
unset_state()

layer Module

Provides the Layer class.

class Layer(name='Layer', type='', path=None, tag='', image=None, alpha=False, lock=False, space=None, plane=None, parent=None)

Bases: pyglet.event.EventDispatcher

A Layer in Space. The layer creates a geo.Plane if assigned to a geo.Space.

delete(*args)

Force immediate removal of the sprite from video memory.

This is often necessary when using batches, as the Python garbage collector will not necessarily call the finalizer as soon as the sprite is garbage.

event_types = ['on_mouse_press', 'on_mouse_release', 'on_mouse_scroll', 'on_mouse_drag', 'on_select', 'on_delete', 'on_update', 'on_set', 'on_unset']
image = None
image_restore()
load(path)
load_animation(path)
load_image(path)
load_video(path)
mark(x, y, mark)
on_mouse_drag(x, y, dx, dy, button, modifiers)
on_mouse_press(x, y, button, modifiers)
on_mouse_release(x, y, button, modifiers)
on_mouse_scroll(x, y, scroll_x, scroll_y)
path = None
plane
properties
selected
space_set(space=None, plane=None, parent=None)
space_unset()
update_node(basepath=None)
class Media(space, path)

Bases: object

TDOD: A Audio layer that does nor show texture

plane Module

Provides the Plane class.

class Layer_Origin(space, plane, lock=False)

Bases: pyglet.event.EventDispatcher

A void layer to define children layers origin. Draws an Axis.

draw_selected(draw)
event_types = ['on_mouse_press', 'on_mouse_release', 'on_mouse_scroll', 'on_mouse_drag', 'on_select', 'on_delete', 'on_update']
mask(n)
plane
properties
update_node()
class Plane(space=None, parent=None, layer=None, origin=False)

Bases: pyglet.event.EventDispatcher

A hierarchy of planes in space.

space = Space object. parent = Plane object or None layer = Layer object origin = bool: the layer is a new Origin object

X_update_layer()
adopt(plane)
all = []
animation
children_stack()
color
crosshair(x, y)
delete()
draw()

Never use this. Draws the group at its current position.

draw_selected(draw=True)
dump(level=0, children=False)
event_types = ['on_select', 'on_delete', 'on_update']
find(type)
first(type)
get_view_matrix(cam)
height
image
mask()
matrix_update()
next()
opacity
origin()
position
pretrans(u, v, w=0)
properties
rotation
scale
space
texture
type
update_node(basepath=None)
visible
width
x
y
z

space Module

Geometry management package. Provides geo.Space class, a geo.Plane and geo.Tree manager.

class Editor

Bases: object

on_key_press(symbol, modifiers, viewport)
on_key_release(symbol, modifiers, viewport)
on_mouse_drag(x, y, dx, dy, button, modifiers, layer)
on_mouse_press(x, y, button, modifiers, layer)
on_mouse_release(x, y, button, modifiers, layer)
on_mouse_scroll(x, y, scroll_x, scroll_y, layer)
on_tick()
class Space(plane=None, depth=False, file=None, handler=None)

Bases: pyglet.graphics.Batch

A container for plane trees, extends pyglet.batch.

A viewport can send the mouse events to a Space object, so the Space calculates the coordinates and passes the events to the plane.

Properties

layer = list of all layers in this space. group = root pyglet.group, every layer must add its group. plane = Plane, here .plane is a list of top planes, tree structure.

_selected= last selected layer selection= all selected layers focus = selected plane

all_planes(plane=None)
clear()
decorate(value=True)
delete()
delete_selected_plane()
dump()
focus
label(text, x=0, y=0, size=14)
load(path)
on_key_press(symbol, modifiers, viewport)
on_key_release(symbol, modifiers, viewport)
on_mouse_drag(x, y, dx, dy, button, modifiers, viewport)
on_mouse_press(x, y, button, modifiers, viewport)
on_mouse_release(x, y, button, modifiers, viewport)
on_mouse_scroll(x, y, scroll_x, scroll_y, viewport)
on_tick()
plane_on_delete(plane=None)
plane_on_select(plane=None)
plane_on_update(plane=None)
plane_order()
project(plane, plane_x, plane_y, viewport)
save(path)
selected_plane(mouse_x, mouse_y, viewport)
status(text='')
text(text, x=0, y=0, size=14)
trees = []
unproject(plane, mouse_x, mouse_y, viewport)

tree Module

Geometry management package. Provides geo.Space class, a geo.Plane manager

class Data

Bases: object

Base class for objects that need a tree.

get_text()
set_text(text)
tag = 'data'
tree_new()
xml_code(cmd=False)
class Tree(tag='plane', name='Unnamed')

Bases: nabla.gl.geo.tree._Tree, pyglet.event.EventDispatcher

A structure of planes. A plane can contain a layer and other planes.

all = []
create_layer(node, plane)
create_nodes(node, plane)

Create this structure in space.

create_plane(node, plane)
delete()
event_types = ['on_select', 'on_update', 'on_delete']
get_item(tag='place', name=None)
get_item_space(item)
get_layer_index(index)
get_layers()
get_root_plane()
layer_add(layer, parent=None)
layer_delete(layer)
layer_icons()
layer_names()
layer_on_delete(layer=None)
layer_on_select(layer=None)
layer_on_update(layer=None)
space
space_set(space=None, plane=None)

Create this structure in a Space.

space_unset()

Remove this structure from a Space.

tag = None

The structure type: BACKGROUND

update_tree(node=None)

Contenidos

Tema anterior

control Package

Próximo tema

shader Package

Esta página