API Reference

This section contains KangEngine’s public Python API. Examples conventionally use import kangengine as ke; ke is only a local alias for the kangengine package, not a separate package or API layer.

The public API exposes native pybind11 types and pure Python helpers side by side under the documented ke.* paths. Their implementation origin does not affect how they are imported or called. Underscored implementation modules are internal and may change without notice.

[native] identifies compiled pybind11 APIs. [python] identifies Python workflow helpers. Meaningful public inheritance is still shown; implementation-only base classes are omitted.

Application-wide entry points and common app helpers live directly under ke, while specialized APIs are grouped by domain under modules such as ke.scene, ke.physics, and ke.material.

Application

App

Base class for Python KangEngine apps.

DebugGeometry

Mesh-based debug geometry owned by the SceneGraph.

DebugOverlay

OpenGL debug overlay that does not create SceneGraph prims.

WorldText

Persistent screen-aligned text anchored at world-space positions.

ScreenText

Persistent text positioned in viewport pixel(screen) coordinates.

Rendering And Materials

Rendering

Renderer

Facade for custom pipelines and renderable resource updates.

GraphicsDevice

Factory for backend graphics resources.

Texture

GPU texture created by a graphics device.

Buffer

GPU buffer created by a graphics device.

GraphicsPipeline

Opaque compiled graphics pipeline.

ShaderDesc

Shader stages and diagnostic name used to build a pipeline.

SceneHookPipelineDesc

Describe a custom graphics pipeline inserted into scene rendering.

Materials

Material

Base facade wrapping a native renderer material.

VertexColorMaterial

Material using vertex/display colors and an optional built-in style.

PhongMaterial

Blinn-Phong material with factors and optional texture maps.

PBRMaterial

Metallic-roughness PBR material with factors and optional textures.

Scene And Assets

Scene

Prim

USD-like scene graph node with hierarchy, transform, and mesh data.

MeshData

Static mesh payload with vertex attributes and triangle indices.

SkinnedMeshData

Mesh payload with skinning attributes for skeletal animation.

SceneBackend

Abstract scene backend interface for native and USD scenes.

Assets

MJCFLoader

Load MJCF/XML articulation descriptions.

BVHLoader

Load a BVH hierarchy or sampled skeleton motion.

FBXLoader

Load FBX skeletons, animation clips, and character data.

USDLoader

Load meshes from USD scenes.

Animation And Visuals

Animation

SkeletonTree

Read-only skeleton hierarchy and local bind transforms.

SkeletonMotion

Sampled skeleton animation with root motion and local rotations.

SkeletonState

Skeleton pose stored as root translation and S node rotations.

Visual Bridges

ArticulationVisual

Viewer-side articulated rigid-link visual object.

ArticulatedSurface

Application-owned FK surface composed of rigid link meshes.

SkeletalVisual

Instanced line/point renderer for skeleton poses and motion clips.

Deformable Surfaces

SkinnedSurfaceAsset

Static topology and four-weight LBS data uploaded once.

SkinnedSurface

One or more skinned render parts driven by a shared skeleton.

ArticulatedSurfaceAsset

Reusable MJCF skeleton and rigid-link mesh asset.

DeformableSurface

TODO scaffold for directly streamed deformable geometry.

Exports

save_motion_bvh

Write a SkeletonMotion to a BVH file and return its path.

Physics And Simulation

Physics

PhysicsWorld

PhysX simulation world.

Articulation

PhysX articulation wrapper.

PhysicsBridge

Sync PhysX articulation state into scene/render visuals.

PhysicsGpuSystem

Explicit GPU physics synchronization wrapper.

Simulation

KangSimWorld

Owns a PhysX world, registered objects, commands, and world state.

Simulation Visualization

SimWorldVisualizer

Viewer-side visualizer for one KangSimWorld.

Motion And Utilities

Motion

MotionEditor

Motion playback, sequencer UI, and pluggable motion modules.

MotionPlayer

Track playback time and select frames from a sampled motion.

MotionModule

Base interface for optional MotionEditor processing and visualization.

Joint Mapping

JointMapper

Resolve semantic and literal joint names against a motion skeleton.