dent package

Submodules

dent.ActionController module

class dent.ActionController.ActionController(owner)[source]

Bases: object

Controls the action (movement and animation) of an asset.

add_action(action)[source]
current_animation()[source]
update(time)[source]

Updates the state of the object’s actions. When called, this function will update the parent object’s bone structure. It may also change the current action that the object is performing.

dent.Animation module

class dent.Animation.Animation[source]

Bases: object

get_bone(name)[source]
get_bone_transforms(time, with_root_offset=True)[source]
get_channel(channelname)[source]
get_end_position()[source]

Returns the position of the animation in the last frame.

get_end_rotation()[source]

Returns the rotation of the animation in the last frame.

get_root_offset(time)[source]
get_state(time)[source]
has_bone(n)[source]
load_from_file(filename, bones)[source]
read_from_assimp(assimp_animation)[source]
class dent.Animation.Bone(name, parent_name, id, children, offsetmatrix, positions, rotations)

Bases: tuple

children

Alias for field number 3

id

Alias for field number 2

name

Alias for field number 0

offsetmatrix

Alias for field number 4

parent_name

Alias for field number 1

positions

Alias for field number 5

rotations

Alias for field number 6

dent.Animation.basic_animation(filename)[source]
dent.Animation.get_children(bones, bone)[source]

dent.Bone module

dent.Camera module

dent.InstancedObject module

dent.MultiObject module

dent.Object module

dent.Pager module

class dent.Pager.Pager(size)[source]

Bases: dict

add(item)[source]
remove(item)[source]

dent.RectangleObjects module

dent.RenderPipeline module

dent.RenderStage module

dent.Scene module

dent.args module

dent.args.parse()[source]

dent.assets module

dent.configuration module

dent.core module

dent.taskQueue module

class dent.taskQueue.Task(func, args, priority)

Bases: tuple

args

Alias for field number 1

func

Alias for field number 0

priority

Alias for field number 2

dent.taskQueue.addToMainThreadQueue(func, args=(), priority=1)[source]
dent.taskQueue.doNextTask()[source]

dent.transforms module

dent.transforms.frustum(left, right, bottom, top, znear, zfar)[source]
dent.transforms.ortho(left, right, bottom, top, znear, zfar)[source]
dent.transforms.perspective(fovy, aspect, znear, zfar)[source]
dent.transforms.quaternion_matrix(quaternion)[source]

Return homogeneous rotation matrix from quaternion.

>>> M = quaternion_matrix([0.99810947, 0.06146124, 0, 0])
>>> numpy.allclose(M, rotation_matrix(0.123, [1, 0, 0]))
True
>>> M = quaternion_matrix([1, 0, 0, 0])
>>> numpy.allclose(M, numpy.identity(4))
True
>>> M = quaternion_matrix([0, 1, 0, 0])
>>> numpy.allclose(M, numpy.diag([1, -1, -1, 1]))
True
dent.transforms.rotate(M, angle, x, y, z, point=None)[source]

rotate produces a rotation of angle degrees around the vector (x, y, z).

Parameters:
  • M – Current transformation as a numpy array
  • angle – Specifies the angle of rotation, in degrees.
  • y, z (x,) – Specify the x, y, and z coordinates of a vector, respectively.
dent.transforms.scale(M, x, y=None, z=None)[source]

scale produces a non uniform scaling along the x, y, and z axes. The three parameters indicate the desired scale factor along each of the three axes.

Parameters:y, z (x,) – Specify scale factors along the x, y, and z axes, respectively.
dent.transforms.translate(M, x, y=None, z=None)[source]

translate produces a translation by (x, y, z) .

Parameters:y, z (x,) – Specify the x, y, and z coordinates of a translation vector.
dent.transforms.translate2(x, y=None, z=None)[source]

translate produces a translation by (x, y, z) .

Parameters:y, z (x,) – Specify the x, y, and z coordinates of a translation vector.
dent.transforms.xrotate(M, theta)[source]
dent.transforms.yrotate(M, theta)[source]
dent.transforms.zrotate(M, theta)[source]

Module contents