panda3d.bullet.BulletWorld

from panda3d.bullet import BulletWorld
class BulletWorld

Bases: TypedReferenceCount

Inheritance diagram

Inheritance diagram of BulletWorld

__init__() → None
setGravity(gravity: LVector3) → None
setGravity(gx: float, gy: float, gz: float) → None
getGravity() → LVector3
Return type

LVector3

doPhysics(dt: float, max_substeps: int, stepsize: float) → int
getWorldInfo() → BulletSoftBodyWorldInfo
Return type

BulletSoftBodyWorldInfo

setDebugNode(node: BulletDebugNode) → None
clearDebugNode() → None

Removes a debug node that has been assigned to this BulletWorld.

getDebugNode() → BulletDebugNode
Return type

BulletDebugNode

hasDebugNode() → bool
attach(object: TypedObject) → None

AttachRemove

remove(object: TypedObject) → None
attachConstraint(constraint: BulletConstraint, linked_collision: bool) → None

Attaches a single constraint to a world. Collision checks between the linked objects will be disabled if the second parameter is set to TRUE.

getNumGhosts() → int

Ghost object

getGhost(idx: int) → BulletGhostNode
Return type

BulletGhostNode

getNumRigidBodies() → int

Rigid body

getRigidBody(idx: int) → BulletRigidBodyNode
Return type

BulletRigidBodyNode

getNumSoftBodies() → int

Soft body

getSoftBody(idx: int) → BulletSoftBodyNode
Return type

BulletSoftBodyNode

getNumCharacters() → int

Character controller

getCharacter(idx: int) → BulletBaseCharacterControllerNode
Return type

BulletBaseCharacterControllerNode

getNumVehicles() → int
getVehicle(idx: int) → BulletVehicle
Return type

BulletVehicle

getNumConstraints() → int

Constraint

getConstraint(idx: int) → BulletConstraint
Return type

BulletConstraint

rayTestClosest(from_pos: LPoint3, to_pos: LPoint3, mask: CollideMask) → BulletClosestHitRayResult

Raycast and other queries

Return type

BulletClosestHitRayResult

rayTestAll(from_pos: LPoint3, to_pos: LPoint3, mask: CollideMask) → BulletAllHitsRayResult
Return type

BulletAllHitsRayResult

sweepTestClosest(shape: BulletShape, from_ts: TransformState, to_ts: TransformState, mask: CollideMask, penetration: float) → BulletClosestHitSweepResult

Performs a sweep test against all other shapes that match the given group mask. The provided shape must be a convex shape; it is an error to invoke this method using a non-convex shape.

Return type

BulletClosestHitSweepResult

contactTest(node: PandaNode, use_filter: bool) → BulletContactResult

Performas a test for all bodies which are currently in contact with the given body. The test returns a BulletContactResult object which may contain zero, one or more contacts.

If the optional parameter use_filter is set to TRUE this test will consider filter settings. Otherwise all objects in contact are reported, no matter if they would collide or not.

Return type

BulletContactResult

contactTestPair(node0: PandaNode, node1: PandaNode) → BulletContactResult

Performas a test if the two bodies given as parameters are in contact or not. The test returns a BulletContactResult object which may contain zero or one contacts.

Return type

BulletContactResult

filterTest(node0: PandaNode, node1: PandaNode) → bool

Performs a test if two bodies should collide or not, based on the collision filter setting.

getNumManifolds() → int

Manifolds

getManifold(idx: int) → BulletPersistentManifold
Return type

BulletPersistentManifold

setGroupCollisionFlag(group1: int, group2: int, enable: bool) → None

Collision filtering

getGroupCollisionFlag(group1: int, group2: int) → bool
setForceUpdateAllAabbs(force: bool) → None
getForceUpdateAllAabbs() → bool
setContactAddedCallback(obj: CallbackObject) → None

Callbacks

clearContactAddedCallback() → None
setTickCallback(obj: CallbackObject, is_pretick: bool) → None
clearTickCallback() → None
setFilterCallback(obj: CallbackObject) → None
clearFilterCallback() → None
attachGhost(node: BulletGhostNode) → None

Deprecated: Please use BulletWorld.attach()

removeGhost(node: BulletGhostNode) → None

Deprecated: Please use BulletWorld.remove()

attachRigidBody(node: BulletRigidBodyNode) → None

Deprecated: Please use BulletWorld.attach()

removeRigidBody(node: BulletRigidBodyNode) → None

Deprecated: Please use BulletWorld.remove()

attachSoftBody(node: BulletSoftBodyNode) → None

Deprecated: Please use BulletWorld.attach()

removeSoftBody(node: BulletSoftBodyNode) → None

Deprecated: Please use BulletWorld.remove()

attachCharacter(node: BulletBaseCharacterControllerNode) → None

Deprecated: Please use BulletWorld.attach()

removeCharacter(node: BulletBaseCharacterControllerNode) → None

Deprecated: Please use BulletWorld.remove()

attachVehicle(vehicle: BulletVehicle) → None

Deprecated: Please use BulletWorld.attach()

removeVehicle(vehicle: BulletVehicle) → None

Deprecated: Please use BulletWorld.remove()

removeConstraint(constraint: BulletConstraint) → None

Deprecated: Please use BulletWorld.remove()

static getClassType() → TypeHandle
Return type

TypeHandle

getGhosts() → list
getRigidBodies() → list
getSoftBodies() → list
getCharacters() → list
getVehicles() → list
getConstraints() → list
getManifolds() → list
property gravity

Getter Setter

Return type

LVector3

property world_info
Return type

BulletSoftBodyWorldInfo

property debug_node

Getter Setter

Debug

Debug

Return type

BulletDebugNode

property ghosts
Return type

Sequence[BulletGhostNode]

property rigid_bodies
Return type

Sequence[BulletRigidBodyNode]

property soft_bodies
Return type

Sequence[BulletSoftBodyNode]

property characters
Return type

Sequence[BulletBaseCharacterControllerNode]

property vehicles
Return type

Sequence[BulletVehicle]

property constraints
Return type

Sequence[BulletConstraint]

property manifolds
Return type

Sequence[BulletPersistentManifold]

property force_update_all_aabbs

Getter Setter

Return type

bool

enum BroadphaseAlgorithm

Configuration

enumerator BA_sweep_and_prune = 0
enumerator BA_dynamic_aabb_tree = 1
enum FilterAlgorithm
enumerator FA_mask = 0
enumerator FA_groups_mask = 1
enumerator FA_callback = 2